OSDN Git Service

Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
2
3         * class.c (resolve_address_of_overloaded_function): Do conversion
4         to correct type here, rather than ...
5         (instantiate_type): Here.
6
7         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
8         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
9         (decl_template_parm_p): Remove.
10         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
11         paramter. 
12         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
13         * pt.c (push_inline_template_parms_recursive): Set it.
14         (decl_template_parm_p): Remove.
15         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
16         (process_template_parm): Set it.
17         
18 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
19
20         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
21         if configured with cpplib.
22
23 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
24
25         * decl.c (poplevel): Make sure ns_binding is initialized.
26         
27         * decl.c (finish_function): Undo inadvertant change in previous
28         patch.
29
30 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
31
32         * class.c (pushclass): Tweak handling of class-level bindings.
33         (resolve_address_of_overloaded_function): Update pointer-to-member
34         handling. 
35         (instantiate_type): Likewise.
36         * cvt.c (cp_convert_to_pointer): Likewise.
37         * decl.c (pop_binding): Take the DECL to pop, not just the name.
38         Deal with `struct stat' hack.
39         (binding_level): Add to documentation.
40         (push_binding): Clear BINDING_TYPE.
41         (add_binding): New function.
42         (push_local_binding): Use it.
43         (push_class_binding): Likewise.
44         (poplevel): Adjust calls to pop_binding.
45         (poplevel_class): Likewise.
46         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
47         declarations to current binding level.
48         (push_class_level_binding): Likewise.
49         (push_overloaded_decl): Adjust handling of OVERLOADs in local
50         bindings. 
51         (lookup_namespace_name): Don't crash when confronted with a
52         TEMPLATE_DECL. 
53         (lookup_name_real): Do `struct stat' hack in local binding
54         contexts. 
55         (build_ptrmemfunc_type): Adjust documentation.
56         (grokdeclarator): Don't avoid building real array types when
57         processing templates unless really necessary.
58         (finish_method): Adjust calls to pop_binding.
59         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
60         not reparse_decl_as_expr.
61         (build_expr_from_tree): Deal with a template-id as the function to
62         call in a METHOD_CALL_EXPR.
63         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
64         (maybe_adjust_types_For_deduction): Don't do peculiar things with
65         METHOD_TYPEs here.
66         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
67         pointer-to-member types where necessary.
68         * tree.c (build_cplus_array_type_1): Don't avoid building real
69         array types when processing templates unless really necessary.
70         (build_exception_variant): Compare the exception lists correctly. 
71         
72 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
73
74         * cp-tree.def (CPLUS_BINDING): Update documentation.
75         * cp-tree.h (LOCAL_BINDING_P): New macro.
76         (lang_identifier): Rename local_value to bindings.
77         (tree_binding): Make `scope' of type `void*', not `tree'.
78         (BINDING_SCOPE): Update documentation.
79         (IDENTIFIER_LOCAL_VALUE): Remove.
80         (IDENTIFIER_CLASS_VALUE): Document.
81         (IDENTIFIER_BINDING): New macro.
82         (IDENTIFIER_VALUE): Likewise.
83         (TIME_IDENTIFIER_TIME): Likewise.
84         (TIME_IDENTIFIER_FILEINFO): Likewise.
85         (IMPLICIT_TYPENAME_P): Likewise.
86         (set_identifier_local_value): Remove.
87         (push_local_binding): New function.
88         (push_class_binding): Likewise.
89         * class.c (pushclass): Update comments; use push_class_binding.
90         * decl.c (set_identifier_local_value_with_scope): Remove.
91         (set_identifier_local_value): Likewise.
92         (push_binding): New function.
93         (pop_binding): Likewise.
94         (binding_level): Update documentation.  Remove shadowed.
95         (BINDING_LEVEL): New macro.
96         (free_binding_nodes): New variable.
97         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
98         BLOCK_VARs when doing for-scope extension.  Remove effectively
99         dead code.
100         (pushlevel_class): Tweak formatting.
101         (poplevel_class): Adjust for new name-lookup scheme.
102         (print_binding_level): Likewise.
103         (store_bindings): Likewise.
104         (pushdecl): Likewise.
105         (pushdecl_class_level): Likewise.
106         (push_class_level_binding): Likewise.
107         (push_overloaded_decl): Update comments.  Adjust for new
108         name-lookup scheme.
109         (lookup_name_real): Likewise.
110         (lookup_name_current_level): Likewise.
111         (cp_finish_decl): Likewise.
112         (require_complete_types_for_parms): Likewise.  Remove misleading
113         #if 0'd code. 
114         (grok_parms): Likewise.  Don't call
115         require_complete_types_for_parms here.
116         (grok_ctor_properties): Don't treat templates as copy
117         constructors. 
118         (grop_op_properties): Or as assignment operators.
119         (start_function): Document.  Adjust for new name-lookup scheme.
120         (finish_function): Likewise.
121         * decl2.c (do_local_using_decl): Use push_local_binding.
122         * lex.c (begin_definition_of_inclass_inline): New function, split
123         out from ...
124         (do_pending_inlines): Here, and ...
125         (process_next_inline): Here.
126         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
127         (init_filename_times): Likewise.
128         (extract_interface_info): Likewise.
129         (ste_typedecl_interface_info): Likewise.
130         (check_newline): Likewise.
131         (dump_time_statistics): Likewise.
132         (handle_cp_pragma): Likewise.
133         (do_identifier): Adjust for new name-lookup scheme.
134         * parse.y (function_try_block): Return ctor_initializer_opt value.
135         (fndef): Use it.
136         (fn.defpen): Pass appropriate values to start_function.
137         (pending_inline): Use functor_try_block value, and pass
138         appropriate values to finish_function.
139         * pt.c (is_member_template): Update documentation; remove handling
140         of FUNCTION_DECLs.  As per name, this function should deal only in
141         TEMPLATE_DECLs. 
142         (decl_template_parm_p): Change name of olddecl parameter to decl.
143         (check_template_shadow): Adjust for new name-lookup scheme.
144         (lookup_template_class): Likewise.
145         (tsubst_decl): Tweak so as not to confuse member templates with
146         copy constructors and assignment operators.
147         (unify): Handle UNION_TYPEs.
148         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
149         (lang_print_xnode): Adjust for new name-lookup scheme.
150         * typeck.c (mark_addressable): Likewise.
151         (c_expand_return): Likewise.
152         
153 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
154
155         * decl.c (grokdeclarator): Allow field with same name as class
156         in extern "C".
157
158         * decl.c (lookup_name_real): Don't limit field lookup to types.
159         * class.c (check_member_decl_is_same_in_complete_scope): No error 
160         if icv and x are the same.
161         * lex.c (do_identifier): Tweak error message.
162
163 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
164
165         * decl.c (start_enum): Use push_obstacks, not
166         end_temporary_allocation.
167         (finish_enum): Call pop_obstacks.
168
169 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
170
171         * class.c (instantiate_type): Return error_mark_node rather than
172         junk. 
173
174 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
175
176         * cp-tree.h (most_specialized_instantiation): New function.
177         (print_candidates): Likewise.
178         * class.c (validate_lhs): Remove.
179         (resolve_address_of_overloaded_function): New function, split out
180         and then substantially reworked, from ...
181         (instantiate_type): Use it.  Simplify.
182         * cvt.c (convert_to_reference): Complain when caller has indicated
183         that's the right thing to do.  Don't crash if instantiate_type
184         fails.
185         * pt.c: Substitute `parameters' for `paramters' throughout.
186         (print_candidates): Don't make it static.
187         (most_specialized_instantiation): Split out from ...
188         (most_specialized): Here.
189
190 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
191
192         * lex.c (lang_init_options): Initialize cpplib.
193         * decl2.c (parse_options,cpp_initialized): Removed.
194         (lang_decode_option): Move initialization of cpplib to
195         lang_init_options.
196
197 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
198
199         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
200         well as the TYPE_DECL, when a typedef name is assigned to a
201         previously anonymous type.
202
203 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
204
205         * cp/except.c (call_eh_info): use __start_cp_handler instead of
206         __cp_eh_info for getting the eh info pointer. Add table_index to
207         field list.
208         (push_eh_cleanup): Don't increment 'handlers' data field.
209         (process_start_catch_block): Don't set the 'caught' field.
210
211         * cp/exception.cc (CP_EH_INFO): New macro for getting the 
212         exception info pointer within library routines.
213         (__cp_eh_info): Use CP_EH_INFO.
214         (__start_cp_handler): Get exception info pointer, set caught field,
215         and increment the handlers field. Avoids this being done by handlers.
216         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
217         (uncaught_exception): Use CP_EH_INFO macro.
218
219 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
220
221         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
222
223 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
224
225         * lex.c (check_newline): Add support for \ as `natural'
226         characters in file names in #line to be consistent with #include
227         handling.  We support escape prcessing in the # 1 "..." version of
228         the command.  See also support in cp/lex.c.
229         
230 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
231
232         * cp/decl2.c: s/data/opts/ when initializing cpp_reader 
233           structure.
234         
235 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
236
237         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
238
239         * error.c (dump_simple_decl): Also print namespace context.
240         (dump_function_decl): Likewise.
241
242         * decl2.c (ambiguous_decl): Don't print old value if it's
243         error_mark_node.
244
245         * decl.c (lookup_name_real): Fix handling of local types shadowed
246         by a non-type decl.  Remove obsolete code.
247         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
248
249         * lang-options.h: Add -fpermissive.
250         * decl2.c: Likewise.
251         * cp-tree.h: Add flag_permissive.
252         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
253         were specified, set flag_pedantic_errors.
254         * call.c (build_over_call): Turn dropped qualifier messages
255         back into pedwarns.
256         * cvt.c (convert_to_reference): Likewise.
257         * typeck.c (convert_for_assignment): Likewise.
258
259 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
260
261         * decl2.c (coerce_new_type): Use same_type_p.
262         (coerce_delete_type): Likewise.
263
264         * call.c (check_dtor_name): Return 1, not error_mark_node.
265
266 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
267
268         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
269         if MULTIPLE_SYMBOL_SPACES.
270
271         * pt.c (check_template_shadow): New fn.
272         * decl2.c (grokfield): Use it.
273         * decl.c (pushdecl): Likewise.
274         (pushdecl_class_level): Likewise.
275         (start_method): Likewise.
276         (xref_tag): Don't try to use 't' if we're defining.
277
278         * call.c (check_dtor_name): Just return an error_mark_node.
279         * pt.c (lookup_template_class): Complain about using non-template here.
280         * parse.y (apparent_template_type): Not here.
281
282         * pt.c (check_explicit_specialization): Complain about specialization
283         with C linkage.
284
285         * lang-options.h: Add -f{no-,}implicit-inline-templates.
286
287         * pt.c (convert_nontype_argument): Don't assume that any integer
288         argument is intended to be a constant-expression.
289
290 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
291
292         * class.c (handle_using_decl): Fix comment.  Don't lookup
293         constructors in base classes.
294         (validate_lhs): Fix typo in comment.
295         * search.c (lookup_field_1): Don't return a USING_DECL.
296         
297         * cp-tree.h (DECL_ACCESS): Improve documentation.
298
299         * decl.c (expand_static_init): Don't set the initialization-done
300         flag until the initialization is done.
301         
302 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
303
304         * decl2.c (validate_nonmember_using_decl): Complain about using
305         declarations for class members.
306
307 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
308
309         * typeck2.c (process_init_constructor): Use same_type_p.
310
311         * decl.c (check_tag_decl): Don't warn about null decl inside a 
312         class.
313
314         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
315         UNIFY_ALLOW_NONE.
316         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
317         (resolve_overloaded_unification): Strip baselinks.
318
319 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
320
321         * g++spec.c: Don't prototype xmalloc.
322
323 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
324
325         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
326
327         * decl.c (check_tag_decl): Do complain about null friend decl at
328         file scope.
329
330 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
331
332         * lex.c (make_lang_type): Clear the whole struct lang_type, not
333         only the first multiple of sizeof (int).
334
335 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
336
337         * decl.c (start_decl): An explicit specialization of a static data
338         member is only a definition if it has an initializer.
339
340         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
341         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
342         cp_finish_decl.
343         * init.c (expand_default_init): Check for DIRECT_BIND instead of
344         DECL_ARTIFICIAL.
345
346         * call.c (build_over_call): Use build_decl.
347
348         * except.c (expand_throw): Just use convert, not
349         build_reinterpret_cast.
350
351         * lex.c (handle_generic_pragma): Use token_buffer.
352
353         * decl.c (check_tag_decl): Don't complain about null friend decl.
354
355 1998-11-24  Dave Pitts  <dpitts@cozx.com>
356
357         * Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the 
358         first position.
359         * lex.c (check_newline): Use ISALPHA.
360         (readescape): Use ISGRAPH.
361         (yyerror): Use ISGRAPH.
362
363 1998-11-24  Nathan Sidwell  <nathan@acm.org>
364
365         * search.c (get_abstract_virtuals): Do not use initial
366         CLASSTYPE_ABSTRACT_VIRTUALS.
367         * typeck2.c (abstract_virtuals_error): Show location of abstract
368         declaration.
369         * call.c (build_new_method_call): Use
370         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
371         * class.c (finish_struct_bits): Don't bother working out whether
372         get_abstract_virtuals will do anything, just do it.
373
374 1998-11-24  Graham <grahams@rcp.co.uk>
375
376         * typeck.c (build_component_ref): Remove unused statement.
377
378 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
379
380         * class.c (add_method): Catch invalid overloads.
381
382         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
383         * search.c (lookup_conversions): Handle getting real OVERLOADs.
384         (add_conversions): Likewise.  Revert last change.
385         * call.c (add_conv_candidate): Pass totype to add_candidate instead
386         of fn.  Don't add a new candidate if the last one was for the same 
387         type.
388         (print_z_candidates): Handle getting a type as a function.
389         (joust): If we got two conversion candidates to the same type, 
390         just pick one.
391         (build_object_call): Lose 'templates'.
392         (build_user_type_conversion_1): Handle getting real OVERLOADs.
393
394 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
395
396         * typeck2.c (process_init_constructor): If there are elements
397         that don't have initializers and they need to have constructors
398         run, supply them with initializers.
399
400         * class.c (finish_struct_1): A class with a 0-width bitfield is
401         still empty.
402
403 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
404
405         * pt.c (instantiate_class_template): Don't try to figure out what
406         specialization to use for a partial instantiation.  Correct
407         typos in a couple of comments.  Avoid calling uses_template_parms
408         multiple times.
409
410 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
411
412         * method.c (process_overload_item): Add call to
413         build_mangled_C9x_name for intTI_type_nodes.
414         (build_mangled_C9x_name): Add prototype, define.
415         * decl.c (init_decl_processing): Add names for
416         TImode_type_node. 
417         
418 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
419
420         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
421
422         * class.c (finish_struct_1): Set things up for 0-width bitfields
423         like we do for others.
424
425         * decl.c (check_tag_decl): New fn.
426         (shadow_tag): Split out from here.
427         * decl2.c (grok_x_components): Call it.
428
429 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
430
431         * decl.c: Lose warn_about_return_type.
432         (grokdeclarator): Always complain about implicit int, except for
433         `main () { ... }'.
434
435         * decl.c (tag_name): New fn.
436         (xref_tag): Complain about using typedef-name after class-key.
437
438         * init.c (expand_vec_init): Also keep going if from_array.
439
440         * tree.c (is_overloaded_fn): Also handle the output of
441         build_offset_ref.
442
443         * decl.c (grokdeclarator): Use constructor_name when comparing
444         field name against enclosing class.
445         * class.c (finish_struct_anon): Likewise.
446
447 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
448
449         * decl.c (poplevel): Remove code to handle KEEP == 2.
450         (finish_function): Don't confuse BLOCK-order when
451         processing a destructor.
452
453 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
454
455         * decl.c (require_complete_types_for_parms): Call layout_decl
456         after we've completed the type.
457
458 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
459
460         * decl2.c (validate_nonmember_using_decl): Allow using templates
461         from the global namespace.
462
463 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
464
465         Handle specifying template args to member function templates.
466         * tree.c (build_overload): Always create an OVERLOAD for a template.
467         * search.c (add_conversions): Handle finding an OVERLOAD.
468         * decl2.c (check_classfn): Likewise.
469         * lex.c (identifier_type): See through a baselink.
470         * parse.y (do_id): Don't call do_identifier if we got a baselink.
471         * class.c (instantiate_type, case TREE_LIST): Recurse.
472
473         * decl.c (grokdeclarator): Allow a boolean constant for array
474         bounds, odd as that sounds.
475
476         * pt.c (unify): Be more strict about non-type parms, except for
477         array bounds.
478         (UNIFY_ALLOW_INTEGER): New macro.
479
480 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
481
482         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
483
484 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
485
486         * semantics.c (begin_class_definition): Call
487         maybe_process_partial_specialization before push_template_decl.
488         Don't call push_template_decl for a specialization.
489         * search.c (lookup_field): Do return a member template class.
490         * decl2.c (handle_class_head): Handle member template classes.
491
492         * decl.c (grokdeclarator): A parm type need not be complete.
493
494         * pt.c (convert_nontype_argument): Fix thinko.
495
496 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
497
498         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
499         (global_delete_fndecl): New variable.
500         * decl.c (global_delete_fndecl): Define it.
501         (init_decl_processing): Set it.
502         * init.c (build_builtin_delete_call): Use it.
503         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
504         nodes.
505
506 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
507
508         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
509         type.
510
511         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
512         * call.c (build_object_call): Also support references to functions.
513         * typeck.c (convert_for_initialization): Don't decay a function
514         if the target is a reference to function.
515
516         * search.c (add_conversions): Get all the overloads from a class.
517
518         * decl.c (grok_ctor_properties): Complain about any constructor
519         that will take a single arg of the class type by value.
520
521         * typeck2.c (build_functional_cast): Can't create objects of 
522         abstract classes this way.
523         * cvt.c (ocp_convert): Likewise.
524
525         * decl.c (grokfndecl): Member functions of local classes are not
526         public.
527
528 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
529
530         * Make-lang.in (cc1plus): Add dependency on hash.o.
531
532 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
533
534         * search.c (get_abstract_virtuals): Complain about virtuals with
535         no final overrider.
536         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
537         with no final overrider.
538         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
539         on virtuals with no final overrider.
540
541         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
542
543         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
544         after layout_type.
545
546         * friend.c (do_friend): Don't set_mangled_name_for_decl.
547
548         * class.c (finish_struct_anon): Complain about non-fields.
549         * decl2.c (build_anon_union_vars): Likewise.
550
551         * decl.c (grokdeclarator): Normal data members can't have the same
552         name as the class, either.
553         * class.c (finish_struct_anon): Neither can members of an
554         anonymous union.
555
556 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
557
558         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
559         (TYPE_BINFO): Likewise.
560         (IS_AGGR_TYPE): Tweak.
561         (SET_IS_AGGR_TYPE): New macro.
562         (CLASS_TYPE_P): Tweak.
563         (lang_type): Group mark bitfields together.  Remove linenum.
564         (CLASSTYPE_SOURCE_LINE): Remove macro.
565         (CLASSTYPE_MARKED_N): New macro.
566         (SET_CLASSTYPE_MARKED_N): Likewise.
567         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
568         (CLASS_TYPE_MARKED_*): Use them.
569         (SET_CLASSTYPE_MARKED_*): Likewise.
570         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
571         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
572         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
573         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
574         * class.c (class_cache_obstack): New variable.
575         (class_cache_firstobj): Likewise.
576         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
577         (pushclass): Free the cache, when appropriate.
578         (popclass): Tidy.
579         (maybe_push_cache_obstack): Use class_cache_obstack.
580         * decl.c (include hash.h).
581         (typename_hash): New function.
582         (typename_compare): Likewise.
583         (build_typename_type): Check the hash table to avoid creating
584         duplicates.
585         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
586         (grokdeclarator): Use CLASS_TYPE_P.
587         (xref_basetypes): Likewise.
588         (start_function): Likewise.  Don't put current_class_ref on the
589         permanent obstack.
590         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
591         and TYPE_TI_ARGS.
592         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
593         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
594         fields for types other than class types.  Do clear TYPE_ALIAS_SET
595         for types other than class types, though.
596         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
597         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
598         * pt.c (process_template_parm): Don't set
599         CLASSTYPE_GOT_SEMICOLON.  
600         (lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
601         Coerce arguments on the momentary obstack.
602         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
603         (instantiate_class_template): Calculate template arguments on the
604         momentary obstack.  Tidy.
605         (tsubst_template_arg_vector): Use make_temp_vec.
606         (tsubst_aggr_type): Put template arguments on the momentary
607         obstack. 
608         (tsubst_decl): Likewise.
609         (tsubst): Copy the array bounds index to the permanent obstack
610         before building index types.  Use new macros.
611         (unify): Use new macros.
612         (do_type_instantiation): Likewise.
613         * search.c (lookup_fnfields_1): Use new macros.
614         (dfs_pushdecls): Build envelopes on the cache obstack.
615         (dfs_compress_decls): Use new macros.
616         (push_class_decls): Build on the cache obstack.
617         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
618         * sign.c (build_signature_pointer_or_reference_type): Use
619         SET_IS_AGGR_TYPE.
620         * tree.c (make_binfo): Check CLASS_TYPE_P.
621         (copy_template_template_parm): Adjust.
622         (make_temp_vec): Use push_expresion_obstack.
623         * typeck.c (complete_type): Use new macros.
624         (comptypes): Likewise.
625         
626 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
627
628         * pt.c (tsubst): Add diagnostics for invalid array, reference
629         and pointer to member types.
630
631 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
632
633         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
634
635         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
636         Simplify.
637
638         * parse.y (structsp): Fix cut-and-paste error.
639
640         * init.c (build_new): Complain about non-integral size.
641
642         * parse.y (unary_expr): Complain about defining types in sizeof.
643
644         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
645
646         * rtti.c (build_x_typeid): Complain about typeid without 
647         including <typeinfo>.
648         (get_typeid): Likewise.  Complain about typeid of incomplete type.
649         (get_tinfo_fn_dynamic): Likewise.
650         (get_typeid_1): Not static anymore.
651         * except.c (build_eh_type_type): Use get_typeid_1.
652
653         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
654         ambiguous or private bases.  Fix warning for reference cast.
655
656 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
657
658         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
659         * decl.c (duplicate_decls): Remove special-case code to deal with
660         template friends, and just do the obvious thing.
661         * pt.c (register_specialization): Tweak for clarity, and also to
662         clear DECL_INITIAL for an instantiation before it is merged with a
663         specialization.
664         (check_explicit_specialization): Fix indentation.
665         (tsubst_friend_function): Handle both definitions in friend
666         declaration and outside friend declarations.
667         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
668         (regenerate_decl_from_template): Tweak accordingly.
669         (instantiate_decl): Likewise.
670         
671 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
672
673         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
674         member function reference to error.
675         * cvt.c (ocp_convert): Complain about converting an overloaded 
676         function to void.
677
678         * init.c (build_offset_ref): Just return a lone static member
679         function.
680
681         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
682         not internal ones.
683
684         * typeck.c (build_binary_op_nodefault): Improve error handling.
685
686         * decl.c (grokfndecl): Complain about making 'main' a template.
687
688         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
689
690         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a 
691         TYPE_DECL in a template.
692
693 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
694
695         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
696
697         * decl.c (struct cp_function): Add named_label_uses.
698         (push_cp_function_context): Save it.
699         (pop_cp_function_context): Restore it.
700         (define_label): Also complain about jumping into the scope of 
701         non-POD objects that don't have constructors.
702         * tree.c (pod_type_p): New fn.
703
704         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
705         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
706         (get_tinfo_fn): Not here.
707         * repo.c (repo_get_id): Abort if we get called for an incomplete
708         type.
709
710 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
711
712         * except.c (expand_throw): Make sure first argument to
713         __cp_push_exception is of type `void*' to avoid spurious error
714         messages.
715
716 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
717
718         * pt.c (try_one_overload): Take orig_targs again.  Only check for
719         mismatches against them; we don't care what a previous call found.
720         (resolve_overloaded_unification): Adjust.
721
722         * search.c (lookup_field): Don't return anything for a non-type
723         field from a dependent type.
724         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
725         in an array declarator.
726         (start_decl): Push into the class before looking for the field.
727
728 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
729
730         * method.c (build_overload_value): Handle REFERENCE_TYPE.
731
732 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
733
734         * decl.c (grokdeclarator): Allow namespace-scoped members if they
735         are friends.
736
737 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
738
739         * pt.c (tsubst_decl): Don't mess with the global value of an 
740         un-mangled DECL_ASSEMBLER_NAME.
741
742 1998-11-03  Christopher Faylor <cgf@cygnus.com>
743
744         * decl.c (init_decl_processing): Remove CYGWIN conditional
745         since CYGWIN is now able to deal with trapping signals.
746
747 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
748
749         * cp-tree.h: Don't include gansidecl.h.
750         * exception.cc: Include gansidecl.h (since we don't include config.h)
751         * g++spec.c: Don't include gansidecl.h.
752
753 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
754
755         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
756         size of dummy.
757         (DECL_DEFINED_IN_CLASS_P): New macro.
758         (TEMPLATE_PARMS_FOR_INLINE): Document.
759         (check_static_variable_definition): New function.
760         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
761         appropriate. 
762         (check_static_variable_definition): Split out from ...
763         (grokdeclarator): Here.
764         * pt.c (check_default_tmpl_args): New function, split out from ...
765         (push_template_decl_real): Here.
766         (instantiate_template): Fix comment.
767         
768 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
769
770         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
771         (CP_TYPE_VOLATILE_P): Likewise.
772         (CP_TYPE_RESTRICT_P): Likewise.
773
774 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
775
776         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
777
778 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
779
780         * class.c (instantiate_type): Be more helpful.
781
782         * decl2.c (import_export_decl): Call import_export_class.
783
784         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
785         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
786         * pt.c (tsubst_copy): Likewise.
787
788 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
789
790         * init.c (expand_vec_init): Fix off-by-one error.
791
792 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
793
794         * parse.y (apparent_template_type): new type
795         (named_complex_class_head_sans_basetype): use it
796         * Makefile.in (CONFLICTS): one new conflict
797         * parse.c: Regenerated
798
799 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
800
801         * cp-tree.h (COMPARE_STRICT): New macro.
802         (COMPARE_BASE): Likewise.
803         (COMPARE_RELAXED): Likewise.
804         (COMPARE_REDECLARATION): Likewise.
805         (same_type_p): Likewise.
806         (same_or_base_type_p): Likewise.
807         * call.c (standard_conversion): Use them, in place of comptypes
808         with numeric arguments.
809         (reference_binding): Likewise.
810         (convert_like): Likewise.
811         (build_over_call): Likewise.
812         (is_subseq): Likewise.
813         (is_properly_derived_from): Likewise.
814         (compare_ics): Likewise.
815         (joust): Likewise.
816         * class.c (delete_duplicate_fields_1): Likewise.
817         (resolves_to_fixed_type_p): Likewise.
818         (instantiate_type): Likewise.  Remove #if 0'd code.
819         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
820         (pushdecl): Likewise.
821         (lookup_name_real): Likewise.
822         (grokdeclarator): Likewise.  Check for illegal array declarations.
823         (grokparms): Likewise.
824         (grok_op_properties): Likewise.
825         * decl2.c (check_classfn): Likewise.
826         * friend.c (is_friend): Likewise.
827         (make_friend_class): Likewise.
828         * init.c (expand_aggr_init): Likewise.
829         (expand_vec_init): Likewise.
830         * pt.c (is_member_template_class): Remove declaration.
831         (is_specialization_of): Use COMPARE_* and new macros.
832         (comp_template_parms): Likewise.
833         (convert_nontype_argument): Likewise.
834         (coerce_template_template_parms): Likewise.
835         (template_args_equal): Likewise.
836         (lookup_template_class): Likewise.
837         (type_unification_real): Likewise.
838         (unify): Likewise.
839         (get_bindings_real): Likewise.
840         * search.c (covariant_return_p): Likewise.
841         (get_matching_virtual): Likewise.
842         * sig.c (match_method_types): Likewise.
843         * tree.c (vec_binfo_member): Likewise.
844         (cp_tree_equal): Likewise.
845         * typeck.c (common_type): Likewise.
846         (comp_array_types): Likewise.  Get issues involving unknown array
847         bounds right.
848         (comptypes): Update comments.  Use new flags.
849         (comp_target_types): Use new macros.
850         (compparms): Likewise.
851         (comp_target_parms): Likewise.
852         (string_conv_p): Likewise.
853         (build_component_ref): Likewise.
854         (build_indirect_ref): Likewise.
855         (build_conditional_expr): Likewise.
856         (build_static_cast): Likewise.
857         (build_reinterpret_cast): Likewise.
858         (build_const_cast): Likewise.
859         (build_modify_expr): Likewise.
860         (convert_for_assignment): Likewise.
861         (comp_ptr_ttypes_real): Likewise.
862         (ptr_reasonably_similar): Likewise.
863         (comp_ptr_ttypes_const): Likewise.
864         
865 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
866
867         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
868
869 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
870
871         * decl2.c (delete_sanity): Pass integer_zero_node, not
872         integer_two_node, to build_vec_delete.
873         * init.c (build_array_eh_cleanup): Remove.
874         (expand_vec_init_try_block): New function.
875         (expand_vec_init_catch_clause): Likewise.
876         (build_vec_delete_1): Don't deal with case that auto_delete_vec
877         might be integer_two_node anymore.
878         (expand_vec_init): Rework for initialization-correctness and
879         exception-correctness.
880         * typeck2.c (process_init_constructor): Make mutual exclusivity
881         of cases more obvious.
882         
883 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
884
885         * decl.c (lookup_name_real): OK, only warn if not lexing.
886         Simplify suggested fix.
887
888         * cp-tree.h (IDENTIFIER_MARKED): New macro.
889         * search.c (lookup_conversions): Use breadth_first_search.
890         (add_conversions): Avoid adding two conversions to the same type.
891         (breadth_first_search): Work with base binfos, rather
892         than binfos and base indices.
893         (get_virtual_destructor): Adjust.
894         (tree_has_any_destructor_p): Adjust.
895         (get_matching_virtual): Adjust.
896
897         * pt.c (push_template_decl_real): Generalize check for incorrect
898         number of template parms.
899         (is_member_template_class): #if 0.
900
901 1998-10-29  Richard Henderson  <rth@cygnus.com>
902
903         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
904         last.
905
906 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
907         
908         * lex.c: Call check_newline from lang_init always.  After
909         calling cpp_start_read, set yy_cur and yy_lim to read from the
910         cpplib token buffer.
911
912 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
913
914         * class.c (instantiate_type): Don't consider templates for a normal
915         match.
916
917         * class.c (finish_struct_1): Don't complain about non-copy
918         assignment ops in union members.
919
920         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
921         (prepare_fresh_vtable): Likewise.
922         (finish_struct_1): Don't call import_export_class.
923         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
924         (finish_prevtable_vardecl): Lose.
925         (finish_file): Don't call it.
926         * pt.c (instantiate_class_template): Likewise.
927         * cp-tree.h: Remove it.
928
929         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
930         * decl.c (finish_function): Not here.
931         (start_function): Do set DECL_INITIAL.
932         
933         * pt.c (push_template_decl_real): Complain about default template
934         args for enclosing classes.
935
936         * call.c (add_function_candidate): Treat conversion functions
937         as coming from the argument's class.
938         * cp-tree.h (DECL_CONV_FN_P): New fn.
939         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
940         * class.c (add_method): Use DECL_CONV_FN_P.
941         * decl2.c (check_classfn): Likewise.
942         * error.c (dump_function_name): Likewise.
943         (dump_function_decl): Likewise.
944         * pt.c (fn_type_unification): Likewise.
945         * search.c (add_conversions): Likewise.
946
947 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
948
949         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
950         * method.c (hack_identifier): Also check for using RESULT_DECL
951         from outer context.
952
953 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
954
955         * decl.c (grokdeclarator): Use type_quals, rather than constp,
956         consistently.
957
958 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
959
960         * call.c (standard_conversion): instantiate_type here.
961         (reference_binding): And here.
962         (implicit_conversion): Not here.
963         (build_op_delete_call): No need to cons up an OVERLOAD.
964         * cvt.c (cp_convert_to_pointer): instantiate_type here.
965         (convert_to_reference): And here.
966         * decl.c (grok_reference_init): Not here.
967         (grokparms): Or here.
968         * typeck2.c (digest_init): Or here.
969         * typeck.c (decay_conversion): Take the address of overloaded
970         functions, too.
971         (require_instantiated_type): Lose.
972         (convert_arguments): Don't handle unknown types here.
973         (build_c_cast): Likewise.
974         (build_binary_op): Gut.
975         (build_conditional_expr): Don't require_instantiated_type.
976         (build_modify_expr): Likewise.
977         (build_static_cast): Don't instantiate_type.
978         (build_reinterpret_cast): Likewise.
979         (build_const_cast): Likewise.
980         (convert_for_initialization): Likewise.
981         (build_ptrmemfunc): Use type_unknown_p.
982         (convert_for_assignment): Also do default_conversion on overloaded
983         functions.  Hand them off to ocp_convert.
984
985 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
986
987         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
988         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
989
990         * class.c (finish_struct_1): Use build_cplus_array_type to build
991         array types.
992         * decl.c (init_decl_processing): Likewise.
993         * except.c (expand_end_eh_spec): Likewise.
994         * search.c (expand_upcast_fixups): Simplify very slightly.
995         
996 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
997
998         * decl.c (grokdeclarator): Complain about a variable using
999         constructor syntax coming back null from start_decl.
1000
1001         * friend.c (make_friend_class): Complain about trying to make
1002         a non-class type a friend.
1003
1004         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
1005         (start_function): Not here.
1006
1007 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
1008
1009         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1010
1011 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
1012
1013         * typeck2.c (process_init_constructor): Only skip anonymous fields
1014         if they are bitfields.
1015
1016         * cp-tree.def (TYPEOF_TYPE): New code.
1017         * error.c (dump_type_real): Handle it.
1018         * pt.c (tsubst): Likewise.
1019         * tree.c (search_tree): Likewise.
1020         * semantics.c (finish_typeof): New fn.
1021         * parse.y (typespec): Use it.
1022         * cp-tree.h: Declare it.
1023
1024 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
1025
1026         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
1027
1028 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
1029
1030         * typeck.c (convert_arguments): Don't handle pmf references 
1031         specially.
1032
1033         * init.c (build_member_call): Don't try to convert to the base type
1034         if it's ambiguous or pedantic.
1035
1036         * typeck2.c (check_for_new_type): Only depend on pedantic for
1037         C-style casts.
1038
1039 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
1040
1041         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
1042         non-converting constructors.
1043         
1044 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1045
1046         * gxxint.texi: Correct documentation for n, N, Q, and B.
1047
1048 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1049
1050         * parse.y (condition): Convert VAR_DECL from reference to indirect
1051         reference.
1052
1053 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
1054
1055         * exception.cc (__cp_pop_exception): Free the original exception
1056         value, not the potentially coerced one.
1057
1058 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
1059
1060         * Makefile.in (hash.h): Run gperf when necessary.
1061
1062         * cp-tree.h (CP_TYPE_READONLY): Remove.
1063         (CP_TYPE_VOLATILE): Likewise.
1064         (CP_TYPE_QUALS): New macro.
1065         (CP_TYPE_CONST_P): Likewise.
1066         (CP_TYPE_VOLATILE_P): Likewise.
1067         (CP_TYPE_RESTRICT_P): Likewise.
1068         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
1069         (cp_build_type_variant): Rename to ...
1070         (cp_build_qualified_type): New function.
1071         (c_apply_type_quals_to_decl): Declare.
1072         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
1073         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
1074         (cp_type_qual_from_rid): New function.
1075         (compparms): Remove unused parameter.  All callers changed.
1076         (cp_type_quals): New function.
1077         (at_least_as_qualified_p): Likewise.
1078         (more_qualified_p): Likewise.
1079         
1080         * call.c (standard_conversion): Replace calls to
1081         cp_build_type_variant with cp_build_qualified_type.  Use
1082         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
1083         compare them.  Use CP_TYPE_* macros to check qualifiers.
1084         (reference_binding): Likewise.
1085         (implicit_conversion): Likewise.
1086         (add_builtin_candidates): Likewise.
1087         (build_over_call): Likewise.
1088         * class.c (overrides): Compare all qualifiers, not just `const',
1089         on method declarations.
1090         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
1091         (convert_pointer_to_real): Likewise.
1092         (type_promotes_to): Likewise.
1093         * decl.c (check_for_uninitialized_const_var): New function.
1094         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
1095         (cp_finish_decl): Use check_for_uninitialized_const_var.
1096         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
1097         handle `restrict'.
1098         (grok_ctor_properties): Likewise.
1099         (grok_op_properties): Likewise.
1100         (start_function): Likewise.
1101         (rever_static_member_fn): Likewise.
1102         * decl2.c (grok_method_quals): Likewise.
1103         (grokfield): Likewise.
1104         * error.c (dump_readonly_or_volatile): Rename to ...
1105         (dump_qualifiers): New function.  Handle `restrict'.
1106         (dump_type_real): Use it.
1107         (dump_aggr_type): Likewise.
1108         (dump_type_prefix): Likewise.
1109         (dump_type_suffix): Likewise.
1110         (dump_function_decl): Likewise.
1111         (cv_as_string): Likewise.
1112         * gxx.gperf: Add __restrict and __restrict__.
1113         * gxxint.texi: Document `u' as used for `__restrict', and a few
1114         other previously undocumented codes.
1115         * hash.h: Regenerated.
1116         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
1117         (build_member_call): Likewise.
1118         (build_new_1): Likewise.
1119         * lex.c (init_parse): Add entry for RID_RESTRICT.
1120         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
1121         (cp_type_qual_from_rid): Define.
1122         * lex.h (enum rid): Add RID_RESTRICT.
1123         * method.c (process_modifiers): Deal with `restrict'.
1124         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
1125         * parse.c: Regenerated.
1126         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
1127         (tsubst_aggr_type): Likewise.
1128         (tsubst): Likewise.
1129         (check_cv_quals_for_unify): Likewise.
1130         (unify): Likewise.
1131         * rtti.c (init_rtti_processing): Likewise.
1132         (build_headof): Likewise.
1133         (get_tinfo_var): Likewise.
1134         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
1135         (expand_class_desc): Likewise.
1136         (expand_attr_desc): Likewise.
1137         (synthesize_tinfo_fn): Likewise.
1138         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling. 
1139         (get_matching_virtual): Likewise.
1140         (expand_upcast_fixups): Likewise.
1141         * sig.c (build_signature_pointer_or_reference_name): Take
1142         type_quals, not constp and volatilep.
1143         (build_signature_pointer_or_reference_type): Likewise.
1144         (match_method_types): More CP_TYPE_QUALS conversion, etc.
1145         (build_signature_pointer_constructor): Likewise.
1146         (build_signature_method_call): Likewise.
1147         * tree.c (build_cplus_array_type): Likewise.
1148         (cp_build_type_variant): Rename to ...
1149         (cp_build_qualified_type): New function.  Deal with `__restrict'.
1150         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
1151         (build_exception_variant): Likewise.
1152         (mapcar): Likewise.
1153         * typeck.c (qualif_type): Likewise.
1154         (common_type): Likewise.
1155         (comptypes): Likewise.
1156         (comp_cv_target_types): Likewise.
1157         (at_least_as_qualified_p): Define.
1158         (more_qualified_p): Likewise.
1159         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
1160         (compparms): Likewise.
1161         (inline_conversion): Likewise.
1162         (string_conv_p): Likewise.
1163         (build_component_ref): Likewise.
1164         (build_indirect_ref): Likewise.
1165         (build_array_ref): Likewise.
1166         (build_unary_op): Likewise.
1167         (build_conditional_expr): Likewise.
1168         (build_static_cast): Likewise.
1169         (build_c_cast): Likewise.
1170         (build_modify_expr): Likewise.
1171         (convert_For_assignment): Likewise.
1172         (comp_ptr_ttypes_real): Likewise.
1173         (cp_type_quals): New function.
1174         
1175 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
1176
1177         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
1178         (CP_TYPE_VOLATILE): Likewise.
1179         * decl.c (grokdeclarator): Use them.
1180         * tree.c (canonical_type_variant): Likewise.
1181
1182 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1183
1184         * parse.y (named_class_head): Push into class while parsing the
1185         base class list.
1186         * decl2.c (push_scope, pop_scope): New functions.
1187         * cp-tree.h: Declare them.
1188         * init.c (build_new_1): Delay cleanup until end of full expression.
1189
1190 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
1191
1192         * typeck.c (build_component_ref): Use of a type here is an error.
1193
1194 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
1195
1196         Revamp references to member functions.
1197         * method.c (hack_identifier): Call build_component_ref for a
1198         reference to a member function.
1199         * typeck.c (build_component_ref): Only return a single function 
1200         if it's static.  Otherwise, return a COMPONENT_REF.
1201         (build_x_function_call): Handle a COMPONENT_REF.
1202         (build_unary_op): Handle all unknown-type things.
1203         * decl2.c (arg_assoc): Handle COMPONENT_REF.
1204         * class.c (instantiate_type): Complain if the function we get is a
1205         nonstatic member function.  Remove code for finding "compatible"
1206         functions.
1207         * pt.c (tsubst_copy): Handle NOP_EXPR.
1208         * tree.c (build_dummy_object): New fn.
1209         (maybe_dummy_object): New fn.
1210         (is_dummy_object): New fn.
1211         * cp-tree.h: Declare them.
1212         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
1213         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
1214         * init.c (build_member_call): Use maybe_dummy_object and
1215         is_dummy_object.
1216         (build_offset_ref): Use maybe_dummy_object.
1217         (resolve_offset_ref): Use is_dummy_object.
1218         * typeck.c (build_x_function_call): Call build_dummy_object.
1219         (unary_complex_lvalue): Call is_dummy_object.
1220
1221         * typeck.c (build_component_addr): Make sure field is a field.
1222
1223         * call.c (build_new_op): Delete obsolete code.
1224
1225         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
1226
1227 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1228
1229         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
1230         std if std is ignored.
1231
1232 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
1233
1234         * decl.c (grokvardecl): Fix thinko.
1235
1236         * decl.c (grokdeclarator): Embedded attrs bind to the right,
1237         not the left.
1238
1239         * parse.y (fn.def2): Fix 'attrs' format.
1240
1241 1998-10-18  Alastair J. Houghton <ajh8@doc.ic.ac.uk>
1242
1243         * Makefile.in (CONFLICTS): Update.
1244         * parse.y (expr_or_declarator_intern): New rule.
1245         (expr_or_declarator, direct_notype_declarator, primary,
1246         functional_cast): Use it.
1247         (notype_declarator_intern): New rule.
1248         (notype_declarator, complex_notype_declarator): Use it.
1249
1250 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
1251
1252         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
1253         (grokvardecl): Likewise.
1254
1255 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1256
1257         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
1258         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
1259         
1260         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
1261
1262         * pt.c (process_partial_specialization): Cast 1st argument of
1263         `bzero' to (PTR).
1264
1265         * tree.c (build_base_fields): Cast `base_align' to (int) when
1266         comparing against one.
1267
1268 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
1269
1270         * decl.c (lookup_name_real): Handle template parameters for member
1271         templates where said parameters have the same name as the
1272         surrounding class.
1273
1274         * decl.c (expand_static_init): Build cleanups before entering the
1275         anonymous function used to do them to avoid access-checking
1276         confusion.
1277
1278         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
1279         accidentally removed by previous change, and make DECL_RTL here.
1280         * class.c (add_method): Don't make DECL_RTL here.
1281         
1282         * pt.c (for_each_template_parm): Don't examine uninstantiated
1283         default arguments.
1284
1285 1998-10-16  Dave Brolley  <brolley@cygnus.com>
1286
1287         * lex.c (real_yylex): Fix unaligned access of wchar_t.
1288
1289 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
1290
1291         * class.c (add_method): Fix documentation to reflect previous
1292         changes.  Check for duplicate method declarations here.
1293         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
1294         correctly; such things never match.
1295         (grokfndecl): Don't look for duplicate methods here.
1296         * decl2.c (check_classfn): Don't assume names are mangled.
1297         Don't add bogus member function declarations to a class before the
1298         class type is complete.
1299         (grokfield): Reformat error message.
1300         * method.c (set_mangled_name_for_decl): Don't mangle names while
1301         procesing_template_decl.
1302         
1303 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
1304
1305         * typeck.c (build_indirect_ref): Complain about a pointer to data
1306         member, too.
1307         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
1308         data member.
1309         * init.c (resolve_offset_ref): Don't undo the above.
1310
1311         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
1312         (struct lang_decl_flags): Add `bitfield'.
1313         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
1314         DECL_BIT_FIELD.
1315         * decl2.c (grokbitfield, grok_alignof): Likewise.
1316         * init.c (build_offset_ref): Likewise.
1317         * typeck.c (build_component_addr, expr_sizeof): Likewise.
1318         * cvt.c (build_up_reference): Don't crash if taking the address
1319         returns error_mark_node.
1320
1321         * decl.c (grokfndecl): Also check ctype when checking for ::main().
1322
1323 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
1324
1325         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
1326         Do mangling here.
1327         (grokdeclarator): Instead of here.
1328         * friend.c (do_friend): Lose special handling of ::main and
1329         __builtin_*.
1330         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
1331
1332         * spew.c (yylex): Clear looking_for_typename if we got
1333         'enum { ... };'.
1334
1335 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
1336
1337         * class.c (maybe_warn_about_overly_private_class): Improve error
1338         messages for class with only private constructors.
1339
1340         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
1341         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
1342         (build_typename_type): New function.
1343         * decl.c (build_typename_type): Broken out from ...
1344         (make_typename_type): Use it.
1345         * search.c (lookup_field): Likewise.
1346
1347 1998-10-14 Benjamin Kosnik  <bkoz@rhino.cygnus.com>
1348
1349         * pt.c (convert_nontype_argument): Check against type_referred_to.
1350         * decl.c (grokvardecl): Check for declarator name before building
1351         DECL_ASSEMBLER_NAME.
1352          
1353 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
1354
1355         * pt.c (lookup_template_class): Add comment.
1356         (instantiate_class_template): Don't mark the _TYPE node for
1357         member class templates as an instantiation.
1358
1359 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
1360
1361         * decl.c (grokfndecl): Fix my thinko.
1362
1363 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
1364
1365         * tinfo2.cc (fast_compare): Remove.
1366         (before): Just use strcmp.
1367         * tinfo.cc (operator==): Just use strcmp.
1368
1369 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
1370
1371         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
1372         declarations.
1373
1374 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
1375
1376         * cp-tree.h (specializations_of_same_template_p): Remove.
1377         * search.c (get_template_base): Don't use it.
1378         (get_template_base_recursive): Likewise.
1379         * pt.c (specializations_of_same_template_p): Remove.
1380         (unify): Don't use it.
1381         (lookup_template_class): Find the correct parent when setting
1382         CLASSTYPE_TI_TEMPLATE.
1383         
1384 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
1385
1386         * tinfo.cc (operator==): Always compare names.
1387
1388 1998-10-12  Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
1389
1390         * decl.c (start_function): Fix cut-and-paste error.
1391
1392 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
1393
1394         * inc/typeinfo: Add #pragma interface.
1395         (operator!=): Just call operator==.
1396         * tinfo.cc: Add #pragma implementation.
1397         (operator==): Move from inc/typeinfo and tinfo2.cc.
1398         Check __COMMON_UNRELIABLE instead of _WIN32.
1399
1400         * typeck2.c (my_friendly_abort): Add URL.
1401
1402 1998-10-12  Alastair J. Houghton <ajh8@doc.ic.ac.uk>
1403
1404         * decl.c (start_method): Added extra parameter for attributes.
1405         * cp-tree.h (start_method): Update prototype.
1406         * parse.y (fn.def2): Update start_method parameter list.
1407
1408 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
1409
1410         * cp-tree.h (specializations_of_same_template_p): Declare.
1411         * pt.c (specializations_of_same_template_p): New function.
1412         (unify): Use it.
1413         * search.c (get_template_base): Use it.
1414         (get_template_base_recursive): Likewise.
1415         
1416 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
1417
1418         * decl2.c (start_objects): Add new variable `joiner' and
1419         initialize it properly.
1420
1421 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
1422
1423         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
1424         change to vtable types.
1425
1426         * cvt.c (ocp_convert): Avoid infinite recursion caused by
1427         1998-10-03 change.
1428
1429 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
1430
1431         * pt.c (resolve_overloaded_unification): New fn.
1432         (try_one_overload): Likewise.
1433         (unify): Don't fail on unknown type.
1434         (type_unification_real): Likewise.  Use resolve_overloaded_unification
1435         to handle an overloaded argument.
1436         (template_args_equal): Split out...
1437         (comp_template_args): From here.
1438         (determine_specialization): Also allow a template with more
1439         parms than were explicitly specified.
1440         * cp-tree.h: Add template_args_equal.
1441         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
1442
1443 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
1444
1445         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
1446         change.
1447
1448 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
1449
1450         * typeck.c (unsigned_type): Only return TItype nodes when
1451         HOST_BITS_PER_WIDE_INT is >= 64 bits.
1452         (signed_type): Similarly.
1453         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
1454         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1455         (init_decl_processing): Only create TItype nodes when
1456         HOST_BITS_PER_WIDE_INT is >= 64 bits.
1457         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
1458         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1459
1460 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1461
1462         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
1463         (gxx.gperf): Update comments describing invocation flags.
1464         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
1465
1466 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
1467
1468         * class.c (finish_struct_1): Add commentary on prevous change.
1469
1470         * cp-tree.h (vtbl_ptr_type_node): New variable.
1471         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
1472         already of the right type.
1473         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
1474         Simplify code to grow vtable.
1475         * decl.c (vtbl_ptr_type_node): Define.
1476         (init_decl_processing): Initialize it.
1477         
1478 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
1479
1480         * cp-tree.def (PTRMEM_CST): New tree node.
1481         * cp-tree.h (ptrmem_cst): New type.
1482         (lang_type): Remove local_typedecls.
1483         (dummy): Increase to 12 bits from 11.
1484         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
1485         (PTRMEM_CST_CLASS): New macro.
1486         (PTRMEM_CST_MEMBER): Likewise.
1487         (current_access_specifier): New variable.
1488         (current_class_type): Remove duplicate declaration.
1489         (finish_struct): Change prototype.
1490         (unreverse_member_declarations): New function.
1491         (pushdecl_class_level): Change prototype.
1492         (grok_enum_decls): Remove.
1493         (fixup_anonymous_union): New function.
1494         (grok_x_components): Change prototype.
1495         (tsubst_chain): Remove.
1496         (finish_member_template_decl): Likewise.
1497         (check_explicit_specialization): Fix indentation.
1498         (finish_class_definition): Change prototype.
1499         (finish_member_class_template): Likewise.
1500         (finish_member_declaration): New function.
1501         (check_multiple_declarators): Likewise.
1502         * class.c (class_stack_node_t): New type.
1503         (current_class_base): Remove.
1504         (current_class_stack): Change type.
1505         (current_access_specifier): New variable.
1506         (grow_method): Remove.
1507         (check_member_decl_is_same_in_complete_scope): Break out from
1508         finish_struct.
1509         (make_method_vec): New function.
1510         (free_method_vec): Likewise.
1511         (add_implicitly_declared_members): Break out from finish_struct_1.
1512         (free_method_vecs): New variable.
1513         (add_method): Rework for direct use from parser.
1514         (handle_using_decl): Watch for NULL_TREE while iterating through
1515         CLASSTYPE_METHOD_VEC.
1516         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
1517         just do some error-checking.
1518         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
1519         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
1520         (finish_struct): Change prototype.  Simplify; fields and methods
1521         are already set up at this point.
1522         (init_class_processing): Set up current_class_stack.
1523         (pushclass): Save current_access_specifier.
1524         (popclass): Restore it.
1525         (currently_open_class): Simplify.
1526         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
1527         * decl.c (saved_scope): Add access_specifier.
1528         (maybe_push_to_top_level): Save it.
1529         (pop_from_top_level): Restore it.
1530         (maybe_process_template_type_declaration): Use
1531         finish_member_declaration. 
1532         (pushtag): Likewise.
1533         (pushdecl_class_level): Don't return a value.
1534         (fixup_anonymous_union): Break out from grok_x_components.
1535         (shadow_tag): Use it.
1536         (xref_tag): Complain about using an elaborated type specifier to
1537         reference a template type parameter or typedef name.
1538         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1539         (current_local_enum): Remove.
1540         (build_enumerator): Call finish_member_declaration.
1541         (grok_enum_decls): Remove.
1542         * decl2.c (grok_x_components): Simplify.
1543         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
1544         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1545         (merge_functions): Add to comment.
1546         (arg_assoc_type): Prototype.
1547         (arg_assoc): Pass as many arguments as there are parameters.
1548         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
1549         OFFSET_REF.
1550         * expr.c (cpls_expand_expr): Remove dead code.  Handle
1551         PTRMEM_CST.
1552         * friend.c (do_friend): Lookup friends when in nested classes.
1553         Change comments.
1554         * init.c (build_offset_ref): Do lookup even for classes that are
1555         only partially defined.
1556         (decl_constant_value): Remove dead code.
1557         * method.c (build_overload_value): Remove hack where by TYPE was
1558         not a TYPE.  Handle PTRMEM_CST.
1559         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
1560         should go.
1561         * parse.y (components, notype_components, component_decl,
1562         component_decl_1, component_declarator, component_declarator0):
1563         Now all are itype rather than ttype.  Rework to add members to
1564         classes on the fly.
1565         (typesqpecqual_reserved): Use check_multiple_declarators.
1566         (structsp): Update class to finish_class_definition.
1567         (do_xref_defn): Unsplit into named_class_head.
1568         (access_specifier): Set current_access_specifier.
1569         * pt.c (set_current_access_from_decl): New function.
1570         (finish_member_template_decl): Don't take the parameters.
1571         (comp_template_args): Make more robust.
1572         (lookup_template_class): Don't use current_local_enum.
1573         (for_each_template_parm): Handle PTRMEM_CST.
1574         (instantiate_class_template): Use set_current_access_from_decl,
1575         finish_member_declaration and unreverse_member_declarations.  Set
1576         lineno/input_filename before generating implicit member functions.  
1577         (type_unification_real): Don't assume back-unification happens
1578         only for the last argument.
1579         (regenerate_decl_from_template): Call pushclass a bit earlier.
1580         (tsubst_chain): Remove.
1581         (tsubst_enum): Use set_current_access_from_decl.
1582         (set_mangled_name_for_template_decl): Fix indentation.
1583         * search.c (lookup_fnfields_1): Change iteration through
1584         CLASSTYPE_METHOD_VEC.
1585         (dfs_pushdecls): Likewise.
1586         (dfs_compress_decls): Likewise.
1587         (add_conversions): Likewise.
1588         * semantics.c (finish_class_definition): Don't take components.
1589         Change call to finish_struct.
1590         (finish_member_declaration): New function.
1591         (finish_member_class_template): Don't take template parameters.
1592         Change call to grok_x_components.  Call finish_member_template_decl.
1593         (check_multiple_declarators): New function.
1594         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
1595         a passed in fieldlist.
1596         * tree.c (search_tree): Handle PTRMEM_CST.
1597         (mapcar): Likewise.
1598         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
1599         INTEGER_CSTs, for pointer-to-data members.
1600         
1601         * call.c (resolve_args): Resolve template specializations, if
1602         possible.
1603
1604 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1605
1606         * Makefile.in (spew.o): Depend on toplev.h.
1607
1608         * call.c (compare_ics): Initialize variables `deref_from_type2',
1609         `deref_to_type1' and `deref_to_type2'.
1610
1611         * except.c (get_eh_type): Hide prototype and definition.
1612         (process_start_catch_block_old): Remove unused static prototype.
1613
1614         * pt.c (tsubst_decl): Initialize variable `argvec'.
1615
1616         * spew.c: Include toplev.h.
1617
1618 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
1619
1620         * pt.c (instantiate_decl): Do save and restore file position.
1621
1622 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1623
1624         * method.c (build_decl_overload_real): Clear
1625         numeric_output_need_bar after __.
1626
1627 1998-10-05  Nathan Sidwell  <nathan@acm.org>
1628
1629         * call.c (build_new_method_call): Issue 'incomplete type' error,
1630         if class is not defined.
1631
1632 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1633
1634         * call.c (build_object_call): Move declaration of variable
1635         `fn' into the scope where it is used.  Don't access variable
1636         `fn' when it is uninitialized, instead use `fns'.
1637
1638 1998-10-04  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1639
1640         * errfn.c (cp_thing): Print buf as a string not as a printf format
1641         to avoid problems with the operator%. Consequently, `%%' sequences
1642         in format are copied as `%' in buf.
1643
1644 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
1645
1646         * pt.c (pop_tinst_level): Call extract_interface_info.
1647         (instantiate_decl): Don't save and restore file position.
1648
1649         * decl.c (cp_finish_decl): Make statics in extern inlines and
1650         templates common, if possible and the target doesn't support weak
1651         symbols.
1652
1653         * decl.c (grokdeclarator): Remove redundant calls to
1654         build_type_variant and some duplicated code.
1655         * sig.c (build_signature_reference_type): Only take the type parm.
1656         (build_signature_pointer_type): Likewise.
1657         * tree.c (build_cplus_method_type): Adjust.
1658         * cp-tree.h: Update.
1659
1660 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
1661
1662         * call.c (build_over_call): Make pedwarns about dropped qualifiers
1663         into full-fledged errors.
1664         * cvt.c (convert_to_reference): Likewise.
1665         * typeck.c (convert_for_assignment): Likewise.
1666
1667         * search.c (expand_upcast_vtables): In addition to unsetting 
1668         TREE_READONLY, remove top-level const type qualifier.
1669
1670 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
1671
1672         * class.c (current_class_ptr, current_class_ref): Clarify
1673         documentation.
1674         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
1675         NOP type conversions.
1676         * decl.c (decls_match): Use comptypes directly; ignore
1677         qualifiers on the DECL.
1678         (duplicate_decls): Remove qualifier checks on DECL.
1679         (grokdeclarator): Make the type built up include top-level
1680         qualifiers.
1681         * decl2.c (do_dtors): Fix spelling error.
1682         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
1683         when printing type information.
1684         * init.c (build_new_1): Add documentation.  Deal with the fact
1685         that type of allocated memory now contains qualifiers.
1686         * lex.c (is_global): Improve error-recovery.
1687         * sig.c (build_member_function_pointer): Don't cast away const
1688         on fields of sigtable_entry_type.
1689         * tree.c (lvalue_type): Don't look at top-level qualifiers on
1690         expressions.
1691         * typeck.c (decay_conversion): Likewise.
1692         (build_component_ref): Make sure the type of the COMPONENT_REF
1693         contains top-level qualifiers, as appropriate.  Improve
1694         error-handling. 
1695         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
1696         (build_array_ref): Likewise.
1697         (build_unary_op): Improve error-recovery.
1698         (unary_complex_lvalue): Make taking the address a bound member
1699         function an error, not a sorry.
1700         (build_conditional_expr): Look at the type qualifiers, not the
1701         qualifiers on the expression itself.
1702         
1703 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
1704
1705         * decl2.c (merge_functions): Remove duplicates.
1706
1707         * decl2.c: Add -f{no-,}implicit-inline-templates.
1708         (import_export_decl): Check it.
1709
1710         * decl.c (lookup_name_real): Template parms also take precedence
1711         over implicit typename.  Only warn if yylex.
1712
1713         * typeck.c (build_conditional_expr): Only fold if ifexp is an
1714         INTEGER_CST.
1715
1716         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
1717         instead of linkage.
1718
1719 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1720
1721         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
1722         * class.c (build_vbase_pointer): Use it.
1723         * rtti.c (expand_class_desc): Likewise.
1724         * tree.c (build_vbase_pointer_fields): Likewise.
1725
1726 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
1727
1728         * decl.c (start_decl): Add invocation of
1729         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1730         (start_function): Add invocation of
1731         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1732
1733         * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with
1734         HANDLE_GENERIC_PRAGMAS.
1735         
1736 1998-09-28  Anthony Green  <green@cygnus.com>
1737
1738         * semantics.c (finish_asm_stmt): Always permit volatile asms.
1739
1740 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
1741
1742         * decl.c (grokdeclarator): Tighten checks for invalid
1743         destructors.  Improve error-messages and error-recovery.
1744         * decl2.c (check_classfn): Don't assume that mangled destructor 
1745         names contain type information.
1746         
1747 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
1748
1749         * search.c (get_base_distance): Remove assert.
1750
1751         * decl2.c (build_anon_union_vars): Don't process a field with no
1752         name.
1753         (finish_anon_union): Also complain about local anon unions with no
1754         members.
1755
1756 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1757
1758         * decl.c (lookup_namespace_name): If the name is a namespace,
1759         return it immediately.
1760
1761 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1762
1763         * cp-tree.h (define_case_label): Remove unused parameter.
1764         (check_java_method): Likewise.
1765         (grokclassfn): Likewise.
1766         (expand_aggr_init): Likewise.
1767         (build_x_delete): Likewise.
1768         (maybe_end_member_template_processing): Likewise.
1769         (unshare_base_binfos): Add prototype.
1770         (string_conv_p): Likewise.
1771         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
1772
1773         * cvt.c (build_up_reference): Remove unused parameter
1774         `checkconst', all callers changed.
1775         (build_type_conversion): Mark parameter `code' with
1776         ATTRIBUTE_UNUSED.
1777         (build_expr_type_conversion): Initialize variable `conv'.
1778
1779         * decl.c (push_namespace): Initialize variable `d'.
1780         (define_case_label): Remove unused parameter `decl', all callers
1781         changed.
1782
1783         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
1784         `argc' with ATTRIBUTE_UNUSED.
1785         (grokclassfn): Remove unused parameter `cname', all callers
1786         changed.
1787         (check_java_method): Likewise for parameter `ctype'.
1788         (copy_assignment_arg_p): Mark parameter `virtualp' with
1789         ATTRIBUTE_UNUSED.
1790         (finish_prevtable_vardecl): Likewise for parameter `prev'.
1791
1792         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
1793
1794         * init.c (expand_aggr_init_1): Remove unused parameter
1795         `alias_this', all callers changed.
1796         (expand_aggr_init): Likewise.
1797         (expand_default_init): Likewise.
1798         (build_new_1): Initialize variable `susp'.
1799         (build_x_delete): Remove unused parameter `type', all callers
1800         changed.
1801
1802         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
1803         ATTRIBUTE_UNUSED.
1804         (readescape): Use (unsigned) value in shift.
1805         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
1806         comparing to a signed quantity.
1807
1808         * pt.c (maybe_end_member_template_processing): Remove unused
1809         parameter `decl', all callers changed.
1810         (check_explicit_specialization): Add braces around empty body in
1811         an else-statement.
1812         (current_template_args): Initialize variable `args'.
1813         (lookup_template_class): Likewise for variable `prev_local_enum'.
1814         (tsubst_decl): Likewise for variable `r'.
1815         (set_mangled_name_for_template_decl): Initialize variable
1816         `context'.
1817
1818         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
1819         Likewise for variable `i'.
1820         (yylex): Initialize variable `trrr'.
1821
1822         * typeck.c (compparms): Mark variable `strict' with
1823         ATTRIBUTE_UNUSED.
1824
1825         * xref.c (simplify_type): Cast argument of ctype function to
1826         `unsigned char'.
1827
1828 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
1829
1830         * cp-tree.h (language_lvalue_valid): Remove.
1831         * decl.c (grokdeclarator): Don't disallow references to functions.
1832         * tree.c (lvalue_p_1): New function, combining duplicated
1833         code from ...
1834         (lvalue_p): Use it.
1835         (real_lvalue_p): Likewise.
1836         * typeck.c (language_lvalue_valid): Remove.
1837         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
1838         they don't have TREE_READONLY set.
1839         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
1840         
1841 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
1842
1843         * spew.c (yylex): Give diagnostic.
1844         * hash.h (is_reserved_word): Add export.
1845         * gxx.gperf: Ditto.
1846         * lex.h (rid): Add RID_EXPORT.
1847         * lex.c (init_parse): Ditto. 
1848
1849 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
1850
1851         * friend.c (do_friend): Make warning a full sentence.
1852
1853 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
1854
1855         * parse.y (component_decl_list): Improve error-recovery.
1856
1857 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
1858
1859         * decl.c (make_typename_type): Move error to point where name
1860         variable can be used by dump_type.
1861
1862 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
1863
1864         * decl.c (grokfndecl): Improve error-recovery.
1865         * decl2.c (grokfield): Likewise.
1866         * pt.c (finish_member_template_decl): Likewise.
1867
1868 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1869
1870         * method.c (hack_identifier): Finding multiple members is always
1871         an error.
1872
1873 1998-09-21  Per Bothner  <bothner@cygnus.com>
1874
1875         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
1876
1877 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
1878
1879         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
1880
1881 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
1882
1883         * class.c (maybe_warn_about_overly_private_class): Reformat.
1884
1885 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
1886
1887         * exception.cc (__cplus_type_matcher): realign some code.
1888
1889 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
1890
1891         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
1892         (tinfo2.o): Likewise.
1893         (exception.o): Likewise.
1894         (new.o): Likewise.
1895         (opnew.o): Likewise.
1896         (opnewnt.o): Likewise.
1897         (opvnew.o): Likewise.
1898         (opvnewnt.o): Likewise.
1899         (opdel.o): Likewise.
1900         (opdelnt.o): Likewise.
1901         (opvdel.o): Likewise.
1902         (opvdelnt.o): Likewise.
1903
1904 1998-09-16  Richard Henderson  <rth@cygnus.com>
1905
1906         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
1907
1908 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
1909
1910         * call.c (build_field_call): handle static data members too
1911
1912         * typeck.c (comptypes): when comparing pointer types, check
1913         whether referred types match even in strictest modes
1914
1915 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
1916
1917         * cp-tree.h: Revert previous change.
1918         (finish_struct_methods): Remove declaration.
1919         * class.c: Revert previous change.
1920         (maybe_warn_about_overly_private_class): New function.
1921         (finish_struct_methods): Declare here, and make static.  Remove
1922         unnecessary parameters.  Tidy slightly.  Use
1923         maybe_warn_about_overly_private_class. 
1924         (finish_struct_1): Adjust.  Remove check for private constructors,
1925         now done elsewhere.
1926         (finish_struct): Adjust.
1927         
1928 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
1929
1930         * except.c (expand_start_catch_block): No need to check for new
1931         exception model.
1932         (process_start_catch_block_old): Deleted.
1933         (process_start_catch_block): Add call to start_decl_1().
1934         (expand_end_catch_block): Add call to end_catch_handler().
1935         * exception.cc (__cplus_type_matcher): Only check the exception 
1936         language if there is an exception table.
1937
1938 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
1939
1940         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
1941         as used to prevent conflicts with virtual function tables.
1942
1943 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
1944
1945         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
1946         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
1947         * class.c (maybe_class_too_private_p): New function.
1948         (finish_struct_methods): Use it.
1949         (finish_struct_1): Likewise.
1950         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
1951         appropriate.
1952         
1953         * pt.c (check_specialization_scope): Fix spelling error.
1954         (check_explicit_specialization): Remove code to handle explicit
1955         specializations in class scope; they are now correctly diagnosed
1956         as errors.
1957
1958 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
1959
1960         * decl.c (pushdecl): Don't copy types if the
1961         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
1962         type. 
1963
1964 1998-09-09  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1965
1966         * class.c (get_enclosing_class): New function.
1967         (is_base_of_enclosing_class): Likewise.
1968         * cp-tree.h (get_enclosing_class): Declare.
1969         (is_base_of_enclosing_class): Likewise.
1970         * pt.c (coerce_template_parms): Use them.
1971
1972 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
1973
1974         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
1975         null to decide whether to use it.
1976
1977         * error.c (dump_type_real): Handle NAMESPACE_DECL.
1978         * parse.y (base_class.1): Avoid crash on error.
1979
1980 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1981
1982         * decl.c (make_typename_type): If context is a namespace, the code
1983         is in error.
1984
1985 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
1986
1987         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
1988
1989 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
1990
1991         * cp-tree.h (anonymous_namespace_name): Declare.
1992         * decl.c: Define it.
1993         (push_namespace): Use anonymous_namespace_name, rather than local
1994         static anon_name.
1995         * error.c (dump_decl): If a namespace is named
1996         anonymous_namespace_name, call it {anonymous}.
1997
1998         * decl.c (grokparms): Distinguish between references and pointers
1999         in error message.
2000
2001 1998-09-08  Richard Henderson  <rth@cygnus.com>
2002             Mark Mitchell  <mark@markmitchell.com>      
2003         
2004         * pt.c (process_partial_specialization): Consistantly allocate
2005         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
2006         tpd.parms, where appropriate.
2007
2008 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
2009
2010         * Makefile.in (INCLUDES): Update after recent toplevel gcc
2011         reorganizations.
2012
2013 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
2014
2015         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
2016         * class.c (finish_struct): Remove hackery to deal with explicit
2017         specializations in class scope.
2018         * decl.c (grokfndecl): Improve error-recovery.
2019         * decl2.c (grokfield): Likewise.
2020         * pt.c (check_specialization_scope): New function.
2021         (begin_specialization): Call it.
2022         (process_partial_specialization): New function, split out from
2023         push_template_decl.  Check partial specializations more
2024         stringently.
2025         (push_template_decl): Call it.
2026         (check_explicit_specialization): Don't attempt to handle explicit
2027         specializations in class scope.
2028         (template_parm_data): Document.  Add current_arg and
2029         arg_uses_template_parms. 
2030         (mark_template_parm): Set it.
2031         (tsubst_arg_types): Remove unused variable.
2032         * semantics.c (begin_class_definition): Tweak.
2033         
2034 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
2035
2036         * inc/typeinfo (type_info::type_info(const char*)): Make
2037         `explicit'.
2038
2039         * cp-tree.h (hash_tree_cons_simple): New macro.
2040         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
2041         (coerce_template_parms): Use make_temp_vec, instead of
2042         make_tree_vec.  Document this behavior.
2043         (lookup_template_class): Likewise.
2044         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.  
2045         Remove dead code (and add ssertion to check its deadness).  Fix
2046         bug w.r.t. exception specifications.
2047
2048 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
2049
2050         * decl2.c (import_export_vtable): Always make artificials comdat.
2051         (import_export_decl): Likewise.
2052         * pt.c (mark_decl_instantiated): Likewise.
2053
2054 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
2055
2056         * cp-tree.h (finish_globally_qualified_member_call_expr):
2057         Rename to ...
2058         (finish_qualified_call_expr).
2059         * semantics.c: Likewise.
2060         * parse.y (primary): Use it.
2061         * method.c (hack_identifier): Remove redundant code.
2062         
2063         * init.c (resolve_offset_ref): Call convert_from_reference to
2064         handle members of reference type.  Improve error recovery.
2065
2066 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
2067
2068         * cp-tree.h: Declare warn_nontemplate_friend.
2069         * decl2.c (lang_decode_option): Set.
2070         * lang-options.h: Add -Wnon-template-friend.
2071         * friend.c (do_friend): Use to toggle non-template function warning.
2072
2073 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
2074
2075         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
2076         corresponding INTEGER_CSTs when processing_template_decl.
2077         * pt.c (tsubst_enum): Tweak accordingly.
2078
2079 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2080
2081         * decl.c (pushdecl_class_level): Add warning here.
2082         (pushdecl): Tweak.
2083
2084 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
2085
2086         * cvt.c (convert_pointer_to_real): Tidy.
2087         * search.c (get_base_distance_recursive): Simplify.
2088         (get_base_distance): Likewise.
2089
2090         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
2091         parms.
2092
2093 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
2094
2095         * lex.c (check_newline):  Call HANDLE_PRAGMA before
2096         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
2097         if unknown pragmas are encountered.
2098         (handle_sysv_pragma): Interpret return code from
2099         handle_pragma_token ().  Return success/failure indication rather
2100         than next unprocessed character. 
2101         (pragma_getc): New function: retrieves characters from the
2102         input stream.  Defined when HANDLE_PRAGMA is defined.
2103         (pragma_ungetc): New function: replaces characters back into the
2104         input stream.  Defined when HANDLE_PRAGMA is defined.
2105
2106 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
2107
2108         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
2109         * class.c (build_vtable_entry_ref): Likewise.
2110
2111 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
2112
2113         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
2114         * decl2.c (import_export_decl): Likewise.
2115         * pt.c (instantiate_decl): Use it.
2116
2117 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
2118
2119         * decl.c (lookup_name_real): Also do implicit typename thing for
2120         artificial TYPE_DECLs.
2121         * search.c (lookup_field): Likewise.
2122         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
2123         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
2124         (enter_scope_of): Extract type from implicit typename.
2125         (begin_class_definition): Likewise.
2126         * lex.c (identifier_type): Handle implicit typename when checking
2127         for SELFNAME.
2128
2129         * cp-tree.h: Declare flag_strict_prototype.
2130         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
2131         -fstrict-prototype.
2132         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
2133         specified, set it to the value of pedantic.
2134
2135 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
2136
2137         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
2138
2139 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
2140
2141         * decl.c (finish_enum): Handle member enums of classes declared in
2142         template functions.
2143         
2144         * decl2.c (grok_x_components): Strip attributres before calling
2145         groktypename. 
2146         
2147 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
2148
2149         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
2150         -fenum-int-equivalence and -fno-nonnull-objects.
2151         * class.c (check_for_override): Remove support for -fall-virtual.
2152         (finish_struct_1): Likewise.
2153         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
2154         * typeck.c (build_binary_op_nodefault): Likewise.
2155         * cvt.c (ocp_convert): Likewise.
2156         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
2157         * class.c (build_vbase_path): Likewise.
2158
2159 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
2160
2161         * Makefile.in (INTERFACE): New, set to 1.
2162
2163 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
2164
2165         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
2166         comparing with global_namespace.
2167         (dump_aggr_type): Likewise.
2168
2169         * decl.c (grokfndecl): Issue error on declaration of friend
2170         templates with explicit template arguments.
2171
2172         * pt.c (convert_template_argument): New function, split out
2173         from...
2174         (coerce_template_parms): Here.
2175         (tsubst): Attempt better error-recovery.
2176
2177 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
2178
2179         * pt.c (decl_template_parm_p): Add checks for
2180         TEMPLATE_TEMPLATE_PARM.
2181
2182 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
2183
2184         * lex.c (do_identifier): Fix thinko in previous change.
2185
2186 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
2187
2188         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
2189         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
2190
2191 1998-08-28  Richard Henderson  <rth@cygnus.com>
2192
2193         Add support for discarding unused virtual functions.
2194         * lang-options.h: Add -fvtable-gc.
2195         * cp-tree.h: Add flag_vtable_gc.
2196         * decl2.c (output_vtable_inherit): New fn.
2197         (finish_vtable_vardecl): Call it.
2198         * class.c (build_vtable_entry_ref): New fn.
2199         (build_vtbl_ref): Call it.
2200
2201 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
2202
2203         * cp-tree.h (build_enumerator): Take the enumeration type as a
2204         paramter. 
2205         * decl.c (finish_enum): Don't set the TREE_TYPE for the
2206         enumeration constant values if we're processing_template_decls.
2207         Don't set the type for the CONST_DECLs either; that's done in
2208         build_enumerator.
2209         (build_enumerator): Take the enumeration type as a
2210         parameter. 
2211         * lex.c (do_identifier): Don't resolve enumeration constants while
2212         processing template declarations, even if they happen to be
2213         TEMPLATE_PARM_INDEXs. 
2214
2215         * parse.y (current_enum_type): New variable.
2216         (primary): Don't allow statement-expression in local classes just
2217         as we don't in global classes.
2218         (structsp): Use current_enum_type.
2219         (enum_list): Likewise.
2220         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
2221         finish_enum; they no longer occur.
2222         
2223         * cp-tree.h (finish_base_specifier): New function.
2224         * parse.y (base_class): Use it.
2225         * semantics.c (finish_base_specifier): Define it.
2226
2227         * parse.y (structsp): Warn on use of typename outside of template
2228         declarations. 
2229         
2230 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
2231
2232         * lex.c (handle_cp_pragma): Remove #pragma vtable.
2233         * lang-options.h: Remove +e options.
2234         * decl2.c (lang_decode_option): Likewise.
2235         (import_export_vtable): Don't check write_virtuals.
2236         (finish_vtable_vardecl, finish_file): Likewise.
2237         * search.c (dfs_debug_mark): Likewise.
2238         * semantics.c (begin_class_definition): Likewise.
2239         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
2240
2241         * call.c (build_over_call): Check flag_elide_constructors.
2242         * decl2.c: flag_elide_constructors defaults to 1.
2243         * typeck.c (convert_arguments): Remove return_loc parm.
2244         (build_function_call_real): Adjust.
2245
2246         * search.c: Tear out all mi_matrix and memoize code.
2247         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
2248         * lang-options.h: Remove documentation for -fhandle-exceptions,
2249         -fmemoize-lookups and -fsave-memoized.
2250         * cp-tree.h: Lose mi_matrix and memoize support.
2251         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
2252         * class.c: Lose struct class_level.
2253         (pushclass, popclass): Lose memoize support.
2254         * init.c (build_offset_ref): Likewise.
2255
2256         Never change BINFO_INHERITANCE_CHAIN.
2257         * init.c (emit_base_init): Change modification of
2258         BINFO_INHERITANCE_CHAIN to an assert.
2259         * search.c (get_base_distance_recursive): Likewise.
2260         (get_base_distance): Likewise.
2261         (lookup_member): Likewise.
2262         (convert_pointer_to_single_level): Likewise.
2263         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
2264         (lookup_fnfields): Likewise.
2265         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
2266         (unshare_base_binfos): Don't call propagate_binfo_offsets.
2267         (layout_basetypes): Call propagate_binfo_offsets instead of 
2268         unshare_base_binfos.
2269         * decl.c (xref_basetypes): Call unshare_base_binfos.
2270         * pt.c (instantiate_class_template): Likewise.
2271         * tree.c (reverse_path): Remove 'copy' parm; always make a
2272         temporary copy.
2273         * class.c (build_vbase_path): Just call it.
2274         * search.c (compute_access): Likewise.  Don't re-reverse.
2275
2276 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
2277
2278         * class.c (build_vbase_path): Use reverse_path.
2279         (finish_base_struct): Move warnings for inaccessible bases to
2280         layout_basetypes.
2281         (modify_one_vtable): Remove check of TREE_USED (binfo).
2282         (fixup_vtable_deltas1): Likewise.
2283         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
2284         (xref_tag): Remove binfos parameter.
2285         (make_binfo): Remove chain parameter.
2286         (reverse_path): Add copy parameter.
2287         * decl.c (init_decl_processing): Change calls to xref_tag.
2288         (xref_tag): Remove binfos parameter.
2289         (xref_basetypes): Change calls to make_binfo.
2290         * decl2.c (grok_x_components): Change calls to xref_tag.
2291         (handle_class_head): Likewise.
2292         * friend.c (do_friend): Likewise.
2293         * lex.c (make_lang_type): Change calls to make_binfo.
2294         * parse.y (structsp): Change calls to xref_tag.
2295         (named_complex_class_head_sans_basetype): Likewise.
2296         (named_class_head): Likewise.
2297         * rtti.c (init_rtti_processing): Likewise.
2298         * search.c (compute_access): Change calls to reverse_path.
2299         (dfs_get_vbase_types): Change calls to make_binfo.
2300         (get_vbase_types): Remove dead code.
2301         * tree.c (unshare_base_binfos): Change calls to make_binfo.
2302         (layout_basetypes): Warn here about inaccessible bases.
2303         (make_binfo): Remove chain parameter.
2304         (reverse_path): Add copy parameter.
2305         
2306 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
2307
2308         * class.c: #if 0 complete_type_p.
2309         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
2310         * method.c (process_overload_item): Likewise.
2311         * typeck.c (comp_target_types): Likewise.
2312
2313         Stop sharing binfos for indirect virtual bases.
2314         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
2315         (layout_basetypes): Likewise.
2316         (unshare_base_binfos): Copy vbases, too.
2317         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
2318         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
2319         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
2320         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
2321         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
2322         reference to BINFO_VIA_PUBLIC.
2323         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
2324         (push_class_decls): Use them.
2325         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
2326         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
2327
2328 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
2329
2330         * decl.c (build_enumerator): Set DECL_CONTEXT for the
2331         CONST_DECLs. 
2332
2333 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
2334
2335         * cp-tree.h (finish_enum): Change prototype.
2336         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
2337         VALUES parameter.  Don't try to compute mins/maxs if
2338         processing_template_decl. 
2339         * parse.y (structsp): Use new calling sequence for finish_enum.
2340         * pt.c (tsubst_enum): Likewise.  Take the new type as input.  
2341         (lookup_template_class): Remove unused variables.  Tweak.
2342         Register enums on instantiation list before substituting
2343         enumeration constants.
2344         (tsubst_decl): Remove unused variables.
2345         (regenerate_decl_from_template): Likewise.
2346         
2347         * decl.c (duplicate_decls): Don't obliterate the
2348         DECL_TEMPLATE_INFO for a template if we're not replacing it with
2349         anything. 
2350
2351         * lex.c (do_identifier): Fix typo in comment.
2352
2353 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2354
2355         * errfn.c: Remove stdarg.h/varargs.h.
2356         * tree.c: Likewise.
2357
2358 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
2359
2360         * pt.c (tsubst_copy): Only do typename overloading on an
2361         IDENTIFIER_NODE that happens to look like a typename if it actually
2362         has a type for us to use.
2363
2364 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2365
2366         * typeck.c (comp_cv_target_types): Split out...
2367         (comp_target_types): From here.  Don't allow cv-qual changes under
2368         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
2369         (build_ptrmemfunc): Pass 1 to nptrs.
2370         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2371
2372 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
2373
2374         * search.c (dependent_base_p): Don't compare a binfo to
2375         current_class_type; use the TREE_TYPE of the binfo instead.
2376
2377         * cp-tree.h (CLASS_TYPE_P): Revise definition.
2378
2379 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2380
2381         * decl.c (duplicate_decls): Don't complain about different
2382         exceptions from an internal decl even if pedantic.
2383
2384         * typeck.c (convert_for_assignment): Converting from pm of vbase
2385         to derived is an error, not a sorry.
2386
2387         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
2388         * class.c (fixed_type_or_null): Rename from
2389         resolves_to_fixed_type_p.  Return the dynamic type of the
2390         expression, if fixed, or null.
2391         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
2392         does not match the static type.
2393         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
2394         resolves_to_fixed_type_p again.
2395
2396 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
2397
2398         * pt.c (tsubst_decl): Move special case code for dealing with
2399         tricky friend templates here from ...
2400         (regenerate_decl_from_template): Here.
2401
2402 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2403
2404         * decl.c (start_decl): Remove redundant linkage check.
2405
2406 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
2407
2408         * typeck.c (c_expand_return): Handle the case that valtype
2409         is wider than the functions return type.
2410
2411 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
2412
2413         * cp-tree.h (CLASS_TYPE_P): New macro.
2414         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
2415         * pt.c (process_template_parm): Undo previous change.
2416         
2417 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
2418
2419         * cp-tree.h: Declare.
2420         * pt.c (decl_template_parm_p): New function.
2421         * decl.c (pushdecl): Check decls for redeclaring template parms.
2422         (xref_tag): Make redeclaration an error, print decl.
2423         * decl2.c (grokfield): Check field_decls for redeclaration as well.
2424
2425 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2426
2427         * parse.y (primary): Fix up the type of string constants.
2428
2429 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
2430
2431         * typeck.c (convert_for_initialization): Move check for odd uses
2432         of NULL to avoid duplicate warnings.
2433
2434 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2435
2436         * tree.c (lvalue_type): Fix for arrays.
2437         * typeck.c (string_conv_p): New fn.
2438         (convert_for_assignment): Use it.
2439         (build_unary_op): Use lvalue_type.
2440         * call.c (standard_conversion, convert_like): Use string_conv_p.
2441         (add_function_candidate): Use lvalue_type.
2442         * cvt.c (convert_to_reference): Likewise.
2443         * decl2.c (lang_decode_option): Ignore -traditional.
2444         * decl.c (init_decl_processing): flag_writable_strings inhibits
2445         flag_const_strings.
2446
2447 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
2448
2449         * lang-options.h (lang_options): Add fconst-strings to the list
2450         of valid options.
2451         * decl2.c (lang_f_options, lang_decode_option): Likewise.
2452
2453 1998-08-24  Nathan Sidwell  <nathan@acm.org>
2454
2455         * lex.c (real_yylex): Don't warn about long long constants if
2456         we're allowing long long.
2457
2458 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2459
2460         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
2461         accessing bindings directly.
2462
2463         * search.c (my_tree_cons): Reimplement.
2464
2465         * lang-specs.h: Remove __HONOR_STD.
2466         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
2467
2468 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
2469
2470         * decl.c (grokdeclarator): Complain about in-class initialization
2471         of aggregates and/or references.
2472         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
2473         TEMPLATE_TYPE_PARMs. 
2474
2475         * decl2.c (grok_array_decl): Add comment.
2476         (mark_used): Don't instantiate an explicit instantiation.
2477         * friend.c (make_friend_class): Remove bogus comment.  Fix check
2478         for partial specializations.
2479         * pt.c (check_explicit_specialization): Don't
2480         SET_DECL_EXPLICIT_INSTANTIATION here.
2481         (mark_decl_instantiated): Or here.
2482         (do_decl_instantiation): Do it here, instead.  Add checks for
2483         duplicate explicit instantiations, etc.  Tidy.
2484         (do_type_instantiation): Likewise.
2485         (instantiate_decl): Improve comments.  Complain about explicit
2486         instantiations where no definition is available.
2487         
2488         * cp-tree.h (ansi_null_node): Remove.
2489         * call.c (build_over_call): Warn about converting NULL to an
2490         arithmetic type.
2491         * cvt.c (build_expr_type_conversion): Likewise.  Use
2492         null_ptr_cst_p instead of expanding it inline.
2493         * decl.c (ansi_null_node): Remove. 
2494         (init_decl_processing): Make null_node always have integral type.
2495         * except.c (build_throw): Warn about converting NULL to an
2496         arithmetic type.
2497         * lex.c (init_parse): Remove handling of ansi_null_node.
2498         * pt.c (type_unification_real): Don't convert NULL to void* type.
2499         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
2500         (convert_for_assignment): Warn about converting NULL to an
2501         arithmetic type.
2502         (convert_for_initialization): Likewise.
2503         
2504 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
2505
2506         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
2507         * pt.c (coerce_template_parms): Use no_linkage_check.
2508         * decl.c (grokvardecl): Likewise.
2509         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
2510
2511         * method.c (process_overload_item): Remove useless code.
2512
2513 1998-08-20  Per Bothner  <bothner@cygnus.com>
2514
2515         Handle new'ing of Java classes.
2516         * init.c (build_class_classref):  New function.
2517         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
2518         constructor does not return this;  don't need to exception-protect.
2519
2520         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
2521         * decl2.c (acceptable_java_type):  Handle template-derived types.
2522
2523 1998-08-20  Per Bothner  <bothner@cygnus.com>
2524
2525         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
2526
2527 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
2528
2529         * decl.c (duplicate_decls): Always merge the old and new patterns
2530         for templates, regardless of whether or not the new one has
2531         DECL_INITIAL.  Don't throw away specializations.  Merge
2532         DECL_SAVED_TREE.
2533         * pt.c (tsubst_decl): Use the right pattern when calculating the
2534         complete args for a new template instance.
2535         (do_decl_instantiation): Fix typo in comment.
2536         (regenerate_decl_from_template): Deal with tricky friend template
2537         case.
2538         (instantiate_decl): Likewise.
2539         
2540 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
2541
2542         * init.c (build_builtin_delete_call): Add missing assemble_external
2543         call.
2544
2545 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
2546
2547         * parse.y (notype_unqualified_id): Also accept ~A<int>.
2548
2549 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
2550
2551         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
2552         arithmetic.
2553         * except.c (build_throw): Warn when NULL is thrown, even with
2554         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
2555         thrown expression.
2556         
2557         * cp-tree.h (ansi_null_node): New variable.
2558         * decl.c (ansi_null_node): New variable.
2559         (init_decl_processing): Initialize its type.
2560         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
2561         for null_node in non-ANSI mode.
2562         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
2563         place of null_node to avoid spurious errors.
2564
2565 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
2566
2567         * cp-tree.h (enter_scope_of): New function.
2568         * parse.y (complex_direct_notype_declarator): Use it.
2569         * semantics.c (enter_scope_of): New function.
2570
2571 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
2572
2573         * decl.c (grokparms): No, here.
2574
2575         * decl.c (grokdeclarator): Catch parm with pointer to array of
2576         unknown bound here...
2577         * method.c (process_overload_item): ...not here.
2578
2579         * gxxint.texi: Remove obsolete documentation of overloading code.
2580
2581         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
2582         * class.c (finish_struct_bits): Likewise.
2583
2584         * tree.c (lvalue_type): Fix for arrays.
2585         * typeck.c (build_unary_op): Use lvalue_type.
2586         * call.c (add_function_candidate): Likewise.
2587         * cvt.c (convert_to_reference): Likewise.
2588
2589         * decl2.c (lang_decode_option): Ignore -traditional.
2590
2591         * init.c (build_offset_ref): Don't mess with error_mark_node.
2592         * lex.c (do_scoped_id): Use cp_error.
2593
2594         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
2595
2596 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
2597
2598         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
2599
2600 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
2601
2602         * cp-tree.h (set_identifier_local_value): Provide prototype.
2603
2604         * decl2.c (do_namespace_alias): Remove unused variables `binding'
2605         and `old'.
2606
2607 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
2608
2609         * Makefile.in: Rename BBISON to BISON so that it can be properly
2610         inherited from the parent makefile.
2611
2612 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
2613
2614         * lang-options.h: Add -finit-priority.
2615         * decl2.c: Likewise.  Check flag_init_priority instead of
2616         USE_INIT_PRIORITY.
2617
2618         * decl2.c (setup_initp): New fn.
2619         (start_objects, finish_objects, do_ctors): Handle init_priority.
2620         (do_dtors, finish_file): Likewise.
2621
2622 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
2623
2624         * pt.c (tsubst_copy): Hush warning.
2625
2626         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
2627
2628 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
2629
2630         * pt.c (print_template_context): Don't abort when instantiating a
2631         synthesized method.
2632
2633         * decl.c (grokdeclarator): Issue errors on namespace qualified
2634         declarators in parameter lists or in class scope.
2635
2636 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
2637
2638         * pt.c (check_explicit_specialization): Don't abort on bogus
2639         explicit instantiations.
2640
2641 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
2642
2643         * typeck.c (require_complete_type): Use complete_type_or_else.
2644         (complete_type_or_else): Always return NULL_TREE on failure, as
2645         documented.
2646
2647         * pt.c (tsubst_aggr_type): Prototype.
2648         (tsubst_decl): New function, split out from tsubst.  Set
2649         input_filename and lineno as appropriate.
2650         (pop_tinst_level): Restore the file and line number saved in
2651         push_tinst_level.
2652         (instantiate_class_template): Set input_filename and lineno as
2653         appropriate.
2654         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
2655         context for a TYPENAME_TYPE is complete.
2656
2657         * decl2.c (grokbitfield): Issue errors on bitfields declared with
2658         function type.
2659         (do_dtors): As in do_ctors, pretend to be a member of the same
2660         class as a static data member while generating a call to its
2661         destructor.
2662
2663         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
2664         conversions, even in complex virtual base class hierarchies.
2665
2666 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
2667
2668         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
2669         (TYPE_TEMPLATE_INFO): Likewise.
2670         (SET_TYPE_TEMPLATE_INFO): Likewise.
2671         (ENUM_TI_TEMPLATE): Likewise.
2672         (ENUM_TI_ARGS): Likewise.
2673         (lookup_nested_type_by_name): Remove.
2674         * decl.c (maybe_process_template_type_declaration): Handle enums.
2675         (start_enum): Don't check for primary-template enum declarations
2676         here. 
2677         (finish_enum): Clean up, document.  Make sure template enum
2678         constants get the correct type.
2679         (build_enumerator): Copy initializers for template enumerations,
2680         too. 
2681         (grok_enum_decls): Document.
2682         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
2683         better.  Build LOOKUP_EXPRs for local variables, even if they are
2684         TREE_PERMANENT.
2685         * pt.c (tsubst_enum): Remove field_chain parameter.
2686         (template_class_depth): Include the depth of surrounding function
2687         contexts.
2688         (push_template_decl): Check for primary-template enum declarations
2689         here.  Deal with enumeration templates.
2690         (lookup_template_class): Likewise.
2691         (for_each_template_parm): Likewise.
2692         (instantiate_class_template): Don't call tsubst_enum directly,
2693         call tsubst instead, to instantiate enums.  Deal with all
2694         field_chain issues here, not in tsubst_enum.
2695         (lookup_nested_type_by_name): Remove.
2696         (tsubst_aggr_type): Revise handling of enumeration types.
2697         (tsubst): Likewise.
2698         (tsubst_copy): Likewise.
2699         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
2700         
2701 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
2702
2703         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
2704         uses template parameters.
2705         * method.c (build_template_parm_names): Use the full set of
2706         template arguments for tsubst'ing.
2707         (build_overload_identifier): Pass the full set of template
2708         arguments to build_template_parm_names, not just the
2709         innermost_args. 
2710         * pt.c (TMPL_ARGS_DEPTH): Define using
2711         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
2712         (NUM_TMPL_ARGS): New macro.
2713         (add_outermost_template_args): Deal with the case where the outer
2714         args will be completely discarded.
2715         (coerce_template_parms): Use the full set of template arguments
2716         for tsubst'ing.  Simplify.  Add some asserts.  Improve
2717         error messages.
2718         (lookup_template_class): Pass the full set of template arguments
2719         to coerce_template_parms.
2720         (tsubst): Add assertion.
2721         (do_type_instantiation): Don't instantiate member template
2722         classes. 
2723         
2724         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
2725         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
2726
2727 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2728
2729         * method.c (set_mangled_name_for_decl): Change return type to void.
2730
2731         * decl.c (lookup_name_real): A namespace-level decl takes priority
2732         over implicit typename.  Avoid doing the same lookup twice.
2733
2734         * search.c (dependent_base_p): New fn.
2735         (dfs_pushdecls, dfs_compress_decls): Use it.
2736
2737         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle 
2738         virtual functions if the type doesn't have any.
2739
2740 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
2741
2742         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
2743         uses template parameters.
2744
2745 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
2746
2747         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
2748         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
2749         * lex.c (do_identifier): Don't use a second argument, or a type,
2750         when building LOOKUP_EXPRs.
2751         (do_identifier): Likewise.
2752         (do_scoped_id): Likewise.
2753         * method.c (hack_identifier): Improve error message.
2754         * pt.c (lookup_template_function): Don't needlessly call
2755         copy_to_permanent or build_min.
2756         (tsubst_copy): Remove #if 0'd code.  Tsubst into LOOKUP_EXPRs if
2757         necessary.
2758         (do_decl_instantiation): Improve error message.
2759         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
2760         (build_min): Copy the type to the permanent obstack, too.
2761         
2762 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
2763
2764         * init.c (init_init_processing): Remove BI* handling.
2765         (build_builtin_call): Remove.
2766         (build_builtin_delete_call): New fn.
2767         (build_delete): Use it.
2768         
2769 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
2770
2771         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
2772         (maybe_check_template_type): New function.
2773         * decl.c (maybe_process_template_type_declaration): New function,
2774         split out from pushtag  Call maybe_check_template_type.
2775         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
2776         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2777         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2778         * pt.c (template_class_depth_real): Generalization of ...
2779         (template_class_depth): Use it.
2780         (register_specialization): Use duplicate_decls for duplicate
2781         declarations of specializations.
2782         (maybe_check_template_type): New function.
2783         (push_template_decl_real): Fix comment.
2784         (convert_nontype_argument): Likewise.
2785         (lookup_template_class): Likewise.  Avoid an infinite loop on
2786         erroneous code.
2787         (tsubst_friend_function): Fix comment.
2788         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
2789         an IDENTIFIER_NODE.
2790         * semantics.c (begin_function_definition): Use
2791         reset_specialization to note that template headers don't apply
2792         directly to declarations after the opening curly for a function.
2793
2794 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
2795
2796         * decl.c (push_overloaded_decl): Use current_namespace instead of
2797         DECL_CONTEXT (decl) to determine where we go.
2798
2799         * decl.c (lookup_name_real): Fix typo.
2800
2801 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
2802
2803         * friend.c (is_friend): Be lenient with member functions to deal
2804         with nested friends.
2805
2806 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
2807
2808         * class.c (finish_struct_1): Convert integer_zero_node to
2809         ssizetype before passing it to set_rtti_entry.
2810         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
2811         of any size to a pointer.
2812
2813 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
2814
2815         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
2816         (build_template_decl_overload): Remove.
2817         (set_mangled_name_for_decl): New function.
2818         (innermost_args): Remove is_spec parameter.
2819         (most_specialized, most_specialized_class): Remove declarations.
2820         (lookup_template_class): Add entering_scope parameter.
2821         (maybe_process_partial_specialization): New function.
2822         (finish_template_decl): Likewise.
2823         (finish_template_type): Likewise.  
2824         * class.c (finish_struct): Clean up processing of member template
2825         specializations.
2826         * decl.c (pushtag): Fix formatting.
2827         (lookup_tag): Improve handling of pseudo-global levels.
2828         (make_typename_type): Adjust call to lookup_template_class.
2829         (shadow_tag): Use maybe_process_partial_specialization.
2830         (xref_tag): Improve handling of member friends.  
2831         (start_function): Call push_nested_class before
2832         push_template_decl.  Don't call push_template_decl for
2833         specializations.
2834         * decl2.c (grok_x_components): Don't call xref_tag for
2835         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
2836         (grokclassfn): Use set_mangled_name_for_decl.
2837         (arg_assoc_class): Adjust call to innermost_args.
2838         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
2839         * error.c (dump_function_name): Improve printing of template
2840         function names.
2841         * friend.c (is_friend): Don't compare types of decls to determine
2842         friendship, unless flag_guiding_decls.
2843         (make_friend_class): Partial specializations cannot be friends.  
2844         (do_friend): Use set_mangled_name_for_decl.  Call
2845         push_template_decl_real instead of push_template_decl.
2846         * method.c (build_decl_overload_real): Remove prototype.  Give it
2847         external linkage.
2848         (build_overload_identififer): Adjust call to innermost_args.
2849         (build_template_decl_overload): Remove.
2850         (set_mangled_name_for_decl): New function.
2851         * parse.y (.finish_template_type): New non-terminal.
2852         (template_def): Use finish_template_decl.  Use template_extdef
2853         instead of extdef.
2854         (template_extdef, template_datadef): New non-terminals, containing
2855         only those rules for things which can be templates.
2856         (datadef): Tidy.
2857         (template_type, self_template_type): Use .finish_template_type.
2858         (named_class_head): Use maybe_process_partial_specialization.
2859         * pt.c (mangle_class_name_for_template): Remove context parameter.
2860         (get_class_bindings): Remove outer_args parameter.
2861         (complete_template_args): Remove.
2862         (add_outermost_template_args): New function.
2863         (register_specialization): Return the specialization.
2864         (unregister_specialization): New function.
2865         (tsubst_template_parms): Likewise.
2866         (most_specialized, most_specialized_class): Prototype here as
2867         static. 
2868         (original_template): Rename to most_general_template.
2869         (tsubst_template_parms): New function.
2870         (set_mangled_name_for_template_decl): Likewise.
2871         (TMPL_ARGS_DEPTH): New macro.
2872         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
2873         (TMPL_ARGS_LEVEL): New macro.
2874         (SET_TMPL_ARGS_LEVEL): Likewise.
2875         (TMPL_ARG): Likewise.
2876         (SET_TMPL_ARG): Likewise.
2877         (TMPL_ARGS_DEPTH): Likewise.
2878         (finish_member_template_decl): Use finish_template_decl.
2879         (maybe_process_partial_specialization): New function, split out
2880         from tsubst.
2881         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
2882         (maybe_begin_member_template_processing): Use new macros.
2883         (is_member_template): Likewise.
2884         (is_member_template_class): Likewise.
2885         (add_to_template_args): Likewise.  Deal with multiple levels of
2886         args. 
2887         (maybe_process_partial_specialization): New function.
2888         (retrieve_specialization): Add consistency check.
2889         (determine_specialization): Return full argument list.
2890         (check_explicit_specialization): Tweak friend handling.  Use full
2891         argument lists.  Simplify.
2892         (current_template_args): Use new macros.
2893         (push_template_decl_real): Change ill-named mainargs to specargs.
2894         Check that a partial specialization actually specializes at least
2895         one parameter.   Improve friend handling.  Modify for full
2896         template arguments.
2897         (classtype_mangled_name): Don't mangle the names of
2898         specializations. 
2899         (lookup_template_class): Add entering_scope parameter.  Use it to
2900         avoid finding a template type when an instantiation is required.
2901         Simplify.  Use full template arguments.
2902         (tsubst_friend_function): Use unregister_specialization.  Use new
2903         macros.  Use full template arguments.
2904         (tsubst_friend_class): Substitute, using tsubst_template_parms,
2905         into the template parameters before passing them to
2906         redeclare_class_template.
2907         (instantiate_class_template): Simplify.  Use full template
2908         arguments.  Adjust calls to get_class_bindings.  Use
2909         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
2910         (innermost_args): Use new macros.
2911         (tsubst_aggr_type): New function, split out from tsubst.
2912         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
2913         conventions for lookup_tmeplate_class.  Refine handling of partial
2914         instantiations.   Remove calls to complete_template_args.
2915         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
2916         and set_mangled_name_for_template_decl.
2917         (tsubst_copy): Use tsubst_aggr_type.
2918         (instantiate_template): Use full template arguments.
2919         (more_specialized): Improve formatting.
2920         (more_specialized_class): Adjust calls to get_class_bindings.
2921         (get_bindings_real): Don't call complete_template_args.
2922         (most_specialized): Don't overwrite input; create a new list.
2923         (most_specialized_class): Use most_general_template.
2924         (regenerate_decl_from_template): Use unregister_specialization.
2925         Use full template arguments.  
2926         (instantiate_decl): Use full template arguments.
2927         (set_mangled_name_for_template_decl): New function.
2928         * semantics.c (begin_class_definition): Use
2929         maybe_process_partial_specialization.
2930         (finish_member_class_template): New function.
2931         (finish_template_decl): Likewise.
2932         (finish_template_type): Likewise.  
2933         (typeck.c): Don't crash after issuing a compiler_error.
2934         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
2935         
2936 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2937
2938         * typeck2.c (build_functional_cast): Handle default-initialization.
2939
2940         * call.c (build_over_call): Pass 1 to popclass.
2941
2942         * parse.y (direct_notype_declarator): Add precedence declaration
2943         to notype_unqualified_id case.
2944         * Makefile.in (EXPECT): Adjust.
2945
2946         * tree.c (ovl_member): Fix for single function in OVL.
2947
2948 1998-07-27  Dave Brolley  <brolley@cygnus.com>
2949
2950         * c-lex.c (yylex): Fix boundary conditions in character literal and
2951         string literal loops.
2952
2953 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
2954
2955         * decl.c (lookup_name_real): OK, do return the from_obj value
2956         unless got_object depends on template parms.
2957
2958         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
2959
2960         * pt.c (coerce_template_parms): Also complain about local enums.
2961
2962         * cp-tree.h: Add prototype for set_identifier_local_value.
2963         * decl.c (set_identifier_local_value_with_scope): Make static,
2964         prototype.
2965         * search.c (covariant_return_p): Likewise.
2966         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
2967
2968         * call.c (build_method_call): Only pull out the type of a destructor
2969         if it's a template type parm.
2970         * decl.c (lookup_name_real): Never return the from_obj value.
2971
2972 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2973
2974         * except.c (process_start_catch_block_old): Call start_decl_1 for
2975         catch parm.
2976         * decl.c (start_decl_1): Avoid duplicate error.
2977
2978         * init.c (expand_default_init): Only perform the initialization if
2979         it will do something.
2980
2981 1998-07-23  H.J. Lu  (hjl@gnu.org)
2982
2983         * parse.y (base_class): Check for invalid base class.
2984
2985 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
2986
2987         * decl2.c (import_export_template): Fold in...
2988         (import_export_class): ...to here.  Handle dllimport/export.
2989
2990         * class.c (build_vtable): Pass at_eof to import_export_vtable.
2991         (prepare_fresh_vtable): Likewise.
2992         * decl2.c (import_export_class): Split out...
2993         (finish_prevtable_vardecl): From here.
2994         * class.c (finish_struct_1): Call import_export_class if at_eof.
2995
2996         * decl.c (start_function): #if 0 mysterious code I wrote and have 
2997         forgotten why.
2998         * rtti.c (get_tinfo_fn): If this is for a class type, set
2999         DECL_CONTEXT.
3000
3001 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
3002
3003         * inc/exception: Change terminate and unexpected to ().
3004
3005         * parse.y (named_class_head_sans_basetype_defn): A
3006         named_class_head_sans_basetype followed by '{' or ':' is a defn.
3007
3008 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
3009
3010         * tree.c (canonical_type_variant): New fn to handle arrays.
3011         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
3012         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
3013         * method.c (process_overload_item): Use build_overload_value for
3014         arrays.
3015
3016 1998-07-20  Dave Brolley  <brolley@cygnus.com>
3017
3018         * lex.c (mbchar.h): #include it.
3019         (GET_ENVIRONMENT): New macro.
3020         (init_parse): Set character set based on LANG environment variable.
3021         (real_yylex): Handle multibyte characters in character literals.
3022         (real_yylex): Handle multibyte characters in string literals.
3023
3024 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
3025
3026         * lex.c (do_identifier): Look for class value even if we don't
3027         have a global value.  Do implicit declaration if parsing is 2.
3028         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
3029         lookup.
3030
3031 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
3032
3033         * decl.c (pushtag): Revert previous change.
3034         * pt.c (lookup_template_class): Don't put out debugging
3035         information for types that use template parameters.
3036
3037         * decl.c (pushtag): Don't put out debugging information for
3038         compiler-generated typedefs.
3039         
3040         * error.c (dump_type_real): Don't crash when presented with
3041         intQI_type_node or the like.
3042
3043         * semantics.c (finish_translation_unit): Fix spelling error in
3044         comment.
3045
3046 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
3047
3048         * decl.c (lookup_name_real): Pull out single function here.
3049         (select_decl): Not here.
3050         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
3051
3052         * decl.c (qualify_lookup): Tweak again.
3053
3054         * pt.c (lookup_template_class): Don't mess with the context of the
3055         instantiation.
3056         * decl2.c (current_decl_namespace): Remove special handling for
3057         templates.
3058
3059         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
3060         a member template specialization.
3061
3062         * tree.c (ovl_member): Use decls_match to compare functions.
3063         * decl.c (decls_match): Check the context of a function.
3064
3065         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
3066         in Koenig lookup support rules.
3067         * semantics.c (finish_call_expr): Handle the new cases.
3068
3069         * typeck.c (build_x_function_call): Handle overloaded methods.
3070
3071         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
3072
3073 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
3074
3075         * semantics.c (finish_object_call_expr): Revert previous change.
3076         * call.c (build_new_method_call): Likewise.  Instead, convert
3077         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
3078
3079 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
3080
3081         * decl.c (qualify_lookup): Handle templates.
3082
3083         * decl2.c (do_using_directive): Don't pass ancestor.
3084         * decl.c (push_using_directive): Calculate ancestor.
3085
3086         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
3087         * decl.c (pushdecl): Move type shadowing handling from here...
3088         (duplicate_decls): ...to here.
3089         * decl.c (set_identifier_local_value_with_scope): New fn.
3090         (pushdecl): Use it.
3091         (set_identifier_local_value, lookup_type_current_level): New fns.
3092         * decl2.c (do_local_using_decl): Handle types and binding level
3093         stuff properly.
3094
3095         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
3096         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
3097         (lookup_namespace_name): Likewise.
3098         * typeck.c (build_unary_op): Not here anymore.
3099
3100         * decl2.c (do_class_using_decl): Make sure we get an identifier.
3101         * class.c (handle_using_decl): Ignore TYPE_DECLs.
3102
3103         * decl.c (qualify_lookup): New fn.
3104         (lookup_name_real): Use it.
3105
3106 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
3107
3108         * decl2.c (add_using_namespace): When directly using a namespace
3109         that was indirect before, promote it.
3110
3111         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
3112         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
3113         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
3114         * decl.c (select_decl): Replace two flag parameters by one.
3115         (unqualified_namespace_lookup): Likewise, pass flag.
3116         (lookup_flags): New function.
3117         (lookup_name_real): Compute flags, pass them.
3118         (lookup_namespace_name): Call with zero-flag.
3119         * decl2.c (ambiguous_decl): Add flag parameter, complain only
3120         according to flags.
3121         (lookup_using_namespace, qualified_lookup_using_namespace):
3122         Add flag parameter, pass them through.
3123         * lex.c (do_scoped_id): Call with zero-flag.
3124
3125 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
3126
3127         * typeck.c (convert_for_assignment): Use comptypes.
3128
3129 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
3130
3131         * semantics.c (finish_object_call_expr): Move test for the
3132         function called being a TYPE_DECL to ...
3133         * call.c (build_new_method_call): Here.
3134
3135 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
3136
3137         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
3138         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
3139
3140         * lex.c (looking_for_typename): Don't initialize.
3141
3142         * decl2.c (ambiguous_decl): Clarify error message.
3143
3144         * decl.c (push_using_directive): Iterate over namespaces used
3145         indirectly.
3146
3147 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3148
3149         * decl2.c (add_using_namespace): Iterate over namespaces used
3150         indirectly.
3151
3152         * decl.c (lookup_name_real): Accept namespace aliases as locals.
3153         (cat_namespace_levels): Ignore aliases.
3154         (duplicate_decls): Ignore duplicate aliases.
3155         * decl2.c (do_namespace_alias): Process block level namespace
3156         aliases. Store alias with pushdecl. Remove odr errors.
3157         * parse.y (namespace_alias): New non-terminal.
3158         (extdef): Use it.
3159
3160 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
3161
3162         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
3163         Handle TEMPLATE_TYPE_PARM.
3164         (arg_assoc): Rewrite.
3165
3166         * pt.c (complete_template_args): Don't look at the context unless
3167         we have to.
3168
3169         * method.c (build_decl_overload_real): Fix namespace handling.
3170
3171         * typeck.c (build_unary_op): Extract a lone function from an
3172         OVERLOAD.
3173
3174         * call.c (build_scoped_method_call): Handle getting a namespace
3175         for basetype in a destructor call.
3176         (check_dtor_name): Handle enums.
3177
3178         * parse.y (using_directive): New nonterminal.
3179         (extdef, simple_stmt): Use it.
3180
3181 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3182
3183         * decl2.c (add_function): Move error message ...
3184         (arg_assoc_namespace): ... from here.
3185
3186 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
3187
3188         * parse.y (namespace_qualifier): Fix multiple level handling.
3189         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
3190         (arg_assoc): Don't skip the first argument of a function.
3191
3192 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
3193
3194         * search.c (my_tree_cons): Clean up.
3195
3196 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
3197
3198         * call.c (joust): Don't warn about "confusing" conversions to the
3199         same type.
3200
3201 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3202
3203         * class.c (push_nested_class): Complain about namespaces.
3204         * decl.c (start_decl): Enter the object's namespace.
3205         (cp_finish_decl): Leave it.
3206         (grokdeclarator): Likewise.
3207         * decl2.c (check_decl_namespace): New function.
3208         (finish_file): Call it.
3209         * parse.y (complex_direct_notype_declarator): Set complexity
3210         of namespace-qualified ids to -1, enter the namespace.
3211
3212         * method.c (build_template_decl_overload): Expect _DECL as first
3213         parameter. Put context temporarily into current_namespace.
3214         * pt.c (check_explicit_specialization): Change caller.
3215         (tsubst): Likewise.
3216
3217         * init.c (build_offset_ref): Call mark_used and
3218         convert_from_reference for namespace members.
3219
3220 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3221
3222         * search.c (my_tree_cons): The bitfield is at index 2.
3223
3224 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
3225
3226         * lang-options.h: Format changed to work with new --help support
3227         in gcc/toplev.c
3228         
3229 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3230
3231         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
3232         Do Koenig lookup in CALL_EXPR.
3233         (arg_assoc): Handle error_mark.
3234         * lex.c (is_global): New function.
3235         (do_identifier): Expect arguments for Koenig lookup.
3236         * parse.y (primary): Add rules for calls of unqualified function calls.
3237         (do_id): Change call of do_identifier.
3238         * pt.c (finish_stmt_expr): Likewise.
3239         * semantics.c (finish_id_expr): Likewise.
3240         (finish_call_expr): Add integer parameter to indicate
3241         argument-dependent lookup.
3242
3243         * decl.c (struct binding_level): New field using_directives.
3244         (push_using_decl): Not sorry anymore.
3245         (push_using_directive): New function.
3246         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
3247         (unqualified_namespace_lookup): New function, code from ...
3248         (lookup_name_real): ... here.
3249         * decl2.c (lookup_using_namespace): Pass using list instead of
3250         initial scope.
3251         (validate_nonmember_using_decl): New function.
3252         (do_nonmember_using_decl): New function.
3253         (do_toplevel_using_decl): Use them.
3254         (do_local_using_decl): New function.
3255         (do_using_directive): Support block-level directives.
3256         * parse.y (simple_stmt): Support using declarations and
3257         directives.
3258         (namespace_qualifier, namespace_using_decl): New non-terminals.
3259
3260         * xref.c (classname): New function.
3261         (GNU_xref_hier): Change class and base parameters to tree.
3262         * decl.c (xref_baseypes): Change caller.
3263         * friend.c (make_friend_class): Likewise.
3264
3265 1998-07-12  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3266
3267         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter 
3268         comparison.
3269
3270         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a 
3271         template template parameter, record its use.
3272         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse 
3273         its template arguments if exists.
3274
3275         * pt.c (coerce_template_template_parms): New function equivalent
3276         to coerce_template_parms when IS_TMPL_PARM is true.
3277         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
3278         all callers changed.
3279
3280         (coerce_template_parms): Access ARGLIST properly when creating a
3281         new vector.  Only accept implicit TYPE_DECL as valid argument for
3282         a template template parameter when it is a base class of
3283         current_class_type.  Don't display error message when COMPLAIN is
3284         false.
3285
3286 1998-07-12  Klaus Kaempf (kkaempf@progis.de)
3287
3288         * repo.c (get_base_filename): Use file_name_nondirectory.
3289         (open_repo_file): Ditto.
3290         * cp-tree.h (file_name_nondirectory): Add prototype.
3291
3292 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
3293
3294         * friend.c (do_friend): Pull the identifier out of declarator.
3295         Use cp_error and friends.
3296         * decl2.c (qualified_lookup_using_namespace): Fix call to 
3297         purpose_member.
3298         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
3299         (grokvardecl): Use DECL_CLASS_SCOPE_P.
3300         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
3301         * class.c (warn_hidden): Fix for OVERLOAD.
3302         From grahams@rcp.co.uk:
3303         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
3304         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
3305
3306 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
3307
3308         * g++.1 (-traditional): Remove duplicated documentation.
3309
3310 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
3311
3312         * method.c (flush_repeats): Add nrepeats parameter.
3313         (issue_nrepeats): Likewise.
3314         (is_back_referenceable_type): New function.  Don't back-reference
3315         TEMPLATE_TYPE_PARMs as well as simple types like integers.
3316         (build_mangled_name_for_type): Likewise.
3317         (build_mangled_name_for_type_with_Gcode): Likewise.
3318         (lasttype): Remove.
3319         (nrepeats): Likewise.
3320         (Nrepeats): Likewise.
3321         (start_squangling): Don't clear the variables removed above.
3322         (end_squangling): Likewise.
3323         (flush_repeats): Tidy.  Use nrepeats parameter rather than
3324         Nrepeats global.
3325         (issue_nrepeats): Likewise, but with nrepeats global.  Use
3326         is_backreferenceable_type.
3327         (build_overload_nested_name): Tidy.  Add comment.  Use
3328         build_mangled_name_for_type.
3329         (build_underscore_int): Comment.
3330         (build_overload_scope_ref): Use build_mangled_name_for_type.
3331         (build_overload_int): Likewise.
3332         (build_template_template_parm_names): Tidy.
3333         (build_template_parm_names): Use build_mangled_name_for_type.
3334         (build_overload_identifier): Add comments.
3335         (build_mangled_name_for_type_with_Gcode): Split out from
3336         build_mangled_name.
3337         (build_mangled_name_for_type): Use it.
3338         (build_mangled_name): Rework to use build_mangled_name_for_type
3339         and to not use global nrepeats/Nrepeats.  Tidy.
3340         (process_modifiers): Tidy.
3341         (check_btype): Use is_backreferenceable_type.  Add comment.
3342         Rename `node' to `type'.
3343         (process_overload_item): Set numeric_output_need_bar here.
3344         Use build_mangled_name_for_type.  Tidy.
3345         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
3346         build_mangled_name_for_type.
3347
3348         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
3349         for TYPE_DECLs.
3350
3351 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
3352
3353         * cp-tree.h (warn_long_long): Define.
3354         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
3355         warning "ANSI C++ does not support `long long'".
3356         * decl2.c (warn_long_long): Define.
3357         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
3358
3359 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
3360
3361         * decl.c (xref_tag): Handle attributes between 'class' and name.
3362         * parse.y (aggr): Likewise.
3363         * semantics.c (finish_class_definition): Likewise.
3364         * Makefile.in (EXPECTED): Adjust.
3365
3366         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
3367         * decl2.c: Define them.
3368         (lang_decode_option): Handle them.
3369         * lang-options.h: Add -foptional-diags.
3370         * class.c (finish_struct): Don't complain about multiple meanings of 
3371         name if -fno-optional-diags.
3372         * decl.c (pushdecl_class_level): Likewise.
3373         * lex.c (real_yylex): Check warn_multichar.
3374
3375 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
3376
3377         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
3378
3379         * tree.c (make_binfo): Fix length.
3380
3381 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
3382
3383         * decl2.c (lang_decode_option): Remove warn_template_debugging.
3384         * lang-options.h: Ditto.
3385
3386 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3387
3388         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
3389         (process_start_catch_block): Likewise for variables
3390         `false_label_rtx', `call_rtx' and `return_value_rtx'.
3391
3392 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
3393
3394         * tree.c (build_srcloc): Make sure we allocate this node on the
3395         permanent obstack.
3396
3397 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
3398
3399         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
3400         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
3401         (lang_specific_driver): Only add -lm automatically if need_math is
3402         nonzero.
3403
3404 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
3405
3406         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
3407
3408 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3409
3410         * Makefile.in (EXPR_H): New dependency variable.
3411         (decl2.o): Depend on $(EXPR_H).
3412         (typeck.o): Likewise.
3413         (init.o): Likewise.
3414         (expr.o): Likewise.
3415
3416 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
3417
3418         * decl.c (start_enum): Put local enums on permanent_obstack.
3419
3420 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
3421
3422         * cp-tree.h (c_get_alias_set): Declare.
3423         * decl.c (init_decl_processing): Set lang_get_alias_set.
3424
3425 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
3426
3427         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
3428         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
3429         flag for all function decls which are in the exception table. 
3430         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
3431         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
3432         code is emitted for any referenced rtti function.
3433
3434 1998-06-25  Dave Brolley  <brolley@cygnus.com>
3435
3436         * lang-specs.h: Use new | syntax to eliminate
3437         string concatenation.
3438
3439 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
3440
3441         * cp-tree.h (CP_DECL_CONTEXT): New macro.
3442         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
3443         * method.c (build_overload_nested_name): Likewise.
3444         * sig.c (build_signature_pointer_or_reference_type): Don't set
3445         DECL_CONTEXT.
3446
3447 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3448
3449         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
3450         * cp-tree.h (FROB_CONTEXT): New macro.
3451         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
3452         * decl.c (namespace_binding): Replace NULL_TREE with
3453         global_namespace.
3454         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
3455         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
3456         Likewise.
3457         * decl.c (pushtag): Use FROB_CONTEXT.
3458         (pushdecl, make_typename_type, define_function, grokdeclarator):
3459         Likewise.
3460         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
3461         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
3462         Likewise.
3463         * decl2.c (decl_namespace): Return global_namespace if no context.
3464         * method.c (build_overload_nested_name): Expect null as context.
3465         * pt.c (mangle_class_name_for_template): Do nothing for null
3466         contexts.
3467         (lookup_template_class): Allow for null id_context.
3468
3469 1998-06-25  Richard Henderson  <rth@cygnus.com>
3470
3471         * method.c (emit_thunk): Set current_function_is_thunk for the
3472         ASM_OUTPUT_MI_THUNK case as well.
3473
3474 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
3475
3476         * exception.cc (__cplus_type_matcher): Get a match_info pointer
3477         instead of an exception table entry as a parameter.
3478
3479 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
3480
3481         * parse.y (function_try_block): Don't call start_catch_handler.
3482         * except.c (call_eh_info): Remove coerced field from declaration.
3483         (build_eh_type_type_ref): New function to create an address of a
3484         rtti function for the new style exception tables.
3485         (expand_start_catch_block): Split function, this contains the
3486         common part.
3487         (process_start_catch_block_old): New function to perform the rest
3488         of expand_start_catch_block under old style exceptions.
3489         (process_start_catch_block_old): New function to perform the rest
3490         of expand_start_catch_block under new style exceptions.
3491         (expand_end_catch_block): Only pop the false label off the stack under
3492         the old style of exceptions.
3493         * semantics.c (finish_try_block): Don't call start_catch_handler.
3494         * exception.cc (struct cp_eh_info): Add original_value field.
3495         (__cplus_type_matcher): Perform type matching on the original exception
3496         value, and if we have a match, set the current value.
3497         (__cp_push_exception): Set the original expcetion value.
3498
3499 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
3500
3501         * call.c (joust): Fix confusing conversion warning.
3502
3503         * call.c (build_op_delete_call): Add placement parm.  Check
3504         LOOKUP_SPECULATIVELY.
3505         * cp-tree.h, decl2.c, init.c: Adjust.
3506         * decl.c (finish_function): Use it.
3507
3508         * pt.c (tsubst): Diagnose creating void fields or variables.
3509
3510 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3511
3512         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
3513
3514         * cp-tree.h (check_dtor_name): Add prototype.
3515
3516         * init.c (expand_member_init): Remove unused variables
3517         `ptr_type_node', `parm' and `rval'.
3518
3519         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
3520         in call to fprintf.
3521         (lang_print_xnode): Likewise.
3522
3523         * typeck2.c (enum_name_string): Cast argument to sprintf to long
3524         and use %ld specifier.
3525
3526         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
3527         specifier in call to fprintf.
3528         (GNU_xref_member): Cast argument to sprintf to int.
3529
3530 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
3531
3532         * typeck2.c (pop_init_level): Warn about implicit zero initialization
3533         of struct members.
3534
3535 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3536
3537         * cp-tree.h: Prototype function `check_java_method'.
3538
3539 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3540
3541         * class.c (finish_struct): Make conflicting use of id a pedwarn.
3542         * decl.c (pushdecl_class_level): Likewise.
3543
3544 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
3545
3546         * pt.c (convert_nontype_argument): Issue an error when presented
3547         with an integer (real) constant that cannot be simplified to an
3548         INT_CST (REAL_CST).
3549
3550         * cp-tree.h (c_get_alias_set): Remove declaration added in
3551         1998-06-13 change that should never have been checked in.
3552
3553 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3554
3555         * typeck.c (build_binary_op_nodefault): Change % in format strings
3556         to %%.
3557
3558         * decl.c (grokvardecl): Don't build_static_name for decls that
3559         aren't at namespace scope.
3560
3561         * init.c (perform_member_init): Catch default-initialization of
3562         references.
3563
3564 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
3565
3566         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
3567
3568 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3569
3570         * method.c (hack_identifier): Complain about getting a namespace
3571         or class template.
3572         * typeck.c (decay_conversion): Remove check for namespaces.
3573         * typeck2.c (incomplete_type_error): Likewise.
3574         * parse.y (template_arg): Add PTYPENAME expansion.
3575
3576 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
3577
3578         * decl.c (grokvardecl): Don't build external assembler names for 
3579         TYPENAMEs in other namespaces as there is no declarator.
3580         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
3581         info from DECL_CONTEXT if it is NULL.
3582
3583 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
3584
3585         * call.c (check_dtor_name): Split out.
3586         (build_scoped_method_call): Use it.
3587         (build_method_call): Use it.
3588         * init.c (build_offset_ref): Use it.
3589
3590         * typeck.c (build_static_cast): Fix handling of pointers to members.
3591
3592         * decl.c (finish_function): Just return nothing from a constructor.
3593         * typeck.c (c_expand_return): Complain about returning a void
3594         expression from a destructor.
3595
3596 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
3597
3598         * class.c (alter_access): Accept a BINFO explaining how to get
3599         from the entity whose accessed is being altered to the type doing
3600         the altering.
3601         (handle_using_decl): New function containing code split out from ...
3602         (finish_struct_1): Here.
3603
3604         * cp-tree.h (complete_type_or_else): Declare.
3605         * init.c (build_new_1, build_delete): Use it.
3606         * typeck.c (require_complete_type): Use complete_type, rather than
3607         expanding it inline.
3608         (complete_type_or_else): New function.
3609         (build_component_ref): Use it.
3610         (pointer_int_sum): Make sure the type pointed to is complete.
3611         (pointer_diff): Likewise.
3612
3613         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
3614         types. 
3615
3616         * search.c (get_matching_virtual): Note that member templates
3617         cannot override virtual functions.
3618
3619 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
3620
3621         * pt.c (check_explicit_specialization): If DECLARATOR turned into
3622         an error_mark_node from lookup_template_function, return the same.
3623         (determine_specialization): Also make sure TEMPLATE_ID isn't an
3624         error_mark_node, before we try to read its operands.
3625         * decl.c (grokdeclarator): If we got an error_mark_node from
3626         check_explicit_specialization, just return it right back.
3627
3628 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
3629
3630         * class.c (instantiate_type): Don't treat template-ids that don't
3631         specify any template arguments as equivalent to ordinary
3632         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
3633         pointer-to-members for member templates.  Tidy slightly.
3634         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
3635         * init.c (build_offset_ref): Handle template-ids like ordinary
3636         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
3637         offset part of the OFFSET_REF.
3638         * typeck.c (build_unary_op): Change check for unknown types to
3639         look for OFFSET_REFs, not SCOPE_REFs.
3640
3641 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
3642
3643         * pt.c (is_member_template_class): New function.
3644         (push_template_decl_real): Use it.
3645
3646 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
3647
3648         * friend.c (do_friend): Add support for nested classes using
3649         member functions of the enclosing class as friends.
3650
3651 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
3652
3653         * call.c (convert_default_arg): Make global, not static.
3654         (convert_arg_for_ellipsis): Split out from ...
3655         (build_over_call): Here.
3656         * cp-tree.h (convert_default_arg); Declare.
3657         (convert_arg_to_ellipsis): Likewise.
3658         (do_member_init): Remove.
3659         * init.c (do_member_init): Remove; this code is dead.
3660         (expand_member_init): Remove much of this code; it is dead.
3661         * typeck.c (convert_arguments): Use convert_default_arg and
3662         convert_arg_for_ellipsis, rather than duplicating here.
3663         
3664         * call.c (convert_like): Don't fail silently if 
3665         build_user_type_conversion fails.  Always return error_mark_node 
3666         for failure.
3667
3668 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3669
3670         * search.c (covariant_return_p): Complain about ambiguous base.
3671
3672         * typeck.c (build_component_ref): Diagnose ref to nested type.
3673
3674 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
3675
3676         * decl.c (grokparms): Check that INIT isn't an error_mark_node
3677         before giving error about invalid type for default arg.
3678
3679 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3680
3681         * call.c (build_method_call): Fix thinko.
3682
3683 1998-06-10  Dave Brolley  <brolley@cygnus.com>
3684
3685         * decl2.c (lang_decode_option): New argc/argv interface.
3686         * cp-tree.h (lang_decode_option): New argc/argv interface.
3687         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
3688         specified for cpplib-enabled compilers.
3689         * lex.c (lang_init): Don't check_newline for cpplib.
3690         (init_parse): Don't initialize cpplib here.
3691
3692 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
3693
3694         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
3695         piece before checking DECL_MUTABLE_P.
3696
3697 1998-06-10  John Carr  <jfc@mit.edu>
3698
3699         * tree.c (debug_binfo): Make printf format match arguments.
3700
3701         * error.c (OB_PUTI): Make printf format match arguments.
3702
3703 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3704
3705         * init.c (perform_member_init): Handle default-initialization.
3706
3707         * except.c (build_throw): Handle throwing NULL.
3708
3709         * typeck.c (build_x_function_call): Use resolve_offset_ref.
3710
3711         * search.c (compute_access): Only strip an anonymous union
3712         for a FIELD_DECL.
3713
3714         * call.c (add_builtin_candidates): Tweak.
3715
3716         * cvt.c (build_expr_type_conversion): Restore code for conversion
3717         from class types.
3718         * decl2.c (delete_sanity): Use it.  Clean up.
3719
3720         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
3721
3722 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
3723
3724         * typeck.c (c_expand_return): Don't warn about void expressions on
3725         return statements in functions returning void.
3726
3727 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
3728
3729         * pt.c (fn_type_unification): Revise documentation.  Tidy.
3730         (type_unification): Likewise.
3731
3732 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
3733
3734         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
3735         expand_end_catch.
3736         * parse.y (function_try_block): Rename expand_start_catch, and delete
3737         expand_end_catch.
3738         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
3739         expand_end_catch.
3740
3741 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
3742
3743         * search.c (lookup_member): New fn.
3744         * class.c (finish_struct_1): Use it.
3745         * decl.c (lookup_name_real): Use it.
3746
3747 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3748
3749         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
3750
3751         * cp-tree.h: Add prototype for `maybe_print_template_context' and
3752         `maybe_make_one_only'.
3753
3754         * decl.c (auto_function): Remove unused variable `decl'.
3755
3756         * decl2.c: Include dwarf2out.h and dwarfout.h.
3757
3758         * lex.c: Remove redundant declarations of `set_float_handler' and
3759         `asm_out_file'.
3760
3761 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
3762
3763         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile 
3764         time flag.  Call __cp_eh_info instead of __cp_exception_info.
3765         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
3766         (__cp_exception_info): Return offset into cp_eh_info structure to 
3767         match what use to be the start of this structure.
3768         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
3769         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
3770         compile time flag.
3771         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call 
3772         __cp_eh_info instead of __cp_exception_info.
3773
3774 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
3775
3776         * decl.c (cp_finish_decl): Disable inlining of extern inlines
3777         with static variables.
3778
3779 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
3780
3781         * init.c (build_offset_ref): Correct previous change to use build,
3782         not build_min.
3783
3784 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
3785
3786         * class.c (instantiate_type): Handle pointer-to-members where the
3787         member is a template.
3788         * init.c (build_offset_ref): Likewise.
3789         * typeck.c (build_unary_op): Likewise.
3790
3791 1998-06-07  Richard Henderson  <rth@cygnus.com>
3792
3793         * lex.c (lang_init_options): New function.
3794         (lang_init): Remove flag_exceptions == 2 hack.
3795         
3796 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
3797
3798         * search.c (envelope_add_decl): Tweak for implicit typename.
3799
3800         * call.c (joust): Also warn about confusing conversion op/constructor
3801         overload resolution.
3802
3803         * spew.c (yylex): Also return the TYPE_DECL if got_object.
3804         Don't clear got_object after '~'.
3805         * call.c (build_scoped_method_call): Tweak destructor handling.
3806         (build_method_call): Likewise.
3807         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
3808         TYPE_MAIN_VARIANT for destructors.
3809         * semantics.c (finish_object_call_expr): Complain about calling a
3810         TYPE_DECL.
3811
3812 1998-06-05  Per Bothner  <bothner@cygnus.com>
3813
3814         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
3815         Define - update needed by gcc.c change.
3816
3817 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
3818
3819         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
3820
3821 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
3822
3823         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
3824         * decl.c (lookup_name_real): Add namespaces_only parameter.
3825         If set, return only NAMESPACE_DECLs.
3826         (select_decl): Likewise.
3827         (identifier_type_value): Give additional parameter.
3828         (lookup_name_nonclass): Likewise.
3829         (lookup_name): Likewise.
3830         (find_binding): Skip namespace aliases.
3831         (binding_for_name): Likewise.
3832         (push_namespace): Check for namespace aliases.
3833         (lookup_name_namespace_only): New function.
3834         (begin_only_namespace_names, end_only_namespace_names): New functions.
3835         * decl2.c (set_decl_namespace): Skip namespace aliases.
3836         (do_using_directive): Likewise.
3837         (do_namespace_alias): Produce namespace aliases, fix alias 
3838         redeclaration.
3839         * error.c (dump_decl): Support SCOPE_REF.
3840         * parse.y (extdef): Wrap lookup with namespace_only for namespace
3841         aliases and using declarations.
3842
3843 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3844
3845         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
3846
3847         * error.c (dump_expr): Clean up NEW_EXPR case.
3848
3849 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3850
3851         Suggested by Brendan Kehoe
3852         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
3853         treat it as using ::decl.
3854
3855         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
3856
3857         * tree.c (mapcar): Support NEW_EXPR.
3858
3859         * error.c (dump_expr): Support NEW_EXPR.
3860
3861 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
3862
3863         * method.c (make_thunk): Use overload machinery to make name.
3864         * search.c (covariant_return_p): New fn.
3865         (get_matching_virtual): Use it.
3866
3867         * init.c (build_new_1): Fix check for void.
3868
3869 1998-06-01  Per Bothner  <bothner@cygnus.com>
3870
3871         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
3872         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
3873         java_int_type_node, java_long_type_node, java_float_type_node,
3874         java_double_type_node, java_char_type_node, java_boolean_type_node):
3875         New "primitive" types, with predefined names __java_byte etc.
3876         (record_builtin_java_type):  New function.
3877         (init_decl_processing):  Make Java types with record_builtin_java_type.
3878         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
3879         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
3880         (grokfndecl):  Call check_java_method for Java classes.
3881         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
3882         (process_overload_item):  Match types against specific
3883         java_XX_type_node types, rather than using is_java_type.
3884         * class.c (finish_struct_1):  Don't add default copy constructor
3885         or operator= if TYPE_FOR_JAVA.
3886         (pop_lang_conext):  Restore strict_prototyp proper if Java.
3887         * decl2.c (acceptable_java_type, check_java_method):  New functions.
3888         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
3889         (tsubst):  Move common statement after if statement.
3890         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
3891
3892 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
3893
3894         * pt.c (for_each_template_parm): Use first_rtl_op.
3895
3896         * tree.c (build_cplus_array_type_1): Also check index_type for
3897         template parms.
3898
3899 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
3900
3901         * pt.c (tsubst): Always copy BINFO_BASETYPES.
3902
3903 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
3904
3905         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
3906         TYPE_SIZE_UNIT too.
3907
3908 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
3909
3910         * decl.c (grokdeclarator): Don't complain about in-class
3911         initialization of static consts if we don't really know the type
3912         of the variable.
3913
3914 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
3915
3916         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
3917         * method.c (build_destructor_name): New fn.
3918         * decl2.c (maybe_retrofit_in_chrg): Split out...
3919         (grokclassfn): From here.  Reorganize.
3920         * decl.c (grok_ctor_properties): Make sure ctors for types with 
3921         vbases have the in_chrg parm.
3922         * pt.c (instantiate_class_template): Update 
3923         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
3924         grok_*_properties.
3925         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
3926
3927 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
3928
3929         * pt.c (instantiate_decl): Make test for whether or not static
3930         variables should be instantiated early match its comment.
3931
3932 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
3933
3934         * decl.c (start_decl): Always pedwarn about vacuously redeclaring 
3935         a member.
3936         (start_function): Call check_default_args.
3937         * decl2.c (grokfield): Don't call check_default_args.
3938         (check_default_args): Use cp_error_at.
3939         * lex.c (do_pending_defargs): Call check_default_args.
3940
3941 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
3942
3943         * call.c (build_method_call): Make sure get_type_value returns
3944         something before we try to use its TYPE_MAIN_VARIANT.
3945         (build_scoped_method_call): Likewise.
3946
3947 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
3948
3949         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
3950         initialize an array.
3951
3952         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
3953         DECL_VIRTUAL_P.
3954
3955         * friend.c (do_friend): Clarify template warning.
3956
3957 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
3958
3959         * decl.c (shadow_label): Don't treat decls as identifiers.
3960         (maybe_push_to_top_level): Clear shadowed_labels.
3961
3962         * pt.c (instantiate_decl): Reset lineno and filename after calling
3963         regenerate_decl_from_template. 
3964
3965         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
3966         error_mark_node.
3967
3968 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
3969
3970         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
3971
3972 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
3973
3974         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
3975         (convert_nontype_argument): Handle cases when nontype template
3976         parameters become classes after substitution.
3977
3978 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
3979
3980         * friend.c (is_friend): Use comptypes, rather than == to compare
3981         types.  Modify for new representation of template friends.
3982         (make_friend_class): Likewise.
3983         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
3984         (instantiate_class_template): Deal with template friends.
3985
3986         * decl.c (store_parm_decls): Remove redundant call to
3987         expand_main_function.
3988
3989 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
3990
3991         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
3992         DECL_USE_TEMPLATE.
3993
3994 1998-05-26  Per Bothner  <bothner@cygnus.com>
3995
3996         * language_as_string:  Handle lang_java.
3997
3998 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
3999
4000         * decl.c (pushdecl): Don't copy the type_decl.
4001
4002 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4003
4004         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
4005         current_class_type.
4006         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
4007
4008         * parse.y (complex_direct_notype_declarator): Use $1 to access
4009         scope of notype_qualified_id.
4010
4011 1998-05-26  Dave Brolley  <brolley@cygnus.com>
4012
4013         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
4014         (init_parse): Initialize cpplib interface.
4015
4016         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
4017         empty continuation.
4018
4019 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
4020
4021         * decl.c (pushtag): Avoid crashing on erroneous input.
4022
4023 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4024
4025         * decl.c (push_namespace): Only produce one unique name for
4026         anonymous namespaces.
4027         (get_unique_name): Remove.
4028
4029 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
4030
4031         * call.c (tourney): Don't do any extra comparisons.
4032
4033         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
4034
4035         * cp-tree.h (processing_template_parmlist): Declare.
4036         * decl.c (pushtag): Don't call push_template_decl when we
4037         shouldn't. 
4038         * pt.c (processing_template_parmlist): New variable.
4039         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
4040         (complete_template_args): Use it.
4041         (add_to_template_args): Likewise.
4042         (innermost_args): Likewise.
4043         (tsubst): Likewise.
4044         (begin_template_parm_list): Use processing_template_parmlist.
4045         (end_template_parm_list): Likewise.
4046
4047         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4048         * decl.c (grokdeclarator): Use it.
4049         * decl2.c (grok_x_components): Likewise.
4050         * init.c (initializing_context): Likewise.
4051         * method.c (do_build_copy_constructor): Likewise.
4052         (do_build_assign_ref): Likewise.
4053         * search.c (compute_access): Likewise.
4054         * typeck.c (build_component_ref): Likewise.
4055
4056         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
4057         unnamed type a typedef name "for linkage purposes".
4058
4059         * pt.c (lookup_template_class): Don't look at
4060         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
4061
4062         * method.c (build_overload_int): Handle error cases gracefully.
4063
4064         * pt.c (instantiate_decl): Handle static member variables
4065         correctly.
4066
4067         * pt.c (tsubst): Use the tsubst'd type when producing new
4068         TEMPLATE_PARM_INDEX nodes.
4069
4070 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
4071
4072         * tree.c (cp_tree_equal): Handle pointers to member functions.
4073
4074         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
4075         sure the type of the REF_BIND is a reference type.
4076         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
4077         target_type for clarity.
4078
4079         * parse.y (xcond): Move call to condition_conversion ...
4080         * semantics.c (finish_for_cond): Here.
4081         * parse.c: Regenerated.
4082         
4083 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
4084
4085         * decl.c (push_namespace): Namespaces have type void.
4086         * typeck2.c (incomplete_type_error): Complain about namespace
4087         used as expression.
4088         * typeck.c (decay_conversion): Likewise.
4089
4090 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4091
4092         * error.c (dump_expr): Support namespaces.
4093
4094 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
4095
4096         * cp-tree.def: Add SRCLOC.
4097         * cp-tree.h: Add struct tree_srcloc and accessor macros.
4098         * tree.c (build_srcloc, build_srcloc_here): New fns.
4099         * pt.c (add_pending_template): Use build_srcloc_here.
4100         (push_tinst_level): Update last_template_error_tick before erroring.
4101         (instantiate_decl): Restore lineno and input_filename before 
4102         calling add_pending_template.
4103         * decl2.c (finish_file): Set up lineno and input_filename for
4104         pending templates.
4105
4106 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
4107
4108         * decl.c (lang_print_error_function): New fn.  
4109         (init_decl_processing): Set print_error_function to use it.
4110         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
4111
4112         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
4113         ICS_BAD_FLAG.
4114
4115         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
4116         copy-initialization.
4117
4118         * class.c (build_vtable_entry): Use int_fits_type_p.
4119         (build_vtable): Pass a signed offset to build_vtable_entry.
4120         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
4121         set_rtti_entry): Likewise.
4122
4123 1998-05-22  Per Bothner  <bothner@cygnus.com>
4124
4125         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
4126         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
4127
4128 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
4129
4130         * pt.c (print_template_context): Use fprintf instead of cp_error.
4131
4132         * pt.c (determine_specialization): Just return an error_mark_node.
4133         Also print the decl we want in error messages.  If we complain,
4134         return error_mark_node.
4135         (tsubst_friend_function): Set lineno and input_filename so 
4136         error messages will be useful.
4137         (instantiate_template): Just return an error_mark_node.
4138         (check_explicit_specialization): Don't mess with a returned
4139         error_mark_node.
4140
4141         * pt.c (print_template_context): Add new argument.
4142         (maybe_print_template_context): New fn.
4143         (push_tinst_level): Increment tinst_level_tick.
4144         (pop_tinst_level): Likewise.
4145         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
4146         xrealloc instead of xmalloc.
4147
4148         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
4149
4150 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
4151
4152         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
4153         if the template we looked up is the same as the one we already
4154         have.
4155
4156 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
4157
4158         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
4159         (cpp_reader,parse_in): Add for cpplib.
4160         (check_newline): Call handle_sysv_pragma with new interface.
4161         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
4162
4163         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
4164         (sub_getch): Call GETC for cpplib.
4165
4166         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
4167         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
4168
4169         * Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
4170
4171 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
4172
4173         * decl2.c (maybe_make_one_only): New fn.
4174         (import_export_vtable): Use it.
4175         (import_export_decl): Likewise.
4176         * pt.c (mark_decl_instantiated): Likewise.
4177
4178 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
4179
4180         * decl2.c (find_representative_member): Rename to ...
4181         (build_anon_union_vars): New function.
4182         (finish_anon_union): Fix stupidity of previous change.
4183
4184 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4185
4186         * decl.c (grokfndecl): Handle definition of specialization in
4187         friend declaration.
4188
4189         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
4190
4191 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
4192
4193         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
4194         to look for type declarations.
4195         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
4196         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
4197         (finish_member_class_template): Declare.
4198         * decl.c (pushtag): Put member class templates on the
4199         CLASSTYPE_TAGS list, just as for ordinary member classes.
4200         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
4201         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
4202         IDENTIFIER_NAMESPACE_VALUEs. 
4203         * parse.y (component_decl): Move code to ...
4204         * semantics.c (finish_member_class_template): New function.  
4205         Don't put member class templates on the list of components for a
4206         class. 
4207         * parse.c: Regenerated.
4208         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
4209         In fact, don't use DECL_CONTEXT at all here.
4210
4211 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4212
4213         * decl.c (record_unknown_type): New function.
4214         (init_decl_processing): Call it for the unknown and global type
4215         nodes.
4216
4217 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
4218
4219         * decl2.c (find_representative_member): New function.
4220         (finish_anon_union): Use it.
4221
4222         * cp-tree.h (MAIN_NAME_P): New macro.
4223         (DECL_MAIN_P): Likwise.
4224         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
4225         (grokfndecl): Use the new macros.
4226         (grokdeclarator): Likewise.
4227         (start_function): Likewise.
4228         (store_parm_decls): Likewise.
4229         (finsh_function): Likewise.
4230         * friend.c (do_friend): Likewise.
4231         * typeck.c (build_function_call_real): Likewise.
4232         (build_unary_op): Likewise.
4233
4234 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
4235
4236         * decl2.c (start_objects, finish_objects, do_dtors,
4237         do_ctors): Split out from...
4238         (finish_file): ...here.
4239
4240 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
4241
4242         * tree.c (is_overloaded_fn): Don't abort on placeholders from
4243         push_class_decls.
4244
4245 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
4246
4247         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
4248
4249         * error.c (dump_expr): Handle an ARROW_EXPR.
4250
4251 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
4252
4253         * decl.c (saveable_obstack): Declare.
4254         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
4255         declare, if necessary.
4256
4257 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
4258
4259         * call.c (compare_qual): Remove.
4260         (is_subseq): Tweak.
4261         (is_properly_derived_from): New function.
4262         (maybe_handle_ref_bind): Likewise.
4263         (maybe_handle_implicit_object): Likewise.
4264         (compare_ics): Modify substantially to bring into conformance with
4265         the standard.
4266         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
4267         (comp_cv_qualification): Declare.
4268         (comp_cv_qual_signature): Likewise.
4269         * typeck.c (comp_cv_qualification): Likewise.
4270         (comp_cv_qual_signature): Likewise.
4271
4272 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4273
4274         * Makefile.in (parse.o): Depend on toplev.h.
4275
4276         * class.c (typecode_p): Remove prototype and definition.
4277
4278         * cp-tree.h (currently_open_class, is_empty_class, member_p):
4279         Add prototype.
4280
4281         * decl.c (push_overloaded_decl_top_level): Remove prototype and
4282         definition.
4283
4284         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
4285         in call to `cp_thing'.
4286         (cp_warning): Likewise for function pointer `warning'.
4287
4288         * except.c (do_function_call): Remove prototype and definition.
4289         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
4290
4291         * method.c (is_java_type): Add prototype and make it static.
4292
4293         * parse.y: Include toplev.h.
4294
4295         * pt.c (type_unification): Remove unused variable `arg'.
4296         (instantiate_decl): likewise for `save_ti'.
4297
4298         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
4299         
4300 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
4301
4302         * init.c (build_member_call): Handle template_ids.
4303         * parse.y (primary): Add global_scope template_id.
4304
4305 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
4306
4307         * decl2.c (get_sentry): Use end_temporary_allocation.
4308         Don't declare permanent_obstack.
4309
4310 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
4311
4312         * parse.y (.finish_new_placement): New non-terminal.
4313         (unary_expr, new_type_id): Use it.  
4314         * parse.c: Regenerated.
4315         
4316 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
4317
4318         * pt.c (redeclare_class_template): Say where the original definition
4319         of the template-parameter's default argument appeared.
4320
4321 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
4322
4323         * call.c (build_over_call): Tweak empty class handling.
4324
4325         * decl.c (make_typename_type): Use currently_open_class.
4326
4327         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
4328
4329 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
4330
4331         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE 
4332         for a type unless it is one.
4333
4334         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
4335
4336 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
4337
4338         * Makefile.in (program_transform_name, objdir): Define.
4339
4340         * Makefile.in (BISON): Use bison from the build tree if it exists.
4341         (FLEX): Similarly.
4342
4343 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
4344
4345         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
4346
4347         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
4348
4349 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
4350
4351         * call.c (build_scoped_method_call): Likewise.
4352
4353 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
4354
4355         * init.c (build_new_1): Call suspend_momentary around the creation
4356         of values that must be saved for exception handling.
4357         * parse.y (.build_new_placement): New non-terminal.
4358         (unary_expr, new_placement): Use it.
4359         * parse.c: Regenerated.
4360         
4361 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
4362
4363         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
4364         old and new types.
4365
4366         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
4367         canonical type.
4368
4369         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
4370
4371 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
4372
4373         * decl.c (start_decl): Revert problem change.
4374
4375         * Makefile.in (CONFLICTS): Fix.
4376
4377 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
4378
4379         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
4380
4381 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
4382
4383         * class.c (finish_struct_1): Use BINFO_SIZE.
4384
4385         * decl.c (start_decl): Use 'tem'.
4386
4387 Thu May 14 16:30:47 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
4388
4389         * exception.cc: Include eh-common.h.
4390         (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
4391         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
4392         (__cp_push_exception): Initialize eh_info struct as well.
4393         * except.c: Remove local structs and include eh-common.h.
4394         (init_exception_processing): Set language and version codes.
4395         (call_eh_info): add presence of eh_info to runtime description of 
4396         struct cp_eh_info.
4397         (expand_end_eh_spec): call start_catch_block() and end_catch_block().
4398         * semantics.c (finish_try_block): call start_catch_block() and 
4399         end_catch_block().
4400         * parse.y (function_try_block): call start_catch_block() and 
4401         end_catch_block().
4402
4403 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
4404
4405         * typeck.c (original_type): New function.
4406         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
4407         to see if they're actually the same.
4408         * cp-tree.h (original_type): Declare.
4409
4410 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4411
4412         * Makefile.in (lex.o): Depend on output.h.
4413         
4414         * call.c (add_function_candidate): Remove unused variable `cand'.
4415         (add_conv_candidate): Likewise.
4416         (build_builtin_candidate): Likewise.
4417         
4418         * cp-tree.h: Add prototype for `types_overlap_p'.
4419
4420         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
4421
4422         * decl2.c (merge_functions): Remove unused variables `tmp' and
4423         `tempn'.
4424
4425         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
4426         (code_as_string): Likewise.
4427         (language_as_string): Likewise.
4428         (parm_as_string): Likewise.
4429         (op_as_string): Likewise.
4430         (assop_as_string): Likewise.
4431         (cv_as_string): Likewise.
4432
4433         * lex.c: Include output.h.
4434
4435         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
4436
4437         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
4438         ATTRIBUTE_UNUSED.
4439
4440         * tinfo.cc (__class_type_info::dcast): Change the type of variable
4441         `i' from int to size_t.
4442
4443         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
4444         ATTRIBUTE_UNUSED.
4445
4446 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
4447
4448         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
4449         DECL_NAMESPACE_SCOPE_P.
4450         (lang_decl_name): Likewise.
4451         * pt.c (tsubst_friend_function, tsubst): Likewise.
4452         * decl.c (pushdecl, redeclaration_error_message, start_decl, 
4453         cp_finish_decl, start_function): Likewise.
4454         * class.c (finish_struct_1): Likewise.
4455         * call.c (build_over_call): Likewise.
4456         (compare_ics): Use DERIVED_FROM_P.
4457
4458 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
4459
4460         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
4461         * method.c (build_mangled_name): Use it.
4462         (build_decl_overload_real): Likewise.
4463
4464         * error.c (dump_simple_decl): New function, broken out from ...
4465         (dump_decl): Use it.
4466
4467 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
4468
4469         * ptree.c (lang_print_xnode): Add missing `break'.
4470
4471         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
4472
4473         * call.c (add_template_candidate): Adjust for changes to
4474         fn_type_unification. 
4475         (add_template_candidate_real): Likewise.
4476         (add_template_conv_candidate): Likewise.
4477         (build_user_type_conversion_1): Likewise.
4478         (build_new_function_call): Likewise.
4479         (build_object_call): Likewise.
4480         (build_new_op): Likewise.
4481         (build_new_method_call): Likewise.
4482         * class.c (instantiate_type): Likewise.
4483         * cp-tree.h (unification_kind_t): New type.
4484         (fn_type_unification): Adjust prototype.
4485         (type_unificaiton): Likewise.
4486         * pt.c (UNIFY_ALLOW_NONE): New macro.
4487         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
4488         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
4489         (UNIFY_ALLOW_DERIVED): Likewise.
4490         (unify): Change prototype.
4491         (maybe_adjust_types_for_deduction): New function.
4492         (check_cv_quals_for_unify): Likewise.
4493         (determine_specialization): Adjust.
4494         (fn_type_unification): Likewise.
4495         (type_unification): Likewise.
4496         (type_unification_real): Likewise.  Use
4497         maybe_adjust_types_for_deduction.  Fix mishandling of
4498         back-unification of template functions passed as arguments.  Pass
4499         appropriate combination of UNIFY_ALLOW_* to unify.
4500         (unify): Remove unused NTPARMS parameter.  Use
4501         check_cv_quals_for_unify.  Remove bogus code that allowed
4502         too-generous unification in order to adhere more closely to standard.
4503         (get_bindings_real): Adjust.
4504         (get_class_bindings): Likewise.
4505
4506         * method.c (build_overload_identifier): Only use the innermost
4507         template arguments when mangling.
4508         * pt.c (tsubst_template_argument_vector): New function.
4509         (complete_template_args): Deal with the situation where the
4510         extra_args contain more than one level of arguments.
4511         (lookup_template_class): Deal with member template classes, which
4512         may have more than one level of arguments.
4513         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
4514         Improve handling of member template classes.  Use
4515         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
4516         tsubst_template_argument_vector where appropriate.
4517         (regenerate_decl_from_template): Break out from ...
4518         (instantiate_decl): Here.
4519         
4520         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
4521         * parse.h: Regenerated.
4522         * parse.c: Really regenerated.
4523         
4524         * cp-tree.h (finish_unary_op_expr): New function.
4525         (finish_id_expr): Likewise.
4526         (begin_new_placement): Likewise.
4527         (finish_new_placement): Likewise.
4528         (finish_declarator): Likewise.
4529         (finish_translation_unit): Likewise.
4530         (finish_parmlist): Likewise.
4531         (begin_class_definition): Likewise.
4532         (finish_class_definition): Likewise.
4533         (finish_default_args): Likewise.
4534         (finish_inline_definitions): Likewise.
4535         * parse.y (GCC_ASM_KEYWORD): Remove.
4536         (TYPENAME_ELLIPSIS): Likewise.
4537         * parse.c: Regenerated.
4538         Use new functions in semantics.c in the actions for many rules.
4539         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
4540         * hash.h: Regenerated.
4541         * semantics.c (finish_expr_stmt): Allow NULL expr.
4542         (finish_unary_op_expr): New function, containing
4543         code previously in parse.y.
4544         (finish_id_expr): Likewise.
4545         (begin_new_placement): Likewise.
4546         (finish_new_placement): Likewise.
4547         (finish_declarator): Likewise.
4548         (finish_translation_unit): Likewise.
4549         (finish_parmlist): Likewise.
4550         (begin_class_definition): Likewise.
4551         (finish_class_definition): Likewise.
4552         (finish_default_args): Likewise.
4553         (finish_inline_definitions): Likewise.
4554
4555 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
4556
4557         * typeck.c (build_c_cast): Don't decay arrays and functions to
4558         pointer type when converting to a class type.
4559
4560 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
4561
4562         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
4563         (DECL_CLASS_SCOPE_P): Likewise.
4564
4565 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
4566
4567         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
4568         * decl2.c (constructor_name_full): Likewise.
4569
4570 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
4571
4572         * tree.c (mapcar): Add OVERLOAD support.
4573
4574         * init.c (resolve_offset_ref): We must use basetype_path before we
4575         destroy it with a call to convert_pointer_to.
4576
4577 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
4578
4579         * class.c (currently_open_class): New fn.
4580         * decl.c (lookup_name_real): Use it.
4581         * search.c (lookup_field): Likewise.
4582
4583 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4584
4585         * cp-tree.def (OVERLOAD): New node.  
4586         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
4587         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
4588         (NAMESPACE_BINDING): Remove.
4589         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
4590         namespace_binding.
4591         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
4592         Define.
4593         (tree_overload): New struct.
4594         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
4595         (REAL_IDENTIFIER_TYPE_VALUE): Define.
4596         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
4597         (lang_decl_flags): Remove in_namespace.
4598         (lang_decl): Remove chain.
4599         (DECL_CHAIN, DECL_NAMESPACE): Remove.
4600         (flag_honor_std): Declare extern.
4601         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
4602         namespace_binding, set_namespace_binding,
4603         lookup_function_nonclass, cat_namespace_levels,
4604         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
4605         scratch_ovl_cons, ovl_member, build_overload): Declare.
4606         (decl_list_length, get_namespace_id, current_namespace_id,
4607         overloaded_globals_p): Remove.
4608         (lookup_using_namespace, qualified_lookup_using_namespace): Change
4609         return type.
4610         (push_scratch_obstack): New macro.
4611         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
4612         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
4613         convs, fns.
4614         (build_new_function_call): Iterate using OVL_CHAIN.  
4615         Print DECL_NAME in when reporting ambiguities.
4616         (build_object_call): Iterate using OVL_NEXT for fns, convs.
4617         (build_new_op): Call lookup_function_nonclass.  
4618         Iterate using OVL_NEXT.
4619         (build_op_delete_call): Change detection of members.
4620         Do not wrap TREE_LIST around fields and single global functions.
4621         (build_over_call): Don't push a class level if the context is a
4622         namespace.
4623         (build_new_method_call): Iterate using OVL_NEXT.
4624         * class.c (add_method): Chain overloaded members using
4625         build_overload.  Remove copying of method.
4626         (grow_method): When iterating through the obstack, expect OVERLOAD
4627         nodes.  Chain overload members.
4628         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
4629         nodes in call to get_baselinks.
4630         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
4631         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
4632         fdecls that are OVERLOAD nodes.
4633         (validate_lhs): New function.
4634         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
4635         code. Use DECL_NAME in error messages. Split code between global
4636         and member function processing.
4637         * decl.c (global_type_node): New static variable.
4638         (in_std): New global.
4639         (struct binding_level): New field usings.
4640         (resume_binding_level): Assert that we are not in a class.
4641         (toplevel_bindings_p): Just check for namespace_p or
4642         pseudo_global.
4643         (resume_level): Remove.
4644         (find_binding): New function.
4645         (binding_for_name): Call it.
4646         (namespace_binding, set_namespace_binding): New functions.
4647         (push_namespace): Associate binding level with new namespace,
4648         resume_binding_level for existing namespace.  Remove old code.
4649         Fake std by counting.
4650         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
4651         (maybe_push_to_top_level): Save current namespace.
4652         (pop_from_top_level): Restore saved namespace.
4653         (pop_namespace): Call suspend_binding_level.  Remove old code.
4654         (cat_namespace_levels): New function.
4655         (set_identifier_type_value_with_scope): For namespace bindings,
4656         set BINDING_TYPE, and use global_type_node.
4657         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
4658         (identifier_type_value): New function.
4659         (pushtag): If no context, use current_namespace.
4660         (duplicate_decls): Don't process DECL_CHAIN.
4661         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
4662         already set. Never reset it to NULL_TREE.  Lookup global variables
4663         in their namespace.  Push overloaded templates if they are on
4664         namespace level.
4665         (pushdecl_namespace_level): New function.
4666         (pushdecl_top_level): Implement using pushdecl_namespace_level.
4667         (pushdecl_using_decl): New function.
4668         (overloaded_globals_p): Remove.
4669         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
4670         them. Use namespace_binding and set_namespace_value.
4671         (redeclaration_error_message): Complain if the declarations come
4672         from different namespaces.
4673         (lookup_tag): On namespace level, look in the BINDING_TYPE.
4674         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
4675         old code.
4676         (select_decl): New function.
4677         (lookup_name_real): Call it for qualified and unqualified lookup.
4678         Pass tree_bindings from the stack.
4679         If prefer_type is 1, also accept namespaces.
4680         (lookup_function_nonclass): New function.
4681         (init_decl_processing): Set the binding level of the global
4682         namespace to global_binding_level.
4683         Build a proper type list for __builtin_apply.
4684         Initialize std_node to "fake std" if flag_honor_std is set.
4685         Initialize global_type_node.
4686         Allocated bad_alloc in namespace std if flag_honor_std.
4687         (define_function): Set the DECL_CONTEXT to the current_namespace.
4688         (start_decl): A namespace is not considered as a context here.  If
4689         the DECL_CONTEXT is a namespace, push the decl.
4690         (cp_finish_decl): Check for namespaces used as initializers.
4691         (grokfndecl): Add namespace parameter.  Remove processing of
4692         DECL_CHAIN.
4693         (grokvardecl): Add namespace parameter.
4694         (grokdeclarator): Process SCOPEs that are namespaces.  For
4695         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
4696         (start_function): Check for contexts that are namespaces.  
4697         Set context for declarations that have not been pushed.
4698         (store_parm_decls): Check for ::main only.
4699         (finish_function): Likewise.
4700         (start_method): Check for contexts that are namespaces.
4701         (start_method): Remove DECL_CHAIN processing.
4702         * decl2.c (flag_honor_std): Declare.
4703         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
4704         (decl_namespace_list): New static global.
4705         (grok_x_components): Ignore namespaces as type contexts.
4706         (check_classfn): Expect OVERLOAD nodes.
4707         (grokfield): Remove DECL_CHAIN processing.
4708         (finish_file): Call cat_namespace_levels.
4709         (merge_functions): New function.
4710         (ambiguous_decl): Rewrite.
4711         (lookup_using_namespace): Produce tree_bindings.
4712         (qualified_lookup_using_namespace): Likewise.
4713         (set_decl_namespace, decl_namespace, current_decl_namespace,
4714         push_decl_namespace, pop_decl_namespace): New functions.
4715         (arg_lookup): New struct.
4716         (add_function, arg_assoc_namespace, arg_assoc_class,
4717         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
4718         New functions.
4719         (get_namespace_id, current_namespace_id): Remove.
4720         (do_toplevel_using_decl): Rewrite.
4721         (do_class_using_decl): Complain about namespace qualifiers.
4722         (do_using_directive): Sorry if not on namespace level.  Complain
4723         about unknown namespaces.
4724         * error.c (dump_aggr_type): Check for namespace contexts.
4725         * except.c (init_exception_processing): Push terminate into std.
4726         * friend.c (is_friend): A namespace is not a context, here.
4727         * init.c (expand_member_init): Remove DECL_CHAIN processing.
4728         (build_offset_ref): Process OVERLOAD nodes.
4729         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
4730         * lex.c (identifier_type): Loop using OVL_CHAIN.
4731         (see_typename): Set looking_for_typename to 2.
4732         (real_yylex): Likewise. 
4733         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
4734         (do_scoped_id): Expect OVERLOAD nodes.
4735         Change calling convention for qualified_lookup_using_namespace.
4736         (build_lang_decl): Don't set in_namespace anymore.
4737         * method.c (typevec_size): New global.
4738         (build_overload_nested_name): Return if global_namespace.
4739         Otherwise, always expect a declaration context.
4740         (build_qualified_name): Likewise.
4741         Make sure we don't write beyond typevec_size.
4742         (build_decl_overload_real): Likewise.
4743         Allocate one extra slot for the namespace.
4744         (hack_identifier): Mark code dead.
4745         Process OVERLOAD and NAMESPACE_DECL nodes.
4746         * parse.y (program): Pop namespaces until in global namespace.
4747         (extdef): In a using-declaration, don't discard the identifier if
4748         there is no declaration.
4749         (left_curly): Ignore type contexts which are namespaces.
4750         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
4751         used as scope.
4752         * pt.c (template_class_depth): Expect types to be namespaces.
4753         (determine_specialization): Simplify by expecting OVERLOAD nodes.
4754         (push_template_decl): Push into namespace level.
4755         Reset ctx if it is a namespace.
4756         Set DECL_CONTEXT to current_namespace if not set already.
4757         Ignore real contexts that are namespaces.
4758         (mangle_class_name_for_template): Skip global_namespace.
4759         Mangle other namepaces as declarations.
4760         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
4761         (lookup_template_class): Push into namespace of context.
4762         If the context is a namespace, set it to global_namespace.
4763         Use id_context for mangling.
4764         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
4765         (tsubst_friend_function): Ignore namespace contexts.
4766         Push into namespace level.
4767         (tsubst): Handle NAMESPACE_DECL nodes.
4768         Remove DECL_CHAIN processing.
4769         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
4770         * ptree.c (print_lang_identifier): Print bindings.
4771         (lang_print_xnode): Print OVERLOAD nodes.
4772         * rtti.c (init_rtti_processing): Push type_info into std.
4773         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
4774         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
4775         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
4776         lookup_fnfields_here): Likewise.
4777         Process all nodes, instead of going through TREE_CHAIN.
4778         * sig.c (build_signature_pointer_or_reference_type): Set context
4779         to global_namespace.
4780         (build_signature_table_constructor): Expect OVERLOAD nodes.
4781         * spew.c (yylex): Save old setting of looking_for_typename.
4782         * tree.c (decl_list_length): Remove.
4783         (binding_init): New function.
4784         (count_functions): Rewrite.
4785         (is_overloaded_fn): Expect OVERLOAD nodes.
4786         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
4787         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
4788         ovl_member): New functions.
4789         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
4790         (type_unknown_p): Likewise.
4791         (require_instantiated_type): Likewise.
4792         (build_component_ref): Declare code dead.
4793         (build_x_function_call): Create and expect OVERLOAD nodes.
4794         (build_function_call_real): Check for ::main only.
4795         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
4796         (convert_for_assignment): Check for TREE_LIST before accessing
4797         TREE_VALUE.
4798         * decl.c (duplicate_decls): Check for namespace bindings instead
4799         of global bindings.
4800         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
4801         lookup_name_current_level, start_decl, xref_tag, 
4802         finish_enum): Likewise.
4803         * init.c (build_offset_ref): Likewise.
4804         * search.c (lookup_field): Likewise.
4805         (lookup_fnfields): Likewise.
4806         (dfs_debug_mark): Likewise.
4807         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
4808         (poplevel_class, pop_from_top_level): Likewise.
4809         * decl2.c (finish_method): Likewise.
4810         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
4811         * decl.c (record_builtin_type): Likewise.
4812         (init_decl_processing, grokfndecl): Likewise.
4813         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
4814         (make_lang_type): Likewise.
4815         * parse.y (make_thunk): Likewise.
4816         * pt.c (tsubst): Likewise.
4817         * tree.c (debug_binfo): Likewise.
4818         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, 
4819         tinfo2.cc, inc/new.h: Add std qualifications.
4820         * inc/new: Wrap with namespace std if __HONOR_STD.
4821         * inc/typeinfo: Likewise.
4822
4823 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
4824
4825         * call.c (build_user_type_conversion_1): Handle second_conv 
4826         properly for templates.
4827
4828 Thu May  7 17:09:25 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
4829
4830         * method.c (build_decl_overload_real): Set TREE_USED flag to
4831         zero for build_type_variants nodes as well.
4832
4833 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
4834
4835         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
4836
4837 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
4838
4839         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
4840         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
4841         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, 
4842         xref.o): Add toplev.h dependencies.
4843
4844 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
4845
4846         * errfn.c (cp_error, cp_warning): Remove declarations for
4847         error and warning respectively.
4848
4849 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4850
4851         * error.c: Convert to using ctype macros defined in system.h.
4852         * method.c: Likewise.
4853         * xref.c: Likewise.
4854         * lex.c: Likewise.  Also remove redundant system header stuff.
4855
4856 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
4857
4858         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, 
4859         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, 
4860         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, 
4861         xref.c: Add include of toplev.h.
4862
4863 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
4864
4865         * tree.c (perm_manip): Also regenerate the RTL of an extern.
4866         (copy_to_permanent): Use end_temporary_allocation.
4867
4868 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
4869
4870         * init.c (expand_vec_init): The initialization of each array
4871         element is a full-expression.
4872
4873 Tue May  5 18:24:13 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
4874
4875         * method.c (build_mangled_name): Add a call to build_type_variant 
4876         to get the right type.
4877
4878 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
4879
4880         * Makefile.in: Add .SUFFIXES.
4881
4882         * cp-tree.def: Remove NAMESPACE_DECL.
4883
4884 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
4885
4886         * call.c (build_over_call): Do evaluate arg even if it has empty 
4887         class type.
4888         * decl.c (start_function): Don't push a member function.
4889
4890 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
4891
4892         * Makefile.in (g++FAQ.info): Put -o option before input file.
4893
4894 Thu Apr 30 13:05:33 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
4895
4896         * gxxint.texi: Add info for squangling codes K and B.
4897
4898 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
4899
4900         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
4901         the expression in templates.
4902         (finish_stmt_expr): Likewise.
4903
4904 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
4905
4906         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
4907
4908 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
4909
4910         * decl.c (maybe_push_to_top_level): Always clear
4911         current_template_parms and processing_template_decl.
4912         (pushtag): Remove check of current_class_type and some comments,
4913         since maybe_push_to_top_level no longer creates confusion.
4914
4915 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
4916
4917         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
4918         (DECL_CLASS_TEMPLATE_P): Likewise.
4919         (DECL_PRIMARY_TEMPLATE): Likewise.
4920         (PRIMARY_TEMPLATE_P): Use it.
4921         (push_template_decl_real): New function.
4922         (redeclare_class_template): Take new template parameters as
4923         input. 
4924         (is_specialization_of): New function.
4925         (comp_template_args): Declare.
4926         * decl.c (pushtag): Handle friend template classes.
4927         (xref_tag): Likewise.  Use new calling convention for
4928         redeclare_class_template.
4929         * decl2.c (grok_x_components): Handle friend templates.
4930         * friend.c (is_friend): Use is_specialization_of where
4931         appropriate.  Deal with friend class templates.
4932         (make_friend_class): Let a class template be friends with itself.
4933         * pt.c (comp_template_args): Remove declaration.
4934         (tsubst_friend_class): New function.
4935         (push_template_decl_real): New function.
4936         (push_template_decl): Use it.
4937         (redeclare_class_template): Adjust for new calling convention.
4938         (comp_template_args): Give it external linkage.
4939         (instantiate_class_type): Use tsubst_friend_class to deal
4940         with friend templates.
4941         * typeck.c (comptypes): Use comp_template_args, rather than
4942         expanding it inline.
4943         * parse.y (component_decl): Handle a nested template type 
4944         like other component type declarations.
4945
4946         * pt.c (check_explicit_specialization): Handle overloaded
4947         constructors correctly.
4948
4949         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
4950         (lookup_template_class): Use it.
4951
4952 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
4953
4954         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
4955         * cp-tree.h: Add WRAPPER support.
4956         * call.c (add_candidate): Split out from add_*_candidate fns.
4957         (build_over_call): Take the candidate instead of function and args.
4958         Enforce access control here.  Emit overload warnings here.
4959         (add_warning): New fn.
4960         (joust): Add WARN parm.  If not set, call add_warning instead of
4961         printing a warning.  Reenable some warnings.
4962         (tourney): Pass it.
4963         (convert_like): Adjust.
4964         (build_new_op): Adjust.
4965         (build_new_function_call): Adjust.
4966         (build_user_type_conversion_1): Adjust.
4967         (USER_CONV_FN): Adjust.
4968         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, 
4969         build_int_wrapper): New fns.
4970
4971 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
4972
4973         * pt.c (unify): Fix typo in previous change.
4974
4975 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
4976
4977         * error.c (dump_type_real): Declare canonical_name.
4978
4979         * typeck.c (comp_target_types): Fix PMFs.
4980
4981 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
4982
4983         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
4984         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
4985         TEMPLATE_DECL.
4986
4987          * pt.c (tsubst): Decrease the template-level of
4988          TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
4989          TEMPLATE_PARM_INDEX.
4990          (template_decl_level): New function.
4991          (unify): Make sure to record unifications for template
4992          parameters, even when the parameters exactly match the arguments.
4993          Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
4994          TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
4995          aren't from the level we're currently working on.
4996
4997 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
4998
4999         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
5000
5001         * decl2.c (check_member_template): Set DECL_IGNORED for member
5002         class templates, too.
5003
5004         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
5005
5006 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5007
5008         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
5009
5010 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
5011
5012         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
5013         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
5014         (init_decl_processing): Handle TI types.
5015         * typeck.c (unsigned_type, signed_type): Handle TI types.
5016
5017 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
5018
5019         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
5020         New local added_libraries.  Increment count when add library to
5021         arglist.
5022
5023 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
5024
5025         * cp-tree.h (type_as_string_real): New function.
5026         * pt.c (mangle_class_name_for_template): Use it.
5027         * error.c (dump_aggr_type): Change prototype.
5028         (dump_type_prefix): Likewise.
5029         (dump_type_suffix): Likewise.
5030         (dump_type_real): Convert from dump_type.  If desired, the
5031         "canonica" name of a typedef, i.e., the name of the underlying
5032         type, can be printed.
5033         (dump_type): Call dump_type_real.
5034
5035 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
5036
5037         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
5038
5039         * typeck.c (comp_target_types): Tweak pedantic case.
5040         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
5041         Return -1 or 1 instead of 1 or 2.
5042         (compparms): Remove STRICT handling.
5043         (convert_for_assignment): Fix handling of pmfs.
5044
5045 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
5046
5047         * typeck.c (comp_target_types): Handle references like pointers.
5048         (comp_target_parms): Note that return code from comp_target_types
5049         can be negative to indicate failure.
5050
5051 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5052
5053         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
5054         which requires a working target compiler to build.
5055
5056 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
5057
5058         * tree.c (avoid_overlap): Add prototype.
5059
5060         * spew.c (num_tokens): Add prototype.
5061         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
5062
5063         * search.c (dfs_check_overlap): Add prototype.
5064         (dfs_no_overlap_yet): Likewise.
5065
5066         * pt.c (original_template): Add prototype.
5067         (inline_needs_template_parms): Likewise.
5068         (push_inline_template_parms_recursive): Likewise.
5069         (retrieve_specialization, register_specialization): Likewise.
5070         (print_candidates, reduce_template_parm_level): Likewise.
5071         (build_template_decl, mark_template_parm): Likewise.
5072         (tsubst_friend_function, get_bindings_real): Likewise.
5073
5074         * method.c (start_squangling): Add prototype.
5075         (end_squangling, check_ktype, issue_ktype): Likewise.
5076         (build_overloaded_scope_ref, check_btype): Likewise.
5077         (build_mangled_template_parm_index): Likewise.
5078
5079         * lex.c (init_cpp_parse): Add prototype.
5080         (handle_cp_pragma, handle_sysv_pragma): Likewise.
5081         (reduce_cmp, token_cmp): Likewise.
5082
5083         * except.c (call_eh_info): Add prototype.
5084         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
5085         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
5086
5087         * decl2.c (is_namespace_ancestor): Add prototype.
5088         (namespace_ancestor, add_using_namespace): Likewise.
5089         (ambiguous_decl): Likewise.
5090
5091         * decl.c (indent): Add prototype.
5092
5093         * call.c (add_template_candidate_real): Add prototype.
5094
5095 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
5096
5097         * decl2.c (build_expr_from_tree): Just return a PMF.
5098
5099 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
5100
5101         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
5102         when doing initializations.
5103
5104         * pt.c (unify): Use comptypes to compare type args.
5105
5106 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
5107
5108         * decl.c (duplicate_decls): Fix check for when it's safe to free
5109         the new decl.
5110
5111         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
5112         to type_as_string.
5113
5114 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
5115
5116         * pt.c (build_template_parm_index): Add prototype.
5117
5118         * search.c (my_tree_cons): Don't clear words outside the
5119         newly allocated node.
5120
5121 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
5122
5123         * lex.c (init_parse): Now returns char* containing the filename.
5124
5125 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
5126                           Jeff Law   <law@cygnus.com>
5127
5128         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
5129         than a pointer.
5130
5131 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5132
5133         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
5134
5135 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5136
5137         * decl.c (duplicate_decls): Don't warn for redundant decls if
5138         friend: let add_friend take care of it.
5139
5140 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
5141
5142         * sig.c (build_signature_pointer_constructor): Don't set
5143         TREE_HAS_CONSTRUCTOR for a signature pointer.
5144         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
5145         * init.c (resolve_offset_ref): Warn about implicit & on pmfs 
5146         here, too.
5147         * typeck.c (build_unary_op): Only allow taking the address of a 
5148         real constructor.
5149         * typeck2.c (digest_init): Simplify.
5150         (store_init_value): Don't pedwarn about using { } for pmfs.
5151
5152 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
5153
5154         * cp-tree.h (start_decl):  Update prototype.
5155         * decl.c (start_decl):  Like the C version, new parameters
5156         for the attributes.  Call cplus_decl_attributes here,
5157         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
5158         (grokdeclarator):  Pass NULL for new start_decl arguments.
5159         * pt.c (tsubst_expr):  Likewise.
5160         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
5161         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
5162         * lex.c (build_lang_decl): Add lang_name_java.
5163         * class.c (push_lang_context): Add lang_name_java.
5164         * method.c (build_mangled_name): Check for is_java_type.
5165
5166 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5167
5168         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
5169         * call.c (build_scoped_method_call): Check for TREE_CODE for
5170         VOID_TYPE instead of type ==  void_type_node.
5171         (build_method_call): Ditto.
5172         * decl.c (lookup_name_real): Ditto.
5173         (grokdeclarator): Ditto.
5174         (start_decl): Ditto.
5175         (grokparms): Ditto.
5176         (start_function): Ditto.
5177         (finish_function): Ditto.
5178         (start_method): Ditto.
5179
5180 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
5181
5182         * lex.c (finput): New variable.
5183         (init_cpp_parse):  Renamed from init_parse.
5184         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
5185         (finish_parse): New function.
5186         * cp-tree.h (init_lex, init_parse): Remove declarations.
5187
5188 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
5189
5190         * call.c (build_call): Still evaluate the actual argument.
5191         * class.c (is_empty_class): Update for -fnew-abi.
5192
5193         * decl2.c: -fnew-abi implies -fsquangle.
5194
5195         * method.c (do_build_assign_ref): Don't do anything to copy
5196         an empty class.
5197         (do_build_copy_constructor): Likewise.
5198         * call.c (build_over_call): Likewise.
5199
5200 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
5201
5202         * tree.c (avoid_overlap): Return a value.
5203
5204 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
5205
5206         * method.c (check_btype): Add missing argument to xrealloc.
5207         (check_ktype): Likewise.
5208
5209 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
5210
5211         Implement empty base optimization.
5212         * class.c (finish_struct_1): Add vbase fields earlier.  Set 
5213         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
5214         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
5215         (types_overlap_p): New fn.
5216         * tree.c (avoid_overlap): New fn.
5217         (build_base_fields): Use it to avoid overlapping empty bases.
5218         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
5219
5220         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
5221
5222         Re-implement allocation of base class subobjects.
5223         * tree.c (unshare_base_binfos): New fn.
5224         (layout_basetypes): Use it.  Now handles offsets of both virtual and
5225         non-virtual bases, after layout_type.
5226         (layout_vbasetypes): Remove.
5227         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
5228         (build_vbase_pointer_fields): Split out from old layout_basetypes.
5229         * class.c (finish_base_struct): Lose offset handling code.
5230         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
5231         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
5232         * cp-tree.h: Adjust.
5233
5234 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
5235
5236         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
5237         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
5238         * class.c (duplicate_tag_error): Likewise.
5239         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
5240         * tree.c (layout_vbasetypes): Update from layout_record, remove
5241         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
5242         (layout_basetypes): Likewise.
5243
5244 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
5245
5246         * class.c, Make sure system.h is included just after config.h.
5247         Delete lingering stdio and errno references too.
5248         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
5249         
5250 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
5251
5252         * friend.c (is_friend): Fix access control for local classes.
5253
5254         * class.c (is_empty_class): New fn.
5255         * call.c (build_call): Don't pass empty class objects to a function.
5256
5257 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
5258
5259         * call.c (build_over_call): Do name resolution for default
5260         arguments of function templates in the scope of the templates.
5261
5262 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
5263
5264         * call.c: Include system.h.  Remove includes, declarations and
5265         defines provided by system.h.
5266         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
5267         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
5268         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
5269         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
5270         * typeck2.c, xref.c: Likewise.
5271         * Makefile.in: Dependencies updated as appropriate.
5272         * Make-lang.in: Likewise.
5273
5274 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
5275
5276         * pt.c (fn_type_unification): Allow incomplete unification without 
5277         an immediate error message.
5278
5279 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
5280
5281         * tree.c (member_p): New fn.
5282         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
5283         initializing class members.
5284
5285         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
5286         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
5287
5288         * call.c (build_method_call): Handle non-scoped destructors, too.
5289         * pt.c (tsubst_copy): Likewise.
5290
5291         * pt.c (print_template_context): Split out...
5292         (push_tinst_level): ...from here.
5293
5294         * friend.c (is_friend): Don't pass a type to decl_function_context.
5295
5296         * typeck.c (convert_for_initialization): Always hand off
5297         conversions to class type.
5298
5299 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
5300
5301         * friend.c (is_friend): Local classes have the same access as the
5302         enclosing function.
5303
5304 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
5305
5306         * typeck.c (expand_target_expr): Delete dead function.
5307
5308         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
5309
5310         * repo.c (save_string): Delete dead function.
5311
5312         * method.c (thunk_printable_name): Delete dead function.
5313
5314         * lex.c (yynextch): Delete dead function.
5315
5316         * expr.c (tree_extract_aggr_init): #if 0 out.
5317
5318         * except.c (do_unwind): Delete dead function.
5319         (easy_expand_asm): Likewise.
5320
5321         * cvt.c (build_conversion_type_1): Delete dead function.
5322
5323         * cp-tree.h (push_expression_obstack): Declare.
5324
5325         * call.c (source_type): #if 0 out.
5326
5327         * class.c (alter_access): Remove unused label.  Add braces
5328         around empty else clause.
5329
5330         * lex.c (yyprint): Fix argument to printf.
5331
5332 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
5333
5334         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
5335
5336         * pt.c (instantiate_class_template): Make sure template
5337         arguments are permanent.
5338         * init.c (resolve_offset_ref): Don't go looking around in
5339         template types.
5340
5341         * semantics.c: Add routines to handle expressions, and some
5342         declaration processing.
5343         * parse.y: Use them.
5344         (current_class_depth): Move declaration to cp-tree.h.
5345         * parse.c: Regenerated.
5346         * cp-tree.h: Use them.
5347         (current_class_depth): Declare.
5348         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
5349
5350 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
5351
5352         * error.c (dump_decl): Be a bit more explicit with template
5353         type arguments, when verbose.
5354         
5355 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
5356
5357         * inc/exception: Reorder closing braces.
5358
5359 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
5360
5361         * pt.c (redeclare_class_template): New function.
5362         * cp_tree.h (redeclare_class_template): Declare it.
5363         * decl.c (xref_tag): Use it.
5364
5365 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
5366
5367         * call.c (build_over_call): Check IS_AGGR_TYPE, not 
5368         TYPE_LANG_SPECIFIC.
5369         * typeck.c (convert_arguments): Likewise.
5370
5371         * decl.c (grokdeclarator): Remove const and volatile from type after
5372         setting constp and volatilep.
5373
5374         * class.c (finish_struct_1): Don't warn about bool bitfield larger
5375         than one bit.
5376
5377 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
5378
5379         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
5380
5381 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
5382
5383         * call.c (build_object_call): Complain about ambiguous operator(),
5384         rather that crashing.
5385         (build_new_op): Likewise.
5386         (build_op_delete_call): Likewise.
5387
5388 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
5389
5390         * cvt.c (perform_qualification_conversions): Use comp_target_types
5391         instead of comp_ptr_ttypes.
5392
5393 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
5394
5395         * cp-tree.h (enforce_access): Declare.
5396         * call.c (enforce_access): Make it extern, not static.
5397         * class.c (alter_access): Use enforce_access; modify code for ISO
5398         compliance, rather than ARM rules.
5399
5400 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5401
5402         * cp-tree.h: Fix typo.
5403
5404 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
5405
5406         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
5407         if (aggregate_value_p (type)).
5408
5409         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
5410
5411 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
5412
5413         * tree.c (mapcar): When dealing with a DECL, use it's constant
5414         value, if any.
5415         * pt.c (lookup_template_class): Don't mangle the names of template
5416         classes whose arguments are unknown.
5417
5418         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
5419
5420 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
5421
5422         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
5423
5424 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
5425
5426         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
5427         boolean_type_node to 1.
5428
5429 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
5430
5431         * error.c (dump_expr): Remove unused variable `l'.
5432
5433         * pt.c (for_each_template_parm): New function, created by
5434         converting uses_template_parms.
5435         (tree_fn_t): New typedef.
5436         (uses_template_parms): Use it.
5437         (mark_template_parm): New function.
5438         (push_template_decl): Check that the argument list of a partial
5439         specialization uses all the template parameters.
5440
5441         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
5442         with it; we might want it for debugging.
5443         * cp-tree.h (type_unification): Change interface.
5444         * class.c (finish_struct_1): Skip nested template types, just like
5445         ordinary nested types.
5446         (instantiate_type): Use new interface to type_unification.
5447         * lex.c (init_lex): Add __sz as opname for sizeof.
5448         * method.c (build_overload_scope_ref): New function.
5449         (build_overload_int): Handle complex expressions.  Set
5450         numeric_output_need_bar if necessary.
5451         (build_overload_value): Handle non-PARM_DECL nodes; this
5452         routine is now used by build_overload_int.  Remove some
5453         assignments to numeric_output_need_bar.  Use
5454         build_overload_scope_ref.
5455         (build_qualified_name): Note that some template mangled names end
5456         with digits, and set numeric_output_need_bar appropriately.  Use
5457         build_underscore_int.
5458         * pt.c (unify): Change interface.
5459         (type_unification_real): Likewise.
5460         (determine_specialization): Use new interfaces.
5461         (tsubst): Deal gracefully with situations in which the argument
5462         vector is not fully filled.
5463         (fn_type_unification): Use new interfaces.
5464         (type_unification): Likewise.  Remove NOP_EXPR hack.
5465         (type_unification_real): Likewise.
5466         (unify): Likewise.  Deal with unification of complex expresions.
5467
5468 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
5469
5470         * pt.c (complete_template_args): Initialize skip properly.
5471
5472         * decl.c (make_typename_type): Revert.
5473         (make_implicit_typename): Remove.
5474         (lookup_name_real): Don't call it.  Call lookup_field if we see a
5475         TYPE_DECL from a template base.
5476         * search.c (lookup_field): Do implicit typename stuff.
5477
5478 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
5479                           Geoff Noer    <noer@cygnus.com>
5480
5481         * Makefile.in: Various fixes for building cygwin32 native toolchains.
5482         * Make-lang.in: Likewise.
5483
5484 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5485
5486         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
5487
5488 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
5489
5490         * decl.c (make_implicit_typename): Rewrite removed code.
5491         (make_typename_type): Call it if the type we look up comes from
5492         a base that uses template parms.
5493
5494         * pt.c (complete_template_args): Rewrite.
5495         (tsubst, FUNCTION_DECL): Use it.
5496
5497 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
5498
5499         * semantics.c (finish_asm_stmt): Fix combine strings. Call
5500         c_expand_asm_operands () if output_operands, input_operands or
5501         clobbers is not NULL_TREE.
5502
5503 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5504
5505         * pt.c (complete_template_args): New function.
5506         (get_bindings): Deal with specializations of function templates
5507         with return type containing parameters from outer class 
5508         templates.
5509         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
5510         substitute arguments and compose a new type.
5511
5512 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
5513
5514         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
5515         FUNCTION_DECLs.
5516
5517 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
5518
5519         * decl.c (make_implicit_typename): Lose useless code.
5520
5521         * call.c (standard_conversion): Handle A* -> const A* properly.
5522
5523         * pt.c (get_bindings_real): Rename from get_bindings.  Add 
5524         check_rettype parm.
5525         (get_bindings): Pass 1.
5526         (get_bindings_overload): Pass 0.
5527
5528 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
5529
5530         * pt.c (check_explicit_specialization): When reverting a static
5531         member function, also remove the `this' parameter from
5532         last_function_parms.
5533
5534 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
5535
5536         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
5537         a function context.
5538
5539         * decl.c (store_bindings): Use free_binding_vecs.
5540         (pop_from_top_level): Likewise.
5541
5542 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
5543
5544         * decl.c (make_implicit_typename): Only change the type of a 
5545         TYPENAME_TYPE.
5546
5547 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
5548
5549         * semantics.c: New file, containing routines to perform the
5550         semantic phase of parsing.
5551         * parse.y: Use it.
5552         * pt.c (tsubst_expr): Likewise.
5553         * cp-tree.h: Declare the various functions in semantics.c.
5554         Provide macros to access _STMT tree nodes.
5555         * cp-tree.def: Add ASM_STMT tree node.
5556         * Makefile.in, Make-lang.in: Add dependencies on and for
5557         semantics.c.
5558         
5559 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
5560
5561         * pt.c (push_template_decl): Only check primary templates.
5562
5563         * pt.c (check_explicit_specialization): Complain about default args
5564         in explicit specialization.
5565
5566         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a 
5567         constructor_declarator.
5568
5569 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
5570
5571         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
5572         has no overloaded operator ->.
5573
5574         * call.c (build_field_call): Don't crash when presented with a
5575         field that is actually a nested type.
5576
5577         * decl.c (pushtag): Deal with friend class injection in local
5578         classes.
5579
5580         * call.c (build_object_call): Don't crash if OBJ is a
5581         pointer-to-member-function.
5582
5583 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
5584
5585         * pt.c (push_template_decl): Complain about template with C linkage,
5586         anonymous template class.
5587
5588 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
5589
5590         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
5591         * search.c: Likewise.
5592
5593         * lex.c (do_pending_defargs): Only call 
5594         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
5595
5596         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
5597
5598 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
5599
5600         * parse.y: Deal with CONSTRUCTORS in new_initializers.
5601
5602 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
5603
5604         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
5605         closely mimics the behavior in parse.y.
5606         (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
5607         into a compound statement.
5608         
5609 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
5610
5611         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
5612         * pt.c (inline_needs_template_parms): New fn.
5613         (original_template): New fn.
5614         (push_inline_template_parms_recursive): New fn.
5615         (maybe_begin_member_template_processing): Use them.
5616         (maybe_end_member_template_processing): Likewise.
5617         (is_member_or_friend_template): Rename to is_member_template.
5618         Member functions of local classes are never member templates.
5619
5620 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5621
5622         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
5623         added in the class scope to catch redefinition error.
5624
5625         * pt.c (reduce_template_parm_level): Also copy 
5626         the DECL_TEMPLATE_PARMS field.
5627
5628 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
5629
5630         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
5631         reduced-level template type parameter.
5632
5633 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5634
5635         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
5636         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
5637         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
5638         * decl.c (duplicate_decls): Propagate it.
5639         * typeck2.c (abstract_virtuals_error): Use two loops to emit
5640         abstract virtual functions and virtual functions which need a
5641         final overrider separately.
5642         
5643 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5644
5645         * lang-specs.h: Properly put brackets around array elements in 
5646         initializer.
5647
5648         * typeck.c (build_binary_op_nodefault): Correctly place parens around
5649         && and || in expression.
5650
5651 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5652
5653         * call.c (default_parm_conversions): Remove prototype definition.
5654         (build_method_call): Remove unused variable result.
5655
5656         * cvt.c (ocp_convert): Remove unused variable conversion.
5657
5658         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
5659
5660         * except.c (do_unwind): #if 0 definition of unused variables fcall
5661         and next_pc.
5662
5663         * expr.c (extract_scalar_init): #if 0 prototype and function 
5664         definition.
5665
5666         * init.c (expand_aggr_init_1): Remove unused variable init_type.
5667         (build_new_1): Remove unused variable t.
5668
5669         * pt.c (instantiate_class_template): Remove unused variable newtag;
5670         cast called function return value to void.
5671         (do_decl_instantiation): Remove unused variables name and fn.
5672
5673         * tree.c (get_type_decl): Add default return to shut up compiler from
5674         complaining control reaches end of non-void function.
5675
5676         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
5677
5678 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5679
5680         * call.c (default_parm_conversions): Remove prototype definition.
5681         (build_method_call): Remove unused variable result.
5682         (build_over_call): Add default case in enumeration switch.
5683
5684 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5685
5686         * decl2.c (lang_decode_option): Change j's type to size_t.
5687
5688         * tree.c (layout_vbasetypes): record_align and desired_align are of
5689         type unsigned int; const_size and nonvirtual_const_size likewise.
5690
5691 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
5692
5693         * parse.y (new_initializer): Make sure all initializers are
5694         lists.
5695
5696 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
5697
5698         * decl2.c (import_export_decl): Mark tinfo functions for
5699         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
5700
5701 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
5702
5703         * method.c: Fix typo.
5704
5705 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5706
5707         * method.c: Include "system.h" to get stdlib.h, stdio.h,
5708         ctype.h, string.h, etc.
5709         (issue_nrepeats): Add default case in enumeration switch.
5710         (check_btype): Likewise.
5711         (process_overload_item): Likewise.
5712          
5713         * Makefile.in (method.o): Depend on system.h.
5714
5715 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5716
5717         * lex.c (do_scoped_id): Fix parenthesizing.
5718
5719 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
5720
5721         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
5722         FLAG_RTTI is unset, initialize type info machinery and continue
5723         with FLAG_RTTI enabled.
5724         (get_typeid): Ditto.
5725
5726 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
5727
5728         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
5729         from B.
5730
5731 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
5732
5733         * pt.c (finish_member_template_decl): Deal more gracefully with
5734         invalid declarations.
5735
5736 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
5737
5738         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
5739         cp-tree.h: Clean up more old overloading code, old RTTI code, and
5740         some formatting quirks.
5741
5742         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
5743         method.c, pt.c, ptree.c, typeck.c: Remove support for 
5744         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
5745         * class.h: Remove.
5746         * Makefile.in: Adjust.
5747
5748         * pt.c (unify): Don't allow reduced cv-quals when strict.
5749
5750         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
5751         *type_unification* and unify.
5752
5753 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
5754
5755         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
5756         (nested_name_specifier): And add it before this use.
5757         (typename_sub0): And this use.  Also add use without the keyword.
5758         (typename_sub1): Likewise.
5759         * pt.c (instantiate_class_template): Don't actually instantiate 
5760         anything if our type uses template parms.
5761
5762 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
5763
5764         * decl.c (start_function): Don't call temporary_allocation for a
5765         nested function.
5766
5767 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
5768
5769         * pt.c (instantiate_class_template): Don't mess with friends if
5770         our type uses template parms.
5771
5772 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
5773
5774         * parse.y (nested_name_specifier): Use explicit_template_type.
5775         (typename_sub): Allow a template_type, an explicit_template_type,
5776         or an implicit template type at the end.
5777         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
5778         * decl.c (make_typename_type): Handle template-id where the name
5779         is a TEMPLATE_DECL.
5780         * call.c (build_scoped_method_call): Handle member template 
5781         destructor call.
5782         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member 
5783         destructor is represented by the type.
5784
5785         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
5786         * parse.y (nested_name_specifier): Add 'template' case.
5787         (explicit_template_type): New rule.
5788         (typename_sub): Use it.
5789         * decl.c (make_typename_type): Handle getting a template-id for NAME.
5790         * pt.c (tsubst): Likewise.
5791
5792 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
5793
5794         * pt.c (add_to_template_args): Fix thinko.
5795         (instantiate_class_template): Call it later.
5796
5797         * pt.c (get_class_bindings): Add outer_args parm.
5798         (most_specialized_class): Likewise.
5799         (instantiate_class_template): Pass it.
5800         (more_specialized_class): Likewise.
5801         (lookup_template_class): Get context from template if none
5802         was specified.
5803         (finish_member_template_decl): Don't do anything with a
5804         partial specialization.
5805         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
5806         AGGREGATE_TYPE_P.
5807         * class.c (finish_struct): Member class templates have already been
5808         checked for name clashes.
5809         * decl.c (pushdecl_with_scope): Handle pushing at class level.
5810
5811 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
5812
5813         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
5814         (tsubst, *_PARM): Support multiple levels of template classes.
5815         (instantiate_class_template): Look up the pattern from the
5816         original template.
5817         (lookup_template_class): Handle getting a template for d1.
5818         (push_template_decl): Correct setting of 'primary'.
5819         (reduce_template_parm_level): Add 'levels' parm.
5820         (finish_member_template_decl): Support member class templates.
5821         (template_class_depth): Handle multiple levels.
5822         * parse.y (component_decl_1, fn.def2): Remove member template case.
5823         (component_decl): Add member template cases.
5824         * decl2.c (check_member_template): We now handle member template
5825         classes.
5826         * decl.c (pushtag): Handle member templates.
5827         * method.c (do_inline_function_hair): Don't touch
5828         IDENTIFIER_GLOBAL_VALUE.
5829         * init.c (build_offset_ref): If name isn't an identifier, just 
5830         return it.
5831         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
5832
5833         * typeck.c (get_delta_difference): Do adjust for conversions to
5834         and from virtual base.
5835
5836 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
5837
5838         * typeck.c (get_delta_difference): Give hard error for conversion
5839         from virtual base.
5840
5841         * cp-tree.h: Tweak formatting.
5842
5843 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
5844
5845         * decl.c (push_namespace): Handle redeclaration error.
5846
5847         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
5848         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
5849         (NAMESPACE_BINDING): New macro.
5850         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
5851         * *.c: Use them.
5852
5853         * pt.c (push_template_decl): Use innermost_args.
5854
5855         * decl.c (get_unique_name): Tweak from earlier in the name.
5856
5857 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5858
5859         * cp-tree.def: Add CPLUS_BINDING node.
5860         * cp-tree.h (tree_binding): new struct
5861         (BINDING_SCOPE, BINDING_VALUE): new macros
5862         (current_namespace, global_namespace): declare extern
5863         (struct lang_decl_flags): new field in_namespace
5864         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
5865         (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
5866         (TREE_INDIRECT_USING): new macro
5867         * decl2.c (current_namespace, global_namespace): Declare.  The
5868         value is a NAMESPACE_DECL now, not a TREE_LIST.
5869         (is_namespace_ancestor, namespace_ancestor):new static functions.
5870         (add_using_namespace, ambiguous_decl): likewise.
5871         (lookup_using_namespace): new support function for lookup_name.
5872         (qualified_lookup_using_namespace): new support function for
5873         do_scoped_id and lookup_namespace_name
5874         (get_namespace_id): mark as obsolete.
5875         (current_namespace_id): Likewise.
5876         (do_namespace_alias): Implement.
5877         (do_using_directive): Implement as call to add_using_namespace.
5878         * decl.c (binding_for_name): new function.
5879         (push_namespace, pop_namespace): implement.
5880         (push_decl): don't install a FUNCTION_DECL in the global branch.
5881         (lookup_namespace_name): implement using qualified lookup.
5882         (lookup_name_real): For global scoping, lookup in
5883         global_namespace. For namespace scoping, lookup in given
5884         namespace. For unscoped lookup, iterate over namespace,
5885         considering using directives.
5886         (init_decl_processing): initialize global_namespace.
5887         (grokvardecl): Build assembler name as static name for globals.
5888         (grokdeclarator): Remove old namespace mangling.
5889         (xref_tag): When installing a global binding for the
5890         tag, make sure we have an identifier.
5891         * method.c (build_overload_nested_name): mangle namespaces.
5892         (build_qualified_name): Likewise.
5893         (build_decl_overload_real): Likewise.
5894         * lex.c (build_lang_decl): set namespace for new declaration to
5895         current_namespace.
5896         (do_scoped_id): find global names in global or current
5897         namespace, or using qualified namespace lookup, depending on
5898         context.
5899         * init.c (build_member_call): When scope is namespace, use
5900         build_x_function_call instead.
5901         (build_offset_ref): When scope is namespace, collapse processing
5902         to lookup_namespace_name instead.
5903         * error.c (dump_decl): Support NAMESPACE_DECL.
5904         * decl.c (pushdecl): Bind globals to current namespace.
5905         (push_overloaded_decl): Likewise.
5906         (lookup_tag): Likewise.
5907         (lookup_name_current_level): Likewise.
5908         (xref_tag): Likewise.
5909         (start_function): Likewise.
5910         * lex.c (do_identifier): Likewise.
5911         (identifier_typedecl_value): Likewise.
5912         (real_yylex): Likewise.
5913         * method.c (do_inline_function_hair): Likewise.
5914         * parse.y (unscoped): Likewise.
5915         * pt.c (check_explicit_specialization): Likewise.
5916         (lookup_template_class): Likewise.
5917         * rtti.c (call_void_fn): Likewise.
5918         * sig.c (build_sigtable): Likewise.
5919         * ptree.c (lang_print_xnode): New function.
5920
5921 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
5922
5923         * pt.c (instantiate_class_template): Don't instantiate if pedantic
5924         and the args use template parms.
5925
5926         * pt.c (push_tinst_level): If the instantiaton uses template parms,
5927         fail silently.
5928         * decl.c (xref_basetypes): Do call complete_type for basetypes
5929         that involve template parameters.
5930
5931 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
5932
5933         * typeck2.c (process_init_constructor): Fix labeled init check.
5934
5935 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
5936
5937         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
5938         argument to tsubst and friends.
5939
5940         * pt.c (tsubst, FUNCTION_DECL): Tidy.
5941
5942         * typeck.c (build_x_function_call): Handle static member function
5943         templates like non-templates.  Handle friend templates like normal
5944         function templates.
5945         * pt.c (tsubst, *_PARM): Don't use orig_level.
5946         (get_bindings): Don't call add_to_template_args.
5947         (instantiate_template): Likewise.
5948         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
5949         * ptree.c (print_lang_type): Print index/level for template parms.
5950
5951 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
5952
5953         * Make-lang.in (cc1plus): Note that cc1plus depends on
5954         cp/cp-tree.h and cp/cp-tree.def.
5955         
5956         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
5957         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
5958         position in a template parameter list.
5959         * cp-tree.h (template_parm_index): New structure, used as the tree
5960         structure for a TEMPLATE_PARM_INDEX.
5961         (TEMPLATE_PARM_IDX): New macro.
5962         (TEMPLATE_PARM_LEVEL): Likewise.
5963         (TEMPLATE_PARM_DESCENDANTS): Likewise.
5964         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
5965         (TEMPLATE_PARM_DECL): Likewise.
5966         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
5967         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
5968         (TEMPLATE_TYPE_DECL): Likewise.
5969         (TEMPLATE_CONST_IDX): Remove.
5970         (TEMPLATE_CONST_LEVEL): Likewise.
5971         (TEMPLATE_CONST_SET_INFO): Likewise.
5972         (TEMPLATE_TYPE_SET_INFO): Likewise.
5973         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
5974         node.
5975         (TEMPLATE_TYPE_LEVEL): Likewise.
5976         * decl.c (decls_match): Call comp_template_parms, rather than
5977         expanding it inline.
5978         (duplicate_decls): If two template declarations are being merged,
5979         then their TEMPLATE_INFOs should be merged as well.
5980         (grokfndecl): Save template-id information when declaring a friend
5981         with explicit template arguments.  Pass arguments to
5982         check_explicit_specialization via correct convention; at some
5983         point check_explicit_specialization changed, but these call-sites
5984         did not.
5985         (grokdeclarator): Tidy up slightly.
5986         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
5987         two template functions with the same DECL_ASSEMBLER_NAME the same,
5988         since the names are not yet mangled.
5989         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
5990         TEMPLATE_CONST_PARM. 
5991         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
5992         decl for a non-type parameter, rather than printing `<tparm ...>'.
5993         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
5994         (do_friend): Deal with template friends.
5995         * lex.c (do_pending_inlines): Call
5996         maybe_begin_member_template_processing, rather than
5997         conditionally calling begin_member_template_processing.
5998         (process_next_inline): Likewise.  Call
5999         maybe_end_member_template_processing, rather than
6000         conditionally calling end_member_template_processing.
6001         (do_pending_defargs): Likewise.
6002         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
6003         TEMPLATE_CONST_PARM.  
6004         * method.c (build_mangled_template_parm_index): New function.
6005         (build_overload_value): Use it.
6006         (build_overload_name): Likewise.
6007         * pt.c (finish_member_template_decl): Allow friend declarations.
6008         (template_class_depth): New function.
6009         (is_member_template): Rename, and modify, to become...
6010         (is_member_or_friend_template): New function.
6011         (end_member_template_processing): Rename, and modify, to become...
6012         (maybe_end_member_template_processing).
6013         (build_template_parm_index): New function.
6014         (reduce_template_parm_level): New function.
6015         (process_template_parm): Modify to use build_template_parm_index.
6016         (push_template_decl): Deal with friend templates.
6017         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
6018         TEMPLATE_CONST_PARM.
6019         (tsubst_friend_function): New function.
6020         (instantiate_class_template): Generate the DECL_FRIENDLIST
6021         for a new instantiation by using tsubst_friend_function rather
6022         than just tsubst.
6023         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
6024         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
6025         appropriate new macros.  Use reduce_template_parm_level to
6026         generate lower-level template parameters.  Handle tsubst'ing into
6027         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
6028         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
6029         templates.  Similarly for the template parameters for a new
6030         template.
6031         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
6032         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
6033         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.  
6034         (get_bindings): Call add_to_template_args if necessary.
6035         (instantiate_decl): Handle instantiations of friend templates.
6036         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
6037         TEMPLATE_TYPE_PARM as a list of fields; it's not!
6038         * spew.c (yylex): Do a little manual constant propogation to
6039         clarify the code.
6040         
6041 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
6042
6043         * error.c: Include sys/types.h.
6044
6045 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
6046
6047         * method.c (build_mangled_name): Start CPP directives in column zero.
6048
6049 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
6050
6051         * typeck2.c (process_init_constructor): Sorry about non-trivial
6052         labeled initializers.
6053         * parse.y (initlist): Reenable labeled initializers.
6054
6055 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6056
6057         * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
6058         all callers changed.  Rely on the new parameter instead of arg 
6059         being a TREE_LIST when determine whether we are working inside
6060         template template parameter.  Clean up is_type test.
6061         
6062 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
6063
6064         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
6065         * typeck2.c (initializer_constant_valid_p): Allow conversions
6066         between pointers and refrerences.
6067
6068 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
6069
6070         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
6071         if pedantic || warn_pointer_arith.
6072
6073 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6074
6075         * pt.c (unify): Handle TEMPLATE_DECL.
6076
6077 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
6078
6079         * cp-tree.h (strip_attrs): Remove decl.
6080
6081 1998-02-18  Doug Evans  <devans@cygnus.com>
6082
6083         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
6084         Update olddecl's attributes too.
6085         (strip_attrs): Remove function.
6086         * typeck.c (common_type): Call merge_machine_type_attributes.
6087
6088 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
6089
6090         * parse.y (initdcl0_innards): New grammar symbol.
6091         (nomods_initdecls, nomods_initdcl0): Change type from itype to
6092         none, since the resulting value is never used.
6093         (parse_decl): New function.
6094         (datadef): Remove redundant actions.
6095         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
6096         * parse.c: Regenerated.
6097         
6098 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
6099
6100         * parse.y (simple_stmt): Use getdecls() to check for decl.
6101
6102 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
6103
6104         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New 
6105         macros.
6106         (c++.install-common): Install c++filt properly as native or as cross
6107         variant.
6108         (c++.uninstall): Add c++filt.
6109
6110 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
6111
6112         * call.c (standard_conversion): Fix multi-level ptr conversions.
6113
6114 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
6115
6116         * init.c (build_new): Propagate error_mark_node up.
6117
6118 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
6119
6120         * parse.y (simple_stmt): If the condition isn't a declaration, 
6121         start the controlled block after the test.
6122
6123 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6124
6125         * call.c (build_over_call): Convert builtin abs, labs and fabs to
6126         tree-codes.
6127         * decl.c (init_decl_processing): Reenable abs, labs and fabs as
6128         builtins.
6129
6130 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
6131
6132         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
6133
6134 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
6135
6136         * cp-tree.h: Add access_protected_virtual_node.
6137         * class.c (init_class_processing): Initialize it.
6138         * decl.c (xref_basetypes): Use it.
6139         * parse.y (base_class_access_list): Likewise.
6140
6141         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
6142         (c++.install-common): Install c++filt.
6143
6144 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6145
6146         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
6147
6148 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
6149
6150         * call.c (reference_binding): Use comptypes when comparing
6151         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
6152
6153 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
6154
6155         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
6156         (really_overloaded_fn): Move check here from is_overloaded_fn. 
6157         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
6158
6159 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
6160
6161         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
6162         conversions.
6163
6164 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
6165
6166         * cp-tree.h (push_template_decl): Return the decl passed in, or an
6167         equivalent duplicate.
6168         * decl.c (pushtag): Use the return value from push_template_decl.
6169         (duplicate_decls): When duplicating a template declaration, merge
6170         the DECL_TEMPLATE_RESULTs as well.
6171         (make_implicit_typename): Don't try to dive into typename types to
6172         find a context for making a new implicit typename.
6173         (start_decl): Use the return value from push_template_decl.
6174         (grokdeclarator): Complain about declarations list `const operator
6175         int'.  Since we don't correctly handle in-class initializations of
6176         non-static data members, complain about this (now illegal)
6177         practice.  Issue an error for initializations of non-const statics
6178         since that is illegal as well, and since we don't handle that case
6179         correctly either.
6180         (start_function): Use the return value from push_template_decl.
6181         (start_method): Likewise.
6182         * decl2.c (grokfield): Likewise.  Since the change to
6183         grokdeclarator ensures that all initialized fields are in fact
6184         static, remove a redundant test for TREE_PUBLIC.
6185         * parse.y (initlist): Disable labeled initializers since they do
6186         not work as per the documentation, and since they do not use the
6187         same syntax as the C front end.
6188         * pt.c (push_template_decl): Return the decl passed in, or an
6189         equivalent duplicate.
6190         (lookup_template_class): When searching in a nested context,
6191         use the right arguments.
6192         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
6193         * typeck.c (build_component_ref): Assign the correct type to the
6194         result of build_vfn_ref.
6195         
6196 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
6197
6198         * pt.c (convert_nontype_argument): Fix typo.
6199         (check_explicit_specialization): Allow old-style specialization
6200         of class template members.
6201
6202 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
6203                           Manfred Hollstein  <manfred@s-direktnet.de>
6204
6205         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
6206         when deciding to override DECL_ASSEMBLER_NAME.
6207
6208 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
6209
6210         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
6211         * cp-tree.h (flag_do_squangling): Add declaration.
6212         * lang-options.h: Add -fsquangle and -fno-squangle.
6213         * method.c: Add macros and static variables for squangling.
6214         (build_overload_name): Rename to build_mangled_name, add logic for B 
6215         compression, and split into process_modifiers and 
6216         process_overload_item.
6217         (process_modifiers): New function, to handle constant, reference, 
6218         and pointer types. 
6219         (process_overload_item): New function, handles issue of type codes.
6220         (build_overload_name): New function, start squangling and call 
6221         build_mangled_name.
6222         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
6223         (start_squangling): New function to initialize squangling structs.
6224         (end_squangling): New function to destroy squangling structs.
6225         (nrepeats): Rename variable to Nrepeats.
6226         (issue_nrepeats): New function for issuing 'n' type repeats.
6227         (check_ktype): New function to check for type K name compression.
6228         (build_overload_nested_name): Add a check for K name compression.
6229         (build_qualified_name): Add a check for K name compression and don't
6230         use DECL_ASSEMBLER_NAME when squangling is on.
6231         (check_btype): New function, checks for B type compression.
6232         (build_static_name, build_decl_overload_real): Initiate squangling.
6233         (build_typename_overload, build_overload_with_type): Initiate 
6234         squangling
6235
6236 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
6237
6238         * method.c (make_thunk): Avoid name buffer overflow.
6239
6240 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
6241
6242         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
6243         don't define them yet.
6244
6245         * parse.y (nomods_initdcl0): Add constructor_declarator case.
6246
6247 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6248
6249         * config-lang.in (diff_excludes): Use basename only.
6250
6251 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
6252
6253         * tinfo2.cc: Add tinfo for signed char.
6254
6255 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
6256
6257         * search.c (compute_access): Handle protected constructors in derived
6258         classes as accessible.
6259
6260 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
6261
6262         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
6263         Call convert_from_reference sooner.
6264
6265 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
6266
6267         * cvt.c (ocp_convert): Obtain the constant values from constant
6268         decls even if the destination type is the same as the type of the
6269         decl. 
6270
6271         * decl2.c (finish_file): Make sure that static inlines with
6272         definitions are not marked DECL_EXTERNAL before returning.
6273
6274 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
6275
6276         * decl.c: Lose arg_looking_for_template.
6277         (lookup_name_real): Likewise.
6278         * parse.y: Lose processing_template_arg, template_arg1
6279         (primary): Likewise.
6280         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
6281
6282 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6283
6284         * error.c (dump_decl): Fix type of default arguments for template
6285         template parameters and nontype template parameters.
6286         * parse.y (template_parm): Handle invalid default template 
6287         template arguments here.
6288
6289         * parse.y (template_parm): Use template_arg instead of PTYPENAME 
6290         for default template template argument.
6291         * pt.c (coerce_template_parms): Merge default template argument 
6292         codes.  Can treat RECORD_TYPE as template name if it is implicitly
6293         created.  Fix argument index in error message.
6294         * typeck.c (comptypes): Merge template argument comparison codes in 
6295         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
6296
6297 Tue Jan  6 01:42:44 1998  Mumit Khan <khan@xraylith.wisc.edu>
6298
6299         * lex.c (file_name_nondirectory): Also check for '/'.
6300
6301 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
6302
6303         * parse.y (primary): Deal with statement-expressions in
6304         templates. 
6305         * pt.c (tsubst_copy): Handle BIND_EXPR.
6306         * tree.c (mapcar): Likewise.
6307
6308         * call.c (add_template_candidate_real): Pass extra parameter to
6309         fn_type_unification. 
6310         * cp-tree.h (fn_type_unification): Add parameter.
6311         * pt.c (fn_type_unification): Add additional parameter to deal with
6312         static member functions.
6313         (get_bindings): Deal with static member functions.
6314
6315         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.      
6316         (revert_static_member_fn): Declare.
6317         * decl.c (revert_static_member_fn): Remove declaration.  Change
6318         linkage from internal to external.
6319         (cp_finish_decl): Deal with virtual functions in classes local to
6320         template functions.
6321         * decl2.c (finish_file): Don't forget to emit increment/decrement
6322         expressions in initializers for file-scope variables.
6323         * parse.y (typename_sub2): If the typename doesn't names a
6324         template, rather than a type, issue an error message.
6325         * pt.c (check_explicit_specialization): Handle specializations of
6326         static member functions.
6327         (coerce_template_parms): Handle offset references to lists of
6328         member functions.
6329         * search.c (note_debug_info_needed): Don't crash when handed a
6330         type which is being defined.
6331         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
6332         that can happen with some illegal code.
6333
6334 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6335
6336         * call.c (user_harshness): Initialize `code' to 0.
6337         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
6338         (null_ptr_cst_p): Add parentheses around && within ||.
6339         (standard_conversion): Likewise.
6340         (z_candidate): Likewise.
6341         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
6342         (build_object_call): Likewise for `mem_args'.
6343         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
6344         default case in enumeration switch.
6345
6346         * class.c (build_vtable_entry): Add explicit braces to avoid
6347         ambiguous `else'.
6348         (build_class_init_list): Likewise.
6349         (finish_struct_1): Initialize `width' to 0.
6350         (instantiate_type): Initialize `name' to NULL_TREE.  Add
6351         explicit braces to avoid ambiguous `else'.
6352
6353         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
6354         `else'.
6355
6356         * decl.c (grok_reference_init): Eliminate unused parameter, all
6357         callers changed.
6358         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
6359         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
6360         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
6361         (grokdeclarator): Add parentheses around && within ||.  Add
6362         explicit braces to avoid ambiguous `else'.
6363         (grokparms): Initialize `type' to NULL_TREE.
6364         (xref_tag): Remove unused label `just_return'.
6365         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
6366         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
6367         (hack_incomplete_structures): Add parentheses around assignment
6368         used as truth value.
6369
6370         * decl2.c (coerce_delete_type): Hide definition of `e3'.
6371
6372         * error.c: Include <stdlib.h>.
6373         (dump_expr): Change the type of `i' to size_t.  Remove unused
6374         label `error'. 
6375
6376         * except.c (init_exception_processing): Remove unused variable `d'.
6377         (expand_throw): Likewise for `label'.
6378
6379         * friend.c (add_friends): Add explicit braces to avoid ambiguous
6380         `else'.
6381
6382         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
6383         (sort_base_init): Likewise for `binfo'.
6384         (expand_member_init): Likewise for `rval'.
6385         (build_member_call): Add parentheses around assignment used as
6386         truth value.
6387         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
6388         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
6389         `old_immediate_size_expand' to 0.
6390         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
6391         (build_vec_delete_1): Remove unused variable `block'.
6392         (expand_vec_init): Initialize `itype' to NULL_TREE.
6393
6394         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
6395         declaration of `index' and `rindex' with autoconf macros.
6396         (reinit_parse_for_expr): Remove unused variables
6397         `look_for_semicolon' and `look_for_lbrac'.
6398         (cons_up_default_function): Initialize `args' to NULL_TREE.
6399         (readescape): Initialize `firstdig' to 0.
6400         (real_yylex): Add parentheses around assignment used as truth value. 
6401
6402         * method.c: Include <strings.h> if we don't have <string.h>.
6403         Protect declaration of `index' with autoconf macro.
6404
6405         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
6406         Initialize `type' to NULL_TREE.
6407         (structsp): Remove unused variable `id'.
6408
6409         * pt.c (coerce_template_parms): Add explicit braces to avoid
6410         ambiguous `else'.
6411         (lookup_template_class): Initialize `template' to NULL_TREE.
6412         (instantiate_class_template): Remove unused variable `name' and `e'.
6413         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
6414         (do_poplevel): Initialize `saved_warn_unused' to 0.
6415         (type_unification): Remove unused varable `parm'.
6416         (unify): Likewise for `j'.
6417
6418         * repo.c (init_repo): Add parentheses around assignment used as
6419         truth value.
6420         (finish_repo): Remove unused varable `p'.
6421         
6422         * search.c (get_binfo): Initiize `type' to NULL_TREE.
6423         (get_base_distance): Likewise.
6424         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
6425         and `new_v' to NULL_TREE.
6426         (lookup_fnfields): Likewise for `rval_binfo_h'.
6427         (breadth_first_search): Add parentheses around assignment used as
6428         truth value.
6429         (get_template_base): Initialize `type' to NULL_TREE.
6430
6431         * sig.c (append_signature_fields): Initialize `last_mfptr' to
6432         NULL_TREE.
6433         (build_signature_table_constructor): Likewise for
6434         `last_rhs_field', `pfn' and `vt_off'.
6435         (build_sigtable): Likewise for `init'.
6436
6437         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
6438         (propagate_binfo_offsets): Likewise for `delta'.
6439         (hash_tree_cons): Initialize hashcode to 0.
6440         (can_free): Likewise for `size'.
6441         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
6442         
6443         * typeck.c (convert_sequence): Hide prototype.
6444         (common_type): Add explicit braces to avoid ambiguous `else'.
6445         (comp_target_types): Likewise.
6446         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
6447         (build_function_call_real): Add explicit braces to avoid ambiguous
6448         `else'.
6449         (convert_arguments): Initialize `called_thing' to 0.
6450         (convert_for_initialization): Initialize `savew' and `savee' to 0.
6451
6452         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
6453         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
6454         (build_x_arrow): Likewise for `last_rval'.
6455
6456         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
6457
6458 Sun Feb  1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
6459
6460         * decl.c (init_decl_processing): Use set_sizetype.
6461         * decl2.c (sizetype): Don't declare.
6462         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
6463         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
6464         (build_component_addr, unary_complex_lvalue): Likewise.
6465         * rtti.c (expand_class_desc): Likewise.
6466         * class.c (get_vfield_offset): Likewise.
6467
6468 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
6469
6470         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
6471         early to avoid bogus error.  Handle overloaded function
6472         names provided as template arguments correctly.
6473         (coerce_template_parms): Don't mishandle overloaded functions when
6474         dealing with template template parameters.
6475         (lookup_template_class): Issue an error message, rather than
6476         crashing, when the TYPE_DECL provided is not a template type.
6477
6478 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
6479
6480         * class.c (instantiate_type): Don't just return a known type if
6481         it's wrong.
6482
6483 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
6484
6485         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
6486         since that code could never be reached.
6487         
6488         * error.c (dump_decl): Avoid aborting in the midst of printing an
6489         error message about an illegal template declaration.
6490
6491         * parse.y (structsp): Print an error message, rather than crashing,
6492         when a class-head does not name a class.
6493
6494         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
6495         template arguments as a g++ extension.
6496         
6497         * cp-tree.def (ALIGNOF_EXPR): New tree code.
6498         * decl2.c (grok_alignof): If processing_template_decl, just store
6499         the expression.
6500         * typeck.c (c_alignof): Likewise.
6501         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
6502         * error.c (dump_expr): Likewise.
6503         * pt.c (tsubst_copy): Likewise.
6504         * tree.c (cp_tree_equal): Likewise.
6505         * pt.c (uses_template_parms): Correctly determine whether or not a
6506         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
6507         folding can be done.
6508         
6509         * cp-tree.h (grok_enum_decls): Remove type parameter.
6510         * decl.c (grok_enum_decls): Likewise.
6511         * decl2.c (grok_x_components): Call grok_enum_decls
6512         unconditionally, since it will do nothing if there is no
6513         current_local_enum.  Use the new calling sequence.
6514         * pt.c (tsubst_enum): Use the new calling sequence for
6515         grok_enum_decls.
6516
6517         * decl.c (start_function): Make member functions of local classes
6518         in extern inline functions have comdat linkage here...
6519         (grokdeclarator): Rather than here.
6520         
6521 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
6522
6523         * pt.c (convert_nontype_argument): Use decl_constant_value.
6524
6525 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
6526
6527         * call.c (add_template_candidate_real): New function.
6528         (add_template_candidate): Use it.
6529         (add_template_conv_candidate): Likewise.
6530         (joust): Pass extra argument to more_specialized.
6531         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
6532         (is_local_class): Remove.
6533         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
6534         * cp-tree.h (is_local_class): Remove.
6535         (perform_array_to_pointer_conversion): Likewise.
6536         (finish_member_template_decl): Add.
6537         (check_explicit_specialization): Return a tree, not an int.
6538         (more_specialized): Take additional argument.
6539         (get_bindings): Likewise.
6540         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
6541         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6542         (perform_array_to_pointer_conversion): Remove.
6543         * decl.c (saved_scope): Add processing_specialization,
6544         processing_explicit_instantiation fields.
6545         (maybe_push_to_top_level): Save them.
6546         (pop_from_top_level): Restore them.
6547         (grokfndecl): Use new return value from
6548         check_explicit_specialization. 
6549         (start_decl): Don't check flag_guiding_decls before pushing
6550         decls. 
6551         (cp_finish_decl): Remove previous (bogus) change.
6552         (grok_declarator): Use decl_function_context rather than
6553         is_local_class. 
6554         * decl2.c (finish_file): Pass extra argument to get_bindings.
6555         (build_expr_from_tree): Let build_x_component_ref check 
6556         validity of arguments rather than doing it here.
6557         * lex.c (cons_up_default_function): Remove code fooling with
6558         processing_specialization, processing_explicit_instantiation
6559         flags, as that is now done in {maybe_push_top,pop_from}_top_level. 
6560         * method.c (build_overload_identifier): Mangle local classes in
6561         template functions correctly.
6562         * parse.y (finish_member_template_decl): Move to pt.c.
6563         * pt.c (finish_member_template_decl): Moved here from parse.y.
6564         (print_candidates): New function.
6565         (determine_specialization): Change interface.  Properly look for
6566         most specialized versions of template candidates.
6567         (check_explicit_specialization): Fully process explicit
6568         instantiations. 
6569         (push_template_decl): Avoid looking at CLASSTYPE fields in
6570         FUNCTION_DECLS. 
6571         (determine_overloaded_function): Remove.
6572         (convert_nontype_argument): Change name from
6573         convert_nontype_parameter.  Use determine_overloaded_function
6574         instead of instantiate_type.
6575         (mangle_class_name_for_template): Handle type contexts as well as
6576         function contexts.
6577         (classtype_mangled_name): Likewise.
6578         (lookup_template_class): Likewise.
6579         (tsubst): Likewise.
6580         (more_specialized): Take explict template arguments as a
6581         parameter. 
6582         (most_specialized): Likewise.
6583         (get_bindings): Likewise.  Check that return types match before
6584         proclaiming a function a match.
6585         (do_decl_instantiation): Remove code searching for function to
6586         instantiate; that is now done in check_explicit_specialization.
6587         (add_maybe_template): Pass extra argument to get_bindings.
6588         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
6589         implementation.
6590         * typeck.c (build_component_ref): Check for invalid arguments.
6591
6592 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
6593
6594         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that 
6595         return_target and call_target are equivalent.
6596
6597         * pt.c (type_unification_real): Just accept function parms that
6598         don't use any template parms.
6599
6600 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
6601
6602         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
6603         unset DECL_NOT_REALLY_EXTERN.
6604
6605         * parse.y (typename_sub*): Fix std::.
6606
6607 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
6608
6609         * error.c (dump_decl): Fix type default template args.
6610         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
6611
6612 Fri Jan 23 18:34:37 1998  Mumit Khan <khan@xraylith.wisc.edu>
6613
6614         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
6615         (file_name_nondirectory): Use.
6616
6617 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6618
6619         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
6620         that are not really present.  Substitute default arguments in 
6621         template template arguments.  Correctly convert TEMPLATE_DECL to 
6622         TEMPLATE_TEMPLATE_PARM.
6623         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM 
6624         are no longer treated specially here.
6625         * parse.y (template_template_parm): Fix copy error.
6626         * decl.c (grokdeclarator): Warn about missing `typename' for nested
6627         type created from template template parameters.
6628         * parse.y (bad_parm): Likewise
6629
6630         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
6631         (push_nested_class): Likewise.
6632         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
6633         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
6634         (copy_template_template_parm): Declare.
6635         * decl.c (arg_looking_for_template): New variable.
6636         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
6637         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
6638         node if arg_looking_for_template is nonzero.
6639         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
6640         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
6641         (grokdeclarator): Handle TEMPLATE_DECL.
6642         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
6643         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
6644         (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
6645         (dump_decl): Handle unnamed template type parameters.
6646         Handle template template parameters.
6647         (dump_function_name): Handle template template parameters.
6648         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): 
6649         Handle TEMPLATE_TEMPLATE_PARM.
6650         * method.c (build_template_template_parm_names): New function.
6651         (build_template_parm_names): Handle TEMPLATE_DECL.
6652         (build_overload_nested_name, build_overload_name): 
6653         Handle TEMPLATE_TEMPLATE_PARM.
6654         * parse.y (maybe_identifier): New nonterminal.
6655         (template_type_parm): Use it.
6656         (template_template_parm, template_arg1): New nonterminal.
6657         (template_parm): Add template_template_parm rules.
6658         (template_arg): Set processing_template_arg.
6659         (template_arg1): Rules moved from template_arg.
6660         (primary, nonnested_type): Set arg_looking_for_template if we are
6661         processing template arguments.
6662         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
6663         (process_template_parm): Handle template template parameters.
6664         (coerce_template_parms, comp_template_args): Likewise.
6665         (mangle_class_name_for_template, lookup_template_class): Likewise.
6666         (uses_template_parms): Handle TEMPLATE_DECL and 
6667         TEMPLATE_TEMPLATE_PARM.
6668         (current_template_args): Handle TEMPLATE_DECL.
6669         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
6670         * search.c (dfs_walk, dfs_record_inheritance): 
6671         Handle TEMPLATE_TEMPLATE_PARM.
6672         * tree.c (copy_template_template_parm): New function.
6673         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
6674         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
6675
6676 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
6677
6678         * decl.c (start_decl): Don't allow duplicate definitions of static
6679         data members.
6680
6681         * call.c (build_user_type_conversion_1): Handle user-defined
6682         template conversion operators correctly.
6683
6684         * decl2.c (build_expr_from_tree): Issue an error message if the
6685         object in a COMPONENT_REF is a TEMPLATE_DECL.
6686         
6687         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
6688         
6689         * class.c (is_local_class): New function.
6690         * cp-tree.h (is_local_class): Declare it.
6691         (last_tree): Likewise.
6692         (begin_tree): Likewise.
6693         (end_tree): Likewise.
6694         (lookup_template_class): Change prototype.
6695         * decl.c (cp_finish_decl): Check for NULL where necesary.
6696         Consider FUNCTION_DECLS to declare objects with top-level binding,
6697         when calling make_decl_rtl.
6698         (grokdeclarator): Give members of local classes internal linkage.
6699         (start_function): Remove declaration of last_tree.
6700         (finish_function): Set flag_keep_inline_functions around call to
6701         rest_of_compilation if we are processing a member function in a
6702         local class.
6703         (start_method): Call push_template_decl for member functions of
6704         local classes in template functions.
6705         * decl2.c (import_export_decl): Don't give external linkage to
6706         instantiations of templates with internal linkage.
6707         * parse.y (last_tree): Remove declaration.
6708         (template_type): Pass extra parameter to lookup_template_class.
6709         (self_template_type): Likewise.
6710         (structsp): Move call to reset_specialization into left_curly.
6711         (left_curly): Call reset_specialization, and begin_tree.
6712         * pt.c (saved_trees): New variable.
6713         (mangle_class_name_for_template): Change prototype.  Use
6714         additional function context to name local classes in templates
6715         correctly. 
6716         (classtype_mangled_name): Pass the context.
6717         (push_template_decl): Handle local classes and templates, and
6718         member functions for such classes.
6719         (convert_nontype_parameter): Fix handling of pointer-to-member
6720         constants. 
6721         (lookup_template_class): Handle local classes in templates.
6722         (tsubst): Likewise.  Don't assume that template instantiations
6723         have external linkage; pay attention to the template declaration. 
6724         (mark_decl_instantiated): Likewise.
6725         (begin_tree): New function.
6726         (end_tree): Likewise.
6727         
6728         * decl.c (xref_basetypes): Don't call complete_type for basetypes
6729         that involve template parameters; that can lead to infinite
6730         recursion unnecessarily.
6731
6732         * pt.c (register_specialization): Do not register specializations
6733         that aren't ready to be registered yet.
6734         (check_explicit_specialization): Handle explicit specialization of
6735         constructors and destructors.
6736         (build_template_decl): New function.
6737         (push_template_delc): Handle out-of-class specializations of
6738         member templates.
6739         
6740         * pt.c (check_explicit_specialization): Set up the template
6741         information before registering the specialization.
6742         (coerce_template_parms): Fix thinko.
6743         (tsubst): Handle specializations of member templates correctly.
6744
6745         * class.c (finish_struct_methods): Remove calls to
6746         check_explicit_specialization from here.
6747         (finish_struct): And insert them here.
6748         * cp-tree.h (perform_qualification_conversions): New function.
6749         (perform_array_to_pointer_conversion): Likewise.
6750         (begin_explicit_instantiation): Likewise.
6751         (end_explicit_instantiation): Likewise.
6752         (determine_specialization): Renamed from
6753         determine_explicit_specialization. 
6754         (comp_template_parms): New function.
6755         (processing_explicit_instantiation): New variable.
6756         * cvt.c (perform_qualification_conversions): New function.
6757         (perform_array_to_pointer_conversion): Likewise.
6758         * decl.c (duplicate_decls): Don't consider template functions
6759         alike unless they have the same parameters.  Refine handling of
6760         instantiation/specialization mismatches.
6761         (start_decl): Don't call pushdecl for template specializations,
6762         since they don't affect overloading.
6763         (start_function): Likewise
6764         (grokfndecl): Call check_explicit_specialization a little later.
6765         Don't call duplicate_decls for memberm template specializations.
6766         (grokdeclarator): Don't update template_count for classes that are
6767         themselves specializations.  Remove use of `2' as parameter to
6768         grokfndecl since that value isn't used.
6769         * lex.c (cons_up_default_function): Save and restore
6770         processing_explicit_instantiation around calls to grokfield.
6771         * parse.y (finish_member_template_decl): New function.
6772         (component_decl_1): Use it.
6773         (fn.def2): Likewise.
6774         (template_arg_list_opt): New nonterminal.       
6775         (template_type): Use it.
6776         (self_template_type): Likewise.
6777         (template_id): Likewise.
6778         (object_template_id): Likewise.
6779         (notype_template_declarator): Likwise.
6780         (begin_explicit_instantiation): Likewise.
6781         (end_explicit_instantiation): Likewise.
6782         (explicit_instantiation): Use them.
6783         * pt.c (coerce_template_parms): Add parameters.
6784         (processing_explicit_instantiation): New variable.
6785         (convert_nontype_parameter): New function.
6786         (determine_overloaded_function): Likewise.
6787         (begin_explicit_instantiation): Likewise.
6788         (end_explicit_instantiation): Likewise.
6789         (retrieve_specialization): Likewise.
6790         (register_specialization): Likewise.
6791         (processing_explicit_specialization): Removed.
6792         (determine_specialization): Handle specializations of member
6793         functions of template class instantiations.
6794         (check_explicit_specialization): Refine to conform to standard.
6795         (comp_template_parms): New function.
6796         (coerce_template_parms): Call convert_nontype_parameter.
6797         (tsubst): Refine handling of member templates.  Use
6798         register_specialization. 
6799         (instantiate_template): Use retrieve_specialization.
6800         (do_decl_instantiation): Likewise.
6801         (instantiate_decl): Likewise.
6802         (type_unification): Improve handling of explict template
6803         arguments. 
6804         * tree.c (mapcar): Return error_mark_node, rather than aborting,
6805         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
6806         * typeck.c (build_unary_op): Call determine_specialization, rather
6807         than determine_explicit_specialization.
6808
6809 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
6810
6811         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
6812
6813 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
6814
6815         * error.c (dump_decl): For enum tags, output the tag, not its value.
6816
6817 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
6818
6819         * decl.c (init_decl_processing): Only call init_rtti_processing
6820         FLAG_RTTI is set.
6821
6822 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
6823
6824         * init.c (build_new_1): Split out from build_new.
6825         (build_new): Just return a NEW_EXPR.
6826         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
6827
6828         * decl2.c (get_temp_regvar): Tweak.
6829
6830         * cp-tree.h (TREE_CALLS_NEW): Comment out.
6831         * class.c (resolves_to_fixed_type_p): Remove use.
6832         * method.c (build_opfncall): Likewise.
6833         * call.c (build_new_op): Likewise.
6834
6835 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
6836
6837         * exception.cc (__eh_alloc, __eh_free): New fns.
6838         (__cp_push_exception, __cp_pop_exception): Use them.
6839         (__uncatch_exception): Call terminate here if no exception.
6840         * except.c (build_terminate_handler): New fn.
6841         (expand_start_catch_block): Use it.
6842         (expand_exception_blocks): Likewise.
6843         (alloc_eh_object): New fn.
6844         (expand_throw): Use it.  Protect exception init with terminate.
6845         * typeck.c (build_modify_expr): Remove code that ignores trivial 
6846         methods.
6847
6848 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6849  
6850         * call.c (add_builtin_candidate): Add default case in enumeration
6851         switch.
6852         (build_new_op): Likewise.
6853         (convert_like): Likewise.
6854         * cvt.c (build_expr_type_conversion): Likewise.
6855         * tree.c (real_lvalue_p): Likewise.
6856         (lvalue_p): Likewise.
6857         (cp_tree_equal): Likewise.
6858         * typeck.c (comptypes): Likewise.
6859         (build_component_ref): Likewise.
6860         (build_function_call_real): Likewise.
6861         (build_binary_op_nodefault): Likewise.
6862         (build_unary_op): Likewise.
6863         (build_modify_expr): Likewise.
6864         * typeck2.c (initializer_constant_valid_p): Likewise.
6865
6866 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
6867
6868         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
6869
6870 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
6871
6872         * pt.c (coerce_template_parms): Make sure to digest_init if
6873         possible.
6874
6875         * decl.c (duplicate_decls): Make the newdecl virtual if the
6876         olddecl was, just as is done with other attributes of olddecl.
6877
6878 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
6879
6880         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the 
6881         address of an OFFSET_REF.
6882
6883         * cp-tree.def: Add AGGR_INIT_EXPR.
6884         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
6885         AGGR_INIT_EXPR where appropriate.
6886         * expr.c (cplus_expand_expr): Likewise.  Simplify.
6887
6888         * decl2.c (finish_file): Remove call to register_exception_table.
6889
6890 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6891
6892         * pt.c (instantiate_class_template): Don't do injection when
6893         processing_template_decl is true, as pollutes current_binding_level 
6894         for base classes.
6895
6896 Wed Dec 17 21:17:39 1997  Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
6897
6898         * pt.c (maybe_fold_nontype_arg): Add prototype.
6899
6900 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
6901
6902         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
6903         * error.c (dump_expr): Likewise.
6904
6905 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
6906
6907         * typeck.c (build_function_call_real): Remove "inline called before
6908         definition" pedwarn.
6909
6910         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
6911
6912 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
6913
6914         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
6915
6916         * pt.c (type_unification_real): Change __null to type void* with 
6917         a warning.
6918
6919 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
6920
6921         * call.c (implicit_conversion): Don't call
6922         build_user_type_conversion_1 with a NULL expr, since it will
6923         crash. 
6924
6925         * pt.c (unify): Don't try to unify array bounds if either array is
6926         unbounded.
6927
6928 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
6929
6930         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): 
6931         Replace extern decls with casts.
6932
6933         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
6934         Update last_parm_cleanup_insn.
6935         (store_after_parms): Remove.
6936         * cp-tree.h: Adjust.
6937
6938 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
6939
6940         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
6941         (finish_file): Check DECL_COMDAT instead of weak|one_only.
6942         (import_export_vtable): Use make_decl_one_only instead of
6943         comdat_linkage for win32 tweak.
6944         (import_export_decl): Likewise.
6945         * pt.c (mark_decl_instantiated): Likewise.
6946
6947         * decl2.c (finish_file): Lose handling of templates in pending_statics.
6948
6949 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
6950
6951         * decl2.c (finish_file): Lose call to expand_builtin_throw.
6952         * except.c (expand_builtin_throw): Remove.
6953         * cp-tree.h: Remove ptr_ptr_type_node.
6954         * decl.c: Likewise.
6955
6956 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
6957         
6958         * decl.c (ptr_ptr_type_node): Define.
6959         (init_decl_processing): Initialize it.
6960         * cp-tree.h: Declare it.
6961         * exception.cc (__cp_exception_info): Use __get_eh_info.
6962         (__cp_push_exception): Ditto.
6963         (__cp_pop_exception): Ditto.
6964
6965         From Scott Snyder <snyder@d0sgif.fnal.gov>:
6966         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
6967         saved_pc.
6968         (init_exception_processing): Removed saved_pc initialization.
6969
6970 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
6971
6972         * pt.c (instantiate_decl): Defer all templates but inline functions.
6973
6974 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
6975
6976         * init.c (expand_vec_init): Don't fold a list of parameters.
6977
6978         * decl.c (copy_args_p): Handle copy elision for types with virtual
6979         bases.
6980         * call.c (build_over_call): Likewise.
6981
6982 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
6983
6984         * pt.c (lookup_template_function): Copy the template arguments,
6985         not just the list containing them, to the permanent obstack.
6986
6987 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
6988
6989         * except.c (expand_start_catch_block): suspend_momentary for the
6990         terminate handler.
6991
6992         * error.c (dump_decl): Handle LOOKUP_EXPR.
6993
6994 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
6995
6996         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
6997         permanent obstack if we are processing a template decl.
6998         * typeck.c (build_static_cast): Likewise.
6999         (build_const_cast): Likewise.
7000         (build_reinterpret_cast): Likewise.
7001
7002         * pt.c (coerce_template_parms): Coerce some expressions, even
7003         when processing_template_decl.
7004
7005 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7006
7007         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
7008         handling of pointer difference expressions.
7009
7010         * typeck.c (comp_target_types): Comparison of function/method types
7011         is independent of nptrs.
7012
7013 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
7014
7015         * pt.c (tsubst): Avoid creating pointer to reference and
7016         reference to reference types.
7017
7018 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
7019
7020         * parse.y (do_id): New nonterminal.
7021         (template_id): Use it.
7022
7023 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
7024
7025         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
7026         * spew.c (yylex): Don't do_identifier here.
7027         * decl2.c (build_expr_from_tree): Revert last change.
7028
7029         * decl2.c (build_expr_from_tree): Expand the name for a method call.
7030         * parse.y (object_template_id): Don't try to take the DECL_NAME.
7031
7032 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
7033
7034         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
7035         alloc_expr.
7036         * call.c (build_op_delete_call): Adjust.
7037
7038         * except.c (expand_end_catch_block): Lose rethrow region.
7039         (expand_start_catch_block): Likewise.
7040         (expand_end_catch_block): Don't expand_leftover_cleanups.
7041
7042 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7043
7044         * pt.c (tsubst): Remove tree_cons call (places redundant info into
7045         DECL_TEMPLATE_INSTANTIATION).   
7046
7047 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
7048
7049         * tree.c (is_overloaded_fn): Handle getting a fn template.
7050         (really_overloaded_fn): Likewise.
7051         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
7052         * pt.c (check_explicit_specialization): Tweak.
7053         (determine_explicit_specialization): Tweak.
7054
7055         * tree.c, cp-tree.h (get_target_expr): New fn.
7056
7057 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
7058
7059         * pt.c (check_explicit_specialization): Fix misspelling in
7060         diagnostic: `preceeded'.
7061         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
7062         `conversiona'.
7063
7064 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
7065
7066         * pt.c (determine_explicit_specialization): Avoid an internal
7067         error for bad specializations.
7068
7069         * method.c (build_overload_value): Handle SCOPE_REF.
7070
7071 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
7072
7073         * class.c (prepare_fresh_vtable): Enable even more complex MI
7074         vtable names.
7075
7076 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
7077
7078         * exception.cc (__check_eh_spec): Optimize a bit.
7079
7080         * exception.cc (__cp_pop_exception): Lose handler arg.
7081         * except.c (do_pop_exception): Likewise.
7082         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
7083         (expand_end_catch_block): Likewise.
7084
7085 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
7086
7087         * pt.c (check_explicit_specialization): Complain about using a 
7088         template-id for a non-specialization.
7089
7090 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
7091
7092         * repo.c: Prototype rindex only if needed.
7093         * xref.c: Likewise.
7094
7095 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7096
7097         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
7098
7099 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
7100
7101         * typeck.c (build_const_cast): Handle references here instead of
7102         handing off to convert_to_reference.
7103
7104         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
7105         TerminateFunctionCall.
7106         (init_exception_processing): Likewise.  Terminate et al are now
7107         the fns, not ADDR_EXPRs.
7108         (various): Lose redundant assemble_external calls.
7109         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
7110
7111         * cp-tree.h (struct lang_decl_flags): Add comdat.
7112         (DECL_COMDAT): New macro.
7113         * decl.c (duplicate_decls): Propagate it.
7114         (cp_finish_decl): Handle it.
7115         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
7116
7117         * class.c: Remove static pending_hard_virtuals.
7118         (add_virtual_function): Take pointers to pending_virtuals
7119         and pending_hard_virtuals.
7120         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
7121
7122 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
7123
7124         * decl2.c (import_export_vtable): If we support one_only but not
7125         weak symbols, mark instantiated template vtables one_only.
7126         (import_export_decl): Likewise for tinfo functions.
7127         (finish_vtable_vardecl): Also write out vtables from explicitly 
7128         instantiated template classes.
7129         * pt.c (mark_class_instantiated): Revert last change.
7130
7131         * except.c (expand_throw): Call mark_used on the destructor.
7132
7133 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
7134
7135         * lex.c (lang_init): Enable flag_exceptions by default if no
7136         command line switch was specified.
7137
7138 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
7139
7140         * pt.c (unify): Handle `void' template parameters in
7141         specializations.
7142
7143 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
7144
7145         * rtti.c (build_dynamic_cast): Handle template case here.
7146         (build_dynamic_cast_1): Not here.
7147
7148         * typeck2.c (digest_init): Make copies where appropriate.
7149
7150         * decl2.c (delete_sanity): resolve_offset_ref.
7151
7152         * except.c: Call terminate without caching so many bits.
7153
7154         * except.c (expand_start_catch_block): Fix catching a reference
7155         to pointer.
7156
7157 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
7158
7159         * init.c (build_new): Copy size to the saveable obstack.
7160
7161         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
7162         TRY_CATCH_EXPR for now.
7163
7164 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
7165
7166         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
7167         has DECL_LANG_SPECIFIC.
7168
7169         * exception.cc (struct cp_eh_info): Add handlers field.
7170         (__cp_push_exception): Initialize it.
7171         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
7172         (__throw_bad_exception): Remove.
7173         * except.c (call_eh_info): Add handlers field.
7174         (get_eh_handlers): New fn.
7175         (push_eh_cleanup): Increment handlers.
7176
7177 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
7178
7179         * except.c (expand_start_eh_spec): Use the try/catch code.
7180         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
7181         doing everything inline.
7182         (init_exception_processing): throw_type_match now takes
7183         const void pointers.
7184         * exception.cc (__check_eh_spec): New fn.
7185         * inc/exception: Neither terminate nor unexpected return.
7186         * decl.c: Make const_ptr_type_node public.
7187         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
7188
7189         * except.c (expand_start_catch_block): We only need the rethrow
7190         region for non-sjlj exceptions.
7191         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
7192
7193 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
7194
7195         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
7196         (various.o): Likewise.
7197         * inc/new: Add placement deletes.  Add throw specs for default new.
7198         * new.cc (set_new_handler): Move here from libgcc2.
7199         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
7200         (new): Move from libgcc2.  Throw bad_alloc.
7201         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
7202         * decl.c (init_decl_processing): Update exception specs on new and
7203         delete.
7204
7205         * method.c (build_decl_overload_real): Don't mess with global 
7206         placement delete.
7207
7208         * init.c (build_new): Check for null throw spec, not nothrow_t.
7209
7210         * decl.c (duplicate_decls): Don't complain about different exceptions
7211         from an internal declaration.
7212
7213         * call.c (build_op_delete_call): Fix check for member fns again.
7214
7215         * decl2.c (import_export_decl): Interface hackery affects
7216         virtual synthesized methods.
7217
7218 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
7219
7220         * decl.c (start_decl): Don't just complain about a mismatched 
7221         scope, fix it.
7222
7223         * decl.c (make_implicit_typename): Handle case where t is not
7224         actually from context.
7225         * tree.c (get_type_decl): Lose identifier case.
7226         * spew.c (yylex): Lose useless call to identifer_typedecl_value.
7227         * parse.y (nonnested_type): Just use lookup_name.
7228         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
7229
7230 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
7231
7232         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
7233         T was built in C language context (for example, by
7234         output_func_start_profiler).
7235
7236 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
7237
7238         * decl.c (make_implicit_typename): New fn.
7239         (lookup_name_real): Use it.  Use current_class_type as the context.
7240
7241 Mon Nov 17 23:42:03 1997  Bruno Haible <haible@ilog.fr>
7242
7243         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
7244
7245 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
7246
7247         * friend.c (do_friend): Warn about non-template friends in templates.
7248
7249         * call.c (build_op_delete_call): Fix handling of inherited delete.
7250
7251         * search.c (dfs_record_inheritance): Ignore template type parms.
7252
7253 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
7254
7255         * call.c (build_new_op): Fix copy error.
7256         (build_op_new_call): New fn.
7257         (build_op_delete_call): New fn.
7258         * cp-tree.h: Declare them.
7259         * init.c (build_new): Use them.  Support placement delete.
7260         (build_x_delete): Use build_op_delete_call.
7261         (build_delete): Likewise.
7262         * decl2.c (delete_sanity): Likewise.
7263         (coerce_delete_type): Don't complain about placement delete.
7264
7265 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
7266
7267         * call.c (build_new_function_call): Remove unused 'obj' parm.
7268         * cp-tree.h, typeck.c: Adjust.
7269
7270         * init.c (build_new): Make the cleanup last longer.
7271         (expand_vec_init): Call do_pending_stack_adjust.
7272
7273 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
7274
7275         * pt.c (do_type_instantiation): Fix typo.
7276         (mark_class_instantiated): If we support one_only but not weak 
7277         symbols, don't mark this as known.
7278
7279         * init.c (build_new): Handle vec delete in EH cleanup.
7280
7281 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7282
7283         * call.c (build_method_call): Call complete_type before checking
7284         for destructor.
7285
7286 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
7287
7288         * decl.c (add_block_current_level): Delete.
7289         * init.c (build_vec_delete_1): Delete build_block and
7290         add_block_current_level calls.
7291
7292 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
7293
7294         * init.c (build_new): Handle freeing allocated memory when the
7295         constructor throws.
7296
7297         * call.c (build_new_method_call): Fix flags arg.
7298
7299         * pt.c (do_type_instantiation): Don't try to instantiate
7300         member templates.
7301         (mark_decl_instantiated): If we support one_only but not
7302         weak symbols, mark this one_only.
7303         * decl2.c (import_export_vtable): Don't defer handling of vtables
7304         if MULTIPLE_SYMBOL_SPACES.
7305
7306 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
7307
7308         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
7309
7310 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
7311
7312         * except.c (do_pop_exception): Return a value.
7313
7314 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
7315
7316         * call.c (build_new_method_call): Handle getting a
7317         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
7318         if we got template parms.
7319         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
7320         not just the args.
7321         * decl2.c (build_expr_from_tree): Tweak last change.
7322         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
7323         (maybe_fold_nontype_arg): Split out from tsubst_copy.
7324         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
7325
7326 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7327
7328         * pt.c (tsubst_copy): Handle explicit template arguments in 
7329         function calls.
7330         * typeck.c (build_x_function_call): Likewise.
7331         * decl2.c (build_expr_from_tree): Lookup function name if it 
7332         hasn't been done.
7333
7334         * pt.c (tsubst): Instantiate template functions properly when 
7335         template parameter does not appear in function arguments and return 
7336         type.
7337         (comp_template_args): Handle member templates required by tsubst.
7338
7339 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
7340
7341         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
7342         previous change.
7343
7344 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7345
7346         * pt.c (coerce_template_parms): Tweak error message.
7347
7348         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
7349         return type defaults to `int', even if there are storage-class
7350         specifiers.
7351
7352 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
7353
7354         Complete nested exception support.
7355         * except.c (do_pop_exception): Split out...
7356         (push_eh_cleanup): From here.  Handle the EH region by hand.
7357         (expand_start_catch_block): Add a new level for the catch parm.
7358         Move the rethrow region outside the two cleanup regions.
7359         Protect the initializer for the catch parm with terminate.
7360         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
7361         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
7362         popping off the middle of the stack.
7363         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, 
7364         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
7365         (build_cplus_new): Only wrap CALL_EXPRs.
7366         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around 
7367         the constructor call.
7368
7369 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7370
7371         * Make-lang.in (c++.distdir): Make inc subdirectory.
7372
7373 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
7374
7375         * decl2.c (finish_file): Put back some code.
7376
7377 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
7378
7379         * decl2.c (finish_file): Remove redundant code.
7380         * method.c (emit_thunk): Don't let the backend defer generic thunks.
7381
7382 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
7383
7384         * except.c (call_eh_info): Split out...
7385         (push_eh_info): From here.
7386         (expand_builtin_throw): Use it.
7387         (expand_start_catch_block): Move region start back.
7388
7389 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
7390
7391         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
7392         (real_yylex): Record wide strings using target endianness, not host.
7393
7394 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
7395
7396         * repo.c (rindex): Add decl unconditionally.
7397         (get_base_filename, open_repo_file): Don't cast rindex.
7398         * xref.c (rindex): Add decl unconditionally.
7399         (index): Remove unused decl.
7400         (open_xref_file): Don't cast rindex.
7401
7402 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
7403
7404         * class.c (build_vbase_path): Propagate the result type properly.
7405
7406 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
7407
7408         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
7409         remaining use of saved_throw_type with a call to get_eh_type.
7410
7411 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
7412
7413         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
7414         (file_name_nondirectory): New function, doing the same as the macro.
7415         (set_typedecl_interface_info): Use it instead of the macro.
7416         (check_newline): Likewise.
7417         (handle_cp_pragma): Likewise.
7418
7419         * repo.c (get_base_filename): Cast result of rindex to char*.
7420         (open_repo_file): Likewise.
7421         * xref.c (open_xref_file): Likewise.
7422         * error.c (dump_char): Make its arg int, not char.
7423
7424         * except.c (push_eh_info): Pass the number of fields - 1 down, not
7425         the exact number of fields.
7426
7427 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
7428
7429         Support for nested exceptions.
7430         * tinfo2.cc (__is_pointer): New fn.
7431         * exception.cc (struct cp_eh_info): Define.
7432         (__cp_exception_info, __uncatch_exception): New fns.
7433         (__cp_push_exception, __cp_pop_exception): New fns.
7434         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
7435         Lose empty_fndecl.
7436         (init_exception_processing): Likewise.  __eh_pc is now external.
7437         (push_eh_info): New fn.
7438         (get_eh_{info,value,type,caught}): New fns.
7439         (push_eh_cleanup): Just call __cp_pop_exception.
7440         (expand_start_catch_block): Use push_eh_info.  Start the eh region
7441         sooner.
7442         (expand_end_eh_spec): Use push_eh_info.
7443         (expand_throw): Call __cp_push_exception to set up the exception info.
7444         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
7445         when we rethrow.
7446         (expand_builtin_throw): Don't refer to empty_fndecl.
7447
7448 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
7449
7450         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
7451
7452 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
7453
7454         * method.c (build_template_parm_names, build_decl_overload_real):
7455         Add static to definitions.
7456         * pt.c (add_to_template_args, note_template_header,
7457         processing_explicit_specialization, type_unification_real): Likewise.
7458         ({determine,check}_explicit_specialization): Use a single string for
7459         error messages.
7460
7461 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
7462
7463         * except.c (expand_exception_blocks): Call do_pending_stack_adust.
7464         (expand_end_catch_block): Likewise.
7465         (expand_end_eh_spec): Likewise.
7466
7467 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
7468
7469         * decl.c (duplicate_decls): Handle template specializations
7470         correctly. 
7471         * error.c (dump_function_name): Fix printing of specializations of
7472         member functions that are not member templates.
7473         * cp-tree.h (processing_specialization): Make global.
7474         * pt.c (processing_specialization): Likewise.
7475         * lex.c (cons_up_default_function): Save and restore
7476         processing_specialization to avoid confusion.
7477         
7478 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
7479
7480         * decl.c (init_decl_processing): Give null_node unknown* type.
7481         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
7482         (common_type): Likewise.
7483         * error.c (args_as_string): Recognize null_node.
7484
7485 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7486
7487         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
7488         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
7489
7490         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
7491
7492         * Make-lang.in (g++): Include prefix.o.
7493
7494 Thu Oct 16 15:31:09 1997  Judy Goldberg <judygold@sanwafp.com>
7495
7496         * pt.c (determine_explicit_specialization): Initialize "dummy"
7497         to keep Purify quiet.
7498
7499 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
7500
7501         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
7502         (build_overload_int): Not here.
7503
7504 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
7505
7506         * class.c (build_type_pathname): Remove.
7507         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
7508
7509 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
7510
7511         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
7512         &&label GNU extension.
7513
7514 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
7515
7516         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
7517         so as to avoid incorrect manglings.
7518         * method.c (build_decl_overload_real): Don't mangle return types
7519         for constructors.
7520         
7521 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
7522
7523         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
7524         scratch_tree_cons): Define as macros for now.
7525         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, 
7526         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
7527         typeck2.c: Use them and the expression_obstack variants.
7528
7529 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7530
7531         * decl.c (store_return_init): Allow classes with explicit ctors to
7532         be used with the named return values extension.
7533
7534 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
7535
7536         * pt.c (instantiate_decl): Fix previous change.
7537
7538 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
7539
7540         * pt.c (tsubst): Fix thinko.
7541         (instantiate_decl): Really use the original template.
7542
7543         * call.c (build_new_method_call): Use simple constructor_name for
7544         error messages.
7545
7546 Wed Oct  8 22:44:42 1997  Jeffrey A Law  (law@cygnus.com)
7547
7548         * method.c (build_underscore_int): Don't use ANSI specific
7549         features.
7550
7551 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
7552
7553         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
7554         for our key method; it might have been inlined by -O3.
7555
7556 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
7557
7558         * decl.c (make_typename_type): Do not try to call lookup_field for
7559         non-aggregate types.
7560
7561 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
7562
7563         * typeck.c (build_reinterpret_cast): Tweak.
7564
7565 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
7566
7567         * typeck.c (build_reinterpret_cast): converting a void pointer
7568         to function pointer with a reinterpret_cast produces a warning
7569         if -pedantic is issued
7570
7571 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7572
7573         * typeck.c (c_expand_return): Don't warn about returning a
7574         reference-type variable as a reference.
7575
7576 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
7577
7578         * method.c (build_static_name): Fix typo.
7579
7580 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
7581
7582         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
7583         OLDDECL before we try to do DECL_USE_TEMPLATE.
7584
7585 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
7586
7587         * decl.c (duplicate_decls): Don't warn about template instances.
7588
7589         * typeck.c (mark_addressable): Lose ancient code that unsets
7590         DECL_EXTERNAL.
7591
7592         * pt.c (do_decl_instantiation): Lose support for instantiating
7593         non-templates.
7594
7595         * call.c (build_new_function_call): Fix handling of null explicit
7596         template args.
7597         (build_new_method_call): Likewise.
7598
7599 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
7600
7601         * method.c (build_underscore_int): Fix typo.
7602
7603 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
7604
7605         * tree.c (print_lang_statistics): #if 0 call to
7606         print_inline_obstack_statistics until its definition is checked in.
7607
7608 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
7609
7610         * decl2.c (finish_file): Move dump_tree_statistics to end.
7611
7612         * pt.c (instantiate_decl): Look for the original template.
7613         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
7614         of member templates.
7615
7616 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
7617
7618         * Makefile.in (g++FAQ.*): New rules.
7619         (CONFLICTS): Update.
7620         * g++FAQ.texi: Moved from libg++.
7621
7622         * parse.y (PFUNCNAME): Only specify the type once.
7623
7624 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
7625
7626         * lex.c (real_yylex): Clean up the code to fully behave the way
7627         the c-lex.c parser does for complex and real numbers.
7628
7629 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
7630
7631         * method.c (build_decl_overload_real): Reformat.
7632
7633 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
7634
7635         * method.c (synthesize_method): If at_eof, determine our linkage.
7636
7637 1997-09-29  Paul Eggert  <eggert@twinsun.com>
7638
7639         * lex.c (real_yylex): Treat `$' just like `_', except issue a
7640         diagnostic if !dollars_in_ident or if pedantic.
7641
7642         * lang-specs.h (@c++): -ansi no longer implies -$.
7643
7644         * decl2.c (lang_decode_option):
7645         -traditional and -ansi now do not mess with
7646         dollars_in_ident.
7647
7648 Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
7649
7650         * Makefile.in (parse.o, decl.o): Also depend on
7651         $(srcdir)/../except.h $(srcdir)/../output.h.
7652         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
7653         $(srcdir)/../except.h $(srcdir)/../output.h.
7654         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
7655         ../insn-codes.h.
7656
7657         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
7658
7659         * expr.c (cplus_expand_expr): Make it static. 
7660
7661         * decl2.c, init.c, typeck.c: Include "expr.h".
7662         (expand_expr): Use proper values when calling the function.
7663
7664 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
7665
7666         * lang-options.h: new -Wold-style-cast flag.
7667         * cp-tree.h (warn_old_style_cast): new variable.
7668         * decl2.c (warn_old_style_cast): ditto.
7669         (lang_decode_option): support -Wold-style-cast.
7670         (reparse_absdcl_as_casts): produce old-style-cast warning.
7671
7672 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7673
7674         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
7675         TREE_USED, reset value based on already_used.
7676
7677         * init.c (expand_member_init): Revert change.
7678         
7679 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
7680
7681         * cp-tree.h, decl.c, decl2.c, pt.c:
7682         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
7683
7684         * decl2.c (lang_decode_option): Add missing ;.
7685
7686 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
7687
7688         * friend.c (do_friend): Disable injection for all template-derived
7689         decls.
7690         * decl2.c (lang_decode_option): Handle -fguiding-decls.
7691         * parse.y (notype_template_declarator): New nonterminal.
7692         (direct_notype_declarator): Use it.
7693         (complex_direct_notype_declarator): Likewise.
7694         (object_template_id): Accept any kind of identifier after TEMPLATE.
7695         (notype_qualified_id): Don't add template declarators here.
7696
7697 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
7698
7699         * call.c (add_template_candidate): Add explicit_targs parameter.
7700         (build_scoped_method_call): Use it.
7701         (build_overload_call_real): Likewise.
7702         (build_user_type_conversion_1): Likewise.
7703         (build_new_function_call): Likewise.
7704         (build_object_call): Likewise.
7705         (build_new_op): Likewise.
7706         (build_new_method_call): Likewise.
7707         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
7708         (build_new_method_call): Likewise.
7709
7710         * class.c (finish_struct_methods): Add specialization pass to
7711         determine which methods were specializing which other methods.
7712         (instantiate_type): Handle TEMPLATE_ID_EXPR.
7713
7714         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
7715
7716         * cp-tree.h (name_mangling_version): New variable.
7717         (flag_guiding_decls): Likewise.
7718         (build_template_decl_overload): New function.
7719         (begin_specialization): Likewise.
7720         (reset_specialization): Likewise.
7721         (end_specialization): Likewise.
7722         (determine_explicit_specialization): Likewise.
7723         (check_explicit_specialization): Likewise.
7724         (lookup_template_function): Likewise.
7725         (fn_type_unification): Add explicit_targs parameter.
7726         (type_unification): Likewise.
7727
7728         * decl.c (duplicate_decls): Add smarts for explicit
7729         specializations.
7730         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
7731         specializations.
7732         (grokfndecl): Call check_explicit_specialization.
7733
7734         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
7735         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
7736         (check_classfn): Handle specializations.
7737
7738         * error.c (dump_function_name): Print specialization arguments.
7739
7740         * friend.c (do_friend): Don't call pushdecl for template 
7741         instantiations. 
7742
7743         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
7744
7745         * lang-options.h: Add -fname-mangling-version, -fguiding-decls, 
7746         and -fno-guiding-decls.
7747
7748         * lex.c (identifier_type): Return PFUNCNAME for template function
7749         names.
7750
7751         * method.c (build_decl_overload_real): New function.
7752         (build_template_parm_names): New function.
7753         (build_overload_identifier): Use it.
7754         (build_underscore_int): New function.
7755         (build_overload_int): Use it.  Add levels for template
7756         parameters.
7757         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
7758         (build_overload_nested_names): Handle template type parameters.
7759         (build_template_decl_overload): New function.
7760
7761         * parse.y (YYSTYPE): New ntype member.
7762         (nested_name_specifier): Use it.
7763         (nested_name_specifier_1): Likewise.
7764         (PFUNCNAME): New token.
7765         (template_id, object_template_id): New non-terminals.
7766         (template_parm_list): Note specializations.
7767         (template_def): Likewise.
7768         (structsp): Likewise.
7769         (fn.def2): Handle member template specializations.
7770         (component_decl_1): Likewise.
7771         (direct_notype_declarator): Handle template-ids.
7772         (component_decl_1): Likewise.
7773         (direct_notype_declarator): Handle template-ids.
7774         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
7775
7776         * pt.c (processing_specializations): New variable.
7777         (template_header_count): Likewise.
7778         (type_unification_real): New function.
7779         (processing_explicit_specialization): Likewise.
7780         (note_template_header): Likewise.
7781         (is_member_template): Handle specializations.
7782         (end_template_decl): Call reset_specialization.
7783         (push_template_decl): Handle member template specializations.
7784         (tsubst): Likewise.
7785         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
7786         (instantiate_template): Handle specializations.
7787         (instantiate_decl): Likewise.
7788         (fn_type_unification): Handle explicit_targs.
7789         (type_unification): Likewise.  Allow incomplete unification
7790         without an error message, if allow_incomplete.
7791         (get_bindings): Use new calling sequence for fn_type_unification.
7792
7793         * spew.c (yylex): Handle PFUNCNAME.
7794
7795         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
7796         (really_overloaded_fn): Likewise.
7797         (get_first_fn): Handle function templates.
7798
7799         * typeck.c (build_x_function_call): Use really_overloaded_fn.
7800         Handle TEMPLATE_ID_EXPR.
7801         (build_x_unary_op): Likewise.
7802         (build_unary_op): Likewise.
7803         (mark_addressable): Templates whose address is taken are marked  
7804         as used. 
7805
7806 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
7807
7808         * decl.c (init_decl_processing): Declare __builtin_constant_p as
7809         accepting any kind of type, not only int.
7810
7811 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
7812
7813         * search.c (get_matching_virtual): Notice virtual bases when sorrying
7814         about covariant returns.
7815
7816         * parse.y (member_init): Also imply typename here.  Remove ancient
7817         extension for initializing base members.
7818
7819 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
7820
7821         Handle multi-level typenames and implicit typename in base list.
7822         * parse.y (typename_sub{,[0-2]}): New rules.
7823         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
7824         (nonnested_type): New rule.
7825         (complete_type_name): Use it.
7826         (base_class.1): Use typename_sub and nonnested_type.
7827         (nested_name_specifier): Don't elide std:: here.
7828         * decl.c (make_typename_type): Handle getting a type for NAME.
7829         (lookup_name_real): Turn std:: into :: here.
7830
7831         Rvalue conversions were removed in London.
7832         * call.c (is_subseq): Don't consider lvalue transformations.
7833         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
7834         (joust): Reenable ?: kludge.
7835
7836 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
7837
7838         * decl.c (start_function): Up warning of no return type to be a
7839         pedwarn.
7840
7841 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7842
7843         * init.c (expand_member_init): Don't set TREE_USED.
7844         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
7845         set,don't clear TREE_USED wholesale.
7846
7847 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
7848
7849         * call.c (build_over_call): Do require_complete_type before
7850         build_cplus_new.
7851
7852 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
7853
7854         * search.c (lookup_field): Call complete_type in all cases.
7855
7856         * decl.c (finish_function): Just warn about flowing off the end.
7857
7858 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
7859
7860         * decl.c (grokparms): Don't bash a permanent list node if we're
7861         in a function.
7862
7863 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
7864
7865         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
7866
7867 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
7868
7869         * call.c (build_new_op): Give better error for syntactically
7870         correct, but semantically invalid, use of undeclared template.
7871
7872         * call.c (compare_qual): Handle pmfs.
7873
7874         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
7875         after the exception spec.
7876
7877 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
7878
7879         * call.c (null_ptr_cst_p): Integer type, not integral type.
7880
7881         * call.c (joust): Disable warnings until they can be moved to the
7882         right place.
7883
7884 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
7885
7886         * Makefile.in, config-lang.in:  Convert to autoconf.
7887
7888 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
7889
7890         * decl.c (lookup_name_real): Add implicit 'typename' to types from
7891         base classes.
7892
7893         * pt.c (most_specialized_class): Fix typo.
7894         (tsubst): Move constant folding to TREE_VEC case.
7895
7896 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
7897
7898         * pt.c (do_poplevel): Don't warn about unused local variables
7899         while processing_template_decl since we don't always know whether
7900         or not they will need constructing/destructing.
7901
7902         * pt.c (uses_template_parms): Check the values of an enumeration
7903         type to make sure they don't depend on template parms.
7904
7905         * decl.c (make_typename_type): Don't lookup the field if the
7906         context uses template parms, even if we're not
7907         processing_template_decl at the moment.
7908
7909         * pt.c (coerce_template_parms): Avoid looking at the
7910         TYPE_LANG_DECL portion of a typename type, since there won't be
7911         one. 
7912         (tsubst): Do constant folding as necessary to make sure that
7913         arguments passed to lookup_template_class really are constants. 
7914
7915 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
7916
7917         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
7918         * decl2.c (finish_file): Only register exception tables if we
7919         need to.
7920
7921         * decl.c (init_decl_processing): Add __builtin_[fs]p.
7922
7923 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
7924
7925         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
7926
7927 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
7928
7929         * error.c (dump_decl): Avoid crashing when presented with a
7930         uninitialized constant, as can occur with a template parameter.
7931         (dump_expr): Make sure that there are enough levels of
7932         current_template_parms before we start diving through them.
7933
7934 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
7935
7936         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
7937         c-typeck.c.
7938
7939 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
7940
7941         * except.c (expand_throw): Call build_delete for all 
7942         exception types, not just objects with destructors.
7943
7944 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
7945
7946         * decl.c (current_local_enum): Remove static.
7947         * pt.c (tsubst_enum): Save and restore value of current_local_enum
7948         in case template is expanded in enum decl.
7949         (instantiate_class_template) : Use new tsubst_enum signature.
7950         (tsubst_expr): Likewise.
7951
7952 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
7953
7954         * pt.c (begin_member_template_processing): Take a function as
7955         argument, not a set of template arguments.  Use the template
7956         parameters, rather than the arguments.  Handle non-type parameters
7957         correctly.  Push a binding level for the parameters so that multiple
7958         member templates using the same parameter names can be declared.
7959         (end_member_template_processing): Pop the binding level.
7960         (push_template_decl): Mark member templates as static when
7961         appropriate. 
7962
7963         * lex.c (do_pending_inlines): Pass the function, not its template
7964         arguments, to begin_member_template_processing.
7965         (process_next_inline): Likewise.
7966         (do_pending_defargs): Likewise.
7967
7968         * error.c (dump_expr): Obtain the correct declaration for a
7969         TEMPLATE_CONST_PARM. 
7970
7971         * call.c (add_template_conv_candidate): New function.
7972         (build_object_call): Handle member templates, as done in the other
7973         build_ functions.
7974         
7975 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
7976
7977         * decl.c (replace_defag): Undo previous change.
7978         * lex.c (do_pending_defargs): Deal with member templates.
7979         
7980         * pt.c (is_member_template): Avoid crashing when passed a
7981         non-function argument.
7982
7983 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
7984
7985         * class.c (grow_method): Remove check for redeclaration.
7986
7987 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
7988
7989         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
7990         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
7991         (PRIMARY_TEMPLATE_P): Use it.
7992         * call.c (build_overload_call_real): Use it.
7993         * class.c (instantiate_type): Likewise.
7994         * decl.c (decls_match): Likewise.
7995         * method.c (build_overload_identifier): Likewise.
7996         * pt.c (push_template_decl): Likewise.
7997         (classtype_mangled_name): Likewise.
7998         (lookup_template_class): Likewise.
7999         
8000         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
8001         DECL_NTPARMS to conform to usage elsewhere.
8002         * call.c (add_template_candidate): Likewise.
8003         * class.c (instantiate_type): Likewise.
8004         * pt.c (instantiate_template): Likewise.
8005         (get_bindings): Likewise.
8006         
8007         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
8008         is_member_template.
8009
8010         * pt.c (unify): Undo changes to allow multiple levels of template
8011         parameters. 
8012         (type_unification): Likewise.
8013         (fn_type_unification): Likewise.
8014         (get_class_bindings): Likewise.
8015         * cp-tree.h (Likewise).
8016         
8017         * decl.c (replace_defarg): Check that the type of the default
8018         parameter does not invlove a template type before complaining
8019         about the initialization.
8020
8021         * error.c (dump_expr): Deal with template constant parameters in
8022         member templates correctly.
8023
8024         * pt.c (is_member_template): Deal with class specializations
8025         correctly. 
8026         (tsubst): Handle "partial instantiation" of member templates
8027         correctly. 
8028
8029 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
8030
8031         * pt.c (type_unification): Change calling squence to allow for
8032         multiple levels of template parameters.
8033         (tsubst_expr): Likewise.
8034         (tsubst): Likewise.
8035         (tsubst_copy): Likewise.
8036         (instantiate_template): Likewise.
8037         (unify): Likewise.
8038         * call.c (build_overload_call_real): Use it.
8039         (add_builtin_candidate): Use it.
8040         (build_new_method_call): Use it.
8041         * class.c (instantiate_type): Use it.
8042         * decl.c (grokdeclarator): Use it.
8043         * decl2.c (finish_file): Use it.
8044         * method.c (build_overload_identifier): Use it.
8045         
8046         * call.c (add_template_candidate):  Add additional parameter for
8047         the function return type.  Call fn_type_unification istead of
8048         type_unification.
8049         (build_user_type_conversion_1): Handle member templates.
8050         (build_new_function_call): Likewise.
8051         (build_new_op): Likewise.
8052         (build_new_method_call): Likewise.
8053         
8054         * class.c (grow_method): Don't give an error message indicating
8055         that two member templates with the same name are ambiguous.
8056         (finish_struct): Treat member template functions just like member
8057         functions.
8058         
8059         * cp-tree.h (check_member_template): Add declaration.
8060         (begin_member_template_processing): Likewise.
8061         (end_member_template_processing): Likewise.
8062         (fn_type_unification): Likewise.
8063         (is_member_template): Likewise.
8064         (tsubst): Change prototype.
8065         (tsubst_expr): Likewise.
8066         (tsubst_copy): Likewise.
8067         (instantiate_template): Likewise.
8068         (get_bindings): Likewise.
8069
8070         * decl.c (decls_match): Handle multiple levels of template
8071         parameters. 
8072         (pushdecl): Handle template type params just like other type
8073         declarations. 
8074         (push_class_level_binding): Return immediately if the
8075         class_binding_level is NULL.
8076         (grokfndecl): If check_classfn() returns a member_template, use
8077         the result of the template, not the template itself.
8078         
8079         * decl2.c (check_member_template): New function.  Check to see
8080         that the entity declared to be a member template can be one.
8081         (check_classfn): Allow redeclaration of member template functions
8082         with different types; the new functions can be specializations or
8083         explicit instantiations.
8084         
8085         * error.c (dump_decl): Handle multiple levels of template
8086         parameters. 
8087         (dump_function_decl): Update to handle function templates.
8088
8089         * lex.c (do_pending_inlines): Set up template parameter context
8090         for member templates.
8091         (process_next_inline): Likewise.
8092
8093         * method. (build_overload_identifier): Adjust for multiple levels
8094         of template parameters.
8095         
8096         * parse.y (fn.def2): Add member templates.
8097         (component_decl_1): Likewise.
8098
8099         * pt.c (begin_member_template_processing): New function.
8100         (end_member_template_processing): Likewise.
8101         (is_member_template): Likewise.
8102         (fn_type_unification): Likewise.
8103         (current_template_parms): Return a vector of all the template
8104         parms, not just the innermost level of parms.
8105         (push_template_decl): Deal with the possibility of member
8106         templates. 
8107         (lookup_template_class): Likewise.
8108         (uses_template_parms): Likewise.
8109         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
8110         TEMPLATE_CONST_PARM to deal with multiple levels of template
8111         arguments.   Add processing of TEMPLATE_DECL to produce new
8112         TEMPLATE_DECLs from old ones.
8113         (do_decl_instantiation): Handle member templates.
8114
8115         * search.c (lookup_fnfields_1): Handle member template conversion
8116         operators. 
8117
8118         * tree.c (cp_tree_equal): Check the levels, as well as the
8119         indices, of TEMPLATE_CONST_PARMs.
8120
8121         * typeck.c (comptypes): Check the levels, as well as the indices,
8122         fo TEMPLATE_TYPE_PARMs.
8123         (build_x_function_call): Treat member templates like member
8124         functions. 
8125         
8126 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
8127
8128         * typeck.c (c_expand_return): Always convert_for_initialization
8129         before checking for returning a pointer to local.
8130
8131         * pt.c (type_unification): If strict and the function parm doesn't
8132         use template parms, just compare types.
8133
8134 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
8135
8136         * method.c (build_overloaded_value): Replace direct call
8137         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
8138
8139 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
8140
8141         * typeck.c (convert_arguments): Don't arbitrarily choose the first
8142         of a set of overloaded functions.
8143
8144 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
8145
8146         * lex.c (real_yylex): Don't elide __FUNCTION__.
8147
8148         * method.c (build_overload_value): Add in_template parm.
8149         (build_overload_int): Likewise.
8150         (build_overload_identifier): Pass it.
8151
8152         * decl.c (duplicate_decls): Don't bash a previous template
8153         definition with a redeclaration.
8154
8155         * pt.c (unify): float doesn't match double.
8156
8157         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
8158         TYPE_DECL.  Handle getting non-template types.
8159         * parse.y (explicit_instantiation): Use typespec instead of
8160         aggr template_type.
8161
8162 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
8163
8164         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
8165
8166 Mon Sep  1 13:19:04 1997  Eugene Mamchits <eugin@ips.ras.ru>
8167
8168         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
8169         (compare_ics): Likewise.
8170
8171 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
8172
8173         * call.c (joust): Warn about choosing one conversion op over
8174         another because of 'this' argument when the other return type is
8175         better.
8176         (source_type): New fn.
8177
8178         * call.c (build_new_op): Strip leading REF_BIND from first operand
8179         to builtin operator.
8180
8181         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
8182         use its RTL.
8183
8184 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
8185
8186         * call.c (null_ptr_cst_p): Remove support for (void*)0.
8187
8188 Wed Aug 27 02:03:34 1997  Jeffrey A Law  (law@cygnus.com)
8189
8190         * typeck.c (expand_target_expr): Make definition match declaration.
8191
8192         * class.c (get_basefndecls): Make definition match declaration.
8193
8194 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
8195
8196         * input.c (sub_getch): Eventually give up and release the input file.
8197
8198         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
8199         right place.
8200
8201         * call.c (joust): Tweak message.
8202
8203 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
8204
8205         * error.c (type_as_string): Put const/volatile on template type
8206         parameters where appropriate.
8207
8208 Sat Aug 23 17:47:22 1997  Jeffrey A Law  (law@cygnus.com)
8209
8210         * call.c (strictly_better): Make arguments unsigned ints.
8211
8212 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
8213
8214         * lex.c (real_yylex): Refer to __complex instead of complex.
8215
8216 Thu Aug 21 22:25:46 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
8217
8218         * lex.c (real_yylex): Don't use getc directly.
8219
8220 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
8221
8222         * call.c (is_subseq): Don't try to be clever.
8223
8224 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
8225
8226         * parse.y, pt.c: Include "except.h".
8227         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
8228         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
8229         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
8230         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
8231         prototyping.
8232
8233 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
8234
8235         * decl2.c (mark_vtable_entries): Instead of replacing pure
8236         virtuals with a reference to __pure_virtual, copy the decl and
8237         change the RTL.
8238
8239 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
8240
8241         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
8242
8243         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
8244
8245         * pt.c (instantiate_class_template): Call repo_template_used
8246         before finish_prevtable_vardecl.
8247
8248         * call.c (is_subseq): New fn.
8249         (compare_ics): Use it.
8250
8251         * repo.c (finish_repo): Don't crash on no args.
8252
8253         * parse.y (named_complex_class_head_sans_basetype): Handle
8254         explicit global scope.
8255         * decl2.c (handle_class_head): New fn.
8256
8257         * pt.c (unify): Add CONST_DECL case.
8258
8259 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8260
8261         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
8262
8263         * cp-tree.h (report_type_mismatch): Add prototype.
8264         * call.c (build_overload_call_real): Remove erroneous fourth
8265         argument to report_type_mismatch.
8266         (build_user_type_conversion_1): Remove erroneous second arg to
8267         tourney.
8268         (build_new_function_call): Likewise.
8269         (build_object_call): Likewise.
8270         (build_new_op): Likewise.
8271         (build_new_method_call): Likewise.
8272
8273 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
8274
8275         * error.c (dump_decl): Don't bother processing a function with no
8276         DECL_LANG_SPECIFIC.
8277
8278         * method.c (emit_thunk): Call init_function_start in the macro case.
8279
8280 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
8281
8282         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
8283         defined and used to set flag_vtable_thunks.
8284
8285 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
8286
8287         * parse.y: Don't clear the inlines from their obstack until they've 
8288         all been processed.
8289
8290         * decl.c (duplicate_decls): Don't complain about exception
8291         specification mismatch if flag_exceptions is off.
8292
8293 Mon Aug 11 15:01:56  1997  Marc Lehmann <pcg@goof.com>
8294
8295         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
8296
8297 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
8298
8299         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
8300         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
8301         Include <stdio.h> before include files that formerly used STDIO_PROTO. 
8302
8303         * decl.c, g++spec.c, lex.c, method.c, repo.c:
8304         Include "config.h" first, as per autoconf manual.
8305
8306 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
8307
8308         * decl.c (duplicate_decls): Tweak wording.
8309         * lex.c (do_pending_defargs): Don't die if we see a default arg
8310         that isn't a DEFAULT_ARG.
8311         * error.c (dump_expr): Handle DEFAULT_ARG.
8312
8313         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
8314         * lang-options.h: Add -fhandle-exceptions.
8315
8316         * class.c (build_vtable): vtables are artificial.
8317         (prepare_fresh_vtable): Likewise.
8318
8319 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
8320
8321         * cvt.c (ocp_convert): After converting to the target type, set
8322         LOOKUP_NO_CONVERSION.
8323
8324         * call.c (joust): Warn about potentially confusing promotion rules
8325         with -Wsign-promo.
8326         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
8327
8328 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
8329
8330         * exception.cc: Declare __terminate_func with noreturn attribute.
8331
8332 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
8333
8334         * parse.y: Break out eat_saved_input, handle errors.
8335         (function_try_block): Use compstmt instead of compstmt_or_error.
8336
8337 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
8338
8339         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
8340
8341 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8342
8343         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
8344         existence of cc1plus check whether $(LANGUAGES) contains C++.
8345
8346 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
8347
8348         * method.c (do_build_copy_constructor): When copying an anonymous
8349         union member loop around to handle nested anonymous unions.  Use
8350         the offset of the member relative to the outer structure, not the
8351         union.
8352
8353 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
8354
8355         * call.c (resolve_args): New fn.
8356         (build_new_function_call): Use it.
8357         (build_object_call): Likewise.
8358         (build_new_method_call): Likewise.
8359
8360 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
8361
8362         * call.c (build_over_call): tsubst all default parms from templates.
8363
8364 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
8365
8366         * decl.c (struct cp_function): Add static_labelno.
8367         (push_cp_function_context): Save it.
8368         (pop_cp_function_context): Restore it.
8369
8370 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
8371
8372         * typeck.c (build_component_ref_1): Convert from reference.
8373
8374 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8375
8376         * parse.y (current_declspecs, prefix_attributes): Initialize to
8377         NULL_TREE.
8378
8379         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
8380         before we try to force it to be a TREE_LIST.
8381         (decl): Make sure $1.t is non-nil.
8382
8383 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
8384
8385         * pt.c (uses_template_parms): Handle template first-parse codes.
8386
8387         * decl.c (cp_finish_decl): Only warn about user-defined statics.
8388
8389 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
8390
8391         * pt.c (unify): Handle BOOLEAN_TYPE.
8392
8393         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
8394         * pt.c (tsubst): Don't set it.
8395         * call.c (build_over_call): Use uses_template_parms.
8396
8397 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
8398
8399         * method.c (build_overload_nested_name): Use static_labelno
8400         instead of var_labelno.
8401         (build_qualified_name): New fn.
8402         (build_overload_name): Split out from here.
8403         (build_static_name): Use build_qualified_name.
8404         * decl.c (cp_finish_decl): Statics in extern inline functions 
8405         have comdat linkage.
8406         (start_function): Initialize static_labelno.
8407
8408 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8409
8410         * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
8411         before "all member functions in class [] are private"
8412
8413 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
8414
8415         * lex.c (do_scoped_id): convert_from_reference.
8416         * init.c (build_offset_ref): Likewise.
8417
8418 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
8419
8420         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
8421
8422 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
8423
8424         * typeck.c (get_member_function_from_ptrfunc): Promote index
8425         before saving it.
8426
8427 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
8428
8429         * tree.c (layout_basetypes): Move non-virtual destructor warning.
8430         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
8431
8432 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
8433
8434         * decl.c (grokdeclarator): Call add_defarg_fn for the function
8435         type, too.
8436         * lex.c (add_defarg_fn): Adjust.
8437         (do_pending_defargs): Adjust.  Don't skip the first parm.
8438
8439 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
8440
8441         * decl.c (build_enumerator): Global enumerators are also readonly.
8442
8443         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
8444         (build_dynamic_cast): Call it and convert_from_reference.
8445
8446         * lex.c (add_defarg_fn): New fn.
8447         (snarf_defarg): Don't add to defarg_types.
8448         (do_pending_defargs): Lose defarg_types.  All fns we process now
8449         have defargs.
8450         * decl.c (grokfndecl): Call add_defarg_fn.
8451
8452         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
8453         * cp-tree.def: Add DEFAULT_ARG.
8454         * spew.c (yylex): Call snarf_defarg as appropriate.
8455         * parse.y: New tokens DEFARG and DEFARG_MARKER.
8456         (defarg_again, pending_defargs, defarg, defarg1): New rules.
8457         (structsp): Use pending_defargs.
8458         (parms, full_parm): Use defarg.
8459         * lex.c (init_lex): Initialize inline_text_firstobj.
8460         (do_pending_inlines): Never pass the obstack to feed_input.
8461         (process_next_inline): Call end_input instead of restore_pending_input.
8462         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
8463         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
8464         * input.c (end_input): New fn.
8465         (sub_getch): At the end of some fed input, just keep returning EOF
8466         until someone calls end_input.
8467         Remove 'obstack' field from struct input_source.
8468         * decl.c (grokparms): Handle DEFAULT_ARG.
8469         (replace_defarg): New fn.
8470         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
8471
8472 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
8473
8474         * call.c (implicit_conversion): If nothing else works, try binding
8475         an rvalue to a reference.
8476
8477 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
8478
8479         * decl.c (init_decl_processing): fix Jun 30 patch -- move
8480         ifndef for Cygwin32 to include SIGSEGV.
8481
8482 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
8483
8484         * class.c (finish_struct_1): Only complain about pointers without
8485         copy stuff if there are any constructors.
8486
8487         * rtti.c (build_dynamic_cast): Call complete_type on the types.
8488
8489         * decl.c (grokfndecl): If the function we chose doesn't actually
8490         match, die.
8491
8492         * decl2.c (grokclassfn): Don't specify 'const int' for the
8493         artificial destructor parm.
8494
8495         * pt.c (type_unification): If we are called recursively, nothing 
8496         decays.
8497
8498 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
8499
8500         * decl.c (init_decl_processing): Stop trying to catch signals
8501         other than SIGABRT since the Cygwin32 library doesn't support
8502         them correctly yet.  This fixes a situation in which g++ causes
8503         a hang on SIGSEGVs and other such signals in our Win32-hosted
8504         tools.
8505
8506 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
8507
8508         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
8509
8510 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
8511
8512         * typeck2.c (store_init_value): Always return the value if our 
8513         type needs constructing.
8514
8515         * method.c (hack_identifier): Convert class statics from
8516         reference, too.
8517
8518 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
8519
8520         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
8521
8522 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
8523
8524         * typeck.c (c_expand_return): Make sure we clean up temporaries at
8525         the end of return x;
8526
8527 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8528
8529         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
8530
8531 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
8532
8533         * except.c (expand_builtin_throw): Add support
8534         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
8535
8536 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
8537
8538         * repo.c (extract_string): Null-terminate.
8539
8540         * cp-tree.h (TI_SPEC_INFO): New macro.
8541         (CLASSTYPE_TI_SPEC_INFO): New macro.
8542         * pt.c (push_template_decl): Correctly determine # of template parms 
8543         for partial specs.
8544
8545         * call.c (compare_ics): Really fix 'this' conversions.
8546
8547         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
8548         non-template fn.
8549
8550         * pt.c (push_template_decl): Complain about mismatch in # of
8551         template parms between a class template and a member template.
8552
8553 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
8554
8555         * method.c (synthesize_method): You can't call
8556         function_cannot_inline_p after finish_function.
8557         * decl.c (finish_function): Turn on flag_inline_functions and turn
8558         off DECL_INLINE before handing a synthesized method to the
8559         backend.
8560
8561 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
8562
8563         * method.c (synthesize_method): Remove July 30 change to never set
8564         DECL_INLINE if at_eof.
8565
8566 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
8567
8568         * xref.c (GNU_xref_member): Ensure that the node has a
8569         decl_lang_specific part before checking DECL_FRIEND_P.
8570
8571 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
8572
8573         * pt.c (instantiate_class_template): Diagnose non-class types used
8574         as bases.
8575
8576 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
8577
8578         * typeck.c (build_conditional_expr): Use convert_for_initialization
8579         instead of convert_and_check.
8580
8581 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8582
8583         * parse.y (typespec): Don't pedwarn for typeof.
8584
8585 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
8586
8587         * repo.c (finish_repo): Only check changes if we would write a
8588         repo file.
8589
8590         * call.c (compare_ics): Fix handling of 'this' conversions.
8591
8592         * pt.c (do_decl_instantiation): Support static data too.  Rename
8593         from do_function_instantiation.
8594         * cp-tree.h: Adjust.
8595         * parse.y: Adjust.
8596
8597         * repo.c (extract_string): New fn.
8598         (get_base_filename): Use it.
8599         (init_repo): Compare old args with current args.
8600
8601 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
8602
8603         * Makefile.in, Make-lang.in: Protect C-ls with a comment
8604         character, idea from Paul Eggert <eggert@twinsun.com>.
8605
8606 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
8607
8608         * typeck.c (c_expand_return): Be more persistent in looking for
8609         returned temps.
8610
8611         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
8612         pointer to reference.
8613
8614         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
8615
8616 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
8617
8618         * init.c (build_member_call, build_offset_ref):
8619         Use do_scoped_id instead of do_identifier.
8620
8621         * cvt.c (convert): Remove bogosity.
8622
8623 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8624
8625         * cvt.c (build_up_reference): Do checks of ARGTYPE and
8626         TARGET_TYPE before trying to use get_binfo.
8627
8628 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
8629
8630         * cvt.c (build_up_reference): Call get_binfo to get access control.
8631
8632         * decl2.c (import_export_decl): If we don't support weaks, leave
8633         statics undefined.
8634
8635 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
8636
8637         * except.c (expand_builtin_throw): Add support for machines that
8638         cannot access globals after throw's epilogue when
8639         -fno-sjlj-exceptions is used.
8640
8641 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
8642
8643         * parse.y: 'std::' becomes '::'.
8644         * lex.c (real_yylex): Remove 'namespace' warning.
8645         * init.c (build_member_call): Ignore 'std::'.
8646         (build_offset_ref): Likewise.
8647         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
8648         (do_toplevel_using_decl): Ignore 'using std::whatever'.
8649         * decl.c (push_namespace): Just sorry.
8650         (pop_namespace): Nop.
8651         (init_decl_processing): Declare std namespace.
8652
8653 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
8654
8655         * search.c (push_class_decls): A name which ambiguously refers to
8656         several instantiations of the same template just refers to the
8657         template.
8658
8659 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
8660
8661         * decl.c (build_enumerator): fix problem with unsigned long
8662         enumerated values being smashed to ints, causing overflow
8663         when computing next enumerated value. (for enum values around
8664         MAX_VAL).
8665
8666 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
8667
8668         * typeck.c (build_component_ref): Only call mark_used on a decl.
8669
8670 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8671
8672         * typeck.c (build_c_cast): Make the check for a ptr to function
8673         more specific before possible default_conversion call.
8674
8675 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
8676
8677         * except.c (expand_exception_blocks): Simplify and fix and make
8678         sure we don't end a region in a sequence, as expand_end_bindings
8679         doesn't like it.
8680
8681 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
8682
8683         * except.c (init_exception_processing): Mark terminate as not
8684         returning so that the optimizer can optimize better.
8685
8686 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
8687
8688         * cvt.c (convert): Don't do any extra work, if we can avoid it
8689         easily.
8690
8691 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
8692
8693         * *.[chy]: Change cp_convert to ocp_convert, change convert to
8694         cp_convert.  convert is now reserved for the backend, and doesn't
8695         have the semantics a frontend person should ever want.
8696
8697 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
8698
8699         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
8700         Lose -traditional support.
8701
8702 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
8703
8704         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
8705
8706         * parse.y (self_reference): Do it for templates, too.
8707         * class.c (pushclass): Don't overload_template_name; the alias
8708         generated by build_self_reference serves the same purpose.
8709
8710         * tree.c (list_hash): Make static, take more args.
8711         (list_hash_lookup): Likewise.
8712         (list_hash_add): Make static.
8713         (list_hash_canon): Lose.
8714         (hash_tree_cons): Only build a new node if one isn't already in the
8715         hashtable.
8716         (hash_tree_chain): Use hash_tree_cons.
8717         * cp-tree.h: Adjust.
8718         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
8719         of calling lookup_name.
8720
8721 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
8722
8723         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
8724         doesn't refer to the CONST_DECLs.
8725
8726 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
8727
8728         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
8729         is bigger.
8730         (expand_class_desc): Convert the last argument to a sizetype.
8731
8732 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8733
8734         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
8735         __real__): Add reswords.
8736         * hash.h: Regenerate.
8737         * lex.h (rid): Add RID_COMPLEX.
8738         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
8739         * lex.c (init_lex): Add building of RID_COMPLEX.
8740         (real_yylex): General cleanup in line with what c-lex.c also has,
8741         sans the cruft for traditional; add handling of SPEC_IMAG, complex
8742         types, and imaginary numeric constants.
8743         * parse.y (REALPART, IMAGPART): Add tokens.
8744         (unary_expr): Add REALPART and IMAGPART rules.
8745         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
8746         * decl.c (complex_{integer,float,double,long}_type_node): Define
8747         types.
8748         (init_decl_processing): Set up the types.
8749         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
8750         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
8751         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
8752         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
8753         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
8754         COMPLEX_TYPE case.
8755         * method.c (build_overload_name): Add handling of the different
8756         COMPLEX_TYPEs, prefixing them with `J'.
8757         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
8758         as a template parm.
8759         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
8760         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
8761         (mapcar): Handle COMPLEX_CST.
8762         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
8763         (common_type): Add code for complex types.
8764         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
8765         (convert_for_assignment): Likewise.
8766         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
8767
8768 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
8769
8770         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
8771         tsubst_expr, as it might try to do overload resolution.
8772
8773 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
8774
8775         * pt.c (instantiate_class_template): Oops.
8776
8777 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
8778
8779         * cp-tree.def: Add TAG_DEFN.
8780         * pt.c (tsubst_enum): New fn.
8781         (instantiate_class_template): Use it.
8782         (tsubst_expr): Support TAG_DEFN.
8783         (tsubst): Support local enums.
8784         (tsubst_copy): Likewise.
8785         * decl.c (finish_enum): Likewise.
8786         (start_enum): If this is a local enum, switch to permanent_obstack.
8787
8788 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
8789
8790         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
8791         (finish_function): Put the base init code for constructors just
8792         after the parm cleanup insns.
8793         (struct cp_function): Add last_parm_cleanup_insn.
8794         (push_cp_function_context): Likewise.
8795         (pop_cp_function_context): Likewise.
8796         
8797 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
8798
8799         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
8800
8801 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8802
8803         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
8804         for THUNK_FNDECL before we switch to temporary allocation.
8805
8806 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
8807
8808         * call.c (build_new_op): Handle null arg2 for ?:.
8809
8810 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
8811
8812         * except.c (expand_exception_blocks): Ensure that we flow through
8813         the end of the exception region for the exception specification.
8814         Move exception region for the exception specification in, so that
8815         it doesn't protect the parm cleanup.  Remove some obsolete code.
8816         * decl.c (store_parm_decls): Likewise.
8817         (finish_function): Likewise.
8818
8819 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
8820
8821         * init.c (build_new): Fix nothrow handling.
8822
8823 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8824
8825         * init.c (emit_base_init): Don't warn about the initialization
8826         list for an artificial member.
8827
8828 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8829
8830         * expr.c (do_case): Handle !START case for the error msg.
8831
8832 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
8833
8834         * decl2.c, lang-options.h: New option -Weffc++.
8835         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
8836         to -Weffc++.
8837
8838         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
8839         to MULTIPLE_SYMBOL_SPACES.
8840
8841 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
8842
8843         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
8844
8845         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
8846
8847         * typeck.c (c_expand_return): Don't complain about returning void
8848         to void in an artificial function.
8849         * method.c (make_thunk): Change settings of READONLY/VOLATILE, 
8850         don't set DECL_RESULT, set DECL_ARTIFICIAL.
8851         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. 
8852
8853 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
8854
8855         * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
8856         exception handling.
8857         * except.c (init_exception_processing): Likewise.
8858         (expand_end_catch_block): Likewise.
8859         (expand_exception_blocks): Likewise.
8860         (expand_throw): Likewise.
8861         * exception.cc (__default_terminate): Likewise.
8862
8863         * init.c (perform_member_init): Use new method of expr level
8864         cleanups, instead of cleanups_this_call and friends.
8865         (emit_base_init): Likewise.
8866         (expand_aggr_vbase_init_1): Likewise.
8867         (expand_vec_init): Likewise.
8868         * decl.c (cp_finish_decl): Likewise.
8869         (expand_static_init): Likewise.
8870         (store_parm_decls): Likewise.
8871         (cplus_expand_expr_stmt): Likewise.
8872         * decl2.c (finish_file): Likewise.
8873         
8874         * Make-lang.in (exception.o): Ok to compile with -O now.
8875
8876         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
8877         we know it will be done later by the backend.
8878
8879         * decl2.c (lang_f_options): Remove support for short temps.
8880         * lang-options.h: Likewise.
8881         
8882 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
8883
8884         * tree.c (varargs_function_p): New fn.
8885         * method.c (emit_thunk): Replace broken generic code with code to
8886         generate a heavyweight thunk function.
8887
8888 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
8889
8890         * pt.c (process_template_parm): pedwarn about floating-point parms.
8891
8892         * decl.c (grokdeclarator): inline no longer implies static.
8893
8894         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
8895
8896 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
8897
8898         * class.c (check_for_override): The signature of an overriding
8899         function is not changed.
8900
8901         * call.c (build_over_call): Move setting of conv into the loop.
8902         Note: this change, along with the related changes of the 18th thru
8903         the 20th of April, fix an infinite loop problem in conversions.
8904
8905 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
8906
8907         * call.c (build_user_type_conversion_1): Really ignore rvalue
8908         conversions when looking for a REFERENCE_TYPE.
8909
8910         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
8911         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
8912         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
8913         (build_unary_op): Likewise.
8914         * call.c (build_over_call): See through a CONVERT_EXPR around the
8915         ADDR_EXPR for on a temporary.
8916         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
8917         the ADDR_EXPR for a local variable.
8918
8919 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
8920
8921         * call.c (build_user_type_conversion_1): If we're trying to
8922         convert to a REFERENCE_TYPE, only consider lvalue conversions.
8923         (build_new_function_call): Print candidates.
8924         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
8925         (reference_binding): Binding a temporary of a reference-related type
8926         is BAD.
8927
8928 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8929
8930         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
8931         * tinfo2.cc (type_info::before): Likewise.
8932
8933 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
8934
8935         * call.c (implicit_conversion): Oops.
8936
8937 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
8938
8939         * call.c (implicit_conversion): Try to find a reference conversion
8940         before binding a const reference to a temporary.
8941
8942 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
8943
8944         * exception.cc (__default_unexpected): Call terminate by default,
8945         so that if the user overrides terminate, the correct function will
8946         be called.
8947         
8948 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
8949
8950         * parse.y (left_curly): Avoid trying to use any fields of
8951         error_mark_node, as there aren't any.
8952
8953 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
8954
8955         * lex.c (do_identifier): Avoid breaking on overloaded methods
8956         as default arguments.
8957
8958 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
8959
8960         * call.c (add_template_candidate): Initialize the variable "dummy".
8961
8962 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
8963
8964         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
8965         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
8966
8967 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
8968
8969         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
8970         (debug_binfo): Delete decl, not needed.
8971
8972         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
8973         promotes_to_aggr_type): Delete fns.
8974         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
8975         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
8976         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
8977
8978         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
8979
8980         * friend.c (is_friend_type): Delete fn.
8981         * cp-tree.h (is_friend_type): Delete decl.
8982
8983         * decl.c (original_result_rtx, double_ftype_double,
8984         double_ftype_double_double, int_ftype_int, long_ftype_long,
8985         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
8986         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
8987
8988         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
8989         fwd decls.
8990         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
8991
8992         * decl.c (pushdecl_nonclass_level): #if 0, unused.
8993         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
8994
8995         * lex.c (reinit_lang_specific): #if 0, unused.
8996         * cp-tree.h (reinit_lang_specific): #if 0 decl.
8997
8998         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
8999         * cp-tree.h (revert_static_member_fn): Delete decl.
9000
9001         * class.c (root_lang_context_p): Delete fn.
9002         * cp-tree.h (root_lang_context_p): Delete decl.
9003
9004         * decl.c (set_current_level_tags_transparency): #if 0, unused.
9005         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
9006
9007         * lex.c (set_vardecl_interface_info): Make static.
9008         * cp-tree.h (set_vardecl_interface_info): Delete decl.
9009
9010         * call.c (find_scoped_type): Make static.
9011         * cp-tree.h (find_scoped_type): Delete decl.
9012
9013         * search.c (convert_pointer_to_vbase): Make static.
9014         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
9015
9016         * decl.c (const_ptr_type_node): Likewise.
9017         * cp-tree.h (const_ptr_type_node): Delete decl.
9018
9019         * typeck.c (common_base_type): Make static.
9020         * cp-tree.h (common_base_types): Delete erroneous decl.
9021
9022         * pt.c (classtype_mangled_name): Make static.
9023         * cp-tree.h (classtype_mangled_name): Delete decl.
9024
9025         * lex.c (check_newline): Make static.
9026         * cp-tree.h (check_newline): Delete decl.
9027
9028         * typeck.c (build_x_array_ref): Delete fn, same idea as
9029         grok_array_decl.
9030         * cp-tree.h (build_x_array_ref): Delete decl.
9031
9032         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
9033         copy_lang_decl.
9034         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
9035
9036         * class.c (build_vtable_entry): Make static.
9037         * cp-tree.h (build_vtable_entry): Delete decl.
9038
9039         * class.c (build_vbase_pointer): Make static.
9040         * cp-tree.h (build_vbase_pointer): Delete decl.
9041
9042         * sig.c (build_sptr_ref): Add forward decl and make static.
9043         * cp-tree.h (build_sptr_ref): Delete decl.
9044
9045         * call.c (build_new_method_call): Add forward decl and make static.
9046         * cp-tree.h (build_new_method_call): Delete decl.
9047
9048         * call.c (build_object_call): Make static.
9049         * class.c (check_for_override, complete_type_p, mark_overriders):
9050         Likewise.
9051         * decl.c (cp_function_chain): Likewise.
9052         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
9053         Likewise.
9054         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
9055         Likewise.
9056         * tree.c (build_cplus_array_type_1): Likewise.
9057         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
9058         (comp_target_parms): Likewise.
9059
9060         * init.c (build_builtin_call): Make static.
9061         * cp-tree.h (build_builtin_call): Delete decl.
9062
9063         * typeck.c (binary_op_error): Delete decl.
9064         * cp-tree.h (binary_op_error): Likewise.
9065
9066 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9067
9068         * call.c (build_method_call): Compare against error_mark_node
9069         directly, rather than the ERROR_MARK tree code.
9070         * cvt.c (cp_convert): Likewise.
9071         * decl.c (print_binding_level): Likewise.
9072         (duplicate_decls): Likewise.
9073         (grokdeclarator): Likewise.
9074         (grokdeclarator): Likewise.
9075         * init.c (expand_aggr_init_1): Likewise.
9076         (decl_constant_value): Likewise.
9077         * method.c (build_opfncall): Likewise.
9078         (hack_identifier): Likewise.
9079         * typeck.c (build_modify_expr): Likewise.
9080
9081         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
9082
9083 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9084
9085         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
9086
9087         * pt.c (coerce_template_parms): Add new error message.
9088
9089         * method.c (build_overload_value): Implement name mangling for
9090         floating-point template arguments.
9091
9092         * method.c (build_overload_int, icat, dicat): Fix mangling of template
9093         arguments whose absolute value doesn't fit in a signed word.
9094
9095 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9096
9097         * friend.c: New file; put all of the friend stuff in here.
9098         * init.c: Instead of here.
9099         * Makefile.in (CXX_OBJS): Add friend.o.
9100         (friend.o): Add dependencies.
9101         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
9102
9103 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
9104
9105         * call.c (build_scoped_method_call): Complain if the scope isn't a
9106         base.
9107
9108 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
9109
9110         * parse.y (left_curly): Don't crash on erroneous type.
9111
9112         * init.c (build_delete): Fix type of ref.
9113
9114 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
9115
9116         * search.c (get_vbase_1): Renamed from get_vbase.
9117         (get_vbase): Wrapper, now non-static.
9118         (convert_pointer_to_vbase): Now static.
9119
9120         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
9121         * init.c (build_delete): Pass one.
9122         (build_partial_cleanup_for): Use build_scoped_method_call.
9123         * decl.c (finish_function): Pass a binfo.
9124
9125 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
9126
9127         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
9128
9129         * typeck.c (build_c_cast): Lose other reference to flag.
9130
9131         * call.c (build_field_call): Don't look for [cd]tor_identifier.
9132         * decl2.c (delete_sanity): Remove meaningless use of
9133         LOOKUP_HAS_IN_CHARGE.
9134         * decl.c (finish_function): Use build_scoped_method_call instead
9135         of build_delete for running vbase dtors.
9136         * init.c (build_delete): Call overload resolution code instead of
9137         duplicating it badly.
9138
9139 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
9140
9141         * call.c (build_over_call): Call mark_used before trying to elide
9142         the call.
9143
9144         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
9145
9146 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9147
9148         * typeck.c (build_modify_expr): Always pedwarn for a cast to
9149         non-reference used as an lvalue.
9150
9151 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
9152
9153         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
9154
9155 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
9156
9157         * parse.y (handler): Fix template typo.
9158
9159 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
9160
9161         * error.c (lang_decl_name): New fn.
9162         * tree.c (lang_printable_name): Use it.
9163
9164 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
9165
9166         * g++spec.c: Include config.h so that we can catch bzero #defines
9167         from the config file.
9168
9169 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
9170
9171         * new1.cc: Include a declaration for malloc, to avoid warning, and
9172         avoid lossing on systems that require one (ones that define malloc
9173         in xm.h).
9174
9175 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
9176
9177         * decl2.c (max_tinst_depth): New variable.
9178         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
9179         option.
9180         * pt.c (max_tinst_depth): Variable moved.
9181         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
9182         as legal.
9183
9184 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
9185
9186         * decl.c (xref_basetypes): Allow a base class that depends on
9187         template parms to be incomplete.
9188
9189         * decl2.c (build_expr_from_tree): Support typeid(type).
9190         * rtti.c (get_typeid): Support templates.
9191         (expand_si_desc, expand_class_desc): Fix string length.
9192         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
9193
9194 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
9195
9196         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
9197
9198         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
9199
9200 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
9201
9202         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
9203         smashes together template and non-template decls of the same
9204         signature.
9205
9206 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
9207
9208         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
9209
9210 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9211
9212         * decl.c (duplicate_decls): Next route, pedwarn about different
9213         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
9214
9215 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9216
9217         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
9218         (struct lang_type): Delete has_default_implementation member.
9219         Increase dummy to 21.
9220         * decl.c (start_method): Delete usage.
9221
9222         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
9223         store_after_parms, start_decl_1, auto_function): Add decls.
9224         (get_arglist_len_in_bytes, declare_implicit_exception,
9225         have_exceptions_p, make_type_decl, typedecl_for_tag,
9226         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
9227         build_component_type_expr, cplus_exception_name,
9228         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
9229         * call.c (build_this): Make static.
9230         (is_complete): Likewise.
9231         (implicit_conversion): Likewise.
9232         (reference_binding): Likewise.
9233         (standard_conversion): Likewise.
9234         (strip_top_quals): Likewise.
9235         (non_reference): Likewise.
9236         (build_conv): Likewise.
9237         (user_harshness): Likewise.
9238         (rank_for_ideal): Likewise.
9239         * decl.c (start_decl_1): Delete forward decl.
9240         (push_decl_level): Make static.
9241         (resume_binding_level): Make static.
9242         (namespace_bindings_p): Make static.
9243         (declare_namespace_level): Make static.
9244         (lookup_name_real): Make static.
9245         (duplicate_decls): Make static.  Take register off NEWDECL and
9246         OLDDECL parm decls.
9247         * decl2.c (get_sentry): Make static.
9248         (temp_name_p): Delete fn.
9249         * except.c (auto_function): Delete decl.
9250         * lex.c (handle_{cp,sysv}_pragma): Make static.
9251         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
9252         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
9253         * pt.c (tsubst_expr_values): Make static.
9254         * rtti.c (combine_strings): Delete decl.
9255
9256 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
9257
9258         * pt.c (push_template_decl): Handle getting a typedef.
9259
9260         * call.c (build_new_function_call): Complain about void arg.
9261
9262 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9263
9264         * decl.c (duplicate_decls): Give pedwarn of different exceptions
9265         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
9266
9267 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
9268
9269         * except.c (expand_throw): Don't expand the cleanup tree here,
9270         since we are not going to write the rtl out.  Fixes problem with
9271         -g -O on SPARC.
9272
9273 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
9274
9275         * Make-lang.in: Add $(exeext) as necessary.
9276
9277 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
9278
9279         * parse.y (handler_seq): Must have at least one catch clause.
9280
9281 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
9282
9283         * call.c (add_builtin_candidate): Restore ?: hack.
9284
9285         * decl.c (grok_op_properties): More warnings.
9286
9287 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9288
9289         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
9290         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
9291
9292         * decl.c (duplicate_decls): Scale back to a warning, and only do
9293         'em if -pedantic.
9294
9295 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
9296
9297         * decl.c (duplicate_decls): pedwarn mismatched exception
9298         specifications.
9299
9300 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
9301
9302         * call.c (build_new_method_call): Don't display the invisible
9303         argument for controlling virtual bases.
9304
9305 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
9306
9307         * new: Add nothrow new and delete, bad_alloc and throw specifications
9308         for delete.
9309         * decl.c (init_decl_processing): Add throw specification for delete.
9310         * new.cc (nothrow): Define.
9311         * lex.c (real_yylex): Removing warning that throw and friends are
9312         keywords.
9313         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
9314         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
9315         * Make-lang.in: Add new{1,2}.{cc,o}.
9316
9317 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
9318
9319         * lex.c (cons_up_default_function): Fix return type of synth op=.
9320
9321         * init.c (emit_base_init): Add warnings for uninitialized members
9322         and bases.
9323
9324         * decl.c (xref_basetypes): Add warning for non-polymorphic type
9325         with destructor used as base type.
9326
9327         * decl.c (grok_op_properties): Add warning for op= returning void.
9328         * typeck.c (c_expand_return): Add warning for op= returning anything
9329         other than *this.
9330
9331         * class.c (finish_struct_1): Add warning for class with pointers
9332         but not copy ctor or copy op=.
9333
9334         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
9335         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
9336         (instantiate_template): If -fexternal-templates, add this
9337         instantiation to pending_templates.
9338
9339         * decl2.c (copy_assignment_arg_p): Disable old hack to support
9340         Booch components.
9341
9342 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
9343
9344         * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
9345
9346 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
9347
9348         * call.c (standard_conversion): Handle getting references.  Tack
9349         on RVALUE_CONV here.  Do it for non-class types, too.
9350         (reference_binding): Pass references to standard_conversion.
9351         (implicit_conversion): Likewise.
9352         (add_builtin_candidate): Disable one ?: kludge.
9353         (convert_like): Handle RVALUE_CONVs for non-class types.
9354         (joust): Disable the other ?: kludge.
9355
9356 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9357
9358         * decl.c (init_decl_processing): Add code to build up common
9359         function types beforehand, to avoid creation then removal of
9360         things already in the hash table.
9361
9362 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
9363
9364         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
9365         the arguments.
9366
9367         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
9368         current_template_parms.
9369
9370 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
9371
9372         * search.c (lookup_field): Don't return a function, check want_type.
9373
9374 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9375
9376         * init.c (build_new): Make sure PLACEMENT has a type.
9377
9378 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
9379
9380         * init.c (build_new): Support new (nothrow).
9381
9382 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
9383
9384         * pt.c (instantiate_decl): Also do push_to_top_level before setting
9385         up DECL_INITIAL.
9386
9387         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
9388         * pt.c (tsubst): Defer instantiation of default args.
9389         * call.c (build_over_call): Until here.
9390
9391 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9392
9393         * search.c (lookup_field): Make sure we have an
9394         IDENTIFIER_CLASS_VALUE before we try to return it.
9395
9396 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
9397
9398         * call.c (build_method_call): Delete unused var PARM.
9399         (build_overload_call_real): Likewise.
9400         (build_object_call): Delete unused var P.
9401         (build_new_op): Likewise.
9402         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
9403         var definitions, which are never used.
9404         (shadow_tag): Delete unused var FN.
9405         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
9406         * init.c (build_new): Delete unused var ALLOC_TEMP.
9407         * method.c (hack_identifier): Delete unused var CONTEXT.
9408         (do_build_copy_constructor): Delete unused var NAME.
9409         (synthesize_method): Delete unused var BASE.
9410         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
9411         * rtti.c (build_headof): Delete unused var VPTR.
9412         (get_typeid): Delete unused var T.
9413         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
9414         and ORIG_OP2.
9415         (build_ptrmemfunc): Delete unused vars U and NINDEX.
9416         * typeck2.c (build_functional_cast): Delete unused var BINFO.
9417
9418 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
9419
9420         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
9421         things in a type being defined.
9422         * decl.c (finish_enum): Reverse the values so that they are in
9423         the correct order.
9424
9425         * pt.c (instantiate_class_template): Don't initialize
9426         BINFO_BASETYPES until the vector is filled out.
9427         (unify): Don't abort on conflicting bindings, just fail.
9428         (instantiate_decl): Do push_tinst_level before any tsubsting.
9429
9430         * method.c (build_overload_value): Handle getting a
9431         TEMPLATE_CONST_PARM for a pointer.
9432
9433 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
9434
9435         * init.c (expand_member_init): Don't give 'not a base' error for
9436         templates.
9437
9438         * pt.c (instantiate_decl): Call import_export_decl later.
9439
9440         * pt.c (instantiate_class_template): Return a value.
9441
9442         * parse.y (extension): New rule for __extension__.
9443         (extdef, unary_expr, decl, component_decl): Use it.
9444
9445 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
9446
9447         * class.c (base_binfo): Remove unused base_has_virtual member.
9448         (finish_base_struct): Likewise.
9449         (finish_struct_1): Likewise.
9450
9451 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
9452
9453         * search.c (expand_upcast_fixups): Fix bogus code generation
9454         problem where the generated code uses the wrong index into the
9455         runtime built vtable on the stack.  Old code could clobber random
9456         stack values.
9457
9458 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
9459
9460         * init.c (perform_member_init): Make sure the partial EH cleanups
9461         live on the function_obstack.
9462
9463 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
9464
9465         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
9466         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
9467
9468 Tue Dec 24 10:24:03 1996  Jeffrey A Law  (law@cygnus.com)
9469
9470         * decl.c (grokvardecl): Avoid ANSI style initialization.
9471
9472 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
9473
9474         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
9475
9476 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
9477
9478         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
9479
9480 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9481
9482         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
9483         arguments we compare against.  Start the count of I at 1, not 0,
9484         since argv[0] is still the command.
9485
9486 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
9487
9488         * lang-specs.h: Accept .cp as an C++ extension.
9489
9490 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9491
9492         * cp-tree.h (ptr_reasonably_similar): Add decl.
9493
9494 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9495
9496         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
9497         pointer.  New local SPECBITS with the parm's value.
9498         (grokdeclarator): Pass &specbits down.
9499
9500         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
9501         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
9502
9503         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
9504         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
9505
9506         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
9507         not an error_mark_node.
9508
9509 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
9510
9511         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
9512         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
9513         
9514 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9515
9516         * decl.c (grokdeclarator): When giving an anonymous struct a name,
9517         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
9518         not affected).
9519
9520         * typeck2.c (build_m_component_ref): If component is a pointer
9521         to data member, resolve the OFFSET_REF now.
9522
9523         * call.c (convert_like): Don't go into infinite recursion.
9524
9525         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
9526
9527         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
9528         * tree.c (layout_basetypes): And on the vbase ptr.
9529
9530 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
9531
9532         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
9533         CHAR_TYPE_SIZE so bool is always the same size as another type.
9534
9535         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
9536
9537 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
9538
9539         * decl2.c (grok_x_components): Remove synthesized methods from
9540         TYPE_METHODS of an anonymous union, complain about member
9541         functions.
9542         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
9543         anonymous unions.
9544         (finish_function): Just clear the DECL_RTL of our arguments.
9545
9546 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9547
9548         * decl2.c (finish_file): Emit DWARF debugging info for static data
9549         members.
9550
9551         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
9552
9553 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
9554
9555         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
9556         IDENTIFIER_NODE.
9557
9558 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
9559
9560         * Make-lang.in (g++-cross$(exeext)): Fix typo.
9561
9562 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9563
9564         Make the g++ driver now be a standalone program, rather than one
9565         that tries to run the gcc driver after munging up the options.
9566         * Make-lang.in (g++.c, g++spec.o): New rules.
9567         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
9568         added.
9569         (g++$(exeext)): New rule, based on xgcc rule.
9570         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
9571         * g++spec.c: New file.
9572         * g++.c: Removed file.
9573
9574 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
9575
9576         * cvt.c (build_up_reference): Arrange for any temporary values
9577         that have been keep in registers until now to be put into memory.
9578
9579 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9580
9581         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
9582         that make -j3 bootstrap works better.
9583
9584 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
9585
9586         * decl.c (pushtag): Do pushdecl for anon tags.
9587
9588 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
9589
9590         * typeck.c (c_expand_return): Fix logic.
9591         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
9592
9593 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
9594
9595         * g++.c (main): Make sure arglist has a final NULL entry.  Add
9596         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
9597         stdin/stdout of the invoked program are redirected to
9598         nowheresville.
9599
9600 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
9601
9602         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
9603
9604 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
9605
9606         * init.c (resolve_offset_ref): Handle obj.vfn better.
9607         * typeck.c (build_component_ref): Set TREE_TYPE on result from
9608         build_vfn_ref.
9609
9610 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
9611
9612         * typeck.c (convert_for_assignment): Also handle anachronistic
9613         implicit conversions from (::*)() to cv void*.
9614         * cvt.c (cp_convert_to_pointer): Likewise.
9615
9616 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
9617
9618         * lex.c (handle_cp_pragma): Fix bogus warning.
9619
9620 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
9621
9622         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
9623         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
9624
9625 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9626
9627         * class.c (finish_struct_1): Support DWARF2_DEBUG.
9628         * search.c (dfs_debug_mark): Likewise.
9629         * decl2.c (finish_vtable_vardecl): Likewise.
9630         * decl.c (pushtag, finish_enum): Likewise.
9631         * lex.c (check_newline): Use debug_* instead of calling *out
9632         functions directly.
9633
9634 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9635
9636         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
9637         on some picky hosts.
9638
9639 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
9640
9641         * class.c (finish_struct_1): A class has a non-trivial copy
9642         constructor if it has virtual functions.
9643
9644         * cvt.c (cp_convert): Always call a constructor.
9645
9646         * call.c (reference_binding): Still tack on a REF_BIND
9647         for bad conversions.
9648         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
9649
9650         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
9651         (c_expand_return): Likewise.
9652         * typeck2.c (digest_init): Likewise for { }.
9653         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
9654         * cvt.c (cp_convert): Handle failure better.
9655
9656 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9657
9658         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
9659         of GCC be path-relative. 
9660
9661 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
9662
9663         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
9664         it does need choose-temp.o and pexecute.o.
9665
9666 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9667
9668         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
9669         that we still use it.
9670         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
9671
9672 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
9673
9674         * init.c (expand_default_init): Avoid calling constructors to 
9675         initialize reference temps.
9676
9677         * cvt.c (convert_to_reference): Fix.
9678
9679 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
9680
9681         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
9682         (convert_to_reference): Likewise.
9683         * typeck.c (convert_for_initialization): Likewise.
9684         * init.c (expand_default_init): Likewise.
9685         (expand_aggr_init_1): Likewise.
9686         * cp-tree.h (CONV_NONCONVERTING): Lose.
9687         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
9688         * *.c: Adjust.
9689         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
9690
9691 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
9692
9693         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
9694
9695 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9696
9697         * init.c (expand_aggr_init_1): Don't crash on non-constructor
9698         TARGET_EXPR.
9699
9700 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9701
9702         * g++.c: Include gansidecl.h.
9703         (VPROTO, PVPROTO, VA_START): Delete.
9704         (choose_temp_base_try, choose_temp_base, perror_exec,
9705         run_dos) [__MSDOS__]: Delete fns.
9706         (pfatal_with_name): Delete fn.
9707         (temp_filename): Declare like in gcc.c.
9708         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
9709         (error_count, signal_count): Define.
9710         (error): Delete both definitions.
9711         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
9712         (pfatal_pexecute): Add fn from gcc.c.
9713         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
9714         code to use the pexecute stuff also used by gcc.c.
9715         (MIN_FATAL_STATUS): Define.
9716         * Make-lang.in (g++): Add dependency on and linking with
9717         choose-temp.o and pexecute.o.
9718
9719         * cp-tree.h: Include gansidecl.h.
9720         (STDIO_PROTO): Delete #undef/#define.
9721         * cvt.c (NULL): Delete #undef/#define.
9722         * expr.c (NULL): Likewise.
9723         * init.c (NULL): Likewise.
9724         * rtti.c (NULL): Likewise.
9725         * xref.c (NULL): Likewise.
9726
9727         * cp-tree.h (build_user_type_conversion): Add prototype.
9728         * call.c (build_user_type_conversion): Delete prototype.  Correct
9729         decl of FLAGS arg to be an int.
9730         * cvt.c (build_user_type_conversion): Likewise.
9731
9732 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
9733
9734         * cp-tree.def: Add TRY_BLOCK and HANDLER.
9735         * except.c (expand_start_catch_block): Support templates.
9736         * parse.y (try_block, handler_seq): Likewise.
9737         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9738
9739 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
9740
9741         * pt.c (current_template_args): New fn.
9742         (push_template_decl): Use it.
9743         * decl.c (grokdeclarator): Use it.
9744
9745         * decl2.c (build_expr_from_tree): Dereference ref vars.
9746
9747         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
9748         the decl-specifier-seq.
9749
9750         * decl.c (grok_op_properties): Don't force the type of a conversion
9751         op to be complete.  Don't warn about converting to the same type
9752         for template instantiations.
9753
9754         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
9755         methods.
9756
9757 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
9758
9759         * typeck.c (get_delta_difference): Remove previous bogusness.
9760         Don't give errors if force is set.
9761
9762 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
9763
9764         * decl2.c (finish_file): Don't emit debug info.
9765         * decl.c (pushdecl): Lose obsolete code.
9766         (grokdeclarator): Still do the long long thing after complaining.
9767         * search.c (note_debug_info_needed): Don't do anything if we're in a 
9768         template.
9769         * method.c (synthesize_method): For non-local classes,
9770         push_to_top_level first.
9771
9772 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
9773
9774         * typeck.c (get_delta_difference): Add no_error parameter.
9775         (build_ptrmemfunc): Call get_delta_difference with no_error set;
9776         we don't want error messages when converting unrelated
9777         pointer-to-member functions.
9778
9779 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
9780
9781         * error.c (dump_expr): Improve the wording on error messages that
9782         involve pointer to member functions.
9783
9784 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
9785
9786         * cvt.c (cp_convert_to_pointer): Move code for conversions from
9787         (::*)() to void* or (*)() up a bit, so that we can convert from
9788         METHOD_TYPEs as well.
9789
9790 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9791
9792         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
9793         There are no 'member' types.
9794         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
9795         (build_x_typeid): Handle errors.
9796
9797 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
9798
9799         * typeck.c (convert_for_assignment): Handle anachronistic implicit
9800         conversions from (::*)() to void* or (*)().
9801         * cvt.c (cp_convert_to_pointer): Likewise.
9802         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
9803         conversions from here.
9804         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
9805         * lang-options.h: Likewise.
9806         * decl2.c (warn_pmf2ptr): Define.
9807         * cp-tree.h: Declare it.
9808         * typeck2.c (digest_init): Allow pmfs down into
9809         convert_for_initialization.
9810
9811 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
9812
9813         * typeck.c (c_expand_return): Fix for returning overloaded fn.
9814
9815 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9816
9817         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
9818         * decl.c (grok_reference_init): Pass DIRECT_BIND.
9819         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
9820         DIRECT_BIND.
9821         * call.c (convert_like): Don't pass INDIRECT_BIND.
9822         * typeck.c (convert_arguments): Likewise.
9823         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
9824
9825 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
9826
9827         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
9828         similar code in build_up_ref.
9829         * cvt.c (build_up_reference): Drastically simplify.
9830
9831 Mon Oct 28 12:45:05 1996  Jeffrey A Law  (law@cygnus.com)
9832
9833         * typeck.c (signed_or_unsigned_type): If the given type already
9834         as the correct signedness, then just return it.
9835
9836         * typeck.c ({un,}signed_type): If can't do anything, call
9837         signed_or_unsigned_type.
9838
9839 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
9840
9841         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
9842         current_class_type is NULL.
9843
9844 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
9845
9846         * class.c (finish_struct_1): Avoid empty structs by adding a field
9847         so layout_type gets the mode right.
9848
9849         * typeck.c (c_expand_return): Drastically simplify.
9850
9851 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
9852
9853         * typeck.c (decay_conversion): Handle overloaded methods.
9854
9855 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
9856
9857         * call.c (build_over_call): A TARGET_EXPR has side-effects.
9858
9859 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
9860
9861         * cvt.c (convert_to_pointer_force): Add code to support pointer to
9862         member function to pointer to function conversions.
9863         * init.c (resolve_offset_ref): Add code to allow faked up objects,
9864         ignoring them if they are not used, and giving an error, if they
9865         are needed.
9866         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
9867         code, and so that we can give an error, if we needed an object,
9868         and one was not provided.
9869         (build_c_cast): Don't call default_conversion when we want to
9870         convert to pointer to function from a METHOD_TYPE.
9871
9872 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
9873
9874         * Make-lang.in (cplib2.ready): Fix logic.
9875
9876         * decl.c (shadow_tag): Only complain about non-artificial function
9877         members.
9878
9879         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
9880
9881 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
9882
9883         * expr.c (cplus_expand_expr): Pre-tweak call_target like
9884         expand_inline_function would.
9885
9886         * pt.c (mark_decl_instantiated): If extern_p, call
9887         mark_inline_for_output.
9888
9889 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
9890
9891         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
9892         pmd conversions.
9893
9894         * typeck.c (get_delta_difference): Fix wording, as we can be used
9895         for pointer to data members.
9896
9897 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
9898
9899         * pt.c (tsubst): If the function decl isn't a member of this
9900         template, return a copy of the decl (including copying the
9901         lang-specific part) so we don't hose ourselves later.
9902
9903 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
9904
9905         * class.c (finish_struct): Remove DWARF-specific tag handling.
9906         * decl.c (pushtag): Likewise.
9907         (finish_function): Always clear DECL_ARGUMENTS on function decls with
9908         no saved RTX.
9909         * decl2.c (finish_file): Emit DWARF debugging info for static data
9910         members.
9911
9912 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
9913
9914         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
9915         isn't the same as the new one before we whack it.
9916
9917 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
9918
9919         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
9920         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
9921         warn_traditional and warn_strict_prototypes; remove ancient
9922         'overload' code; remove references to flag_traditional.
9923
9924 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
9925
9926         * input.c (sub_getch): Handle 8-bit characters in string literals.
9927
9928 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
9929
9930         * tree.c (mapcar): Handle CONSTRUCTORs.
9931         (copy_to_permanent): Handle expression_obstack properly.
9932
9933         * Make-lang.in (cplib2.txt): Also depend on the headers.
9934
9935         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
9936         INT_TYPE_SIZE.
9937         (expand_class_desc): Use USItype for offset field.
9938         * tinfo.h (struct __class_type_info): Likewise.
9939
9940         * method.c (build_overload_int): TYPE_PRECISION should be applied
9941         to types.
9942
9943 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
9944
9945         * call.c (build_new_op): A COND_EXPR involving void must be a
9946         builtin.
9947
9948 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
9949
9950         * typeck.c (build_x_component_ref): New fn.
9951         (build_object_ref): Use it.
9952         * parse.y (primary): Use it.
9953         * decl2.c (build_expr_from_tree): Use it.
9954         * cp-tree.h: Declare it.
9955
9956         * decl.c (start_decl): variable-sized arrays cannot be initialized.
9957         * error.c (dump_type_suffix): Handle variable arrays.
9958
9959 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9960
9961         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
9962
9963 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9964
9965         * decl.c (lookup_name_real): Don't try to look up anything in a
9966         TYPENAME_TYPE.
9967
9968         * tinfo2.cc (__throw_type_match_rtti): Oops.
9969
9970 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9971
9972         * Make-lang.in (exception.o): Use -fno-PIC for now.
9973
9974 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
9975
9976         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
9977         calling them.
9978         (get_tinfo_fn_dynamic): Extracted from build_typeid.
9979         * tinfo2.cc (__dynamic_cast): Adjust.
9980         
9981         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
9982         (build_x_typeid): Likewise.
9983
9984         * parse.y: Call build_x_typeid instead of build_typeid.
9985         * cp-tree.def: Add TYPEID_EXPR.
9986         * pt.c (tsubst_copy): Handle typeid.
9987         * decl2.c (build_expr_from_tree): Likewise.
9988         * rtti.c (build_x_typeid): Throw bad_typeid from here.
9989         (build_typeid): Not here.
9990         * cp-tree.h: Declare build_x_typeid.
9991
9992 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
9993
9994         * call.c (convert_like): Pull out constant values.
9995
9996         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
9997
9998 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
9999
10000         * decl.c (init_decl_processing): Create short int types before
10001         creating size_t in case a machine description needs to use
10002         unsigned short for size_t.
10003
10004 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
10005
10006         * Make-lang.in (exception.o): Turn off pic.
10007
10008         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
10009         type, multi-level ptr conversions.
10010
10011         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
10012         (throw_bad_cast): Use it.
10013         (throw_bad_typeid): New fn.
10014         (build_typeid): Throw bad_typeid as needed.
10015         Use build_call.
10016         (synthesize_tinfo_fn): Handle functions and arrays before checking
10017         for cv-quals.
10018
10019         * Remove .h from standard C++ headers, add new.h, move into inc
10020         subdirectory.
10021
10022         * exception*: Remove pointer from object, constructors.  Add
10023         default exception::what that uses type_info::name.  Add
10024         __throw_bad_typeid.
10025
10026         * init.c (build_new): Don't add a cookie to new (void *) T[2].
10027
10028 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
10029
10030         * Make-lang.in: Building C++ code depends on cc1plus.
10031
10032 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10033
10034         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
10035         a HOST_WIDE_INT, not a tree.
10036
10037 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
10038
10039         * exception.cc: Don't include <stdlib.h>.
10040
10041         * Make-lang.in (c++.clean): Remove cplib2.*.
10042
10043 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
10044
10045         * parse.y (component_decl_1, component_costructor_declarator case):
10046         Pass attributes/prefix_attributes in tree list.
10047
10048 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
10049
10050         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
10051
10052 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
10053
10054         * lex.c (do_identifier): Don't do deferred lookup in a template
10055         header.
10056
10057         * typeck2.c (store_init_value): Oops.
10058
10059         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: 
10060         New files for C++ lang-support library.
10061         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
10062         (CXX_LIB2FUNCS): Define.
10063         And rules for building the C++ lang-support code.
10064         * config-lang.in (headers): Define.
10065         (lib2funcs): Define.
10066
10067 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
10068
10069         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
10070         digest_init.
10071         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
10072         * typeck2.c (store_init_value): Check for initializing pmf with { }
10073         here.
10074         (process_init_constructor): Not here.
10075
10076 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
10077
10078         * pt.c (begin_template_parm_list): Increment
10079         processing_template_decl here.
10080         (end_template_parm_list): Not here.
10081         (process_template_parm): No need to add 1 to it now.
10082         * *.c: Use processing_template_decl instead of current_template_parms
10083         to check for being in a template.
10084
10085         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
10086         (tsubst_copy): Handle CONSTRUCTOR.
10087         (instantiate_decl): Set up context properly for variables.
10088         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
10089         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
10090
10091 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10092
10093         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
10094
10095 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
10096
10097         * method.c (make_thunk): Call comdat_linkage before setting the
10098         TREE_CODE.
10099
10100         * decl2.c (comdat_linkage): Use make_decl_one_only.
10101         (import_export_decl): Likewise.
10102         * decl.c (init_decl_processing): Check supports_one_only instead of
10103         SUPPORTS_WEAK.
10104
10105 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
10106
10107         * decl2.c (grokfield): Tighten checking for access decls.
10108
10109         * decl.c (make_typename_type): Resolve references to
10110         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
10111         (lookup_name_real): Types that depend on a template parameter get
10112         an implicit 'typename' unless they're in the current scope.
10113         (start_decl_1): We don't care about incomplete types that depend
10114         on a template parm.
10115         (grokdeclarator): Resolve 'typename's in the type specifier that
10116         refer to members of the current scope.
10117
10118         * call.c (build_over_call): Remove 'inline called before
10119         definition' diagnostic.
10120         (build_method_call): Likewise.
10121         * decl.c (duplicate_decls): Downgrade 'used before declared
10122         inline' to a warning, only with -Winline.
10123
10124 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
10125
10126         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
10127
10128 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
10129
10130         * call.c (build_method_call): When calling a signature
10131         default implementation, as in other cases, let instance_ptr simply
10132         be instance.
10133
10134 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
10135
10136         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
10137
10138 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
10139
10140         * except.c (expand_start_catch_block): Add a pushlevel so that -g
10141         works on hppa and SPARC.
10142
10143 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10144
10145         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
10146
10147 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
10148
10149         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
10150         before testing whether it's a signature.
10151
10152 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
10153
10154         * call.c (build_new_method_call): Don't complain about signature
10155         pointers and references not being an aggr type.
10156         (build_this): If a signature pointer or reference was passed in,
10157         just return it.
10158         (build_new_method_call): If instance is a signature pointer, set
10159         basetype to the signature type of instance.
10160         * sig.c (build_signature_method_call): Deleted basetype and
10161         instance parameters, they can be found as the DECL_CONTEXT of
10162         function and as the first argument passed in.
10163         * cp-tree.h: Changed declaration of build_signature_method_call.
10164         * call.c (build_method_call): Deleted first two arguments in call
10165         of build_signature_method_call.
10166         (build_over_call): Added call to build_signature_method_call.
10167
10168 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
10169
10170         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
10171         target_expr.
10172
10173 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10174
10175         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
10176
10177 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
10178
10179         * except.c (expand_start_try_stmts): Move to except.c in the backend.
10180         (expand_end_try_stmts): Remove.
10181
10182         * init.c (perform_member_init): Use add_partial_entry () instead
10183         of directly manipulating lists.
10184         (emit_base_init): Ditto.
10185
10186 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
10187
10188         * except.c (expand_exception_blocks): Always make sure USE and
10189         CLOBBER insns that came at the end still do, the backend relies
10190         upon this.
10191
10192 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
10193
10194         * call.c (build_over_call): We can only use a TARGET_EXPR of the
10195         right type.
10196
10197 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
10198
10199         * cvt.c (convert_to_reference): Revert last change, don't complain
10200         about temp without target decl.
10201
10202 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
10203
10204         * decl.c (grokdeclarator): Don't core dump when void() is given.
10205
10206 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
10207
10208         * decl.c (copy_args_p): Don't crash.
10209
10210 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
10211
10212         * pt.c (tsubst): And support template args inside the exception
10213         specification.
10214
10215         * pt.c (tsubst): Add support for exception specifications in
10216         template functions.
10217
10218 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
10219
10220         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
10221         fields now.
10222         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
10223         (start_function): Likewise.
10224         (start_method): Likewise.
10225         (grokfield): Likewise.
10226         (make_call_declarator): Add throw spec parameter.
10227         (set_quals_and_spec): Add routine.
10228         * lex.c (set_quals_and_spec): Likewise.
10229         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
10230         * decl.c (shadow_tag): Eliminate the throw spec parameter to
10231         grokdeclarator.
10232         (groktypename): Likewise.
10233         (start_decl): Eliminate the throw spec parameter.  Eliminate the
10234         throw spec parameter to grokdeclarator.  Eliminate the throw spec
10235         field in DECL_STMT.
10236         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
10237         (grokfndecl): Remove useless set of raises.
10238         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
10239         the throw spec parameter to start_decl.  Pull the throw spec out
10240         of the call declarator.
10241         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
10242         (start_function): Eliminate the throw spec parameter.  Eliminate
10243         the throw spec parameter to grokdeclarator.
10244         (start_method): Likewise.
10245         * decl2.c (grokfield): Likewise.
10246         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
10247         (grokoptypename): Likewise.
10248         (finish_file): Eliminate the throw spec parameter to
10249         start_function.  Add throw spec to make_call_declarator.
10250         * except.c (init_exception_processing): Add throw spec to
10251         make_call_declarator.  Eliminate the throw spec parameter to
10252         start_decl.
10253         (expand_start_catch_block): Eliminate the throw spec parameter to
10254         grokdeclarator.
10255         (expand_builtin_throw): Add throw spec to make_call_declarator.
10256         Eliminate the throw spec parameter to start_function.
10257         (start_anon_func): Likewise.
10258         * lex.c (make_call_declarator): Add throw spec parameter.
10259         (set_quals_and_spec): New routine.
10260         (cons_up_default_function): Add throw spec to make_call_declarator.
10261         Eliminate the throw spec parameter to grokfield.
10262         * method.c (synthesize_method): Eliminate the throw spec parameter
10263         to start_function.
10264         * pt.c (process_template_parm): Eliminate the throw spec parameter
10265         to grokdeclarator.
10266         (tsubst): Add throw spec to make_call_declarator.
10267         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
10268         (do_function_instantiation): Eliminate the throw spec parameter to
10269         grokdeclarator.  Eliminate the throw spec parameter to
10270         start_function.
10271         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
10272         to start_function.
10273         * parse.y (datadef): Remove non-winning optimization.
10274         (decl): Likewise.
10275         (fndef): Remove ambiguous error productions uncovered by grammer
10276         fixing.
10277         (constructor_declarator): Add exception_specification_opt here.
10278         (component_constructor_declarator): Likewise.
10279         (direct_after_type_declarator): Likewise.
10280         (complex_direct_notype_declarator): Likewise.
10281         (direct_abstract_declarator): Likewise.
10282         (fn.def1): Remove exception_specification_opt.
10283         (fn.def2): Likewise.
10284         (condition): Likewise.
10285         (initdcl0): Likewise.
10286         (initdcl): Likewise.
10287         (notype_initdcl0): Likewise.
10288         (nomods_initdcl0): Likewise.
10289         (component_decl_1): Likewise.
10290         (component_declarator): Likewise.
10291         (after_type_component_declarator0): Likewise.
10292         (after_type_component_declarator): Likewise.
10293         (notype_component_declarator): Likewise.
10294
10295 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
10296
10297         * call.c (build_over_call): Also use an INIT_EXPR when
10298         initializing anything from an rvalue.
10299
10300         * call.c (build_over_call): Call stabilize_reference when building
10301         an INIT_EXPR instead of calling the copy ctor.
10302
10303         * call.c (joust): Extend the previous change to all comparisons.
10304
10305         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and 
10306         NO_LINKAGE_HEURISTICS.
10307
10308         * decl2.c (finish_file): Emit any statics that weren't already.
10309
10310         * typeck.c (build_static_cast): Implement.
10311         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
10312         * decl.c (grokparms): Use can_convert_arg instead of
10313         implicit_conversion directly.
10314         (copy_args_p): New fn.
10315         * cvt.c (convert_to_reference): Don't complain about temp with
10316         static_cast.
10317         (build_up_reference): Handle TARGET_EXPRs.
10318         * call.c (build_over_call): Elide unnecessary temps.
10319         (can_convert*): Use new overloading code.
10320
10321 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
10322
10323         * call.c: Move TYPE_PTR*_MACROS ...
10324         * cp-tree.h: To here.
10325         * typeck.c (build_reinterpret_cast): Implement.
10326
10327         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
10328         ptr_complete_ob.
10329         (joust): If we're comparing a function to a builtin and the worst
10330         conversion for the builtin is worse than the worst conversion for the
10331         function, take the function.
10332
10333         * typeck.c (build_const_cast): Implement.
10334         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
10335         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
10336
10337 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
10338
10339         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
10340         too early. Make sure we explode if exprtype turns out to be a
10341         NULL_TREE when it shouldn't be.
10342
10343 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
10344
10345         * cp-tree.h: New routine make_call_declarator.
10346         * lex.c (make_call_declarator): Define it.
10347         * except.c (init_exception_processing): Use it.
10348         (expand_builtin_throw): Likewise.
10349         (start_anon_func): Likewise.
10350         * decl2.c (finish_file): Likewise.
10351         * lex.c (cons_up_default_function): Likewise.
10352         * parse.y: Likewise.
10353         * pt.c (tsubst): Likewise.
10354         
10355 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
10356
10357         * decl2.c (groktypefield): Remove unused code.
10358
10359 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
10360
10361         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
10362         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
10363         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
10364         nonempty_cv_qualifiers.
10365         * hash.h: Rebuild.
10366         
10367         * lex.c (make_pointer_declarator): Change type_quals into
10368         cv_qualifiers.
10369         (make_reference_declarator): Likewise.
10370         
10371 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
10372
10373         * decl.c (start_function): Only check interface_* for templates
10374         with flag_alt_external_templates.
10375
10376         * call.c (build_new_op): Check for comparison of different enum types.
10377         (build_over_call): Fix arg # output.
10378
10379         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
10380
10381 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
10382
10383         * call.c (build_new_op): Check for erroneous args.
10384
10385         * call.c (build_new_method_call): Add missing args to cp_error.
10386
10387         * tree.c (error_type): Dont print reference-to-array.
10388
10389         * typeck.c (convert_for_assignment): Don't say contravariance for
10390         removing const.
10391
10392 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
10393
10394         * call.c (build_over_call): Diagnose bad convs for `this'.
10395
10396         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
10397         on _ctor_arg.
10398
10399         * call.c (convert_like): Handle bad convs.
10400         (build_over_call): Handle bad convs better.
10401
10402         * decl2.c: -fansi-overloading is now the default.
10403
10404         * call.c (build_new_method_call): Check for erroneous args.
10405
10406         * pt.c (instantiate_class_template): Propagate
10407         TYPE_USES_MULTIPLE_INHERITANCE.
10408
10409 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
10410
10411         * call.c (enforce_access): Add static to routine.
10412
10413 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
10414
10415         * call.c (build_user_type_conversion_1): Fix bad handling.
10416         (compare_ics): Likewise.
10417
10418 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
10419
10420         * call.c (standard_conversion): Oops.
10421
10422 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
10423
10424         * g++.c: Update test for win32 (&& ! cygwin32).
10425
10426 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
10427
10428         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
10429         (ptr_reasonably_similar): New fn.
10430         * call.c (BAD_RANK): New rank.
10431         (ICS_BAD_FLAG): New macro.
10432         (standard_conversion): Handle almost-right pointer conversions.
10433         (reference_binding): Handle bad rvalue bindings.
10434         (add_*_candidate): Stuff.
10435         (build_over_call): Pass bad conversions to convert_for_initialization.
10436         (compare_ics): Handle bad convs.
10437         (joust): Likewise.
10438
10439 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
10440
10441         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
10442         integer_type_node when computing pointer offsets.
10443
10444 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
10445
10446         * tree.c (lvalue_type): New fn.
10447         (error_type): New fn.
10448         * call.c (op_error): Use error_type.
10449         (add_conv_candidate): Use lvalue_type.
10450         (add_builtin_candidates): Likewise.
10451         * error.c (args_as_string): Use error_type.
10452
10453 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
10454
10455         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
10456         (tsubst): Not here.
10457
10458         * decl.c (init_decl_processing): With -ansi, __null's type is the
10459         signed integral type with the same number of bits as a pointer.
10460         Introduce a new variable null_node for it.
10461         * cp-tree.h: Adjust.
10462         * call.c (null_ptr_cst_p): Adjust.
10463
10464 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
10465
10466         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
10467         optimize.
10468
10469 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
10470
10471         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
10472         fns of classes without virtual functions.
10473
10474         * call.c (add_function_candidate): Handle `this' specially.
10475         (compare_ics): Likewise.
10476
10477 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
10478
10479         * typeck.c (build_conditional_expr): Fix handling of __null.
10480
10481         * decl2.c (comdat_linkage): New fn.
10482         (import_export_vtable): Use it.
10483         (import_export_decl): Use it.
10484         * method.c (make_thunk): Use it.
10485
10486 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
10487
10488         * pt.c (end_template_decl): If we don't actually have parms, return.
10489         * parse.y (template_header): Accept 'template <>'.
10490
10491         * errfn.c: Allow 5 args.
10492
10493 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
10494
10495         * tree.c (make_temp_vec): New fn.
10496         * pt.c (push_template_decl): Handle partial specs.
10497         (instantiate_class_template): Likewise.
10498         (more_specialized): Use get_bindings.
10499         (more_specialized_class): New fn.
10500         (get_class_bindings): New fn.
10501         (most_specialized_class): New fn.
10502         (do_function_instantiation): List candidates for ambiguous case.
10503         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
10504         (shadow_tag): Call push_template_decl for partial specializations.
10505         * parse.y: Likewise.
10506         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
10507         DECL_TEMPLATE_MEMBERS.
10508         * call.c (print_z_candidates): Reduce duplication.
10509
10510 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
10511
10512         * decl2.c (lang_decode_option): Allow -fansi-overloading.
10513
10514 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
10515
10516         * pt.c (get_bindings): New fn.
10517         (most_specialized): Likewise.
10518         (do_function_instantiation): Use them.
10519         (add_maybe_template): New fn.
10520         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
10521         * call.c (build_new_op): Handle guiding decls.
10522         (build_new_function_call): Likewise.
10523         * decl2.c (finish_file): Likewise.
10524
10525         * decl2.c (mark_used): Do synthesis here.
10526         * call.c (build_method_call): Not here.
10527         (build_over_call): Or here.
10528         * typeck.c (build_function_call_real): Or here.
10529         * tree.c (bot_manip): Call mark_used on functions used in default
10530         args.
10531
10532 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
10533
10534         * decl2.c (import_export_vtable): Delete code that disabled vtable
10535         heuristic on systems with ASM_OUTPUT_EXTERNAL.
10536
10537 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
10538
10539         * typeck.c (build_x_function_call): Handle static call context
10540         better.
10541
10542         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
10543         the function, not its outer block.
10544
10545         * call.c (build_field_call): Pass fields on to build_opfncall
10546         regardless of TYPE_OVERLOADS_CALL_EXPR.
10547         (build_method_call): Pass on to build_new_method_call sooner.
10548
10549         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
10550         gives us.
10551         * class.c (instantiate_type): Don't put a POINTER_TYPE to
10552         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
10553         modifying it.
10554
10555 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
10556
10557         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
10558         (add_builtin_candidate): Don't take enums for ++.
10559         (build_new_method_call): Handle non-aggregates and field calls.
10560         Move new overloading code from...
10561         * cvt.c: Here.
10562
10563         * decl.c (grokparms): Don't check default args in templates.
10564
10565 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
10566
10567         * cvt.c (build_new_op): Fix args to build_unary_op.
10568         (add_builtin_candidates): Don't call type_promotes_to on float.
10569
10570         * decl.c (grokparms): Check the type of the default arg.
10571
10572         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
10573         returning NULL_TREE.
10574
10575         * typeck.c (build_x_binary_op): Avoid doing extra work.
10576         (build_x_unary_op): Likewise.
10577         (build_x_conditional_expr): Likewise.
10578         * cvt.c (build_over_call): Return.
10579         (add_builtin_candidate): Fix MEMBER_REF.
10580         (build_new_op): Likewise.
10581
10582 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
10583
10584         * method.c (build_overload_name): Put bug fix into code but leave
10585         disabled for now so we can be bug compatible with older releases
10586         that do repeats incorrectly.  In the future, we can enable it.
10587
10588 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
10589
10590         * cvt.c (convert_like): Don't call build_cplus_new twice.
10591
10592         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
10593         Control new overloading code with -fansi-overloading.
10594
10595 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
10596
10597         * cvt.c (build_over_call): Call build_cplus_new.
10598         * call.c (build_method_call): Likewise.
10599         * typeck.c (build_function_call_real): Likewise.
10600         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
10601         the COND_EXPR in a TARGET_EXPR so they use the same slot.
10602
10603         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to 
10604         recursive calls.
10605         * typeck.c (complete_type): Propagate
10606         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
10607
10608 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
10609
10610         * cvt.c (joust): More ?: kludging.  Sigh.
10611         (build_over_call): Don't try to synthesize global fns.
10612
10613         * search.c (lookup_conversions): Use binfo marking.
10614
10615 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
10616
10617         * search.c (build_mi_matrix): Use the correct value of cid
10618         when determining the new mi_size.
10619
10620 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
10621
10622         * cvt.c (add_builtin_candidates): Do consider type conversion ops
10623         for the first parms of += et al.
10624         (strip_top_quals): New fn.
10625         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
10626         (implicit_conversion): Likewise.
10627         (add_builtin_candidates): Be careful about arrays.
10628         (build_new_method_call): Handle vtable optimization.
10629
10630 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
10631
10632         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
10633         * cvt.c (reference_binding): Use it.
10634         (implicit_conversion): Use it.
10635         (add_builtin_candidate, COND_EXPR): Use it.
10636
10637         * cvt.c (build_new_function_call): Check for error args.
10638
10639         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
10640
10641         * gxx.gperf: Add __null.
10642         * hash.h: Regenerate.
10643         * lex.h: Add RID_NULL.
10644         * lex.c (init_lex): Create null_pointer_node here, stick it in
10645         RID_NULL.
10646         * decl.c (init_decl_processing): Still set its type here.
10647         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
10648         (convert_to_pointer_force): Likewise.
10649         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
10650         if (! pedantic).
10651         * call.c (convert_harshness): Use null_ptr_cst_p.
10652         * typeck.c (convert_for_assignment): Likewise.  Don't produce
10653         null_pointer_node.
10654
10655         * error.c (args_as_string): Handle lists of actual args, too.
10656         * cvt.c (null_ptr_cst): Support (void*)0 for now.
10657         (build_user_type_conversion_1): Improve diagnostics.
10658         (build_new_function_call): Likewise.
10659         (build_object_call): Likewise.
10660         (build_new_method_call): Likewise.  Move call before def diagnostic...
10661         (build_over_call): Here.
10662
10663         * cvt.c (build_new_method_call): Don't complain about no match if
10664         LOOKUP_SPECULATIVELY.
10665         (build_over_call): Fix 'this' for virtual fn.
10666         (build_new_method_call): Add diagnostic.
10667
10668 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
10669
10670         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
10671         constructors to be passed in.
10672         (build_over_call): Likewise.
10673         (build_user_type_conversion_1): Pass them in.
10674         (convert_like): Likewise.
10675         (build_object_call): Handle overloaded conversions.
10676         (build_over_call): Pass the right args to build_vfn_ref.
10677         (standard_conversion): Fix pmf convs.
10678         (joust): Handle comparing statics and non-statics.
10679         (build_new_method_call): New fn.
10680         * call.c (build_method_call): Call it if NEW_OVER.
10681
10682 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
10683
10684         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
10685         %D instead.
10686
10687 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
10688
10689         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
10690         instead of just maybe_build_cleanup so that we deallocate the
10691         thrown object.
10692
10693 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10694
10695         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
10696         * cp-tree.h (finish_prevtable_vardecl): Add decl.
10697
10698 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
10699
10700         * pt.c (instantiate_class_template): Call complete_type. Also, if
10701         we're at the end of the file and we just instantiated a template
10702         class with a vtable, call finish_prevtable_vardecl.
10703
10704         * error.c (dump_decl): Don't explode (or explode more gracefully
10705         as appropriate) if the object being dumped has a null type.
10706         (dump_expr): Likewise.
10707
10708         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
10709         by counting the number of nodes that we'll need before allocating
10710         the array.
10711         (lookup_fnfields): Fix comment.
10712         (breadth_first_search): Fix comment.
10713
10714 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
10715
10716         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
10717         TYPE_ALIGN.
10718         * class.c (finish_struct): Call cplus_decl_attributes here.
10719         (finish_struct_1): Not here.
10720         * cp-tree.h: Adjust.
10721
10722         * pt.c (type_unification): New parameter STRICT.
10723         (unify): If STRICT, don't allow cv addition or base deduction.
10724         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
10725
10726 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
10727
10728         * search.c (get_template_base{_recursive}): New fns.
10729         * pt.c (more_specialized): New fn.
10730         (do_function_instantiation): Use it.
10731         (unify): Handle base deduction.
10732         * cvt.c (joust): Use more_specialized.
10733         Don't arbitrarily choose between non-builtin candidates.
10734         (build_over_call): Call require_complete_type.
10735
10736         * decl.c (start_function): Statics are static even in a #pragma
10737         interface file.
10738
10739         * decl2.c (import_export_vtable): Disable vtable heuristic on
10740         systems with ASM_OUTPUT_EXTERNAL.
10741
10742         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
10743         (standard_conversion): No std conv to enum type.
10744
10745         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
10746         for ptm's.
10747
10748         * cvt.c (reference_binding): Bind directly to a base subobject of
10749         a class rvalue.
10750
10751         * cvt.c (build_new_op): Enforce access control.
10752
10753 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
10754
10755         * typeck2.c (process_init_constructor): When scanning the
10756         union for a named field, skip things that aren't FIELD_DECLs.
10757
10758         * method.c (synthesize_method): Don't scan fndecl's rtl if
10759         we're at the end of the file; just assume the function can't
10760         be inlined.
10761
10762 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
10763
10764         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
10765         it failed.
10766
10767         * cvt.c (build_user_type_conversion_1): Handle overloaded
10768         conversion ops.
10769
10770         * cvt.c (add_builtin_candidates): Don't consider type conversion
10771         operators for the first parameter of operator=.
10772
10773 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
10774
10775         * typeck.c (complete_type): Only call layout_type if we're not
10776         expanding a template.
10777
10778 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
10779
10780         * cvt.c (compare_ics): Oops.
10781
10782         * cvt.c (op_error): Oops.
10783
10784         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
10785         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
10786         (build_conv): Use them.
10787         (implicit_conversion): Use them.
10788         (convert_like): Handle them.
10789         (build_new_op): Handle builtin COND_EXPR again.
10790         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
10791         in lists of types for COND_EXPR.
10792         (add_builtin_candidate): Add enum candidates for COND_EXPR.
10793
10794 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
10795
10796         * typeck.c (build_modify_expr): Always attempt to build a call to
10797         the assignment operator, even if we're using a default one.
10798         (convert_for_initialization): Call complete_type.
10799
10800 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
10801
10802         * cvt.c (reference_binding): A REF_BIND gets the reference type.
10803         (implicit_conversion): Likewise.
10804         (convert_like): Likewise.
10805         (compare_ics): Likewise.
10806         (compare_qual): Likewise.
10807         (print_z_candidates): Handle no candidates.
10808         (build_new_op): Don't handle builtin COND_EXPR for now.
10809
10810 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
10811
10812         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
10813
10814 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
10815
10816         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
10817
10818         * cvt.c (build_builtin_candidate): Oops.
10819         (build_new_op): Oops.
10820
10821         * method.c (build_opfncall): Pass COND_EXPR on.
10822         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
10823         (add_builtin_candidate{,s}): Likewise.
10824         (add_builtin_candidates): Likewise.
10825         (print_z_candidates, op_error, build_new_op): Likewise.
10826         (type_decays_to): New fn.
10827         * lex.c (init_lex): Just say ?: for COND_EXPR.
10828
10829 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
10830
10831         * typeck.c (complete_type): Call layout_type rather than building
10832         a new array type.
10833
10834         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
10835         only use ptrdiff_t.
10836
10837 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
10838
10839         * cvt.c: Always compile the new overloading code (but don't use it).
10840         (implicit_conversion): Add a BASE_CONV when converting to
10841         the same class type.
10842         (convert_like): Handle BASE_CONV.
10843
10844 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
10845
10846         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
10847         (add_builtin_candidate): Likewise.
10848
10849         NEW_OVER changes:
10850         * typeck.c (build_x_function_call): Try an operator function
10851         whenever we call an object of class type.
10852         * method.c (build_opfncall): Pass CALL_EXPRs through.
10853         * cvt.c (implicit_conversion): Do const-ref case first.
10854         (add_conv_candidate, build_object_call, op_error): New fns.
10855         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
10856         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display 
10857         builtin candidates.
10858         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
10859         Fall back on preincrement handling.  Use op_error.  
10860         Handle warn_synth.
10861         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with 
10862         an error_mark_node.
10863         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
10864         properly.
10865
10866 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
10867
10868         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
10869
10870 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
10871
10872         * typeck.c (build_component_ref_1): Use build_component_ref
10873         instead of open coding it here.
10874
10875 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
10876
10877         * g++.c (main): Don't link with -lg++.
10878
10879         NEW_OVER changes:
10880         * cvt.c (convert_to_reference): Don't use convert_from_refeence on
10881         result of build_type_conversion.
10882         (cp_convert): Only call build_method_call for ctors if
10883         build_type_conversion failed.
10884         (ptr_complete_ob): New function.
10885         (TYPE_PTR{,OB,MEM}_P): New macros.
10886         ({add,build}_builtin_candidate{,s}): New functions.
10887         (print_z_candidates): Handle builtins.
10888         (build_user_type_conversion_1): Don't use conversion fns for 
10889         converting to a base type.
10890         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
10891         (build_user_type_conversion): Use convert_from_reference.
10892         (build_new_op): New function.
10893         (build_over_call): Fix handling of methods.
10894         (compare_ics): Handle AMBIG_CONV properly.
10895         * typeck2.c: Increment abort count.
10896         * method.c (build_opfncall): Forward most requests to build_new_op.
10897         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
10898
10899 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10900
10901         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
10902         invalid second argument to dump_expr_list.
10903
10904 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
10905
10906         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
10907
10908 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
10909
10910         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
10911         ASSEMBLE_EXTERNAL.
10912
10913 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
10914
10915         * typeck2.c (process_init_constructor): New pedwarn for using { }
10916         to initialize a pointer to member function.
10917         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
10918         we can avoid the new error.
10919
10920 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
10921
10922         * typeck.c (build_ptrmemfunc1): New function to hide details of
10923         pointer to member functions better.
10924
10925 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
10926
10927         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
10928         methods into the actual method, as we know the implied object is
10929         not used.
10930
10931 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10932
10933         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
10934         inside a system header.
10935
10936 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
10937
10938         * call.c (build_method_call): Call complete_type on the
10939         instance type.
10940
10941 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
10942
10943         * typeck.c (build_component_ref): Always build up an OFFSET_REF
10944         for obj_ptr->func so that we can know which object to use in a
10945         method call.
10946
10947 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
10948
10949         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
10950         around things.  Also improve maintainability.
10951
10952 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
10953
10954         * decl.c (grokdeclarator): Check for overflow when evaluating an
10955         array dimension.
10956
10957 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
10958
10959         * cvt.c (cp_convert): Don't check for ambiguity with constructor
10960         if NEW_OVER.
10961
10962         * typeck.c (build_x_function_call): Pass function overload
10963         questions to new overloading code if NEW_OVER.
10964         * init.c (expand_aggr_init_1): Only check for type conversion ops
10965         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
10966         Don't check for ambiguity with constructor if NEW_OVER.
10967         * cvt.c (convert_to_reference): Dereference the result of a type
10968         conversion operator.
10969         (build_conv): Propagate ICS_USER_FLAG.
10970         (implicit_conversion): Call instantiate_type.
10971         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
10972         (add_function_candidate): Fix cv-quals on argtype.
10973         (print_z_candidates): New function.
10974         (build_new_function_call): Call it.
10975         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
10976         consider non-converting constructors.
10977         Call print_z_candidates.
10978         Return an AMBIG_CONV for an ambiguous conversion.
10979         (build_user_type_conversion): Handle AMBIG_CONV.
10980         (convert_like): Fix test for building TARGET_EXPR.
10981         Call instantiate_type.
10982         Handle AMBIG_CONV and LVALUE_CONV.
10983         (build_over_call): Handle 0 args and ellipsis.
10984         * cp-tree.def: Add AMBIG_CONV.
10985
10986 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
10987
10988         * decl.c (lookup_name_real): If we find mem in obj when parsing
10989         `obj->mem', make sure we return the right value.
10990
10991 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
10992
10993         * search.c (get_base_distance): Call complete_type.
10994
10995 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
10996
10997         * decl.c (store_bindings): Make static.
10998
10999 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
11000
11001         * init.c (expand_aggr_init_1): Don't check type conversions if
11002         NEW_OVER.
11003
11004         * cvt.c (z_candidate): Put back template field.
11005         (add_function_candidate): Set it.
11006         (add_template_candidate): Likewise.
11007         (joust): Use it.
11008         (compare_qual): Handle references and pointers to members.
11009         (compare_ics): Handle reference bindings.
11010
11011         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
11012
11013 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
11014
11015         * call.c (compute_conversion_costs): Call complete_type.
11016
11017         * tree.c (vec_binfo_member): Use comptypes instead of comparing
11018         pointers, so we can handle template parameters.
11019
11020 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
11021
11022         * cvt.c (cp_convert_to_pointer): We have to call complete_type
11023         here; let's make it explicit instead of a side effect of an
11024         error check.
11025
11026 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
11027
11028         * cvt.c (z_candidate): Remove template field.
11029         (reference_binding): Handle binding to temporary.
11030         (implicit_conversion): Likewise.
11031         (add_function_candidate): Handle artificial constructor parms.
11032         Handle functions with too few parms.
11033         (add_template_candidate): New function.
11034         (build_user_type_conversion_1): Handle constructors.
11035         (convert_like): Likewise.
11036         (build_over_call): Likewise.
11037         (build_new_function_call): Support templates.
11038         (compare_ics): Fix reference, inheritance handling.
11039
11040 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
11041
11042         * decl.c: Add signed_size_zero_node.
11043         (init_decl_processing): Build it.
11044         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
11045         when we're trying to make a negative delta.
11046
11047 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11048
11049         Stop doing this damn index==strchr variable name confusion.
11050         * class.c (add_virtual_function): Change local var INDEX to be
11051         named IDX.
11052         (add_method): Likewise.
11053         * lex.c (print_parse_statistics): Likewise.
11054         * search.c (make_memoized_table_entry): Likewise.
11055         (lookup_fnfields_here): Likewise.
11056         (lookup_field): Likewise.
11057         (lookup_fnfields): Likewise.
11058         (get_baselinks): Likewise.
11059         * sig.c (build_signature_table_constructor): Likewise.
11060         (build_signature_method_call): Likewise.
11061         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
11062         (get_member_function_from_ptrfunc): Likewise.
11063         (build_ptrmemfunc): Change local var INDEX to be IDX.
11064         (c_expand_start_case): Likewise.
11065
11066 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
11067
11068         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
11069         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
11070         (convert_to_reference): Use build_type_conversion to convert to
11071         the reference type directly.
11072         (standard_conversion): Fix void* case, non-conversions.
11073         (reference_binding): Fix expr == 0 case, non-conversions.
11074         (convert_like): Support REF_BIND.
11075         (compare_qual): Split out from compare_ics.
11076         (compare_ics): Use it, handle icses with only a qual_conv.
11077
11078         * init.c (expand_vec_init): Don't crash if decl is NULL.
11079
11080 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
11081
11082         * mpw-config.in: New file, configury for Mac MPW.
11083         * mpw-make.sed: New file, makefile editing for MPW.
11084
11085 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
11086
11087         * pt.c (instantiate_class_template): Call repo_template_used.
11088
11089         * search.c (lookup_conversions): Only lookup conversions in
11090         complete types.
11091
11092 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11093
11094         * cp-tree.def: Renamed from tree.def, to avoid confusion with
11095         gcc's tree.def.
11096         * cp-tree.h, lex.c: Include cp-tree.def.
11097         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
11098
11099 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
11100
11101         * init.c (build_vec_delete_1): Call complete_type.
11102
11103 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
11104
11105         * except.c (start_anon_func): Make sure anonymous functions are
11106         never external.
11107
11108 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
11109
11110         * decl.c (finish_function): If function_depth > 1, set nested.
11111
11112         * decl2.c (grokbitfield): Revert Bob's change.
11113         * class.c (finish_struct_1): Fix handling of named bitfield widths.
11114
11115 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
11116
11117         * pt.c (add_pending_template): Handle types.
11118         (lookup_template_class): With -fexternal-templates, just add the class
11119         to pending_templates instead of instantiating it now.
11120         * decl2.c (finish_file): Handle types in pending_templates.
11121
11122 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
11123
11124         * decl2.c (grokbitfield): Handle constant decls appropriately.
11125         Give an appropriate error message now instead of spewing core
11126         later.
11127
11128 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
11129
11130         * decl2.c: Don't turn on thunks by default for now.
11131
11132 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
11133
11134         * typeck.c (complete_type): Handle error_mark_node.
11135         (common_type, OFFSET_TYPE): Handle template_type_parms.
11136
11137 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
11138
11139         * pt.c (instantiate_decl): If at_eof, call import_export_decl
11140         regardless of DECL_INLINE.
11141
11142         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
11143
11144         * class.c (finish_struct_bits): Copy TYPE_SIZE.
11145
11146         * rtti.c (build_dynamic_cast): Support templates.
11147         * tree.def: Support DYNAMIC_CAST_EXPR.
11148         * pt.c (tsubst_copy): Likewise.
11149         * decl2.c (build_expr_from_tree): Likewise.
11150
11151 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
11152
11153         * typeck.c (build_static_cast): Support templates.
11154         (build_const_cast): Likewise.
11155         * tree.def: Support CONST/STATIC_CAST_EXPR.
11156         * pt.c (tsubst_copy): Likewise.
11157         * decl2.c (build_expr_from_tree): Likewise.
11158
11159 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
11160
11161         * decl2.c (finish_vtable_vardecl): Don't trust
11162         TREE_SYMBOL_REFERENCED for vtables of local classes.
11163
11164 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
11165
11166         * pt.c (tsubst_copy): Handle operator T.
11167
11168 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11169
11170         * init.c (build_delete): Move creation of PARMS inside test of
11171         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
11172
11173 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
11174
11175         * typeck.c (build_conditional_expr): Don't assume that
11176         the arguments to ?: are always pointers or records.
11177
11178 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
11179
11180         * decl2.c (import_export_decl): Still emit static/weak/comdat
11181         copies of inline template functions with -fno-implicit-templates.
11182
11183 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
11184
11185         * init.c (build_delete): Determine the complete basetype
11186         path to the destructor we're calling.
11187
11188 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
11189
11190         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
11191         initialize the enum, because we really and truly don't know where
11192         it came from.
11193         (start_enum): Don't copy integer_zero_node because
11194         build_enumerator will do it.
11195
11196 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
11197
11198         * decl.c (finish_function): Do access control on base destructors.
11199
11200         * pt.c (tsubst, case FUNCTION_DECL): Set up
11201         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
11202         hose us.
11203
11204 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
11205
11206         * cvt.c (build_up_reference): If we have already extended the
11207         lifetime of the temporary, don't try it again.
11208         * typeck.c (c_expand_return): Don't try and convert the return
11209         value twice when we want a reference, once is enough.
11210         
11211 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
11212
11213         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
11214         LOOKUP_ONLYCONVERTING at all for now.
11215
11216         * search.c (add_conversions): Put the conversion function in
11217         TREE_VALUE, the basetype in TREE_PURPOSE.
11218         * cvt.c (build_type_conversion): Adjust.
11219         * cvt.c (build_expr_type_conversion): Adjust.
11220         * call.c (user_harshness): Adjust.
11221
11222 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
11223
11224         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
11225         backend's benefit.
11226
11227 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
11228
11229         * except.c (expand_start_catch_block): Add a dummy region, if we
11230         get an error, so that we can avoid core dumping later.
11231
11232 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
11233
11234         * cp-tree.h (OFFSET_REF): Remove.
11235         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
11236         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
11237         * init.c (expand_aggr_init_1): Likewise.
11238         (build_new): Likewise.
11239         * typeck.c (expand_target_expr): Likewise.
11240
11241 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
11242
11243         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
11244         TARGET_EXPR.
11245
11246 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
11247
11248         * cvt.c (build_up_reference): Redo how and when temporaries are
11249         created.
11250         * decl.c (grok_reference_init): Don't try and be smart about
11251         running cleanups.
11252
11253 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
11254
11255         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
11256         (TARGET_EXPR...), now that it has 4 arguments.
11257         * tree.c (build_cplus_new): Likewise.
11258
11259 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
11260
11261         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
11262
11263         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
11264         * decl.c (struct saved_scope): Remove named_labels,
11265         {base,member}_init_list.
11266         (maybe_push_to_top_level): Don't set them.  Call
11267         push_cp_function_context if appropriate.
11268         (pop_from_top_level): Likewise.
11269
11270         * method.c (do_build_assign_ref): Remove obsolete check of
11271         TYPE_HAS_ASSIGN_REF (basetype).
11272
11273         * decl.c (grokfndecl): Diagnose user definition of
11274         implicitly-declared methods.
11275
11276 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
11277
11278         * method.c (do_build_copy_constructor): Add code to give
11279         meaningful error messages instead of crashing.
11280         (do_build_assign_ref): Don't synthesize assignment operators for
11281         classes containing reference or const members.
11282
11283         * class.c (struct base_info): Remove cant_synth_copy_ctor
11284         and cant_synth_asn_ref.
11285         (finish_base_struct): Remove the code that tries to conditionalize
11286         synthesis of copy constructors & assignment operators based on
11287         access permissions. Instead, let it fail when it tries to
11288         synthesize the copy constructor. This will give meaningful error
11289         messages instead of silently generating code to perform a bitcopy.
11290
11291 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
11292
11293         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
11294         determining types for constant values.
11295
11296         * decl.c (struct named_label_list): Use instead of stuffing
11297         random items into a TREE_LIST node.
11298         (named_label_uses): Use the new struct.
11299         (poplevel): Likewise.
11300         (lookup_label): Likewise.
11301         (define_label): Add an error message to tell the user the line
11302         where the goto is located in addition to the destination of the
11303         goto.
11304         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
11305         named_label_uses.
11306         (finish_function): Likewise.
11307         
11308         (start_decl): Complain about defining a static data member
11309         in a different type from which it was declared.
11310
11311 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
11312
11313         * cvt.c (build_expr_type_conversion): Adjust.
11314
11315 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
11316
11317         * call.c (build_method_call): Always convert 'this' to the
11318         appropriate type.
11319
11320         * search.c (add_conversions): Put the conversion function in
11321         TREE_VALUE, the type in TREE_PURPOSE.
11322         * cvt.c (build_type_conversion): Adjust.
11323         * call.c (user_harshness): Adjust.
11324
11325         * method.c (emit_thunk): Call temporary_allocation and
11326         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
11327
11328         * tree.c (build_cplus_array_type): Handle tweaking of
11329         TYPE_MAIN_VARIANT here.
11330         * typeck.c (common_type): Not here.
11331
11332         * typeck.c (complete_type): Only try to complete an array type if
11333         it has a domain.
11334
11335 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
11336
11337         * decl.c (grokvardecl): Call complete_type.
11338         (grokdeclarator): Call complete_type for PARM_DECLs.
11339
11340 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
11341
11342         * pt.c (instantiate_class_template): Re-set
11343         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
11344
11345 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
11346
11347         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
11348         smart enough to do it right.
11349         * tree.c (cp_expand_decl_cleanup): Likewise.
11350         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
11351         cp_expand_decl_cleanup.
11352         (store_parm_decls): Likewise.
11353         (hack_incomplete_structures): Likewise.
11354         * except.c (push_eh_cleanup): Likewise.
11355
11356 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
11357
11358         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
11359         frontend to the backend where it belongs.
11360         * tree.c (unsave_expr): Likewise.
11361         (unsave_expr_now): Likewise.
11362         * tree.def (UNSAVE_EXPR): Likewise.
11363         * cp-tree.h (unsave_expr): Likewise.
11364         (unsave_expr_now): Likewise.
11365
11366 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
11367
11368         * init.c (emit_base_init): Make sure the partial EH cleanups live
11369         on the function_obstack.
11370
11371 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
11372
11373         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
11374         when checking for pointer types.
11375
11376 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
11377
11378         * pt.c (instantiate_class_template): Remove obsolete check for
11379         access declarations.
11380
11381 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
11382
11383         * call.c (build_overload_call): Simplify calls to
11384         build_overload_call by removing last parameter.
11385         (build_method_call): Likewise.
11386         * cp-tree.h: Likewise.
11387         * method.c (build_opfncall): Likewise.
11388         * typeck.c (build_x_function_call): Likewise.
11389
11390 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
11391
11392         * call.c (default_parm_conversions): Factor out common code.
11393         (build_method_call): Use it.
11394         (build_overload_call_real): Use it.
11395
11396 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
11397
11398         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
11399         but pedwarn as the code is bogus.
11400         * typeck.c (decay_conversion): Likewise.
11401         (build_function_call_real): Use build_addr_func instead of
11402         default_conversion.  Don't allow pointer-to-method functions down
11403         here.
11404         (build_unary_op): Use real pointer-to-member functions instead of
11405         fake ones.
11406         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
11407         (convert_for_assignment): Removed some obsolete code.
11408         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
11409         build_x_function_call instead of current_class_ptr.  Only call
11410         digest_init once on an initializer, we do this just checking
11411         TREE_TYPE.
11412         (build_expr_from_tree): Pass current_class_ref to
11413         build_x_function_call instead of current_class_ptr.
11414         * init.c (build_member_call): Likewise.
11415         * pase.y: Likewise.
11416         * error.c (dump_expr): Handle OFFSET_REFs better.
11417         * pt.c (unify): Handle pointer-to-member functions better.
11418         * decl.c (finish_function): Clear out current_class_ref just like
11419         we do for current_class_ptr.
11420
11421         * typeck.c (get_delta_difference): Handle virtual bases better.
11422
11423 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
11424
11425         * sig.c (build_signature_table_constructor): Use the delta for
11426         the original basetype for this virtual function with thunks.
11427         (build_signature_method_call): We still need to adjust 'this'
11428         with thunks.
11429
11430 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
11431
11432         * call.c (build_addr_func): New routine.  Used to get the `real'
11433         address of a function or a method.  Needed to avoid getting a
11434         pointer-to-member function.
11435         (build_call): New routine to build CALL_EXPRs.
11436         (build_method_call): Use it.
11437         * cvt.c (convert_to_aggr): Likewise.
11438         * typeck.c (build_function_call_real): Likewise.
11439         * sig.c (build_signature_table_constructor): Use build_addr_func.
11440         * cp-tree.h (build_call, build_addr_func): Declare them.
11441
11442 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
11443
11444         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
11445         * parse.y: Remove uses of LOOKUP_AGGR.
11446
11447 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
11448
11449         * *.[chy]: Rename current_class_decl to current_class_ptr, and
11450         C_C_D to current_class_ref.
11451
11452 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
11453
11454         * call.c (convert_harshness): Tighten up pointer conversions.
11455
11456 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
11457
11458         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
11459         (finish_file): Likewise.
11460
11461 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
11462
11463         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
11464
11465         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
11466         code.
11467
11468 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
11469
11470         * decl2.c: Turn on thunks by default where supported.
11471
11472 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
11473
11474         * cp-tree.h (build_overload_call_maybe): Removed.
11475         * call.c (build_overload_call_real): Invert meaning of last arg to
11476         be require_complete.
11477         (build_overload_call): Likewise.
11478         * typeck.c (build_x_function_call): Use build_overload_call_real
11479         instead of build_overload_call_maybe.
11480
11481 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
11482
11483         * decl2.c (finish_file): Don't try to emit functions that haven't
11484         been compiled.
11485
11486 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
11487
11488         * decl2.c (finish_vtable_vardecl): Oops.
11489
11490         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
11491         Also store the bindings from previous_class_values.
11492         (pop_from_top_level): Restore them.
11493
11494 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
11495
11496         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
11497         symbol has been referenced.
11498         (finish_file): Re-join synthesis/vtable loop with inline emission
11499         loop, disable inlining when an inline is output.
11500
11501 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
11502
11503         * except.c (init_exception_processing): Setup saved_in_catch.
11504         (push_eh_cleanup): Reset __eh_in_catch.
11505         (expand_start_catch_block): Set __eh_in_catch.
11506
11507 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
11508
11509         * except.c (push_eh_cleanup): Add tracking for whether or not we
11510         have an active exception object.
11511         (expand_builtin_throw): Use it to make sure a rethrow without an
11512         exception object is caught.
11513
11514 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
11515
11516         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
11517         cache.
11518
11519 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
11520
11521         * decl2.c (finish_file): Also use sentries for vars with
11522         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
11523         created).
11524
11525         * lex.c (handle_cp_pragma): Disable #pragma
11526         interface/implementation if SUPPORTS_ONE_ONLY > 1.
11527
11528 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
11529
11530         * method.c (emit_thunk): Wrap default case in
11531         temporary/permanent_allocation.
11532
11533         * method.c (make_thunk): Use DECL_ONE_ONLY.
11534         (emit_thunk): Call assemble_end_function.
11535
11536 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
11537
11538         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
11539         (import_export_decl): Likewise.
11540         (finish_prevtable_vardecl): Disable vtable hack if
11541         SUPPORTS_ONE_ONLY > 1.
11542
11543 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
11544
11545         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
11546         PREDECREMENT_EXPRs take two arguments, not one.
11547
11548 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
11549
11550         * class.c (build_vtable_entry): Don't build thunks for abstract
11551         virtuals.
11552
11553         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
11554         frontend.
11555
11556 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
11557
11558         * class.c (set_rtti_entry): Use size_zero_node.
11559         (build_vtable): Likewise.
11560
11561 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
11562
11563         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
11564         (prepare_fresh_vtable): Likewise.
11565
11566 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
11567
11568         * method.c (emit_thunk): Call mark_used on the target function.
11569
11570         * call.c (build_method_call): Don't warn about pending templates.
11571
11572 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
11573
11574         * decl2.c (finish_file): Fix list walking logic.
11575
11576         * typeck2.c (check_for_new_type): Only warn if -pedantic.
11577
11578 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
11579
11580         * class.c (finish_struct_1): Remove old code for
11581         dont_allow_type_definitions.
11582         * cp-tree.h: Likewise.
11583         * spew.c: Make sure cp-tree.h is included before parse.h, so the
11584         definition of flagged_type_tree is found before it is used.
11585         * lex.c: Likewise.
11586         * parse.y: Added the ftype member to the type union, and changed a
11587         number of rules to use it instead of ttype. Added calls to
11588         check_for_new_type() as appropriate.
11589         * typeck2.c (check_for_new_type): New function for checking
11590         if a newly defined type appears in the specified tree.
11591         * cp-tree.h: Add new type flagged_type_tree. Add a prototype
11592         for check_for_new_type().
11593
11594 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
11595
11596         * decl2.c (finish_file): Only use a sentry if the decl is public.
11597
11598         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
11599         don't pass LOOKUP_ONLYCONVERTING.
11600
11601 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
11602
11603         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
11604         properly keeps track of const and volatile type modifiers.
11605
11606 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
11607
11608         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
11609         * pt.c (comp_template_args): Use it.
11610
11611         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
11612         assemble_external for artificial function decls.
11613
11614         * decl.c (cp_finish_decl): Oops.
11615
11616 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
11617
11618         * decl2.c (import_export_decl): Put static data member templates
11619         into common storage, or make them weak, depending on whether they
11620         are dynamically or statically initialized.
11621         (get_sentry): New function.
11622         (finish_file): Do import_export_decl for static data members before
11623         building the init/fini functions.  Don't init/fini a variable that's
11624         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
11625         push/pop_temp_slots.
11626         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
11627         expand_static_init thang.
11628         * method.c (get_id_2): New function.
11629
11630 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
11631
11632         * parse.y (empty_parms): Make sure we use C++-style prototypes
11633         when we're declaring member functions.
11634
11635 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
11636
11637         * Makefile.in (CONFLICTS): 16 s/r conflicts.
11638         * parse.y (self_template_type): New nonterminal.
11639
11640 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
11641
11642         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
11643         name.
11644         * parse.y (base_class.1): Allow 'typename foo::bar'.
11645
11646         * lex.c (check_newline): Remove #pragma code that plays with the
11647         input stream, since we now deal with tokens.  Clear nextchar when
11648         we're done.
11649         (handle_cp_pragma): Use real_yylex.
11650         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
11651         in one place.
11652
11653         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
11654
11655         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
11656
11657 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
11658
11659         * parse.y: New token SELFNAME for potential constructor.
11660         * spew.c (yylex): Handle it.
11661         * lex.c (identifier_type): Produce it.
11662
11663         * parse.y (complete_type_name): In :: case, don't push class binding.
11664         (complex_type_name): Likewise.
11665
11666 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
11667
11668         * typeck.c (build_reinterpret_cast): Handle pointer to member
11669         functions.
11670
11671 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11672
11673         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
11674         pragmas.
11675         (check_newline): Put the vtable/unit/implementation/interface pragma
11676         code into handle_cp_pragma, replacing it with a call.
11677         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
11678         args.  Get the next token after handling the pragma token.
11679
11680 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
11681
11682         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
11683         (convert_to_pointer_force): Likewise.
11684
11685         * init.c (build_new): Fix array new without -fcheck-new.
11686
11687 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
11688
11689         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
11690         tree.c: Lose TYPE_NESTED_NAME.
11691
11692         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
11693         as identifiers.
11694
11695         * tree.def: Add VEC_INIT_EXPR.
11696         * expr.c (cplus_expand_expr): Handle it.
11697         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
11698         the extra file-scope symbol nastiness.
11699
11700 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
11701
11702         * method.c (make_thunk): Thunks are static.
11703         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
11704
11705         * decl2.c (mark_vtable_entries): Emit thunks as needed.
11706         (finish_file): Don't emit them here.
11707
11708 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
11709
11710         * rtti.c (build_dynamic_cast): Handle null pointers.
11711         (ifnonnull): New function.
11712
11713 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
11714
11715         * call.c (build_method_call): Remember the original basetype we
11716         were called with. Give an error message instead of trying
11717         (incorrectly) to call a non-static member function through a
11718         non-inherited class.
11719
11720         * search.c (expand_upcast_fixups): Mark the new fixup as
11721         DECL_ARTIFICIAL.
11722
11723 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
11724
11725         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
11726
11727         * class.c (set_rtti_entry): Fix for thunks.
11728
11729         * decl2.c (import_export_decl): Still emit typeinfo fns for
11730         cv-variants of builtin types.
11731
11732         * rtti.c (expand_class_desc): Set up base_info_type_node here.
11733         (init_rtti_processing): Instead of here.
11734
11735 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
11736
11737         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
11738         (build_typeid): Only complain about taking dynamic typeid without
11739         -frtti.
11740
11741         * decl2.c: flag_rtti defaults to 1.
11742
11743         * rtti.c (get_tinfo_var): The general class case is now smaller.
11744         (init_rtti_processing): Pack the latter three fields of base_info
11745         into 32 bits.
11746
11747 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
11748
11749         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
11750
11751 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
11752
11753         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
11754         (push_memoized_context): Split out code to undefer pop_type_level to
11755         (clear_memoized_cache): here.
11756         (pop_memoized_context): We can only handle one layer of deferral of
11757         pop_type_level so clear the cache, if there was a previous level.
11758
11759 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
11760
11761         * rtti.c (init_rtti_processing): Build up base_info_type_node.
11762         (expand_class_desc): Use one pointer to an array of base_info
11763         structs, passed using a CONSTRUCTOR.
11764
11765 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
11766
11767         * class.c (build_vbase_path): Remove block extern for
11768         flag_assume_nonnull_objects here.
11769         (build_vfn_ref): Split out functionality into build_vtbl_ref.
11770         (build_vtbl_ref): New routine.
11771         (build_vtable): Set up rtti info here.
11772         (add_virtual_function): Note in CLASSTYPE_RTTI the best
11773         place where we can get the rtti pointers from to avoid having to
11774         search around for a place.
11775         (finish_base_struct): Likewise.
11776         (finish_struct_1): Likewise.  Never create totally new vtables
11777         with totally new vtable pointers for rtti.  Disable code to layout
11778         vtable pointers better until we want to break binary
11779         compatibility.
11780         * rtti.c (build_headof_sub): New routine to convert down to a
11781         sub-object that has an rtti pointer in the vtable.
11782         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
11783         maintainable.
11784         (build_dynamic_cast): Make sure we have saved it, if we need to.
11785         * search.c (dfs_init_vbase_pointers): Disable code that deals with
11786         a more efficient vtable layout, enable later.
11787         * call.c (flag_assume_nonnull_objects): Moved declaration to
11788         * cp-tree.h: here.  Declare build_vtbl_ref.
11789         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
11790         function calls that want a tree.
11791
11792 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
11793
11794         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
11795         other X subobjects in the most derived type.  Ack.
11796
11797         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
11798         get_typeid will do it for us.
11799         (get_typeid_1): Break out call-building for expand_*_desc to use.
11800         (get_typeid): Call it.
11801         (expand_*_desc): Likewise.
11802         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
11803         and void *.
11804         (init_decl_processing): Lose builtin_type_tdescs lossage.
11805         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
11806
11807 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
11808
11809         * pt.c (tsubst): When calling set_nested_typename, use
11810         TYPE_NESTED_NAME (current_class_type) instead of
11811         current_class_name.
11812
11813         * decl.c (pushdecl): Likewise.
11814         (pushdecl_class_level): Likewise.
11815         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
11816         set_nested_typename.
11817
11818 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
11819
11820         * rtti.c (synthesize_tinfo_fn): Handle arrays.
11821
11822         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
11823
11824 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
11825
11826         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
11827         (init_rtti_processing): Lose bad_cast_type.
11828         (build_dynamic_cast): Use throw_bad_cast.
11829
11830         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
11831
11832         * decl2.c (finish_file): Don't synthesize artificial functions
11833         that are external and not inline.
11834
11835         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
11836
11837         * decl2.c (finish_file): Handle having new inlines added to
11838         saved_inlines by synthesis.
11839
11840         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
11841
11842 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
11843
11844         RTTI rewrite to initialize nodes as needed, not require that
11845         users #include <typeinfo>, complete functionality and reduce wasted 
11846         space.
11847         * rtti.c (init_rtti_processing): New fn.
11848         (build_typeid): The vtable entry is now a function.
11849         (get_tinfo_var): New fn.
11850         (get_tinfo_fn): Likewise.
11851         (get_typeid): Use it.
11852         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
11853         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
11854         points __rtti_*.
11855         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
11856         (synthesize_tinfo_fn): New fn.
11857         * method.c (build_t_desc_overload): Lose.
11858         (build_overload_with_type): More generic.
11859         * decl.c (init_decl_processing): Call init_rtti_processing.
11860         * class.c (set_rtti_entry): Use get_tinfo_fn.
11861         * decl2.c (mark_vtable_entries): Mark the rtti function.
11862         (finish_prevtable_vardecl): Don't build_t_desc.
11863         (import_export_decl): Handle tinfo functions.
11864         (finish_file): Likewise.
11865         * typeck.c (inline_conversion): New fn.
11866         (build_function_call_real): Use it.
11867         * cp-tree.h: Add decls.
11868
11869         * method.c (hack_identifier): Also convert component_refs from
11870         references.
11871
11872         * lex.c (cons_up_default_function): Use the type, not the name, in
11873         declspecs.
11874
11875         * decl2.c (import_export_vtable): Fix weak vtables.
11876
11877 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
11878
11879         * search.c (get_base_distance_recursive): Fix access checks for
11880         protected bases.
11881
11882 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11883
11884         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
11885         cp-tree.h.
11886         (convert_harshness): Add prototypes wrapped by PROTO.
11887         * decl2.c (grok_function_init): Likewise.
11888         (do_toplevel_using_decl): Change to void return type.
11889         * class.c (build_vtable_entry): Remove decl of make_thunk.
11890         (merge_overrides): Fix order of arg definitions.
11891         (finish_vtbls): Likewise.
11892         (fixup_vtable_deltas): Likewise.
11893         (modify_all_direct_vtables): Likewise.
11894         (modify_all_indirect_vtables): Likewise.
11895         * search.c (get_base_distance_recursive): Likewise.
11896         (get_abstract_virtuals_1): Likewise.
11897         (fixup_virtual_upcast_offsets): Likewise.
11898         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
11899         * init.c (perform_member_init): Fix order of arg definitions.
11900         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
11901         * cp-tree.h (make_thunk): Add decl.
11902         (overload_template_name, push_template_decl): Add decls.
11903         (do_toplevel_using_decl): Change to void return type.
11904         (vec_binfo_member): Add decl.
11905
11906 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11907
11908         * typeck.c (mark_addressable, convert_for_assignment,
11909         convert_for_initialization, pointer_int_sum, pointer_diff,
11910         unary_complex_lvalue): Add prototypes wrapped by PROTO.
11911         (convert_sequence): #if 0 fn decl, since definition also is.
11912
11913 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
11914
11915         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
11916         cast to pointer types for type searching.
11917
11918 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11919
11920         * typeck.c (get_delta_difference): Use cp_error, not error, in the
11921         case where BINFO == 0.
11922
11923 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
11924
11925         * call.c (build_method_call): Fix wording of error messages so
11926         constructors come out right.
11927
11928 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
11929
11930         * decl.c (push_overloaded_decl): Don't warn about hidden
11931         constructors when both the type and the function are declared
11932         in a system header file.
11933
11934 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
11935
11936         * class.c (finish_struct_1): Propagate the TYPE_PACKED
11937         flag for the type to the type's fields.
11938
11939 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11940
11941         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
11942
11943 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
11944
11945         * class.c (base_info, finish_base_struct): Replace 
11946         needs_virtual_dtor with base_has_virtual.
11947
11948         (finish_struct_1): Remove the old code that tried to make default
11949         destructors virtual. Use base_has_virtual when checking if we need
11950         to add a vtable entry for the rtti code.
11951
11952 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
11953
11954         * pt.c (push_template_decl): Complain about template decl with
11955         inappropriate declaration.
11956
11957 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
11958
11959         * typeck.c (build_x_unary_op): Remove bogus check for taking
11960         the address of a member function.
11961
11962 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
11963
11964         * parse.y (constructor_declarator): Only push the class if
11965         we are not already in the class.
11966
11967 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
11968
11969         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
11970         Add additional argument to INIT_CUMULATIVE_ARGS.
11971
11972 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
11973
11974         * decl.c (shadow_tag): Fix error about anon union with methods.
11975
11976         * parse.y (self_reference): Only generate a self-reference if this
11977         is a non-template class.
11978         (opt.component_decl_list): Only use it if it was generated.
11979
11980         * parse.y (component_decl_1): Use constructor_declarator.
11981         (fn.def2): Likewise.
11982         (notype_component_declarator0): Likewise.
11983
11984 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
11985
11986         * typeck.c (build_x_unary_op): Add checks for taking the address
11987         of a TARGET_EXPR or of a member function, and give appropriate
11988         warnings.
11989
11990 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
11991
11992         * pt.c (process_template_parm): Allow template type parms to be
11993         used as types for template const parms.
11994
11995 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
11996
11997         * init.c (expand_vec_init): Ensure the eh cleanups are on the
11998         function_obstack.
11999
12000 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
12001
12002         * decl.c (lookup_name_real): Be even more picky about the
12003         ambiguous lookup warning.
12004         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
12005         * parse.y (constructor_declarator): Rather than here.
12006
12007         * parse.y (constructor_declarator): New nonterminal.
12008         (fn.def1): Use it.
12009         (explicit_instantiation): Likewise.
12010
12011 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
12012
12013         Add implicit declaration of class name at class scope.
12014         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
12015         * parse.y (self_reference): New nonterminal.
12016         (opt.component_decl_list): Use it.
12017         (fn.def1): Add nested_name_specifier type_name cases.
12018         * class.c (build_self_reference): New function.
12019         (finish_struct): Handle access_default later, move self-reference
12020         decl to the end.
12021         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
12022         * cp-tree.h: Adjust.
12023
12024         * pt.c (do_function_instantiation): Separate handling of member
12025         functions and non-member functions properly.
12026
12027 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
12028
12029         * pt.c (process_template_parm): Improve error for 'volatile class K'.
12030
12031         * class.c (finish_struct_1): Check the right slot for destructors.
12032
12033         * decl.c (start_enum): Complain about enum templates.
12034
12035 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
12036
12037         * init.c (resolve_offset_ref): Offset pointers to member data by one.
12038         * typeck.c (unary_complex_lvalue): Likewise.
12039
12040 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
12041
12042         * typeck.c (c_expand_return): Check for a returned local
12043         array name, similar to the check for an ADDR_EXPR.
12044
12045 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
12046
12047         * decl.c (cp_finish_decl): Don't build cleanups for static
12048         variables here.
12049
12050 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
12051
12052         * typeck.c (build_modify_expr): Fix error messages to be more
12053         accurate.
12054         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
12055         assignment operators.
12056         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
12057         assignment operators.
12058
12059 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
12060
12061         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
12062         give an error if initialized.  Pedwarn about nested type with the
12063         same name as its enclosing class.
12064
12065         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
12066
12067         * typeck.c (require_complete_type): Be sure to instantiate the
12068         MAIN_VARIANT of the type.
12069
12070         * decl2.c (finish_file): Instantiate pending templates before
12071         processing static constructors and destructors.
12072
12073         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
12074         unless at_eof.
12075
12076 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
12077
12078         * decl2.c (delete_sanity): If error_mark_node is passed
12079         in as an expression, quit while we're ahead.
12080
12081         * decl.c (grokdeclarator): Give an error message if `friend'
12082         is combined with any storage class specifiers.
12083
12084 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
12085
12086         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
12087         definition of nonexistent nested type.
12088
12089         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
12090         not to say 'typedef'.
12091
12092 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12093
12094         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
12095         * search.c (dfs_walk, dfs_init_vbase_pointers,
12096         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
12097         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
12098
12099 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
12100
12101         * except.c (build_throw): Support minimal parse.
12102         * pt.c (tsubst_copy): Support THROW_EXPR.
12103         * decl2.c (build_expr_from_tree): Likewise.
12104
12105         * pt.c (mangle_class_name_for_template): Always allocate
12106         scratch_firstobj.
12107
12108 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
12109
12110         * cvt.c (cp_convert_to_pointer): Give an appropriate error
12111         when trying to cast from an incomplete type.
12112
12113 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
12114
12115         * pt.c (instantiate_class_template): Don't bother setting up
12116         CLASSTYPE_TAGS explicitly, as the nested types will add
12117         themselves.
12118
12119 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
12120
12121         * decl.c (shadow_tag): Remove old error check for usage of
12122         an enum without a previous declaration.
12123         (xref_tag): Add error message about usage of enums without a
12124         previous declaration.
12125
12126 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
12127
12128         * lex.c (do_identifier): Only do name consistency check if we're
12129         parsing.
12130
12131         * pt.c (push_template_decl): Don't crash if we get a member defn
12132         that doesn't match.
12133
12134         * decl.c (xref_tag_from_type): New function to do an xref without
12135         always having to figure out code_type_node.
12136         * cp-tree.h: Declare it.
12137         * pt.c (instantiate_class_template): Use it for friend classes.
12138         (lookup_template_class): Use it.
12139
12140         * typeck2.c (build_functional_cast): Pull out a single parm before
12141         passing it to build_c_cast.
12142
12143 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
12144
12145         * expr.c (do_case): Give an error message if a pointer is
12146         given as a case value.
12147
12148 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
12149
12150         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
12151         an overload list.
12152
12153         * lex.c (cons_up_default_function): Really, now, interface hackery
12154         does not apply to synthesized methods.
12155
12156 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
12157
12158         * call.c (build_method_call): Ctors and dtors now have special names
12159         with respect to lookups.
12160         * class.c (add_method): Likewise.
12161         (grow_method): Likewise.
12162         (finish_struct_methods): Likewise.
12163         (warn_hidden): Likewise.
12164         (finish_struct_1): Likewise.
12165         * cvt.c (convert_to_reference): Likewise.
12166         (convert_to_aggr): Likewise.
12167         (cp_convert): Likewise.
12168         * decl2.c (check_classfn): Likewise.
12169         * init.c (expand_member_init): Likewise.
12170         (expand_default_init): Likewise.
12171         (expand_aggr_init_1): Likewise.
12172         (build_offset_ref): Likewise.
12173         (build_new): Likewise.
12174         (build_delete): Likewise.
12175         * lex.c (do_inline_function_hair): Likewise.
12176         * search.c (lookup_field_1): Likewise.
12177         (lookup_fnfields_here): Likewise.
12178         (lookup_field): Likewise.
12179         (lookup_fnfields): Likewise.
12180         (get_virtual_destructor): Likewise.
12181         (dfs_debug_mark): Likewise.
12182         (dfs_pushdecls): Likewise.
12183         (dfs_compress_decls): Likewise.
12184         * tree.c (layout_basetypes): Likewise.
12185         * typeck.c (build_component_ref): Likewise.
12186         (build_x_function_call): Likewise.
12187         (build_modify_expr): Likewise.
12188         (convert_for_initialization): Likewise.
12189         (build_functional_cast): Likewise.
12190         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
12191         (CTOR_NAME): New.
12192         (DTOR_NAME): New.
12193         * decl.c (ctor_identifier): New.
12194         (dtor_identifier): New.
12195         (init_decl_processing): Set them.
12196
12197 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
12198
12199         * typeck.c (build_component_ref): Don't get confused by fields whose
12200         context has no type name, like pointer to member functions.
12201
12202 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
12203
12204         * decl.c (grokdeclarator): Handle typedef without declarator.
12205
12206         * pt.c (tsubst): Handle SCOPE_REF in declarator.
12207
12208         * parse.y (bad_parm): Catch another case of missing `typename'.
12209
12210         * lex.c (yyprint): Handle TYPE_DECLs.
12211
12212         * decl.c (start_function): Don't try to be clever.
12213
12214         * lex.c: Lose compiler_error_with_decl.
12215         * typeck2.c: Lose error_with_aggr_type.
12216         (incomplete_type_error): Use cp_* instead of old functions.
12217         (readonly_error): Likewise.
12218         * typeck.c (convert_arguments): Likewise.
12219         * search.c (lookup_nested_field): Likewise.
12220         * method.c (make_thunk): Likewise.
12221         * decl.c (grokparms): Likewise.
12222         * cp-tree.h: Update.
12223
12224         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
12225         and value.
12226
12227 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
12228
12229         * method.c (build_opfncall): When deleting a pointer to an
12230         array, build a new pointer to the tree past any ARRAY_TYPE
12231         nodes.
12232
12233 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12234
12235         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
12236
12237 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
12238
12239         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
12240         and ! DECL_INLINE.
12241
12242         * decl.c (finish_function): Don't set nested based on
12243         hack_decl_function_context.
12244         * parse.y (function_try_block): Check for nested function.
12245         (pending_inlines): Likewise.
12246
12247         * decl2.c (build_expr_from_tree): If a unary op already has a
12248         type, just return it.
12249
12250         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
12251
12252         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
12253         (finish_file): Check the return value of walk_vtables.
12254         (finish_prevtable_vardecl): Return int.
12255         (finish_vtable_vardecl): Likewise.
12256         (prune_vtable_vardecl): Likewise.
12257         * lex.c (set_vardecl_interface_info): Likewise.
12258         * cp-tree.h: Adjust return types.
12259
12260         * class.c (delete_duplicate_fields_1): Don't complain about
12261         duplicate nested types if they're the same type.
12262         (finish_struct): Remove check for duplicate.
12263         * decl2.c (grokfield): Don't check for typedef of anonymous type.
12264
12265 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
12266
12267         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
12268
12269         * decl.c (grokdeclarator): Lose special handling of class-level
12270         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
12271         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
12272
12273         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
12274
12275         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
12276
12277         * search.c (compute_access): Fix handling of anonymous union
12278         members.
12279         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
12280         from anonymous unions to their members.
12281
12282         * typeck.c (build_x_function_call): For static member functions,
12283         hand off to build_member_call.
12284
12285 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
12286
12287         * typeck.c (build_component_ref): Handle OFFSET_REFs.
12288
12289         * init.c (expand_vec_init): Fix init == 0 case.
12290
12291 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
12292
12293         * init.c (build_new): Pedwarn about init and array new.
12294         (expand_vec_init): Handle lists, use convert_for_initialization.
12295
12296         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
12297         when converting to an aggregate type.
12298         * cvt.c (cp_convert): Pass it through.
12299
12300         * typeck.c (build_conditional_expr): Handle user-defined
12301         conversions to slightly different types.
12302
12303         * decl.c (grokdeclarator): Force an array type in a parm to be
12304         permanent.
12305
12306         * decl2.c (do_using_directive): Sorry.
12307         (do_namespace_alias): Likewise.
12308         * lex.c (real_yylex): Warn about using the `namespace' keyword.
12309
12310 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
12311
12312         * parse.y (datadef): Move call to note_list_got_semicolon up.
12313
12314 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
12315
12316         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
12317
12318 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
12319
12320         * decl.c (cp_finish_decl): The exception regions have to be
12321         nested, not overlapping.  We start the exception region for a
12322         decl, after it has been fully built, and all temporaries for it
12323         have been cleaned up.
12324
12325 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
12326
12327         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
12328
12329 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
12330
12331         * tree.def: Add RETURN_INIT.
12332         * pt.c (instantiate_decl): Handle RETURN_INIT.
12333         * decl.c (store_return_init): Handle minimal_parse_mode.
12334
12335         * tree.c (cp_build_type_variant): Just return an error_mark_node.
12336         * decl.c (make_typename_type): Don't try to get the file and line
12337         of an identifier.
12338         * typeck.c (comptypes): Handle TYPENAME_TYPE.
12339
12340 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
12341
12342         * decl.c (poplevel): Make sure we clear out and restore old local
12343         non-VAR_DECL values by default when they go out of scope.
12344
12345 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
12346
12347         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
12348         referring to addresses of variables and functions.
12349
12350         * error.c (dump_expr): Support SIZEOF_EXPR.
12351
12352         * init.c (do_friend): Use the return value of check_classfn.
12353
12354         * typeck.c (convert_arguments): Call complete_type.
12355
12356         * method.c (hack_identifier): After giving an error, set value to
12357         error_mark_node.
12358
12359 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
12360
12361         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
12362         lossage for local classes.
12363         * cp-tree.h: Declare it.
12364         * decl.c (lookup_name_real): Evil, painful hack for local classes.
12365         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
12366         Use hack_decl_function_context.
12367         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
12368         (start_function): Use hack_decl_function_context.
12369         (finish_function): Likewise.
12370         * method.c (synthesize_method): Likewise.
12371         * lex.c (process_next_inline): Likewise.
12372         (do_pending_inlines): Likewise.
12373         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
12374         done with it.
12375
12376 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
12377
12378         * sig.c (build_signature_pointer_or_reference_type): Align
12379         signature pointers/references on 8-byte boundaries so they can be
12380         grabbed 2 words at a time on a Sparc.
12381
12382 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
12383
12384         * method.c (hack_identifier): Requiring a static chain is now a
12385         hard error.
12386         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
12387         functions.
12388
12389 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
12390
12391         * init.c (build_offset_ref): Call complete_type.
12392
12393         * decl.c (pop_from_top_level): Always pop previous_class_type.
12394
12395         * parse.y: Handle multiple decls in a for-init-statement.
12396         * pt.c (tsubst_expr): Likewise.
12397
12398         * pt.c (tsubst): Use tsubst_expr for the second operand of an
12399         ARRAY_REF.
12400
12401         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
12402         (poplevel_class): Set it here.
12403         (pop_from_top_level): Pop it here if we're returning to class scope.
12404         * class.c (pushclass): Don't set it here.
12405
12406         * decl.c (maybe_push_to_top_level): Save current_template_parms,
12407         and clear it if !pseudo.
12408         (pop_from_top_level): Restore it.
12409
12410         * decl2.c (finish_file): Push the dummy each time we walk the list
12411         of vtables.
12412
12413         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
12414         something for CAST_EXPR.
12415         
12416 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
12417
12418         * cvt.c (cp_convert): Warn about implicit conversion of the
12419         address of a function to bool, as it is always true.
12420
12421 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
12422
12423         * typeck.c (c_expand_return): Fix warning for local externs returned.
12424
12425 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
12426
12427         * tree.c (mapcar): Propagate const and volatile properly.
12428
12429         * typeck.c (complete_type): Be sure to instantiate the
12430         MAIN_VARIANT of the type.
12431
12432         * method.c (synthesize_method): Class interface hackery does not
12433         apply to synthesized methods.
12434
12435 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
12436
12437         * pt.c (comp_template_args): Use comptypes rather than just
12438         checking for TEMPLATE_TYPE_PARM equivalence.
12439
12440         * typeck.c (build_x_function_call): Call complete_type before
12441         checking TYPE_OVERLOADS_CALL_EXPR.
12442
12443 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
12444
12445         * g++.c (main): Check also for new define ALT_LIBM.
12446
12447 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
12448
12449         * pt.c (instantiate_class_template): If we don't have a pattern
12450         yet, that's OK.
12451         (coerce_template_parms): If we see a local class, bail.
12452
12453         * decl.c (grok_reference_init): Make sure there's a type before
12454         checking its code.
12455
12456         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
12457         (push_template_decl): Likewise.
12458
12459         * parse.y (named_class_head): Set
12460         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
12461
12462         * decl.c (xref_tag): Diagnose redeclaration of template
12463         type-parameter name.
12464
12465         * error.c (dump_type): Handle anonymous template type parms.
12466
12467         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
12468         TYPE_STUB_DECL.
12469         (coerce_template_parms): Likewise.
12470
12471 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
12472
12473         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
12474         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
12475
12476 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
12477
12478         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
12479         before trying to get its STUB_DECL.
12480         (coerce_template_parms): Likewise.
12481
12482         * parse.y (template_type_parm): If they didn't use 'class',
12483         pretend they did after giving an error.
12484
12485         * pt.c (coerce_template_parms): Diagnose use of local class.
12486
12487         * decl.c (grok_reference_init): Use instantiate_type.
12488
12489         * error.c (dump_expr): Handle TEMPLATE_DECLs.
12490
12491         * parse.y (named_class_head): Diagnose mismatching types and tags.
12492
12493         * decl.c (pushdecl): Type decls and class templates clash with
12494         artificial type decls, not hide them.
12495
12496         * decl.c (redeclaration_error_message): Diagnose redefinition of
12497         templates properly.
12498         (duplicate_decls): Diagnose disallowed overloads for template
12499         functions, too.
12500
12501         * decl.c (start_decl): Call complete_type before checking for a
12502         destructor.
12503
12504         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
12505
12506         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
12507
12508 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
12509
12510         * decl.c (grok_op_properties): Don't check for operator++(int) in
12511         a template.
12512
12513         * tree.c (perm_manip): Return a copy of variable and function
12514         decls with external linkage.
12515
12516         * tree.def: Change some of the min tree codes to type "1".
12517         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
12518         * method.c (build_overload_int): Emit something arbitrary for
12519         anything but an INTEGER_CST if we're in a template.
12520
12521         * decl.c (cp_finish_decl): Call complete_type before deciding
12522         whether or not to lay out the decl.
12523
12524         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
12525
12526 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
12527
12528         * typeck2.c (build_x_arrow): Call complete_type.
12529
12530         * pt.c (add_pending_template): Broken out.
12531         (lookup_template_class): If -fexternal-templates, call it for all
12532         the methods of implemented types.
12533         (instantiate_class_template): Instead of instantiating them here.
12534         (instantiate_decl): Handle -fexternal-templates earlier.
12535
12536 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12537
12538         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
12539         memoized lookup stuff inside GATHER_STATISTICS.
12540
12541 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
12542
12543         * decl.c (start_decl): Complain about array of incomplete type
12544         here.
12545         (grokdeclarator): Not here.
12546
12547         * parse.y (template_parm): Expand full_parm inline so we can set
12548         the rule's precedence.
12549
12550         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
12551         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
12552         * decl2.c (grokbitfield): Don't check for integer constant here.
12553         * class.c (finish_struct_1): Check here.
12554
12555         * decl.c (define_label): Make the min decl go on permanent_obstack.
12556
12557         * pt.c (unify): Don't handle CONST_DECLs.
12558         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
12559         (tsubst_copy): Likewise.
12560
12561         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
12562         CONST_DECL for a template parm.
12563
12564 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
12565
12566         * decl.c (grokdeclarator): Complain about array of incomplete type
12567         here.
12568         (start_decl_1): Not here.
12569
12570         * pt.c (tsubst): Handle pointer-to-function declarators.
12571
12572         * method.c (hack_identifier): If pedantic, diagnose local class
12573         methods that require a static chain.
12574
12575         * decl.c (grok_op_properties): No longer static.
12576         * cp-tree.h: Declare it.
12577         * pt.c (tsubst): Call it for operators.
12578         Use tsubst_copy for TREE_VECs.
12579
12580         * parse.y (template_arg): The expr has precedence like '>'.
12581
12582 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
12583
12584         * pt.c (coerce_template_parms): Don't coerce an expression using
12585         template parms.
12586         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
12587         (tsubst): Don't use build_index_2_type if the max_value uses template
12588         parms.
12589         * method.c (build_overload_int): Emit something arbitrary for an
12590         expression using template parms.
12591
12592         * parse.y (template_close_bracket): New non-terminal to catch use
12593         of '>>' instead of '> >' in template class names.
12594         (template_type): Use it.
12595         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
12596
12597         * tree.def: Add CAST_EXPR.
12598         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
12599         CONVERT_EXPR for minimal_parse_mode.
12600         * typeck.c (build_c_cast): Likewise.
12601         * pt.c (tsubst_copy): Likewise.
12602         * decl2.c (build_expr_from_tree): Likewise.
12603         * error.c (dump_expr): Likewise.
12604
12605 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12606
12607         * except.c (SetTerminate, SetUnexpected): Put back global vars.
12608         (init_exception_processing): Put back decl/init of
12609         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
12610         fns from libstdc++.
12611
12612         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
12613         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
12614         Delete unused fns.
12615         * cp-tree.h (declare_uninstantiated_type_level,
12616         uninstantiated_type_level_p): Delete prototypes.
12617
12618 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
12619
12620         * pt.c (tsubst_expr): Add default return.
12621
12622 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12623
12624         * error.c (fndecl_as_string): Delete unused arg CNAME.
12625         * sig.c (build_signature_table_constructor,
12626         build_signature_method_call): Fix calls.
12627
12628         * class.c (the_null_vtable_entry): Delete var definition.
12629         (init_class_processing): Delete tree the_null_vtable_entry init.
12630         * decl.c (no_print_{functions, builtins}): Declare as static.
12631         (__tp_desc_type_node): #if 0 var definition.
12632         (init_type_desc): #if 0 init of __tp_desc_type_node.
12633         (vb_off_identifier): Move var decl into init_decl_processing.
12634         (current_function_assigns_this): Declare as static.
12635         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
12636         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
12637         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
12638         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
12639         * init.c (BI_header_type, BI_header_size): Declare as static.
12640         * pt.c (template_classes): Delete unused var.
12641         (add_pending_template): Delete decl for non-existent fn.
12642         (lookup_template_class): Delete vars CODE and TAG_CODE.
12643         (instantiate_template): Delete unused var TARGS.
12644         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
12645         Delete decls.
12646         (__tp_desc_type_node): #if 0 var decl.
12647         (fndecl_as_string): Fix prototype.
12648
12649 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
12650
12651         * tree.def: Add GOTO_STMT.
12652         * pt.c (tsubst_expr): Support goto and labels.
12653         * decl.c (define_label): Support minimal parsing.
12654         * parse.y (simple_stmt): Likewise.
12655
12656 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12657
12658         * xref.c (GNU_xref_member): Only define/set var I if
12659         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
12660         used.
12661         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
12662         (GNU_xref_end): Fix call.
12663         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
12664         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
12665
12666         * tree.c (build_exception_variant): Delete unused vars I, A, T,
12667         T2, and CNAME.
12668         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
12669         (mapcar): Delete unused var CODE.
12670         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
12671         (break_out_cleanups): Fix call.
12672         (bot_manip): Likewise.
12673         * call.c (build_method_call): Likewise.
12674         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
12675         Likewise.
12676         * typeck.c (unary_complex_lvalue, build_modify_expr,
12677         convert_for_initialization): Likewise.
12678         * typeck2.c (build_functional_cast): Likewise.
12679         * cp-tree.h (build_cplus_new): Fix prototype.
12680
12681         * repo.c (open_repo_file): Delete unused var Q.
12682         (repo_compile_flags, repo_template_declared,
12683         repo_template_defined, repo_class_defined, repo_inline_used,
12684         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
12685         (repo_get_id, repo_vtable_used): Declare as static. 
12686         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
12687         prototypes.
12688
12689 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
12690
12691         * parse.y (pending_inlines): Add function_try_block case.
12692
12693         * pt.c (unify): Fix for template const parms.
12694
12695 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12696
12697         * lex.c (extract_interface_info): Delete forward decl.
12698         (default_copy_constructor_body, default_assign_ref_body): Delete
12699         decls for non-existent functions.
12700         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
12701         (init_lex): Delete setting them.
12702         (cons_up_default_function): Delete unused vars FUNC_BUF,
12703         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
12704         #if 0'd synth code.
12705         (toplevel, expression_obstack): Delete unused extern decls.
12706         (tree_node_kind): Delete unused enum.
12707         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
12708         GATHER_STATISTICS.
12709         (tree_node_kind_names): Delete unused extern decl.
12710         (synth_obstack): Delete unused var.
12711         (init_lex): Don't set it.
12712         (init_parse): Add decl before use.
12713         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
12714         (current_unit_{name, language}): Delete unused vars. 
12715         (check_newline): Don't bother setting them, just accept the #pragma.
12716         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
12717         (current_unit_{name, language}): Delete decls.
12718
12719         * search.c: Wrap all of the memoized functions, macros, and
12720         variables inside #ifdef GATHER_STATISTICS.
12721         (lookup_field, lookup_fnfields): Likewise.
12722         (init_search_processing): Likewise.
12723         (reinit_search_statistics): Wrap whole function.
12724         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
12725
12726         * decl.c (finish_function): Only call pop_memoized_context if
12727         GATHER_STATISTICS is defined.
12728         (start_function): Likewise for push_memoized_context.
12729         * class.c (pushclass, popclass): Likewise.
12730
12731         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
12732         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
12733
12734         * cvt.c (cp_convert): Delete unused local var FORM.
12735         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
12736         prototypes.
12737
12738 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
12739
12740         * pt.c (do_poplevel): Oops; really return what we get from
12741         poplevel this time.
12742
12743 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12744
12745         * cp-tree.h (is_aggr_type): Add prototype.
12746
12747         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
12748         * method.c ({push,pop}_cp_function_context): Delete decls.
12749         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
12750         (SetUnexpected, SetTerminate): Delete unused vars.
12751         (init_exception_processing): Don't set SetUnexpected or
12752         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
12753         (output_exception_table_entry): Delete unused array LABEL.
12754         (expand_internal_throw): Delete unused var PARAMS.
12755         (expand_start_catch_block): Delete unused var CLEANUP.
12756         (emit_exception_table): Delete unused var EH_NODE_DECL.
12757         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
12758         GOTO_UNWIND_AND_THROW.  Don't set them.
12759         (end_eh_unwinder): Add top decl.
12760         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
12761         (exception_section, push_rtl_perm, do_function_call,
12762         lang_interim_eh, push_eh_cleanup, eh_outer_context,
12763         expand_end_eh_spec, end_eh_unwinder): Declare as static.
12764         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
12765         throw_used): Likewise.
12766         * cp-tree.h (expand_end_eh_spec): Delete prototype.
12767
12768         * search.c (dfs_mark, dfs_mark_vtable_path,
12769         dfs_unmark_vtable_path, dfs_mark_new_vtable,
12770         dfs_unmark_new_vtable, dfs_clear_search_slot,
12771         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
12772         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
12773         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
12774         functions.
12775         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
12776         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
12777         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
12778         Only define #ifdef GATHER_STATISTICS.
12779         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
12780         is defined.
12781         (vbase_decl): Delete var definition.
12782         (init_search): Delete old decl.
12783         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
12784         never actually used.
12785         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
12786         (get_base_distance_recursive): Delete unused fourth arg
12787         BASETYPE_PATH.  Fix call .
12788         (get_base_distance): Fix call.
12789         (push_class_decls): Delete unused var ID.
12790         (make_memoized_table_entry): Declare as static.
12791         (breadth_first_search): Declare as static.
12792         (tree_has_any_destructor_p): Declare as static.
12793         (pop_class_decls): Delete unused arg pop_class_decls.
12794         * class.c (popclass): Fix call to pop_class_decls.
12795         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
12796         tree_has_any_destructor_p): Delete prototypes.
12797
12798         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
12799         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
12800         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
12801         (build_user_desc): Delete unused var T.
12802         (build_class_desc): Delete unused vars T and OFF.
12803         (build_t_desc): Delete unused var NAME_STRING.
12804         (build_headof): Make static.
12805         (get_bad_cast_node): Likewise.
12806         (get_def_to_follow): Likewise.
12807         * cp-tree.h (init_type_desc): Add prototype.
12808         (build_headof): Remove prototype.
12809
12810 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
12811
12812         * pt.c (tsubst): Only look for matching decls at file scope for
12813         non-member functions.
12814
12815         * call.c (build_scoped_method_call): Handle scoped destructor
12816         calls in templates.
12817
12818         * decl.c (*_top_level): Also save previous_class_values.
12819
12820         * pt.c (tsubst_expr): Support do {} while loops.
12821         * parse.y (simple_stmt): Likewise.
12822         * tree.def: Likewise.
12823
12824         * method.c (build_overload_identifier): For a class nested in a
12825         template class, don't mangle in the template parms from our
12826         context.
12827
12828         * lex.c, cp-tree.h: Remove support for template instantiations in
12829         the pending_inlines code.
12830         * pt.c: Remove dead functions and unused arguments.
12831         (uses_template_parms): TYPENAME_TYPEs always use template parms.
12832         * parse.y: Stop passing anything to end_template_decl.
12833         * tree.c (print_lang_statistics): Only print tinst info #ifdef
12834         GATHER_STATISTICS.
12835
12836 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12837
12838         * init.c (expand_recursive_init{,_1}): Delete decls. 
12839         (sort_member_init): Delete unused var INIT.
12840         (emit_base_init): Delete unused var X.
12841         (build_offset_ref): Delete unused var CNAME.
12842         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
12843         (emit_base_init): Delete unused local var BASE.  Delete extern
12844         decl of IN_CHARGE_IDENTIFIER.
12845         (build_delete): Delete unused local var VIRTUAL_SIZE.
12846
12847         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
12848         (build_delete): Fix call.
12849         * decl2.c (delete_sanity): Likewise.
12850         * cp-tree.h (build_vec_delete): Update prototype.
12851
12852         * typeck.c (common_base_type): Delete unused var TMP.
12853         (build_binary_op): Delete local var ARGS_SAVE.
12854         (build_array_ref): Delete unused var ITYPE.
12855         (c_expand_return): Delete unused var USE_TEMP.
12856
12857         * typeck.c (compexcepttypes): Delete unused arg STRICT.
12858         (comptypes): Fix calls.
12859         * decl.c (duplicate_decls): Likewise.
12860         * cp-tree.h (compexcepttypes): Delete extra arg.
12861
12862         * decl2.c (check_classfn): Delete unused second arg CNAME.
12863         * decl.c (start_decl, grokfndecl): Fix calls.
12864         * init.c (do_friend): Likewise.
12865         * cp-tree.h (check_classfn): Update prototype.
12866
12867         * cp-tree.h (signature_error, import_export_vtable,
12868         append_signature_fields, id_in_current_class, mark_used,
12869         copy_assignment_arg_p): Add decls.
12870         * decl2.c (mark_used): Delete decl.
12871
12872         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
12873
12874         * class.c (get_vtable_entry): Diable unused function.
12875         (doing_hard_virtuals): Delete unused static global var.
12876         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
12877         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
12878         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
12879         (modify_one_vtable): Delete unused var OLD_RTTI.
12880         (finish_struct_anon): Delete unused vars OFFSET and X.
12881         (finish_struct_bits): Delete unused var METHOD_VEC.
12882         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
12883         for-scope local variable METHODS.
12884
12885         * call.c (user_harshness): Delete unused/unneeded arg PARM.
12886         (ideal_candidate): Delete unused args BASETYPE and PARMS.
12887         (build_method_call): Delete unused args passed into ideal_candidate.
12888         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
12889         * cp-tree.h (synthesize_method): Add decl.
12890
12891         * decl.c (note_level_for_for): Give void return type.
12892         (pushdecl_nonclass_level): Likewise.
12893         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
12894         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
12895         (suspend_binding_level): Delete unused var LEVEL.
12896         (duplicate_decls): Delete unused var CTYPE.
12897         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
12898         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
12899         PTR_ENDLINK.
12900         (grokdeclarator): Delete unused var C.
12901         (grokdeclarator): Delete unused var SIZE_VARIES.
12902         (grokparms): Delete unused var SAW_VOID.
12903         (start_function): Delete unused var OLDDECL.
12904         (cplus_expand_expr_stmt): Delete unused var
12905         REMOVE_IMPLICIT_IMMEDIATELY. 
12906
12907         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
12908
12909         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
12910
12911 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
12912
12913         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
12914         (build_min_nt): Likewise.
12915         * pt.c (do_pushlevel): Emit line note.
12916         (do_poplevel): Return what we get from poplevel.
12917         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
12918         * parse.y: Use do_pushlevel and do_poplevel.
12919         * cp-tree.h: Declare do_poplevel.
12920         
12921         * cp-tree.h: Declare at_eof.
12922         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
12923         * decl2.c (import_export_decl): Renamed from import_export_inline.
12924         (finish_file): Call it to do interface handling for statics.
12925         * pt.c (tsubst_copy): Call mark_used on variables and functions
12926         used here.
12927
12928         * decl2.c (finish_file): Don't emit statics we can't generate.
12929         * pt.c (instantiate_decl): Don't set interface on instantiations
12930         we can't generate.
12931
12932         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
12933         * tree.c (print_lang_statistics): Print max template depth.
12934         * pt.c (push_tinst_level): Dump entire instantiation context.
12935         (instantiate_class_template): Use it and pop_tinst_level.
12936         (instantiate_decl): Likewise.
12937
12938         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
12939         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
12940
12941 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
12942
12943         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
12944         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
12945         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
12946         the new template implementation.
12947
12948 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12949
12950         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
12951
12952 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
12953
12954         * decl.c (cp_finish_decl): Delay emitting the debug information for
12955         a typedef that has been installed as the canonical typedef, if the
12956         type has not yet been defined.
12957
12958 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
12959
12960         * decl2.c (grokfield): Still call pop_nested_class for access decls.
12961
12962 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12963
12964         * decl.c (lookup_label): Call label_rtx.
12965
12966         * decl.c (make_binding_level): New function.
12967         (pushlevel, pushlevel_class): Call it instead of explicit
12968         duplicate calls to xmalloc.
12969
12970         * decl.c (init_decl_processing): Delete useless build_pointer_type
12971         call.
12972
12973         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
12974         (sizet_ftype_string): Delete variable.
12975         (init_decl_processing): Add built-in functions fabsf, fabsl,
12976         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
12977         variable strlen_ftype, used for strlen.
12978
12979 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
12980
12981         * decl.c (push_to_top_level): Start from current_binding_level
12982         again for now; the stl hacks depend on g++ being broken in this
12983         way, and it'll be fixed in the template rewrite.
12984
12985         * tree.def: Add USING_DECL.
12986         * decl2.c (do_class_using_decl): Implement.
12987         (grokfield): Pass access decls off to do_class_using_decl instead of
12988         grokdeclarator.
12989         * error.c (dump_decl): Handle USING_DECLs.
12990         * decl.c (grokdeclarator): Remove code for handling access decls.
12991         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
12992         as access decls for now.
12993         (finish_struct): Don't check USING_DECLs for other uses of the name.
12994
12995         * search.c (get_matching_virtual): Use cp_error_at.
12996
12997 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
12998
12999         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
13000         match c-typeck.c.
13001         (self_promoting_args_p): Move the check that TYPE is non-nil
13002         before trying to look at its main variant.
13003         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
13004
13005         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
13006         Delete macros.
13007         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
13008         (do_friend): Delete call to xref_friend.
13009         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
13010
13011         * typeck.c (convert_sequence): #if 0 unused function.
13012
13013         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
13014         be in decl_in_memory_p.
13015         (decl_in_memory_p): Delete decl.
13016         * expr.c (decl_in_memory_p): Delete fn.
13017         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
13018
13019         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
13020
13021 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
13022
13023         * class.c (finish_struct_1): Check for a pure-specifier on a
13024         non-virtual function here.
13025
13026         * decl2.c (grok_function_init): Don't check whether the function
13027         is virtual here.
13028         (grokfield): Don't call check_for_override here.
13029
13030         * decl.c (push_to_top_level): Start from inner_binding_level,
13031         check class_shadowed in class levels.
13032
13033 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
13034
13035         * decl.c (resume_level): Ignore things that don't have names, instead
13036         of core dumping.
13037
13038 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13039
13040         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
13041
13042 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
13043
13044         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
13045         synthesized dtor.
13046
13047         * parse.y (complete_type_name): Bind global_scope earlier.
13048         (complex_type_name): Likewise.
13049         (qualified_type_name): Remove.
13050
13051 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
13052
13053         * decl.c (grokfndecl): Move code that looks for virtuals in base
13054         classes...
13055         * class.c (check_for_override): ... to a new function.
13056         (finish_struct_1): Call it.
13057
13058         * cp-tree.h: Declare warn_sign_compare.
13059
13060         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
13061         rather than extra_warnings to decide whether to warn about
13062         comparison of signed and unsigned.
13063
13064         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
13065         implies -Wsign-compare.  -Wall doesn't imply -W.
13066
13067 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
13068
13069         * typeck.c (build_component_ref): Fix to handle anon unions in base
13070         classes as well.
13071
13072 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13073
13074         * class.c (resolves_to_fixed_type_p): Delete code dealing with
13075         a WITH_CLEANUP_EXPR, since we don't generate them any more.
13076         * cvt.c (build_up_reference): Likewise.
13077         * decl.c (grok_reference_init): Likewise.
13078         (cp_finish_decl): Likewise.
13079         * error.c (dump_expr): Likewise.
13080         * tree.c (real_lvalue_p): Likewise.
13081         (lvalue_p): Likewise.
13082         (build_cplus_new): Likewise.
13083         (unsave_expr_now): Likewise.
13084         * typeck.c (unary_complex_lvalue, build_modify_expr,
13085         c_expand_return): Likewise.
13086
13087 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13088
13089         Make the C++ front-end pay attention to attributes for structures.
13090         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
13091         finish_struct_1.
13092         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
13093         Take out old round_up_size use and setting the DECL_ALIGN possibly
13094         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
13095         can override what the attribute set.
13096         * cp-tree.h (finish_struct): Update prototype.
13097         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
13098         attributes to finish_struct.
13099         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
13100         value down into finish_struct.
13101         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
13102
13103 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
13104
13105         * decl.c (poplevel):  Re-word dead for local handling.
13106         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
13107         (cp_finish_decl):  If is_for_scope, check for duplicates so
13108         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
13109
13110         * lex.c (do_identifier):  Use global binding in preference of
13111         dead for local variable.
13112
13113 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
13114
13115         * init.c (initializing_context): Handle anon union changes, the
13116         context where fields of anon unions can be initialized now has to be
13117         found by walking up the TYPE_CONTEXT chain.
13118
13119 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
13120
13121         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
13122         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
13123         (obscure_complex_init): If bss is supported, always set
13124         DECL_INITIAL to error_mark_node.
13125
13126 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13127
13128         * init.c (is_friend): Make sure there's a context before we see if
13129         it's an aggr type.
13130
13131 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
13132
13133         * init.c (is_friend): Classes are not friendly with nested classes.
13134
13135 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
13136
13137         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
13138         and record its result.
13139
13140 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
13141
13142         * class.c (finish_struct_anon): Switch around code to not move anon
13143         union elements around, nor mess up their contexts, nor offsets,
13144         instead we now build up the right number of COMPONENT_REFs for all
13145         the anon unions that may be present at build_component_ref time.
13146         * typeck.c (lookup_anon_field): New routine to handle field lookup
13147         on fields without names.  We find them, based upon their unique type
13148         instead.
13149         * typeck.c (build_component_ref): Allow FIELD_DECL components.
13150         Handle finding components in anonymous unions, and ensure that a
13151         COMPONENT_REF is built for each level as necessary.
13152
13153 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
13154
13155         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
13156         code that ensures that copy ctors are used if appropriate.
13157
13158 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13159
13160         * init.c (build_vec_delete): Only give an error if base isn't an
13161         error_mark_node.
13162
13163 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
13164
13165         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
13166         (yylex): If we see `new', keep slurping.
13167
13168 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
13169
13170         * class.c (finish_struct_1): Move code for handling anon unions...
13171         (finish_struct_anon): to here.  Fixup so that we do the offset
13172         calculations right, and so that the fields are physically moved to
13173         the containers's chain.
13174
13175 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13176
13177         * decl.c (grokdeclarator): Avoid trying to get an operand off an
13178         identifier node.
13179
13180 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
13181
13182         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
13183         POINTER_SIZE to agree with expr.c.
13184
13185 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
13186
13187         * search.c (lookup_field): Don't report ambiguities if protect is 0,
13188         instead return NULL_TREE.
13189
13190 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
13191
13192         * class.c (finish_struct_1): Call warn_hidden if we want warnings
13193         about overloaded virtual functions.
13194         (warn_hidden): New routine to warn of virtual functions that are
13195         hidden by other virtual functions, that are not overridden.
13196         (get_basefndecls): New routine, used by warn_hidden.
13197         (mark_overriders): New routine, used by warn_hidden.
13198         * search.c (get_matching_virtual): Remove old warning that just
13199         isn't very useful.
13200
13201 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13202
13203         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
13204
13205         * typeck.c (null_ptr_cst_p): Delete unused fn.
13206         (build_function_call_maybe): Delete unused fn.
13207
13208         * expr.c (extract_init): #if 0 the code after unconditional return 0
13209         for now.
13210
13211         Delete old cadillac code.
13212         * edsel.c: Remove file.
13213         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
13214         * Makefile.in (CXX_OBJS): Delete edsel.o.
13215         (edsel.o): Delete rule.
13216         * cp-tree.h (flag_cadillac): Delete var decl.
13217         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
13218         * decl2.c (flag_cadillac): Delete var definition.
13219         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
13220         (grokfield): Delete code depending on flag_cadillac.
13221         (finish_anon_union): Likewise.
13222         * class.c (finish_struct_1): Likewise.
13223         (pushclass): Likewise.
13224         (popclass): Likewise.
13225         (push_lang_context): Likewise.
13226         (pop_lang_context): Likewise.
13227         * decl.c (init_decl_processing): Likewise.
13228         (start_decl): Likewise.
13229         (cp_finish_decl): Likewise.
13230         (xref_tag): Likewise.
13231         (finish_enum): Likewise.
13232         (start_function): Likewise.
13233         (finish_function): Likewise.
13234         (finish_stmt): Likewise.
13235         * lex.c (lang_init): Likewise.
13236         (check_newline): Likewise.
13237
13238         * lex.c (do_pending_inlines): Delete synthesized method kludge.
13239
13240         Delete defunct, ancient garbage collection implementation.
13241         * rtti.c: New file with the RTTI stuff from gc.c.
13242         * gc.c: Removed file (moved the remaining stuff into rtti.c).
13243         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
13244         (rtti.o): New rule, replacing gc.o.
13245         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
13246         * cp-tree.h: Delete gc-related fn decls.
13247         (DECL_GC_OFFSET): Delete macro.
13248         (flag_gc): Delete extern decl.
13249         * decl.c (current_function_obstack_index): Delete var decl.
13250         (current_function_obstack_usage): Delete var decl.
13251         (start_function): Delete clearing of current_function_obstack_index
13252         and current_function_obstack_usage.
13253         (init_decl_processing): Delete code relying on -fgc.
13254         Delete call to init_gc_processing.
13255         (cp_finish_decl): Delete calls to build_static_gc_entry and
13256         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
13257         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
13258         and to expand_expr of a __gc_main call.
13259         (maybe_gc_cleanup): Delete var decl.
13260         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
13261         * decl2.c (flag_gc): Delete var decl.
13262         (lang_f_options): Delete offering of -fgc.
13263         (lang_decode_option): Delete -fgc and -fno-gc handling.
13264         (get_temp_regvar): Delete gc code.
13265         * init.c (build_new): Delete gc code.
13266         * lex.c (init_lex): Delete checking of flag_gc.
13267
13268         * typeck.c (convert_arguments): Delete gc code.
13269         (build_component_addr): Delete -fgc warning.
13270         (build_modify_expr): Delete gc code.
13271
13272         * decl2.c (build_push_scope): Delete fn.
13273         * cp-tree.h (build_push_scope): Delete decl.
13274
13275         * search.c (clear_search_slots): Delete fn.
13276         * cp-tree.h (clear_search_slots): Delete decl.
13277
13278         * search.c (tree_needs_constructor_p): Delete fn.
13279         * cp-tree.h (tree_needs_constructor_p): Delete decl.
13280
13281         * tree.c (id_cmp): Delete fn.
13282
13283         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
13284         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
13285
13286         * tree.c (decl_value_member): Delete fn.
13287         * cp-tree.h (decl_value_member): Delete decl.
13288
13289         * tree.c (list_hash_lookup_or_cons): Delete fn.
13290         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
13291
13292         * method.c (cplus_exception_name): Delete fn.
13293         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
13294
13295         * spew.c (shift_tokens): Delete fn.
13296
13297 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
13298
13299         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
13300         to cp_finish_decl.
13301         * parse.y: Likewise.
13302
13303 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13304
13305         * tree.c (build_cplus_staticfn_type): Delete function definition;
13306         never used.
13307         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
13308
13309         * tree.c (virtual_member): Delete function definition; never used.
13310         * cp-tree.h (virtual_member): Delete decl.
13311
13312 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
13313
13314         * typeck.c (build_component_ref): Handle getting vbase pointers
13315         out of complex multiple inheritance better.
13316
13317 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
13318
13319         * typeck.c (build_object_ref): Make sure we use the real type, not
13320         any reference type.
13321
13322 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
13323
13324         * tree.c (build_exception_variant): Don't create new types if we
13325         don't have to, also build new types on the right obstack.
13326
13327 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
13328
13329         * decl.c (store_bindings): Split out from push_to_top_level.
13330         (push_to_top_level): Call it for b->type_shadowed on class binding
13331         levels.
13332
13333 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
13334
13335         * search.c (expand_upcast_fixups): Fix so that offsets stored in
13336         vbase_offsets are always right.  Fixes a problem where virtual base
13337         upcasting and downcasting could be wrong during conversions on this
13338         during virtual function dispatch at ctor/dtor time when dynamic
13339         vtable fixups for deltas are needed.  This only sounds easier than
13340         it is.  :-)
13341         (fixup_virtual_upcast_offsets): Change to reflect new calling
13342         convention for expand_upcast_fixups.
13343
13344 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13345
13346         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
13347         check that it's usable as the bitfield width.
13348
13349 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13350
13351         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
13352         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
13353         only ever used for functions in it.
13354
13355 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
13356
13357         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
13358         (nested_type): Likewise.
13359         (nested_name_specifier): Use lastiddecl.
13360
13361         * decl.c (grokdeclarator): Adjust accordingly.
13362         * init.c (expand_member_init): Likewise.
13363         * parse.y (base_class): Likewise.
13364         * typeck2.c (build_functional_cast): Likewise.
13365
13366         * typeck2.c (build_functional_cast): Fill in name after we've
13367         checked for non-aggr type.
13368
13369 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
13370
13371         * decl2.c (warn_pointer_arith): Default to on.
13372
13373 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
13374
13375         * lex.c (is_rid): New function.
13376         * decl.c (grokdeclarator): Diagnose reserved words used as
13377         declarator-ids.
13378
13379 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
13380
13381         * tree.c (get_decl_list): Don't lose cv-quals.
13382
13383         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
13384         typespecs used as declarator-ids.
13385
13386 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
13387
13388         * decl.c (poplevel): When poping a level, don't give a warning for
13389         any subblocks that already exist.
13390
13391 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
13392
13393         * typeck.c (build_object_ref): Finish what I started.
13394
13395         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
13396
13397         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
13398
13399         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
13400         scope.
13401
13402 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
13403
13404         * decl.c (xref_tag): Handle passing a type in directly.
13405
13406         * parse.y (qualified_type_name): Pull out the type.
13407         (nested_type): Likewise.
13408         Take types directly instead of as identifiers.
13409         * call.c (build_scoped_method_call): Take types directly instead of
13410         as identifiers.
13411         * decl.c (xref_basetypes): Likewise.
13412         * init.c (expand_member_init): Likewise.
13413         (build_member_call): Likewise.
13414         (build_offset_ref): Likewise.
13415         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
13416         * method.c (do_build_assign_ref): Likewise.
13417         * decl.c (grokdeclarator): Handle a type appearing as the
13418         declarator-id for constructors.
13419         * method.c (do_build_copy_constructor): current_base_init_list now
13420         uses the types directly, not their names.
13421         * init.c (sort_base_init): Likewise.
13422         (expand_member_init): Likewise.
13423         * init.c (is_aggr_type): New function, like is_aggr_typedef.
13424
13425 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
13426
13427         * tree.c (layout_basetypes): Call build_lang_field_decl instead
13428         of build_lang_decl if first arg is a FIELD_DECL.
13429
13430 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13431
13432         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
13433         non-empty.
13434         * except.c (expand_start_catch_block): Set TREE_USED to avoid
13435         warnings about the catch handler.
13436
13437 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
13438
13439         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
13440         expand_target_expr.
13441
13442 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
13443
13444         Fix access control to use trees rather than integers.
13445         * class.c (access_{default, public, protected, private,
13446         default_virtual, public_virtual, private_virtual}_node): Add
13447         definitions.
13448         (init_class_processing): Do creation of those nodes.
13449         * cp-tree.h (access_type): Delete enum decl.
13450         (access_{default, public, protected, private, default_virtual,
13451         public_virtual, private_virtual}_node): Add decls.
13452         (compute_access): Change return type.
13453         * search.c (compute_access): Have tree return type, instead of enum.
13454         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
13455         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
13456         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
13457         * parse.y (VISSPEC): Make ttype rather than itype.
13458         (base_class_access_list): Likewise.
13459         * *.[cy]: Change all refs of `access_public' to `access_public_node',
13460         etc.
13461         * call.c (build_method_call): Make ACCESS be a tree.
13462         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
13463         * cvt.c (convert_to_aggr): Likewise.
13464         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
13465         Likewise.
13466         * method.c (hack_identifier): Likewise.
13467         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
13468
13469 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
13470
13471         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
13472         frontend, and make it more consistent with respect to
13473         warn_pointer_arith.
13474
13475 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
13476
13477         * decl.c (pushdecl): Check for duplicate parameter names.
13478
13479 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
13480
13481         * decl.c (expand_static_init): Call assemble_external for atexit.
13482
13483 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
13484
13485         * except.c (do_unwind): Remove some generated dead code.
13486         (eh_outer_context): New routine, factor out some common code from
13487         expand_builtin_throw and end_eh_unwinder.  Add code to do return
13488         address masking for the PA.
13489         (expand_builtin_throw): Use eh_outer_context instead of open coding
13490         it here.
13491         (end_eh_unwinder): Likewise.
13492
13493 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
13494
13495         * except.c (expand_throw): Call assemble_external for __empty, if we
13496         use it.
13497
13498 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
13499
13500         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
13501         NORMAL_RETURN_ADDR_OFFSET.
13502         (end_eh_unwinder): Likewise.
13503
13504 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
13505
13506         * gc.c (build_dynamic_cast): Make sure we don't cast away const
13507         when dealing with references, and make sure we handle dynamic
13508         casting to a cv qualified reference.
13509
13510 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
13511
13512         * except.c (struct eh_context): New structure top hold eh context
13513         information.
13514         (push_eh_context): New routine.
13515         (pop_eh_context): Likewise.
13516         * decl.c (push_cp_function_context): Use them.
13517         (pop_cp_function_context): Likewise.
13518
13519 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
13520
13521         * decl2.c (finish_file): Also prune uninteresting functions in the
13522         inline emission loop.
13523
13524 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
13525
13526         * sig.c (build_signature_table_constructor): Mark functions
13527         in the signature as referenced.
13528
13529 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
13530
13531         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
13532         the inline emission stuff.
13533
13534 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
13535
13536         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
13537         weak symbols.   
13538         * lang-options.h: Add -f{no-,}weak.
13539         * decl.c (init_decl_processing): If the target does not support weak
13540         symbols, don't use them.
13541         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
13542
13543 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
13544
13545         * init.c (expand_member_init): warning for base init after members.
13546
13547 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
13548
13549         * cvt.c (build_expr_type_conversion): Don't convert to a reference
13550         type.
13551
13552 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
13553
13554         * method.c (report_type_mismatch): Improve wording for volatile
13555         mismatches.
13556
13557 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
13558
13559         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
13560         expand_assignment, as the later doesn't handle things that have
13561         copy constructors well.  The compiler would do bitwise copying,
13562         instead of ctor calling in some cases.
13563
13564 Wed Dec 13 17:05:54 PST 1995  Paul Eggert  <eggert@twinsun.com>
13565
13566         * g++.c (my_strerror): Return "cannot access" if errno is 0.
13567         (pfatal_with_name, perror_exec): Don't assume that
13568         the returned value from my_strerror contains no '%'s.
13569         (concat): Remove.
13570         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
13571
13572 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
13573
13574         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
13575         TYPE_METHODS/TREE_CHAIN mean what they used to. 
13576         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
13577         instead of TYPE_METHODS.
13578         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
13579         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
13580         * cp-tree.h (CLASSTYPE_METHODS): Lose.
13581         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
13582         TYPE_METHODS.
13583         (struct lang_decl): Lose next_method field.
13584         (DECL_NEXT_METHOD): Lose.
13585         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
13586         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
13587         anymore.
13588         (finish_struct_methods): Don't mess with the TREE_CHAINs in
13589         fn_fields.
13590
13591         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
13592         vector.
13593
13594         * call.c (build_method_call): Synthesize here even when not inlining.
13595         * typeck.c (build_function_call_real): Likewise.
13596
13597 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
13598
13599         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
13600         == DBX_DEBUG, call dbxout_start_new_source_file and
13601         dbxout_resume_previous_source_file when appropriate.
13602
13603 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
13604
13605         * except.c (start_anon_func): Push to the top level.
13606         (end_anon_func): Pop from the top level.
13607
13608 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
13609
13610         * cp-tree.h (build_cleanup): New routine to build cleanups.
13611         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
13612         call at ctor time and use atexit to run it later.
13613         * decl2.c (build_cleanup): New routine, taken from finish_file.
13614         (finish_file): Use build_cleanup instead, and don't put function
13615         local statics in global dtor list.
13616         
13617 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
13618
13619         * except.c (expand_throw): Ensure that we have cleanups, if we try
13620         and expand cleanups.
13621
13622 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
13623
13624         * except.c (expand_throw): Add logic to manage dynamic cleanups for
13625         the EH object.
13626         (expand_end_catch_block): Use the magic of expand_goto, instead of
13627         emit_jump so that we get the cleanup for any catch clause parameter
13628         and the cleanup for the exception object.  Update to reflect label
13629         changes.
13630         (push_eh_cleanup): New routine to register a cleanup for an
13631         exception object.
13632         (empty_fndecl): Used to default cleanup actions to
13633         nothing.
13634         (init_exception_processing): Setup empty_fndecl.  Setup
13635         saved_cleanup.
13636         (expand_start_catch_block): Update to reflect label changes.  Call
13637         push_eh_object to register the cleanup for the EH object.
13638         (start_anon_func): New routine to start building lambda expressions
13639         from trees.
13640         (end_anon_func): New routine to end them.
13641         (struct labelNode): Change so that we can use tree labels, or rtx
13642         labels.
13643         (saved_cleanup): Object to check for dynamic cleanups for the
13644         exception handling object.
13645         (push_label_entry): Change so that we can use tree labels, or rtx
13646         labels.
13647         (pop_label_entry): Likewise.
13648         (top_label_entry): Likewise.
13649         (expand_start_all_catch): Use tree label instead of rtx label, so
13650         that we can get the magic of expand_goto.
13651         (expand_end_all_catch): Update to reflect label changes.
13652
13653         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
13654         use UNSAVE_EXPRs.
13655         typeck.c (get_member_function_from_ptrfunc): Remove remnants of
13656         building_cleanup logic, as we now use UNSAVE_EXPRs.
13657         * cp-tree.h (unsave_expr): Declare it.
13658         * decl.c (building_cleanup): Remove.
13659         (maybe_build_cleanup): Remove building_cleanup logic, and use
13660         UNSAVE_EXPR instead.
13661
13662 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
13663
13664         * gc.c (build_t_desc): Update error message to say <typeinfo>.
13665
13666 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13667
13668         * decl.c (pushdecl): Only warn about shadowing a local variable if
13669         warn_shadow is true.
13670
13671 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
13672
13673         * typeck.c (build_binary_op_nodefault): Added warning about
13674         comparisons between different enum types with -Wall, unless
13675         -fenum-int-equiv set.
13676
13677 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
13678
13679         * class.c (finish_struct_1): Skip down to the inner type in
13680         multidimensional arrays.  Ensures ctors will be made for types that
13681         need constructing.
13682
13683 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
13684
13685         * decl.c (last_dtor_insn): New to track the last compiler generated
13686         insn in a dtor.
13687         (store_parm_decls): Set it.
13688         (finish_function): Use it to see if the dtor is empty.  Avoid doing
13689         vtable setup all the time, if we can.
13690         (struct cp_function): Add last_dtor_insn.
13691         (push_cp_function_context): Save it.
13692         (pop_cp_function_context): Restore it.
13693
13694 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
13695
13696         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
13697         warnings.
13698
13699 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
13700
13701         * typeck.c (expand_target_expr): Make sure targets get put into the
13702         current temp_slot_level, so that the free_temp_slots call will reuse
13703         them.
13704
13705 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
13706
13707         * class.c (finish_struct_1): Delay delta fixups for virtual bases
13708         until after we have done the hard virtuals, to avoid a bogus `every
13709         virtual function must have a unique final overrider' for virtual
13710         functions that are only overridden by hard virtuals.
13711
13712 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
13713
13714         * pt.c (do_function_instantiation): Don't try to find a file-scope
13715         template for a member function.
13716
13717 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
13718
13719         * g++.c (main): Add handling of -nodefaultlibs.
13720
13721 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
13722
13723         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
13724         distinguish between direct bindings of reference variables, and
13725         indirect bindings of reference variables.
13726         * cvt.c (build_up_reference): Use it.
13727         * typeck.c (convert_arguments): Use it to indicate this is an
13728         indirect binding.
13729         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
13730         as they are unused.
13731         (expand_static_init): Likewise.
13732         (cplus_expand_expr_stmt): Likewise.
13733         * decl2.c (finish_file): Likewise.
13734         * init.c (perform_member_init): Likewise.
13735         (emit_base_init): Likewise.
13736         (expand_aggr_vbase_init_1): Likewise.
13737
13738 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13739
13740         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
13741         get a DECL_LANG_SPECIFIC node.
13742         * cp-tree.h (lang_decl_flags): Add new member `level'.
13743         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
13744         decl_flags level member.
13745
13746 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13747
13748         * call.c (build_method_call): Make sure instance has a
13749         TYPE_LANG_SPECIFIC node before we dive into it.  
13750
13751 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
13752
13753         * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
13754
13755 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
13756
13757         * decl.c (duplicate_decls): When smashing decls, smash staticness in
13758         the usual way.
13759
13760 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
13761
13762         * decl.c (poplevel): Handle the merging of subblocks of cleanups
13763         when finishing blocks that have already been created (usually due to
13764         the fixup goto code).  Fixes bad debugging information.
13765
13766 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
13767
13768         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
13769         that's not a list of overloaded functions.
13770
13771 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13772
13773         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
13774         before trying to use DECL_ABSTRACT_VIRTUAL_P.
13775
13776 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
13777
13778         * decl2.c (mark_used): New function for hooking into setting of
13779         TREE_USED on decls.
13780         * call.c (build_method_call): Use it.
13781         * class.c (instantiate_type): Likewise.
13782         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
13783         for all like-named functions.
13784         * method.c (hack_identifier): Likewise.
13785         (emit_thunk): Don't call assemble_external.
13786         (make_thunk): Create thunk as a FUNCTION_DECL so that it
13787         gets the right mode and ENCODE_SECTION_INFO works.
13788         
13789         * parse.y: Use mark_used.  Pass operator names to do_identifier.
13790         * lex.c (do_identifier): Handle operator names.
13791
13792         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
13793
13794 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13795
13796         * errfn.c: Include stdio.h.
13797         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
13798
13799 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
13800
13801         * typeck2.c (digest_init): Always convert initializers to the
13802         right type.
13803
13804 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
13805
13806         * init.c (member_init_ok_or_else): Don't allow member initializers
13807         for indirect members, as it is invalid.
13808
13809 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13810
13811         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
13812
13813 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
13814
13815         * parse.y (for.init.statement): Catch compound statements inside for
13816         initializations, if we're being pedantic.
13817
13818 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
13819
13820         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
13821         looking for.
13822
13823 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
13824
13825         * error.c (dump_expr): Don't core dump when a boolean expression is
13826         used as a default argument.
13827
13828 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
13829
13830         * class.c (finish_struct_bits): Check aggregate_value_p instead of
13831         RETURN_IN_MEMORY.
13832
13833 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
13834
13835         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
13836         BLKmode type that would otherwise be returned in registers.
13837
13838 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13839
13840         * g++.c (WITHLIBC): New macro.
13841         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
13842         saw_libc and pass it at the end if it was set.
13843
13844 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
13845
13846         * parse.y (fn.def1): Call split_specs_attrs in
13847         declmods notype_declarator case.