OSDN Git Service

* parse.y (component_decl_list): Improve error-recovery.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
2
3         * parse.y (component_decl_list): Improve error-recovery.
4
5 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
6
7         * decl.c (make_typename_type): Move error to point where name
8         variable can be used by dump_type.
9
10 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
11
12         * decl.c (grokfndecl): Improve error-recovery.
13         * decl2.c (grokfield): Likewise.
14         * pt.c (finish_member_template_decl): Likewise.
15
16 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
17
18         * method.c (hack_identifier): Finding multiple members is always
19         an error.
20
21 1998-09-21  Per Bothner  <bothner@cygnus.com>
22
23         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
24
25 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
26
27         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
28
29 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
30
31         * class.c (maybe_warn_about_overly_private_class): Reformat.
32
33 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
34
35         * exception.cc (__cplus_type_matcher): realign some code.
36
37 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
38
39         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
40         (tinfo2.o): Likewise.
41         (exception.o): Likewise.
42         (new.o): Likewise.
43         (opnew.o): Likewise.
44         (opnewnt.o): Likewise.
45         (opvnew.o): Likewise.
46         (opvnewnt.o): Likewise.
47         (opdel.o): Likewise.
48         (opdelnt.o): Likewise.
49         (opvdel.o): Likewise.
50         (opvdelnt.o): Likewise.
51
52 1998-09-16  Richard Henderson  <rth@cygnus.com>
53
54         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
55
56 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
57
58         * call.c (build_field_call): handle static data members too
59
60         * typeck.c (comptypes): when comparing pointer types, check
61         whether referred types match even in strictest modes
62
63 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
64
65         * cp-tree.h: Revert previous change.
66         (finish_struct_methods): Remove declaration.
67         * class.c: Revert previous change.
68         (maybe_warn_about_overly_private_class): New function.
69         (finish_struct_methods): Declare here, and make static.  Remove
70         unnecessary parameters.  Tidy slightly.  Use
71         maybe_warn_about_overly_private_class. 
72         (finish_struct_1): Adjust.  Remove check for private constructors,
73         now done elsewhere.
74         (finish_struct): Adjust.
75         
76 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
77
78         * except.c (expand_start_catch_block): No need to check for new
79         exception model.
80         (process_start_catch_block_old): Deleted.
81         (process_start_catch_block): Add call to start_decl_1().
82         (expand_end_catch_block): Add call to end_catch_handler().
83         * exception.cc (__cplus_type_matcher): Only check the exception 
84         language if there is an exception table.
85
86 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
87
88         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
89         as used to prevent conflicts with virtual function tables.
90
91 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
92
93         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
94         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
95         * class.c (maybe_class_too_private_p): New function.
96         (finish_struct_methods): Use it.
97         (finish_struct_1): Likewise.
98         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
99         appropriate.
100         
101         * pt.c (check_specialization_scope): Fix spelling error.
102         (check_explicit_specialization): Remove code to handle explicit
103         specializations in class scope; they are now correctly diagnosed
104         as errors.
105
106 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
107
108         * decl.c (pushdecl): Don't copy types if the
109         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
110         type. 
111
112 1998-09-09  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
113
114         * class.c (get_enclosing_class): New function.
115         (is_base_of_enclosing_class): Likewise.
116         * cp-tree.h (get_enclosing_class): Declare.
117         (is_base_of_enclosing_class): Likewise.
118         * pt.c (coerce_template_parms): Use them.
119
120 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
121
122         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
123         null to decide whether to use it.
124
125         * error.c (dump_type_real): Handle NAMESPACE_DECL.
126         * parse.y (base_class.1): Avoid crash on error.
127
128 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
129
130         * decl.c (make_typename_type): If context is a namespace, the code
131         is in error.
132
133 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
134
135         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
136
137 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
138
139         * cp-tree.h (anonymous_namespace_name): Declare.
140         * decl.c: Define it.
141         (push_namespace): Use anonymous_namespace_name, rather than local
142         static anon_name.
143         * error.c (dump_decl): If a namespace is named
144         anonymous_namespace_name, call it {anonymous}.
145
146         * decl.c (grokparms): Distinguish between references and pointers
147         in error message.
148
149 1998-09-08  Richard Henderson  <rth@cygnus.com>
150             Mark Mitchell  <mark@markmitchell.com>      
151         
152         * pt.c (process_partial_specialization): Consistantly allocate
153         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
154         tpd.parms, where appropriate.
155
156 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
157
158         * Makefile.in (INCLUDES): Update after recent toplevel gcc
159         reorganizations.
160
161 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
162
163         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
164         * class.c (finish_struct): Remove hackery to deal with explicit
165         specializations in class scope.
166         * decl.c (grokfndecl): Improve error-recovery.
167         * decl2.c (grokfield): Likewise.
168         * pt.c (check_specialization_scope): New function.
169         (begin_specialization): Call it.
170         (process_partial_specialization): New function, split out from
171         push_template_decl.  Check partial specializations more
172         stringently.
173         (push_template_decl): Call it.
174         (check_explicit_specialization): Don't attempt to handle explicit
175         specializations in class scope.
176         (template_parm_data): Document.  Add current_arg and
177         arg_uses_template_parms. 
178         (mark_template_parm): Set it.
179         (tsubst_arg_types): Remove unused variable.
180         * semantics.c (begin_class_definition): Tweak.
181         
182 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
183
184         * inc/typeinfo (type_info::type_info(const char*)): Make
185         `explicit'.
186
187         * cp-tree.h (hash_tree_cons_simple): New macro.
188         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
189         (coerce_template_parms): Use make_temp_vec, instead of
190         make_tree_vec.  Document this behavior.
191         (lookup_template_class): Likewise.
192         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.  
193         Remove dead code (and add ssertion to check its deadness).  Fix
194         bug w.r.t. exception specifications.
195
196 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
197
198         * decl2.c (import_export_vtable): Always make artificials comdat.
199         (import_export_decl): Likewise.
200         * pt.c (mark_decl_instantiated): Likewise.
201
202 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
203
204         * cp-tree.h (finish_globally_qualified_member_call_expr):
205         Rename to ...
206         (finish_qualified_call_expr).
207         * semantics.c: Likewise.
208         * parse.y (primary): Use it.
209         * method.c (hack_identifier): Remove redundant code.
210         
211         * init.c (resolve_offset_ref): Call convert_from_reference to
212         handle members of reference type.  Improve error recovery.
213
214 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
215
216         * cp-tree.h: Declare warn_nontemplate_friend.
217         * decl2.c (lang_decode_option): Set.
218         * lang-options.h: Add -Wnon-template-friend.
219         * friend.c (do_friend): Use to toggle non-template function warning.
220
221 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
222
223         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
224         corresponding INTEGER_CSTs when processing_template_decl.
225         * pt.c (tsubst_enum): Tweak accordingly.
226
227 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
228
229         * decl.c (pushdecl_class_level): Add warning here.
230         (pushdecl): Tweak.
231
232 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
233
234         * cvt.c (convert_pointer_to_real): Tidy.
235         * search.c (get_base_distance_recursive): Simplify.
236         (get_base_distance): Likewise.
237
238         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
239         parms.
240
241 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
242
243         * lex.c (check_newline):  Call HANDLE_PRAGMA before
244         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
245         if unknown pragmas are encountered.
246         (handle_sysv_pragma): Interpret return code from
247         handle_pragma_token ().  Return success/failure indication rather
248         than next unprocessed character. 
249         (pragma_getc): New function: retrieves characters from the
250         input stream.  Defined when HANDLE_PRAGMA is defined.
251         (pragma_ungetc): New function: replaces characters back into the
252         input stream.  Defined when HANDLE_PRAGMA is defined.
253
254 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
255
256         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
257         * class.c (build_vtable_entry_ref): Likewise.
258
259 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
260
261         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
262         * decl2.c (import_export_decl): Likewise.
263         * pt.c (instantiate_decl): Use it.
264
265 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
266
267         * decl.c (lookup_name_real): Also do implicit typename thing for
268         artificial TYPE_DECLs.
269         * search.c (lookup_field): Likewise.
270         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
271         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
272         (enter_scope_of): Extract type from implicit typename.
273         (begin_class_definition): Likewise.
274         * lex.c (identifier_type): Handle implicit typename when checking
275         for SELFNAME.
276
277         * cp-tree.h: Declare flag_strict_prototype.
278         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
279         -fstrict-prototype.
280         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
281         specified, set it to the value of pedantic.
282
283 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
284
285         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
286
287 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
288
289         * decl.c (finish_enum): Handle member enums of classes declared in
290         template functions.
291         
292         * decl2.c (grok_x_components): Strip attributres before calling
293         groktypename. 
294         
295 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
296
297         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
298         -fenum-int-equivalence and -fno-nonnull-objects.
299         * class.c (check_for_override): Remove support for -fall-virtual.
300         (finish_struct_1): Likewise.
301         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
302         * typeck.c (build_binary_op_nodefault): Likewise.
303         * cvt.c (ocp_convert): Likewise.
304         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
305         * class.c (build_vbase_path): Likewise.
306
307 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
308
309         * Makefile.in (INTERFACE): New, set to 1.
310
311 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
312
313         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
314         comparing with global_namespace.
315         (dump_aggr_type): Likewise.
316
317         * decl.c (grokfndecl): Issue error on declaration of friend
318         templates with explicit template arguments.
319
320         * pt.c (convert_template_argument): New function, split out
321         from...
322         (coerce_template_parms): Here.
323         (tsubst): Attempt better error-recovery.
324
325 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
326
327         * pt.c (decl_template_parm_p): Add checks for
328         TEMPLATE_TEMPLATE_PARM.
329
330 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
331
332         * lex.c (do_identifier): Fix thinko in previous change.
333
334 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
335
336         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
337         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
338
339 1998-08-28  Richard Henderson  <rth@cygnus.com>
340
341         Add support for discarding unused virtual functions.
342         * lang-options.h: Add -fvtable-gc.
343         * cp-tree.h: Add flag_vtable_gc.
344         * decl2.c (output_vtable_inherit): New fn.
345         (finish_vtable_vardecl): Call it.
346         * class.c (build_vtable_entry_ref): New fn.
347         (build_vtbl_ref): Call it.
348
349 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
350
351         * cp-tree.h (build_enumerator): Take the enumeration type as a
352         paramter. 
353         * decl.c (finish_enum): Don't set the TREE_TYPE for the
354         enumeration constant values if we're processing_template_decls.
355         Don't set the type for the CONST_DECLs either; that's done in
356         build_enumerator.
357         (build_enumerator): Take the enumeration type as a
358         parameter. 
359         * lex.c (do_identifier): Don't resolve enumeration constants while
360         processing template declarations, even if they happen to be
361         TEMPLATE_PARM_INDEXs. 
362
363         * parse.y (current_enum_type): New variable.
364         (primary): Don't allow statement-expression in local classes just
365         as we don't in global classes.
366         (structsp): Use current_enum_type.
367         (enum_list): Likewise.
368         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
369         finish_enum; they no longer occur.
370         
371         * cp-tree.h (finish_base_specifier): New function.
372         * parse.y (base_class): Use it.
373         * semantics.c (finish_base_specifier): Define it.
374
375         * parse.y (structsp): Warn on use of typename outside of template
376         declarations. 
377         
378 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
379
380         * lex.c (handle_cp_pragma): Remove #pragma vtable.
381         * lang-options.h: Remove +e options.
382         * decl2.c (lang_decode_option): Likewise.
383         (import_export_vtable): Don't check write_virtuals.
384         (finish_vtable_vardecl, finish_file): Likewise.
385         * search.c (dfs_debug_mark): Likewise.
386         * semantics.c (begin_class_definition): Likewise.
387         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
388
389         * call.c (build_over_call): Check flag_elide_constructors.
390         * decl2.c: flag_elide_constructors defaults to 1.
391         * typeck.c (convert_arguments): Remove return_loc parm.
392         (build_function_call_real): Adjust.
393
394         * search.c: Tear out all mi_matrix and memoize code.
395         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
396         * lang-options.h: Remove documentation for -fhandle-exceptions,
397         -fmemoize-lookups and -fsave-memoized.
398         * cp-tree.h: Lose mi_matrix and memoize support.
399         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
400         * class.c: Lose struct class_level.
401         (pushclass, popclass): Lose memoize support.
402         * init.c (build_offset_ref): Likewise.
403
404         Never change BINFO_INHERITANCE_CHAIN.
405         * init.c (emit_base_init): Change modification of
406         BINFO_INHERITANCE_CHAIN to an assert.
407         * search.c (get_base_distance_recursive): Likewise.
408         (get_base_distance): Likewise.
409         (lookup_member): Likewise.
410         (convert_pointer_to_single_level): Likewise.
411         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
412         (lookup_fnfields): Likewise.
413         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
414         (unshare_base_binfos): Don't call propagate_binfo_offsets.
415         (layout_basetypes): Call propagate_binfo_offsets instead of 
416         unshare_base_binfos.
417         * decl.c (xref_basetypes): Call unshare_base_binfos.
418         * pt.c (instantiate_class_template): Likewise.
419         * tree.c (reverse_path): Remove 'copy' parm; always make a
420         temporary copy.
421         * class.c (build_vbase_path): Just call it.
422         * search.c (compute_access): Likewise.  Don't re-reverse.
423
424 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
425
426         * class.c (build_vbase_path): Use reverse_path.
427         (finish_base_struct): Move warnings for inaccessible bases to
428         layout_basetypes.
429         (modify_one_vtable): Remove check of TREE_USED (binfo).
430         (fixup_vtable_deltas1): Likewise.
431         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
432         (xref_tag): Remove binfos parameter.
433         (make_binfo): Remove chain parameter.
434         (reverse_path): Add copy parameter.
435         * decl.c (init_decl_processing): Change calls to xref_tag.
436         (xref_tag): Remove binfos parameter.
437         (xref_basetypes): Change calls to make_binfo.
438         * decl2.c (grok_x_components): Change calls to xref_tag.
439         (handle_class_head): Likewise.
440         * friend.c (do_friend): Likewise.
441         * lex.c (make_lang_type): Change calls to make_binfo.
442         * parse.y (structsp): Change calls to xref_tag.
443         (named_complex_class_head_sans_basetype): Likewise.
444         (named_class_head): Likewise.
445         * rtti.c (init_rtti_processing): Likewise.
446         * search.c (compute_access): Change calls to reverse_path.
447         (dfs_get_vbase_types): Change calls to make_binfo.
448         (get_vbase_types): Remove dead code.
449         * tree.c (unshare_base_binfos): Change calls to make_binfo.
450         (layout_basetypes): Warn here about inaccessible bases.
451         (make_binfo): Remove chain parameter.
452         (reverse_path): Add copy parameter.
453         
454 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
455
456         * class.c: #if 0 complete_type_p.
457         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
458         * method.c (process_overload_item): Likewise.
459         * typeck.c (comp_target_types): Likewise.
460
461         Stop sharing binfos for indirect virtual bases.
462         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
463         (layout_basetypes): Likewise.
464         (unshare_base_binfos): Copy vbases, too.
465         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
466         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
467         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
468         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
469         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
470         reference to BINFO_VIA_PUBLIC.
471         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
472         (push_class_decls): Use them.
473         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
474         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
475
476 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
477
478         * decl.c (build_enumerator): Set DECL_CONTEXT for the
479         CONST_DECLs. 
480
481 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
482
483         * cp-tree.h (finish_enum): Change prototype.
484         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
485         VALUES parameter.  Don't try to compute mins/maxs if
486         processing_template_decl. 
487         * parse.y (structsp): Use new calling sequence for finish_enum.
488         * pt.c (tsubst_enum): Likewise.  Take the new type as input.  
489         (lookup_template_class): Remove unused variables.  Tweak.
490         Register enums on instantiation list before substituting
491         enumeration constants.
492         (tsubst_decl): Remove unused variables.
493         (regenerate_decl_from_template): Likewise.
494         
495         * decl.c (duplicate_decls): Don't obliterate the
496         DECL_TEMPLATE_INFO for a template if we're not replacing it with
497         anything. 
498
499         * lex.c (do_identifier): Fix typo in comment.
500
501 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
502
503         * errfn.c: Remove stdarg.h/varargs.h.
504         * tree.c: Likewise.
505
506 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
507
508         * pt.c (tsubst_copy): Only do typename overloading on an
509         IDENTIFIER_NODE that happens to look like a typename if it actually
510         has a type for us to use.
511
512 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
513
514         * typeck.c (comp_cv_target_types): Split out...
515         (comp_target_types): From here.  Don't allow cv-qual changes under
516         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
517         (build_ptrmemfunc): Pass 1 to nptrs.
518         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
519
520 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
521
522         * search.c (dependent_base_p): Don't compare a binfo to
523         current_class_type; use the TREE_TYPE of the binfo instead.
524
525         * cp-tree.h (CLASS_TYPE_P): Revise definition.
526
527 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
528
529         * decl.c (duplicate_decls): Don't complain about different
530         exceptions from an internal decl even if pedantic.
531
532         * typeck.c (convert_for_assignment): Converting from pm of vbase
533         to derived is an error, not a sorry.
534
535         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
536         * class.c (fixed_type_or_null): Rename from
537         resolves_to_fixed_type_p.  Return the dynamic type of the
538         expression, if fixed, or null.
539         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
540         does not match the static type.
541         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
542         resolves_to_fixed_type_p again.
543
544 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
545
546         * pt.c (tsubst_decl): Move special case code for dealing with
547         tricky friend templates here from ...
548         (regenerate_decl_from_template): Here.
549
550 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
551
552         * decl.c (start_decl): Remove redundant linkage check.
553
554 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
555
556         * typeck.c (c_expand_return): Handle the case that valtype
557         is wider than the functions return type.
558
559 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
560
561         * cp-tree.h (CLASS_TYPE_P): New macro.
562         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
563         * pt.c (process_template_parm): Undo previous change.
564         
565 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
566
567         * cp-tree.h: Declare.
568         * pt.c (decl_template_parm_p): New function.
569         * decl.c (pushdecl): Check decls for redeclaring template parms.
570         (xref_tag): Make redeclaration an error, print decl.
571         * decl2.c (grokfield): Check field_decls for redeclaration as well.
572
573 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
574
575         * parse.y (primary): Fix up the type of string constants.
576
577 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
578
579         * typeck.c (convert_for_initialization): Move check for odd uses
580         of NULL to avoid duplicate warnings.
581
582 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
583
584         * tree.c (lvalue_type): Fix for arrays.
585         * typeck.c (string_conv_p): New fn.
586         (convert_for_assignment): Use it.
587         (build_unary_op): Use lvalue_type.
588         * call.c (standard_conversion, convert_like): Use string_conv_p.
589         (add_function_candidate): Use lvalue_type.
590         * cvt.c (convert_to_reference): Likewise.
591         * decl2.c (lang_decode_option): Ignore -traditional.
592         * decl.c (init_decl_processing): flag_writable_strings inhibits
593         flag_const_strings.
594
595 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
596
597         * lang-options.h (lang_options): Add fconst-strings to the list
598         of valid options.
599         * decl2.c (lang_f_options, lang_decode_option): Likewise.
600
601 1998-08-24  Nathan Sidwell  <nathan@acm.org>
602
603         * lex.c (real_yylex): Don't warn about long long constants if
604         we're allowing long long.
605
606 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
607
608         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
609         accessing bindings directly.
610
611         * search.c (my_tree_cons): Reimplement.
612
613         * lang-specs.h: Remove __HONOR_STD.
614         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
615
616 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
617
618         * decl.c (grokdeclarator): Complain about in-class initialization
619         of aggregates and/or references.
620         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
621         TEMPLATE_TYPE_PARMs. 
622
623         * decl2.c (grok_array_decl): Add comment.
624         (mark_used): Don't instantiate an explicit instantiation.
625         * friend.c (make_friend_class): Remove bogus comment.  Fix check
626         for partial specializations.
627         * pt.c (check_explicit_specialization): Don't
628         SET_DECL_EXPLICIT_INSTANTIATION here.
629         (mark_decl_instantiated): Or here.
630         (do_decl_instantiation): Do it here, instead.  Add checks for
631         duplicate explicit instantiations, etc.  Tidy.
632         (do_type_instantiation): Likewise.
633         (instantiate_decl): Improve comments.  Complain about explicit
634         instantiations where no definition is available.
635         
636         * cp-tree.h (ansi_null_node): Remove.
637         * call.c (build_over_call): Warn about converting NULL to an
638         arithmetic type.
639         * cvt.c (build_expr_type_conversion): Likewise.  Use
640         null_ptr_cst_p instead of expanding it inline.
641         * decl.c (ansi_null_node): Remove. 
642         (init_decl_processing): Make null_node always have integral type.
643         * except.c (build_throw): Warn about converting NULL to an
644         arithmetic type.
645         * lex.c (init_parse): Remove handling of ansi_null_node.
646         * pt.c (type_unification_real): Don't convert NULL to void* type.
647         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
648         (convert_for_assignment): Warn about converting NULL to an
649         arithmetic type.
650         (convert_for_initialization): Likewise.
651         
652 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
653
654         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
655         * pt.c (coerce_template_parms): Use no_linkage_check.
656         * decl.c (grokvardecl): Likewise.
657         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
658
659         * method.c (process_overload_item): Remove useless code.
660
661 1998-08-20  Per Bothner  <bothner@cygnus.com>
662
663         Handle new'ing of Java classes.
664         * init.c (build_class_classref):  New function.
665         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
666         constructor does not return this;  don't need to exception-protect.
667
668         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
669         * decl2.c (acceptable_java_type):  Handle template-derived types.
670
671 1998-08-20  Per Bothner  <bothner@cygnus.com>
672
673         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
674
675 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
676
677         * decl.c (duplicate_decls): Always merge the old and new patterns
678         for templates, regardless of whether or not the new one has
679         DECL_INITIAL.  Don't throw away specializations.  Merge
680         DECL_SAVED_TREE.
681         * pt.c (tsubst_decl): Use the right pattern when calculating the
682         complete args for a new template instance.
683         (do_decl_instantiation): Fix typo in comment.
684         (regenerate_decl_from_template): Deal with tricky friend template
685         case.
686         (instantiate_decl): Likewise.
687         
688 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
689
690         * init.c (build_builtin_delete_call): Add missing assemble_external
691         call.
692
693 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
694
695         * parse.y (notype_unqualified_id): Also accept ~A<int>.
696
697 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
698
699         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
700         arithmetic.
701         * except.c (build_throw): Warn when NULL is thrown, even with
702         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
703         thrown expression.
704         
705         * cp-tree.h (ansi_null_node): New variable.
706         * decl.c (ansi_null_node): New variable.
707         (init_decl_processing): Initialize its type.
708         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
709         for null_node in non-ANSI mode.
710         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
711         place of null_node to avoid spurious errors.
712
713 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
714
715         * cp-tree.h (enter_scope_of): New function.
716         * parse.y (complex_direct_notype_declarator): Use it.
717         * semantics.c (enter_scope_of): New function.
718
719 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
720
721         * decl.c (grokparms): No, here.
722
723         * decl.c (grokdeclarator): Catch parm with pointer to array of
724         unknown bound here...
725         * method.c (process_overload_item): ...not here.
726
727         * gxxint.texi: Remove obsolete documentation of overloading code.
728
729         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
730         * class.c (finish_struct_bits): Likewise.
731
732         * tree.c (lvalue_type): Fix for arrays.
733         * typeck.c (build_unary_op): Use lvalue_type.
734         * call.c (add_function_candidate): Likewise.
735         * cvt.c (convert_to_reference): Likewise.
736
737         * decl2.c (lang_decode_option): Ignore -traditional.
738
739         * init.c (build_offset_ref): Don't mess with error_mark_node.
740         * lex.c (do_scoped_id): Use cp_error.
741
742         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
743
744 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
745
746         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
747
748 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
749
750         * cp-tree.h (set_identifier_local_value): Provide prototype.
751
752         * decl2.c (do_namespace_alias): Remove unused variables `binding'
753         and `old'.
754
755 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
756
757         * Makefile.in: Rename BBISON to BISON so that it can be properly
758         inherited from the parent makefile.
759
760 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
761
762         * lang-options.h: Add -finit-priority.
763         * decl2.c: Likewise.  Check flag_init_priority instead of
764         USE_INIT_PRIORITY.
765
766         * decl2.c (setup_initp): New fn.
767         (start_objects, finish_objects, do_ctors): Handle init_priority.
768         (do_dtors, finish_file): Likewise.
769
770 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
771
772         * pt.c (tsubst_copy): Hush warning.
773
774         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
775
776 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
777
778         * pt.c (print_template_context): Don't abort when instantiating a
779         synthesized method.
780
781         * decl.c (grokdeclarator): Issue errors on namespace qualified
782         declarators in parameter lists or in class scope.
783
784 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
785
786         * pt.c (check_explicit_specialization): Don't abort on bogus
787         explicit instantiations.
788
789 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
790
791         * typeck.c (require_complete_type): Use complete_type_or_else.
792         (complete_type_or_else): Always return NULL_TREE on failure, as
793         documented.
794
795         * pt.c (tsubst_aggr_type): Prototype.
796         (tsubst_decl): New function, split out from tsubst.  Set
797         input_filename and lineno as appropriate.
798         (pop_tinst_level): Restore the file and line number saved in
799         push_tinst_level.
800         (instantiate_class_template): Set input_filename and lineno as
801         appropriate.
802         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
803         context for a TYPENAME_TYPE is complete.
804
805         * decl2.c (grokbitfield): Issue errors on bitfields declared with
806         function type.
807         (do_dtors): As in do_ctors, pretend to be a member of the same
808         class as a static data member while generating a call to its
809         destructor.
810
811         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
812         conversions, even in complex virtual base class hierarchies.
813
814 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
815
816         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
817         (TYPE_TEMPLATE_INFO): Likewise.
818         (SET_TYPE_TEMPLATE_INFO): Likewise.
819         (ENUM_TI_TEMPLATE): Likewise.
820         (ENUM_TI_ARGS): Likewise.
821         (lookup_nested_type_by_name): Remove.
822         * decl.c (maybe_process_template_type_declaration): Handle enums.
823         (start_enum): Don't check for primary-template enum declarations
824         here. 
825         (finish_enum): Clean up, document.  Make sure template enum
826         constants get the correct type.
827         (build_enumerator): Copy initializers for template enumerations,
828         too. 
829         (grok_enum_decls): Document.
830         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
831         better.  Build LOOKUP_EXPRs for local variables, even if they are
832         TREE_PERMANENT.
833         * pt.c (tsubst_enum): Remove field_chain parameter.
834         (template_class_depth): Include the depth of surrounding function
835         contexts.
836         (push_template_decl): Check for primary-template enum declarations
837         here.  Deal with enumeration templates.
838         (lookup_template_class): Likewise.
839         (for_each_template_parm): Likewise.
840         (instantiate_class_template): Don't call tsubst_enum directly,
841         call tsubst instead, to instantiate enums.  Deal with all
842         field_chain issues here, not in tsubst_enum.
843         (lookup_nested_type_by_name): Remove.
844         (tsubst_aggr_type): Revise handling of enumeration types.
845         (tsubst): Likewise.
846         (tsubst_copy): Likewise.
847         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
848         
849 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
850
851         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
852         uses template parameters.
853         * method.c (build_template_parm_names): Use the full set of
854         template arguments for tsubst'ing.
855         (build_overload_identifier): Pass the full set of template
856         arguments to build_template_parm_names, not just the
857         innermost_args. 
858         * pt.c (TMPL_ARGS_DEPTH): Define using
859         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
860         (NUM_TMPL_ARGS): New macro.
861         (add_outermost_template_args): Deal with the case where the outer
862         args will be completely discarded.
863         (coerce_template_parms): Use the full set of template arguments
864         for tsubst'ing.  Simplify.  Add some asserts.  Improve
865         error messages.
866         (lookup_template_class): Pass the full set of template arguments
867         to coerce_template_parms.
868         (tsubst): Add assertion.
869         (do_type_instantiation): Don't instantiate member template
870         classes. 
871         
872         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
873         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
874
875 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
876
877         * method.c (set_mangled_name_for_decl): Change return type to void.
878
879         * decl.c (lookup_name_real): A namespace-level decl takes priority
880         over implicit typename.  Avoid doing the same lookup twice.
881
882         * search.c (dependent_base_p): New fn.
883         (dfs_pushdecls, dfs_compress_decls): Use it.
884
885         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle 
886         virtual functions if the type doesn't have any.
887
888 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
889
890         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
891         uses template parameters.
892
893 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
894
895         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
896         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
897         * lex.c (do_identifier): Don't use a second argument, or a type,
898         when building LOOKUP_EXPRs.
899         (do_identifier): Likewise.
900         (do_scoped_id): Likewise.
901         * method.c (hack_identifier): Improve error message.
902         * pt.c (lookup_template_function): Don't needlessly call
903         copy_to_permanent or build_min.
904         (tsubst_copy): Remove #if 0'd code.  Tsubst into LOOKUP_EXPRs if
905         necessary.
906         (do_decl_instantiation): Improve error message.
907         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
908         (build_min): Copy the type to the permanent obstack, too.
909         
910 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
911
912         * init.c (init_init_processing): Remove BI* handling.
913         (build_builtin_call): Remove.
914         (build_builtin_delete_call): New fn.
915         (build_delete): Use it.
916         
917 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
918
919         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
920         (maybe_check_template_type): New function.
921         * decl.c (maybe_process_template_type_declaration): New function,
922         split out from pushtag  Call maybe_check_template_type.
923         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
924         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
925         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
926         * pt.c (template_class_depth_real): Generalization of ...
927         (template_class_depth): Use it.
928         (register_specialization): Use duplicate_decls for duplicate
929         declarations of specializations.
930         (maybe_check_template_type): New function.
931         (push_template_decl_real): Fix comment.
932         (convert_nontype_argument): Likewise.
933         (lookup_template_class): Likewise.  Avoid an infinite loop on
934         erroneous code.
935         (tsubst_friend_function): Fix comment.
936         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
937         an IDENTIFIER_NODE.
938         * semantics.c (begin_function_definition): Use
939         reset_specialization to note that template headers don't apply
940         directly to declarations after the opening curly for a function.
941
942 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
943
944         * decl.c (push_overloaded_decl): Use current_namespace instead of
945         DECL_CONTEXT (decl) to determine where we go.
946
947         * decl.c (lookup_name_real): Fix typo.
948
949 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
950
951         * friend.c (is_friend): Be lenient with member functions to deal
952         with nested friends.
953
954 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
955
956         * class.c (finish_struct_1): Convert integer_zero_node to
957         ssizetype before passing it to set_rtti_entry.
958         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
959         of any size to a pointer.
960
961 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
962
963         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
964         (build_template_decl_overload): Remove.
965         (set_mangled_name_for_decl): New function.
966         (innermost_args): Remove is_spec parameter.
967         (most_specialized, most_specialized_class): Remove declarations.
968         (lookup_template_class): Add entering_scope parameter.
969         (maybe_process_partial_specialization): New function.
970         (finish_template_decl): Likewise.
971         (finish_template_type): Likewise.  
972         * class.c (finish_struct): Clean up processing of member template
973         specializations.
974         * decl.c (pushtag): Fix formatting.
975         (lookup_tag): Improve handling of pseudo-global levels.
976         (make_typename_type): Adjust call to lookup_template_class.
977         (shadow_tag): Use maybe_process_partial_specialization.
978         (xref_tag): Improve handling of member friends.  
979         (start_function): Call push_nested_class before
980         push_template_decl.  Don't call push_template_decl for
981         specializations.
982         * decl2.c (grok_x_components): Don't call xref_tag for
983         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
984         (grokclassfn): Use set_mangled_name_for_decl.
985         (arg_assoc_class): Adjust call to innermost_args.
986         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
987         * error.c (dump_function_name): Improve printing of template
988         function names.
989         * friend.c (is_friend): Don't compare types of decls to determine
990         friendship, unless flag_guiding_decls.
991         (make_friend_class): Partial specializations cannot be friends.  
992         (do_friend): Use set_mangled_name_for_decl.  Call
993         push_template_decl_real instead of push_template_decl.
994         * method.c (build_decl_overload_real): Remove prototype.  Give it
995         external linkage.
996         (build_overload_identififer): Adjust call to innermost_args.
997         (build_template_decl_overload): Remove.
998         (set_mangled_name_for_decl): New function.
999         * parse.y (.finish_template_type): New non-terminal.
1000         (template_def): Use finish_template_decl.  Use template_extdef
1001         instead of extdef.
1002         (template_extdef, template_datadef): New non-terminals, containing
1003         only those rules for things which can be templates.
1004         (datadef): Tidy.
1005         (template_type, self_template_type): Use .finish_template_type.
1006         (named_class_head): Use maybe_process_partial_specialization.
1007         * pt.c (mangle_class_name_for_template): Remove context parameter.
1008         (get_class_bindings): Remove outer_args parameter.
1009         (complete_template_args): Remove.
1010         (add_outermost_template_args): New function.
1011         (register_specialization): Return the specialization.
1012         (unregister_specialization): New function.
1013         (tsubst_template_parms): Likewise.
1014         (most_specialized, most_specialized_class): Prototype here as
1015         static. 
1016         (original_template): Rename to most_general_template.
1017         (tsubst_template_parms): New function.
1018         (set_mangled_name_for_template_decl): Likewise.
1019         (TMPL_ARGS_DEPTH): New macro.
1020         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
1021         (TMPL_ARGS_LEVEL): New macro.
1022         (SET_TMPL_ARGS_LEVEL): Likewise.
1023         (TMPL_ARG): Likewise.
1024         (SET_TMPL_ARG): Likewise.
1025         (TMPL_ARGS_DEPTH): Likewise.
1026         (finish_member_template_decl): Use finish_template_decl.
1027         (maybe_process_partial_specialization): New function, split out
1028         from tsubst.
1029         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
1030         (maybe_begin_member_template_processing): Use new macros.
1031         (is_member_template): Likewise.
1032         (is_member_template_class): Likewise.
1033         (add_to_template_args): Likewise.  Deal with multiple levels of
1034         args. 
1035         (maybe_process_partial_specialization): New function.
1036         (retrieve_specialization): Add consistency check.
1037         (determine_specialization): Return full argument list.
1038         (check_explicit_specialization): Tweak friend handling.  Use full
1039         argument lists.  Simplify.
1040         (current_template_args): Use new macros.
1041         (push_template_decl_real): Change ill-named mainargs to specargs.
1042         Check that a partial specialization actually specializes at least
1043         one parameter.   Improve friend handling.  Modify for full
1044         template arguments.
1045         (classtype_mangled_name): Don't mangle the names of
1046         specializations. 
1047         (lookup_template_class): Add entering_scope parameter.  Use it to
1048         avoid finding a template type when an instantiation is required.
1049         Simplify.  Use full template arguments.
1050         (tsubst_friend_function): Use unregister_specialization.  Use new
1051         macros.  Use full template arguments.
1052         (tsubst_friend_class): Substitute, using tsubst_template_parms,
1053         into the template parameters before passing them to
1054         redeclare_class_template.
1055         (instantiate_class_template): Simplify.  Use full template
1056         arguments.  Adjust calls to get_class_bindings.  Use
1057         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
1058         (innermost_args): Use new macros.
1059         (tsubst_aggr_type): New function, split out from tsubst.
1060         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
1061         conventions for lookup_tmeplate_class.  Refine handling of partial
1062         instantiations.   Remove calls to complete_template_args.
1063         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
1064         and set_mangled_name_for_template_decl.
1065         (tsubst_copy): Use tsubst_aggr_type.
1066         (instantiate_template): Use full template arguments.
1067         (more_specialized): Improve formatting.
1068         (more_specialized_class): Adjust calls to get_class_bindings.
1069         (get_bindings_real): Don't call complete_template_args.
1070         (most_specialized): Don't overwrite input; create a new list.
1071         (most_specialized_class): Use most_general_template.
1072         (regenerate_decl_from_template): Use unregister_specialization.
1073         Use full template arguments.  
1074         (instantiate_decl): Use full template arguments.
1075         (set_mangled_name_for_template_decl): New function.
1076         * semantics.c (begin_class_definition): Use
1077         maybe_process_partial_specialization.
1078         (finish_member_class_template): New function.
1079         (finish_template_decl): Likewise.
1080         (finish_template_type): Likewise.  
1081         (typeck.c): Don't crash after issuing a compiler_error.
1082         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
1083         
1084 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
1085
1086         * typeck2.c (build_functional_cast): Handle default-initialization.
1087
1088         * call.c (build_over_call): Pass 1 to popclass.
1089
1090         * parse.y (direct_notype_declarator): Add precedence declaration
1091         to notype_unqualified_id case.
1092         * Makefile.in (EXPECT): Adjust.
1093
1094         * tree.c (ovl_member): Fix for single function in OVL.
1095
1096 1998-07-27  Dave Brolley  <brolley@cygnus.com>
1097
1098         * c-lex.c (yylex): Fix boundary conditions in character literal and
1099         string literal loops.
1100
1101 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
1102
1103         * decl.c (lookup_name_real): OK, do return the from_obj value
1104         unless got_object depends on template parms.
1105
1106         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
1107
1108         * pt.c (coerce_template_parms): Also complain about local enums.
1109
1110         * cp-tree.h: Add prototype for set_identifier_local_value.
1111         * decl.c (set_identifier_local_value_with_scope): Make static,
1112         prototype.
1113         * search.c (covariant_return_p): Likewise.
1114         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
1115
1116         * call.c (build_method_call): Only pull out the type of a destructor
1117         if it's a template type parm.
1118         * decl.c (lookup_name_real): Never return the from_obj value.
1119
1120 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
1121
1122         * except.c (process_start_catch_block_old): Call start_decl_1 for
1123         catch parm.
1124         * decl.c (start_decl_1): Avoid duplicate error.
1125
1126         * init.c (expand_default_init): Only perform the initialization if
1127         it will do something.
1128
1129 1998-07-23  H.J. Lu  (hjl@gnu.org)
1130
1131         * parse.y (base_class): Check for invalid base class.
1132
1133 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
1134
1135         * decl2.c (import_export_template): Fold in...
1136         (import_export_class): ...to here.  Handle dllimport/export.
1137
1138         * class.c (build_vtable): Pass at_eof to import_export_vtable.
1139         (prepare_fresh_vtable): Likewise.
1140         * decl2.c (import_export_class): Split out...
1141         (finish_prevtable_vardecl): From here.
1142         * class.c (finish_struct_1): Call import_export_class if at_eof.
1143
1144         * decl.c (start_function): #if 0 mysterious code I wrote and have 
1145         forgotten why.
1146         * rtti.c (get_tinfo_fn): If this is for a class type, set
1147         DECL_CONTEXT.
1148
1149 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
1150
1151         * inc/exception: Change terminate and unexpected to ().
1152
1153         * parse.y (named_class_head_sans_basetype_defn): A
1154         named_class_head_sans_basetype followed by '{' or ':' is a defn.
1155
1156 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
1157
1158         * tree.c (canonical_type_variant): New fn to handle arrays.
1159         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
1160         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
1161         * method.c (process_overload_item): Use build_overload_value for
1162         arrays.
1163
1164 1998-07-20  Dave Brolley  <brolley@cygnus.com>
1165
1166         * lex.c (mbchar.h): #include it.
1167         (GET_ENVIRONMENT): New macro.
1168         (init_parse): Set character set based on LANG environment variable.
1169         (real_yylex): Handle multibyte characters in character literals.
1170         (real_yylex): Handle multibyte characters in string literals.
1171
1172 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
1173
1174         * lex.c (do_identifier): Look for class value even if we don't
1175         have a global value.  Do implicit declaration if parsing is 2.
1176         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
1177         lookup.
1178
1179 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
1180
1181         * decl.c (pushtag): Revert previous change.
1182         * pt.c (lookup_template_class): Don't put out debugging
1183         information for types that use template parameters.
1184
1185         * decl.c (pushtag): Don't put out debugging information for
1186         compiler-generated typedefs.
1187         
1188         * error.c (dump_type_real): Don't crash when presented with
1189         intQI_type_node or the like.
1190
1191         * semantics.c (finish_translation_unit): Fix spelling error in
1192         comment.
1193
1194 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
1195
1196         * decl.c (lookup_name_real): Pull out single function here.
1197         (select_decl): Not here.
1198         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
1199
1200         * decl.c (qualify_lookup): Tweak again.
1201
1202         * pt.c (lookup_template_class): Don't mess with the context of the
1203         instantiation.
1204         * decl2.c (current_decl_namespace): Remove special handling for
1205         templates.
1206
1207         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
1208         a member template specialization.
1209
1210         * tree.c (ovl_member): Use decls_match to compare functions.
1211         * decl.c (decls_match): Check the context of a function.
1212
1213         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
1214         in Koenig lookup support rules.
1215         * semantics.c (finish_call_expr): Handle the new cases.
1216
1217         * typeck.c (build_x_function_call): Handle overloaded methods.
1218
1219         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
1220
1221 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
1222
1223         * semantics.c (finish_object_call_expr): Revert previous change.
1224         * call.c (build_new_method_call): Likewise.  Instead, convert
1225         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
1226
1227 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
1228
1229         * decl.c (qualify_lookup): Handle templates.
1230
1231         * decl2.c (do_using_directive): Don't pass ancestor.
1232         * decl.c (push_using_directive): Calculate ancestor.
1233
1234         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
1235         * decl.c (pushdecl): Move type shadowing handling from here...
1236         (duplicate_decls): ...to here.
1237         * decl.c (set_identifier_local_value_with_scope): New fn.
1238         (pushdecl): Use it.
1239         (set_identifier_local_value, lookup_type_current_level): New fns.
1240         * decl2.c (do_local_using_decl): Handle types and binding level
1241         stuff properly.
1242
1243         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
1244         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
1245         (lookup_namespace_name): Likewise.
1246         * typeck.c (build_unary_op): Not here anymore.
1247
1248         * decl2.c (do_class_using_decl): Make sure we get an identifier.
1249         * class.c (handle_using_decl): Ignore TYPE_DECLs.
1250
1251         * decl.c (qualify_lookup): New fn.
1252         (lookup_name_real): Use it.
1253
1254 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
1255
1256         * decl2.c (add_using_namespace): When directly using a namespace
1257         that was indirect before, promote it.
1258
1259         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
1260         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
1261         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
1262         * decl.c (select_decl): Replace two flag parameters by one.
1263         (unqualified_namespace_lookup): Likewise, pass flag.
1264         (lookup_flags): New function.
1265         (lookup_name_real): Compute flags, pass them.
1266         (lookup_namespace_name): Call with zero-flag.
1267         * decl2.c (ambiguous_decl): Add flag parameter, complain only
1268         according to flags.
1269         (lookup_using_namespace, qualified_lookup_using_namespace):
1270         Add flag parameter, pass them through.
1271         * lex.c (do_scoped_id): Call with zero-flag.
1272
1273 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
1274
1275         * typeck.c (convert_for_assignment): Use comptypes.
1276
1277 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
1278
1279         * semantics.c (finish_object_call_expr): Move test for the
1280         function called being a TYPE_DECL to ...
1281         * call.c (build_new_method_call): Here.
1282
1283 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
1284
1285         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
1286         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
1287
1288         * lex.c (looking_for_typename): Don't initialize.
1289
1290         * decl2.c (ambiguous_decl): Clarify error message.
1291
1292         * decl.c (push_using_directive): Iterate over namespaces used
1293         indirectly.
1294
1295 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1296
1297         * decl2.c (add_using_namespace): Iterate over namespaces used
1298         indirectly.
1299
1300         * decl.c (lookup_name_real): Accept namespace aliases as locals.
1301         (cat_namespace_levels): Ignore aliases.
1302         (duplicate_decls): Ignore duplicate aliases.
1303         * decl2.c (do_namespace_alias): Process block level namespace
1304         aliases. Store alias with pushdecl. Remove odr errors.
1305         * parse.y (namespace_alias): New non-terminal.
1306         (extdef): Use it.
1307
1308 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
1309
1310         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
1311         Handle TEMPLATE_TYPE_PARM.
1312         (arg_assoc): Rewrite.
1313
1314         * pt.c (complete_template_args): Don't look at the context unless
1315         we have to.
1316
1317         * method.c (build_decl_overload_real): Fix namespace handling.
1318
1319         * typeck.c (build_unary_op): Extract a lone function from an
1320         OVERLOAD.
1321
1322         * call.c (build_scoped_method_call): Handle getting a namespace
1323         for basetype in a destructor call.
1324         (check_dtor_name): Handle enums.
1325
1326         * parse.y (using_directive): New nonterminal.
1327         (extdef, simple_stmt): Use it.
1328
1329 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1330
1331         * decl2.c (add_function): Move error message ...
1332         (arg_assoc_namespace): ... from here.
1333
1334 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
1335
1336         * parse.y (namespace_qualifier): Fix multiple level handling.
1337         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
1338         (arg_assoc): Don't skip the first argument of a function.
1339
1340 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
1341
1342         * search.c (my_tree_cons): Clean up.
1343
1344 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
1345
1346         * call.c (joust): Don't warn about "confusing" conversions to the
1347         same type.
1348
1349 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1350
1351         * class.c (push_nested_class): Complain about namespaces.
1352         * decl.c (start_decl): Enter the object's namespace.
1353         (cp_finish_decl): Leave it.
1354         (grokdeclarator): Likewise.
1355         * decl2.c (check_decl_namespace): New function.
1356         (finish_file): Call it.
1357         * parse.y (complex_direct_notype_declarator): Set complexity
1358         of namespace-qualified ids to -1, enter the namespace.
1359
1360         * method.c (build_template_decl_overload): Expect _DECL as first
1361         parameter. Put context temporarily into current_namespace.
1362         * pt.c (check_explicit_specialization): Change caller.
1363         (tsubst): Likewise.
1364
1365         * init.c (build_offset_ref): Call mark_used and
1366         convert_from_reference for namespace members.
1367
1368 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1369
1370         * search.c (my_tree_cons): The bitfield is at index 2.
1371
1372 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
1373
1374         * lang-options.h: Format changed to work with new --help support
1375         in gcc/toplev.c
1376         
1377 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1378
1379         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
1380         Do Koenig lookup in CALL_EXPR.
1381         (arg_assoc): Handle error_mark.
1382         * lex.c (is_global): New function.
1383         (do_identifier): Expect arguments for Koenig lookup.
1384         * parse.y (primary): Add rules for calls of unqualified function calls.
1385         (do_id): Change call of do_identifier.
1386         * pt.c (finish_stmt_expr): Likewise.
1387         * semantics.c (finish_id_expr): Likewise.
1388         (finish_call_expr): Add integer parameter to indicate
1389         argument-dependent lookup.
1390
1391         * decl.c (struct binding_level): New field using_directives.
1392         (push_using_decl): Not sorry anymore.
1393         (push_using_directive): New function.
1394         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
1395         (unqualified_namespace_lookup): New function, code from ...
1396         (lookup_name_real): ... here.
1397         * decl2.c (lookup_using_namespace): Pass using list instead of
1398         initial scope.
1399         (validate_nonmember_using_decl): New function.
1400         (do_nonmember_using_decl): New function.
1401         (do_toplevel_using_decl): Use them.
1402         (do_local_using_decl): New function.
1403         (do_using_directive): Support block-level directives.
1404         * parse.y (simple_stmt): Support using declarations and
1405         directives.
1406         (namespace_qualifier, namespace_using_decl): New non-terminals.
1407
1408         * xref.c (classname): New function.
1409         (GNU_xref_hier): Change class and base parameters to tree.
1410         * decl.c (xref_baseypes): Change caller.
1411         * friend.c (make_friend_class): Likewise.
1412
1413 1998-07-12  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1414
1415         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter 
1416         comparison.
1417
1418         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a 
1419         template template parameter, record its use.
1420         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse 
1421         its template arguments if exists.
1422
1423         * pt.c (coerce_template_template_parms): New function equivalent
1424         to coerce_template_parms when IS_TMPL_PARM is true.
1425         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
1426         all callers changed.
1427
1428         (coerce_template_parms): Access ARGLIST properly when creating a
1429         new vector.  Only accept implicit TYPE_DECL as valid argument for
1430         a template template parameter when it is a base class of
1431         current_class_type.  Don't display error message when COMPLAIN is
1432         false.
1433
1434 1998-07-12  Klaus Kaempf (kkaempf@progis.de)
1435
1436         * repo.c (get_base_filename): Use file_name_nondirectory.
1437         (open_repo_file): Ditto.
1438         * cp-tree.h (file_name_nondirectory): Add prototype.
1439
1440 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
1441
1442         * friend.c (do_friend): Pull the identifier out of declarator.
1443         Use cp_error and friends.
1444         * decl2.c (qualified_lookup_using_namespace): Fix call to 
1445         purpose_member.
1446         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
1447         (grokvardecl): Use DECL_CLASS_SCOPE_P.
1448         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
1449         * class.c (warn_hidden): Fix for OVERLOAD.
1450         From grahams@rcp.co.uk:
1451         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
1452         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
1453
1454 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
1455
1456         * g++.1 (-traditional): Remove duplicated documentation.
1457
1458 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
1459
1460         * method.c (flush_repeats): Add nrepeats parameter.
1461         (issue_nrepeats): Likewise.
1462         (is_back_referenceable_type): New function.  Don't back-reference
1463         TEMPLATE_TYPE_PARMs as well as simple types like integers.
1464         (build_mangled_name_for_type): Likewise.
1465         (build_mangled_name_for_type_with_Gcode): Likewise.
1466         (lasttype): Remove.
1467         (nrepeats): Likewise.
1468         (Nrepeats): Likewise.
1469         (start_squangling): Don't clear the variables removed above.
1470         (end_squangling): Likewise.
1471         (flush_repeats): Tidy.  Use nrepeats parameter rather than
1472         Nrepeats global.
1473         (issue_nrepeats): Likewise, but with nrepeats global.  Use
1474         is_backreferenceable_type.
1475         (build_overload_nested_name): Tidy.  Add comment.  Use
1476         build_mangled_name_for_type.
1477         (build_underscore_int): Comment.
1478         (build_overload_scope_ref): Use build_mangled_name_for_type.
1479         (build_overload_int): Likewise.
1480         (build_template_template_parm_names): Tidy.
1481         (build_template_parm_names): Use build_mangled_name_for_type.
1482         (build_overload_identifier): Add comments.
1483         (build_mangled_name_for_type_with_Gcode): Split out from
1484         build_mangled_name.
1485         (build_mangled_name_for_type): Use it.
1486         (build_mangled_name): Rework to use build_mangled_name_for_type
1487         and to not use global nrepeats/Nrepeats.  Tidy.
1488         (process_modifiers): Tidy.
1489         (check_btype): Use is_backreferenceable_type.  Add comment.
1490         Rename `node' to `type'.
1491         (process_overload_item): Set numeric_output_need_bar here.
1492         Use build_mangled_name_for_type.  Tidy.
1493         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
1494         build_mangled_name_for_type.
1495
1496         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
1497         for TYPE_DECLs.
1498
1499 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
1500
1501         * cp-tree.h (warn_long_long): Define.
1502         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
1503         warning "ANSI C++ does not support `long long'".
1504         * decl2.c (warn_long_long): Define.
1505         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
1506
1507 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
1508
1509         * decl.c (xref_tag): Handle attributes between 'class' and name.
1510         * parse.y (aggr): Likewise.
1511         * semantics.c (finish_class_definition): Likewise.
1512         * Makefile.in (EXPECTED): Adjust.
1513
1514         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
1515         * decl2.c: Define them.
1516         (lang_decode_option): Handle them.
1517         * lang-options.h: Add -foptional-diags.
1518         * class.c (finish_struct): Don't complain about multiple meanings of 
1519         name if -fno-optional-diags.
1520         * decl.c (pushdecl_class_level): Likewise.
1521         * lex.c (real_yylex): Check warn_multichar.
1522
1523 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
1524
1525         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
1526
1527         * tree.c (make_binfo): Fix length.
1528
1529 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
1530
1531         * decl2.c (lang_decode_option): Remove warn_template_debugging.
1532         * lang-options.h: Ditto.
1533
1534 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1535
1536         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
1537         (process_start_catch_block): Likewise for variables
1538         `false_label_rtx', `call_rtx' and `return_value_rtx'.
1539
1540 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
1541
1542         * tree.c (build_srcloc): Make sure we allocate this node on the
1543         permanent obstack.
1544
1545 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
1546
1547         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
1548         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
1549         (lang_specific_driver): Only add -lm automatically if need_math is
1550         nonzero.
1551
1552 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
1553
1554         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
1555
1556 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1557
1558         * Makefile.in (EXPR_H): New dependency variable.
1559         (decl2.o): Depend on $(EXPR_H).
1560         (typeck.o): Likewise.
1561         (init.o): Likewise.
1562         (expr.o): Likewise.
1563
1564 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
1565
1566         * decl.c (start_enum): Put local enums on permanent_obstack.
1567
1568 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
1569
1570         * cp-tree.h (c_get_alias_set): Declare.
1571         * decl.c (init_decl_processing): Set lang_get_alias_set.
1572
1573 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
1574
1575         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
1576         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
1577         flag for all function decls which are in the exception table. 
1578         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
1579         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
1580         code is emitted for any referenced rtti function.
1581
1582 1998-06-25  Dave Brolley  <brolley@cygnus.com>
1583
1584         * lang-specs.h: Use new | syntax to eliminate
1585         string concatenation.
1586
1587 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
1588
1589         * cp-tree.h (CP_DECL_CONTEXT): New macro.
1590         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
1591         * method.c (build_overload_nested_name): Likewise.
1592         * sig.c (build_signature_pointer_or_reference_type): Don't set
1593         DECL_CONTEXT.
1594
1595 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1596
1597         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
1598         * cp-tree.h (FROB_CONTEXT): New macro.
1599         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
1600         * decl.c (namespace_binding): Replace NULL_TREE with
1601         global_namespace.
1602         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
1603         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
1604         Likewise.
1605         * decl.c (pushtag): Use FROB_CONTEXT.
1606         (pushdecl, make_typename_type, define_function, grokdeclarator):
1607         Likewise.
1608         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
1609         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
1610         Likewise.
1611         * decl2.c (decl_namespace): Return global_namespace if no context.
1612         * method.c (build_overload_nested_name): Expect null as context.
1613         * pt.c (mangle_class_name_for_template): Do nothing for null
1614         contexts.
1615         (lookup_template_class): Allow for null id_context.
1616
1617 1998-06-25  Richard Henderson  <rth@cygnus.com>
1618
1619         * method.c (emit_thunk): Set current_function_is_thunk for the
1620         ASM_OUTPUT_MI_THUNK case as well.
1621
1622 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
1623
1624         * exception.cc (__cplus_type_matcher): Get a match_info pointer
1625         instead of an exception table entry as a parameter.
1626
1627 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
1628
1629         * parse.y (function_try_block): Don't call start_catch_handler.
1630         * except.c (call_eh_info): Remove coerced field from declaration.
1631         (build_eh_type_type_ref): New function to create an address of a
1632         rtti function for the new style exception tables.
1633         (expand_start_catch_block): Split function, this contains the
1634         common part.
1635         (process_start_catch_block_old): New function to perform the rest
1636         of expand_start_catch_block under old style exceptions.
1637         (process_start_catch_block_old): New function to perform the rest
1638         of expand_start_catch_block under new style exceptions.
1639         (expand_end_catch_block): Only pop the false label off the stack under
1640         the old style of exceptions.
1641         * semantics.c (finish_try_block): Don't call start_catch_handler.
1642         * exception.cc (struct cp_eh_info): Add original_value field.
1643         (__cplus_type_matcher): Perform type matching on the original exception
1644         value, and if we have a match, set the current value.
1645         (__cp_push_exception): Set the original expcetion value.
1646
1647 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
1648
1649         * call.c (joust): Fix confusing conversion warning.
1650
1651         * call.c (build_op_delete_call): Add placement parm.  Check
1652         LOOKUP_SPECULATIVELY.
1653         * cp-tree.h, decl2.c, init.c: Adjust.
1654         * decl.c (finish_function): Use it.
1655
1656         * pt.c (tsubst): Diagnose creating void fields or variables.
1657
1658 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1659
1660         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
1661
1662         * cp-tree.h (check_dtor_name): Add prototype.
1663
1664         * init.c (expand_member_init): Remove unused variables
1665         `ptr_type_node', `parm' and `rval'.
1666
1667         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
1668         in call to fprintf.
1669         (lang_print_xnode): Likewise.
1670
1671         * typeck2.c (enum_name_string): Cast argument to sprintf to long
1672         and use %ld specifier.
1673
1674         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
1675         specifier in call to fprintf.
1676         (GNU_xref_member): Cast argument to sprintf to int.
1677
1678 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
1679
1680         * typeck2.c (pop_init_level): Warn about implicit zero initialization
1681         of struct members.
1682
1683 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1684
1685         * cp-tree.h: Prototype function `check_java_method'.
1686
1687 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
1688
1689         * class.c (finish_struct): Make conflicting use of id a pedwarn.
1690         * decl.c (pushdecl_class_level): Likewise.
1691
1692 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
1693
1694         * pt.c (convert_nontype_argument): Issue an error when presented
1695         with an integer (real) constant that cannot be simplified to an
1696         INT_CST (REAL_CST).
1697
1698         * cp-tree.h (c_get_alias_set): Remove declaration added in
1699         1998-06-13 change that should never have been checked in.
1700
1701 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
1702
1703         * typeck.c (build_binary_op_nodefault): Change % in format strings
1704         to %%.
1705
1706         * decl.c (grokvardecl): Don't build_static_name for decls that
1707         aren't at namespace scope.
1708
1709         * init.c (perform_member_init): Catch default-initialization of
1710         references.
1711
1712 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
1713
1714         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
1715
1716 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
1717
1718         * method.c (hack_identifier): Complain about getting a namespace
1719         or class template.
1720         * typeck.c (decay_conversion): Remove check for namespaces.
1721         * typeck2.c (incomplete_type_error): Likewise.
1722         * parse.y (template_arg): Add PTYPENAME expansion.
1723
1724 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
1725
1726         * decl.c (grokvardecl): Don't build external assembler names for 
1727         TYPENAMEs in other namespaces as there is no declarator.
1728         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
1729         info from DECL_CONTEXT if it is NULL.
1730
1731 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
1732
1733         * call.c (check_dtor_name): Split out.
1734         (build_scoped_method_call): Use it.
1735         (build_method_call): Use it.
1736         * init.c (build_offset_ref): Use it.
1737
1738         * typeck.c (build_static_cast): Fix handling of pointers to members.
1739
1740         * decl.c (finish_function): Just return nothing from a constructor.
1741         * typeck.c (c_expand_return): Complain about returning a void
1742         expression from a destructor.
1743
1744 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
1745
1746         * class.c (alter_access): Accept a BINFO explaining how to get
1747         from the entity whose accessed is being altered to the type doing
1748         the altering.
1749         (handle_using_decl): New function containing code split out from ...
1750         (finish_struct_1): Here.
1751
1752         * cp-tree.h (complete_type_or_else): Declare.
1753         * init.c (build_new_1, build_delete): Use it.
1754         * typeck.c (require_complete_type): Use complete_type, rather than
1755         expanding it inline.
1756         (complete_type_or_else): New function.
1757         (build_component_ref): Use it.
1758         (pointer_int_sum): Make sure the type pointed to is complete.
1759         (pointer_diff): Likewise.
1760
1761         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
1762         types. 
1763
1764         * search.c (get_matching_virtual): Note that member templates
1765         cannot override virtual functions.
1766
1767 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
1768
1769         * pt.c (check_explicit_specialization): If DECLARATOR turned into
1770         an error_mark_node from lookup_template_function, return the same.
1771         (determine_specialization): Also make sure TEMPLATE_ID isn't an
1772         error_mark_node, before we try to read its operands.
1773         * decl.c (grokdeclarator): If we got an error_mark_node from
1774         check_explicit_specialization, just return it right back.
1775
1776 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
1777
1778         * class.c (instantiate_type): Don't treat template-ids that don't
1779         specify any template arguments as equivalent to ordinary
1780         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
1781         pointer-to-members for member templates.  Tidy slightly.
1782         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
1783         * init.c (build_offset_ref): Handle template-ids like ordinary
1784         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
1785         offset part of the OFFSET_REF.
1786         * typeck.c (build_unary_op): Change check for unknown types to
1787         look for OFFSET_REFs, not SCOPE_REFs.
1788
1789 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
1790
1791         * pt.c (is_member_template_class): New function.
1792         (push_template_decl_real): Use it.
1793
1794 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
1795
1796         * friend.c (do_friend): Add support for nested classes using
1797         member functions of the enclosing class as friends.
1798
1799 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
1800
1801         * call.c (convert_default_arg): Make global, not static.
1802         (convert_arg_for_ellipsis): Split out from ...
1803         (build_over_call): Here.
1804         * cp-tree.h (convert_default_arg); Declare.
1805         (convert_arg_to_ellipsis): Likewise.
1806         (do_member_init): Remove.
1807         * init.c (do_member_init): Remove; this code is dead.
1808         (expand_member_init): Remove much of this code; it is dead.
1809         * typeck.c (convert_arguments): Use convert_default_arg and
1810         convert_arg_for_ellipsis, rather than duplicating here.
1811         
1812         * call.c (convert_like): Don't fail silently if 
1813         build_user_type_conversion fails.  Always return error_mark_node 
1814         for failure.
1815
1816 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
1817
1818         * search.c (covariant_return_p): Complain about ambiguous base.
1819
1820         * typeck.c (build_component_ref): Diagnose ref to nested type.
1821
1822 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
1823
1824         * decl.c (grokparms): Check that INIT isn't an error_mark_node
1825         before giving error about invalid type for default arg.
1826
1827 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
1828
1829         * call.c (build_method_call): Fix thinko.
1830
1831 1998-06-10  Dave Brolley  <brolley@cygnus.com>
1832
1833         * decl2.c (lang_decode_option): New argc/argv interface.
1834         * cp-tree.h (lang_decode_option): New argc/argv interface.
1835         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
1836         specified for cpplib-enabled compilers.
1837         * lex.c (lang_init): Don't check_newline for cpplib.
1838         (init_parse): Don't initialize cpplib here.
1839
1840 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
1841
1842         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
1843         piece before checking DECL_MUTABLE_P.
1844
1845 1998-06-10  John Carr  <jfc@mit.edu>
1846
1847         * tree.c (debug_binfo): Make printf format match arguments.
1848
1849         * error.c (OB_PUTI): Make printf format match arguments.
1850
1851 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
1852
1853         * init.c (perform_member_init): Handle default-initialization.
1854
1855         * except.c (build_throw): Handle throwing NULL.
1856
1857         * typeck.c (build_x_function_call): Use resolve_offset_ref.
1858
1859         * search.c (compute_access): Only strip an anonymous union
1860         for a FIELD_DECL.
1861
1862         * call.c (add_builtin_candidates): Tweak.
1863
1864         * cvt.c (build_expr_type_conversion): Restore code for conversion
1865         from class types.
1866         * decl2.c (delete_sanity): Use it.  Clean up.
1867
1868         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
1869
1870 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
1871
1872         * typeck.c (c_expand_return): Don't warn about void expressions on
1873         return statements in functions returning void.
1874
1875 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
1876
1877         * pt.c (fn_type_unification): Revise documentation.  Tidy.
1878         (type_unification): Likewise.
1879
1880 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
1881
1882         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
1883         expand_end_catch.
1884         * parse.y (function_try_block): Rename expand_start_catch, and delete
1885         expand_end_catch.
1886         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
1887         expand_end_catch.
1888
1889 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
1890
1891         * search.c (lookup_member): New fn.
1892         * class.c (finish_struct_1): Use it.
1893         * decl.c (lookup_name_real): Use it.
1894
1895 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1896
1897         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
1898
1899         * cp-tree.h: Add prototype for `maybe_print_template_context' and
1900         `maybe_make_one_only'.
1901
1902         * decl.c (auto_function): Remove unused variable `decl'.
1903
1904         * decl2.c: Include dwarf2out.h and dwarfout.h.
1905
1906         * lex.c: Remove redundant declarations of `set_float_handler' and
1907         `asm_out_file'.
1908
1909 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
1910
1911         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile 
1912         time flag.  Call __cp_eh_info instead of __cp_exception_info.
1913         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
1914         (__cp_exception_info): Return offset into cp_eh_info structure to 
1915         match what use to be the start of this structure.
1916         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
1917         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
1918         compile time flag.
1919         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call 
1920         __cp_eh_info instead of __cp_exception_info.
1921
1922 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
1923
1924         * decl.c (cp_finish_decl): Disable inlining of extern inlines
1925         with static variables.
1926
1927 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
1928
1929         * init.c (build_offset_ref): Correct previous change to use build,
1930         not build_min.
1931
1932 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
1933
1934         * class.c (instantiate_type): Handle pointer-to-members where the
1935         member is a template.
1936         * init.c (build_offset_ref): Likewise.
1937         * typeck.c (build_unary_op): Likewise.
1938
1939 1998-06-07  Richard Henderson  <rth@cygnus.com>
1940
1941         * lex.c (lang_init_options): New function.
1942         (lang_init): Remove flag_exceptions == 2 hack.
1943         
1944 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
1945
1946         * search.c (envelope_add_decl): Tweak for implicit typename.
1947
1948         * call.c (joust): Also warn about confusing conversion op/constructor
1949         overload resolution.
1950
1951         * spew.c (yylex): Also return the TYPE_DECL if got_object.
1952         Don't clear got_object after '~'.
1953         * call.c (build_scoped_method_call): Tweak destructor handling.
1954         (build_method_call): Likewise.
1955         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
1956         TYPE_MAIN_VARIANT for destructors.
1957         * semantics.c (finish_object_call_expr): Complain about calling a
1958         TYPE_DECL.
1959
1960 1998-06-05  Per Bothner  <bothner@cygnus.com>
1961
1962         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
1963         Define - update needed by gcc.c change.
1964
1965 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
1966
1967         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
1968
1969 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
1970
1971         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
1972         * decl.c (lookup_name_real): Add namespaces_only parameter.
1973         If set, return only NAMESPACE_DECLs.
1974         (select_decl): Likewise.
1975         (identifier_type_value): Give additional parameter.
1976         (lookup_name_nonclass): Likewise.
1977         (lookup_name): Likewise.
1978         (find_binding): Skip namespace aliases.
1979         (binding_for_name): Likewise.
1980         (push_namespace): Check for namespace aliases.
1981         (lookup_name_namespace_only): New function.
1982         (begin_only_namespace_names, end_only_namespace_names): New functions.
1983         * decl2.c (set_decl_namespace): Skip namespace aliases.
1984         (do_using_directive): Likewise.
1985         (do_namespace_alias): Produce namespace aliases, fix alias 
1986         redeclaration.
1987         * error.c (dump_decl): Support SCOPE_REF.
1988         * parse.y (extdef): Wrap lookup with namespace_only for namespace
1989         aliases and using declarations.
1990
1991 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
1992
1993         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
1994
1995         * error.c (dump_expr): Clean up NEW_EXPR case.
1996
1997 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1998
1999         Suggested by Brendan Kehoe
2000         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
2001         treat it as using ::decl.
2002
2003         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
2004
2005         * tree.c (mapcar): Support NEW_EXPR.
2006
2007         * error.c (dump_expr): Support NEW_EXPR.
2008
2009 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
2010
2011         * method.c (make_thunk): Use overload machinery to make name.
2012         * search.c (covariant_return_p): New fn.
2013         (get_matching_virtual): Use it.
2014
2015         * init.c (build_new_1): Fix check for void.
2016
2017 1998-06-01  Per Bothner  <bothner@cygnus.com>
2018
2019         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
2020         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
2021         java_int_type_node, java_long_type_node, java_float_type_node,
2022         java_double_type_node, java_char_type_node, java_boolean_type_node):
2023         New "primitive" types, with predefined names __java_byte etc.
2024         (record_builtin_java_type):  New function.
2025         (init_decl_processing):  Make Java types with record_builtin_java_type.
2026         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
2027         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
2028         (grokfndecl):  Call check_java_method for Java classes.
2029         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
2030         (process_overload_item):  Match types against specific
2031         java_XX_type_node types, rather than using is_java_type.
2032         * class.c (finish_struct_1):  Don't add default copy constructor
2033         or operator= if TYPE_FOR_JAVA.
2034         (pop_lang_conext):  Restore strict_prototyp proper if Java.
2035         * decl2.c (acceptable_java_type, check_java_method):  New functions.
2036         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
2037         (tsubst):  Move common statement after if statement.
2038         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
2039
2040 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
2041
2042         * pt.c (for_each_template_parm): Use first_rtl_op.
2043
2044         * tree.c (build_cplus_array_type_1): Also check index_type for
2045         template parms.
2046
2047 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
2048
2049         * pt.c (tsubst): Always copy BINFO_BASETYPES.
2050
2051 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
2052
2053         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
2054         TYPE_SIZE_UNIT too.
2055
2056 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
2057
2058         * decl.c (grokdeclarator): Don't complain about in-class
2059         initialization of static consts if we don't really know the type
2060         of the variable.
2061
2062 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
2063
2064         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
2065         * method.c (build_destructor_name): New fn.
2066         * decl2.c (maybe_retrofit_in_chrg): Split out...
2067         (grokclassfn): From here.  Reorganize.
2068         * decl.c (grok_ctor_properties): Make sure ctors for types with 
2069         vbases have the in_chrg parm.
2070         * pt.c (instantiate_class_template): Update 
2071         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
2072         grok_*_properties.
2073         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
2074
2075 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
2076
2077         * pt.c (instantiate_decl): Make test for whether or not static
2078         variables should be instantiated early match its comment.
2079
2080 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
2081
2082         * decl.c (start_decl): Always pedwarn about vacuously redeclaring 
2083         a member.
2084         (start_function): Call check_default_args.
2085         * decl2.c (grokfield): Don't call check_default_args.
2086         (check_default_args): Use cp_error_at.
2087         * lex.c (do_pending_defargs): Call check_default_args.
2088
2089 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
2090
2091         * call.c (build_method_call): Make sure get_type_value returns
2092         something before we try to use its TYPE_MAIN_VARIANT.
2093         (build_scoped_method_call): Likewise.
2094
2095 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
2096
2097         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
2098         initialize an array.
2099
2100         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
2101         DECL_VIRTUAL_P.
2102
2103         * friend.c (do_friend): Clarify template warning.
2104
2105 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
2106
2107         * decl.c (shadow_label): Don't treat decls as identifiers.
2108         (maybe_push_to_top_level): Clear shadowed_labels.
2109
2110         * pt.c (instantiate_decl): Reset lineno and filename after calling
2111         regenerate_decl_from_template. 
2112
2113         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
2114         error_mark_node.
2115
2116 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
2117
2118         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
2119
2120 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
2121
2122         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
2123         (convert_nontype_argument): Handle cases when nontype template
2124         parameters become classes after substitution.
2125
2126 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
2127
2128         * friend.c (is_friend): Use comptypes, rather than == to compare
2129         types.  Modify for new representation of template friends.
2130         (make_friend_class): Likewise.
2131         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
2132         (instantiate_class_template): Deal with template friends.
2133
2134         * decl.c (store_parm_decls): Remove redundant call to
2135         expand_main_function.
2136
2137 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
2138
2139         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
2140         DECL_USE_TEMPLATE.
2141
2142 1998-05-26  Per Bothner  <bothner@cygnus.com>
2143
2144         * language_as_string:  Handle lang_java.
2145
2146 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
2147
2148         * decl.c (pushdecl): Don't copy the type_decl.
2149
2150 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2151
2152         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
2153         current_class_type.
2154         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
2155
2156         * parse.y (complex_direct_notype_declarator): Use $1 to access
2157         scope of notype_qualified_id.
2158
2159 1998-05-26  Dave Brolley  <brolley@cygnus.com>
2160
2161         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
2162         (init_parse): Initialize cpplib interface.
2163
2164         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
2165         empty continuation.
2166
2167 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
2168
2169         * decl.c (pushtag): Avoid crashing on erroneous input.
2170
2171 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2172
2173         * decl.c (push_namespace): Only produce one unique name for
2174         anonymous namespaces.
2175         (get_unique_name): Remove.
2176
2177 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
2178
2179         * call.c (tourney): Don't do any extra comparisons.
2180
2181         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
2182
2183         * cp-tree.h (processing_template_parmlist): Declare.
2184         * decl.c (pushtag): Don't call push_template_decl when we
2185         shouldn't. 
2186         * pt.c (processing_template_parmlist): New variable.
2187         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
2188         (complete_template_args): Use it.
2189         (add_to_template_args): Likewise.
2190         (innermost_args): Likewise.
2191         (tsubst): Likewise.
2192         (begin_template_parm_list): Use processing_template_parmlist.
2193         (end_template_parm_list): Likewise.
2194
2195         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
2196         * decl.c (grokdeclarator): Use it.
2197         * decl2.c (grok_x_components): Likewise.
2198         * init.c (initializing_context): Likewise.
2199         * method.c (do_build_copy_constructor): Likewise.
2200         (do_build_assign_ref): Likewise.
2201         * search.c (compute_access): Likewise.
2202         * typeck.c (build_component_ref): Likewise.
2203
2204         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
2205         unnamed type a typedef name "for linkage purposes".
2206
2207         * pt.c (lookup_template_class): Don't look at
2208         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
2209
2210         * method.c (build_overload_int): Handle error cases gracefully.
2211
2212         * pt.c (instantiate_decl): Handle static member variables
2213         correctly.
2214
2215         * pt.c (tsubst): Use the tsubst'd type when producing new
2216         TEMPLATE_PARM_INDEX nodes.
2217
2218 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
2219
2220         * tree.c (cp_tree_equal): Handle pointers to member functions.
2221
2222         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
2223         sure the type of the REF_BIND is a reference type.
2224         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
2225         target_type for clarity.
2226
2227         * parse.y (xcond): Move call to condition_conversion ...
2228         * semantics.c (finish_for_cond): Here.
2229         * parse.c: Regenerated.
2230         
2231 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
2232
2233         * decl.c (push_namespace): Namespaces have type void.
2234         * typeck2.c (incomplete_type_error): Complain about namespace
2235         used as expression.
2236         * typeck.c (decay_conversion): Likewise.
2237
2238 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2239
2240         * error.c (dump_expr): Support namespaces.
2241
2242 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
2243
2244         * cp-tree.def: Add SRCLOC.
2245         * cp-tree.h: Add struct tree_srcloc and accessor macros.
2246         * tree.c (build_srcloc, build_srcloc_here): New fns.
2247         * pt.c (add_pending_template): Use build_srcloc_here.
2248         (push_tinst_level): Update last_template_error_tick before erroring.
2249         (instantiate_decl): Restore lineno and input_filename before 
2250         calling add_pending_template.
2251         * decl2.c (finish_file): Set up lineno and input_filename for
2252         pending templates.
2253
2254 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
2255
2256         * decl.c (lang_print_error_function): New fn.  
2257         (init_decl_processing): Set print_error_function to use it.
2258         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
2259
2260         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
2261         ICS_BAD_FLAG.
2262
2263         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
2264         copy-initialization.
2265
2266         * class.c (build_vtable_entry): Use int_fits_type_p.
2267         (build_vtable): Pass a signed offset to build_vtable_entry.
2268         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
2269         set_rtti_entry): Likewise.
2270
2271 1998-05-22  Per Bothner  <bothner@cygnus.com>
2272
2273         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
2274         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
2275
2276 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
2277
2278         * pt.c (print_template_context): Use fprintf instead of cp_error.
2279
2280         * pt.c (determine_specialization): Just return an error_mark_node.
2281         Also print the decl we want in error messages.  If we complain,
2282         return error_mark_node.
2283         (tsubst_friend_function): Set lineno and input_filename so 
2284         error messages will be useful.
2285         (instantiate_template): Just return an error_mark_node.
2286         (check_explicit_specialization): Don't mess with a returned
2287         error_mark_node.
2288
2289         * pt.c (print_template_context): Add new argument.
2290         (maybe_print_template_context): New fn.
2291         (push_tinst_level): Increment tinst_level_tick.
2292         (pop_tinst_level): Likewise.
2293         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
2294         xrealloc instead of xmalloc.
2295
2296         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
2297
2298 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
2299
2300         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
2301         if the template we looked up is the same as the one we already
2302         have.
2303
2304 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
2305
2306         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
2307         (cpp_reader,parse_in): Add for cpplib.
2308         (check_newline): Call handle_sysv_pragma with new interface.
2309         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
2310
2311         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
2312         (sub_getch): Call GETC for cpplib.
2313
2314         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
2315         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
2316
2317         * Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
2318
2319 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
2320
2321         * decl2.c (maybe_make_one_only): New fn.
2322         (import_export_vtable): Use it.
2323         (import_export_decl): Likewise.
2324         * pt.c (mark_decl_instantiated): Likewise.
2325
2326 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
2327
2328         * decl2.c (find_representative_member): Rename to ...
2329         (build_anon_union_vars): New function.
2330         (finish_anon_union): Fix stupidity of previous change.
2331
2332 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
2333
2334         * decl.c (grokfndecl): Handle definition of specialization in
2335         friend declaration.
2336
2337         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
2338
2339 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
2340
2341         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
2342         to look for type declarations.
2343         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
2344         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
2345         (finish_member_class_template): Declare.
2346         * decl.c (pushtag): Put member class templates on the
2347         CLASSTYPE_TAGS list, just as for ordinary member classes.
2348         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
2349         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
2350         IDENTIFIER_NAMESPACE_VALUEs. 
2351         * parse.y (component_decl): Move code to ...
2352         * semantics.c (finish_member_class_template): New function.  
2353         Don't put member class templates on the list of components for a
2354         class. 
2355         * parse.c: Regenerated.
2356         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
2357         In fact, don't use DECL_CONTEXT at all here.
2358
2359 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2360
2361         * decl.c (record_unknown_type): New function.
2362         (init_decl_processing): Call it for the unknown and global type
2363         nodes.
2364
2365 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
2366
2367         * decl2.c (find_representative_member): New function.
2368         (finish_anon_union): Use it.
2369
2370         * cp-tree.h (MAIN_NAME_P): New macro.
2371         (DECL_MAIN_P): Likwise.
2372         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
2373         (grokfndecl): Use the new macros.
2374         (grokdeclarator): Likewise.
2375         (start_function): Likewise.
2376         (store_parm_decls): Likewise.
2377         (finsh_function): Likewise.
2378         * friend.c (do_friend): Likewise.
2379         * typeck.c (build_function_call_real): Likewise.
2380         (build_unary_op): Likewise.
2381
2382 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
2383
2384         * decl2.c (start_objects, finish_objects, do_dtors,
2385         do_ctors): Split out from...
2386         (finish_file): ...here.
2387
2388 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
2389
2390         * tree.c (is_overloaded_fn): Don't abort on placeholders from
2391         push_class_decls.
2392
2393 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
2394
2395         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
2396
2397         * error.c (dump_expr): Handle an ARROW_EXPR.
2398
2399 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
2400
2401         * decl.c (saveable_obstack): Declare.
2402         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
2403         declare, if necessary.
2404
2405 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
2406
2407         * call.c (compare_qual): Remove.
2408         (is_subseq): Tweak.
2409         (is_properly_derived_from): New function.
2410         (maybe_handle_ref_bind): Likewise.
2411         (maybe_handle_implicit_object): Likewise.
2412         (compare_ics): Modify substantially to bring into conformance with
2413         the standard.
2414         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
2415         (comp_cv_qualification): Declare.
2416         (comp_cv_qual_signature): Likewise.
2417         * typeck.c (comp_cv_qualification): Likewise.
2418         (comp_cv_qual_signature): Likewise.
2419
2420 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2421
2422         * Makefile.in (parse.o): Depend on toplev.h.
2423
2424         * class.c (typecode_p): Remove prototype and definition.
2425
2426         * cp-tree.h (currently_open_class, is_empty_class, member_p):
2427         Add prototype.
2428
2429         * decl.c (push_overloaded_decl_top_level): Remove prototype and
2430         definition.
2431
2432         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
2433         in call to `cp_thing'.
2434         (cp_warning): Likewise for function pointer `warning'.
2435
2436         * except.c (do_function_call): Remove prototype and definition.
2437         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
2438
2439         * method.c (is_java_type): Add prototype and make it static.
2440
2441         * parse.y: Include toplev.h.
2442
2443         * pt.c (type_unification): Remove unused variable `arg'.
2444         (instantiate_decl): likewise for `save_ti'.
2445
2446         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
2447         
2448 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
2449
2450         * init.c (build_member_call): Handle template_ids.
2451         * parse.y (primary): Add global_scope template_id.
2452
2453 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
2454
2455         * decl2.c (get_sentry): Use end_temporary_allocation.
2456         Don't declare permanent_obstack.
2457
2458 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
2459
2460         * parse.y (.finish_new_placement): New non-terminal.
2461         (unary_expr, new_type_id): Use it.  
2462         * parse.c: Regenerated.
2463         
2464 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
2465
2466         * pt.c (redeclare_class_template): Say where the original definition
2467         of the template-parameter's default argument appeared.
2468
2469 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
2470
2471         * call.c (build_over_call): Tweak empty class handling.
2472
2473         * decl.c (make_typename_type): Use currently_open_class.
2474
2475         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
2476
2477 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
2478
2479         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE 
2480         for a type unless it is one.
2481
2482         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
2483
2484 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
2485
2486         * Makefile.in (program_transform_name, objdir): Define.
2487
2488         * Makefile.in (BISON): Use bison from the build tree if it exists.
2489         (FLEX): Similarly.
2490
2491 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
2492
2493         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
2494
2495         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
2496
2497 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
2498
2499         * call.c (build_scoped_method_call): Likewise.
2500
2501 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
2502
2503         * init.c (build_new_1): Call suspend_momentary around the creation
2504         of values that must be saved for exception handling.
2505         * parse.y (.build_new_placement): New non-terminal.
2506         (unary_expr, new_placement): Use it.
2507         * parse.c: Regenerated.
2508         
2509 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
2510
2511         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
2512         old and new types.
2513
2514         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
2515         canonical type.
2516
2517         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
2518
2519 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
2520
2521         * decl.c (start_decl): Revert problem change.
2522
2523         * Makefile.in (CONFLICTS): Fix.
2524
2525 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2526
2527         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
2528
2529 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
2530
2531         * class.c (finish_struct_1): Use BINFO_SIZE.
2532
2533         * decl.c (start_decl): Use 'tem'.
2534
2535 Thu May 14 16:30:47 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
2536
2537         * exception.cc: Include eh-common.h.
2538         (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
2539         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
2540         (__cp_push_exception): Initialize eh_info struct as well.
2541         * except.c: Remove local structs and include eh-common.h.
2542         (init_exception_processing): Set language and version codes.
2543         (call_eh_info): add presence of eh_info to runtime description of 
2544         struct cp_eh_info.
2545         (expand_end_eh_spec): call start_catch_block() and end_catch_block().
2546         * semantics.c (finish_try_block): call start_catch_block() and 
2547         end_catch_block().
2548         * parse.y (function_try_block): call start_catch_block() and 
2549         end_catch_block().
2550
2551 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
2552
2553         * typeck.c (original_type): New function.
2554         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
2555         to see if they're actually the same.
2556         * cp-tree.h (original_type): Declare.
2557
2558 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2559
2560         * Makefile.in (lex.o): Depend on output.h.
2561         
2562         * call.c (add_function_candidate): Remove unused variable `cand'.
2563         (add_conv_candidate): Likewise.
2564         (build_builtin_candidate): Likewise.
2565         
2566         * cp-tree.h: Add prototype for `types_overlap_p'.
2567
2568         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
2569
2570         * decl2.c (merge_functions): Remove unused variables `tmp' and
2571         `tempn'.
2572
2573         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
2574         (code_as_string): Likewise.
2575         (language_as_string): Likewise.
2576         (parm_as_string): Likewise.
2577         (op_as_string): Likewise.
2578         (assop_as_string): Likewise.
2579         (cv_as_string): Likewise.
2580
2581         * lex.c: Include output.h.
2582
2583         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
2584
2585         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
2586         ATTRIBUTE_UNUSED.
2587
2588         * tinfo.cc (__class_type_info::dcast): Change the type of variable
2589         `i' from int to size_t.
2590
2591         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
2592         ATTRIBUTE_UNUSED.
2593
2594 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
2595
2596         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
2597         DECL_NAMESPACE_SCOPE_P.
2598         (lang_decl_name): Likewise.
2599         * pt.c (tsubst_friend_function, tsubst): Likewise.
2600         * decl.c (pushdecl, redeclaration_error_message, start_decl, 
2601         cp_finish_decl, start_function): Likewise.
2602         * class.c (finish_struct_1): Likewise.
2603         * call.c (build_over_call): Likewise.
2604         (compare_ics): Use DERIVED_FROM_P.
2605
2606 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
2607
2608         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
2609         * method.c (build_mangled_name): Use it.
2610         (build_decl_overload_real): Likewise.
2611
2612         * error.c (dump_simple_decl): New function, broken out from ...
2613         (dump_decl): Use it.
2614
2615 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
2616
2617         * ptree.c (lang_print_xnode): Add missing `break'.
2618
2619         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
2620
2621         * call.c (add_template_candidate): Adjust for changes to
2622         fn_type_unification. 
2623         (add_template_candidate_real): Likewise.
2624         (add_template_conv_candidate): Likewise.
2625         (build_user_type_conversion_1): Likewise.
2626         (build_new_function_call): Likewise.
2627         (build_object_call): Likewise.
2628         (build_new_op): Likewise.
2629         (build_new_method_call): Likewise.
2630         * class.c (instantiate_type): Likewise.
2631         * cp-tree.h (unification_kind_t): New type.
2632         (fn_type_unification): Adjust prototype.
2633         (type_unificaiton): Likewise.
2634         * pt.c (UNIFY_ALLOW_NONE): New macro.
2635         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
2636         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
2637         (UNIFY_ALLOW_DERIVED): Likewise.
2638         (unify): Change prototype.
2639         (maybe_adjust_types_for_deduction): New function.
2640         (check_cv_quals_for_unify): Likewise.
2641         (determine_specialization): Adjust.
2642         (fn_type_unification): Likewise.
2643         (type_unification): Likewise.
2644         (type_unification_real): Likewise.  Use
2645         maybe_adjust_types_for_deduction.  Fix mishandling of
2646         back-unification of template functions passed as arguments.  Pass
2647         appropriate combination of UNIFY_ALLOW_* to unify.
2648         (unify): Remove unused NTPARMS parameter.  Use
2649         check_cv_quals_for_unify.  Remove bogus code that allowed
2650         too-generous unification in order to adhere more closely to standard.
2651         (get_bindings_real): Adjust.
2652         (get_class_bindings): Likewise.
2653
2654         * method.c (build_overload_identifier): Only use the innermost
2655         template arguments when mangling.
2656         * pt.c (tsubst_template_argument_vector): New function.
2657         (complete_template_args): Deal with the situation where the
2658         extra_args contain more than one level of arguments.
2659         (lookup_template_class): Deal with member template classes, which
2660         may have more than one level of arguments.
2661         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
2662         Improve handling of member template classes.  Use
2663         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
2664         tsubst_template_argument_vector where appropriate.
2665         (regenerate_decl_from_template): Break out from ...
2666         (instantiate_decl): Here.
2667         
2668         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
2669         * parse.h: Regenerated.
2670         * parse.c: Really regenerated.
2671         
2672         * cp-tree.h (finish_unary_op_expr): New function.
2673         (finish_id_expr): Likewise.
2674         (begin_new_placement): Likewise.
2675         (finish_new_placement): Likewise.
2676         (finish_declarator): Likewise.
2677         (finish_translation_unit): Likewise.
2678         (finish_parmlist): Likewise.
2679         (begin_class_definition): Likewise.
2680         (finish_class_definition): Likewise.
2681         (finish_default_args): Likewise.
2682         (finish_inline_definitions): Likewise.
2683         * parse.y (GCC_ASM_KEYWORD): Remove.
2684         (TYPENAME_ELLIPSIS): Likewise.
2685         * parse.c: Regenerated.
2686         Use new functions in semantics.c in the actions for many rules.
2687         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
2688         * hash.h: Regenerated.
2689         * semantics.c (finish_expr_stmt): Allow NULL expr.
2690         (finish_unary_op_expr): New function, containing
2691         code previously in parse.y.
2692         (finish_id_expr): Likewise.
2693         (begin_new_placement): Likewise.
2694         (finish_new_placement): Likewise.
2695         (finish_declarator): Likewise.
2696         (finish_translation_unit): Likewise.
2697         (finish_parmlist): Likewise.
2698         (begin_class_definition): Likewise.
2699         (finish_class_definition): Likewise.
2700         (finish_default_args): Likewise.
2701         (finish_inline_definitions): Likewise.
2702
2703 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
2704
2705         * typeck.c (build_c_cast): Don't decay arrays and functions to
2706         pointer type when converting to a class type.
2707
2708 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
2709
2710         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
2711         (DECL_CLASS_SCOPE_P): Likewise.
2712
2713 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
2714
2715         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
2716         * decl2.c (constructor_name_full): Likewise.
2717
2718 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
2719
2720         * tree.c (mapcar): Add OVERLOAD support.
2721
2722         * init.c (resolve_offset_ref): We must use basetype_path before we
2723         destroy it with a call to convert_pointer_to.
2724
2725 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
2726
2727         * class.c (currently_open_class): New fn.
2728         * decl.c (lookup_name_real): Use it.
2729         * search.c (lookup_field): Likewise.
2730
2731 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
2732
2733         * cp-tree.def (OVERLOAD): New node.  
2734         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
2735         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
2736         (NAMESPACE_BINDING): Remove.
2737         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
2738         namespace_binding.
2739         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
2740         Define.
2741         (tree_overload): New struct.
2742         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
2743         (REAL_IDENTIFIER_TYPE_VALUE): Define.
2744         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
2745         (lang_decl_flags): Remove in_namespace.
2746         (lang_decl): Remove chain.
2747         (DECL_CHAIN, DECL_NAMESPACE): Remove.
2748         (flag_honor_std): Declare extern.
2749         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
2750         namespace_binding, set_namespace_binding,
2751         lookup_function_nonclass, cat_namespace_levels,
2752         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
2753         scratch_ovl_cons, ovl_member, build_overload): Declare.
2754         (decl_list_length, get_namespace_id, current_namespace_id,
2755         overloaded_globals_p): Remove.
2756         (lookup_using_namespace, qualified_lookup_using_namespace): Change
2757         return type.
2758         (push_scratch_obstack): New macro.
2759         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
2760         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
2761         convs, fns.
2762         (build_new_function_call): Iterate using OVL_CHAIN.  
2763         Print DECL_NAME in when reporting ambiguities.
2764         (build_object_call): Iterate using OVL_NEXT for fns, convs.
2765         (build_new_op): Call lookup_function_nonclass.  
2766         Iterate using OVL_NEXT.
2767         (build_op_delete_call): Change detection of members.
2768         Do not wrap TREE_LIST around fields and single global functions.
2769         (build_over_call): Don't push a class level if the context is a
2770         namespace.
2771         (build_new_method_call): Iterate using OVL_NEXT.
2772         * class.c (add_method): Chain overloaded members using
2773         build_overload.  Remove copying of method.
2774         (grow_method): When iterating through the obstack, expect OVERLOAD
2775         nodes.  Chain overload members.
2776         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
2777         nodes in call to get_baselinks.
2778         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
2779         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
2780         fdecls that are OVERLOAD nodes.
2781         (validate_lhs): New function.
2782         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
2783         code. Use DECL_NAME in error messages. Split code between global
2784         and member function processing.
2785         * decl.c (global_type_node): New static variable.
2786         (in_std): New global.
2787         (struct binding_level): New field usings.
2788         (resume_binding_level): Assert that we are not in a class.
2789         (toplevel_bindings_p): Just check for namespace_p or
2790         pseudo_global.
2791         (resume_level): Remove.
2792         (find_binding): New function.
2793         (binding_for_name): Call it.
2794         (namespace_binding, set_namespace_binding): New functions.
2795         (push_namespace): Associate binding level with new namespace,
2796         resume_binding_level for existing namespace.  Remove old code.
2797         Fake std by counting.
2798         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
2799         (maybe_push_to_top_level): Save current namespace.
2800         (pop_from_top_level): Restore saved namespace.
2801         (pop_namespace): Call suspend_binding_level.  Remove old code.
2802         (cat_namespace_levels): New function.
2803         (set_identifier_type_value_with_scope): For namespace bindings,
2804         set BINDING_TYPE, and use global_type_node.
2805         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
2806         (identifier_type_value): New function.
2807         (pushtag): If no context, use current_namespace.
2808         (duplicate_decls): Don't process DECL_CHAIN.
2809         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
2810         already set. Never reset it to NULL_TREE.  Lookup global variables
2811         in their namespace.  Push overloaded templates if they are on
2812         namespace level.
2813         (pushdecl_namespace_level): New function.
2814         (pushdecl_top_level): Implement using pushdecl_namespace_level.
2815         (pushdecl_using_decl): New function.
2816         (overloaded_globals_p): Remove.
2817         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
2818         them. Use namespace_binding and set_namespace_value.
2819         (redeclaration_error_message): Complain if the declarations come
2820         from different namespaces.
2821         (lookup_tag): On namespace level, look in the BINDING_TYPE.
2822         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
2823         old code.
2824         (select_decl): New function.
2825         (lookup_name_real): Call it for qualified and unqualified lookup.
2826         Pass tree_bindings from the stack.
2827         If prefer_type is 1, also accept namespaces.
2828         (lookup_function_nonclass): New function.
2829         (init_decl_processing): Set the binding level of the global
2830         namespace to global_binding_level.
2831         Build a proper type list for __builtin_apply.
2832         Initialize std_node to "fake std" if flag_honor_std is set.
2833         Initialize global_type_node.
2834         Allocated bad_alloc in namespace std if flag_honor_std.
2835         (define_function): Set the DECL_CONTEXT to the current_namespace.
2836         (start_decl): A namespace is not considered as a context here.  If
2837         the DECL_CONTEXT is a namespace, push the decl.
2838         (cp_finish_decl): Check for namespaces used as initializers.
2839         (grokfndecl): Add namespace parameter.  Remove processing of
2840         DECL_CHAIN.
2841         (grokvardecl): Add namespace parameter.
2842         (grokdeclarator): Process SCOPEs that are namespaces.  For
2843         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
2844         (start_function): Check for contexts that are namespaces.  
2845         Set context for declarations that have not been pushed.
2846         (store_parm_decls): Check for ::main only.
2847         (finish_function): Likewise.
2848         (start_method): Check for contexts that are namespaces.
2849         (start_method): Remove DECL_CHAIN processing.
2850         * decl2.c (flag_honor_std): Declare.
2851         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
2852         (decl_namespace_list): New static global.
2853         (grok_x_components): Ignore namespaces as type contexts.
2854         (check_classfn): Expect OVERLOAD nodes.
2855         (grokfield): Remove DECL_CHAIN processing.
2856         (finish_file): Call cat_namespace_levels.
2857         (merge_functions): New function.
2858         (ambiguous_decl): Rewrite.
2859         (lookup_using_namespace): Produce tree_bindings.
2860         (qualified_lookup_using_namespace): Likewise.
2861         (set_decl_namespace, decl_namespace, current_decl_namespace,
2862         push_decl_namespace, pop_decl_namespace): New functions.
2863         (arg_lookup): New struct.
2864         (add_function, arg_assoc_namespace, arg_assoc_class,
2865         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
2866         New functions.
2867         (get_namespace_id, current_namespace_id): Remove.
2868         (do_toplevel_using_decl): Rewrite.
2869         (do_class_using_decl): Complain about namespace qualifiers.
2870         (do_using_directive): Sorry if not on namespace level.  Complain
2871         about unknown namespaces.
2872         * error.c (dump_aggr_type): Check for namespace contexts.
2873         * except.c (init_exception_processing): Push terminate into std.
2874         * friend.c (is_friend): A namespace is not a context, here.
2875         * init.c (expand_member_init): Remove DECL_CHAIN processing.
2876         (build_offset_ref): Process OVERLOAD nodes.
2877         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
2878         * lex.c (identifier_type): Loop using OVL_CHAIN.
2879         (see_typename): Set looking_for_typename to 2.
2880         (real_yylex): Likewise. 
2881         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
2882         (do_scoped_id): Expect OVERLOAD nodes.
2883         Change calling convention for qualified_lookup_using_namespace.
2884         (build_lang_decl): Don't set in_namespace anymore.
2885         * method.c (typevec_size): New global.
2886         (build_overload_nested_name): Return if global_namespace.
2887         Otherwise, always expect a declaration context.
2888         (build_qualified_name): Likewise.
2889         Make sure we don't write beyond typevec_size.
2890         (build_decl_overload_real): Likewise.
2891         Allocate one extra slot for the namespace.
2892         (hack_identifier): Mark code dead.
2893         Process OVERLOAD and NAMESPACE_DECL nodes.
2894         * parse.y (program): Pop namespaces until in global namespace.
2895         (extdef): In a using-declaration, don't discard the identifier if
2896         there is no declaration.
2897         (left_curly): Ignore type contexts which are namespaces.
2898         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
2899         used as scope.
2900         * pt.c (template_class_depth): Expect types to be namespaces.
2901         (determine_specialization): Simplify by expecting OVERLOAD nodes.
2902         (push_template_decl): Push into namespace level.
2903         Reset ctx if it is a namespace.
2904         Set DECL_CONTEXT to current_namespace if not set already.
2905         Ignore real contexts that are namespaces.
2906         (mangle_class_name_for_template): Skip global_namespace.
2907         Mangle other namepaces as declarations.
2908         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
2909         (lookup_template_class): Push into namespace of context.
2910         If the context is a namespace, set it to global_namespace.
2911         Use id_context for mangling.
2912         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
2913         (tsubst_friend_function): Ignore namespace contexts.
2914         Push into namespace level.
2915         (tsubst): Handle NAMESPACE_DECL nodes.
2916         Remove DECL_CHAIN processing.
2917         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
2918         * ptree.c (print_lang_identifier): Print bindings.
2919         (lang_print_xnode): Print OVERLOAD nodes.
2920         * rtti.c (init_rtti_processing): Push type_info into std.
2921         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
2922         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
2923         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
2924         lookup_fnfields_here): Likewise.
2925         Process all nodes, instead of going through TREE_CHAIN.
2926         * sig.c (build_signature_pointer_or_reference_type): Set context
2927         to global_namespace.
2928         (build_signature_table_constructor): Expect OVERLOAD nodes.
2929         * spew.c (yylex): Save old setting of looking_for_typename.
2930         * tree.c (decl_list_length): Remove.
2931         (binding_init): New function.
2932         (count_functions): Rewrite.
2933         (is_overloaded_fn): Expect OVERLOAD nodes.
2934         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
2935         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
2936         ovl_member): New functions.
2937         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
2938         (type_unknown_p): Likewise.
2939         (require_instantiated_type): Likewise.
2940         (build_component_ref): Declare code dead.
2941         (build_x_function_call): Create and expect OVERLOAD nodes.
2942         (build_function_call_real): Check for ::main only.
2943         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
2944         (convert_for_assignment): Check for TREE_LIST before accessing
2945         TREE_VALUE.
2946         * decl.c (duplicate_decls): Check for namespace bindings instead
2947         of global bindings.
2948         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
2949         lookup_name_current_level, start_decl, xref_tag, 
2950         finish_enum): Likewise.
2951         * init.c (build_offset_ref): Likewise.
2952         * search.c (lookup_field): Likewise.
2953         (lookup_fnfields): Likewise.
2954         (dfs_debug_mark): Likewise.
2955         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
2956         (poplevel_class, pop_from_top_level): Likewise.
2957         * decl2.c (finish_method): Likewise.
2958         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
2959         * decl.c (record_builtin_type): Likewise.
2960         (init_decl_processing, grokfndecl): Likewise.
2961         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
2962         (make_lang_type): Likewise.
2963         * parse.y (make_thunk): Likewise.
2964         * pt.c (tsubst): Likewise.
2965         * tree.c (debug_binfo): Likewise.
2966         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h, 
2967         tinfo2.cc, inc/new.h: Add std qualifications.
2968         * inc/new: Wrap with namespace std if __HONOR_STD.
2969         * inc/typeinfo: Likewise.
2970
2971 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
2972
2973         * call.c (build_user_type_conversion_1): Handle second_conv 
2974         properly for templates.
2975
2976 Thu May  7 17:09:25 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
2977
2978         * method.c (build_decl_overload_real): Set TREE_USED flag to
2979         zero for build_type_variants nodes as well.
2980
2981 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
2982
2983         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
2984
2985 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
2986
2987         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
2988         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
2989         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o, 
2990         xref.o): Add toplev.h dependencies.
2991
2992 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
2993
2994         * errfn.c (cp_error, cp_warning): Remove declarations for
2995         error and warning respectively.
2996
2997 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2998
2999         * error.c: Convert to using ctype macros defined in system.h.
3000         * method.c: Likewise.
3001         * xref.c: Likewise.
3002         * lex.c: Likewise.  Also remove redundant system header stuff.
3003
3004 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
3005
3006         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c, 
3007         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c, 
3008         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c, 
3009         xref.c: Add include of toplev.h.
3010
3011 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
3012
3013         * tree.c (perm_manip): Also regenerate the RTL of an extern.
3014         (copy_to_permanent): Use end_temporary_allocation.
3015
3016 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
3017
3018         * init.c (expand_vec_init): The initialization of each array
3019         element is a full-expression.
3020
3021 Tue May  5 18:24:13 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
3022
3023         * method.c (build_mangled_name): Add a call to build_type_variant 
3024         to get the right type.
3025
3026 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
3027
3028         * Makefile.in: Add .SUFFIXES.
3029
3030         * cp-tree.def: Remove NAMESPACE_DECL.
3031
3032 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
3033
3034         * call.c (build_over_call): Do evaluate arg even if it has empty 
3035         class type.
3036         * decl.c (start_function): Don't push a member function.
3037
3038 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
3039
3040         * Makefile.in (g++FAQ.info): Put -o option before input file.
3041
3042 Thu Apr 30 13:05:33 EDT 1998  Andrew MacLeod  <amacleod@cygnus.com>
3043
3044         * gxxint.texi: Add info for squangling codes K and B.
3045
3046 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
3047
3048         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
3049         the expression in templates.
3050         (finish_stmt_expr): Likewise.
3051
3052 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
3053
3054         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
3055
3056 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
3057
3058         * decl.c (maybe_push_to_top_level): Always clear
3059         current_template_parms and processing_template_decl.
3060         (pushtag): Remove check of current_class_type and some comments,
3061         since maybe_push_to_top_level no longer creates confusion.
3062
3063 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
3064
3065         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
3066         (DECL_CLASS_TEMPLATE_P): Likewise.
3067         (DECL_PRIMARY_TEMPLATE): Likewise.
3068         (PRIMARY_TEMPLATE_P): Use it.
3069         (push_template_decl_real): New function.
3070         (redeclare_class_template): Take new template parameters as
3071         input. 
3072         (is_specialization_of): New function.
3073         (comp_template_args): Declare.
3074         * decl.c (pushtag): Handle friend template classes.
3075         (xref_tag): Likewise.  Use new calling convention for
3076         redeclare_class_template.
3077         * decl2.c (grok_x_components): Handle friend templates.
3078         * friend.c (is_friend): Use is_specialization_of where
3079         appropriate.  Deal with friend class templates.
3080         (make_friend_class): Let a class template be friends with itself.
3081         * pt.c (comp_template_args): Remove declaration.
3082         (tsubst_friend_class): New function.
3083         (push_template_decl_real): New function.
3084         (push_template_decl): Use it.
3085         (redeclare_class_template): Adjust for new calling convention.
3086         (comp_template_args): Give it external linkage.
3087         (instantiate_class_type): Use tsubst_friend_class to deal
3088         with friend templates.
3089         * typeck.c (comptypes): Use comp_template_args, rather than
3090         expanding it inline.
3091         * parse.y (component_decl): Handle a nested template type 
3092         like other component type declarations.
3093
3094         * pt.c (check_explicit_specialization): Handle overloaded
3095         constructors correctly.
3096
3097         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
3098         (lookup_template_class): Use it.
3099
3100 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
3101
3102         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
3103         * cp-tree.h: Add WRAPPER support.
3104         * call.c (add_candidate): Split out from add_*_candidate fns.
3105         (build_over_call): Take the candidate instead of function and args.
3106         Enforce access control here.  Emit overload warnings here.
3107         (add_warning): New fn.
3108         (joust): Add WARN parm.  If not set, call add_warning instead of
3109         printing a warning.  Reenable some warnings.
3110         (tourney): Pass it.
3111         (convert_like): Adjust.
3112         (build_new_op): Adjust.
3113         (build_new_function_call): Adjust.
3114         (build_user_type_conversion_1): Adjust.
3115         (USER_CONV_FN): Adjust.
3116         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper, 
3117         build_int_wrapper): New fns.
3118
3119 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
3120
3121         * pt.c (unify): Fix typo in previous change.
3122
3123 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
3124
3125         * error.c (dump_type_real): Declare canonical_name.
3126
3127         * typeck.c (comp_target_types): Fix PMFs.
3128
3129 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
3130
3131         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
3132         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
3133         TEMPLATE_DECL.
3134
3135          * pt.c (tsubst): Decrease the template-level of
3136          TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
3137          TEMPLATE_PARM_INDEX.
3138          (template_decl_level): New function.
3139          (unify): Make sure to record unifications for template
3140          parameters, even when the parameters exactly match the arguments.
3141          Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
3142          TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
3143          aren't from the level we're currently working on.
3144
3145 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
3146
3147         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
3148
3149         * decl2.c (check_member_template): Set DECL_IGNORED for member
3150         class templates, too.
3151
3152         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
3153
3154 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
3155
3156         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
3157
3158 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
3159
3160         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
3161         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
3162         (init_decl_processing): Handle TI types.
3163         * typeck.c (unsigned_type, signed_type): Handle TI types.
3164
3165 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
3166
3167         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
3168         New local added_libraries.  Increment count when add library to
3169         arglist.
3170
3171 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
3172
3173         * cp-tree.h (type_as_string_real): New function.
3174         * pt.c (mangle_class_name_for_template): Use it.
3175         * error.c (dump_aggr_type): Change prototype.
3176         (dump_type_prefix): Likewise.
3177         (dump_type_suffix): Likewise.
3178         (dump_type_real): Convert from dump_type.  If desired, the
3179         "canonica" name of a typedef, i.e., the name of the underlying
3180         type, can be printed.
3181         (dump_type): Call dump_type_real.
3182
3183 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
3184
3185         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
3186
3187         * typeck.c (comp_target_types): Tweak pedantic case.
3188         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
3189         Return -1 or 1 instead of 1 or 2.
3190         (compparms): Remove STRICT handling.
3191         (convert_for_assignment): Fix handling of pmfs.
3192
3193 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
3194
3195         * typeck.c (comp_target_types): Handle references like pointers.
3196         (comp_target_parms): Note that return code from comp_target_types
3197         can be negative to indicate failure.
3198
3199 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3200
3201         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
3202         which requires a working target compiler to build.
3203
3204 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
3205
3206         * tree.c (avoid_overlap): Add prototype.
3207
3208         * spew.c (num_tokens): Add prototype.
3209         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
3210
3211         * search.c (dfs_check_overlap): Add prototype.
3212         (dfs_no_overlap_yet): Likewise.
3213
3214         * pt.c (original_template): Add prototype.
3215         (inline_needs_template_parms): Likewise.
3216         (push_inline_template_parms_recursive): Likewise.
3217         (retrieve_specialization, register_specialization): Likewise.
3218         (print_candidates, reduce_template_parm_level): Likewise.
3219         (build_template_decl, mark_template_parm): Likewise.
3220         (tsubst_friend_function, get_bindings_real): Likewise.
3221
3222         * method.c (start_squangling): Add prototype.
3223         (end_squangling, check_ktype, issue_ktype): Likewise.
3224         (build_overloaded_scope_ref, check_btype): Likewise.
3225         (build_mangled_template_parm_index): Likewise.
3226
3227         * lex.c (init_cpp_parse): Add prototype.
3228         (handle_cp_pragma, handle_sysv_pragma): Likewise.
3229         (reduce_cmp, token_cmp): Likewise.
3230
3231         * except.c (call_eh_info): Add prototype.
3232         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
3233         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
3234
3235         * decl2.c (is_namespace_ancestor): Add prototype.
3236         (namespace_ancestor, add_using_namespace): Likewise.
3237         (ambiguous_decl): Likewise.
3238
3239         * decl.c (indent): Add prototype.
3240
3241         * call.c (add_template_candidate_real): Add prototype.
3242
3243 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
3244
3245         * decl2.c (build_expr_from_tree): Just return a PMF.
3246
3247 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
3248
3249         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
3250         when doing initializations.
3251
3252         * pt.c (unify): Use comptypes to compare type args.
3253
3254 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
3255
3256         * decl.c (duplicate_decls): Fix check for when it's safe to free
3257         the new decl.
3258
3259         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
3260         to type_as_string.
3261
3262 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
3263
3264         * pt.c (build_template_parm_index): Add prototype.
3265
3266         * search.c (my_tree_cons): Don't clear words outside the
3267         newly allocated node.
3268
3269 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
3270
3271         * lex.c (init_parse): Now returns char* containing the filename.
3272
3273 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
3274                           Jeff Law   <law@cygnus.com>
3275
3276         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
3277         than a pointer.
3278
3279 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3280
3281         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
3282
3283 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
3284
3285         * decl.c (duplicate_decls): Don't warn for redundant decls if
3286         friend: let add_friend take care of it.
3287
3288 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
3289
3290         * sig.c (build_signature_pointer_constructor): Don't set
3291         TREE_HAS_CONSTRUCTOR for a signature pointer.
3292         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
3293         * init.c (resolve_offset_ref): Warn about implicit & on pmfs 
3294         here, too.
3295         * typeck.c (build_unary_op): Only allow taking the address of a 
3296         real constructor.
3297         * typeck2.c (digest_init): Simplify.
3298         (store_init_value): Don't pedwarn about using { } for pmfs.
3299
3300 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
3301
3302         * cp-tree.h (start_decl):  Update prototype.
3303         * decl.c (start_decl):  Like the C version, new parameters
3304         for the attributes.  Call cplus_decl_attributes here,
3305         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
3306         (grokdeclarator):  Pass NULL for new start_decl arguments.
3307         * pt.c (tsubst_expr):  Likewise.
3308         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
3309         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
3310         * lex.c (build_lang_decl): Add lang_name_java.
3311         * class.c (push_lang_context): Add lang_name_java.
3312         * method.c (build_mangled_name): Check for is_java_type.
3313
3314 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
3315
3316         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
3317         * call.c (build_scoped_method_call): Check for TREE_CODE for
3318         VOID_TYPE instead of type ==  void_type_node.
3319         (build_method_call): Ditto.
3320         * decl.c (lookup_name_real): Ditto.
3321         (grokdeclarator): Ditto.
3322         (start_decl): Ditto.
3323         (grokparms): Ditto.
3324         (start_function): Ditto.
3325         (finish_function): Ditto.
3326         (start_method): Ditto.
3327
3328 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
3329
3330         * lex.c (finput): New variable.
3331         (init_cpp_parse):  Renamed from init_parse.
3332         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
3333         (finish_parse): New function.
3334         * cp-tree.h (init_lex, init_parse): Remove declarations.
3335
3336 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
3337
3338         * call.c (build_call): Still evaluate the actual argument.
3339         * class.c (is_empty_class): Update for -fnew-abi.
3340
3341         * decl2.c: -fnew-abi implies -fsquangle.
3342
3343         * method.c (do_build_assign_ref): Don't do anything to copy
3344         an empty class.
3345         (do_build_copy_constructor): Likewise.
3346         * call.c (build_over_call): Likewise.
3347
3348 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
3349
3350         * tree.c (avoid_overlap): Return a value.
3351
3352 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
3353
3354         * method.c (check_btype): Add missing argument to xrealloc.
3355         (check_ktype): Likewise.
3356
3357 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
3358
3359         Implement empty base optimization.
3360         * class.c (finish_struct_1): Add vbase fields earlier.  Set 
3361         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
3362         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
3363         (types_overlap_p): New fn.
3364         * tree.c (avoid_overlap): New fn.
3365         (build_base_fields): Use it to avoid overlapping empty bases.
3366         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
3367
3368         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
3369
3370         Re-implement allocation of base class subobjects.
3371         * tree.c (unshare_base_binfos): New fn.
3372         (layout_basetypes): Use it.  Now handles offsets of both virtual and
3373         non-virtual bases, after layout_type.
3374         (layout_vbasetypes): Remove.
3375         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
3376         (build_vbase_pointer_fields): Split out from old layout_basetypes.
3377         * class.c (finish_base_struct): Lose offset handling code.
3378         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
3379         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
3380         * cp-tree.h: Adjust.
3381
3382 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
3383
3384         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
3385         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
3386         * class.c (duplicate_tag_error): Likewise.
3387         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
3388         * tree.c (layout_vbasetypes): Update from layout_record, remove
3389         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
3390         (layout_basetypes): Likewise.
3391
3392 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
3393
3394         * class.c, Make sure system.h is included just after config.h.
3395         Delete lingering stdio and errno references too.
3396         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
3397         
3398 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
3399
3400         * friend.c (is_friend): Fix access control for local classes.
3401
3402         * class.c (is_empty_class): New fn.
3403         * call.c (build_call): Don't pass empty class objects to a function.
3404
3405 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
3406
3407         * call.c (build_over_call): Do name resolution for default
3408         arguments of function templates in the scope of the templates.
3409
3410 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
3411
3412         * call.c: Include system.h.  Remove includes, declarations and
3413         defines provided by system.h.
3414         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
3415         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
3416         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
3417         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
3418         * typeck2.c, xref.c: Likewise.
3419         * Makefile.in: Dependencies updated as appropriate.
3420         * Make-lang.in: Likewise.
3421
3422 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
3423
3424         * pt.c (fn_type_unification): Allow incomplete unification without 
3425         an immediate error message.
3426
3427 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
3428
3429         * tree.c (member_p): New fn.
3430         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
3431         initializing class members.
3432
3433         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
3434         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
3435
3436         * call.c (build_method_call): Handle non-scoped destructors, too.
3437         * pt.c (tsubst_copy): Likewise.
3438
3439         * pt.c (print_template_context): Split out...
3440         (push_tinst_level): ...from here.
3441
3442         * friend.c (is_friend): Don't pass a type to decl_function_context.
3443
3444         * typeck.c (convert_for_initialization): Always hand off
3445         conversions to class type.
3446
3447 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
3448
3449         * friend.c (is_friend): Local classes have the same access as the
3450         enclosing function.
3451
3452 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
3453
3454         * typeck.c (expand_target_expr): Delete dead function.
3455
3456         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
3457
3458         * repo.c (save_string): Delete dead function.
3459
3460         * method.c (thunk_printable_name): Delete dead function.
3461
3462         * lex.c (yynextch): Delete dead function.
3463
3464         * expr.c (tree_extract_aggr_init): #if 0 out.
3465
3466         * except.c (do_unwind): Delete dead function.
3467         (easy_expand_asm): Likewise.
3468
3469         * cvt.c (build_conversion_type_1): Delete dead function.
3470
3471         * cp-tree.h (push_expression_obstack): Declare.
3472
3473         * call.c (source_type): #if 0 out.
3474
3475         * class.c (alter_access): Remove unused label.  Add braces
3476         around empty else clause.
3477
3478         * lex.c (yyprint): Fix argument to printf.
3479
3480 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
3481
3482         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
3483
3484         * pt.c (instantiate_class_template): Make sure template
3485         arguments are permanent.
3486         * init.c (resolve_offset_ref): Don't go looking around in
3487         template types.
3488
3489         * semantics.c: Add routines to handle expressions, and some
3490         declaration processing.
3491         * parse.y: Use them.
3492         (current_class_depth): Move declaration to cp-tree.h.
3493         * parse.c: Regenerated.
3494         * cp-tree.h: Use them.
3495         (current_class_depth): Declare.
3496         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
3497
3498 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
3499
3500         * error.c (dump_decl): Be a bit more explicit with template
3501         type arguments, when verbose.
3502         
3503 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
3504
3505         * inc/exception: Reorder closing braces.
3506
3507 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
3508
3509         * pt.c (redeclare_class_template): New function.
3510         * cp_tree.h (redeclare_class_template): Declare it.
3511         * decl.c (xref_tag): Use it.
3512
3513 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
3514
3515         * call.c (build_over_call): Check IS_AGGR_TYPE, not 
3516         TYPE_LANG_SPECIFIC.
3517         * typeck.c (convert_arguments): Likewise.
3518
3519         * decl.c (grokdeclarator): Remove const and volatile from type after
3520         setting constp and volatilep.
3521
3522         * class.c (finish_struct_1): Don't warn about bool bitfield larger
3523         than one bit.
3524
3525 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
3526
3527         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
3528
3529 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
3530
3531         * call.c (build_object_call): Complain about ambiguous operator(),
3532         rather that crashing.
3533         (build_new_op): Likewise.
3534         (build_op_delete_call): Likewise.
3535
3536 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
3537
3538         * cvt.c (perform_qualification_conversions): Use comp_target_types
3539         instead of comp_ptr_ttypes.
3540
3541 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
3542
3543         * cp-tree.h (enforce_access): Declare.
3544         * call.c (enforce_access): Make it extern, not static.
3545         * class.c (alter_access): Use enforce_access; modify code for ISO
3546         compliance, rather than ARM rules.
3547
3548 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
3549
3550         * cp-tree.h: Fix typo.
3551
3552 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
3553
3554         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
3555         if (aggregate_value_p (type)).
3556
3557         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
3558
3559 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
3560
3561         * tree.c (mapcar): When dealing with a DECL, use it's constant
3562         value, if any.
3563         * pt.c (lookup_template_class): Don't mangle the names of template
3564         classes whose arguments are unknown.
3565
3566         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
3567
3568 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
3569
3570         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
3571
3572 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
3573
3574         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
3575         boolean_type_node to 1.
3576
3577 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
3578
3579         * error.c (dump_expr): Remove unused variable `l'.
3580
3581         * pt.c (for_each_template_parm): New function, created by
3582         converting uses_template_parms.
3583         (tree_fn_t): New typedef.
3584         (uses_template_parms): Use it.
3585         (mark_template_parm): New function.
3586         (push_template_decl): Check that the argument list of a partial
3587         specialization uses all the template parameters.
3588
3589         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
3590         with it; we might want it for debugging.
3591         * cp-tree.h (type_unification): Change interface.
3592         * class.c (finish_struct_1): Skip nested template types, just like
3593         ordinary nested types.
3594         (instantiate_type): Use new interface to type_unification.
3595         * lex.c (init_lex): Add __sz as opname for sizeof.
3596         * method.c (build_overload_scope_ref): New function.
3597         (build_overload_int): Handle complex expressions.  Set
3598         numeric_output_need_bar if necessary.
3599         (build_overload_value): Handle non-PARM_DECL nodes; this
3600         routine is now used by build_overload_int.  Remove some
3601         assignments to numeric_output_need_bar.  Use
3602         build_overload_scope_ref.
3603         (build_qualified_name): Note that some template mangled names end
3604         with digits, and set numeric_output_need_bar appropriately.  Use
3605         build_underscore_int.
3606         * pt.c (unify): Change interface.
3607         (type_unification_real): Likewise.
3608         (determine_specialization): Use new interfaces.
3609         (tsubst): Deal gracefully with situations in which the argument
3610         vector is not fully filled.
3611         (fn_type_unification): Use new interfaces.
3612         (type_unification): Likewise.  Remove NOP_EXPR hack.
3613         (type_unification_real): Likewise.
3614         (unify): Likewise.  Deal with unification of complex expresions.
3615
3616 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
3617
3618         * pt.c (complete_template_args): Initialize skip properly.
3619
3620         * decl.c (make_typename_type): Revert.
3621         (make_implicit_typename): Remove.
3622         (lookup_name_real): Don't call it.  Call lookup_field if we see a
3623         TYPE_DECL from a template base.
3624         * search.c (lookup_field): Do implicit typename stuff.
3625
3626 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
3627                           Geoff Noer    <noer@cygnus.com>
3628
3629         * Makefile.in: Various fixes for building cygwin32 native toolchains.
3630         * Make-lang.in: Likewise.
3631
3632 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
3633
3634         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
3635
3636 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
3637
3638         * decl.c (make_implicit_typename): Rewrite removed code.
3639         (make_typename_type): Call it if the type we look up comes from
3640         a base that uses template parms.
3641
3642         * pt.c (complete_template_args): Rewrite.
3643         (tsubst, FUNCTION_DECL): Use it.
3644
3645 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
3646
3647         * semantics.c (finish_asm_stmt): Fix combine strings. Call
3648         c_expand_asm_operands () if output_operands, input_operands or
3649         clobbers is not NULL_TREE.
3650
3651 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
3652
3653         * pt.c (complete_template_args): New function.
3654         (get_bindings): Deal with specializations of function templates
3655         with return type containing parameters from outer class 
3656         templates.
3657         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
3658         substitute arguments and compose a new type.
3659
3660 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
3661
3662         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
3663         FUNCTION_DECLs.
3664
3665 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
3666
3667         * decl.c (make_implicit_typename): Lose useless code.
3668
3669         * call.c (standard_conversion): Handle A* -> const A* properly.
3670
3671         * pt.c (get_bindings_real): Rename from get_bindings.  Add 
3672         check_rettype parm.
3673         (get_bindings): Pass 1.
3674         (get_bindings_overload): Pass 0.
3675
3676 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
3677
3678         * pt.c (check_explicit_specialization): When reverting a static
3679         member function, also remove the `this' parameter from
3680         last_function_parms.
3681
3682 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
3683
3684         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
3685         a function context.
3686
3687         * decl.c (store_bindings): Use free_binding_vecs.
3688         (pop_from_top_level): Likewise.
3689
3690 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
3691
3692         * decl.c (make_implicit_typename): Only change the type of a 
3693         TYPENAME_TYPE.
3694
3695 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
3696
3697         * semantics.c: New file, containing routines to perform the
3698         semantic phase of parsing.
3699         * parse.y: Use it.
3700         * pt.c (tsubst_expr): Likewise.
3701         * cp-tree.h: Declare the various functions in semantics.c.
3702         Provide macros to access _STMT tree nodes.
3703         * cp-tree.def: Add ASM_STMT tree node.
3704         * Makefile.in, Make-lang.in: Add dependencies on and for
3705         semantics.c.
3706         
3707 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
3708
3709         * pt.c (push_template_decl): Only check primary templates.
3710
3711         * pt.c (check_explicit_specialization): Complain about default args
3712         in explicit specialization.
3713
3714         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a 
3715         constructor_declarator.
3716
3717 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
3718
3719         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
3720         has no overloaded operator ->.
3721
3722         * call.c (build_field_call): Don't crash when presented with a
3723         field that is actually a nested type.
3724
3725         * decl.c (pushtag): Deal with friend class injection in local
3726         classes.
3727
3728         * call.c (build_object_call): Don't crash if OBJ is a
3729         pointer-to-member-function.
3730
3731 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
3732
3733         * pt.c (push_template_decl): Complain about template with C linkage,
3734         anonymous template class.
3735
3736 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
3737
3738         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
3739         * search.c: Likewise.
3740
3741         * lex.c (do_pending_defargs): Only call 
3742         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
3743
3744         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
3745
3746 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
3747
3748         * parse.y: Deal with CONSTRUCTORS in new_initializers.
3749
3750 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
3751
3752         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
3753         closely mimics the behavior in parse.y.
3754         (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
3755         into a compound statement.
3756         
3757 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
3758
3759         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
3760         * pt.c (inline_needs_template_parms): New fn.
3761         (original_template): New fn.
3762         (push_inline_template_parms_recursive): New fn.
3763         (maybe_begin_member_template_processing): Use them.
3764         (maybe_end_member_template_processing): Likewise.
3765         (is_member_or_friend_template): Rename to is_member_template.
3766         Member functions of local classes are never member templates.
3767
3768 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
3769
3770         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
3771         added in the class scope to catch redefinition error.
3772
3773         * pt.c (reduce_template_parm_level): Also copy 
3774         the DECL_TEMPLATE_PARMS field.
3775
3776 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
3777
3778         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
3779         reduced-level template type parameter.
3780
3781 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
3782
3783         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
3784         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
3785         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
3786         * decl.c (duplicate_decls): Propagate it.
3787         * typeck2.c (abstract_virtuals_error): Use two loops to emit
3788         abstract virtual functions and virtual functions which need a
3789         final overrider separately.
3790         
3791 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
3792
3793         * lang-specs.h: Properly put brackets around array elements in 
3794         initializer.
3795
3796         * typeck.c (build_binary_op_nodefault): Correctly place parens around
3797         && and || in expression.
3798
3799 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
3800
3801         * call.c (default_parm_conversions): Remove prototype definition.
3802         (build_method_call): Remove unused variable result.
3803
3804         * cvt.c (ocp_convert): Remove unused variable conversion.
3805
3806         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
3807
3808         * except.c (do_unwind): #if 0 definition of unused variables fcall
3809         and next_pc.
3810
3811         * expr.c (extract_scalar_init): #if 0 prototype and function 
3812         definition.
3813
3814         * init.c (expand_aggr_init_1): Remove unused variable init_type.
3815         (build_new_1): Remove unused variable t.
3816
3817         * pt.c (instantiate_class_template): Remove unused variable newtag;
3818         cast called function return value to void.
3819         (do_decl_instantiation): Remove unused variables name and fn.
3820
3821         * tree.c (get_type_decl): Add default return to shut up compiler from
3822         complaining control reaches end of non-void function.
3823
3824         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
3825
3826 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
3827
3828         * call.c (default_parm_conversions): Remove prototype definition.
3829         (build_method_call): Remove unused variable result.
3830         (build_over_call): Add default case in enumeration switch.
3831
3832 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
3833
3834         * decl2.c (lang_decode_option): Change j's type to size_t.
3835
3836         * tree.c (layout_vbasetypes): record_align and desired_align are of
3837         type unsigned int; const_size and nonvirtual_const_size likewise.
3838
3839 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
3840
3841         * parse.y (new_initializer): Make sure all initializers are
3842         lists.
3843
3844 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
3845
3846         * decl2.c (import_export_decl): Mark tinfo functions for
3847         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
3848
3849 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
3850
3851         * method.c: Fix typo.
3852
3853 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3854
3855         * method.c: Include "system.h" to get stdlib.h, stdio.h,
3856         ctype.h, string.h, etc.
3857         (issue_nrepeats): Add default case in enumeration switch.
3858         (check_btype): Likewise.
3859         (process_overload_item): Likewise.
3860          
3861         * Makefile.in (method.o): Depend on system.h.
3862
3863 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
3864
3865         * lex.c (do_scoped_id): Fix parenthesizing.
3866
3867 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
3868
3869         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
3870         FLAG_RTTI is unset, initialize type info machinery and continue
3871         with FLAG_RTTI enabled.
3872         (get_typeid): Ditto.
3873
3874 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
3875
3876         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
3877         from B.
3878
3879 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
3880
3881         * pt.c (finish_member_template_decl): Deal more gracefully with
3882         invalid declarations.
3883
3884 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
3885
3886         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
3887         cp-tree.h: Clean up more old overloading code, old RTTI code, and
3888         some formatting quirks.
3889
3890         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
3891         method.c, pt.c, ptree.c, typeck.c: Remove support for 
3892         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
3893         * class.h: Remove.
3894         * Makefile.in: Adjust.
3895
3896         * pt.c (unify): Don't allow reduced cv-quals when strict.
3897
3898         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
3899         *type_unification* and unify.
3900
3901 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
3902
3903         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
3904         (nested_name_specifier): And add it before this use.
3905         (typename_sub0): And this use.  Also add use without the keyword.
3906         (typename_sub1): Likewise.
3907         * pt.c (instantiate_class_template): Don't actually instantiate 
3908         anything if our type uses template parms.
3909
3910 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
3911
3912         * decl.c (start_function): Don't call temporary_allocation for a
3913         nested function.
3914
3915 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
3916
3917         * pt.c (instantiate_class_template): Don't mess with friends if
3918         our type uses template parms.
3919
3920 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
3921
3922         * parse.y (nested_name_specifier): Use explicit_template_type.
3923         (typename_sub): Allow a template_type, an explicit_template_type,
3924         or an implicit template type at the end.
3925         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
3926         * decl.c (make_typename_type): Handle template-id where the name
3927         is a TEMPLATE_DECL.
3928         * call.c (build_scoped_method_call): Handle member template 
3929         destructor call.
3930         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member 
3931         destructor is represented by the type.
3932
3933         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
3934         * parse.y (nested_name_specifier): Add 'template' case.
3935         (explicit_template_type): New rule.
3936         (typename_sub): Use it.
3937         * decl.c (make_typename_type): Handle getting a template-id for NAME.
3938         * pt.c (tsubst): Likewise.
3939
3940 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
3941
3942         * pt.c (add_to_template_args): Fix thinko.
3943         (instantiate_class_template): Call it later.
3944
3945         * pt.c (get_class_bindings): Add outer_args parm.
3946         (most_specialized_class): Likewise.
3947         (instantiate_class_template): Pass it.
3948         (more_specialized_class): Likewise.
3949         (lookup_template_class): Get context from template if none
3950         was specified.
3951         (finish_member_template_decl): Don't do anything with a
3952         partial specialization.
3953         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
3954         AGGREGATE_TYPE_P.
3955         * class.c (finish_struct): Member class templates have already been
3956         checked for name clashes.
3957         * decl.c (pushdecl_with_scope): Handle pushing at class level.
3958
3959 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
3960
3961         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
3962         (tsubst, *_PARM): Support multiple levels of template classes.
3963         (instantiate_class_template): Look up the pattern from the
3964         original template.
3965         (lookup_template_class): Handle getting a template for d1.
3966         (push_template_decl): Correct setting of 'primary'.
3967         (reduce_template_parm_level): Add 'levels' parm.
3968         (finish_member_template_decl): Support member class templates.
3969         (template_class_depth): Handle multiple levels.
3970         * parse.y (component_decl_1, fn.def2): Remove member template case.
3971         (component_decl): Add member template cases.
3972         * decl2.c (check_member_template): We now handle member template
3973         classes.
3974         * decl.c (pushtag): Handle member templates.
3975         * method.c (do_inline_function_hair): Don't touch
3976         IDENTIFIER_GLOBAL_VALUE.
3977         * init.c (build_offset_ref): If name isn't an identifier, just 
3978         return it.
3979         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
3980
3981         * typeck.c (get_delta_difference): Do adjust for conversions to
3982         and from virtual base.
3983
3984 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
3985
3986         * typeck.c (get_delta_difference): Give hard error for conversion
3987         from virtual base.
3988
3989         * cp-tree.h: Tweak formatting.
3990
3991 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
3992
3993         * decl.c (push_namespace): Handle redeclaration error.
3994
3995         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
3996         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
3997         (NAMESPACE_BINDING): New macro.
3998         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
3999         * *.c: Use them.
4000
4001         * pt.c (push_template_decl): Use innermost_args.
4002
4003         * decl.c (get_unique_name): Tweak from earlier in the name.
4004
4005 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4006
4007         * cp-tree.def: Add CPLUS_BINDING node.
4008         * cp-tree.h (tree_binding): new struct
4009         (BINDING_SCOPE, BINDING_VALUE): new macros
4010         (current_namespace, global_namespace): declare extern
4011         (struct lang_decl_flags): new field in_namespace
4012         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
4013         (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
4014         (TREE_INDIRECT_USING): new macro
4015         * decl2.c (current_namespace, global_namespace): Declare.  The
4016         value is a NAMESPACE_DECL now, not a TREE_LIST.
4017         (is_namespace_ancestor, namespace_ancestor):new static functions.
4018         (add_using_namespace, ambiguous_decl): likewise.
4019         (lookup_using_namespace): new support function for lookup_name.
4020         (qualified_lookup_using_namespace): new support function for
4021         do_scoped_id and lookup_namespace_name
4022         (get_namespace_id): mark as obsolete.
4023         (current_namespace_id): Likewise.
4024         (do_namespace_alias): Implement.
4025         (do_using_directive): Implement as call to add_using_namespace.
4026         * decl.c (binding_for_name): new function.
4027         (push_namespace, pop_namespace): implement.
4028         (push_decl): don't install a FUNCTION_DECL in the global branch.
4029         (lookup_namespace_name): implement using qualified lookup.
4030         (lookup_name_real): For global scoping, lookup in
4031         global_namespace. For namespace scoping, lookup in given
4032         namespace. For unscoped lookup, iterate over namespace,
4033         considering using directives.
4034         (init_decl_processing): initialize global_namespace.
4035         (grokvardecl): Build assembler name as static name for globals.
4036         (grokdeclarator): Remove old namespace mangling.
4037         (xref_tag): When installing a global binding for the
4038         tag, make sure we have an identifier.
4039         * method.c (build_overload_nested_name): mangle namespaces.
4040         (build_qualified_name): Likewise.
4041         (build_decl_overload_real): Likewise.
4042         * lex.c (build_lang_decl): set namespace for new declaration to
4043         current_namespace.
4044         (do_scoped_id): find global names in global or current
4045         namespace, or using qualified namespace lookup, depending on
4046         context.
4047         * init.c (build_member_call): When scope is namespace, use
4048         build_x_function_call instead.
4049         (build_offset_ref): When scope is namespace, collapse processing
4050         to lookup_namespace_name instead.
4051         * error.c (dump_decl): Support NAMESPACE_DECL.
4052         * decl.c (pushdecl): Bind globals to current namespace.
4053         (push_overloaded_decl): Likewise.
4054         (lookup_tag): Likewise.
4055         (lookup_name_current_level): Likewise.
4056         (xref_tag): Likewise.
4057         (start_function): Likewise.
4058         * lex.c (do_identifier): Likewise.
4059         (identifier_typedecl_value): Likewise.
4060         (real_yylex): Likewise.
4061         * method.c (do_inline_function_hair): Likewise.
4062         * parse.y (unscoped): Likewise.
4063         * pt.c (check_explicit_specialization): Likewise.
4064         (lookup_template_class): Likewise.
4065         * rtti.c (call_void_fn): Likewise.
4066         * sig.c (build_sigtable): Likewise.
4067         * ptree.c (lang_print_xnode): New function.
4068
4069 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
4070
4071         * pt.c (instantiate_class_template): Don't instantiate if pedantic
4072         and the args use template parms.
4073
4074         * pt.c (push_tinst_level): If the instantiaton uses template parms,
4075         fail silently.
4076         * decl.c (xref_basetypes): Do call complete_type for basetypes
4077         that involve template parameters.
4078
4079 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
4080
4081         * typeck2.c (process_init_constructor): Fix labeled init check.
4082
4083 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
4084
4085         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
4086         argument to tsubst and friends.
4087
4088         * pt.c (tsubst, FUNCTION_DECL): Tidy.
4089
4090         * typeck.c (build_x_function_call): Handle static member function
4091         templates like non-templates.  Handle friend templates like normal
4092         function templates.
4093         * pt.c (tsubst, *_PARM): Don't use orig_level.
4094         (get_bindings): Don't call add_to_template_args.
4095         (instantiate_template): Likewise.
4096         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
4097         * ptree.c (print_lang_type): Print index/level for template parms.
4098
4099 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
4100
4101         * Make-lang.in (cc1plus): Note that cc1plus depends on
4102         cp/cp-tree.h and cp/cp-tree.def.
4103         
4104         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
4105         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
4106         position in a template parameter list.
4107         * cp-tree.h (template_parm_index): New structure, used as the tree
4108         structure for a TEMPLATE_PARM_INDEX.
4109         (TEMPLATE_PARM_IDX): New macro.
4110         (TEMPLATE_PARM_LEVEL): Likewise.
4111         (TEMPLATE_PARM_DESCENDANTS): Likewise.
4112         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
4113         (TEMPLATE_PARM_DECL): Likewise.
4114         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4115         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
4116         (TEMPLATE_TYPE_DECL): Likewise.
4117         (TEMPLATE_CONST_IDX): Remove.
4118         (TEMPLATE_CONST_LEVEL): Likewise.
4119         (TEMPLATE_CONST_SET_INFO): Likewise.
4120         (TEMPLATE_TYPE_SET_INFO): Likewise.
4121         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
4122         node.
4123         (TEMPLATE_TYPE_LEVEL): Likewise.
4124         * decl.c (decls_match): Call comp_template_parms, rather than
4125         expanding it inline.
4126         (duplicate_decls): If two template declarations are being merged,
4127         then their TEMPLATE_INFOs should be merged as well.
4128         (grokfndecl): Save template-id information when declaring a friend
4129         with explicit template arguments.  Pass arguments to
4130         check_explicit_specialization via correct convention; at some
4131         point check_explicit_specialization changed, but these call-sites
4132         did not.
4133         (grokdeclarator): Tidy up slightly.
4134         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
4135         two template functions with the same DECL_ASSEMBLER_NAME the same,
4136         since the names are not yet mangled.
4137         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
4138         TEMPLATE_CONST_PARM. 
4139         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
4140         decl for a non-type parameter, rather than printing `<tparm ...>'.
4141         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
4142         (do_friend): Deal with template friends.
4143         * lex.c (do_pending_inlines): Call
4144         maybe_begin_member_template_processing, rather than
4145         conditionally calling begin_member_template_processing.
4146         (process_next_inline): Likewise.  Call
4147         maybe_end_member_template_processing, rather than
4148         conditionally calling end_member_template_processing.
4149         (do_pending_defargs): Likewise.
4150         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
4151         TEMPLATE_CONST_PARM.  
4152         * method.c (build_mangled_template_parm_index): New function.
4153         (build_overload_value): Use it.
4154         (build_overload_name): Likewise.
4155         * pt.c (finish_member_template_decl): Allow friend declarations.
4156         (template_class_depth): New function.
4157         (is_member_template): Rename, and modify, to become...
4158         (is_member_or_friend_template): New function.
4159         (end_member_template_processing): Rename, and modify, to become...
4160         (maybe_end_member_template_processing).
4161         (build_template_parm_index): New function.
4162         (reduce_template_parm_level): New function.
4163         (process_template_parm): Modify to use build_template_parm_index.
4164         (push_template_decl): Deal with friend templates.
4165         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
4166         TEMPLATE_CONST_PARM.
4167         (tsubst_friend_function): New function.
4168         (instantiate_class_template): Generate the DECL_FRIENDLIST
4169         for a new instantiation by using tsubst_friend_function rather
4170         than just tsubst.
4171         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
4172         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
4173         appropriate new macros.  Use reduce_template_parm_level to
4174         generate lower-level template parameters.  Handle tsubst'ing into
4175         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
4176         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
4177         templates.  Similarly for the template parameters for a new
4178         template.
4179         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
4180         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
4181         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.  
4182         (get_bindings): Call add_to_template_args if necessary.
4183         (instantiate_decl): Handle instantiations of friend templates.
4184         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
4185         TEMPLATE_TYPE_PARM as a list of fields; it's not!
4186         * spew.c (yylex): Do a little manual constant propogation to
4187         clarify the code.
4188         
4189 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
4190
4191         * error.c: Include sys/types.h.
4192
4193 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
4194
4195         * method.c (build_mangled_name): Start CPP directives in column zero.
4196
4197 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
4198
4199         * typeck2.c (process_init_constructor): Sorry about non-trivial
4200         labeled initializers.
4201         * parse.y (initlist): Reenable labeled initializers.
4202
4203 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
4204
4205         * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
4206         all callers changed.  Rely on the new parameter instead of arg 
4207         being a TREE_LIST when determine whether we are working inside
4208         template template parameter.  Clean up is_type test.
4209         
4210 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
4211
4212         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
4213         * typeck2.c (initializer_constant_valid_p): Allow conversions
4214         between pointers and refrerences.
4215
4216 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
4217
4218         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
4219         if pedantic || warn_pointer_arith.
4220
4221 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
4222
4223         * pt.c (unify): Handle TEMPLATE_DECL.
4224
4225 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
4226
4227         * cp-tree.h (strip_attrs): Remove decl.
4228
4229 1998-02-18  Doug Evans  <devans@cygnus.com>
4230
4231         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
4232         Update olddecl's attributes too.
4233         (strip_attrs): Remove function.
4234         * typeck.c (common_type): Call merge_machine_type_attributes.
4235
4236 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
4237
4238         * parse.y (initdcl0_innards): New grammar symbol.
4239         (nomods_initdecls, nomods_initdcl0): Change type from itype to
4240         none, since the resulting value is never used.
4241         (parse_decl): New function.
4242         (datadef): Remove redundant actions.
4243         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
4244         * parse.c: Regenerated.
4245         
4246 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
4247
4248         * parse.y (simple_stmt): Use getdecls() to check for decl.
4249
4250 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
4251
4252         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New 
4253         macros.
4254         (c++.install-common): Install c++filt properly as native or as cross
4255         variant.
4256         (c++.uninstall): Add c++filt.
4257
4258 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
4259
4260         * call.c (standard_conversion): Fix multi-level ptr conversions.
4261
4262 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
4263
4264         * init.c (build_new): Propagate error_mark_node up.
4265
4266 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
4267
4268         * parse.y (simple_stmt): If the condition isn't a declaration, 
4269         start the controlled block after the test.
4270
4271 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
4272
4273         * call.c (build_over_call): Convert builtin abs, labs and fabs to
4274         tree-codes.
4275         * decl.c (init_decl_processing): Reenable abs, labs and fabs as
4276         builtins.
4277
4278 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
4279
4280         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
4281
4282 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
4283
4284         * cp-tree.h: Add access_protected_virtual_node.
4285         * class.c (init_class_processing): Initialize it.
4286         * decl.c (xref_basetypes): Use it.
4287         * parse.y (base_class_access_list): Likewise.
4288
4289         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
4290         (c++.install-common): Install c++filt.
4291
4292 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
4293
4294         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
4295
4296 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
4297
4298         * call.c (reference_binding): Use comptypes when comparing
4299         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
4300
4301 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
4302
4303         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
4304         (really_overloaded_fn): Move check here from is_overloaded_fn. 
4305         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
4306
4307 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
4308
4309         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
4310         conversions.
4311
4312 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
4313
4314         * cp-tree.h (push_template_decl): Return the decl passed in, or an
4315         equivalent duplicate.
4316         * decl.c (pushtag): Use the return value from push_template_decl.
4317         (duplicate_decls): When duplicating a template declaration, merge
4318         the DECL_TEMPLATE_RESULTs as well.
4319         (make_implicit_typename): Don't try to dive into typename types to
4320         find a context for making a new implicit typename.
4321         (start_decl): Use the return value from push_template_decl.
4322         (grokdeclarator): Complain about declarations list `const operator
4323         int'.  Since we don't correctly handle in-class initializations of
4324         non-static data members, complain about this (now illegal)
4325         practice.  Issue an error for initializations of non-const statics
4326         since that is illegal as well, and since we don't handle that case
4327         correctly either.
4328         (start_function): Use the return value from push_template_decl.
4329         (start_method): Likewise.
4330         * decl2.c (grokfield): Likewise.  Since the change to
4331         grokdeclarator ensures that all initialized fields are in fact
4332         static, remove a redundant test for TREE_PUBLIC.
4333         * parse.y (initlist): Disable labeled initializers since they do
4334         not work as per the documentation, and since they do not use the
4335         same syntax as the C front end.
4336         * pt.c (push_template_decl): Return the decl passed in, or an
4337         equivalent duplicate.
4338         (lookup_template_class): When searching in a nested context,
4339         use the right arguments.
4340         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
4341         * typeck.c (build_component_ref): Assign the correct type to the
4342         result of build_vfn_ref.
4343         
4344 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
4345
4346         * pt.c (convert_nontype_argument): Fix typo.
4347         (check_explicit_specialization): Allow old-style specialization
4348         of class template members.
4349
4350 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
4351                           Manfred Hollstein  <manfred@s-direktnet.de>
4352
4353         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
4354         when deciding to override DECL_ASSEMBLER_NAME.
4355
4356 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
4357
4358         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
4359         * cp-tree.h (flag_do_squangling): Add declaration.
4360         * lang-options.h: Add -fsquangle and -fno-squangle.
4361         * method.c: Add macros and static variables for squangling.
4362         (build_overload_name): Rename to build_mangled_name, add logic for B 
4363         compression, and split into process_modifiers and 
4364         process_overload_item.
4365         (process_modifiers): New function, to handle constant, reference, 
4366         and pointer types. 
4367         (process_overload_item): New function, handles issue of type codes.
4368         (build_overload_name): New function, start squangling and call 
4369         build_mangled_name.
4370         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
4371         (start_squangling): New function to initialize squangling structs.
4372         (end_squangling): New function to destroy squangling structs.
4373         (nrepeats): Rename variable to Nrepeats.
4374         (issue_nrepeats): New function for issuing 'n' type repeats.
4375         (check_ktype): New function to check for type K name compression.
4376         (build_overload_nested_name): Add a check for K name compression.
4377         (build_qualified_name): Add a check for K name compression and don't
4378         use DECL_ASSEMBLER_NAME when squangling is on.
4379         (check_btype): New function, checks for B type compression.
4380         (build_static_name, build_decl_overload_real): Initiate squangling.
4381         (build_typename_overload, build_overload_with_type): Initiate 
4382         squangling
4383
4384 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
4385
4386         * method.c (make_thunk): Avoid name buffer overflow.
4387
4388 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
4389
4390         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
4391         don't define them yet.
4392
4393         * parse.y (nomods_initdcl0): Add constructor_declarator case.
4394
4395 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4396
4397         * config-lang.in (diff_excludes): Use basename only.
4398
4399 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
4400
4401         * tinfo2.cc: Add tinfo for signed char.
4402
4403 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
4404
4405         * search.c (compute_access): Handle protected constructors in derived
4406         classes as accessible.
4407
4408 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
4409
4410         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
4411         Call convert_from_reference sooner.
4412
4413 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
4414
4415         * cvt.c (ocp_convert): Obtain the constant values from constant
4416         decls even if the destination type is the same as the type of the
4417         decl. 
4418
4419         * decl2.c (finish_file): Make sure that static inlines with
4420         definitions are not marked DECL_EXTERNAL before returning.
4421
4422 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
4423
4424         * decl.c: Lose arg_looking_for_template.
4425         (lookup_name_real): Likewise.
4426         * parse.y: Lose processing_template_arg, template_arg1
4427         (primary): Likewise.
4428         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
4429
4430 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
4431
4432         * error.c (dump_decl): Fix type of default arguments for template
4433         template parameters and nontype template parameters.
4434         * parse.y (template_parm): Handle invalid default template 
4435         template arguments here.
4436
4437         * parse.y (template_parm): Use template_arg instead of PTYPENAME 
4438         for default template template argument.
4439         * pt.c (coerce_template_parms): Merge default template argument 
4440         codes.  Can treat RECORD_TYPE as template name if it is implicitly
4441         created.  Fix argument index in error message.
4442         * typeck.c (comptypes): Merge template argument comparison codes in 
4443         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
4444
4445 Tue Jan  6 01:42:44 1998  Mumit Khan <khan@xraylith.wisc.edu>
4446
4447         * lex.c (file_name_nondirectory): Also check for '/'.
4448
4449 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
4450
4451         * parse.y (primary): Deal with statement-expressions in
4452         templates. 
4453         * pt.c (tsubst_copy): Handle BIND_EXPR.
4454         * tree.c (mapcar): Likewise.
4455
4456         * call.c (add_template_candidate_real): Pass extra parameter to
4457         fn_type_unification. 
4458         * cp-tree.h (fn_type_unification): Add parameter.
4459         * pt.c (fn_type_unification): Add additional parameter to deal with
4460         static member functions.
4461         (get_bindings): Deal with static member functions.
4462
4463         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.      
4464         (revert_static_member_fn): Declare.
4465         * decl.c (revert_static_member_fn): Remove declaration.  Change
4466         linkage from internal to external.
4467         (cp_finish_decl): Deal with virtual functions in classes local to
4468         template functions.
4469         * decl2.c (finish_file): Don't forget to emit increment/decrement
4470         expressions in initializers for file-scope variables.
4471         * parse.y (typename_sub2): If the typename doesn't names a
4472         template, rather than a type, issue an error message.
4473         * pt.c (check_explicit_specialization): Handle specializations of
4474         static member functions.
4475         (coerce_template_parms): Handle offset references to lists of
4476         member functions.
4477         * search.c (note_debug_info_needed): Don't crash when handed a
4478         type which is being defined.
4479         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
4480         that can happen with some illegal code.
4481
4482 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4483
4484         * call.c (user_harshness): Initialize `code' to 0.
4485         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
4486         (null_ptr_cst_p): Add parentheses around && within ||.
4487         (standard_conversion): Likewise.
4488         (z_candidate): Likewise.
4489         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
4490         (build_object_call): Likewise for `mem_args'.
4491         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
4492         default case in enumeration switch.
4493
4494         * class.c (build_vtable_entry): Add explicit braces to avoid
4495         ambiguous `else'.
4496         (build_class_init_list): Likewise.
4497         (finish_struct_1): Initialize `width' to 0.
4498         (instantiate_type): Initialize `name' to NULL_TREE.  Add
4499         explicit braces to avoid ambiguous `else'.
4500
4501         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
4502         `else'.
4503
4504         * decl.c (grok_reference_init): Eliminate unused parameter, all
4505         callers changed.
4506         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
4507         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
4508         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
4509         (grokdeclarator): Add parentheses around && within ||.  Add
4510         explicit braces to avoid ambiguous `else'.
4511         (grokparms): Initialize `type' to NULL_TREE.
4512         (xref_tag): Remove unused label `just_return'.
4513         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
4514         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
4515         (hack_incomplete_structures): Add parentheses around assignment
4516         used as truth value.
4517
4518         * decl2.c (coerce_delete_type): Hide definition of `e3'.
4519
4520         * error.c: Include <stdlib.h>.
4521         (dump_expr): Change the type of `i' to size_t.  Remove unused
4522         label `error'. 
4523
4524         * except.c (init_exception_processing): Remove unused variable `d'.
4525         (expand_throw): Likewise for `label'.
4526
4527         * friend.c (add_friends): Add explicit braces to avoid ambiguous
4528         `else'.
4529
4530         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
4531         (sort_base_init): Likewise for `binfo'.
4532         (expand_member_init): Likewise for `rval'.
4533         (build_member_call): Add parentheses around assignment used as
4534         truth value.
4535         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
4536         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
4537         `old_immediate_size_expand' to 0.
4538         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
4539         (build_vec_delete_1): Remove unused variable `block'.
4540         (expand_vec_init): Initialize `itype' to NULL_TREE.
4541
4542         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
4543         declaration of `index' and `rindex' with autoconf macros.
4544         (reinit_parse_for_expr): Remove unused variables
4545         `look_for_semicolon' and `look_for_lbrac'.
4546         (cons_up_default_function): Initialize `args' to NULL_TREE.
4547         (readescape): Initialize `firstdig' to 0.
4548         (real_yylex): Add parentheses around assignment used as truth value. 
4549
4550         * method.c: Include <strings.h> if we don't have <string.h>.
4551         Protect declaration of `index' with autoconf macro.
4552
4553         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
4554         Initialize `type' to NULL_TREE.
4555         (structsp): Remove unused variable `id'.
4556
4557         * pt.c (coerce_template_parms): Add explicit braces to avoid
4558         ambiguous `else'.
4559         (lookup_template_class): Initialize `template' to NULL_TREE.
4560         (instantiate_class_template): Remove unused variable `name' and `e'.
4561         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
4562         (do_poplevel): Initialize `saved_warn_unused' to 0.
4563         (type_unification): Remove unused varable `parm'.
4564         (unify): Likewise for `j'.
4565
4566         * repo.c (init_repo): Add parentheses around assignment used as
4567         truth value.
4568         (finish_repo): Remove unused varable `p'.
4569         
4570         * search.c (get_binfo): Initiize `type' to NULL_TREE.
4571         (get_base_distance): Likewise.
4572         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
4573         and `new_v' to NULL_TREE.
4574         (lookup_fnfields): Likewise for `rval_binfo_h'.
4575         (breadth_first_search): Add parentheses around assignment used as
4576         truth value.
4577         (get_template_base): Initialize `type' to NULL_TREE.
4578
4579         * sig.c (append_signature_fields): Initialize `last_mfptr' to
4580         NULL_TREE.
4581         (build_signature_table_constructor): Likewise for
4582         `last_rhs_field', `pfn' and `vt_off'.
4583         (build_sigtable): Likewise for `init'.
4584
4585         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
4586         (propagate_binfo_offsets): Likewise for `delta'.
4587         (hash_tree_cons): Initialize hashcode to 0.
4588         (can_free): Likewise for `size'.
4589         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
4590         
4591         * typeck.c (convert_sequence): Hide prototype.
4592         (common_type): Add explicit braces to avoid ambiguous `else'.
4593         (comp_target_types): Likewise.
4594         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
4595         (build_function_call_real): Add explicit braces to avoid ambiguous
4596         `else'.
4597         (convert_arguments): Initialize `called_thing' to 0.
4598         (convert_for_initialization): Initialize `savew' and `savee' to 0.
4599
4600         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
4601         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
4602         (build_x_arrow): Likewise for `last_rval'.
4603
4604         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
4605
4606 Sun Feb  1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
4607
4608         * decl.c (init_decl_processing): Use set_sizetype.
4609         * decl2.c (sizetype): Don't declare.
4610         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
4611         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
4612         (build_component_addr, unary_complex_lvalue): Likewise.
4613         * rtti.c (expand_class_desc): Likewise.
4614         * class.c (get_vfield_offset): Likewise.
4615
4616 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
4617
4618         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
4619         early to avoid bogus error.  Handle overloaded function
4620         names provided as template arguments correctly.
4621         (coerce_template_parms): Don't mishandle overloaded functions when
4622         dealing with template template parameters.
4623         (lookup_template_class): Issue an error message, rather than
4624         crashing, when the TYPE_DECL provided is not a template type.
4625
4626 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
4627
4628         * class.c (instantiate_type): Don't just return a known type if
4629         it's wrong.
4630
4631 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
4632
4633         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
4634         since that code could never be reached.
4635         
4636         * error.c (dump_decl): Avoid aborting in the midst of printing an
4637         error message about an illegal template declaration.
4638
4639         * parse.y (structsp): Print an error message, rather than crashing,
4640         when a class-head does not name a class.
4641
4642         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
4643         template arguments as a g++ extension.
4644         
4645         * cp-tree.def (ALIGNOF_EXPR): New tree code.
4646         * decl2.c (grok_alignof): If processing_template_decl, just store
4647         the expression.
4648         * typeck.c (c_alignof): Likewise.
4649         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
4650         * error.c (dump_expr): Likewise.
4651         * pt.c (tsubst_copy): Likewise.
4652         * tree.c (cp_tree_equal): Likewise.
4653         * pt.c (uses_template_parms): Correctly determine whether or not a
4654         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
4655         folding can be done.
4656         
4657         * cp-tree.h (grok_enum_decls): Remove type parameter.
4658         * decl.c (grok_enum_decls): Likewise.
4659         * decl2.c (grok_x_components): Call grok_enum_decls
4660         unconditionally, since it will do nothing if there is no
4661         current_local_enum.  Use the new calling sequence.
4662         * pt.c (tsubst_enum): Use the new calling sequence for
4663         grok_enum_decls.
4664
4665         * decl.c (start_function): Make member functions of local classes
4666         in extern inline functions have comdat linkage here...
4667         (grokdeclarator): Rather than here.
4668         
4669 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
4670
4671         * pt.c (convert_nontype_argument): Use decl_constant_value.
4672
4673 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
4674
4675         * call.c (add_template_candidate_real): New function.
4676         (add_template_candidate): Use it.
4677         (add_template_conv_candidate): Likewise.
4678         (joust): Pass extra argument to more_specialized.
4679         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
4680         (is_local_class): Remove.
4681         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
4682         * cp-tree.h (is_local_class): Remove.
4683         (perform_array_to_pointer_conversion): Likewise.
4684         (finish_member_template_decl): Add.
4685         (check_explicit_specialization): Return a tree, not an int.
4686         (more_specialized): Take additional argument.
4687         (get_bindings): Likewise.
4688         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
4689         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
4690         (perform_array_to_pointer_conversion): Remove.
4691         * decl.c (saved_scope): Add processing_specialization,
4692         processing_explicit_instantiation fields.
4693         (maybe_push_to_top_level): Save them.
4694         (pop_from_top_level): Restore them.
4695         (grokfndecl): Use new return value from
4696         check_explicit_specialization. 
4697         (start_decl): Don't check flag_guiding_decls before pushing
4698         decls. 
4699         (cp_finish_decl): Remove previous (bogus) change.
4700         (grok_declarator): Use decl_function_context rather than
4701         is_local_class. 
4702         * decl2.c (finish_file): Pass extra argument to get_bindings.
4703         (build_expr_from_tree): Let build_x_component_ref check 
4704         validity of arguments rather than doing it here.
4705         * lex.c (cons_up_default_function): Remove code fooling with
4706         processing_specialization, processing_explicit_instantiation
4707         flags, as that is now done in {maybe_push_top,pop_from}_top_level. 
4708         * method.c (build_overload_identifier): Mangle local classes in
4709         template functions correctly.
4710         * parse.y (finish_member_template_decl): Move to pt.c.
4711         * pt.c (finish_member_template_decl): Moved here from parse.y.
4712         (print_candidates): New function.
4713         (determine_specialization): Change interface.  Properly look for
4714         most specialized versions of template candidates.
4715         (check_explicit_specialization): Fully process explicit
4716         instantiations. 
4717         (push_template_decl): Avoid looking at CLASSTYPE fields in
4718         FUNCTION_DECLS. 
4719         (determine_overloaded_function): Remove.
4720         (convert_nontype_argument): Change name from
4721         convert_nontype_parameter.  Use determine_overloaded_function
4722         instead of instantiate_type.
4723         (mangle_class_name_for_template): Handle type contexts as well as
4724         function contexts.
4725         (classtype_mangled_name): Likewise.
4726         (lookup_template_class): Likewise.
4727         (tsubst): Likewise.
4728         (more_specialized): Take explict template arguments as a
4729         parameter. 
4730         (most_specialized): Likewise.
4731         (get_bindings): Likewise.  Check that return types match before
4732         proclaiming a function a match.
4733         (do_decl_instantiation): Remove code searching for function to
4734         instantiate; that is now done in check_explicit_specialization.
4735         (add_maybe_template): Pass extra argument to get_bindings.
4736         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
4737         implementation.
4738         * typeck.c (build_component_ref): Check for invalid arguments.
4739
4740 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
4741
4742         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that 
4743         return_target and call_target are equivalent.
4744
4745         * pt.c (type_unification_real): Just accept function parms that
4746         don't use any template parms.
4747
4748 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
4749
4750         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
4751         unset DECL_NOT_REALLY_EXTERN.
4752
4753         * parse.y (typename_sub*): Fix std::.
4754
4755 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
4756
4757         * error.c (dump_decl): Fix type default template args.
4758         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
4759
4760 Fri Jan 23 18:34:37 1998  Mumit Khan <khan@xraylith.wisc.edu>
4761
4762         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
4763         (file_name_nondirectory): Use.
4764
4765 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
4766
4767         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
4768         that are not really present.  Substitute default arguments in 
4769         template template arguments.  Correctly convert TEMPLATE_DECL to 
4770         TEMPLATE_TEMPLATE_PARM.
4771         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM 
4772         are no longer treated specially here.
4773         * parse.y (template_template_parm): Fix copy error.
4774         * decl.c (grokdeclarator): Warn about missing `typename' for nested
4775         type created from template template parameters.
4776         * parse.y (bad_parm): Likewise
4777
4778         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
4779         (push_nested_class): Likewise.
4780         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
4781         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
4782         (copy_template_template_parm): Declare.
4783         * decl.c (arg_looking_for_template): New variable.
4784         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
4785         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
4786         node if arg_looking_for_template is nonzero.
4787         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
4788         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
4789         (grokdeclarator): Handle TEMPLATE_DECL.
4790         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
4791         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
4792         (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
4793         (dump_decl): Handle unnamed template type parameters.
4794         Handle template template parameters.
4795         (dump_function_name): Handle template template parameters.
4796         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef): 
4797         Handle TEMPLATE_TEMPLATE_PARM.
4798         * method.c (build_template_template_parm_names): New function.
4799         (build_template_parm_names): Handle TEMPLATE_DECL.
4800         (build_overload_nested_name, build_overload_name): 
4801         Handle TEMPLATE_TEMPLATE_PARM.
4802         * parse.y (maybe_identifier): New nonterminal.
4803         (template_type_parm): Use it.
4804         (template_template_parm, template_arg1): New nonterminal.
4805         (template_parm): Add template_template_parm rules.
4806         (template_arg): Set processing_template_arg.
4807         (template_arg1): Rules moved from template_arg.
4808         (primary, nonnested_type): Set arg_looking_for_template if we are
4809         processing template arguments.
4810         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
4811         (process_template_parm): Handle template template parameters.
4812         (coerce_template_parms, comp_template_args): Likewise.
4813         (mangle_class_name_for_template, lookup_template_class): Likewise.
4814         (uses_template_parms): Handle TEMPLATE_DECL and 
4815         TEMPLATE_TEMPLATE_PARM.
4816         (current_template_args): Handle TEMPLATE_DECL.
4817         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
4818         * search.c (dfs_walk, dfs_record_inheritance): 
4819         Handle TEMPLATE_TEMPLATE_PARM.
4820         * tree.c (copy_template_template_parm): New function.
4821         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
4822         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
4823
4824 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
4825
4826         * decl.c (start_decl): Don't allow duplicate definitions of static
4827         data members.
4828
4829         * call.c (build_user_type_conversion_1): Handle user-defined
4830         template conversion operators correctly.
4831
4832         * decl2.c (build_expr_from_tree): Issue an error message if the
4833         object in a COMPONENT_REF is a TEMPLATE_DECL.
4834         
4835         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
4836         
4837         * class.c (is_local_class): New function.
4838         * cp-tree.h (is_local_class): Declare it.
4839         (last_tree): Likewise.
4840         (begin_tree): Likewise.
4841         (end_tree): Likewise.
4842         (lookup_template_class): Change prototype.
4843         * decl.c (cp_finish_decl): Check for NULL where necesary.
4844         Consider FUNCTION_DECLS to declare objects with top-level binding,
4845         when calling make_decl_rtl.
4846         (grokdeclarator): Give members of local classes internal linkage.
4847         (start_function): Remove declaration of last_tree.
4848         (finish_function): Set flag_keep_inline_functions around call to
4849         rest_of_compilation if we are processing a member function in a
4850         local class.
4851         (start_method): Call push_template_decl for member functions of
4852         local classes in template functions.
4853         * decl2.c (import_export_decl): Don't give external linkage to
4854         instantiations of templates with internal linkage.
4855         * parse.y (last_tree): Remove declaration.
4856         (template_type): Pass extra parameter to lookup_template_class.
4857         (self_template_type): Likewise.
4858         (structsp): Move call to reset_specialization into left_curly.
4859         (left_curly): Call reset_specialization, and begin_tree.
4860         * pt.c (saved_trees): New variable.
4861         (mangle_class_name_for_template): Change prototype.  Use
4862         additional function context to name local classes in templates
4863         correctly. 
4864         (classtype_mangled_name): Pass the context.
4865         (push_template_decl): Handle local classes and templates, and
4866         member functions for such classes.
4867         (convert_nontype_parameter): Fix handling of pointer-to-member
4868         constants. 
4869         (lookup_template_class): Handle local classes in templates.
4870         (tsubst): Likewise.  Don't assume that template instantiations
4871         have external linkage; pay attention to the template declaration. 
4872         (mark_decl_instantiated): Likewise.
4873         (begin_tree): New function.
4874         (end_tree): Likewise.
4875         
4876         * decl.c (xref_basetypes): Don't call complete_type for basetypes
4877         that involve template parameters; that can lead to infinite
4878         recursion unnecessarily.
4879
4880         * pt.c (register_specialization): Do not register specializations
4881         that aren't ready to be registered yet.
4882         (check_explicit_specialization): Handle explicit specialization of
4883         constructors and destructors.
4884         (build_template_decl): New function.
4885         (push_template_delc): Handle out-of-class specializations of
4886         member templates.
4887         
4888         * pt.c (check_explicit_specialization): Set up the template
4889         information before registering the specialization.
4890         (coerce_template_parms): Fix thinko.
4891         (tsubst): Handle specializations of member templates correctly.
4892
4893         * class.c (finish_struct_methods): Remove calls to
4894         check_explicit_specialization from here.
4895         (finish_struct): And insert them here.
4896         * cp-tree.h (perform_qualification_conversions): New function.
4897         (perform_array_to_pointer_conversion): Likewise.
4898         (begin_explicit_instantiation): Likewise.
4899         (end_explicit_instantiation): Likewise.
4900         (determine_specialization): Renamed from
4901         determine_explicit_specialization. 
4902         (comp_template_parms): New function.
4903         (processing_explicit_instantiation): New variable.
4904         * cvt.c (perform_qualification_conversions): New function.
4905         (perform_array_to_pointer_conversion): Likewise.
4906         * decl.c (duplicate_decls): Don't consider template functions
4907         alike unless they have the same parameters.  Refine handling of
4908         instantiation/specialization mismatches.
4909         (start_decl): Don't call pushdecl for template specializations,
4910         since they don't affect overloading.
4911         (start_function): Likewise
4912         (grokfndecl): Call check_explicit_specialization a little later.
4913         Don't call duplicate_decls for memberm template specializations.
4914         (grokdeclarator): Don't update template_count for classes that are
4915         themselves specializations.  Remove use of `2' as parameter to
4916         grokfndecl since that value isn't used.
4917         * lex.c (cons_up_default_function): Save and restore
4918         processing_explicit_instantiation around calls to grokfield.
4919         * parse.y (finish_member_template_decl): New function.
4920         (component_decl_1): Use it.
4921         (fn.def2): Likewise.
4922         (template_arg_list_opt): New nonterminal.       
4923         (template_type): Use it.
4924         (self_template_type): Likewise.
4925         (template_id): Likewise.
4926         (object_template_id): Likewise.
4927         (notype_template_declarator): Likwise.
4928         (begin_explicit_instantiation): Likewise.
4929         (end_explicit_instantiation): Likewise.
4930         (explicit_instantiation): Use them.
4931         * pt.c (coerce_template_parms): Add parameters.
4932         (processing_explicit_instantiation): New variable.
4933         (convert_nontype_parameter): New function.
4934         (determine_overloaded_function): Likewise.
4935         (begin_explicit_instantiation): Likewise.
4936         (end_explicit_instantiation): Likewise.
4937         (retrieve_specialization): Likewise.
4938         (register_specialization): Likewise.
4939         (processing_explicit_specialization): Removed.
4940         (determine_specialization): Handle specializations of member
4941         functions of template class instantiations.
4942         (check_explicit_specialization): Refine to conform to standard.
4943         (comp_template_parms): New function.
4944         (coerce_template_parms): Call convert_nontype_parameter.
4945         (tsubst): Refine handling of member templates.  Use
4946         register_specialization. 
4947         (instantiate_template): Use retrieve_specialization.
4948         (do_decl_instantiation): Likewise.
4949         (instantiate_decl): Likewise.
4950         (type_unification): Improve handling of explict template
4951         arguments. 
4952         * tree.c (mapcar): Return error_mark_node, rather than aborting,
4953         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
4954         * typeck.c (build_unary_op): Call determine_specialization, rather
4955         than determine_explicit_specialization.
4956
4957 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
4958
4959         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
4960
4961 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
4962
4963         * error.c (dump_decl): For enum tags, output the tag, not its value.
4964
4965 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
4966
4967         * decl.c (init_decl_processing): Only call init_rtti_processing
4968         FLAG_RTTI is set.
4969
4970 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
4971
4972         * init.c (build_new_1): Split out from build_new.
4973         (build_new): Just return a NEW_EXPR.
4974         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
4975
4976         * decl2.c (get_temp_regvar): Tweak.
4977
4978         * cp-tree.h (TREE_CALLS_NEW): Comment out.
4979         * class.c (resolves_to_fixed_type_p): Remove use.
4980         * method.c (build_opfncall): Likewise.
4981         * call.c (build_new_op): Likewise.
4982
4983 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
4984
4985         * exception.cc (__eh_alloc, __eh_free): New fns.
4986         (__cp_push_exception, __cp_pop_exception): Use them.
4987         (__uncatch_exception): Call terminate here if no exception.
4988         * except.c (build_terminate_handler): New fn.
4989         (expand_start_catch_block): Use it.
4990         (expand_exception_blocks): Likewise.
4991         (alloc_eh_object): New fn.
4992         (expand_throw): Use it.  Protect exception init with terminate.
4993         * typeck.c (build_modify_expr): Remove code that ignores trivial 
4994         methods.
4995
4996 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4997  
4998         * call.c (add_builtin_candidate): Add default case in enumeration
4999         switch.
5000         (build_new_op): Likewise.
5001         (convert_like): Likewise.
5002         * cvt.c (build_expr_type_conversion): Likewise.
5003         * tree.c (real_lvalue_p): Likewise.
5004         (lvalue_p): Likewise.
5005         (cp_tree_equal): Likewise.
5006         * typeck.c (comptypes): Likewise.
5007         (build_component_ref): Likewise.
5008         (build_function_call_real): Likewise.
5009         (build_binary_op_nodefault): Likewise.
5010         (build_unary_op): Likewise.
5011         (build_modify_expr): Likewise.
5012         * typeck2.c (initializer_constant_valid_p): Likewise.
5013
5014 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
5015
5016         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
5017
5018 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
5019
5020         * pt.c (coerce_template_parms): Make sure to digest_init if
5021         possible.
5022
5023         * decl.c (duplicate_decls): Make the newdecl virtual if the
5024         olddecl was, just as is done with other attributes of olddecl.
5025
5026 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
5027
5028         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the 
5029         address of an OFFSET_REF.
5030
5031         * cp-tree.def: Add AGGR_INIT_EXPR.
5032         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
5033         AGGR_INIT_EXPR where appropriate.
5034         * expr.c (cplus_expand_expr): Likewise.  Simplify.
5035
5036         * decl2.c (finish_file): Remove call to register_exception_table.
5037
5038 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5039
5040         * pt.c (instantiate_class_template): Don't do injection when
5041         processing_template_decl is true, as pollutes current_binding_level 
5042         for base classes.
5043
5044 Wed Dec 17 21:17:39 1997  Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
5045
5046         * pt.c (maybe_fold_nontype_arg): Add prototype.
5047
5048 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
5049
5050         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
5051         * error.c (dump_expr): Likewise.
5052
5053 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
5054
5055         * typeck.c (build_function_call_real): Remove "inline called before
5056         definition" pedwarn.
5057
5058         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
5059
5060 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
5061
5062         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
5063
5064         * pt.c (type_unification_real): Change __null to type void* with 
5065         a warning.
5066
5067 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
5068
5069         * call.c (implicit_conversion): Don't call
5070         build_user_type_conversion_1 with a NULL expr, since it will
5071         crash. 
5072
5073         * pt.c (unify): Don't try to unify array bounds if either array is
5074         unbounded.
5075
5076 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5077
5078         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at): 
5079         Replace extern decls with casts.
5080
5081         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
5082         Update last_parm_cleanup_insn.
5083         (store_after_parms): Remove.
5084         * cp-tree.h: Adjust.
5085
5086 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
5087
5088         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
5089         (finish_file): Check DECL_COMDAT instead of weak|one_only.
5090         (import_export_vtable): Use make_decl_one_only instead of
5091         comdat_linkage for win32 tweak.
5092         (import_export_decl): Likewise.
5093         * pt.c (mark_decl_instantiated): Likewise.
5094
5095         * decl2.c (finish_file): Lose handling of templates in pending_statics.
5096
5097 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
5098
5099         * decl2.c (finish_file): Lose call to expand_builtin_throw.
5100         * except.c (expand_builtin_throw): Remove.
5101         * cp-tree.h: Remove ptr_ptr_type_node.
5102         * decl.c: Likewise.
5103
5104 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
5105         
5106         * decl.c (ptr_ptr_type_node): Define.
5107         (init_decl_processing): Initialize it.
5108         * cp-tree.h: Declare it.
5109         * exception.cc (__cp_exception_info): Use __get_eh_info.
5110         (__cp_push_exception): Ditto.
5111         (__cp_pop_exception): Ditto.
5112
5113         From Scott Snyder <snyder@d0sgif.fnal.gov>:
5114         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
5115         saved_pc.
5116         (init_exception_processing): Removed saved_pc initialization.
5117
5118 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
5119
5120         * pt.c (instantiate_decl): Defer all templates but inline functions.
5121
5122 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
5123
5124         * init.c (expand_vec_init): Don't fold a list of parameters.
5125
5126         * decl.c (copy_args_p): Handle copy elision for types with virtual
5127         bases.
5128         * call.c (build_over_call): Likewise.
5129
5130 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
5131
5132         * pt.c (lookup_template_function): Copy the template arguments,
5133         not just the list containing them, to the permanent obstack.
5134
5135 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
5136
5137         * except.c (expand_start_catch_block): suspend_momentary for the
5138         terminate handler.
5139
5140         * error.c (dump_decl): Handle LOOKUP_EXPR.
5141
5142 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
5143
5144         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
5145         permanent obstack if we are processing a template decl.
5146         * typeck.c (build_static_cast): Likewise.
5147         (build_const_cast): Likewise.
5148         (build_reinterpret_cast): Likewise.
5149
5150         * pt.c (coerce_template_parms): Coerce some expressions, even
5151         when processing_template_decl.
5152
5153 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
5154
5155         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
5156         handling of pointer difference expressions.
5157
5158         * typeck.c (comp_target_types): Comparison of function/method types
5159         is independent of nptrs.
5160
5161 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
5162
5163         * pt.c (tsubst): Avoid creating pointer to reference and
5164         reference to reference types.
5165
5166 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
5167
5168         * parse.y (do_id): New nonterminal.
5169         (template_id): Use it.
5170
5171 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
5172
5173         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
5174         * spew.c (yylex): Don't do_identifier here.
5175         * decl2.c (build_expr_from_tree): Revert last change.
5176
5177         * decl2.c (build_expr_from_tree): Expand the name for a method call.
5178         * parse.y (object_template_id): Don't try to take the DECL_NAME.
5179
5180 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
5181
5182         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
5183         alloc_expr.
5184         * call.c (build_op_delete_call): Adjust.
5185
5186         * except.c (expand_end_catch_block): Lose rethrow region.
5187         (expand_start_catch_block): Likewise.
5188         (expand_end_catch_block): Don't expand_leftover_cleanups.
5189
5190 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5191
5192         * pt.c (tsubst): Remove tree_cons call (places redundant info into
5193         DECL_TEMPLATE_INSTANTIATION).   
5194
5195 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
5196
5197         * tree.c (is_overloaded_fn): Handle getting a fn template.
5198         (really_overloaded_fn): Likewise.
5199         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
5200         * pt.c (check_explicit_specialization): Tweak.
5201         (determine_explicit_specialization): Tweak.
5202
5203         * tree.c, cp-tree.h (get_target_expr): New fn.
5204
5205 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
5206
5207         * pt.c (check_explicit_specialization): Fix misspelling in
5208         diagnostic: `preceeded'.
5209         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
5210         `conversiona'.
5211
5212 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
5213
5214         * pt.c (determine_explicit_specialization): Avoid an internal
5215         error for bad specializations.
5216
5217         * method.c (build_overload_value): Handle SCOPE_REF.
5218
5219 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
5220
5221         * class.c (prepare_fresh_vtable): Enable even more complex MI
5222         vtable names.
5223
5224 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
5225
5226         * exception.cc (__check_eh_spec): Optimize a bit.
5227
5228         * exception.cc (__cp_pop_exception): Lose handler arg.
5229         * except.c (do_pop_exception): Likewise.
5230         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
5231         (expand_end_catch_block): Likewise.
5232
5233 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5234
5235         * pt.c (check_explicit_specialization): Complain about using a 
5236         template-id for a non-specialization.
5237
5238 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
5239
5240         * repo.c: Prototype rindex only if needed.
5241         * xref.c: Likewise.
5242
5243 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
5244
5245         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
5246
5247 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
5248
5249         * typeck.c (build_const_cast): Handle references here instead of
5250         handing off to convert_to_reference.
5251
5252         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
5253         TerminateFunctionCall.
5254         (init_exception_processing): Likewise.  Terminate et al are now
5255         the fns, not ADDR_EXPRs.
5256         (various): Lose redundant assemble_external calls.
5257         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
5258
5259         * cp-tree.h (struct lang_decl_flags): Add comdat.
5260         (DECL_COMDAT): New macro.
5261         * decl.c (duplicate_decls): Propagate it.
5262         (cp_finish_decl): Handle it.
5263         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
5264
5265         * class.c: Remove static pending_hard_virtuals.
5266         (add_virtual_function): Take pointers to pending_virtuals
5267         and pending_hard_virtuals.
5268         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
5269
5270 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
5271
5272         * decl2.c (import_export_vtable): If we support one_only but not
5273         weak symbols, mark instantiated template vtables one_only.
5274         (import_export_decl): Likewise for tinfo functions.
5275         (finish_vtable_vardecl): Also write out vtables from explicitly 
5276         instantiated template classes.
5277         * pt.c (mark_class_instantiated): Revert last change.
5278
5279         * except.c (expand_throw): Call mark_used on the destructor.
5280
5281 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
5282
5283         * lex.c (lang_init): Enable flag_exceptions by default if no
5284         command line switch was specified.
5285
5286 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
5287
5288         * pt.c (unify): Handle `void' template parameters in
5289         specializations.
5290
5291 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
5292
5293         * rtti.c (build_dynamic_cast): Handle template case here.
5294         (build_dynamic_cast_1): Not here.
5295
5296         * typeck2.c (digest_init): Make copies where appropriate.
5297
5298         * decl2.c (delete_sanity): resolve_offset_ref.
5299
5300         * except.c: Call terminate without caching so many bits.
5301
5302         * except.c (expand_start_catch_block): Fix catching a reference
5303         to pointer.
5304
5305 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
5306
5307         * init.c (build_new): Copy size to the saveable obstack.
5308
5309         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
5310         TRY_CATCH_EXPR for now.
5311
5312 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
5313
5314         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
5315         has DECL_LANG_SPECIFIC.
5316
5317         * exception.cc (struct cp_eh_info): Add handlers field.
5318         (__cp_push_exception): Initialize it.
5319         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
5320         (__throw_bad_exception): Remove.
5321         * except.c (call_eh_info): Add handlers field.
5322         (get_eh_handlers): New fn.
5323         (push_eh_cleanup): Increment handlers.
5324
5325 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
5326
5327         * except.c (expand_start_eh_spec): Use the try/catch code.
5328         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
5329         doing everything inline.
5330         (init_exception_processing): throw_type_match now takes
5331         const void pointers.
5332         * exception.cc (__check_eh_spec): New fn.
5333         * inc/exception: Neither terminate nor unexpected return.
5334         * decl.c: Make const_ptr_type_node public.
5335         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
5336
5337         * except.c (expand_start_catch_block): We only need the rethrow
5338         region for non-sjlj exceptions.
5339         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
5340
5341 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
5342
5343         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
5344         (various.o): Likewise.
5345         * inc/new: Add placement deletes.  Add throw specs for default new.
5346         * new.cc (set_new_handler): Move here from libgcc2.
5347         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
5348         (new): Move from libgcc2.  Throw bad_alloc.
5349         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
5350         * decl.c (init_decl_processing): Update exception specs on new and
5351         delete.
5352
5353         * method.c (build_decl_overload_real): Don't mess with global 
5354         placement delete.
5355
5356         * init.c (build_new): Check for null throw spec, not nothrow_t.
5357
5358         * decl.c (duplicate_decls): Don't complain about different exceptions
5359         from an internal declaration.
5360
5361         * call.c (build_op_delete_call): Fix check for member fns again.
5362
5363         * decl2.c (import_export_decl): Interface hackery affects
5364         virtual synthesized methods.
5365
5366 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5367
5368         * decl.c (start_decl): Don't just complain about a mismatched 
5369         scope, fix it.
5370
5371         * decl.c (make_implicit_typename): Handle case where t is not
5372         actually from context.
5373         * tree.c (get_type_decl): Lose identifier case.
5374         * spew.c (yylex): Lose useless call to identifer_typedecl_value.
5375         * parse.y (nonnested_type): Just use lookup_name.
5376         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
5377
5378 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
5379
5380         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
5381         T was built in C language context (for example, by
5382         output_func_start_profiler).
5383
5384 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
5385
5386         * decl.c (make_implicit_typename): New fn.
5387         (lookup_name_real): Use it.  Use current_class_type as the context.
5388
5389 Mon Nov 17 23:42:03 1997  Bruno Haible <haible@ilog.fr>
5390
5391         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
5392
5393 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
5394
5395         * friend.c (do_friend): Warn about non-template friends in templates.
5396
5397         * call.c (build_op_delete_call): Fix handling of inherited delete.
5398
5399         * search.c (dfs_record_inheritance): Ignore template type parms.
5400
5401 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
5402
5403         * call.c (build_new_op): Fix copy error.
5404         (build_op_new_call): New fn.
5405         (build_op_delete_call): New fn.
5406         * cp-tree.h: Declare them.
5407         * init.c (build_new): Use them.  Support placement delete.
5408         (build_x_delete): Use build_op_delete_call.
5409         (build_delete): Likewise.
5410         * decl2.c (delete_sanity): Likewise.
5411         (coerce_delete_type): Don't complain about placement delete.
5412
5413 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
5414
5415         * call.c (build_new_function_call): Remove unused 'obj' parm.
5416         * cp-tree.h, typeck.c: Adjust.
5417
5418         * init.c (build_new): Make the cleanup last longer.
5419         (expand_vec_init): Call do_pending_stack_adjust.
5420
5421 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
5422
5423         * pt.c (do_type_instantiation): Fix typo.
5424         (mark_class_instantiated): If we support one_only but not weak 
5425         symbols, don't mark this as known.
5426
5427         * init.c (build_new): Handle vec delete in EH cleanup.
5428
5429 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5430
5431         * call.c (build_method_call): Call complete_type before checking
5432         for destructor.
5433
5434 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
5435
5436         * decl.c (add_block_current_level): Delete.
5437         * init.c (build_vec_delete_1): Delete build_block and
5438         add_block_current_level calls.
5439
5440 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
5441
5442         * init.c (build_new): Handle freeing allocated memory when the
5443         constructor throws.
5444
5445         * call.c (build_new_method_call): Fix flags arg.
5446
5447         * pt.c (do_type_instantiation): Don't try to instantiate
5448         member templates.
5449         (mark_decl_instantiated): If we support one_only but not
5450         weak symbols, mark this one_only.
5451         * decl2.c (import_export_vtable): Don't defer handling of vtables
5452         if MULTIPLE_SYMBOL_SPACES.
5453
5454 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
5455
5456         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
5457
5458 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
5459
5460         * except.c (do_pop_exception): Return a value.
5461
5462 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
5463
5464         * call.c (build_new_method_call): Handle getting a
5465         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
5466         if we got template parms.
5467         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
5468         not just the args.
5469         * decl2.c (build_expr_from_tree): Tweak last change.
5470         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
5471         (maybe_fold_nontype_arg): Split out from tsubst_copy.
5472         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
5473
5474 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5475
5476         * pt.c (tsubst_copy): Handle explicit template arguments in 
5477         function calls.
5478         * typeck.c (build_x_function_call): Likewise.
5479         * decl2.c (build_expr_from_tree): Lookup function name if it 
5480         hasn't been done.
5481
5482         * pt.c (tsubst): Instantiate template functions properly when 
5483         template parameter does not appear in function arguments and return 
5484         type.
5485         (comp_template_args): Handle member templates required by tsubst.
5486
5487 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
5488
5489         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
5490         previous change.
5491
5492 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
5493
5494         * pt.c (coerce_template_parms): Tweak error message.
5495
5496         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
5497         return type defaults to `int', even if there are storage-class
5498         specifiers.
5499
5500 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
5501
5502         Complete nested exception support.
5503         * except.c (do_pop_exception): Split out...
5504         (push_eh_cleanup): From here.  Handle the EH region by hand.
5505         (expand_start_catch_block): Add a new level for the catch parm.
5506         Move the rethrow region outside the two cleanup regions.
5507         Protect the initializer for the catch parm with terminate.
5508         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
5509         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
5510         popping off the middle of the stack.
5511         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR, 
5512         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
5513         (build_cplus_new): Only wrap CALL_EXPRs.
5514         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around 
5515         the constructor call.
5516
5517 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5518
5519         * Make-lang.in (c++.distdir): Make inc subdirectory.
5520
5521 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
5522
5523         * decl2.c (finish_file): Put back some code.
5524
5525 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5526
5527         * decl2.c (finish_file): Remove redundant code.
5528         * method.c (emit_thunk): Don't let the backend defer generic thunks.
5529
5530 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
5531
5532         * except.c (call_eh_info): Split out...
5533         (push_eh_info): From here.
5534         (expand_builtin_throw): Use it.
5535         (expand_start_catch_block): Move region start back.
5536
5537 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
5538
5539         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
5540         (real_yylex): Record wide strings using target endianness, not host.
5541
5542 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
5543
5544         * repo.c (rindex): Add decl unconditionally.
5545         (get_base_filename, open_repo_file): Don't cast rindex.
5546         * xref.c (rindex): Add decl unconditionally.
5547         (index): Remove unused decl.
5548         (open_xref_file): Don't cast rindex.
5549
5550 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
5551
5552         * class.c (build_vbase_path): Propagate the result type properly.
5553
5554 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
5555
5556         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
5557         remaining use of saved_throw_type with a call to get_eh_type.
5558
5559 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
5560
5561         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
5562         (file_name_nondirectory): New function, doing the same as the macro.
5563         (set_typedecl_interface_info): Use it instead of the macro.
5564         (check_newline): Likewise.
5565         (handle_cp_pragma): Likewise.
5566
5567         * repo.c (get_base_filename): Cast result of rindex to char*.
5568         (open_repo_file): Likewise.
5569         * xref.c (open_xref_file): Likewise.
5570         * error.c (dump_char): Make its arg int, not char.
5571
5572         * except.c (push_eh_info): Pass the number of fields - 1 down, not
5573         the exact number of fields.
5574
5575 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
5576
5577         Support for nested exceptions.
5578         * tinfo2.cc (__is_pointer): New fn.
5579         * exception.cc (struct cp_eh_info): Define.
5580         (__cp_exception_info, __uncatch_exception): New fns.
5581         (__cp_push_exception, __cp_pop_exception): New fns.
5582         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
5583         Lose empty_fndecl.
5584         (init_exception_processing): Likewise.  __eh_pc is now external.
5585         (push_eh_info): New fn.
5586         (get_eh_{info,value,type,caught}): New fns.
5587         (push_eh_cleanup): Just call __cp_pop_exception.
5588         (expand_start_catch_block): Use push_eh_info.  Start the eh region
5589         sooner.
5590         (expand_end_eh_spec): Use push_eh_info.
5591         (expand_throw): Call __cp_push_exception to set up the exception info.
5592         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
5593         when we rethrow.
5594         (expand_builtin_throw): Don't refer to empty_fndecl.
5595
5596 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
5597
5598         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
5599
5600 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
5601
5602         * method.c (build_template_parm_names, build_decl_overload_real):
5603         Add static to definitions.
5604         * pt.c (add_to_template_args, note_template_header,
5605         processing_explicit_specialization, type_unification_real): Likewise.
5606         ({determine,check}_explicit_specialization): Use a single string for
5607         error messages.
5608
5609 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
5610
5611         * except.c (expand_exception_blocks): Call do_pending_stack_adust.
5612         (expand_end_catch_block): Likewise.
5613         (expand_end_eh_spec): Likewise.
5614
5615 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
5616
5617         * decl.c (duplicate_decls): Handle template specializations
5618         correctly. 
5619         * error.c (dump_function_name): Fix printing of specializations of
5620         member functions that are not member templates.
5621         * cp-tree.h (processing_specialization): Make global.
5622         * pt.c (processing_specialization): Likewise.
5623         * lex.c (cons_up_default_function): Save and restore
5624         processing_specialization to avoid confusion.
5625         
5626 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
5627
5628         * decl.c (init_decl_processing): Give null_node unknown* type.
5629         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
5630         (common_type): Likewise.
5631         * error.c (args_as_string): Recognize null_node.
5632
5633 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5634
5635         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
5636         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
5637
5638         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
5639
5640         * Make-lang.in (g++): Include prefix.o.
5641
5642 Thu Oct 16 15:31:09 1997  Judy Goldberg <judygold@sanwafp.com>
5643
5644         * pt.c (determine_explicit_specialization): Initialize "dummy"
5645         to keep Purify quiet.
5646
5647 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
5648
5649         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
5650         (build_overload_int): Not here.
5651
5652 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
5653
5654         * class.c (build_type_pathname): Remove.
5655         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
5656
5657 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
5658
5659         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
5660         &&label GNU extension.
5661
5662 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
5663
5664         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
5665         so as to avoid incorrect manglings.
5666         * method.c (build_decl_overload_real): Don't mangle return types
5667         for constructors.
5668         
5669 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
5670
5671         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
5672         scratch_tree_cons): Define as macros for now.
5673         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c, 
5674         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
5675         typeck2.c: Use them and the expression_obstack variants.
5676
5677 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5678
5679         * decl.c (store_return_init): Allow classes with explicit ctors to
5680         be used with the named return values extension.
5681
5682 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
5683
5684         * pt.c (instantiate_decl): Fix previous change.
5685
5686 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
5687
5688         * pt.c (tsubst): Fix thinko.
5689         (instantiate_decl): Really use the original template.
5690
5691         * call.c (build_new_method_call): Use simple constructor_name for
5692         error messages.
5693
5694 Wed Oct  8 22:44:42 1997  Jeffrey A Law  (law@cygnus.com)
5695
5696         * method.c (build_underscore_int): Don't use ANSI specific
5697         features.
5698
5699 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
5700
5701         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
5702         for our key method; it might have been inlined by -O3.
5703
5704 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
5705
5706         * decl.c (make_typename_type): Do not try to call lookup_field for
5707         non-aggregate types.
5708
5709 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
5710
5711         * typeck.c (build_reinterpret_cast): Tweak.
5712
5713 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
5714
5715         * typeck.c (build_reinterpret_cast): converting a void pointer
5716         to function pointer with a reinterpret_cast produces a warning
5717         if -pedantic is issued
5718
5719 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
5720
5721         * typeck.c (c_expand_return): Don't warn about returning a
5722         reference-type variable as a reference.
5723
5724 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
5725
5726         * method.c (build_static_name): Fix typo.
5727
5728 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
5729
5730         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
5731         OLDDECL before we try to do DECL_USE_TEMPLATE.
5732
5733 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
5734
5735         * decl.c (duplicate_decls): Don't warn about template instances.
5736
5737         * typeck.c (mark_addressable): Lose ancient code that unsets
5738         DECL_EXTERNAL.
5739
5740         * pt.c (do_decl_instantiation): Lose support for instantiating
5741         non-templates.
5742
5743         * call.c (build_new_function_call): Fix handling of null explicit
5744         template args.
5745         (build_new_method_call): Likewise.
5746
5747 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
5748
5749         * method.c (build_underscore_int): Fix typo.
5750
5751 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
5752
5753         * tree.c (print_lang_statistics): #if 0 call to
5754         print_inline_obstack_statistics until its definition is checked in.
5755
5756 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
5757
5758         * decl2.c (finish_file): Move dump_tree_statistics to end.
5759
5760         * pt.c (instantiate_decl): Look for the original template.
5761         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
5762         of member templates.
5763
5764 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
5765
5766         * Makefile.in (g++FAQ.*): New rules.
5767         (CONFLICTS): Update.
5768         * g++FAQ.texi: Moved from libg++.
5769
5770         * parse.y (PFUNCNAME): Only specify the type once.
5771
5772 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
5773
5774         * lex.c (real_yylex): Clean up the code to fully behave the way
5775         the c-lex.c parser does for complex and real numbers.
5776
5777 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
5778
5779         * method.c (build_decl_overload_real): Reformat.
5780
5781 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
5782
5783         * method.c (synthesize_method): If at_eof, determine our linkage.
5784
5785 1997-09-29  Paul Eggert  <eggert@twinsun.com>
5786
5787         * lex.c (real_yylex): Treat `$' just like `_', except issue a
5788         diagnostic if !dollars_in_ident or if pedantic.
5789
5790         * lang-specs.h (@c++): -ansi no longer implies -$.
5791
5792         * decl2.c (lang_decode_option):
5793         -traditional and -ansi now do not mess with
5794         dollars_in_ident.
5795
5796 Mon Sep 29 19:57:51 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
5797
5798         * Makefile.in (parse.o, decl.o): Also depend on
5799         $(srcdir)/../except.h $(srcdir)/../output.h.
5800         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
5801         $(srcdir)/../except.h $(srcdir)/../output.h.
5802         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
5803         ../insn-codes.h.
5804
5805         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
5806
5807         * expr.c (cplus_expand_expr): Make it static. 
5808
5809         * decl2.c, init.c, typeck.c: Include "expr.h".
5810         (expand_expr): Use proper values when calling the function.
5811
5812 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
5813
5814         * lang-options.h: new -Wold-style-cast flag.
5815         * cp-tree.h (warn_old_style_cast): new variable.
5816         * decl2.c (warn_old_style_cast): ditto.
5817         (lang_decode_option): support -Wold-style-cast.
5818         (reparse_absdcl_as_casts): produce old-style-cast warning.
5819
5820 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5821
5822         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
5823         TREE_USED, reset value based on already_used.
5824
5825         * init.c (expand_member_init): Revert change.
5826         
5827 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
5828
5829         * cp-tree.h, decl.c, decl2.c, pt.c:
5830         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
5831
5832         * decl2.c (lang_decode_option): Add missing ;.
5833
5834 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
5835
5836         * friend.c (do_friend): Disable injection for all template-derived
5837         decls.
5838         * decl2.c (lang_decode_option): Handle -fguiding-decls.
5839         * parse.y (notype_template_declarator): New nonterminal.
5840         (direct_notype_declarator): Use it.
5841         (complex_direct_notype_declarator): Likewise.
5842         (object_template_id): Accept any kind of identifier after TEMPLATE.
5843         (notype_qualified_id): Don't add template declarators here.
5844
5845 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
5846
5847         * call.c (add_template_candidate): Add explicit_targs parameter.
5848         (build_scoped_method_call): Use it.
5849         (build_overload_call_real): Likewise.
5850         (build_user_type_conversion_1): Likewise.
5851         (build_new_function_call): Likewise.
5852         (build_object_call): Likewise.
5853         (build_new_op): Likewise.
5854         (build_new_method_call): Likewise.
5855         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
5856         (build_new_method_call): Likewise.
5857
5858         * class.c (finish_struct_methods): Add specialization pass to
5859         determine which methods were specializing which other methods.
5860         (instantiate_type): Handle TEMPLATE_ID_EXPR.
5861
5862         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
5863
5864         * cp-tree.h (name_mangling_version): New variable.
5865         (flag_guiding_decls): Likewise.
5866         (build_template_decl_overload): New function.
5867         (begin_specialization): Likewise.
5868         (reset_specialization): Likewise.
5869         (end_specialization): Likewise.
5870         (determine_explicit_specialization): Likewise.
5871         (check_explicit_specialization): Likewise.
5872         (lookup_template_function): Likewise.
5873         (fn_type_unification): Add explicit_targs parameter.
5874         (type_unification): Likewise.
5875
5876         * decl.c (duplicate_decls): Add smarts for explicit
5877         specializations.
5878         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
5879         specializations.
5880         (grokfndecl): Call check_explicit_specialization.
5881
5882         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
5883         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
5884         (check_classfn): Handle specializations.
5885
5886         * error.c (dump_function_name): Print specialization arguments.
5887
5888         * friend.c (do_friend): Don't call pushdecl for template 
5889         instantiations. 
5890
5891         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
5892
5893         * lang-options.h: Add -fname-mangling-version, -fguiding-decls, 
5894         and -fno-guiding-decls.
5895
5896         * lex.c (identifier_type): Return PFUNCNAME for template function
5897         names.
5898
5899         * method.c (build_decl_overload_real): New function.
5900         (build_template_parm_names): New function.
5901         (build_overload_identifier): Use it.
5902         (build_underscore_int): New function.
5903         (build_overload_int): Use it.  Add levels for template
5904         parameters.
5905         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
5906         (build_overload_nested_names): Handle template type parameters.
5907         (build_template_decl_overload): New function.
5908
5909         * parse.y (YYSTYPE): New ntype member.
5910         (nested_name_specifier): Use it.
5911         (nested_name_specifier_1): Likewise.
5912         (PFUNCNAME): New token.
5913         (template_id, object_template_id): New non-terminals.
5914         (template_parm_list): Note specializations.
5915         (template_def): Likewise.
5916         (structsp): Likewise.
5917         (fn.def2): Handle member template specializations.
5918         (component_decl_1): Likewise.
5919         (direct_notype_declarator): Handle template-ids.
5920         (component_decl_1): Likewise.
5921         (direct_notype_declarator): Handle template-ids.
5922         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
5923
5924         * pt.c (processing_specializations): New variable.
5925         (template_header_count): Likewise.
5926         (type_unification_real): New function.
5927         (processing_explicit_specialization): Likewise.
5928         (note_template_header): Likewise.
5929         (is_member_template): Handle specializations.
5930         (end_template_decl): Call reset_specialization.
5931         (push_template_decl): Handle member template specializations.
5932         (tsubst): Likewise.
5933         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
5934         (instantiate_template): Handle specializations.
5935         (instantiate_decl): Likewise.
5936         (fn_type_unification): Handle explicit_targs.
5937         (type_unification): Likewise.  Allow incomplete unification
5938         without an error message, if allow_incomplete.
5939         (get_bindings): Use new calling sequence for fn_type_unification.
5940
5941         * spew.c (yylex): Handle PFUNCNAME.
5942
5943         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
5944         (really_overloaded_fn): Likewise.
5945         (get_first_fn): Handle function templates.
5946
5947         * typeck.c (build_x_function_call): Use really_overloaded_fn.
5948         Handle TEMPLATE_ID_EXPR.
5949         (build_x_unary_op): Likewise.
5950         (build_unary_op): Likewise.
5951         (mark_addressable): Templates whose address is taken are marked  
5952         as used. 
5953
5954 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5955
5956         * decl.c (init_decl_processing): Declare __builtin_constant_p as
5957         accepting any kind of type, not only int.
5958
5959 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
5960
5961         * search.c (get_matching_virtual): Notice virtual bases when sorrying
5962         about covariant returns.
5963
5964         * parse.y (member_init): Also imply typename here.  Remove ancient
5965         extension for initializing base members.
5966
5967 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
5968
5969         Handle multi-level typenames and implicit typename in base list.
5970         * parse.y (typename_sub{,[0-2]}): New rules.
5971         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
5972         (nonnested_type): New rule.
5973         (complete_type_name): Use it.
5974         (base_class.1): Use typename_sub and nonnested_type.
5975         (nested_name_specifier): Don't elide std:: here.
5976         * decl.c (make_typename_type): Handle getting a type for NAME.
5977         (lookup_name_real): Turn std:: into :: here.
5978
5979         Rvalue conversions were removed in London.
5980         * call.c (is_subseq): Don't consider lvalue transformations.
5981         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
5982         (joust): Reenable ?: kludge.
5983
5984 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
5985
5986         * decl.c (start_function): Up warning of no return type to be a
5987         pedwarn.
5988
5989 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5990
5991         * init.c (expand_member_init): Don't set TREE_USED.
5992         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
5993         set,don't clear TREE_USED wholesale.
5994
5995 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
5996
5997         * call.c (build_over_call): Do require_complete_type before
5998         build_cplus_new.
5999
6000 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
6001
6002         * search.c (lookup_field): Call complete_type in all cases.
6003
6004         * decl.c (finish_function): Just warn about flowing off the end.
6005
6006 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
6007
6008         * decl.c (grokparms): Don't bash a permanent list node if we're
6009         in a function.
6010
6011 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
6012
6013         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
6014
6015 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
6016
6017         * call.c (build_new_op): Give better error for syntactically
6018         correct, but semantically invalid, use of undeclared template.
6019
6020         * call.c (compare_qual): Handle pmfs.
6021
6022         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
6023         after the exception spec.
6024
6025 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
6026
6027         * call.c (null_ptr_cst_p): Integer type, not integral type.
6028
6029         * call.c (joust): Disable warnings until they can be moved to the
6030         right place.
6031
6032 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
6033
6034         * Makefile.in, config-lang.in:  Convert to autoconf.
6035
6036 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
6037
6038         * decl.c (lookup_name_real): Add implicit 'typename' to types from
6039         base classes.
6040
6041         * pt.c (most_specialized_class): Fix typo.
6042         (tsubst): Move constant folding to TREE_VEC case.
6043
6044 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
6045
6046         * pt.c (do_poplevel): Don't warn about unused local variables
6047         while processing_template_decl since we don't always know whether
6048         or not they will need constructing/destructing.
6049
6050         * pt.c (uses_template_parms): Check the values of an enumeration
6051         type to make sure they don't depend on template parms.
6052
6053         * decl.c (make_typename_type): Don't lookup the field if the
6054         context uses template parms, even if we're not
6055         processing_template_decl at the moment.
6056
6057         * pt.c (coerce_template_parms): Avoid looking at the
6058         TYPE_LANG_DECL portion of a typename type, since there won't be
6059         one. 
6060         (tsubst): Do constant folding as necessary to make sure that
6061         arguments passed to lookup_template_class really are constants. 
6062
6063 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
6064
6065         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
6066         * decl2.c (finish_file): Only register exception tables if we
6067         need to.
6068
6069         * decl.c (init_decl_processing): Add __builtin_[fs]p.
6070
6071 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
6072
6073         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
6074
6075 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
6076
6077         * error.c (dump_decl): Avoid crashing when presented with a
6078         uninitialized constant, as can occur with a template parameter.
6079         (dump_expr): Make sure that there are enough levels of
6080         current_template_parms before we start diving through them.
6081
6082 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
6083
6084         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
6085         c-typeck.c.
6086
6087 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6088
6089         * except.c (expand_throw): Call build_delete for all 
6090         exception types, not just objects with destructors.
6091
6092 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
6093
6094         * decl.c (current_local_enum): Remove static.
6095         * pt.c (tsubst_enum): Save and restore value of current_local_enum
6096         in case template is expanded in enum decl.
6097         (instantiate_class_template) : Use new tsubst_enum signature.
6098         (tsubst_expr): Likewise.
6099
6100 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
6101
6102         * pt.c (begin_member_template_processing): Take a function as
6103         argument, not a set of template arguments.  Use the template
6104         parameters, rather than the arguments.  Handle non-type parameters
6105         correctly.  Push a binding level for the parameters so that multiple
6106         member templates using the same parameter names can be declared.
6107         (end_member_template_processing): Pop the binding level.
6108         (push_template_decl): Mark member templates as static when
6109         appropriate. 
6110
6111         * lex.c (do_pending_inlines): Pass the function, not its template
6112         arguments, to begin_member_template_processing.
6113         (process_next_inline): Likewise.
6114         (do_pending_defargs): Likewise.
6115
6116         * error.c (dump_expr): Obtain the correct declaration for a
6117         TEMPLATE_CONST_PARM. 
6118
6119         * call.c (add_template_conv_candidate): New function.
6120         (build_object_call): Handle member templates, as done in the other
6121         build_ functions.
6122         
6123 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
6124
6125         * decl.c (replace_defag): Undo previous change.
6126         * lex.c (do_pending_defargs): Deal with member templates.
6127         
6128         * pt.c (is_member_template): Avoid crashing when passed a
6129         non-function argument.
6130
6131 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
6132
6133         * class.c (grow_method): Remove check for redeclaration.
6134
6135 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
6136
6137         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
6138         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
6139         (PRIMARY_TEMPLATE_P): Use it.
6140         * call.c (build_overload_call_real): Use it.
6141         * class.c (instantiate_type): Likewise.
6142         * decl.c (decls_match): Likewise.
6143         * method.c (build_overload_identifier): Likewise.
6144         * pt.c (push_template_decl): Likewise.
6145         (classtype_mangled_name): Likewise.
6146         (lookup_template_class): Likewise.
6147         
6148         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
6149         DECL_NTPARMS to conform to usage elsewhere.
6150         * call.c (add_template_candidate): Likewise.
6151         * class.c (instantiate_type): Likewise.
6152         * pt.c (instantiate_template): Likewise.
6153         (get_bindings): Likewise.
6154         
6155         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
6156         is_member_template.
6157
6158         * pt.c (unify): Undo changes to allow multiple levels of template
6159         parameters. 
6160         (type_unification): Likewise.
6161         (fn_type_unification): Likewise.
6162         (get_class_bindings): Likewise.
6163         * cp-tree.h (Likewise).
6164         
6165         * decl.c (replace_defarg): Check that the type of the default
6166         parameter does not invlove a template type before complaining
6167         about the initialization.
6168
6169         * error.c (dump_expr): Deal with template constant parameters in
6170         member templates correctly.
6171
6172         * pt.c (is_member_template): Deal with class specializations
6173         correctly. 
6174         (tsubst): Handle "partial instantiation" of member templates
6175         correctly. 
6176
6177 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
6178
6179         * pt.c (type_unification): Change calling squence to allow for
6180         multiple levels of template parameters.
6181         (tsubst_expr): Likewise.
6182         (tsubst): Likewise.
6183         (tsubst_copy): Likewise.
6184         (instantiate_template): Likewise.
6185         (unify): Likewise.
6186         * call.c (build_overload_call_real): Use it.
6187         (add_builtin_candidate): Use it.
6188         (build_new_method_call): Use it.
6189         * class.c (instantiate_type): Use it.
6190         * decl.c (grokdeclarator): Use it.
6191         * decl2.c (finish_file): Use it.
6192         * method.c (build_overload_identifier): Use it.
6193         
6194         * call.c (add_template_candidate):  Add additional parameter for
6195         the function return type.  Call fn_type_unification istead of
6196         type_unification.
6197         (build_user_type_conversion_1): Handle member templates.
6198         (build_new_function_call): Likewise.
6199         (build_new_op): Likewise.
6200         (build_new_method_call): Likewise.
6201         
6202         * class.c (grow_method): Don't give an error message indicating
6203         that two member templates with the same name are ambiguous.
6204         (finish_struct): Treat member template functions just like member
6205         functions.
6206         
6207         * cp-tree.h (check_member_template): Add declaration.
6208         (begin_member_template_processing): Likewise.
6209         (end_member_template_processing): Likewise.
6210         (fn_type_unification): Likewise.
6211         (is_member_template): Likewise.
6212         (tsubst): Change prototype.
6213         (tsubst_expr): Likewise.
6214         (tsubst_copy): Likewise.
6215         (instantiate_template): Likewise.
6216         (get_bindings): Likewise.
6217
6218         * decl.c (decls_match): Handle multiple levels of template
6219         parameters. 
6220         (pushdecl): Handle template type params just like other type
6221         declarations. 
6222         (push_class_level_binding): Return immediately if the
6223         class_binding_level is NULL.
6224         (grokfndecl): If check_classfn() returns a member_template, use
6225         the result of the template, not the template itself.
6226         
6227         * decl2.c (check_member_template): New function.  Check to see
6228         that the entity declared to be a member template can be one.
6229         (check_classfn): Allow redeclaration of member template functions
6230         with different types; the new functions can be specializations or
6231         explicit instantiations.
6232         
6233         * error.c (dump_decl): Handle multiple levels of template
6234         parameters. 
6235         (dump_function_decl): Update to handle function templates.
6236
6237         * lex.c (do_pending_inlines): Set up template parameter context
6238         for member templates.
6239         (process_next_inline): Likewise.
6240
6241         * method. (build_overload_identifier): Adjust for multiple levels
6242         of template parameters.
6243         
6244         * parse.y (fn.def2): Add member templates.
6245         (component_decl_1): Likewise.
6246
6247         * pt.c (begin_member_template_processing): New function.
6248         (end_member_template_processing): Likewise.
6249         (is_member_template): Likewise.
6250         (fn_type_unification): Likewise.
6251         (current_template_parms): Return a vector of all the template
6252         parms, not just the innermost level of parms.
6253         (push_template_decl): Deal with the possibility of member
6254         templates. 
6255         (lookup_template_class): Likewise.
6256         (uses_template_parms): Likewise.
6257         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
6258         TEMPLATE_CONST_PARM to deal with multiple levels of template
6259         arguments.   Add processing of TEMPLATE_DECL to produce new
6260         TEMPLATE_DECLs from old ones.
6261         (do_decl_instantiation): Handle member templates.
6262
6263         * search.c (lookup_fnfields_1): Handle member template conversion
6264         operators. 
6265
6266         * tree.c (cp_tree_equal): Check the levels, as well as the
6267         indices, of TEMPLATE_CONST_PARMs.
6268
6269         * typeck.c (comptypes): Check the levels, as well as the indices,
6270         fo TEMPLATE_TYPE_PARMs.
6271         (build_x_function_call): Treat member templates like member
6272         functions. 
6273         
6274 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
6275
6276         * typeck.c (c_expand_return): Always convert_for_initialization
6277         before checking for returning a pointer to local.
6278
6279         * pt.c (type_unification): If strict and the function parm doesn't
6280         use template parms, just compare types.
6281
6282 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
6283
6284         * method.c (build_overloaded_value): Replace direct call
6285         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
6286
6287 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
6288
6289         * typeck.c (convert_arguments): Don't arbitrarily choose the first
6290         of a set of overloaded functions.
6291
6292 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
6293
6294         * lex.c (real_yylex): Don't elide __FUNCTION__.
6295
6296         * method.c (build_overload_value): Add in_template parm.
6297         (build_overload_int): Likewise.
6298         (build_overload_identifier): Pass it.
6299
6300         * decl.c (duplicate_decls): Don't bash a previous template
6301         definition with a redeclaration.
6302
6303         * pt.c (unify): float doesn't match double.
6304
6305         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
6306         TYPE_DECL.  Handle getting non-template types.
6307         * parse.y (explicit_instantiation): Use typespec instead of
6308         aggr template_type.
6309
6310 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
6311
6312         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
6313
6314 Mon Sep  1 13:19:04 1997  Eugene Mamchits <eugin@ips.ras.ru>
6315
6316         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
6317         (compare_ics): Likewise.
6318
6319 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
6320
6321         * call.c (joust): Warn about choosing one conversion op over
6322         another because of 'this' argument when the other return type is
6323         better.
6324         (source_type): New fn.
6325
6326         * call.c (build_new_op): Strip leading REF_BIND from first operand
6327         to builtin operator.
6328
6329         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
6330         use its RTL.
6331
6332 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
6333
6334         * call.c (null_ptr_cst_p): Remove support for (void*)0.
6335
6336 Wed Aug 27 02:03:34 1997  Jeffrey A Law  (law@cygnus.com)
6337
6338         * typeck.c (expand_target_expr): Make definition match declaration.
6339
6340         * class.c (get_basefndecls): Make definition match declaration.
6341
6342 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
6343
6344         * input.c (sub_getch): Eventually give up and release the input file.
6345
6346         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
6347         right place.
6348
6349         * call.c (joust): Tweak message.
6350
6351 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
6352
6353         * error.c (type_as_string): Put const/volatile on template type
6354         parameters where appropriate.
6355
6356 Sat Aug 23 17:47:22 1997  Jeffrey A Law  (law@cygnus.com)
6357
6358         * call.c (strictly_better): Make arguments unsigned ints.
6359
6360 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
6361
6362         * lex.c (real_yylex): Refer to __complex instead of complex.
6363
6364 Thu Aug 21 22:25:46 1997  J"orn Rennecke <amylaar@cygnus.co.uk>
6365
6366         * lex.c (real_yylex): Don't use getc directly.
6367
6368 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
6369
6370         * call.c (is_subseq): Don't try to be clever.
6371
6372 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
6373
6374         * parse.y, pt.c: Include "except.h".
6375         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
6376         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
6377         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
6378         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
6379         prototyping.
6380
6381 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
6382
6383         * decl2.c (mark_vtable_entries): Instead of replacing pure
6384         virtuals with a reference to __pure_virtual, copy the decl and
6385         change the RTL.
6386
6387 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
6388
6389         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
6390
6391         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
6392
6393         * pt.c (instantiate_class_template): Call repo_template_used
6394         before finish_prevtable_vardecl.
6395
6396         * call.c (is_subseq): New fn.
6397         (compare_ics): Use it.
6398
6399         * repo.c (finish_repo): Don't crash on no args.
6400
6401         * parse.y (named_complex_class_head_sans_basetype): Handle
6402         explicit global scope.
6403         * decl2.c (handle_class_head): New fn.
6404
6405         * pt.c (unify): Add CONST_DECL case.
6406
6407 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6408
6409         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
6410
6411         * cp-tree.h (report_type_mismatch): Add prototype.
6412         * call.c (build_overload_call_real): Remove erroneous fourth
6413         argument to report_type_mismatch.
6414         (build_user_type_conversion_1): Remove erroneous second arg to
6415         tourney.
6416         (build_new_function_call): Likewise.
6417         (build_object_call): Likewise.
6418         (build_new_op): Likewise.
6419         (build_new_method_call): Likewise.
6420
6421 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
6422
6423         * error.c (dump_decl): Don't bother processing a function with no
6424         DECL_LANG_SPECIFIC.
6425
6426         * method.c (emit_thunk): Call init_function_start in the macro case.
6427
6428 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
6429
6430         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
6431         defined and used to set flag_vtable_thunks.
6432
6433 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
6434
6435         * parse.y: Don't clear the inlines from their obstack until they've 
6436         all been processed.
6437
6438         * decl.c (duplicate_decls): Don't complain about exception
6439         specification mismatch if flag_exceptions is off.
6440
6441 Mon Aug 11 15:01:56  1997  Marc Lehmann <pcg@goof.com>
6442
6443         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
6444
6445 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
6446
6447         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
6448         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
6449         Include <stdio.h> before include files that formerly used STDIO_PROTO. 
6450
6451         * decl.c, g++spec.c, lex.c, method.c, repo.c:
6452         Include "config.h" first, as per autoconf manual.
6453
6454 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
6455
6456         * decl.c (duplicate_decls): Tweak wording.
6457         * lex.c (do_pending_defargs): Don't die if we see a default arg
6458         that isn't a DEFAULT_ARG.
6459         * error.c (dump_expr): Handle DEFAULT_ARG.
6460
6461         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
6462         * lang-options.h: Add -fhandle-exceptions.
6463
6464         * class.c (build_vtable): vtables are artificial.
6465         (prepare_fresh_vtable): Likewise.
6466
6467 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
6468
6469         * cvt.c (ocp_convert): After converting to the target type, set
6470         LOOKUP_NO_CONVERSION.
6471
6472         * call.c (joust): Warn about potentially confusing promotion rules
6473         with -Wsign-promo.
6474         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
6475
6476 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
6477
6478         * exception.cc: Declare __terminate_func with noreturn attribute.
6479
6480 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
6481
6482         * parse.y: Break out eat_saved_input, handle errors.
6483         (function_try_block): Use compstmt instead of compstmt_or_error.
6484
6485 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
6486
6487         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
6488
6489 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6490
6491         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
6492         existence of cc1plus check whether $(LANGUAGES) contains C++.
6493
6494 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6495
6496         * method.c (do_build_copy_constructor): When copying an anonymous
6497         union member loop around to handle nested anonymous unions.  Use
6498         the offset of the member relative to the outer structure, not the
6499         union.
6500
6501 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
6502
6503         * call.c (resolve_args): New fn.
6504         (build_new_function_call): Use it.
6505         (build_object_call): Likewise.
6506         (build_new_method_call): Likewise.
6507
6508 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
6509
6510         * call.c (build_over_call): tsubst all default parms from templates.
6511
6512 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
6513
6514         * decl.c (struct cp_function): Add static_labelno.
6515         (push_cp_function_context): Save it.
6516         (pop_cp_function_context): Restore it.
6517
6518 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
6519
6520         * typeck.c (build_component_ref_1): Convert from reference.
6521
6522 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6523
6524         * parse.y (current_declspecs, prefix_attributes): Initialize to
6525         NULL_TREE.
6526
6527         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
6528         before we try to force it to be a TREE_LIST.
6529         (decl): Make sure $1.t is non-nil.
6530
6531 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
6532
6533         * pt.c (uses_template_parms): Handle template first-parse codes.
6534
6535         * decl.c (cp_finish_decl): Only warn about user-defined statics.
6536
6537 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
6538
6539         * pt.c (unify): Handle BOOLEAN_TYPE.
6540
6541         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
6542         * pt.c (tsubst): Don't set it.
6543         * call.c (build_over_call): Use uses_template_parms.
6544
6545 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
6546
6547         * method.c (build_overload_nested_name): Use static_labelno
6548         instead of var_labelno.
6549         (build_qualified_name): New fn.
6550         (build_overload_name): Split out from here.
6551         (build_static_name): Use build_qualified_name.
6552         * decl.c (cp_finish_decl): Statics in extern inline functions 
6553         have comdat linkage.
6554         (start_function): Initialize static_labelno.
6555
6556 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6557
6558         * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
6559         before "all member functions in class [] are private"
6560
6561 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
6562
6563         * lex.c (do_scoped_id): convert_from_reference.
6564         * init.c (build_offset_ref): Likewise.
6565
6566 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
6567
6568         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
6569
6570 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
6571
6572         * typeck.c (get_member_function_from_ptrfunc): Promote index
6573         before saving it.
6574
6575 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
6576
6577         * tree.c (layout_basetypes): Move non-virtual destructor warning.
6578         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
6579
6580 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
6581
6582         * decl.c (grokdeclarator): Call add_defarg_fn for the function
6583         type, too.
6584         * lex.c (add_defarg_fn): Adjust.
6585         (do_pending_defargs): Adjust.  Don't skip the first parm.
6586
6587 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
6588
6589         * decl.c (build_enumerator): Global enumerators are also readonly.
6590
6591         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
6592         (build_dynamic_cast): Call it and convert_from_reference.
6593
6594         * lex.c (add_defarg_fn): New fn.
6595         (snarf_defarg): Don't add to defarg_types.
6596         (do_pending_defargs): Lose defarg_types.  All fns we process now
6597         have defargs.
6598         * decl.c (grokfndecl): Call add_defarg_fn.
6599
6600         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
6601         * cp-tree.def: Add DEFAULT_ARG.
6602         * spew.c (yylex): Call snarf_defarg as appropriate.
6603         * parse.y: New tokens DEFARG and DEFARG_MARKER.
6604         (defarg_again, pending_defargs, defarg, defarg1): New rules.
6605         (structsp): Use pending_defargs.
6606         (parms, full_parm): Use defarg.
6607         * lex.c (init_lex): Initialize inline_text_firstobj.
6608         (do_pending_inlines): Never pass the obstack to feed_input.
6609         (process_next_inline): Call end_input instead of restore_pending_input.
6610         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
6611         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
6612         * input.c (end_input): New fn.
6613         (sub_getch): At the end of some fed input, just keep returning EOF
6614         until someone calls end_input.
6615         Remove 'obstack' field from struct input_source.
6616         * decl.c (grokparms): Handle DEFAULT_ARG.
6617         (replace_defarg): New fn.
6618         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
6619
6620 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
6621
6622         * call.c (implicit_conversion): If nothing else works, try binding
6623         an rvalue to a reference.
6624
6625 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
6626
6627         * decl.c (init_decl_processing): fix Jun 30 patch -- move
6628         ifndef for Cygwin32 to include SIGSEGV.
6629
6630 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
6631
6632         * class.c (finish_struct_1): Only complain about pointers without
6633         copy stuff if there are any constructors.
6634
6635         * rtti.c (build_dynamic_cast): Call complete_type on the types.
6636
6637         * decl.c (grokfndecl): If the function we chose doesn't actually
6638         match, die.
6639
6640         * decl2.c (grokclassfn): Don't specify 'const int' for the
6641         artificial destructor parm.
6642
6643         * pt.c (type_unification): If we are called recursively, nothing 
6644         decays.
6645
6646 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
6647
6648         * decl.c (init_decl_processing): Stop trying to catch signals
6649         other than SIGABRT since the Cygwin32 library doesn't support
6650         them correctly yet.  This fixes a situation in which g++ causes
6651         a hang on SIGSEGVs and other such signals in our Win32-hosted
6652         tools.
6653
6654 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
6655
6656         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
6657
6658 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
6659
6660         * typeck2.c (store_init_value): Always return the value if our 
6661         type needs constructing.
6662
6663         * method.c (hack_identifier): Convert class statics from
6664         reference, too.
6665
6666 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
6667
6668         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
6669
6670 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
6671
6672         * typeck.c (c_expand_return): Make sure we clean up temporaries at
6673         the end of return x;
6674
6675 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6676
6677         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
6678
6679 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
6680
6681         * except.c (expand_builtin_throw): Add support
6682         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
6683
6684 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
6685
6686         * repo.c (extract_string): Null-terminate.
6687
6688         * cp-tree.h (TI_SPEC_INFO): New macro.
6689         (CLASSTYPE_TI_SPEC_INFO): New macro.
6690         * pt.c (push_template_decl): Correctly determine # of template parms 
6691         for partial specs.
6692
6693         * call.c (compare_ics): Really fix 'this' conversions.
6694
6695         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
6696         non-template fn.
6697
6698         * pt.c (push_template_decl): Complain about mismatch in # of
6699         template parms between a class template and a member template.
6700
6701 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
6702
6703         * method.c (synthesize_method): You can't call
6704         function_cannot_inline_p after finish_function.
6705         * decl.c (finish_function): Turn on flag_inline_functions and turn
6706         off DECL_INLINE before handing a synthesized method to the
6707         backend.
6708
6709 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
6710
6711         * method.c (synthesize_method): Remove July 30 change to never set
6712         DECL_INLINE if at_eof.
6713
6714 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
6715
6716         * xref.c (GNU_xref_member): Ensure that the node has a
6717         decl_lang_specific part before checking DECL_FRIEND_P.
6718
6719 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
6720
6721         * pt.c (instantiate_class_template): Diagnose non-class types used
6722         as bases.
6723
6724 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
6725
6726         * typeck.c (build_conditional_expr): Use convert_for_initialization
6727         instead of convert_and_check.
6728
6729 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6730
6731         * parse.y (typespec): Don't pedwarn for typeof.
6732
6733 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
6734
6735         * repo.c (finish_repo): Only check changes if we would write a
6736         repo file.
6737
6738         * call.c (compare_ics): Fix handling of 'this' conversions.
6739
6740         * pt.c (do_decl_instantiation): Support static data too.  Rename
6741         from do_function_instantiation.
6742         * cp-tree.h: Adjust.
6743         * parse.y: Adjust.
6744
6745         * repo.c (extract_string): New fn.
6746         (get_base_filename): Use it.
6747         (init_repo): Compare old args with current args.
6748
6749 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
6750
6751         * Makefile.in, Make-lang.in: Protect C-ls with a comment
6752         character, idea from Paul Eggert <eggert@twinsun.com>.
6753
6754 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
6755
6756         * typeck.c (c_expand_return): Be more persistent in looking for
6757         returned temps.
6758
6759         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
6760         pointer to reference.
6761
6762         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
6763
6764 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
6765
6766         * init.c (build_member_call, build_offset_ref):
6767         Use do_scoped_id instead of do_identifier.
6768
6769         * cvt.c (convert): Remove bogosity.
6770
6771 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6772
6773         * cvt.c (build_up_reference): Do checks of ARGTYPE and
6774         TARGET_TYPE before trying to use get_binfo.
6775
6776 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
6777
6778         * cvt.c (build_up_reference): Call get_binfo to get access control.
6779
6780         * decl2.c (import_export_decl): If we don't support weaks, leave
6781         statics undefined.
6782
6783 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
6784
6785         * except.c (expand_builtin_throw): Add support for machines that
6786         cannot access globals after throw's epilogue when
6787         -fno-sjlj-exceptions is used.
6788
6789 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
6790
6791         * parse.y: 'std::' becomes '::'.
6792         * lex.c (real_yylex): Remove 'namespace' warning.
6793         * init.c (build_member_call): Ignore 'std::'.
6794         (build_offset_ref): Likewise.
6795         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
6796         (do_toplevel_using_decl): Ignore 'using std::whatever'.
6797         * decl.c (push_namespace): Just sorry.
6798         (pop_namespace): Nop.
6799         (init_decl_processing): Declare std namespace.
6800
6801 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
6802
6803         * search.c (push_class_decls): A name which ambiguously refers to
6804         several instantiations of the same template just refers to the
6805         template.
6806
6807 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
6808
6809         * decl.c (build_enumerator): fix problem with unsigned long
6810         enumerated values being smashed to ints, causing overflow
6811         when computing next enumerated value. (for enum values around
6812         MAX_VAL).
6813
6814 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
6815
6816         * typeck.c (build_component_ref): Only call mark_used on a decl.
6817
6818 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6819
6820         * typeck.c (build_c_cast): Make the check for a ptr to function
6821         more specific before possible default_conversion call.
6822
6823 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
6824
6825         * except.c (expand_exception_blocks): Simplify and fix and make
6826         sure we don't end a region in a sequence, as expand_end_bindings
6827         doesn't like it.
6828
6829 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
6830
6831         * except.c (init_exception_processing): Mark terminate as not
6832         returning so that the optimizer can optimize better.
6833
6834 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
6835
6836         * cvt.c (convert): Don't do any extra work, if we can avoid it
6837         easily.
6838
6839 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
6840
6841         * *.[chy]: Change cp_convert to ocp_convert, change convert to
6842         cp_convert.  convert is now reserved for the backend, and doesn't
6843         have the semantics a frontend person should ever want.
6844
6845 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
6846
6847         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
6848         Lose -traditional support.
6849
6850 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
6851
6852         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
6853
6854         * parse.y (self_reference): Do it for templates, too.
6855         * class.c (pushclass): Don't overload_template_name; the alias
6856         generated by build_self_reference serves the same purpose.
6857
6858         * tree.c (list_hash): Make static, take more args.
6859         (list_hash_lookup): Likewise.
6860         (list_hash_add): Make static.
6861         (list_hash_canon): Lose.
6862         (hash_tree_cons): Only build a new node if one isn't already in the
6863         hashtable.
6864         (hash_tree_chain): Use hash_tree_cons.
6865         * cp-tree.h: Adjust.
6866         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
6867         of calling lookup_name.
6868
6869 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
6870
6871         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
6872         doesn't refer to the CONST_DECLs.
6873
6874 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
6875
6876         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
6877         is bigger.
6878         (expand_class_desc): Convert the last argument to a sizetype.
6879
6880 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6881
6882         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
6883         __real__): Add reswords.
6884         * hash.h: Regenerate.
6885         * lex.h (rid): Add RID_COMPLEX.
6886         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
6887         * lex.c (init_lex): Add building of RID_COMPLEX.
6888         (real_yylex): General cleanup in line with what c-lex.c also has,
6889         sans the cruft for traditional; add handling of SPEC_IMAG, complex
6890         types, and imaginary numeric constants.
6891         * parse.y (REALPART, IMAGPART): Add tokens.
6892         (unary_expr): Add REALPART and IMAGPART rules.
6893         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
6894         * decl.c (complex_{integer,float,double,long}_type_node): Define
6895         types.
6896         (init_decl_processing): Set up the types.
6897         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
6898         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
6899         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
6900         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
6901         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
6902         COMPLEX_TYPE case.
6903         * method.c (build_overload_name): Add handling of the different
6904         COMPLEX_TYPEs, prefixing them with `J'.
6905         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
6906         as a template parm.
6907         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
6908         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
6909         (mapcar): Handle COMPLEX_CST.
6910         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
6911         (common_type): Add code for complex types.
6912         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
6913         (convert_for_assignment): Likewise.
6914         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
6915
6916 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
6917
6918         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
6919         tsubst_expr, as it might try to do overload resolution.
6920
6921 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
6922
6923         * pt.c (instantiate_class_template): Oops.
6924
6925 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
6926
6927         * cp-tree.def: Add TAG_DEFN.
6928         * pt.c (tsubst_enum): New fn.
6929         (instantiate_class_template): Use it.
6930         (tsubst_expr): Support TAG_DEFN.
6931         (tsubst): Support local enums.
6932         (tsubst_copy): Likewise.
6933         * decl.c (finish_enum): Likewise.
6934         (start_enum): If this is a local enum, switch to permanent_obstack.
6935
6936 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
6937
6938         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
6939         (finish_function): Put the base init code for constructors just
6940         after the parm cleanup insns.
6941         (struct cp_function): Add last_parm_cleanup_insn.
6942         (push_cp_function_context): Likewise.
6943         (pop_cp_function_context): Likewise.
6944         
6945 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
6946
6947         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
6948
6949 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6950
6951         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
6952         for THUNK_FNDECL before we switch to temporary allocation.
6953
6954 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
6955
6956         * call.c (build_new_op): Handle null arg2 for ?:.
6957
6958 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
6959
6960         * except.c (expand_exception_blocks): Ensure that we flow through
6961         the end of the exception region for the exception specification.
6962         Move exception region for the exception specification in, so that
6963         it doesn't protect the parm cleanup.  Remove some obsolete code.
6964         * decl.c (store_parm_decls): Likewise.
6965         (finish_function): Likewise.
6966
6967 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
6968
6969         * init.c (build_new): Fix nothrow handling.
6970
6971 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6972
6973         * init.c (emit_base_init): Don't warn about the initialization
6974         list for an artificial member.
6975
6976 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
6977
6978         * expr.c (do_case): Handle !START case for the error msg.
6979
6980 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
6981
6982         * decl2.c, lang-options.h: New option -Weffc++.
6983         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
6984         to -Weffc++.
6985
6986         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
6987         to MULTIPLE_SYMBOL_SPACES.
6988
6989 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
6990
6991         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
6992
6993         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
6994
6995         * typeck.c (c_expand_return): Don't complain about returning void
6996         to void in an artificial function.
6997         * method.c (make_thunk): Change settings of READONLY/VOLATILE, 
6998         don't set DECL_RESULT, set DECL_ARTIFICIAL.
6999         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC. 
7000
7001 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
7002
7003         * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
7004         exception handling.
7005         * except.c (init_exception_processing): Likewise.
7006         (expand_end_catch_block): Likewise.
7007         (expand_exception_blocks): Likewise.
7008         (expand_throw): Likewise.
7009         * exception.cc (__default_terminate): Likewise.
7010
7011         * init.c (perform_member_init): Use new method of expr level
7012         cleanups, instead of cleanups_this_call and friends.
7013         (emit_base_init): Likewise.
7014         (expand_aggr_vbase_init_1): Likewise.
7015         (expand_vec_init): Likewise.
7016         * decl.c (cp_finish_decl): Likewise.
7017         (expand_static_init): Likewise.
7018         (store_parm_decls): Likewise.
7019         (cplus_expand_expr_stmt): Likewise.
7020         * decl2.c (finish_file): Likewise.
7021         
7022         * Make-lang.in (exception.o): Ok to compile with -O now.
7023
7024         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
7025         we know it will be done later by the backend.
7026
7027         * decl2.c (lang_f_options): Remove support for short temps.
7028         * lang-options.h: Likewise.
7029         
7030 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
7031
7032         * tree.c (varargs_function_p): New fn.
7033         * method.c (emit_thunk): Replace broken generic code with code to
7034         generate a heavyweight thunk function.
7035
7036 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
7037
7038         * pt.c (process_template_parm): pedwarn about floating-point parms.
7039
7040         * decl.c (grokdeclarator): inline no longer implies static.
7041
7042         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
7043
7044 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
7045
7046         * class.c (check_for_override): The signature of an overriding
7047         function is not changed.
7048
7049         * call.c (build_over_call): Move setting of conv into the loop.
7050         Note: this change, along with the related changes of the 18th thru
7051         the 20th of April, fix an infinite loop problem in conversions.
7052
7053 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
7054
7055         * call.c (build_user_type_conversion_1): Really ignore rvalue
7056         conversions when looking for a REFERENCE_TYPE.
7057
7058         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
7059         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
7060         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
7061         (build_unary_op): Likewise.
7062         * call.c (build_over_call): See through a CONVERT_EXPR around the
7063         ADDR_EXPR for on a temporary.
7064         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
7065         the ADDR_EXPR for a local variable.
7066
7067 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
7068
7069         * call.c (build_user_type_conversion_1): If we're trying to
7070         convert to a REFERENCE_TYPE, only consider lvalue conversions.
7071         (build_new_function_call): Print candidates.
7072         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
7073         (reference_binding): Binding a temporary of a reference-related type
7074         is BAD.
7075
7076 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7077
7078         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
7079         * tinfo2.cc (type_info::before): Likewise.
7080
7081 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
7082
7083         * call.c (implicit_conversion): Oops.
7084
7085 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
7086
7087         * call.c (implicit_conversion): Try to find a reference conversion
7088         before binding a const reference to a temporary.
7089
7090 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
7091
7092         * exception.cc (__default_unexpected): Call terminate by default,
7093         so that if the user overrides terminate, the correct function will
7094         be called.
7095         
7096 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
7097
7098         * parse.y (left_curly): Avoid trying to use any fields of
7099         error_mark_node, as there aren't any.
7100
7101 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
7102
7103         * lex.c (do_identifier): Avoid breaking on overloaded methods
7104         as default arguments.
7105
7106 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
7107
7108         * call.c (add_template_candidate): Initialize the variable "dummy".
7109
7110 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
7111
7112         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
7113         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
7114
7115 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7116
7117         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
7118         (debug_binfo): Delete decl, not needed.
7119
7120         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
7121         promotes_to_aggr_type): Delete fns.
7122         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
7123         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
7124         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
7125
7126         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
7127
7128         * friend.c (is_friend_type): Delete fn.
7129         * cp-tree.h (is_friend_type): Delete decl.
7130
7131         * decl.c (original_result_rtx, double_ftype_double,
7132         double_ftype_double_double, int_ftype_int, long_ftype_long,
7133         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
7134         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
7135
7136         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
7137         fwd decls.
7138         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
7139
7140         * decl.c (pushdecl_nonclass_level): #if 0, unused.
7141         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
7142
7143         * lex.c (reinit_lang_specific): #if 0, unused.
7144         * cp-tree.h (reinit_lang_specific): #if 0 decl.
7145
7146         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
7147         * cp-tree.h (revert_static_member_fn): Delete decl.
7148
7149         * class.c (root_lang_context_p): Delete fn.
7150         * cp-tree.h (root_lang_context_p): Delete decl.
7151
7152         * decl.c (set_current_level_tags_transparency): #if 0, unused.
7153         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
7154
7155         * lex.c (set_vardecl_interface_info): Make static.
7156         * cp-tree.h (set_vardecl_interface_info): Delete decl.
7157
7158         * call.c (find_scoped_type): Make static.
7159         * cp-tree.h (find_scoped_type): Delete decl.
7160
7161         * search.c (convert_pointer_to_vbase): Make static.
7162         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
7163
7164         * decl.c (const_ptr_type_node): Likewise.
7165         * cp-tree.h (const_ptr_type_node): Delete decl.
7166
7167         * typeck.c (common_base_type): Make static.
7168         * cp-tree.h (common_base_types): Delete erroneous decl.
7169
7170         * pt.c (classtype_mangled_name): Make static.
7171         * cp-tree.h (classtype_mangled_name): Delete decl.
7172
7173         * lex.c (check_newline): Make static.
7174         * cp-tree.h (check_newline): Delete decl.
7175
7176         * typeck.c (build_x_array_ref): Delete fn, same idea as
7177         grok_array_decl.
7178         * cp-tree.h (build_x_array_ref): Delete decl.
7179
7180         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
7181         copy_lang_decl.
7182         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
7183
7184         * class.c (build_vtable_entry): Make static.
7185         * cp-tree.h (build_vtable_entry): Delete decl.
7186
7187         * class.c (build_vbase_pointer): Make static.
7188         * cp-tree.h (build_vbase_pointer): Delete decl.
7189
7190         * sig.c (build_sptr_ref): Add forward decl and make static.
7191         * cp-tree.h (build_sptr_ref): Delete decl.
7192
7193         * call.c (build_new_method_call): Add forward decl and make static.
7194         * cp-tree.h (build_new_method_call): Delete decl.
7195
7196         * call.c (build_object_call): Make static.
7197         * class.c (check_for_override, complete_type_p, mark_overriders):
7198         Likewise.
7199         * decl.c (cp_function_chain): Likewise.
7200         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
7201         Likewise.
7202         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
7203         Likewise.
7204         * tree.c (build_cplus_array_type_1): Likewise.
7205         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
7206         (comp_target_parms): Likewise.
7207
7208         * init.c (build_builtin_call): Make static.
7209         * cp-tree.h (build_builtin_call): Delete decl.
7210
7211         * typeck.c (binary_op_error): Delete decl.
7212         * cp-tree.h (binary_op_error): Likewise.
7213
7214 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7215
7216         * call.c (build_method_call): Compare against error_mark_node
7217         directly, rather than the ERROR_MARK tree code.
7218         * cvt.c (cp_convert): Likewise.
7219         * decl.c (print_binding_level): Likewise.
7220         (duplicate_decls): Likewise.
7221         (grokdeclarator): Likewise.
7222         (grokdeclarator): Likewise.
7223         * init.c (expand_aggr_init_1): Likewise.
7224         (decl_constant_value): Likewise.
7225         * method.c (build_opfncall): Likewise.
7226         (hack_identifier): Likewise.
7227         * typeck.c (build_modify_expr): Likewise.
7228
7229         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
7230
7231 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7232
7233         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
7234
7235         * pt.c (coerce_template_parms): Add new error message.
7236
7237         * method.c (build_overload_value): Implement name mangling for
7238         floating-point template arguments.
7239
7240         * method.c (build_overload_int, icat, dicat): Fix mangling of template
7241         arguments whose absolute value doesn't fit in a signed word.
7242
7243 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7244
7245         * friend.c: New file; put all of the friend stuff in here.
7246         * init.c: Instead of here.
7247         * Makefile.in (CXX_OBJS): Add friend.o.
7248         (friend.o): Add dependencies.
7249         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
7250
7251 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
7252
7253         * call.c (build_scoped_method_call): Complain if the scope isn't a
7254         base.
7255
7256 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
7257
7258         * parse.y (left_curly): Don't crash on erroneous type.
7259
7260         * init.c (build_delete): Fix type of ref.
7261
7262 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
7263
7264         * search.c (get_vbase_1): Renamed from get_vbase.
7265         (get_vbase): Wrapper, now non-static.
7266         (convert_pointer_to_vbase): Now static.
7267
7268         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
7269         * init.c (build_delete): Pass one.
7270         (build_partial_cleanup_for): Use build_scoped_method_call.
7271         * decl.c (finish_function): Pass a binfo.
7272
7273 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
7274
7275         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
7276
7277         * typeck.c (build_c_cast): Lose other reference to flag.
7278
7279         * call.c (build_field_call): Don't look for [cd]tor_identifier.
7280         * decl2.c (delete_sanity): Remove meaningless use of
7281         LOOKUP_HAS_IN_CHARGE.
7282         * decl.c (finish_function): Use build_scoped_method_call instead
7283         of build_delete for running vbase dtors.
7284         * init.c (build_delete): Call overload resolution code instead of
7285         duplicating it badly.
7286
7287 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
7288
7289         * call.c (build_over_call): Call mark_used before trying to elide
7290         the call.
7291
7292         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
7293
7294 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7295
7296         * typeck.c (build_modify_expr): Always pedwarn for a cast to
7297         non-reference used as an lvalue.
7298
7299 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
7300
7301         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
7302
7303 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
7304
7305         * parse.y (handler): Fix template typo.
7306
7307 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
7308
7309         * error.c (lang_decl_name): New fn.
7310         * tree.c (lang_printable_name): Use it.
7311
7312 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
7313
7314         * g++spec.c: Include config.h so that we can catch bzero #defines
7315         from the config file.
7316
7317 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
7318
7319         * new1.cc: Include a declaration for malloc, to avoid warning, and
7320         avoid lossing on systems that require one (ones that define malloc
7321         in xm.h).
7322
7323 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
7324
7325         * decl2.c (max_tinst_depth): New variable.
7326         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
7327         option.
7328         * pt.c (max_tinst_depth): Variable moved.
7329         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
7330         as legal.
7331
7332 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
7333
7334         * decl.c (xref_basetypes): Allow a base class that depends on
7335         template parms to be incomplete.
7336
7337         * decl2.c (build_expr_from_tree): Support typeid(type).
7338         * rtti.c (get_typeid): Support templates.
7339         (expand_si_desc, expand_class_desc): Fix string length.
7340         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
7341
7342 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
7343
7344         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
7345
7346         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
7347
7348 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
7349
7350         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
7351         smashes together template and non-template decls of the same
7352         signature.
7353
7354 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
7355
7356         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
7357
7358 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7359
7360         * decl.c (duplicate_decls): Next route, pedwarn about different
7361         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
7362
7363 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7364
7365         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
7366         (struct lang_type): Delete has_default_implementation member.
7367         Increase dummy to 21.
7368         * decl.c (start_method): Delete usage.
7369
7370         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
7371         store_after_parms, start_decl_1, auto_function): Add decls.
7372         (get_arglist_len_in_bytes, declare_implicit_exception,
7373         have_exceptions_p, make_type_decl, typedecl_for_tag,
7374         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
7375         build_component_type_expr, cplus_exception_name,
7376         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
7377         * call.c (build_this): Make static.
7378         (is_complete): Likewise.
7379         (implicit_conversion): Likewise.
7380         (reference_binding): Likewise.
7381         (standard_conversion): Likewise.
7382         (strip_top_quals): Likewise.
7383         (non_reference): Likewise.
7384         (build_conv): Likewise.
7385         (user_harshness): Likewise.
7386         (rank_for_ideal): Likewise.
7387         * decl.c (start_decl_1): Delete forward decl.
7388         (push_decl_level): Make static.
7389         (resume_binding_level): Make static.
7390         (namespace_bindings_p): Make static.
7391         (declare_namespace_level): Make static.
7392         (lookup_name_real): Make static.
7393         (duplicate_decls): Make static.  Take register off NEWDECL and
7394         OLDDECL parm decls.
7395         * decl2.c (get_sentry): Make static.
7396         (temp_name_p): Delete fn.
7397         * except.c (auto_function): Delete decl.
7398         * lex.c (handle_{cp,sysv}_pragma): Make static.
7399         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
7400         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
7401         * pt.c (tsubst_expr_values): Make static.
7402         * rtti.c (combine_strings): Delete decl.
7403
7404 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
7405
7406         * pt.c (push_template_decl): Handle getting a typedef.
7407
7408         * call.c (build_new_function_call): Complain about void arg.
7409
7410 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7411
7412         * decl.c (duplicate_decls): Give pedwarn of different exceptions
7413         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
7414
7415 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
7416
7417         * except.c (expand_throw): Don't expand the cleanup tree here,
7418         since we are not going to write the rtl out.  Fixes problem with
7419         -g -O on SPARC.
7420
7421 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
7422
7423         * Make-lang.in: Add $(exeext) as necessary.
7424
7425 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
7426
7427         * parse.y (handler_seq): Must have at least one catch clause.
7428
7429 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
7430
7431         * call.c (add_builtin_candidate): Restore ?: hack.
7432
7433         * decl.c (grok_op_properties): More warnings.
7434
7435 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7436
7437         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
7438         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
7439
7440         * decl.c (duplicate_decls): Scale back to a warning, and only do
7441         'em if -pedantic.
7442
7443 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
7444
7445         * decl.c (duplicate_decls): pedwarn mismatched exception
7446         specifications.
7447
7448 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
7449
7450         * call.c (build_new_method_call): Don't display the invisible
7451         argument for controlling virtual bases.
7452
7453 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
7454
7455         * new: Add nothrow new and delete, bad_alloc and throw specifications
7456         for delete.
7457         * decl.c (init_decl_processing): Add throw specification for delete.
7458         * new.cc (nothrow): Define.
7459         * lex.c (real_yylex): Removing warning that throw and friends are
7460         keywords.
7461         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
7462         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
7463         * Make-lang.in: Add new{1,2}.{cc,o}.
7464
7465 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
7466
7467         * lex.c (cons_up_default_function): Fix return type of synth op=.
7468
7469         * init.c (emit_base_init): Add warnings for uninitialized members
7470         and bases.
7471
7472         * decl.c (xref_basetypes): Add warning for non-polymorphic type
7473         with destructor used as base type.
7474
7475         * decl.c (grok_op_properties): Add warning for op= returning void.
7476         * typeck.c (c_expand_return): Add warning for op= returning anything
7477         other than *this.
7478
7479         * class.c (finish_struct_1): Add warning for class with pointers
7480         but not copy ctor or copy op=.
7481
7482         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
7483         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
7484         (instantiate_template): If -fexternal-templates, add this
7485         instantiation to pending_templates.
7486
7487         * decl2.c (copy_assignment_arg_p): Disable old hack to support
7488         Booch components.
7489
7490 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
7491
7492         * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
7493
7494 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
7495
7496         * call.c (standard_conversion): Handle getting references.  Tack
7497         on RVALUE_CONV here.  Do it for non-class types, too.
7498         (reference_binding): Pass references to standard_conversion.
7499         (implicit_conversion): Likewise.
7500         (add_builtin_candidate): Disable one ?: kludge.
7501         (convert_like): Handle RVALUE_CONVs for non-class types.
7502         (joust): Disable the other ?: kludge.
7503
7504 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7505
7506         * decl.c (init_decl_processing): Add code to build up common
7507         function types beforehand, to avoid creation then removal of
7508         things already in the hash table.
7509
7510 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
7511
7512         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
7513         the arguments.
7514
7515         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
7516         current_template_parms.
7517
7518 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
7519
7520         * search.c (lookup_field): Don't return a function, check want_type.
7521
7522 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7523
7524         * init.c (build_new): Make sure PLACEMENT has a type.
7525
7526 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
7527
7528         * init.c (build_new): Support new (nothrow).
7529
7530 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
7531
7532         * pt.c (instantiate_decl): Also do push_to_top_level before setting
7533         up DECL_INITIAL.
7534
7535         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
7536         * pt.c (tsubst): Defer instantiation of default args.
7537         * call.c (build_over_call): Until here.
7538
7539 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7540
7541         * search.c (lookup_field): Make sure we have an
7542         IDENTIFIER_CLASS_VALUE before we try to return it.
7543
7544 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
7545
7546         * call.c (build_method_call): Delete unused var PARM.
7547         (build_overload_call_real): Likewise.
7548         (build_object_call): Delete unused var P.
7549         (build_new_op): Likewise.
7550         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
7551         var definitions, which are never used.
7552         (shadow_tag): Delete unused var FN.
7553         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
7554         * init.c (build_new): Delete unused var ALLOC_TEMP.
7555         * method.c (hack_identifier): Delete unused var CONTEXT.
7556         (do_build_copy_constructor): Delete unused var NAME.
7557         (synthesize_method): Delete unused var BASE.
7558         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
7559         * rtti.c (build_headof): Delete unused var VPTR.
7560         (get_typeid): Delete unused var T.
7561         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
7562         and ORIG_OP2.
7563         (build_ptrmemfunc): Delete unused vars U and NINDEX.
7564         * typeck2.c (build_functional_cast): Delete unused var BINFO.
7565
7566 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
7567
7568         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
7569         things in a type being defined.
7570         * decl.c (finish_enum): Reverse the values so that they are in
7571         the correct order.
7572
7573         * pt.c (instantiate_class_template): Don't initialize
7574         BINFO_BASETYPES until the vector is filled out.
7575         (unify): Don't abort on conflicting bindings, just fail.
7576         (instantiate_decl): Do push_tinst_level before any tsubsting.
7577
7578         * method.c (build_overload_value): Handle getting a
7579         TEMPLATE_CONST_PARM for a pointer.
7580
7581 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
7582
7583         * init.c (expand_member_init): Don't give 'not a base' error for
7584         templates.
7585
7586         * pt.c (instantiate_decl): Call import_export_decl later.
7587
7588         * pt.c (instantiate_class_template): Return a value.
7589
7590         * parse.y (extension): New rule for __extension__.
7591         (extdef, unary_expr, decl, component_decl): Use it.
7592
7593 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
7594
7595         * class.c (base_binfo): Remove unused base_has_virtual member.
7596         (finish_base_struct): Likewise.
7597         (finish_struct_1): Likewise.
7598
7599 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
7600
7601         * search.c (expand_upcast_fixups): Fix bogus code generation
7602         problem where the generated code uses the wrong index into the
7603         runtime built vtable on the stack.  Old code could clobber random
7604         stack values.
7605
7606 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
7607
7608         * init.c (perform_member_init): Make sure the partial EH cleanups
7609         live on the function_obstack.
7610
7611 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
7612
7613         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
7614         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
7615
7616 Tue Dec 24 10:24:03 1996  Jeffrey A Law  (law@cygnus.com)
7617
7618         * decl.c (grokvardecl): Avoid ANSI style initialization.
7619
7620 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
7621
7622         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
7623
7624 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
7625
7626         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
7627
7628 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7629
7630         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
7631         arguments we compare against.  Start the count of I at 1, not 0,
7632         since argv[0] is still the command.
7633
7634 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
7635
7636         * lang-specs.h: Accept .cp as an C++ extension.
7637
7638 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7639
7640         * cp-tree.h (ptr_reasonably_similar): Add decl.
7641
7642 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7643
7644         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
7645         pointer.  New local SPECBITS with the parm's value.
7646         (grokdeclarator): Pass &specbits down.
7647
7648         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
7649         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
7650
7651         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
7652         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
7653
7654         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
7655         not an error_mark_node.
7656
7657 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
7658
7659         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
7660         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
7661         
7662 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
7663
7664         * decl.c (grokdeclarator): When giving an anonymous struct a name,
7665         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
7666         not affected).
7667
7668         * typeck2.c (build_m_component_ref): If component is a pointer
7669         to data member, resolve the OFFSET_REF now.
7670
7671         * call.c (convert_like): Don't go into infinite recursion.
7672
7673         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
7674
7675         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
7676         * tree.c (layout_basetypes): And on the vbase ptr.
7677
7678 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
7679
7680         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
7681         CHAR_TYPE_SIZE so bool is always the same size as another type.
7682
7683         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
7684
7685 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
7686
7687         * decl2.c (grok_x_components): Remove synthesized methods from
7688         TYPE_METHODS of an anonymous union, complain about member
7689         functions.
7690         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
7691         anonymous unions.
7692         (finish_function): Just clear the DECL_RTL of our arguments.
7693
7694 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
7695
7696         * decl2.c (finish_file): Emit DWARF debugging info for static data
7697         members.
7698
7699         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
7700
7701 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
7702
7703         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
7704         IDENTIFIER_NODE.
7705
7706 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
7707
7708         * Make-lang.in (g++-cross$(exeext)): Fix typo.
7709
7710 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7711
7712         Make the g++ driver now be a standalone program, rather than one
7713         that tries to run the gcc driver after munging up the options.
7714         * Make-lang.in (g++.c, g++spec.o): New rules.
7715         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
7716         added.
7717         (g++$(exeext)): New rule, based on xgcc rule.
7718         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
7719         * g++spec.c: New file.
7720         * g++.c: Removed file.
7721
7722 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
7723
7724         * cvt.c (build_up_reference): Arrange for any temporary values
7725         that have been keep in registers until now to be put into memory.
7726
7727 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7728
7729         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
7730         that make -j3 bootstrap works better.
7731
7732 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
7733
7734         * decl.c (pushtag): Do pushdecl for anon tags.
7735
7736 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
7737
7738         * typeck.c (c_expand_return): Fix logic.
7739         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
7740
7741 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
7742
7743         * g++.c (main): Make sure arglist has a final NULL entry.  Add
7744         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
7745         stdin/stdout of the invoked program are redirected to
7746         nowheresville.
7747
7748 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
7749
7750         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
7751
7752 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
7753
7754         * init.c (resolve_offset_ref): Handle obj.vfn better.
7755         * typeck.c (build_component_ref): Set TREE_TYPE on result from
7756         build_vfn_ref.
7757
7758 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
7759
7760         * typeck.c (convert_for_assignment): Also handle anachronistic
7761         implicit conversions from (::*)() to cv void*.
7762         * cvt.c (cp_convert_to_pointer): Likewise.
7763
7764 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
7765
7766         * lex.c (handle_cp_pragma): Fix bogus warning.
7767
7768 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
7769
7770         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
7771         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
7772
7773 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
7774
7775         * class.c (finish_struct_1): Support DWARF2_DEBUG.
7776         * search.c (dfs_debug_mark): Likewise.
7777         * decl2.c (finish_vtable_vardecl): Likewise.
7778         * decl.c (pushtag, finish_enum): Likewise.
7779         * lex.c (check_newline): Use debug_* instead of calling *out
7780         functions directly.
7781
7782 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7783
7784         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
7785         on some picky hosts.
7786
7787 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
7788
7789         * class.c (finish_struct_1): A class has a non-trivial copy
7790         constructor if it has virtual functions.
7791
7792         * cvt.c (cp_convert): Always call a constructor.
7793
7794         * call.c (reference_binding): Still tack on a REF_BIND
7795         for bad conversions.
7796         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
7797
7798         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
7799         (c_expand_return): Likewise.
7800         * typeck2.c (digest_init): Likewise for { }.
7801         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
7802         * cvt.c (cp_convert): Handle failure better.
7803
7804 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7805
7806         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
7807         of GCC be path-relative. 
7808
7809 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
7810
7811         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
7812         it does need choose-temp.o and pexecute.o.
7813
7814 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7815
7816         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
7817         that we still use it.
7818         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
7819
7820 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
7821
7822         * init.c (expand_default_init): Avoid calling constructors to 
7823         initialize reference temps.
7824
7825         * cvt.c (convert_to_reference): Fix.
7826
7827 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
7828
7829         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
7830         (convert_to_reference): Likewise.
7831         * typeck.c (convert_for_initialization): Likewise.
7832         * init.c (expand_default_init): Likewise.
7833         (expand_aggr_init_1): Likewise.
7834         * cp-tree.h (CONV_NONCONVERTING): Lose.
7835         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
7836         * *.c: Adjust.
7837         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
7838
7839 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
7840
7841         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
7842
7843 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
7844
7845         * init.c (expand_aggr_init_1): Don't crash on non-constructor
7846         TARGET_EXPR.
7847
7848 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
7849
7850         * g++.c: Include gansidecl.h.
7851         (VPROTO, PVPROTO, VA_START): Delete.
7852         (choose_temp_base_try, choose_temp_base, perror_exec,
7853         run_dos) [__MSDOS__]: Delete fns.
7854         (pfatal_with_name): Delete fn.
7855         (temp_filename): Declare like in gcc.c.
7856         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
7857         (error_count, signal_count): Define.
7858         (error): Delete both definitions.
7859         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
7860         (pfatal_pexecute): Add fn from gcc.c.
7861         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
7862         code to use the pexecute stuff also used by gcc.c.
7863         (MIN_FATAL_STATUS): Define.
7864         * Make-lang.in (g++): Add dependency on and linking with
7865         choose-temp.o and pexecute.o.
7866
7867         * cp-tree.h: Include gansidecl.h.
7868         (STDIO_PROTO): Delete #undef/#define.
7869         * cvt.c (NULL): Delete #undef/#define.
7870         * expr.c (NULL): Likewise.
7871         * init.c (NULL): Likewise.
7872         * rtti.c (NULL): Likewise.
7873         * xref.c (NULL): Likewise.
7874
7875         * cp-tree.h (build_user_type_conversion): Add prototype.
7876         * call.c (build_user_type_conversion): Delete prototype.  Correct
7877         decl of FLAGS arg to be an int.
7878         * cvt.c (build_user_type_conversion): Likewise.
7879
7880 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
7881
7882         * cp-tree.def: Add TRY_BLOCK and HANDLER.
7883         * except.c (expand_start_catch_block): Support templates.
7884         * parse.y (try_block, handler_seq): Likewise.
7885         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
7886
7887 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
7888
7889         * pt.c (current_template_args): New fn.
7890         (push_template_decl): Use it.
7891         * decl.c (grokdeclarator): Use it.
7892
7893         * decl2.c (build_expr_from_tree): Dereference ref vars.
7894
7895         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
7896         the decl-specifier-seq.
7897
7898         * decl.c (grok_op_properties): Don't force the type of a conversion
7899         op to be complete.  Don't warn about converting to the same type
7900         for template instantiations.
7901
7902         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
7903         methods.
7904
7905 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
7906
7907         * typeck.c (get_delta_difference): Remove previous bogusness.
7908         Don't give errors if force is set.
7909
7910 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
7911
7912         * decl2.c (finish_file): Don't emit debug info.
7913         * decl.c (pushdecl): Lose obsolete code.
7914         (grokdeclarator): Still do the long long thing after complaining.
7915         * search.c (note_debug_info_needed): Don't do anything if we're in a 
7916         template.
7917         * method.c (synthesize_method): For non-local classes,
7918         push_to_top_level first.
7919
7920 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
7921
7922         * typeck.c (get_delta_difference): Add no_error parameter.
7923         (build_ptrmemfunc): Call get_delta_difference with no_error set;
7924         we don't want error messages when converting unrelated
7925         pointer-to-member functions.
7926
7927 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
7928
7929         * error.c (dump_expr): Improve the wording on error messages that
7930         involve pointer to member functions.
7931
7932 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
7933
7934         * cvt.c (cp_convert_to_pointer): Move code for conversions from
7935         (::*)() to void* or (*)() up a bit, so that we can convert from
7936         METHOD_TYPEs as well.
7937
7938 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
7939
7940         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
7941         There are no 'member' types.
7942         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
7943         (build_x_typeid): Handle errors.
7944
7945 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
7946
7947         * typeck.c (convert_for_assignment): Handle anachronistic implicit
7948         conversions from (::*)() to void* or (*)().
7949         * cvt.c (cp_convert_to_pointer): Likewise.
7950         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
7951         conversions from here.
7952         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
7953         * lang-options.h: Likewise.
7954         * decl2.c (warn_pmf2ptr): Define.
7955         * cp-tree.h: Declare it.
7956         * typeck2.c (digest_init): Allow pmfs down into
7957         convert_for_initialization.
7958
7959 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
7960
7961         * typeck.c (c_expand_return): Fix for returning overloaded fn.
7962
7963 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
7964
7965         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
7966         * decl.c (grok_reference_init): Pass DIRECT_BIND.
7967         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
7968         DIRECT_BIND.
7969         * call.c (convert_like): Don't pass INDIRECT_BIND.
7970         * typeck.c (convert_arguments): Likewise.
7971         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
7972
7973 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
7974
7975         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
7976         similar code in build_up_ref.
7977         * cvt.c (build_up_reference): Drastically simplify.
7978
7979 Mon Oct 28 12:45:05 1996  Jeffrey A Law  (law@cygnus.com)
7980
7981         * typeck.c (signed_or_unsigned_type): If the given type already
7982         as the correct signedness, then just return it.
7983
7984         * typeck.c ({un,}signed_type): If can't do anything, call
7985         signed_or_unsigned_type.
7986
7987 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
7988
7989         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
7990         current_class_type is NULL.
7991
7992 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
7993
7994         * class.c (finish_struct_1): Avoid empty structs by adding a field
7995         so layout_type gets the mode right.
7996
7997         * typeck.c (c_expand_return): Drastically simplify.
7998
7999 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
8000
8001         * typeck.c (decay_conversion): Handle overloaded methods.
8002
8003 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
8004
8005         * call.c (build_over_call): A TARGET_EXPR has side-effects.
8006
8007 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
8008
8009         * cvt.c (convert_to_pointer_force): Add code to support pointer to
8010         member function to pointer to function conversions.
8011         * init.c (resolve_offset_ref): Add code to allow faked up objects,
8012         ignoring them if they are not used, and giving an error, if they
8013         are needed.
8014         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
8015         code, and so that we can give an error, if we needed an object,
8016         and one was not provided.
8017         (build_c_cast): Don't call default_conversion when we want to
8018         convert to pointer to function from a METHOD_TYPE.
8019
8020 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
8021
8022         * Make-lang.in (cplib2.ready): Fix logic.
8023
8024         * decl.c (shadow_tag): Only complain about non-artificial function
8025         members.
8026
8027         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
8028
8029 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
8030
8031         * expr.c (cplus_expand_expr): Pre-tweak call_target like
8032         expand_inline_function would.
8033
8034         * pt.c (mark_decl_instantiated): If extern_p, call
8035         mark_inline_for_output.
8036
8037 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
8038
8039         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
8040         pmd conversions.
8041
8042         * typeck.c (get_delta_difference): Fix wording, as we can be used
8043         for pointer to data members.
8044
8045 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
8046
8047         * pt.c (tsubst): If the function decl isn't a member of this
8048         template, return a copy of the decl (including copying the
8049         lang-specific part) so we don't hose ourselves later.
8050
8051 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
8052
8053         * class.c (finish_struct): Remove DWARF-specific tag handling.
8054         * decl.c (pushtag): Likewise.
8055         (finish_function): Always clear DECL_ARGUMENTS on function decls with
8056         no saved RTX.
8057         * decl2.c (finish_file): Emit DWARF debugging info for static data
8058         members.
8059
8060 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
8061
8062         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
8063         isn't the same as the new one before we whack it.
8064
8065 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
8066
8067         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
8068         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
8069         warn_traditional and warn_strict_prototypes; remove ancient
8070         'overload' code; remove references to flag_traditional.
8071
8072 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
8073
8074         * input.c (sub_getch): Handle 8-bit characters in string literals.
8075
8076 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
8077
8078         * tree.c (mapcar): Handle CONSTRUCTORs.
8079         (copy_to_permanent): Handle expression_obstack properly.
8080
8081         * Make-lang.in (cplib2.txt): Also depend on the headers.
8082
8083         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
8084         INT_TYPE_SIZE.
8085         (expand_class_desc): Use USItype for offset field.
8086         * tinfo.h (struct __class_type_info): Likewise.
8087
8088         * method.c (build_overload_int): TYPE_PRECISION should be applied
8089         to types.
8090
8091 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
8092
8093         * call.c (build_new_op): A COND_EXPR involving void must be a
8094         builtin.
8095
8096 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
8097
8098         * typeck.c (build_x_component_ref): New fn.
8099         (build_object_ref): Use it.
8100         * parse.y (primary): Use it.
8101         * decl2.c (build_expr_from_tree): Use it.
8102         * cp-tree.h: Declare it.
8103
8104         * decl.c (start_decl): variable-sized arrays cannot be initialized.
8105         * error.c (dump_type_suffix): Handle variable arrays.
8106
8107 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8108
8109         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
8110
8111 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
8112
8113         * decl.c (lookup_name_real): Don't try to look up anything in a
8114         TYPENAME_TYPE.
8115
8116         * tinfo2.cc (__throw_type_match_rtti): Oops.
8117
8118 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8119
8120         * Make-lang.in (exception.o): Use -fno-PIC for now.
8121
8122 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
8123
8124         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
8125         calling them.
8126         (get_tinfo_fn_dynamic): Extracted from build_typeid.
8127         * tinfo2.cc (__dynamic_cast): Adjust.
8128         
8129         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
8130         (build_x_typeid): Likewise.
8131
8132         * parse.y: Call build_x_typeid instead of build_typeid.
8133         * cp-tree.def: Add TYPEID_EXPR.
8134         * pt.c (tsubst_copy): Handle typeid.
8135         * decl2.c (build_expr_from_tree): Likewise.
8136         * rtti.c (build_x_typeid): Throw bad_typeid from here.
8137         (build_typeid): Not here.
8138         * cp-tree.h: Declare build_x_typeid.
8139
8140 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
8141
8142         * call.c (convert_like): Pull out constant values.
8143
8144         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
8145
8146 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
8147
8148         * decl.c (init_decl_processing): Create short int types before
8149         creating size_t in case a machine description needs to use
8150         unsigned short for size_t.
8151
8152 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
8153
8154         * Make-lang.in (exception.o): Turn off pic.
8155
8156         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
8157         type, multi-level ptr conversions.
8158
8159         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
8160         (throw_bad_cast): Use it.
8161         (throw_bad_typeid): New fn.
8162         (build_typeid): Throw bad_typeid as needed.
8163         Use build_call.
8164         (synthesize_tinfo_fn): Handle functions and arrays before checking
8165         for cv-quals.
8166
8167         * Remove .h from standard C++ headers, add new.h, move into inc
8168         subdirectory.
8169
8170         * exception*: Remove pointer from object, constructors.  Add
8171         default exception::what that uses type_info::name.  Add
8172         __throw_bad_typeid.
8173
8174         * init.c (build_new): Don't add a cookie to new (void *) T[2].
8175
8176 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
8177
8178         * Make-lang.in: Building C++ code depends on cc1plus.
8179
8180 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8181
8182         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
8183         a HOST_WIDE_INT, not a tree.
8184
8185 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
8186
8187         * exception.cc: Don't include <stdlib.h>.
8188
8189         * Make-lang.in (c++.clean): Remove cplib2.*.
8190
8191 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
8192
8193         * parse.y (component_decl_1, component_costructor_declarator case):
8194         Pass attributes/prefix_attributes in tree list.
8195
8196 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
8197
8198         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
8199
8200 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
8201
8202         * lex.c (do_identifier): Don't do deferred lookup in a template
8203         header.
8204
8205         * typeck2.c (store_init_value): Oops.
8206
8207         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}: 
8208         New files for C++ lang-support library.
8209         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
8210         (CXX_LIB2FUNCS): Define.
8211         And rules for building the C++ lang-support code.
8212         * config-lang.in (headers): Define.
8213         (lib2funcs): Define.
8214
8215 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
8216
8217         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
8218         digest_init.
8219         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
8220         * typeck2.c (store_init_value): Check for initializing pmf with { }
8221         here.
8222         (process_init_constructor): Not here.
8223
8224 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
8225
8226         * pt.c (begin_template_parm_list): Increment
8227         processing_template_decl here.
8228         (end_template_parm_list): Not here.
8229         (process_template_parm): No need to add 1 to it now.
8230         * *.c: Use processing_template_decl instead of current_template_parms
8231         to check for being in a template.
8232
8233         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
8234         (tsubst_copy): Handle CONSTRUCTOR.
8235         (instantiate_decl): Set up context properly for variables.
8236         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
8237         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
8238
8239 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8240
8241         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
8242
8243 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
8244
8245         * method.c (make_thunk): Call comdat_linkage before setting the
8246         TREE_CODE.
8247
8248         * decl2.c (comdat_linkage): Use make_decl_one_only.
8249         (import_export_decl): Likewise.
8250         * decl.c (init_decl_processing): Check supports_one_only instead of
8251         SUPPORTS_WEAK.
8252
8253 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
8254
8255         * decl2.c (grokfield): Tighten checking for access decls.
8256
8257         * decl.c (make_typename_type): Resolve references to
8258         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
8259         (lookup_name_real): Types that depend on a template parameter get
8260         an implicit 'typename' unless they're in the current scope.
8261         (start_decl_1): We don't care about incomplete types that depend
8262         on a template parm.
8263         (grokdeclarator): Resolve 'typename's in the type specifier that
8264         refer to members of the current scope.
8265
8266         * call.c (build_over_call): Remove 'inline called before
8267         definition' diagnostic.
8268         (build_method_call): Likewise.
8269         * decl.c (duplicate_decls): Downgrade 'used before declared
8270         inline' to a warning, only with -Winline.
8271
8272 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
8273
8274         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
8275
8276 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
8277
8278         * call.c (build_method_call): When calling a signature
8279         default implementation, as in other cases, let instance_ptr simply
8280         be instance.
8281
8282 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
8283
8284         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
8285
8286 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
8287
8288         * except.c (expand_start_catch_block): Add a pushlevel so that -g
8289         works on hppa and SPARC.
8290
8291 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8292
8293         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
8294
8295 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
8296
8297         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
8298         before testing whether it's a signature.
8299
8300 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
8301
8302         * call.c (build_new_method_call): Don't complain about signature
8303         pointers and references not being an aggr type.
8304         (build_this): If a signature pointer or reference was passed in,
8305         just return it.
8306         (build_new_method_call): If instance is a signature pointer, set
8307         basetype to the signature type of instance.
8308         * sig.c (build_signature_method_call): Deleted basetype and
8309         instance parameters, they can be found as the DECL_CONTEXT of
8310         function and as the first argument passed in.
8311         * cp-tree.h: Changed declaration of build_signature_method_call.
8312         * call.c (build_method_call): Deleted first two arguments in call
8313         of build_signature_method_call.
8314         (build_over_call): Added call to build_signature_method_call.
8315
8316 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
8317
8318         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
8319         target_expr.
8320
8321 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8322
8323         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
8324
8325 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
8326
8327         * except.c (expand_start_try_stmts): Move to except.c in the backend.
8328         (expand_end_try_stmts): Remove.
8329
8330         * init.c (perform_member_init): Use add_partial_entry () instead
8331         of directly manipulating lists.
8332         (emit_base_init): Ditto.
8333
8334 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
8335
8336         * except.c (expand_exception_blocks): Always make sure USE and
8337         CLOBBER insns that came at the end still do, the backend relies
8338         upon this.
8339
8340 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
8341
8342         * call.c (build_over_call): We can only use a TARGET_EXPR of the
8343         right type.
8344
8345 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
8346
8347         * cvt.c (convert_to_reference): Revert last change, don't complain
8348         about temp without target decl.
8349
8350 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
8351
8352         * decl.c (grokdeclarator): Don't core dump when void() is given.
8353
8354 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
8355
8356         * decl.c (copy_args_p): Don't crash.
8357
8358 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
8359
8360         * pt.c (tsubst): And support template args inside the exception
8361         specification.
8362
8363         * pt.c (tsubst): Add support for exception specifications in
8364         template functions.
8365
8366 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
8367
8368         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
8369         fields now.
8370         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
8371         (start_function): Likewise.
8372         (start_method): Likewise.
8373         (grokfield): Likewise.
8374         (make_call_declarator): Add throw spec parameter.
8375         (set_quals_and_spec): Add routine.
8376         * lex.c (set_quals_and_spec): Likewise.
8377         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
8378         * decl.c (shadow_tag): Eliminate the throw spec parameter to
8379         grokdeclarator.
8380         (groktypename): Likewise.
8381         (start_decl): Eliminate the throw spec parameter.  Eliminate the
8382         throw spec parameter to grokdeclarator.  Eliminate the throw spec
8383         field in DECL_STMT.
8384         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
8385         (grokfndecl): Remove useless set of raises.
8386         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
8387         the throw spec parameter to start_decl.  Pull the throw spec out
8388         of the call declarator.
8389         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
8390         (start_function): Eliminate the throw spec parameter.  Eliminate
8391         the throw spec parameter to grokdeclarator.
8392         (start_method): Likewise.
8393         * decl2.c (grokfield): Likewise.
8394         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
8395         (grokoptypename): Likewise.
8396         (finish_file): Eliminate the throw spec parameter to
8397         start_function.  Add throw spec to make_call_declarator.
8398         * except.c (init_exception_processing): Add throw spec to
8399         make_call_declarator.  Eliminate the throw spec parameter to
8400         start_decl.
8401         (expand_start_catch_block): Eliminate the throw spec parameter to
8402         grokdeclarator.
8403         (expand_builtin_throw): Add throw spec to make_call_declarator.
8404         Eliminate the throw spec parameter to start_function.
8405         (start_anon_func): Likewise.
8406         * lex.c (make_call_declarator): Add throw spec parameter.
8407         (set_quals_and_spec): New routine.
8408         (cons_up_default_function): Add throw spec to make_call_declarator.
8409         Eliminate the throw spec parameter to grokfield.
8410         * method.c (synthesize_method): Eliminate the throw spec parameter
8411         to start_function.
8412         * pt.c (process_template_parm): Eliminate the throw spec parameter
8413         to grokdeclarator.
8414         (tsubst): Add throw spec to make_call_declarator.
8415         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
8416         (do_function_instantiation): Eliminate the throw spec parameter to
8417         grokdeclarator.  Eliminate the throw spec parameter to
8418         start_function.
8419         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
8420         to start_function.
8421         * parse.y (datadef): Remove non-winning optimization.
8422         (decl): Likewise.
8423         (fndef): Remove ambiguous error productions uncovered by grammer
8424         fixing.
8425         (constructor_declarator): Add exception_specification_opt here.
8426         (component_constructor_declarator): Likewise.
8427         (direct_after_type_declarator): Likewise.
8428         (complex_direct_notype_declarator): Likewise.
8429         (direct_abstract_declarator): Likewise.
8430         (fn.def1): Remove exception_specification_opt.
8431         (fn.def2): Likewise.
8432         (condition): Likewise.
8433         (initdcl0): Likewise.
8434         (initdcl): Likewise.
8435         (notype_initdcl0): Likewise.
8436         (nomods_initdcl0): Likewise.
8437         (component_decl_1): Likewise.
8438         (component_declarator): Likewise.
8439         (after_type_component_declarator0): Likewise.
8440         (after_type_component_declarator): Likewise.
8441         (notype_component_declarator): Likewise.
8442
8443 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
8444
8445         * call.c (build_over_call): Also use an INIT_EXPR when
8446         initializing anything from an rvalue.
8447
8448         * call.c (build_over_call): Call stabilize_reference when building
8449         an INIT_EXPR instead of calling the copy ctor.
8450
8451         * call.c (joust): Extend the previous change to all comparisons.
8452
8453         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and 
8454         NO_LINKAGE_HEURISTICS.
8455
8456         * decl2.c (finish_file): Emit any statics that weren't already.
8457
8458         * typeck.c (build_static_cast): Implement.
8459         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
8460         * decl.c (grokparms): Use can_convert_arg instead of
8461         implicit_conversion directly.
8462         (copy_args_p): New fn.
8463         * cvt.c (convert_to_reference): Don't complain about temp with
8464         static_cast.
8465         (build_up_reference): Handle TARGET_EXPRs.
8466         * call.c (build_over_call): Elide unnecessary temps.
8467         (can_convert*): Use new overloading code.
8468
8469 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
8470
8471         * call.c: Move TYPE_PTR*_MACROS ...
8472         * cp-tree.h: To here.
8473         * typeck.c (build_reinterpret_cast): Implement.
8474
8475         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
8476         ptr_complete_ob.
8477         (joust): If we're comparing a function to a builtin and the worst
8478         conversion for the builtin is worse than the worst conversion for the
8479         function, take the function.
8480
8481         * typeck.c (build_const_cast): Implement.
8482         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
8483         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
8484
8485 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
8486
8487         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
8488         too early. Make sure we explode if exprtype turns out to be a
8489         NULL_TREE when it shouldn't be.
8490
8491 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
8492
8493         * cp-tree.h: New routine make_call_declarator.
8494         * lex.c (make_call_declarator): Define it.
8495         * except.c (init_exception_processing): Use it.
8496         (expand_builtin_throw): Likewise.
8497         (start_anon_func): Likewise.
8498         * decl2.c (finish_file): Likewise.
8499         * lex.c (cons_up_default_function): Likewise.
8500         * parse.y: Likewise.
8501         * pt.c (tsubst): Likewise.
8502         
8503 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
8504
8505         * decl2.c (groktypefield): Remove unused code.
8506
8507 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
8508
8509         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
8510         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
8511         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
8512         nonempty_cv_qualifiers.
8513         * hash.h: Rebuild.
8514         
8515         * lex.c (make_pointer_declarator): Change type_quals into
8516         cv_qualifiers.
8517         (make_reference_declarator): Likewise.
8518         
8519 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
8520
8521         * decl.c (start_function): Only check interface_* for templates
8522         with flag_alt_external_templates.
8523
8524         * call.c (build_new_op): Check for comparison of different enum types.
8525         (build_over_call): Fix arg # output.
8526
8527         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
8528
8529 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
8530
8531         * call.c (build_new_op): Check for erroneous args.
8532
8533         * call.c (build_new_method_call): Add missing args to cp_error.
8534
8535         * tree.c (error_type): Dont print reference-to-array.
8536
8537         * typeck.c (convert_for_assignment): Don't say contravariance for
8538         removing const.
8539
8540 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
8541
8542         * call.c (build_over_call): Diagnose bad convs for `this'.
8543
8544         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
8545         on _ctor_arg.
8546
8547         * call.c (convert_like): Handle bad convs.
8548         (build_over_call): Handle bad convs better.
8549
8550         * decl2.c: -fansi-overloading is now the default.
8551
8552         * call.c (build_new_method_call): Check for erroneous args.
8553
8554         * pt.c (instantiate_class_template): Propagate
8555         TYPE_USES_MULTIPLE_INHERITANCE.
8556
8557 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
8558
8559         * call.c (enforce_access): Add static to routine.
8560
8561 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
8562
8563         * call.c (build_user_type_conversion_1): Fix bad handling.
8564         (compare_ics): Likewise.
8565
8566 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
8567
8568         * call.c (standard_conversion): Oops.
8569
8570 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
8571
8572         * g++.c: Update test for win32 (&& ! cygwin32).
8573
8574 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
8575
8576         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
8577         (ptr_reasonably_similar): New fn.
8578         * call.c (BAD_RANK): New rank.
8579         (ICS_BAD_FLAG): New macro.
8580         (standard_conversion): Handle almost-right pointer conversions.
8581         (reference_binding): Handle bad rvalue bindings.
8582         (add_*_candidate): Stuff.
8583         (build_over_call): Pass bad conversions to convert_for_initialization.
8584         (compare_ics): Handle bad convs.
8585         (joust): Likewise.
8586
8587 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
8588
8589         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
8590         integer_type_node when computing pointer offsets.
8591
8592 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
8593
8594         * tree.c (lvalue_type): New fn.
8595         (error_type): New fn.
8596         * call.c (op_error): Use error_type.
8597         (add_conv_candidate): Use lvalue_type.
8598         (add_builtin_candidates): Likewise.
8599         * error.c (args_as_string): Use error_type.
8600
8601 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
8602
8603         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
8604         (tsubst): Not here.
8605
8606         * decl.c (init_decl_processing): With -ansi, __null's type is the
8607         signed integral type with the same number of bits as a pointer.
8608         Introduce a new variable null_node for it.
8609         * cp-tree.h: Adjust.
8610         * call.c (null_ptr_cst_p): Adjust.
8611
8612 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
8613
8614         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
8615         optimize.
8616
8617 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
8618
8619         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
8620         fns of classes without virtual functions.
8621
8622         * call.c (add_function_candidate): Handle `this' specially.
8623         (compare_ics): Likewise.
8624
8625 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
8626
8627         * typeck.c (build_conditional_expr): Fix handling of __null.
8628
8629         * decl2.c (comdat_linkage): New fn.
8630         (import_export_vtable): Use it.
8631         (import_export_decl): Use it.
8632         * method.c (make_thunk): Use it.
8633
8634 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
8635
8636         * pt.c (end_template_decl): If we don't actually have parms, return.
8637         * parse.y (template_header): Accept 'template <>'.
8638
8639         * errfn.c: Allow 5 args.
8640
8641 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
8642
8643         * tree.c (make_temp_vec): New fn.
8644         * pt.c (push_template_decl): Handle partial specs.
8645         (instantiate_class_template): Likewise.
8646         (more_specialized): Use get_bindings.
8647         (more_specialized_class): New fn.
8648         (get_class_bindings): New fn.
8649         (most_specialized_class): New fn.
8650         (do_function_instantiation): List candidates for ambiguous case.
8651         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
8652         (shadow_tag): Call push_template_decl for partial specializations.
8653         * parse.y: Likewise.
8654         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
8655         DECL_TEMPLATE_MEMBERS.
8656         * call.c (print_z_candidates): Reduce duplication.
8657
8658 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8659
8660         * decl2.c (lang_decode_option): Allow -fansi-overloading.
8661
8662 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
8663
8664         * pt.c (get_bindings): New fn.
8665         (most_specialized): Likewise.
8666         (do_function_instantiation): Use them.
8667         (add_maybe_template): New fn.
8668         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
8669         * call.c (build_new_op): Handle guiding decls.
8670         (build_new_function_call): Likewise.
8671         * decl2.c (finish_file): Likewise.
8672
8673         * decl2.c (mark_used): Do synthesis here.
8674         * call.c (build_method_call): Not here.
8675         (build_over_call): Or here.
8676         * typeck.c (build_function_call_real): Or here.
8677         * tree.c (bot_manip): Call mark_used on functions used in default
8678         args.
8679
8680 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
8681
8682         * decl2.c (import_export_vtable): Delete code that disabled vtable
8683         heuristic on systems with ASM_OUTPUT_EXTERNAL.
8684
8685 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
8686
8687         * typeck.c (build_x_function_call): Handle static call context
8688         better.
8689
8690         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
8691         the function, not its outer block.
8692
8693         * call.c (build_field_call): Pass fields on to build_opfncall
8694         regardless of TYPE_OVERLOADS_CALL_EXPR.
8695         (build_method_call): Pass on to build_new_method_call sooner.
8696
8697         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
8698         gives us.
8699         * class.c (instantiate_type): Don't put a POINTER_TYPE to
8700         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
8701         modifying it.
8702
8703 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
8704
8705         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
8706         (add_builtin_candidate): Don't take enums for ++.
8707         (build_new_method_call): Handle non-aggregates and field calls.
8708         Move new overloading code from...
8709         * cvt.c: Here.
8710
8711         * decl.c (grokparms): Don't check default args in templates.
8712
8713 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
8714
8715         * cvt.c (build_new_op): Fix args to build_unary_op.
8716         (add_builtin_candidates): Don't call type_promotes_to on float.
8717
8718         * decl.c (grokparms): Check the type of the default arg.
8719
8720         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
8721         returning NULL_TREE.
8722
8723         * typeck.c (build_x_binary_op): Avoid doing extra work.
8724         (build_x_unary_op): Likewise.
8725         (build_x_conditional_expr): Likewise.
8726         * cvt.c (build_over_call): Return.
8727         (add_builtin_candidate): Fix MEMBER_REF.
8728         (build_new_op): Likewise.
8729
8730 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
8731
8732         * method.c (build_overload_name): Put bug fix into code but leave
8733         disabled for now so we can be bug compatible with older releases
8734         that do repeats incorrectly.  In the future, we can enable it.
8735
8736 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
8737
8738         * cvt.c (convert_like): Don't call build_cplus_new twice.
8739
8740         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
8741         Control new overloading code with -fansi-overloading.
8742
8743 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
8744
8745         * cvt.c (build_over_call): Call build_cplus_new.
8746         * call.c (build_method_call): Likewise.
8747         * typeck.c (build_function_call_real): Likewise.
8748         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
8749         the COND_EXPR in a TARGET_EXPR so they use the same slot.
8750
8751         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to 
8752         recursive calls.
8753         * typeck.c (complete_type): Propagate
8754         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
8755
8756 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
8757
8758         * cvt.c (joust): More ?: kludging.  Sigh.
8759         (build_over_call): Don't try to synthesize global fns.
8760
8761         * search.c (lookup_conversions): Use binfo marking.
8762
8763 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
8764
8765         * search.c (build_mi_matrix): Use the correct value of cid
8766         when determining the new mi_size.
8767
8768 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
8769
8770         * cvt.c (add_builtin_candidates): Do consider type conversion ops
8771         for the first parms of += et al.
8772         (strip_top_quals): New fn.
8773         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
8774         (implicit_conversion): Likewise.
8775         (add_builtin_candidates): Be careful about arrays.
8776         (build_new_method_call): Handle vtable optimization.
8777
8778 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
8779
8780         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
8781         * cvt.c (reference_binding): Use it.
8782         (implicit_conversion): Use it.
8783         (add_builtin_candidate, COND_EXPR): Use it.
8784
8785         * cvt.c (build_new_function_call): Check for error args.
8786
8787         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
8788
8789         * gxx.gperf: Add __null.
8790         * hash.h: Regenerate.
8791         * lex.h: Add RID_NULL.
8792         * lex.c (init_lex): Create null_pointer_node here, stick it in
8793         RID_NULL.
8794         * decl.c (init_decl_processing): Still set its type here.
8795         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
8796         (convert_to_pointer_force): Likewise.
8797         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
8798         if (! pedantic).
8799         * call.c (convert_harshness): Use null_ptr_cst_p.
8800         * typeck.c (convert_for_assignment): Likewise.  Don't produce
8801         null_pointer_node.
8802
8803         * error.c (args_as_string): Handle lists of actual args, too.
8804         * cvt.c (null_ptr_cst): Support (void*)0 for now.
8805         (build_user_type_conversion_1): Improve diagnostics.
8806         (build_new_function_call): Likewise.
8807         (build_object_call): Likewise.
8808         (build_new_method_call): Likewise.  Move call before def diagnostic...
8809         (build_over_call): Here.
8810
8811         * cvt.c (build_new_method_call): Don't complain about no match if
8812         LOOKUP_SPECULATIVELY.
8813         (build_over_call): Fix 'this' for virtual fn.
8814         (build_new_method_call): Add diagnostic.
8815
8816 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
8817
8818         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
8819         constructors to be passed in.
8820         (build_over_call): Likewise.
8821         (build_user_type_conversion_1): Pass them in.
8822         (convert_like): Likewise.
8823         (build_object_call): Handle overloaded conversions.
8824         (build_over_call): Pass the right args to build_vfn_ref.
8825         (standard_conversion): Fix pmf convs.
8826         (joust): Handle comparing statics and non-statics.
8827         (build_new_method_call): New fn.
8828         * call.c (build_method_call): Call it if NEW_OVER.
8829
8830 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
8831
8832         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
8833         %D instead.
8834
8835 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
8836
8837         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
8838         instead of just maybe_build_cleanup so that we deallocate the
8839         thrown object.
8840
8841 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
8842
8843         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
8844         * cp-tree.h (finish_prevtable_vardecl): Add decl.
8845
8846 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
8847
8848         * pt.c (instantiate_class_template): Call complete_type. Also, if
8849         we're at the end of the file and we just instantiated a template
8850         class with a vtable, call finish_prevtable_vardecl.
8851
8852         * error.c (dump_decl): Don't explode (or explode more gracefully
8853         as appropriate) if the object being dumped has a null type.
8854         (dump_expr): Likewise.
8855
8856         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
8857         by counting the number of nodes that we'll need before allocating
8858         the array.
8859         (lookup_fnfields): Fix comment.
8860         (breadth_first_search): Fix comment.
8861
8862 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
8863
8864         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
8865         TYPE_ALIGN.
8866         * class.c (finish_struct): Call cplus_decl_attributes here.
8867         (finish_struct_1): Not here.
8868         * cp-tree.h: Adjust.
8869
8870         * pt.c (type_unification): New parameter STRICT.
8871         (unify): If STRICT, don't allow cv addition or base deduction.
8872         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
8873
8874 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
8875
8876         * search.c (get_template_base{_recursive}): New fns.
8877         * pt.c (more_specialized): New fn.
8878         (do_function_instantiation): Use it.
8879         (unify): Handle base deduction.
8880         * cvt.c (joust): Use more_specialized.
8881         Don't arbitrarily choose between non-builtin candidates.
8882         (build_over_call): Call require_complete_type.
8883
8884         * decl.c (start_function): Statics are static even in a #pragma
8885         interface file.
8886
8887         * decl2.c (import_export_vtable): Disable vtable heuristic on
8888         systems with ASM_OUTPUT_EXTERNAL.
8889
8890         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
8891         (standard_conversion): No std conv to enum type.
8892
8893         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
8894         for ptm's.
8895
8896         * cvt.c (reference_binding): Bind directly to a base subobject of
8897         a class rvalue.
8898
8899         * cvt.c (build_new_op): Enforce access control.
8900
8901 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
8902
8903         * typeck2.c (process_init_constructor): When scanning the
8904         union for a named field, skip things that aren't FIELD_DECLs.
8905
8906         * method.c (synthesize_method): Don't scan fndecl's rtl if
8907         we're at the end of the file; just assume the function can't
8908         be inlined.
8909
8910 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
8911
8912         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
8913         it failed.
8914
8915         * cvt.c (build_user_type_conversion_1): Handle overloaded
8916         conversion ops.
8917
8918         * cvt.c (add_builtin_candidates): Don't consider type conversion
8919         operators for the first parameter of operator=.
8920
8921 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
8922
8923         * typeck.c (complete_type): Only call layout_type if we're not
8924         expanding a template.
8925
8926 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
8927
8928         * cvt.c (compare_ics): Oops.
8929
8930         * cvt.c (op_error): Oops.
8931
8932         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
8933         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
8934         (build_conv): Use them.
8935         (implicit_conversion): Use them.
8936         (convert_like): Handle them.
8937         (build_new_op): Handle builtin COND_EXPR again.
8938         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
8939         in lists of types for COND_EXPR.
8940         (add_builtin_candidate): Add enum candidates for COND_EXPR.
8941
8942 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
8943
8944         * typeck.c (build_modify_expr): Always attempt to build a call to
8945         the assignment operator, even if we're using a default one.
8946         (convert_for_initialization): Call complete_type.
8947
8948 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8949
8950         * cvt.c (reference_binding): A REF_BIND gets the reference type.
8951         (implicit_conversion): Likewise.
8952         (convert_like): Likewise.
8953         (compare_ics): Likewise.
8954         (compare_qual): Likewise.
8955         (print_z_candidates): Handle no candidates.
8956         (build_new_op): Don't handle builtin COND_EXPR for now.
8957
8958 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
8959
8960         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
8961
8962 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
8963
8964         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
8965
8966         * cvt.c (build_builtin_candidate): Oops.
8967         (build_new_op): Oops.
8968
8969         * method.c (build_opfncall): Pass COND_EXPR on.
8970         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
8971         (add_builtin_candidate{,s}): Likewise.
8972         (add_builtin_candidates): Likewise.
8973         (print_z_candidates, op_error, build_new_op): Likewise.
8974         (type_decays_to): New fn.
8975         * lex.c (init_lex): Just say ?: for COND_EXPR.
8976
8977 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
8978
8979         * typeck.c (complete_type): Call layout_type rather than building
8980         a new array type.
8981
8982         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
8983         only use ptrdiff_t.
8984
8985 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
8986
8987         * cvt.c: Always compile the new overloading code (but don't use it).
8988         (implicit_conversion): Add a BASE_CONV when converting to
8989         the same class type.
8990         (convert_like): Handle BASE_CONV.
8991
8992 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
8993
8994         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
8995         (add_builtin_candidate): Likewise.
8996
8997         NEW_OVER changes:
8998         * typeck.c (build_x_function_call): Try an operator function
8999         whenever we call an object of class type.
9000         * method.c (build_opfncall): Pass CALL_EXPRs through.
9001         * cvt.c (implicit_conversion): Do const-ref case first.
9002         (add_conv_candidate, build_object_call, op_error): New fns.
9003         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
9004         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display 
9005         builtin candidates.
9006         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
9007         Fall back on preincrement handling.  Use op_error.  
9008         Handle warn_synth.
9009         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with 
9010         an error_mark_node.
9011         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
9012         properly.
9013
9014 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
9015
9016         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
9017
9018 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
9019
9020         * typeck.c (build_component_ref_1): Use build_component_ref
9021         instead of open coding it here.
9022
9023 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
9024
9025         * g++.c (main): Don't link with -lg++.
9026
9027         NEW_OVER changes:
9028         * cvt.c (convert_to_reference): Don't use convert_from_refeence on
9029         result of build_type_conversion.
9030         (cp_convert): Only call build_method_call for ctors if
9031         build_type_conversion failed.
9032         (ptr_complete_ob): New function.
9033         (TYPE_PTR{,OB,MEM}_P): New macros.
9034         ({add,build}_builtin_candidate{,s}): New functions.
9035         (print_z_candidates): Handle builtins.
9036         (build_user_type_conversion_1): Don't use conversion fns for 
9037         converting to a base type.
9038         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
9039         (build_user_type_conversion): Use convert_from_reference.
9040         (build_new_op): New function.
9041         (build_over_call): Fix handling of methods.
9042         (compare_ics): Handle AMBIG_CONV properly.
9043         * typeck2.c: Increment abort count.
9044         * method.c (build_opfncall): Forward most requests to build_new_op.
9045         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
9046
9047 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9048
9049         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
9050         invalid second argument to dump_expr_list.
9051
9052 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
9053
9054         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
9055
9056 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
9057
9058         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
9059         ASSEMBLE_EXTERNAL.
9060
9061 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
9062
9063         * typeck2.c (process_init_constructor): New pedwarn for using { }
9064         to initialize a pointer to member function.
9065         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
9066         we can avoid the new error.
9067
9068 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
9069
9070         * typeck.c (build_ptrmemfunc1): New function to hide details of
9071         pointer to member functions better.
9072
9073 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
9074
9075         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
9076         methods into the actual method, as we know the implied object is
9077         not used.
9078
9079 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9080
9081         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
9082         inside a system header.
9083
9084 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
9085
9086         * call.c (build_method_call): Call complete_type on the
9087         instance type.
9088
9089 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
9090
9091         * typeck.c (build_component_ref): Always build up an OFFSET_REF
9092         for obj_ptr->func so that we can know which object to use in a
9093         method call.
9094
9095 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
9096
9097         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
9098         around things.  Also improve maintainability.
9099
9100 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
9101
9102         * decl.c (grokdeclarator): Check for overflow when evaluating an
9103         array dimension.
9104
9105 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
9106
9107         * cvt.c (cp_convert): Don't check for ambiguity with constructor
9108         if NEW_OVER.
9109
9110         * typeck.c (build_x_function_call): Pass function overload
9111         questions to new overloading code if NEW_OVER.
9112         * init.c (expand_aggr_init_1): Only check for type conversion ops
9113         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
9114         Don't check for ambiguity with constructor if NEW_OVER.
9115         * cvt.c (convert_to_reference): Dereference the result of a type
9116         conversion operator.
9117         (build_conv): Propagate ICS_USER_FLAG.
9118         (implicit_conversion): Call instantiate_type.
9119         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
9120         (add_function_candidate): Fix cv-quals on argtype.
9121         (print_z_candidates): New function.
9122         (build_new_function_call): Call it.
9123         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
9124         consider non-converting constructors.
9125         Call print_z_candidates.
9126         Return an AMBIG_CONV for an ambiguous conversion.
9127         (build_user_type_conversion): Handle AMBIG_CONV.
9128         (convert_like): Fix test for building TARGET_EXPR.
9129         Call instantiate_type.
9130         Handle AMBIG_CONV and LVALUE_CONV.
9131         (build_over_call): Handle 0 args and ellipsis.
9132         * cp-tree.def: Add AMBIG_CONV.
9133
9134 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
9135
9136         * decl.c (lookup_name_real): If we find mem in obj when parsing
9137         `obj->mem', make sure we return the right value.
9138
9139 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
9140
9141         * search.c (get_base_distance): Call complete_type.
9142
9143 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
9144
9145         * decl.c (store_bindings): Make static.
9146
9147 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
9148
9149         * init.c (expand_aggr_init_1): Don't check type conversions if
9150         NEW_OVER.
9151
9152         * cvt.c (z_candidate): Put back template field.
9153         (add_function_candidate): Set it.
9154         (add_template_candidate): Likewise.
9155         (joust): Use it.
9156         (compare_qual): Handle references and pointers to members.
9157         (compare_ics): Handle reference bindings.
9158
9159         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
9160
9161 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
9162
9163         * call.c (compute_conversion_costs): Call complete_type.
9164
9165         * tree.c (vec_binfo_member): Use comptypes instead of comparing
9166         pointers, so we can handle template parameters.
9167
9168 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
9169
9170         * cvt.c (cp_convert_to_pointer): We have to call complete_type
9171         here; let's make it explicit instead of a side effect of an
9172         error check.
9173
9174 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
9175
9176         * cvt.c (z_candidate): Remove template field.
9177         (reference_binding): Handle binding to temporary.
9178         (implicit_conversion): Likewise.
9179         (add_function_candidate): Handle artificial constructor parms.
9180         Handle functions with too few parms.
9181         (add_template_candidate): New function.
9182         (build_user_type_conversion_1): Handle constructors.
9183         (convert_like): Likewise.
9184         (build_over_call): Likewise.
9185         (build_new_function_call): Support templates.
9186         (compare_ics): Fix reference, inheritance handling.
9187
9188 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
9189
9190         * decl.c: Add signed_size_zero_node.
9191         (init_decl_processing): Build it.
9192         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
9193         when we're trying to make a negative delta.
9194
9195 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9196
9197         Stop doing this damn index==strchr variable name confusion.
9198         * class.c (add_virtual_function): Change local var INDEX to be
9199         named IDX.
9200         (add_method): Likewise.
9201         * lex.c (print_parse_statistics): Likewise.
9202         * search.c (make_memoized_table_entry): Likewise.
9203         (lookup_fnfields_here): Likewise.
9204         (lookup_field): Likewise.
9205         (lookup_fnfields): Likewise.
9206         (get_baselinks): Likewise.
9207         * sig.c (build_signature_table_constructor): Likewise.
9208         (build_signature_method_call): Likewise.
9209         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
9210         (get_member_function_from_ptrfunc): Likewise.
9211         (build_ptrmemfunc): Change local var INDEX to be IDX.
9212         (c_expand_start_case): Likewise.
9213
9214 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
9215
9216         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
9217         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
9218         (convert_to_reference): Use build_type_conversion to convert to
9219         the reference type directly.
9220         (standard_conversion): Fix void* case, non-conversions.
9221         (reference_binding): Fix expr == 0 case, non-conversions.
9222         (convert_like): Support REF_BIND.
9223         (compare_qual): Split out from compare_ics.
9224         (compare_ics): Use it, handle icses with only a qual_conv.
9225
9226         * init.c (expand_vec_init): Don't crash if decl is NULL.
9227
9228 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
9229
9230         * mpw-config.in: New file, configury for Mac MPW.
9231         * mpw-make.sed: New file, makefile editing for MPW.
9232
9233 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
9234
9235         * pt.c (instantiate_class_template): Call repo_template_used.
9236
9237         * search.c (lookup_conversions): Only lookup conversions in
9238         complete types.
9239
9240 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9241
9242         * cp-tree.def: Renamed from tree.def, to avoid confusion with
9243         gcc's tree.def.
9244         * cp-tree.h, lex.c: Include cp-tree.def.
9245         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
9246
9247 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
9248
9249         * init.c (build_vec_delete_1): Call complete_type.
9250
9251 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
9252
9253         * except.c (start_anon_func): Make sure anonymous functions are
9254         never external.
9255
9256 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
9257
9258         * decl.c (finish_function): If function_depth > 1, set nested.
9259
9260         * decl2.c (grokbitfield): Revert Bob's change.
9261         * class.c (finish_struct_1): Fix handling of named bitfield widths.
9262
9263 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
9264
9265         * pt.c (add_pending_template): Handle types.
9266         (lookup_template_class): With -fexternal-templates, just add the class
9267         to pending_templates instead of instantiating it now.
9268         * decl2.c (finish_file): Handle types in pending_templates.
9269
9270 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
9271
9272         * decl2.c (grokbitfield): Handle constant decls appropriately.
9273         Give an appropriate error message now instead of spewing core
9274         later.
9275
9276 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
9277
9278         * decl2.c: Don't turn on thunks by default for now.
9279
9280 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
9281
9282         * typeck.c (complete_type): Handle error_mark_node.
9283         (common_type, OFFSET_TYPE): Handle template_type_parms.
9284
9285 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
9286
9287         * pt.c (instantiate_decl): If at_eof, call import_export_decl
9288         regardless of DECL_INLINE.
9289
9290         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
9291
9292         * class.c (finish_struct_bits): Copy TYPE_SIZE.
9293
9294         * rtti.c (build_dynamic_cast): Support templates.
9295         * tree.def: Support DYNAMIC_CAST_EXPR.
9296         * pt.c (tsubst_copy): Likewise.
9297         * decl2.c (build_expr_from_tree): Likewise.
9298
9299 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
9300
9301         * typeck.c (build_static_cast): Support templates.
9302         (build_const_cast): Likewise.
9303         * tree.def: Support CONST/STATIC_CAST_EXPR.
9304         * pt.c (tsubst_copy): Likewise.
9305         * decl2.c (build_expr_from_tree): Likewise.
9306
9307 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
9308
9309         * decl2.c (finish_vtable_vardecl): Don't trust
9310         TREE_SYMBOL_REFERENCED for vtables of local classes.
9311
9312 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
9313
9314         * pt.c (tsubst_copy): Handle operator T.
9315
9316 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9317
9318         * init.c (build_delete): Move creation of PARMS inside test of
9319         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
9320
9321 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
9322
9323         * typeck.c (build_conditional_expr): Don't assume that
9324         the arguments to ?: are always pointers or records.
9325
9326 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
9327
9328         * decl2.c (import_export_decl): Still emit static/weak/comdat
9329         copies of inline template functions with -fno-implicit-templates.
9330
9331 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
9332
9333         * init.c (build_delete): Determine the complete basetype
9334         path to the destructor we're calling.
9335
9336 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
9337
9338         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
9339         initialize the enum, because we really and truly don't know where
9340         it came from.
9341         (start_enum): Don't copy integer_zero_node because
9342         build_enumerator will do it.
9343
9344 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9345
9346         * decl.c (finish_function): Do access control on base destructors.
9347
9348         * pt.c (tsubst, case FUNCTION_DECL): Set up
9349         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
9350         hose us.
9351
9352 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
9353
9354         * cvt.c (build_up_reference): If we have already extended the
9355         lifetime of the temporary, don't try it again.
9356         * typeck.c (c_expand_return): Don't try and convert the return
9357         value twice when we want a reference, once is enough.
9358         
9359 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
9360
9361         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
9362         LOOKUP_ONLYCONVERTING at all for now.
9363
9364         * search.c (add_conversions): Put the conversion function in
9365         TREE_VALUE, the basetype in TREE_PURPOSE.
9366         * cvt.c (build_type_conversion): Adjust.
9367         * cvt.c (build_expr_type_conversion): Adjust.
9368         * call.c (user_harshness): Adjust.
9369
9370 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
9371
9372         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
9373         backend's benefit.
9374
9375 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
9376
9377         * except.c (expand_start_catch_block): Add a dummy region, if we
9378         get an error, so that we can avoid core dumping later.
9379
9380 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
9381
9382         * cp-tree.h (OFFSET_REF): Remove.
9383         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
9384         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
9385         * init.c (expand_aggr_init_1): Likewise.
9386         (build_new): Likewise.
9387         * typeck.c (expand_target_expr): Likewise.
9388
9389 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
9390
9391         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
9392         TARGET_EXPR.
9393
9394 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
9395
9396         * cvt.c (build_up_reference): Redo how and when temporaries are
9397         created.
9398         * decl.c (grok_reference_init): Don't try and be smart about
9399         running cleanups.
9400
9401 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
9402
9403         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
9404         (TARGET_EXPR...), now that it has 4 arguments.
9405         * tree.c (build_cplus_new): Likewise.
9406
9407 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
9408
9409         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
9410
9411         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
9412         * decl.c (struct saved_scope): Remove named_labels,
9413         {base,member}_init_list.
9414         (maybe_push_to_top_level): Don't set them.  Call
9415         push_cp_function_context if appropriate.
9416         (pop_from_top_level): Likewise.
9417
9418         * method.c (do_build_assign_ref): Remove obsolete check of
9419         TYPE_HAS_ASSIGN_REF (basetype).
9420
9421         * decl.c (grokfndecl): Diagnose user definition of
9422         implicitly-declared methods.
9423
9424 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
9425
9426         * method.c (do_build_copy_constructor): Add code to give
9427         meaningful error messages instead of crashing.
9428         (do_build_assign_ref): Don't synthesize assignment operators for
9429         classes containing reference or const members.
9430
9431         * class.c (struct base_info): Remove cant_synth_copy_ctor
9432         and cant_synth_asn_ref.
9433         (finish_base_struct): Remove the code that tries to conditionalize
9434         synthesis of copy constructors & assignment operators based on
9435         access permissions. Instead, let it fail when it tries to
9436         synthesize the copy constructor. This will give meaningful error
9437         messages instead of silently generating code to perform a bitcopy.
9438
9439 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
9440
9441         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
9442         determining types for constant values.
9443
9444         * decl.c (struct named_label_list): Use instead of stuffing
9445         random items into a TREE_LIST node.
9446         (named_label_uses): Use the new struct.
9447         (poplevel): Likewise.
9448         (lookup_label): Likewise.
9449         (define_label): Add an error message to tell the user the line
9450         where the goto is located in addition to the destination of the
9451         goto.
9452         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
9453         named_label_uses.
9454         (finish_function): Likewise.
9455         
9456         (start_decl): Complain about defining a static data member
9457         in a different type from which it was declared.
9458
9459 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
9460
9461         * cvt.c (build_expr_type_conversion): Adjust.
9462
9463 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
9464
9465         * call.c (build_method_call): Always convert 'this' to the
9466         appropriate type.
9467
9468         * search.c (add_conversions): Put the conversion function in
9469         TREE_VALUE, the type in TREE_PURPOSE.
9470         * cvt.c (build_type_conversion): Adjust.
9471         * call.c (user_harshness): Adjust.
9472
9473         * method.c (emit_thunk): Call temporary_allocation and
9474         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
9475
9476         * tree.c (build_cplus_array_type): Handle tweaking of
9477         TYPE_MAIN_VARIANT here.
9478         * typeck.c (common_type): Not here.
9479
9480         * typeck.c (complete_type): Only try to complete an array type if
9481         it has a domain.
9482
9483 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
9484
9485         * decl.c (grokvardecl): Call complete_type.
9486         (grokdeclarator): Call complete_type for PARM_DECLs.
9487
9488 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
9489
9490         * pt.c (instantiate_class_template): Re-set
9491         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
9492
9493 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
9494
9495         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
9496         smart enough to do it right.
9497         * tree.c (cp_expand_decl_cleanup): Likewise.
9498         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
9499         cp_expand_decl_cleanup.
9500         (store_parm_decls): Likewise.
9501         (hack_incomplete_structures): Likewise.
9502         * except.c (push_eh_cleanup): Likewise.
9503
9504 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
9505
9506         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
9507         frontend to the backend where it belongs.
9508         * tree.c (unsave_expr): Likewise.
9509         (unsave_expr_now): Likewise.
9510         * tree.def (UNSAVE_EXPR): Likewise.
9511         * cp-tree.h (unsave_expr): Likewise.
9512         (unsave_expr_now): Likewise.
9513
9514 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
9515
9516         * init.c (emit_base_init): Make sure the partial EH cleanups live
9517         on the function_obstack.
9518
9519 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
9520
9521         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
9522         when checking for pointer types.
9523
9524 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
9525
9526         * pt.c (instantiate_class_template): Remove obsolete check for
9527         access declarations.
9528
9529 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
9530
9531         * call.c (build_overload_call): Simplify calls to
9532         build_overload_call by removing last parameter.
9533         (build_method_call): Likewise.
9534         * cp-tree.h: Likewise.
9535         * method.c (build_opfncall): Likewise.
9536         * typeck.c (build_x_function_call): Likewise.
9537
9538 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
9539
9540         * call.c (default_parm_conversions): Factor out common code.
9541         (build_method_call): Use it.
9542         (build_overload_call_real): Use it.
9543
9544 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
9545
9546         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
9547         but pedwarn as the code is bogus.
9548         * typeck.c (decay_conversion): Likewise.
9549         (build_function_call_real): Use build_addr_func instead of
9550         default_conversion.  Don't allow pointer-to-method functions down
9551         here.
9552         (build_unary_op): Use real pointer-to-member functions instead of
9553         fake ones.
9554         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
9555         (convert_for_assignment): Removed some obsolete code.
9556         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
9557         build_x_function_call instead of current_class_ptr.  Only call
9558         digest_init once on an initializer, we do this just checking
9559         TREE_TYPE.
9560         (build_expr_from_tree): Pass current_class_ref to
9561         build_x_function_call instead of current_class_ptr.
9562         * init.c (build_member_call): Likewise.
9563         * pase.y: Likewise.
9564         * error.c (dump_expr): Handle OFFSET_REFs better.
9565         * pt.c (unify): Handle pointer-to-member functions better.
9566         * decl.c (finish_function): Clear out current_class_ref just like
9567         we do for current_class_ptr.
9568
9569         * typeck.c (get_delta_difference): Handle virtual bases better.
9570
9571 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
9572
9573         * sig.c (build_signature_table_constructor): Use the delta for
9574         the original basetype for this virtual function with thunks.
9575         (build_signature_method_call): We still need to adjust 'this'
9576         with thunks.
9577
9578 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
9579
9580         * call.c (build_addr_func): New routine.  Used to get the `real'
9581         address of a function or a method.  Needed to avoid getting a
9582         pointer-to-member function.
9583         (build_call): New routine to build CALL_EXPRs.
9584         (build_method_call): Use it.
9585         * cvt.c (convert_to_aggr): Likewise.
9586         * typeck.c (build_function_call_real): Likewise.
9587         * sig.c (build_signature_table_constructor): Use build_addr_func.
9588         * cp-tree.h (build_call, build_addr_func): Declare them.
9589
9590 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
9591
9592         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
9593         * parse.y: Remove uses of LOOKUP_AGGR.
9594
9595 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
9596
9597         * *.[chy]: Rename current_class_decl to current_class_ptr, and
9598         C_C_D to current_class_ref.
9599
9600 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
9601
9602         * call.c (convert_harshness): Tighten up pointer conversions.
9603
9604 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
9605
9606         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
9607         (finish_file): Likewise.
9608
9609 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
9610
9611         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
9612
9613         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
9614         code.
9615
9616 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
9617
9618         * decl2.c: Turn on thunks by default where supported.
9619
9620 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
9621
9622         * cp-tree.h (build_overload_call_maybe): Removed.
9623         * call.c (build_overload_call_real): Invert meaning of last arg to
9624         be require_complete.
9625         (build_overload_call): Likewise.
9626         * typeck.c (build_x_function_call): Use build_overload_call_real
9627         instead of build_overload_call_maybe.
9628
9629 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
9630
9631         * decl2.c (finish_file): Don't try to emit functions that haven't
9632         been compiled.
9633
9634 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
9635
9636         * decl2.c (finish_vtable_vardecl): Oops.
9637
9638         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
9639         Also store the bindings from previous_class_values.
9640         (pop_from_top_level): Restore them.
9641
9642 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
9643
9644         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
9645         symbol has been referenced.
9646         (finish_file): Re-join synthesis/vtable loop with inline emission
9647         loop, disable inlining when an inline is output.
9648
9649 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
9650
9651         * except.c (init_exception_processing): Setup saved_in_catch.
9652         (push_eh_cleanup): Reset __eh_in_catch.
9653         (expand_start_catch_block): Set __eh_in_catch.
9654
9655 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
9656
9657         * except.c (push_eh_cleanup): Add tracking for whether or not we
9658         have an active exception object.
9659         (expand_builtin_throw): Use it to make sure a rethrow without an
9660         exception object is caught.
9661
9662 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
9663
9664         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
9665         cache.
9666
9667 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
9668
9669         * decl2.c (finish_file): Also use sentries for vars with
9670         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
9671         created).
9672
9673         * lex.c (handle_cp_pragma): Disable #pragma
9674         interface/implementation if SUPPORTS_ONE_ONLY > 1.
9675
9676 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
9677
9678         * method.c (emit_thunk): Wrap default case in
9679         temporary/permanent_allocation.
9680
9681         * method.c (make_thunk): Use DECL_ONE_ONLY.
9682         (emit_thunk): Call assemble_end_function.
9683
9684 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
9685
9686         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
9687         (import_export_decl): Likewise.
9688         (finish_prevtable_vardecl): Disable vtable hack if
9689         SUPPORTS_ONE_ONLY > 1.
9690
9691 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
9692
9693         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
9694         PREDECREMENT_EXPRs take two arguments, not one.
9695
9696 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
9697
9698         * class.c (build_vtable_entry): Don't build thunks for abstract
9699         virtuals.
9700
9701         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
9702         frontend.
9703
9704 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
9705
9706         * class.c (set_rtti_entry): Use size_zero_node.
9707         (build_vtable): Likewise.
9708
9709 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
9710
9711         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
9712         (prepare_fresh_vtable): Likewise.
9713
9714 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
9715
9716         * method.c (emit_thunk): Call mark_used on the target function.
9717
9718         * call.c (build_method_call): Don't warn about pending templates.
9719
9720 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
9721
9722         * decl2.c (finish_file): Fix list walking logic.
9723
9724         * typeck2.c (check_for_new_type): Only warn if -pedantic.
9725
9726 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
9727
9728         * class.c (finish_struct_1): Remove old code for
9729         dont_allow_type_definitions.
9730         * cp-tree.h: Likewise.
9731         * spew.c: Make sure cp-tree.h is included before parse.h, so the
9732         definition of flagged_type_tree is found before it is used.
9733         * lex.c: Likewise.
9734         * parse.y: Added the ftype member to the type union, and changed a
9735         number of rules to use it instead of ttype. Added calls to
9736         check_for_new_type() as appropriate.
9737         * typeck2.c (check_for_new_type): New function for checking
9738         if a newly defined type appears in the specified tree.
9739         * cp-tree.h: Add new type flagged_type_tree. Add a prototype
9740         for check_for_new_type().
9741
9742 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
9743
9744         * decl2.c (finish_file): Only use a sentry if the decl is public.
9745
9746         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
9747         don't pass LOOKUP_ONLYCONVERTING.
9748
9749 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
9750
9751         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
9752         properly keeps track of const and volatile type modifiers.
9753
9754 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
9755
9756         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
9757         * pt.c (comp_template_args): Use it.
9758
9759         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
9760         assemble_external for artificial function decls.
9761
9762         * decl.c (cp_finish_decl): Oops.
9763
9764 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
9765
9766         * decl2.c (import_export_decl): Put static data member templates
9767         into common storage, or make them weak, depending on whether they
9768         are dynamically or statically initialized.
9769         (get_sentry): New function.
9770         (finish_file): Do import_export_decl for static data members before
9771         building the init/fini functions.  Don't init/fini a variable that's
9772         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
9773         push/pop_temp_slots.
9774         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
9775         expand_static_init thang.
9776         * method.c (get_id_2): New function.
9777
9778 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
9779
9780         * parse.y (empty_parms): Make sure we use C++-style prototypes
9781         when we're declaring member functions.
9782
9783 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
9784
9785         * Makefile.in (CONFLICTS): 16 s/r conflicts.
9786         * parse.y (self_template_type): New nonterminal.
9787
9788 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
9789
9790         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
9791         name.
9792         * parse.y (base_class.1): Allow 'typename foo::bar'.
9793
9794         * lex.c (check_newline): Remove #pragma code that plays with the
9795         input stream, since we now deal with tokens.  Clear nextchar when
9796         we're done.
9797         (handle_cp_pragma): Use real_yylex.
9798         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
9799         in one place.
9800
9801         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
9802
9803         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
9804
9805 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
9806
9807         * parse.y: New token SELFNAME for potential constructor.
9808         * spew.c (yylex): Handle it.
9809         * lex.c (identifier_type): Produce it.
9810
9811         * parse.y (complete_type_name): In :: case, don't push class binding.
9812         (complex_type_name): Likewise.
9813
9814 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
9815
9816         * typeck.c (build_reinterpret_cast): Handle pointer to member
9817         functions.
9818
9819 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
9820
9821         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
9822         pragmas.
9823         (check_newline): Put the vtable/unit/implementation/interface pragma
9824         code into handle_cp_pragma, replacing it with a call.
9825         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
9826         args.  Get the next token after handling the pragma token.
9827
9828 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
9829
9830         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
9831         (convert_to_pointer_force): Likewise.
9832
9833         * init.c (build_new): Fix array new without -fcheck-new.
9834
9835 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
9836
9837         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
9838         tree.c: Lose TYPE_NESTED_NAME.
9839
9840         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
9841         as identifiers.
9842
9843         * tree.def: Add VEC_INIT_EXPR.
9844         * expr.c (cplus_expand_expr): Handle it.
9845         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
9846         the extra file-scope symbol nastiness.
9847
9848 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
9849
9850         * method.c (make_thunk): Thunks are static.
9851         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
9852
9853         * decl2.c (mark_vtable_entries): Emit thunks as needed.
9854         (finish_file): Don't emit them here.
9855
9856 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
9857
9858         * rtti.c (build_dynamic_cast): Handle null pointers.
9859         (ifnonnull): New function.
9860
9861 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
9862
9863         * call.c (build_method_call): Remember the original basetype we
9864         were called with. Give an error message instead of trying
9865         (incorrectly) to call a non-static member function through a
9866         non-inherited class.
9867
9868         * search.c (expand_upcast_fixups): Mark the new fixup as
9869         DECL_ARTIFICIAL.
9870
9871 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9872
9873         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
9874
9875         * class.c (set_rtti_entry): Fix for thunks.
9876
9877         * decl2.c (import_export_decl): Still emit typeinfo fns for
9878         cv-variants of builtin types.
9879
9880         * rtti.c (expand_class_desc): Set up base_info_type_node here.
9881         (init_rtti_processing): Instead of here.
9882
9883 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
9884
9885         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
9886         (build_typeid): Only complain about taking dynamic typeid without
9887         -frtti.
9888
9889         * decl2.c: flag_rtti defaults to 1.
9890
9891         * rtti.c (get_tinfo_var): The general class case is now smaller.
9892         (init_rtti_processing): Pack the latter three fields of base_info
9893         into 32 bits.
9894
9895 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
9896
9897         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
9898
9899 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
9900
9901         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
9902         (push_memoized_context): Split out code to undefer pop_type_level to
9903         (clear_memoized_cache): here.
9904         (pop_memoized_context): We can only handle one layer of deferral of
9905         pop_type_level so clear the cache, if there was a previous level.
9906
9907 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9908
9909         * rtti.c (init_rtti_processing): Build up base_info_type_node.
9910         (expand_class_desc): Use one pointer to an array of base_info
9911         structs, passed using a CONSTRUCTOR.
9912
9913 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
9914
9915         * class.c (build_vbase_path): Remove block extern for
9916         flag_assume_nonnull_objects here.
9917         (build_vfn_ref): Split out functionality into build_vtbl_ref.
9918         (build_vtbl_ref): New routine.
9919         (build_vtable): Set up rtti info here.
9920         (add_virtual_function): Note in CLASSTYPE_RTTI the best
9921         place where we can get the rtti pointers from to avoid having to
9922         search around for a place.
9923         (finish_base_struct): Likewise.
9924         (finish_struct_1): Likewise.  Never create totally new vtables
9925         with totally new vtable pointers for rtti.  Disable code to layout
9926         vtable pointers better until we want to break binary
9927         compatibility.
9928         * rtti.c (build_headof_sub): New routine to convert down to a
9929         sub-object that has an rtti pointer in the vtable.
9930         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
9931         maintainable.
9932         (build_dynamic_cast): Make sure we have saved it, if we need to.
9933         * search.c (dfs_init_vbase_pointers): Disable code that deals with
9934         a more efficient vtable layout, enable later.
9935         * call.c (flag_assume_nonnull_objects): Moved declaration to
9936         * cp-tree.h: here.  Declare build_vtbl_ref.
9937         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
9938         function calls that want a tree.
9939
9940 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
9941
9942         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
9943         other X subobjects in the most derived type.  Ack.
9944
9945         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
9946         get_typeid will do it for us.
9947         (get_typeid_1): Break out call-building for expand_*_desc to use.
9948         (get_typeid): Call it.
9949         (expand_*_desc): Likewise.
9950         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
9951         and void *.
9952         (init_decl_processing): Lose builtin_type_tdescs lossage.
9953         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
9954
9955 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
9956
9957         * pt.c (tsubst): When calling set_nested_typename, use
9958         TYPE_NESTED_NAME (current_class_type) instead of
9959         current_class_name.
9960
9961         * decl.c (pushdecl): Likewise.
9962         (pushdecl_class_level): Likewise.
9963         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
9964         set_nested_typename.
9965
9966 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
9967
9968         * rtti.c (synthesize_tinfo_fn): Handle arrays.
9969
9970         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
9971
9972 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
9973
9974         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
9975         (init_rtti_processing): Lose bad_cast_type.
9976         (build_dynamic_cast): Use throw_bad_cast.
9977
9978         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
9979
9980         * decl2.c (finish_file): Don't synthesize artificial functions
9981         that are external and not inline.
9982
9983         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
9984
9985         * decl2.c (finish_file): Handle having new inlines added to
9986         saved_inlines by synthesis.
9987
9988         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
9989
9990 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
9991
9992         RTTI rewrite to initialize nodes as needed, not require that
9993         users #include <typeinfo>, complete functionality and reduce wasted 
9994         space.
9995         * rtti.c (init_rtti_processing): New fn.
9996         (build_typeid): The vtable entry is now a function.
9997         (get_tinfo_var): New fn.
9998         (get_tinfo_fn): Likewise.
9999         (get_typeid): Use it.
10000         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
10001         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
10002         points __rtti_*.
10003         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
10004         (synthesize_tinfo_fn): New fn.
10005         * method.c (build_t_desc_overload): Lose.
10006         (build_overload_with_type): More generic.
10007         * decl.c (init_decl_processing): Call init_rtti_processing.
10008         * class.c (set_rtti_entry): Use get_tinfo_fn.
10009         * decl2.c (mark_vtable_entries): Mark the rtti function.
10010         (finish_prevtable_vardecl): Don't build_t_desc.
10011         (import_export_decl): Handle tinfo functions.
10012         (finish_file): Likewise.
10013         * typeck.c (inline_conversion): New fn.
10014         (build_function_call_real): Use it.
10015         * cp-tree.h: Add decls.
10016
10017         * method.c (hack_identifier): Also convert component_refs from
10018         references.
10019
10020         * lex.c (cons_up_default_function): Use the type, not the name, in
10021         declspecs.
10022
10023         * decl2.c (import_export_vtable): Fix weak vtables.
10024
10025 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
10026
10027         * search.c (get_base_distance_recursive): Fix access checks for
10028         protected bases.
10029
10030 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10031
10032         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
10033         cp-tree.h.
10034         (convert_harshness): Add prototypes wrapped by PROTO.
10035         * decl2.c (grok_function_init): Likewise.
10036         (do_toplevel_using_decl): Change to void return type.
10037         * class.c (build_vtable_entry): Remove decl of make_thunk.
10038         (merge_overrides): Fix order of arg definitions.
10039         (finish_vtbls): Likewise.
10040         (fixup_vtable_deltas): Likewise.
10041         (modify_all_direct_vtables): Likewise.
10042         (modify_all_indirect_vtables): Likewise.
10043         * search.c (get_base_distance_recursive): Likewise.
10044         (get_abstract_virtuals_1): Likewise.
10045         (fixup_virtual_upcast_offsets): Likewise.
10046         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
10047         * init.c (perform_member_init): Fix order of arg definitions.
10048         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
10049         * cp-tree.h (make_thunk): Add decl.
10050         (overload_template_name, push_template_decl): Add decls.
10051         (do_toplevel_using_decl): Change to void return type.
10052         (vec_binfo_member): Add decl.
10053
10054 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10055
10056         * typeck.c (mark_addressable, convert_for_assignment,
10057         convert_for_initialization, pointer_int_sum, pointer_diff,
10058         unary_complex_lvalue): Add prototypes wrapped by PROTO.
10059         (convert_sequence): #if 0 fn decl, since definition also is.
10060
10061 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
10062
10063         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
10064         cast to pointer types for type searching.
10065
10066 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10067
10068         * typeck.c (get_delta_difference): Use cp_error, not error, in the
10069         case where BINFO == 0.
10070
10071 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
10072
10073         * call.c (build_method_call): Fix wording of error messages so
10074         constructors come out right.
10075
10076 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
10077
10078         * decl.c (push_overloaded_decl): Don't warn about hidden
10079         constructors when both the type and the function are declared
10080         in a system header file.
10081
10082 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
10083
10084         * class.c (finish_struct_1): Propagate the TYPE_PACKED
10085         flag for the type to the type's fields.
10086
10087 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10088
10089         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
10090
10091 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
10092
10093         * class.c (base_info, finish_base_struct): Replace 
10094         needs_virtual_dtor with base_has_virtual.
10095
10096         (finish_struct_1): Remove the old code that tried to make default
10097         destructors virtual. Use base_has_virtual when checking if we need
10098         to add a vtable entry for the rtti code.
10099
10100 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
10101
10102         * pt.c (push_template_decl): Complain about template decl with
10103         inappropriate declaration.
10104
10105 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
10106
10107         * typeck.c (build_x_unary_op): Remove bogus check for taking
10108         the address of a member function.
10109
10110 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
10111
10112         * parse.y (constructor_declarator): Only push the class if
10113         we are not already in the class.
10114
10115 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
10116
10117         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
10118         Add additional argument to INIT_CUMULATIVE_ARGS.
10119
10120 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
10121
10122         * decl.c (shadow_tag): Fix error about anon union with methods.
10123
10124         * parse.y (self_reference): Only generate a self-reference if this
10125         is a non-template class.
10126         (opt.component_decl_list): Only use it if it was generated.
10127
10128         * parse.y (component_decl_1): Use constructor_declarator.
10129         (fn.def2): Likewise.
10130         (notype_component_declarator0): Likewise.
10131
10132 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
10133
10134         * typeck.c (build_x_unary_op): Add checks for taking the address
10135         of a TARGET_EXPR or of a member function, and give appropriate
10136         warnings.
10137
10138 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
10139
10140         * pt.c (process_template_parm): Allow template type parms to be
10141         used as types for template const parms.
10142
10143 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
10144
10145         * init.c (expand_vec_init): Ensure the eh cleanups are on the
10146         function_obstack.
10147
10148 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
10149
10150         * decl.c (lookup_name_real): Be even more picky about the
10151         ambiguous lookup warning.
10152         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
10153         * parse.y (constructor_declarator): Rather than here.
10154
10155         * parse.y (constructor_declarator): New nonterminal.
10156         (fn.def1): Use it.
10157         (explicit_instantiation): Likewise.
10158
10159 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
10160
10161         Add implicit declaration of class name at class scope.
10162         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
10163         * parse.y (self_reference): New nonterminal.
10164         (opt.component_decl_list): Use it.
10165         (fn.def1): Add nested_name_specifier type_name cases.
10166         * class.c (build_self_reference): New function.
10167         (finish_struct): Handle access_default later, move self-reference
10168         decl to the end.
10169         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
10170         * cp-tree.h: Adjust.
10171
10172         * pt.c (do_function_instantiation): Separate handling of member
10173         functions and non-member functions properly.
10174
10175 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
10176
10177         * pt.c (process_template_parm): Improve error for 'volatile class K'.
10178
10179         * class.c (finish_struct_1): Check the right slot for destructors.
10180
10181         * decl.c (start_enum): Complain about enum templates.
10182
10183 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
10184
10185         * init.c (resolve_offset_ref): Offset pointers to member data by one.
10186         * typeck.c (unary_complex_lvalue): Likewise.
10187
10188 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
10189
10190         * typeck.c (c_expand_return): Check for a returned local
10191         array name, similar to the check for an ADDR_EXPR.
10192
10193 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
10194
10195         * decl.c (cp_finish_decl): Don't build cleanups for static
10196         variables here.
10197
10198 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
10199
10200         * typeck.c (build_modify_expr): Fix error messages to be more
10201         accurate.
10202         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
10203         assignment operators.
10204         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
10205         assignment operators.
10206
10207 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
10208
10209         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
10210         give an error if initialized.  Pedwarn about nested type with the
10211         same name as its enclosing class.
10212
10213         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
10214
10215         * typeck.c (require_complete_type): Be sure to instantiate the
10216         MAIN_VARIANT of the type.
10217
10218         * decl2.c (finish_file): Instantiate pending templates before
10219         processing static constructors and destructors.
10220
10221         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
10222         unless at_eof.
10223
10224 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
10225
10226         * decl2.c (delete_sanity): If error_mark_node is passed
10227         in as an expression, quit while we're ahead.
10228
10229         * decl.c (grokdeclarator): Give an error message if `friend'
10230         is combined with any storage class specifiers.
10231
10232 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
10233
10234         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
10235         definition of nonexistent nested type.
10236
10237         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
10238         not to say 'typedef'.
10239
10240 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10241
10242         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
10243         * search.c (dfs_walk, dfs_init_vbase_pointers,
10244         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
10245         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
10246
10247 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
10248
10249         * except.c (build_throw): Support minimal parse.
10250         * pt.c (tsubst_copy): Support THROW_EXPR.
10251         * decl2.c (build_expr_from_tree): Likewise.
10252
10253         * pt.c (mangle_class_name_for_template): Always allocate
10254         scratch_firstobj.
10255
10256 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
10257
10258         * cvt.c (cp_convert_to_pointer): Give an appropriate error
10259         when trying to cast from an incomplete type.
10260
10261 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
10262
10263         * pt.c (instantiate_class_template): Don't bother setting up
10264         CLASSTYPE_TAGS explicitly, as the nested types will add
10265         themselves.
10266
10267 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
10268
10269         * decl.c (shadow_tag): Remove old error check for usage of
10270         an enum without a previous declaration.
10271         (xref_tag): Add error message about usage of enums without a
10272         previous declaration.
10273
10274 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
10275
10276         * lex.c (do_identifier): Only do name consistency check if we're
10277         parsing.
10278
10279         * pt.c (push_template_decl): Don't crash if we get a member defn
10280         that doesn't match.
10281
10282         * decl.c (xref_tag_from_type): New function to do an xref without
10283         always having to figure out code_type_node.
10284         * cp-tree.h: Declare it.
10285         * pt.c (instantiate_class_template): Use it for friend classes.
10286         (lookup_template_class): Use it.
10287
10288         * typeck2.c (build_functional_cast): Pull out a single parm before
10289         passing it to build_c_cast.
10290
10291 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
10292
10293         * expr.c (do_case): Give an error message if a pointer is
10294         given as a case value.
10295
10296 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
10297
10298         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
10299         an overload list.
10300
10301         * lex.c (cons_up_default_function): Really, now, interface hackery
10302         does not apply to synthesized methods.
10303
10304 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
10305
10306         * call.c (build_method_call): Ctors and dtors now have special names
10307         with respect to lookups.
10308         * class.c (add_method): Likewise.
10309         (grow_method): Likewise.
10310         (finish_struct_methods): Likewise.
10311         (warn_hidden): Likewise.
10312         (finish_struct_1): Likewise.
10313         * cvt.c (convert_to_reference): Likewise.
10314         (convert_to_aggr): Likewise.
10315         (cp_convert): Likewise.
10316         * decl2.c (check_classfn): Likewise.
10317         * init.c (expand_member_init): Likewise.
10318         (expand_default_init): Likewise.
10319         (expand_aggr_init_1): Likewise.
10320         (build_offset_ref): Likewise.
10321         (build_new): Likewise.
10322         (build_delete): Likewise.
10323         * lex.c (do_inline_function_hair): Likewise.
10324         * search.c (lookup_field_1): Likewise.
10325         (lookup_fnfields_here): Likewise.
10326         (lookup_field): Likewise.
10327         (lookup_fnfields): Likewise.
10328         (get_virtual_destructor): Likewise.
10329         (dfs_debug_mark): Likewise.
10330         (dfs_pushdecls): Likewise.
10331         (dfs_compress_decls): Likewise.
10332         * tree.c (layout_basetypes): Likewise.
10333         * typeck.c (build_component_ref): Likewise.
10334         (build_x_function_call): Likewise.
10335         (build_modify_expr): Likewise.
10336         (convert_for_initialization): Likewise.
10337         (build_functional_cast): Likewise.
10338         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
10339         (CTOR_NAME): New.
10340         (DTOR_NAME): New.
10341         * decl.c (ctor_identifier): New.
10342         (dtor_identifier): New.
10343         (init_decl_processing): Set them.
10344
10345 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
10346
10347         * typeck.c (build_component_ref): Don't get confused by fields whose
10348         context has no type name, like pointer to member functions.
10349
10350 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
10351
10352         * decl.c (grokdeclarator): Handle typedef without declarator.
10353
10354         * pt.c (tsubst): Handle SCOPE_REF in declarator.
10355
10356         * parse.y (bad_parm): Catch another case of missing `typename'.
10357
10358         * lex.c (yyprint): Handle TYPE_DECLs.
10359
10360         * decl.c (start_function): Don't try to be clever.
10361
10362         * lex.c: Lose compiler_error_with_decl.
10363         * typeck2.c: Lose error_with_aggr_type.
10364         (incomplete_type_error): Use cp_* instead of old functions.
10365         (readonly_error): Likewise.
10366         * typeck.c (convert_arguments): Likewise.
10367         * search.c (lookup_nested_field): Likewise.
10368         * method.c (make_thunk): Likewise.
10369         * decl.c (grokparms): Likewise.
10370         * cp-tree.h: Update.
10371
10372         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
10373         and value.
10374
10375 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
10376
10377         * method.c (build_opfncall): When deleting a pointer to an
10378         array, build a new pointer to the tree past any ARRAY_TYPE
10379         nodes.
10380
10381 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10382
10383         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
10384
10385 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
10386
10387         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
10388         and ! DECL_INLINE.
10389
10390         * decl.c (finish_function): Don't set nested based on
10391         hack_decl_function_context.
10392         * parse.y (function_try_block): Check for nested function.
10393         (pending_inlines): Likewise.
10394
10395         * decl2.c (build_expr_from_tree): If a unary op already has a
10396         type, just return it.
10397
10398         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
10399
10400         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
10401         (finish_file): Check the return value of walk_vtables.
10402         (finish_prevtable_vardecl): Return int.
10403         (finish_vtable_vardecl): Likewise.
10404         (prune_vtable_vardecl): Likewise.
10405         * lex.c (set_vardecl_interface_info): Likewise.
10406         * cp-tree.h: Adjust return types.
10407
10408         * class.c (delete_duplicate_fields_1): Don't complain about
10409         duplicate nested types if they're the same type.
10410         (finish_struct): Remove check for duplicate.
10411         * decl2.c (grokfield): Don't check for typedef of anonymous type.
10412
10413 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
10414
10415         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
10416
10417         * decl.c (grokdeclarator): Lose special handling of class-level
10418         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
10419         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
10420
10421         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
10422
10423         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
10424
10425         * search.c (compute_access): Fix handling of anonymous union
10426         members.
10427         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
10428         from anonymous unions to their members.
10429
10430         * typeck.c (build_x_function_call): For static member functions,
10431         hand off to build_member_call.
10432
10433 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
10434
10435         * typeck.c (build_component_ref): Handle OFFSET_REFs.
10436
10437         * init.c (expand_vec_init): Fix init == 0 case.
10438
10439 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
10440
10441         * init.c (build_new): Pedwarn about init and array new.
10442         (expand_vec_init): Handle lists, use convert_for_initialization.
10443
10444         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
10445         when converting to an aggregate type.
10446         * cvt.c (cp_convert): Pass it through.
10447
10448         * typeck.c (build_conditional_expr): Handle user-defined
10449         conversions to slightly different types.
10450
10451         * decl.c (grokdeclarator): Force an array type in a parm to be
10452         permanent.
10453
10454         * decl2.c (do_using_directive): Sorry.
10455         (do_namespace_alias): Likewise.
10456         * lex.c (real_yylex): Warn about using the `namespace' keyword.
10457
10458 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
10459
10460         * parse.y (datadef): Move call to note_list_got_semicolon up.
10461
10462 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
10463
10464         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
10465
10466 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
10467
10468         * decl.c (cp_finish_decl): The exception regions have to be
10469         nested, not overlapping.  We start the exception region for a
10470         decl, after it has been fully built, and all temporaries for it
10471         have been cleaned up.
10472
10473 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
10474
10475         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
10476
10477 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
10478
10479         * tree.def: Add RETURN_INIT.
10480         * pt.c (instantiate_decl): Handle RETURN_INIT.
10481         * decl.c (store_return_init): Handle minimal_parse_mode.
10482
10483         * tree.c (cp_build_type_variant): Just return an error_mark_node.
10484         * decl.c (make_typename_type): Don't try to get the file and line
10485         of an identifier.
10486         * typeck.c (comptypes): Handle TYPENAME_TYPE.
10487
10488 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
10489
10490         * decl.c (poplevel): Make sure we clear out and restore old local
10491         non-VAR_DECL values by default when they go out of scope.
10492
10493 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
10494
10495         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
10496         referring to addresses of variables and functions.
10497
10498         * error.c (dump_expr): Support SIZEOF_EXPR.
10499
10500         * init.c (do_friend): Use the return value of check_classfn.
10501
10502         * typeck.c (convert_arguments): Call complete_type.
10503
10504         * method.c (hack_identifier): After giving an error, set value to
10505         error_mark_node.
10506
10507 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
10508
10509         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
10510         lossage for local classes.
10511         * cp-tree.h: Declare it.
10512         * decl.c (lookup_name_real): Evil, painful hack for local classes.
10513         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
10514         Use hack_decl_function_context.
10515         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
10516         (start_function): Use hack_decl_function_context.
10517         (finish_function): Likewise.
10518         * method.c (synthesize_method): Likewise.
10519         * lex.c (process_next_inline): Likewise.
10520         (do_pending_inlines): Likewise.
10521         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
10522         done with it.
10523
10524 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
10525
10526         * sig.c (build_signature_pointer_or_reference_type): Align
10527         signature pointers/references on 8-byte boundaries so they can be
10528         grabbed 2 words at a time on a Sparc.
10529
10530 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
10531
10532         * method.c (hack_identifier): Requiring a static chain is now a
10533         hard error.
10534         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
10535         functions.
10536
10537 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
10538
10539         * init.c (build_offset_ref): Call complete_type.
10540
10541         * decl.c (pop_from_top_level): Always pop previous_class_type.
10542
10543         * parse.y: Handle multiple decls in a for-init-statement.
10544         * pt.c (tsubst_expr): Likewise.
10545
10546         * pt.c (tsubst): Use tsubst_expr for the second operand of an
10547         ARRAY_REF.
10548
10549         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
10550         (poplevel_class): Set it here.
10551         (pop_from_top_level): Pop it here if we're returning to class scope.
10552         * class.c (pushclass): Don't set it here.
10553
10554         * decl.c (maybe_push_to_top_level): Save current_template_parms,
10555         and clear it if !pseudo.
10556         (pop_from_top_level): Restore it.
10557
10558         * decl2.c (finish_file): Push the dummy each time we walk the list
10559         of vtables.
10560
10561         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
10562         something for CAST_EXPR.
10563         
10564 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
10565
10566         * cvt.c (cp_convert): Warn about implicit conversion of the
10567         address of a function to bool, as it is always true.
10568
10569 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
10570
10571         * typeck.c (c_expand_return): Fix warning for local externs returned.
10572
10573 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
10574
10575         * tree.c (mapcar): Propagate const and volatile properly.
10576
10577         * typeck.c (complete_type): Be sure to instantiate the
10578         MAIN_VARIANT of the type.
10579
10580         * method.c (synthesize_method): Class interface hackery does not
10581         apply to synthesized methods.
10582
10583 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
10584
10585         * pt.c (comp_template_args): Use comptypes rather than just
10586         checking for TEMPLATE_TYPE_PARM equivalence.
10587
10588         * typeck.c (build_x_function_call): Call complete_type before
10589         checking TYPE_OVERLOADS_CALL_EXPR.
10590
10591 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
10592
10593         * g++.c (main): Check also for new define ALT_LIBM.
10594
10595 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
10596
10597         * pt.c (instantiate_class_template): If we don't have a pattern
10598         yet, that's OK.
10599         (coerce_template_parms): If we see a local class, bail.
10600
10601         * decl.c (grok_reference_init): Make sure there's a type before
10602         checking its code.
10603
10604         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
10605         (push_template_decl): Likewise.
10606
10607         * parse.y (named_class_head): Set
10608         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
10609
10610         * decl.c (xref_tag): Diagnose redeclaration of template
10611         type-parameter name.
10612
10613         * error.c (dump_type): Handle anonymous template type parms.
10614
10615         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
10616         TYPE_STUB_DECL.
10617         (coerce_template_parms): Likewise.
10618
10619 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
10620
10621         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
10622         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
10623
10624 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
10625
10626         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
10627         before trying to get its STUB_DECL.
10628         (coerce_template_parms): Likewise.
10629
10630         * parse.y (template_type_parm): If they didn't use 'class',
10631         pretend they did after giving an error.
10632
10633         * pt.c (coerce_template_parms): Diagnose use of local class.
10634
10635         * decl.c (grok_reference_init): Use instantiate_type.
10636
10637         * error.c (dump_expr): Handle TEMPLATE_DECLs.
10638
10639         * parse.y (named_class_head): Diagnose mismatching types and tags.
10640
10641         * decl.c (pushdecl): Type decls and class templates clash with
10642         artificial type decls, not hide them.
10643
10644         * decl.c (redeclaration_error_message): Diagnose redefinition of
10645         templates properly.
10646         (duplicate_decls): Diagnose disallowed overloads for template
10647         functions, too.
10648
10649         * decl.c (start_decl): Call complete_type before checking for a
10650         destructor.
10651
10652         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
10653
10654         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
10655
10656 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
10657
10658         * decl.c (grok_op_properties): Don't check for operator++(int) in
10659         a template.
10660
10661         * tree.c (perm_manip): Return a copy of variable and function
10662         decls with external linkage.
10663
10664         * tree.def: Change some of the min tree codes to type "1".
10665         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
10666         * method.c (build_overload_int): Emit something arbitrary for
10667         anything but an INTEGER_CST if we're in a template.
10668
10669         * decl.c (cp_finish_decl): Call complete_type before deciding
10670         whether or not to lay out the decl.
10671
10672         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
10673
10674 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
10675
10676         * typeck2.c (build_x_arrow): Call complete_type.
10677
10678         * pt.c (add_pending_template): Broken out.
10679         (lookup_template_class): If -fexternal-templates, call it for all
10680         the methods of implemented types.
10681         (instantiate_class_template): Instead of instantiating them here.
10682         (instantiate_decl): Handle -fexternal-templates earlier.
10683
10684 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10685
10686         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
10687         memoized lookup stuff inside GATHER_STATISTICS.
10688
10689 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
10690
10691         * decl.c (start_decl): Complain about array of incomplete type
10692         here.
10693         (grokdeclarator): Not here.
10694
10695         * parse.y (template_parm): Expand full_parm inline so we can set
10696         the rule's precedence.
10697
10698         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
10699         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
10700         * decl2.c (grokbitfield): Don't check for integer constant here.
10701         * class.c (finish_struct_1): Check here.
10702
10703         * decl.c (define_label): Make the min decl go on permanent_obstack.
10704
10705         * pt.c (unify): Don't handle CONST_DECLs.
10706         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
10707         (tsubst_copy): Likewise.
10708
10709         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
10710         CONST_DECL for a template parm.
10711
10712 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
10713
10714         * decl.c (grokdeclarator): Complain about array of incomplete type
10715         here.
10716         (start_decl_1): Not here.
10717
10718         * pt.c (tsubst): Handle pointer-to-function declarators.
10719
10720         * method.c (hack_identifier): If pedantic, diagnose local class
10721         methods that require a static chain.
10722
10723         * decl.c (grok_op_properties): No longer static.
10724         * cp-tree.h: Declare it.
10725         * pt.c (tsubst): Call it for operators.
10726         Use tsubst_copy for TREE_VECs.
10727
10728         * parse.y (template_arg): The expr has precedence like '>'.
10729
10730 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
10731
10732         * pt.c (coerce_template_parms): Don't coerce an expression using
10733         template parms.
10734         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
10735         (tsubst): Don't use build_index_2_type if the max_value uses template
10736         parms.
10737         * method.c (build_overload_int): Emit something arbitrary for an
10738         expression using template parms.
10739
10740         * parse.y (template_close_bracket): New non-terminal to catch use
10741         of '>>' instead of '> >' in template class names.
10742         (template_type): Use it.
10743         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
10744
10745         * tree.def: Add CAST_EXPR.
10746         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
10747         CONVERT_EXPR for minimal_parse_mode.
10748         * typeck.c (build_c_cast): Likewise.
10749         * pt.c (tsubst_copy): Likewise.
10750         * decl2.c (build_expr_from_tree): Likewise.
10751         * error.c (dump_expr): Likewise.
10752
10753 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10754
10755         * except.c (SetTerminate, SetUnexpected): Put back global vars.
10756         (init_exception_processing): Put back decl/init of
10757         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
10758         fns from libstdc++.
10759
10760         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
10761         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
10762         Delete unused fns.
10763         * cp-tree.h (declare_uninstantiated_type_level,
10764         uninstantiated_type_level_p): Delete prototypes.
10765
10766 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
10767
10768         * pt.c (tsubst_expr): Add default return.
10769
10770 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10771
10772         * error.c (fndecl_as_string): Delete unused arg CNAME.
10773         * sig.c (build_signature_table_constructor,
10774         build_signature_method_call): Fix calls.
10775
10776         * class.c (the_null_vtable_entry): Delete var definition.
10777         (init_class_processing): Delete tree the_null_vtable_entry init.
10778         * decl.c (no_print_{functions, builtins}): Declare as static.
10779         (__tp_desc_type_node): #if 0 var definition.
10780         (init_type_desc): #if 0 init of __tp_desc_type_node.
10781         (vb_off_identifier): Move var decl into init_decl_processing.
10782         (current_function_assigns_this): Declare as static.
10783         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
10784         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
10785         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
10786         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
10787         * init.c (BI_header_type, BI_header_size): Declare as static.
10788         * pt.c (template_classes): Delete unused var.
10789         (add_pending_template): Delete decl for non-existent fn.
10790         (lookup_template_class): Delete vars CODE and TAG_CODE.
10791         (instantiate_template): Delete unused var TARGS.
10792         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
10793         Delete decls.
10794         (__tp_desc_type_node): #if 0 var decl.
10795         (fndecl_as_string): Fix prototype.
10796
10797 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
10798
10799         * tree.def: Add GOTO_STMT.
10800         * pt.c (tsubst_expr): Support goto and labels.
10801         * decl.c (define_label): Support minimal parsing.
10802         * parse.y (simple_stmt): Likewise.
10803
10804 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10805
10806         * xref.c (GNU_xref_member): Only define/set var I if
10807         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
10808         used.
10809         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
10810         (GNU_xref_end): Fix call.
10811         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
10812         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
10813
10814         * tree.c (build_exception_variant): Delete unused vars I, A, T,
10815         T2, and CNAME.
10816         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
10817         (mapcar): Delete unused var CODE.
10818         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
10819         (break_out_cleanups): Fix call.
10820         (bot_manip): Likewise.
10821         * call.c (build_method_call): Likewise.
10822         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
10823         Likewise.
10824         * typeck.c (unary_complex_lvalue, build_modify_expr,
10825         convert_for_initialization): Likewise.
10826         * typeck2.c (build_functional_cast): Likewise.
10827         * cp-tree.h (build_cplus_new): Fix prototype.
10828
10829         * repo.c (open_repo_file): Delete unused var Q.
10830         (repo_compile_flags, repo_template_declared,
10831         repo_template_defined, repo_class_defined, repo_inline_used,
10832         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
10833         (repo_get_id, repo_vtable_used): Declare as static. 
10834         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
10835         prototypes.
10836
10837 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
10838
10839         * parse.y (pending_inlines): Add function_try_block case.
10840
10841         * pt.c (unify): Fix for template const parms.
10842
10843 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10844
10845         * lex.c (extract_interface_info): Delete forward decl.
10846         (default_copy_constructor_body, default_assign_ref_body): Delete
10847         decls for non-existent functions.
10848         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
10849         (init_lex): Delete setting them.
10850         (cons_up_default_function): Delete unused vars FUNC_BUF,
10851         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
10852         #if 0'd synth code.
10853         (toplevel, expression_obstack): Delete unused extern decls.
10854         (tree_node_kind): Delete unused enum.
10855         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
10856         GATHER_STATISTICS.
10857         (tree_node_kind_names): Delete unused extern decl.
10858         (synth_obstack): Delete unused var.
10859         (init_lex): Don't set it.
10860         (init_parse): Add decl before use.
10861         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
10862         (current_unit_{name, language}): Delete unused vars. 
10863         (check_newline): Don't bother setting them, just accept the #pragma.
10864         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
10865         (current_unit_{name, language}): Delete decls.
10866
10867         * search.c: Wrap all of the memoized functions, macros, and
10868         variables inside #ifdef GATHER_STATISTICS.
10869         (lookup_field, lookup_fnfields): Likewise.
10870         (init_search_processing): Likewise.
10871         (reinit_search_statistics): Wrap whole function.
10872         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
10873
10874         * decl.c (finish_function): Only call pop_memoized_context if
10875         GATHER_STATISTICS is defined.
10876         (start_function): Likewise for push_memoized_context.
10877         * class.c (pushclass, popclass): Likewise.
10878
10879         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
10880         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
10881
10882         * cvt.c (cp_convert): Delete unused local var FORM.
10883         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
10884         prototypes.
10885
10886 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
10887
10888         * pt.c (do_poplevel): Oops; really return what we get from
10889         poplevel this time.
10890
10891 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10892
10893         * cp-tree.h (is_aggr_type): Add prototype.
10894
10895         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
10896         * method.c ({push,pop}_cp_function_context): Delete decls.
10897         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
10898         (SetUnexpected, SetTerminate): Delete unused vars.
10899         (init_exception_processing): Don't set SetUnexpected or
10900         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
10901         (output_exception_table_entry): Delete unused array LABEL.
10902         (expand_internal_throw): Delete unused var PARAMS.
10903         (expand_start_catch_block): Delete unused var CLEANUP.
10904         (emit_exception_table): Delete unused var EH_NODE_DECL.
10905         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
10906         GOTO_UNWIND_AND_THROW.  Don't set them.
10907         (end_eh_unwinder): Add top decl.
10908         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
10909         (exception_section, push_rtl_perm, do_function_call,
10910         lang_interim_eh, push_eh_cleanup, eh_outer_context,
10911         expand_end_eh_spec, end_eh_unwinder): Declare as static.
10912         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
10913         throw_used): Likewise.
10914         * cp-tree.h (expand_end_eh_spec): Delete prototype.
10915
10916         * search.c (dfs_mark, dfs_mark_vtable_path,
10917         dfs_unmark_vtable_path, dfs_mark_new_vtable,
10918         dfs_unmark_new_vtable, dfs_clear_search_slot,
10919         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
10920         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
10921         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
10922         functions.
10923         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
10924         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
10925         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
10926         Only define #ifdef GATHER_STATISTICS.
10927         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
10928         is defined.
10929         (vbase_decl): Delete var definition.
10930         (init_search): Delete old decl.
10931         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
10932         never actually used.
10933         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
10934         (get_base_distance_recursive): Delete unused fourth arg
10935         BASETYPE_PATH.  Fix call .
10936         (get_base_distance): Fix call.
10937         (push_class_decls): Delete unused var ID.
10938         (make_memoized_table_entry): Declare as static.
10939         (breadth_first_search): Declare as static.
10940         (tree_has_any_destructor_p): Declare as static.
10941         (pop_class_decls): Delete unused arg pop_class_decls.
10942         * class.c (popclass): Fix call to pop_class_decls.
10943         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
10944         tree_has_any_destructor_p): Delete prototypes.
10945
10946         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
10947         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
10948         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
10949         (build_user_desc): Delete unused var T.
10950         (build_class_desc): Delete unused vars T and OFF.
10951         (build_t_desc): Delete unused var NAME_STRING.
10952         (build_headof): Make static.
10953         (get_bad_cast_node): Likewise.
10954         (get_def_to_follow): Likewise.
10955         * cp-tree.h (init_type_desc): Add prototype.
10956         (build_headof): Remove prototype.
10957
10958 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
10959
10960         * pt.c (tsubst): Only look for matching decls at file scope for
10961         non-member functions.
10962
10963         * call.c (build_scoped_method_call): Handle scoped destructor
10964         calls in templates.
10965
10966         * decl.c (*_top_level): Also save previous_class_values.
10967
10968         * pt.c (tsubst_expr): Support do {} while loops.
10969         * parse.y (simple_stmt): Likewise.
10970         * tree.def: Likewise.
10971
10972         * method.c (build_overload_identifier): For a class nested in a
10973         template class, don't mangle in the template parms from our
10974         context.
10975
10976         * lex.c, cp-tree.h: Remove support for template instantiations in
10977         the pending_inlines code.
10978         * pt.c: Remove dead functions and unused arguments.
10979         (uses_template_parms): TYPENAME_TYPEs always use template parms.
10980         * parse.y: Stop passing anything to end_template_decl.
10981         * tree.c (print_lang_statistics): Only print tinst info #ifdef
10982         GATHER_STATISTICS.
10983
10984 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
10985
10986         * init.c (expand_recursive_init{,_1}): Delete decls. 
10987         (sort_member_init): Delete unused var INIT.
10988         (emit_base_init): Delete unused var X.
10989         (build_offset_ref): Delete unused var CNAME.
10990         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
10991         (emit_base_init): Delete unused local var BASE.  Delete extern
10992         decl of IN_CHARGE_IDENTIFIER.
10993         (build_delete): Delete unused local var VIRTUAL_SIZE.
10994
10995         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
10996         (build_delete): Fix call.
10997         * decl2.c (delete_sanity): Likewise.
10998         * cp-tree.h (build_vec_delete): Update prototype.
10999
11000         * typeck.c (common_base_type): Delete unused var TMP.
11001         (build_binary_op): Delete local var ARGS_SAVE.
11002         (build_array_ref): Delete unused var ITYPE.
11003         (c_expand_return): Delete unused var USE_TEMP.
11004
11005         * typeck.c (compexcepttypes): Delete unused arg STRICT.
11006         (comptypes): Fix calls.
11007         * decl.c (duplicate_decls): Likewise.
11008         * cp-tree.h (compexcepttypes): Delete extra arg.
11009
11010         * decl2.c (check_classfn): Delete unused second arg CNAME.
11011         * decl.c (start_decl, grokfndecl): Fix calls.
11012         * init.c (do_friend): Likewise.
11013         * cp-tree.h (check_classfn): Update prototype.
11014
11015         * cp-tree.h (signature_error, import_export_vtable,
11016         append_signature_fields, id_in_current_class, mark_used,
11017         copy_assignment_arg_p): Add decls.
11018         * decl2.c (mark_used): Delete decl.
11019
11020         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
11021
11022         * class.c (get_vtable_entry): Diable unused function.
11023         (doing_hard_virtuals): Delete unused static global var.
11024         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
11025         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
11026         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
11027         (modify_one_vtable): Delete unused var OLD_RTTI.
11028         (finish_struct_anon): Delete unused vars OFFSET and X.
11029         (finish_struct_bits): Delete unused var METHOD_VEC.
11030         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
11031         for-scope local variable METHODS.
11032
11033         * call.c (user_harshness): Delete unused/unneeded arg PARM.
11034         (ideal_candidate): Delete unused args BASETYPE and PARMS.
11035         (build_method_call): Delete unused args passed into ideal_candidate.
11036         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
11037         * cp-tree.h (synthesize_method): Add decl.
11038
11039         * decl.c (note_level_for_for): Give void return type.
11040         (pushdecl_nonclass_level): Likewise.
11041         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
11042         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
11043         (suspend_binding_level): Delete unused var LEVEL.
11044         (duplicate_decls): Delete unused var CTYPE.
11045         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
11046         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
11047         PTR_ENDLINK.
11048         (grokdeclarator): Delete unused var C.
11049         (grokdeclarator): Delete unused var SIZE_VARIES.
11050         (grokparms): Delete unused var SAW_VOID.
11051         (start_function): Delete unused var OLDDECL.
11052         (cplus_expand_expr_stmt): Delete unused var
11053         REMOVE_IMPLICIT_IMMEDIATELY. 
11054
11055         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
11056
11057         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
11058
11059 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
11060
11061         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
11062         (build_min_nt): Likewise.
11063         * pt.c (do_pushlevel): Emit line note.
11064         (do_poplevel): Return what we get from poplevel.
11065         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
11066         * parse.y: Use do_pushlevel and do_poplevel.
11067         * cp-tree.h: Declare do_poplevel.
11068         
11069         * cp-tree.h: Declare at_eof.
11070         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
11071         * decl2.c (import_export_decl): Renamed from import_export_inline.
11072         (finish_file): Call it to do interface handling for statics.
11073         * pt.c (tsubst_copy): Call mark_used on variables and functions
11074         used here.
11075
11076         * decl2.c (finish_file): Don't emit statics we can't generate.
11077         * pt.c (instantiate_decl): Don't set interface on instantiations
11078         we can't generate.
11079
11080         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
11081         * tree.c (print_lang_statistics): Print max template depth.
11082         * pt.c (push_tinst_level): Dump entire instantiation context.
11083         (instantiate_class_template): Use it and pop_tinst_level.
11084         (instantiate_decl): Likewise.
11085
11086         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
11087         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
11088
11089 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
11090
11091         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
11092         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
11093         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
11094         the new template implementation.
11095
11096 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11097
11098         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
11099
11100 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
11101
11102         * decl.c (cp_finish_decl): Delay emitting the debug information for
11103         a typedef that has been installed as the canonical typedef, if the
11104         type has not yet been defined.
11105
11106 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
11107
11108         * decl2.c (grokfield): Still call pop_nested_class for access decls.
11109
11110 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11111
11112         * decl.c (lookup_label): Call label_rtx.
11113
11114         * decl.c (make_binding_level): New function.
11115         (pushlevel, pushlevel_class): Call it instead of explicit
11116         duplicate calls to xmalloc.
11117
11118         * decl.c (init_decl_processing): Delete useless build_pointer_type
11119         call.
11120
11121         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
11122         (sizet_ftype_string): Delete variable.
11123         (init_decl_processing): Add built-in functions fabsf, fabsl,
11124         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
11125         variable strlen_ftype, used for strlen.
11126
11127 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
11128
11129         * decl.c (push_to_top_level): Start from current_binding_level
11130         again for now; the stl hacks depend on g++ being broken in this
11131         way, and it'll be fixed in the template rewrite.
11132
11133         * tree.def: Add USING_DECL.
11134         * decl2.c (do_class_using_decl): Implement.
11135         (grokfield): Pass access decls off to do_class_using_decl instead of
11136         grokdeclarator.
11137         * error.c (dump_decl): Handle USING_DECLs.
11138         * decl.c (grokdeclarator): Remove code for handling access decls.
11139         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
11140         as access decls for now.
11141         (finish_struct): Don't check USING_DECLs for other uses of the name.
11142
11143         * search.c (get_matching_virtual): Use cp_error_at.
11144
11145 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11146
11147         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
11148         match c-typeck.c.
11149         (self_promoting_args_p): Move the check that TYPE is non-nil
11150         before trying to look at its main variant.
11151         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
11152
11153         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
11154         Delete macros.
11155         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
11156         (do_friend): Delete call to xref_friend.
11157         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
11158
11159         * typeck.c (convert_sequence): #if 0 unused function.
11160
11161         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
11162         be in decl_in_memory_p.
11163         (decl_in_memory_p): Delete decl.
11164         * expr.c (decl_in_memory_p): Delete fn.
11165         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
11166
11167         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
11168
11169 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
11170
11171         * class.c (finish_struct_1): Check for a pure-specifier on a
11172         non-virtual function here.
11173
11174         * decl2.c (grok_function_init): Don't check whether the function
11175         is virtual here.
11176         (grokfield): Don't call check_for_override here.
11177
11178         * decl.c (push_to_top_level): Start from inner_binding_level,
11179         check class_shadowed in class levels.
11180
11181 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
11182
11183         * decl.c (resume_level): Ignore things that don't have names, instead
11184         of core dumping.
11185
11186 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11187
11188         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
11189
11190 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
11191
11192         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
11193         synthesized dtor.
11194
11195         * parse.y (complete_type_name): Bind global_scope earlier.
11196         (complex_type_name): Likewise.
11197         (qualified_type_name): Remove.
11198
11199 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
11200
11201         * decl.c (grokfndecl): Move code that looks for virtuals in base
11202         classes...
11203         * class.c (check_for_override): ... to a new function.
11204         (finish_struct_1): Call it.
11205
11206         * cp-tree.h: Declare warn_sign_compare.
11207
11208         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
11209         rather than extra_warnings to decide whether to warn about
11210         comparison of signed and unsigned.
11211
11212         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
11213         implies -Wsign-compare.  -Wall doesn't imply -W.
11214
11215 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
11216
11217         * typeck.c (build_component_ref): Fix to handle anon unions in base
11218         classes as well.
11219
11220 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11221
11222         * class.c (resolves_to_fixed_type_p): Delete code dealing with
11223         a WITH_CLEANUP_EXPR, since we don't generate them any more.
11224         * cvt.c (build_up_reference): Likewise.
11225         * decl.c (grok_reference_init): Likewise.
11226         (cp_finish_decl): Likewise.
11227         * error.c (dump_expr): Likewise.
11228         * tree.c (real_lvalue_p): Likewise.
11229         (lvalue_p): Likewise.
11230         (build_cplus_new): Likewise.
11231         (unsave_expr_now): Likewise.
11232         * typeck.c (unary_complex_lvalue, build_modify_expr,
11233         c_expand_return): Likewise.
11234
11235 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11236
11237         Make the C++ front-end pay attention to attributes for structures.
11238         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
11239         finish_struct_1.
11240         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
11241         Take out old round_up_size use and setting the DECL_ALIGN possibly
11242         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
11243         can override what the attribute set.
11244         * cp-tree.h (finish_struct): Update prototype.
11245         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
11246         attributes to finish_struct.
11247         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
11248         value down into finish_struct.
11249         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
11250
11251 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
11252
11253         * decl.c (poplevel):  Re-word dead for local handling.
11254         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
11255         (cp_finish_decl):  If is_for_scope, check for duplicates so
11256         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
11257
11258         * lex.c (do_identifier):  Use global binding in preference of
11259         dead for local variable.
11260
11261 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
11262
11263         * init.c (initializing_context): Handle anon union changes, the
11264         context where fields of anon unions can be initialized now has to be
11265         found by walking up the TYPE_CONTEXT chain.
11266
11267 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
11268
11269         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
11270         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
11271         (obscure_complex_init): If bss is supported, always set
11272         DECL_INITIAL to error_mark_node.
11273
11274 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11275
11276         * init.c (is_friend): Make sure there's a context before we see if
11277         it's an aggr type.
11278
11279 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
11280
11281         * init.c (is_friend): Classes are not friendly with nested classes.
11282
11283 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
11284
11285         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
11286         and record its result.
11287
11288 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
11289
11290         * class.c (finish_struct_anon): Switch around code to not move anon
11291         union elements around, nor mess up their contexts, nor offsets,
11292         instead we now build up the right number of COMPONENT_REFs for all
11293         the anon unions that may be present at build_component_ref time.
11294         * typeck.c (lookup_anon_field): New routine to handle field lookup
11295         on fields without names.  We find them, based upon their unique type
11296         instead.
11297         * typeck.c (build_component_ref): Allow FIELD_DECL components.
11298         Handle finding components in anonymous unions, and ensure that a
11299         COMPONENT_REF is built for each level as necessary.
11300
11301 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
11302
11303         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
11304         code that ensures that copy ctors are used if appropriate.
11305
11306 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11307
11308         * init.c (build_vec_delete): Only give an error if base isn't an
11309         error_mark_node.
11310
11311 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
11312
11313         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
11314         (yylex): If we see `new', keep slurping.
11315
11316 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
11317
11318         * class.c (finish_struct_1): Move code for handling anon unions...
11319         (finish_struct_anon): to here.  Fixup so that we do the offset
11320         calculations right, and so that the fields are physically moved to
11321         the containers's chain.
11322
11323 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11324
11325         * decl.c (grokdeclarator): Avoid trying to get an operand off an
11326         identifier node.
11327
11328 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
11329
11330         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
11331         POINTER_SIZE to agree with expr.c.
11332
11333 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
11334
11335         * search.c (lookup_field): Don't report ambiguities if protect is 0,
11336         instead return NULL_TREE.
11337
11338 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
11339
11340         * class.c (finish_struct_1): Call warn_hidden if we want warnings
11341         about overloaded virtual functions.
11342         (warn_hidden): New routine to warn of virtual functions that are
11343         hidden by other virtual functions, that are not overridden.
11344         (get_basefndecls): New routine, used by warn_hidden.
11345         (mark_overriders): New routine, used by warn_hidden.
11346         * search.c (get_matching_virtual): Remove old warning that just
11347         isn't very useful.
11348
11349 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11350
11351         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
11352
11353         * typeck.c (null_ptr_cst_p): Delete unused fn.
11354         (build_function_call_maybe): Delete unused fn.
11355
11356         * expr.c (extract_init): #if 0 the code after unconditional return 0
11357         for now.
11358
11359         Delete old cadillac code.
11360         * edsel.c: Remove file.
11361         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
11362         * Makefile.in (CXX_OBJS): Delete edsel.o.
11363         (edsel.o): Delete rule.
11364         * cp-tree.h (flag_cadillac): Delete var decl.
11365         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
11366         * decl2.c (flag_cadillac): Delete var definition.
11367         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
11368         (grokfield): Delete code depending on flag_cadillac.
11369         (finish_anon_union): Likewise.
11370         * class.c (finish_struct_1): Likewise.
11371         (pushclass): Likewise.
11372         (popclass): Likewise.
11373         (push_lang_context): Likewise.
11374         (pop_lang_context): Likewise.
11375         * decl.c (init_decl_processing): Likewise.
11376         (start_decl): Likewise.
11377         (cp_finish_decl): Likewise.
11378         (xref_tag): Likewise.
11379         (finish_enum): Likewise.
11380         (start_function): Likewise.
11381         (finish_function): Likewise.
11382         (finish_stmt): Likewise.
11383         * lex.c (lang_init): Likewise.
11384         (check_newline): Likewise.
11385
11386         * lex.c (do_pending_inlines): Delete synthesized method kludge.
11387
11388         Delete defunct, ancient garbage collection implementation.
11389         * rtti.c: New file with the RTTI stuff from gc.c.
11390         * gc.c: Removed file (moved the remaining stuff into rtti.c).
11391         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
11392         (rtti.o): New rule, replacing gc.o.
11393         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
11394         * cp-tree.h: Delete gc-related fn decls.
11395         (DECL_GC_OFFSET): Delete macro.
11396         (flag_gc): Delete extern decl.
11397         * decl.c (current_function_obstack_index): Delete var decl.
11398         (current_function_obstack_usage): Delete var decl.
11399         (start_function): Delete clearing of current_function_obstack_index
11400         and current_function_obstack_usage.
11401         (init_decl_processing): Delete code relying on -fgc.
11402         Delete call to init_gc_processing.
11403         (cp_finish_decl): Delete calls to build_static_gc_entry and
11404         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
11405         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
11406         and to expand_expr of a __gc_main call.
11407         (maybe_gc_cleanup): Delete var decl.
11408         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
11409         * decl2.c (flag_gc): Delete var decl.
11410         (lang_f_options): Delete offering of -fgc.
11411         (lang_decode_option): Delete -fgc and -fno-gc handling.
11412         (get_temp_regvar): Delete gc code.
11413         * init.c (build_new): Delete gc code.
11414         * lex.c (init_lex): Delete checking of flag_gc.
11415
11416         * typeck.c (convert_arguments): Delete gc code.
11417         (build_component_addr): Delete -fgc warning.
11418         (build_modify_expr): Delete gc code.
11419
11420         * decl2.c (build_push_scope): Delete fn.
11421         * cp-tree.h (build_push_scope): Delete decl.
11422
11423         * search.c (clear_search_slots): Delete fn.
11424         * cp-tree.h (clear_search_slots): Delete decl.
11425
11426         * search.c (tree_needs_constructor_p): Delete fn.
11427         * cp-tree.h (tree_needs_constructor_p): Delete decl.
11428
11429         * tree.c (id_cmp): Delete fn.
11430
11431         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
11432         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
11433
11434         * tree.c (decl_value_member): Delete fn.
11435         * cp-tree.h (decl_value_member): Delete decl.
11436
11437         * tree.c (list_hash_lookup_or_cons): Delete fn.
11438         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
11439
11440         * method.c (cplus_exception_name): Delete fn.
11441         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
11442
11443         * spew.c (shift_tokens): Delete fn.
11444
11445 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
11446
11447         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
11448         to cp_finish_decl.
11449         * parse.y: Likewise.
11450
11451 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11452
11453         * tree.c (build_cplus_staticfn_type): Delete function definition;
11454         never used.
11455         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
11456
11457         * tree.c (virtual_member): Delete function definition; never used.
11458         * cp-tree.h (virtual_member): Delete decl.
11459
11460 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
11461
11462         * typeck.c (build_component_ref): Handle getting vbase pointers
11463         out of complex multiple inheritance better.
11464
11465 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
11466
11467         * typeck.c (build_object_ref): Make sure we use the real type, not
11468         any reference type.
11469
11470 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
11471
11472         * tree.c (build_exception_variant): Don't create new types if we
11473         don't have to, also build new types on the right obstack.
11474
11475 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
11476
11477         * decl.c (store_bindings): Split out from push_to_top_level.
11478         (push_to_top_level): Call it for b->type_shadowed on class binding
11479         levels.
11480
11481 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
11482
11483         * search.c (expand_upcast_fixups): Fix so that offsets stored in
11484         vbase_offsets are always right.  Fixes a problem where virtual base
11485         upcasting and downcasting could be wrong during conversions on this
11486         during virtual function dispatch at ctor/dtor time when dynamic
11487         vtable fixups for deltas are needed.  This only sounds easier than
11488         it is.  :-)
11489         (fixup_virtual_upcast_offsets): Change to reflect new calling
11490         convention for expand_upcast_fixups.
11491
11492 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11493
11494         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
11495         check that it's usable as the bitfield width.
11496
11497 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11498
11499         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
11500         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
11501         only ever used for functions in it.
11502
11503 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
11504
11505         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
11506         (nested_type): Likewise.
11507         (nested_name_specifier): Use lastiddecl.
11508
11509         * decl.c (grokdeclarator): Adjust accordingly.
11510         * init.c (expand_member_init): Likewise.
11511         * parse.y (base_class): Likewise.
11512         * typeck2.c (build_functional_cast): Likewise.
11513
11514         * typeck2.c (build_functional_cast): Fill in name after we've
11515         checked for non-aggr type.
11516
11517 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
11518
11519         * decl2.c (warn_pointer_arith): Default to on.
11520
11521 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
11522
11523         * lex.c (is_rid): New function.
11524         * decl.c (grokdeclarator): Diagnose reserved words used as
11525         declarator-ids.
11526
11527 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
11528
11529         * tree.c (get_decl_list): Don't lose cv-quals.
11530
11531         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
11532         typespecs used as declarator-ids.
11533
11534 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
11535
11536         * decl.c (poplevel): When poping a level, don't give a warning for
11537         any subblocks that already exist.
11538
11539 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
11540
11541         * typeck.c (build_object_ref): Finish what I started.
11542
11543         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
11544
11545         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
11546
11547         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
11548         scope.
11549
11550 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
11551
11552         * decl.c (xref_tag): Handle passing a type in directly.
11553
11554         * parse.y (qualified_type_name): Pull out the type.
11555         (nested_type): Likewise.
11556         Take types directly instead of as identifiers.
11557         * call.c (build_scoped_method_call): Take types directly instead of
11558         as identifiers.
11559         * decl.c (xref_basetypes): Likewise.
11560         * init.c (expand_member_init): Likewise.
11561         (build_member_call): Likewise.
11562         (build_offset_ref): Likewise.
11563         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
11564         * method.c (do_build_assign_ref): Likewise.
11565         * decl.c (grokdeclarator): Handle a type appearing as the
11566         declarator-id for constructors.
11567         * method.c (do_build_copy_constructor): current_base_init_list now
11568         uses the types directly, not their names.
11569         * init.c (sort_base_init): Likewise.
11570         (expand_member_init): Likewise.
11571         * init.c (is_aggr_type): New function, like is_aggr_typedef.
11572
11573 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
11574
11575         * tree.c (layout_basetypes): Call build_lang_field_decl instead
11576         of build_lang_decl if first arg is a FIELD_DECL.
11577
11578 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11579
11580         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
11581         non-empty.
11582         * except.c (expand_start_catch_block): Set TREE_USED to avoid
11583         warnings about the catch handler.
11584
11585 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
11586
11587         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
11588         expand_target_expr.
11589
11590 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
11591
11592         Fix access control to use trees rather than integers.
11593         * class.c (access_{default, public, protected, private,
11594         default_virtual, public_virtual, private_virtual}_node): Add
11595         definitions.
11596         (init_class_processing): Do creation of those nodes.
11597         * cp-tree.h (access_type): Delete enum decl.
11598         (access_{default, public, protected, private, default_virtual,
11599         public_virtual, private_virtual}_node): Add decls.
11600         (compute_access): Change return type.
11601         * search.c (compute_access): Have tree return type, instead of enum.
11602         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
11603         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
11604         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
11605         * parse.y (VISSPEC): Make ttype rather than itype.
11606         (base_class_access_list): Likewise.
11607         * *.[cy]: Change all refs of `access_public' to `access_public_node',
11608         etc.
11609         * call.c (build_method_call): Make ACCESS be a tree.
11610         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
11611         * cvt.c (convert_to_aggr): Likewise.
11612         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
11613         Likewise.
11614         * method.c (hack_identifier): Likewise.
11615         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
11616
11617 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
11618
11619         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
11620         frontend, and make it more consistent with respect to
11621         warn_pointer_arith.
11622
11623 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
11624
11625         * decl.c (pushdecl): Check for duplicate parameter names.
11626
11627 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
11628
11629         * decl.c (expand_static_init): Call assemble_external for atexit.
11630
11631 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
11632
11633         * except.c (do_unwind): Remove some generated dead code.
11634         (eh_outer_context): New routine, factor out some common code from
11635         expand_builtin_throw and end_eh_unwinder.  Add code to do return
11636         address masking for the PA.
11637         (expand_builtin_throw): Use eh_outer_context instead of open coding
11638         it here.
11639         (end_eh_unwinder): Likewise.
11640
11641 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
11642
11643         * except.c (expand_throw): Call assemble_external for __empty, if we
11644         use it.
11645
11646 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
11647
11648         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
11649         NORMAL_RETURN_ADDR_OFFSET.
11650         (end_eh_unwinder): Likewise.
11651
11652 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
11653
11654         * gc.c (build_dynamic_cast): Make sure we don't cast away const
11655         when dealing with references, and make sure we handle dynamic
11656         casting to a cv qualified reference.
11657
11658 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
11659
11660         * except.c (struct eh_context): New structure top hold eh context
11661         information.
11662         (push_eh_context): New routine.
11663         (pop_eh_context): Likewise.
11664         * decl.c (push_cp_function_context): Use them.
11665         (pop_cp_function_context): Likewise.
11666
11667 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
11668
11669         * decl2.c (finish_file): Also prune uninteresting functions in the
11670         inline emission loop.
11671
11672 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
11673
11674         * sig.c (build_signature_table_constructor): Mark functions
11675         in the signature as referenced.
11676
11677 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
11678
11679         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
11680         the inline emission stuff.
11681
11682 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
11683
11684         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
11685         weak symbols.   
11686         * lang-options.h: Add -f{no-,}weak.
11687         * decl.c (init_decl_processing): If the target does not support weak
11688         symbols, don't use them.
11689         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
11690
11691 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
11692
11693         * init.c (expand_member_init): warning for base init after members.
11694
11695 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
11696
11697         * cvt.c (build_expr_type_conversion): Don't convert to a reference
11698         type.
11699
11700 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
11701
11702         * method.c (report_type_mismatch): Improve wording for volatile
11703         mismatches.
11704
11705 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
11706
11707         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
11708         expand_assignment, as the later doesn't handle things that have
11709         copy constructors well.  The compiler would do bitwise copying,
11710         instead of ctor calling in some cases.
11711
11712 Wed Dec 13 17:05:54 PST 1995  Paul Eggert  <eggert@twinsun.com>
11713
11714         * g++.c (my_strerror): Return "cannot access" if errno is 0.
11715         (pfatal_with_name, perror_exec): Don't assume that
11716         the returned value from my_strerror contains no '%'s.
11717         (concat): Remove.
11718         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
11719
11720 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
11721
11722         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
11723         TYPE_METHODS/TREE_CHAIN mean what they used to. 
11724         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
11725         instead of TYPE_METHODS.
11726         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
11727         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
11728         * cp-tree.h (CLASSTYPE_METHODS): Lose.
11729         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
11730         TYPE_METHODS.
11731         (struct lang_decl): Lose next_method field.
11732         (DECL_NEXT_METHOD): Lose.
11733         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
11734         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
11735         anymore.
11736         (finish_struct_methods): Don't mess with the TREE_CHAINs in
11737         fn_fields.
11738
11739         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
11740         vector.
11741
11742         * call.c (build_method_call): Synthesize here even when not inlining.
11743         * typeck.c (build_function_call_real): Likewise.
11744
11745 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
11746
11747         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
11748         == DBX_DEBUG, call dbxout_start_new_source_file and
11749         dbxout_resume_previous_source_file when appropriate.
11750
11751 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
11752
11753         * except.c (start_anon_func): Push to the top level.
11754         (end_anon_func): Pop from the top level.
11755
11756 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
11757
11758         * cp-tree.h (build_cleanup): New routine to build cleanups.
11759         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
11760         call at ctor time and use atexit to run it later.
11761         * decl2.c (build_cleanup): New routine, taken from finish_file.
11762         (finish_file): Use build_cleanup instead, and don't put function
11763         local statics in global dtor list.
11764         
11765 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
11766
11767         * except.c (expand_throw): Ensure that we have cleanups, if we try
11768         and expand cleanups.
11769
11770 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
11771
11772         * except.c (expand_throw): Add logic to manage dynamic cleanups for
11773         the EH object.
11774         (expand_end_catch_block): Use the magic of expand_goto, instead of
11775         emit_jump so that we get the cleanup for any catch clause parameter
11776         and the cleanup for the exception object.  Update to reflect label
11777         changes.
11778         (push_eh_cleanup): New routine to register a cleanup for an
11779         exception object.
11780         (empty_fndecl): Used to default cleanup actions to
11781         nothing.
11782         (init_exception_processing): Setup empty_fndecl.  Setup
11783         saved_cleanup.
11784         (expand_start_catch_block): Update to reflect label changes.  Call
11785         push_eh_object to register the cleanup for the EH object.
11786         (start_anon_func): New routine to start building lambda expressions
11787         from trees.
11788         (end_anon_func): New routine to end them.
11789         (struct labelNode): Change so that we can use tree labels, or rtx
11790         labels.
11791         (saved_cleanup): Object to check for dynamic cleanups for the
11792         exception handling object.
11793         (push_label_entry): Change so that we can use tree labels, or rtx
11794         labels.
11795         (pop_label_entry): Likewise.
11796         (top_label_entry): Likewise.
11797         (expand_start_all_catch): Use tree label instead of rtx label, so
11798         that we can get the magic of expand_goto.
11799         (expand_end_all_catch): Update to reflect label changes.
11800
11801         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
11802         use UNSAVE_EXPRs.
11803         typeck.c (get_member_function_from_ptrfunc): Remove remnants of
11804         building_cleanup logic, as we now use UNSAVE_EXPRs.
11805         * cp-tree.h (unsave_expr): Declare it.
11806         * decl.c (building_cleanup): Remove.
11807         (maybe_build_cleanup): Remove building_cleanup logic, and use
11808         UNSAVE_EXPR instead.
11809
11810 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
11811
11812         * gc.c (build_t_desc): Update error message to say <typeinfo>.
11813
11814 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11815
11816         * decl.c (pushdecl): Only warn about shadowing a local variable if
11817         warn_shadow is true.
11818
11819 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
11820
11821         * typeck.c (build_binary_op_nodefault): Added warning about
11822         comparisons between different enum types with -Wall, unless
11823         -fenum-int-equiv set.
11824
11825 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
11826
11827         * class.c (finish_struct_1): Skip down to the inner type in
11828         multidimensional arrays.  Ensures ctors will be made for types that
11829         need constructing.
11830
11831 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
11832
11833         * decl.c (last_dtor_insn): New to track the last compiler generated
11834         insn in a dtor.
11835         (store_parm_decls): Set it.
11836         (finish_function): Use it to see if the dtor is empty.  Avoid doing
11837         vtable setup all the time, if we can.
11838         (struct cp_function): Add last_dtor_insn.
11839         (push_cp_function_context): Save it.
11840         (pop_cp_function_context): Restore it.
11841
11842 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
11843
11844         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
11845         warnings.
11846
11847 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
11848
11849         * typeck.c (expand_target_expr): Make sure targets get put into the
11850         current temp_slot_level, so that the free_temp_slots call will reuse
11851         them.
11852
11853 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
11854
11855         * class.c (finish_struct_1): Delay delta fixups for virtual bases
11856         until after we have done the hard virtuals, to avoid a bogus `every
11857         virtual function must have a unique final overrider' for virtual
11858         functions that are only overridden by hard virtuals.
11859
11860 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
11861
11862         * pt.c (do_function_instantiation): Don't try to find a file-scope
11863         template for a member function.
11864
11865 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
11866
11867         * g++.c (main): Add handling of -nodefaultlibs.
11868
11869 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
11870
11871         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
11872         distinguish between direct bindings of reference variables, and
11873         indirect bindings of reference variables.
11874         * cvt.c (build_up_reference): Use it.
11875         * typeck.c (convert_arguments): Use it to indicate this is an
11876         indirect binding.
11877         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
11878         as they are unused.
11879         (expand_static_init): Likewise.
11880         (cplus_expand_expr_stmt): Likewise.
11881         * decl2.c (finish_file): Likewise.
11882         * init.c (perform_member_init): Likewise.
11883         (emit_base_init): Likewise.
11884         (expand_aggr_vbase_init_1): Likewise.
11885
11886 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11887
11888         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
11889         get a DECL_LANG_SPECIFIC node.
11890         * cp-tree.h (lang_decl_flags): Add new member `level'.
11891         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
11892         decl_flags level member.
11893
11894 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11895
11896         * call.c (build_method_call): Make sure instance has a
11897         TYPE_LANG_SPECIFIC node before we dive into it.  
11898
11899 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
11900
11901         * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
11902
11903 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
11904
11905         * decl.c (duplicate_decls): When smashing decls, smash staticness in
11906         the usual way.
11907
11908 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
11909
11910         * decl.c (poplevel): Handle the merging of subblocks of cleanups
11911         when finishing blocks that have already been created (usually due to
11912         the fixup goto code).  Fixes bad debugging information.
11913
11914 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
11915
11916         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
11917         that's not a list of overloaded functions.
11918
11919 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11920
11921         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
11922         before trying to use DECL_ABSTRACT_VIRTUAL_P.
11923
11924 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
11925
11926         * decl2.c (mark_used): New function for hooking into setting of
11927         TREE_USED on decls.
11928         * call.c (build_method_call): Use it.
11929         * class.c (instantiate_type): Likewise.
11930         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
11931         for all like-named functions.
11932         * method.c (hack_identifier): Likewise.
11933         (emit_thunk): Don't call assemble_external.
11934         (make_thunk): Create thunk as a FUNCTION_DECL so that it
11935         gets the right mode and ENCODE_SECTION_INFO works.
11936         
11937         * parse.y: Use mark_used.  Pass operator names to do_identifier.
11938         * lex.c (do_identifier): Handle operator names.
11939
11940         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
11941
11942 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11943
11944         * errfn.c: Include stdio.h.
11945         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
11946
11947 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
11948
11949         * typeck2.c (digest_init): Always convert initializers to the
11950         right type.
11951
11952 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
11953
11954         * init.c (member_init_ok_or_else): Don't allow member initializers
11955         for indirect members, as it is invalid.
11956
11957 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11958
11959         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
11960
11961 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
11962
11963         * parse.y (for.init.statement): Catch compound statements inside for
11964         initializations, if we're being pedantic.
11965
11966 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
11967
11968         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
11969         looking for.
11970
11971 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
11972
11973         * error.c (dump_expr): Don't core dump when a boolean expression is
11974         used as a default argument.
11975
11976 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
11977
11978         * class.c (finish_struct_bits): Check aggregate_value_p instead of
11979         RETURN_IN_MEMORY.
11980
11981 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
11982
11983         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
11984         BLKmode type that would otherwise be returned in registers.
11985
11986 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11987
11988         * g++.c (WITHLIBC): New macro.
11989         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
11990         saw_libc and pass it at the end if it was set.
11991
11992 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
11993
11994         * parse.y (fn.def1): Call split_specs_attrs in
11995         declmods notype_declarator case.