1Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2
3	* Makefile.in (cvt.o): Depend on toplev.h.
4
5	* cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6
7	* cvt.c: Include toplev.h.
8
9	* except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10	definitions.
11
12	* init.c (expand_vec_init): Initialize variable `itype'.
13
14	* lex.c (yyerror): Cast the argument passed to a ctype function to
15	an unsigned char.
16
17	* method.c (build_mangled_C9x_name): Wrap prototype and definition
18	in "HOST_BITS_PER_WIDE_INT >= 64".
19
20	* typeck.c (build_binary_op): Mark parameter `convert_p' with
21	ATTRIBUTE_UNUSED.
22
231998-12-22  Mark Mitchell  <mark@markmitchell.com>
24
25	* cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
26	* tree.c (build_exception_variant): Don't crash on empty throw
27	specs.
28
291998-12-18  DJ Delorie  <dj@cygnus.com>
30
31	* cvt.c (convert_to_reference): Check for both error_mark_node
32	and NULL_NODE after call to convert_for_initialization.
33
341998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
35
36	* error.c (interesting_scope_p): New fn.
37	(dump_simple_decl): Use it.
38	(dump_expr, case CONSTRUCTOR): Force a & for a PMF.
39	(dump_expr, case OFFSET_REF): Print ->* if appropriate.
40
411998-12-16  Mark Mitchell  <mark@markmitchell.com>
42
43	* class.c (resolve_address_of_overloaded_function): Do conversion
44	to correct type here, rather than ...
45	(instantiate_type): Here.
46
47	* cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
48	(DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
49	(decl_template_parm_p): Remove.
50	* decl.c (pushdecl): Don't set DECL_CONTEXT for a template
51	parameter.
52	* lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
53	* pt.c (push_inline_template_parms_recursive): Set it.
54	(decl_template_parm_p): Remove.
55	(check_template_shadow): Use DECL_TEMPLATE_PARM_P.
56	(process_template_parm): Set it.
57
58Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
59
60	* lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
61	if configured with cpplib.
62
631998-12-15  Mark Mitchell  <mark@markmitchell.com>
64
65	* decl.c (poplevel): Make sure ns_binding is initialized.
66
67	* decl.c (finish_function): Undo inadvertent change in previous
68	patch.
69
701998-12-14  Mark Mitchell  <mark@markmitchell.com>
71
72	* class.c (pushclass): Tweak handling of class-level bindings.
73	(resolve_address_of_overloaded_function): Update pointer-to-member
74	handling.
75	(instantiate_type): Likewise.
76	* cvt.c (cp_convert_to_pointer): Likewise.
77	* decl.c (pop_binding): Take the DECL to pop, not just the name.
78	Deal with `struct stat' hack.
79	(binding_level): Add to documentation.
80	(push_binding): Clear BINDING_TYPE.
81	(add_binding): New function.
82	(push_local_binding): Use it.
83	(push_class_binding): Likewise.
84	(poplevel): Adjust calls to pop_binding.
85	(poplevel_class): Likewise.
86	(pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
87	declarations to current binding level.
88	(push_class_level_binding): Likewise.
89	(push_overloaded_decl): Adjust handling of OVERLOADs in local
90	bindings.
91	(lookup_namespace_name): Don't crash when confronted with a
92	TEMPLATE_DECL.
93	(lookup_name_real): Do `struct stat' hack in local binding
94	contexts.
95	(build_ptrmemfunc_type): Adjust documentation.
96	(grokdeclarator): Don't avoid building real array types when
97	processing templates unless really necessary.
98	(finish_method): Adjust calls to pop_binding.
99	* decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
100	not reparse_decl_as_expr.
101	(build_expr_from_tree): Deal with a template-id as the function to
102	call in a METHOD_CALL_EXPR.
103	* pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
104	(maybe_adjust_types_For_deduction): Don't do peculiar things with
105	METHOD_TYPEs here.
106	(resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
107	pointer-to-member types where necessary.
108	* tree.c (build_cplus_array_type_1): Don't avoid building real
109	array types when processing templates unless really necessary.
110	(build_exception_variant): Compare the exception lists correctly.
111
1121998-12-13  Mark Mitchell  <mark@markmitchell.com>
113
114	* cp-tree.def (CPLUS_BINDING): Update documentation.
115	* cp-tree.h (LOCAL_BINDING_P): New macro.
116	(lang_identifier): Rename local_value to bindings.
117	(tree_binding): Make `scope' of type `void*', not `tree'.
118	(BINDING_SCOPE): Update documentation.
119	(IDENTIFIER_LOCAL_VALUE): Remove.
120	(IDENTIFIER_CLASS_VALUE): Document.
121	(IDENTIFIER_BINDING): New macro.
122	(IDENTIFIER_VALUE): Likewise.
123	(TIME_IDENTIFIER_TIME): Likewise.
124	(TIME_IDENTIFIER_FILEINFO): Likewise.
125	(IMPLICIT_TYPENAME_P): Likewise.
126	(set_identifier_local_value): Remove.
127	(push_local_binding): New function.
128	(push_class_binding): Likewise.
129	* class.c (pushclass): Update comments; use push_class_binding.
130	* decl.c (set_identifier_local_value_with_scope): Remove.
131	(set_identifier_local_value): Likewise.
132	(push_binding): New function.
133	(pop_binding): Likewise.
134	(binding_level): Update documentation.  Remove shadowed.
135	(BINDING_LEVEL): New macro.
136	(free_binding_nodes): New variable.
137	(poplevel): Adjust for new name-lookup scheme.  Don't mess up
138	BLOCK_VARs when doing for-scope extension.  Remove effectively
139	dead code.
140	(pushlevel_class): Tweak formatting.
141	(poplevel_class): Adjust for new name-lookup scheme.
142	(print_binding_level): Likewise.
143	(store_bindings): Likewise.
144	(pushdecl): Likewise.
145	(pushdecl_class_level): Likewise.
146	(push_class_level_binding): Likewise.
147	(push_overloaded_decl): Update comments.  Adjust for new
148	name-lookup scheme.
149	(lookup_name_real): Likewise.
150	(lookup_name_current_level): Likewise.
151	(cp_finish_decl): Likewise.
152	(require_complete_types_for_parms): Likewise.  Remove misleading
153	#if 0'd code.
154	(grok_parms): Likewise.  Don't call
155	require_complete_types_for_parms here.
156	(grok_ctor_properties): Don't treat templates as copy
157	constructors.
158	(grop_op_properties): Or as assignment operators.
159	(start_function): Document.  Adjust for new name-lookup scheme.
160	(finish_function): Likewise.
161	* decl2.c (do_local_using_decl): Use push_local_binding.
162	* lex.c (begin_definition_of_inclass_inline): New function, split
163	out from ...
164	(do_pending_inlines): Here, and ...
165	(process_next_inline): Here.
166	(get_time_identifier): Use TIME_IDENTIFIER_* macros.
167	(init_filename_times): Likewise.
168	(extract_interface_info): Likewise.
169	(ste_typedecl_interface_info): Likewise.
170	(check_newline): Likewise.
171	(dump_time_statistics): Likewise.
172	(handle_cp_pragma): Likewise.
173	(do_identifier): Adjust for new name-lookup scheme.
174	* parse.y (function_try_block): Return ctor_initializer_opt value.
175	(fndef): Use it.
176	(fn.defpen): Pass appropriate values to start_function.
177	(pending_inline): Use functor_try_block value, and pass
178	appropriate values to finish_function.
179	* pt.c (is_member_template): Update documentation; remove handling
180	of FUNCTION_DECLs.  As per name, this function should deal only in
181	TEMPLATE_DECLs.
182	(decl_template_parm_p): Change name of olddecl parameter to decl.
183	(check_template_shadow): Adjust for new name-lookup scheme.
184	(lookup_template_class): Likewise.
185	(tsubst_decl): Tweak so as not to confuse member templates with
186	copy constructors and assignment operators.
187	(unify): Handle UNION_TYPEs.
188	* ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
189	(lang_print_xnode): Adjust for new name-lookup scheme.
190	* typeck.c (mark_addressable): Likewise.
191	(c_expand_return): Likewise.
192
1931998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
194
195	* decl.c (grokdeclarator): Allow field with same name as class
196	in extern "C".
197
198	* decl.c (lookup_name_real): Don't limit field lookup to types.
199	* class.c (check_member_decl_is_same_in_complete_scope): No error
200	if icv and x are the same.
201	* lex.c (do_identifier): Tweak error message.
202
2031998-12-10  Mark Mitchell  <mark@markmitchell.com>
204
205	* decl.c (start_enum): Use push_obstacks, not
206	end_temporary_allocation.
207	(finish_enum): Call pop_obstacks.
208
2091998-12-10  Mark Mitchell  <mark@markmitchell.com>
210
211	* class.c (instantiate_type): Return error_mark_node rather than
212	junk.
213
2141998-12-09  Mark Mitchell  <mark@markmitchell.com>
215
216	* cp-tree.h (most_specialized_instantiation): New function.
217	(print_candidates): Likewise.
218	* class.c (validate_lhs): Remove.
219	(resolve_address_of_overloaded_function): New function, split out
220	and then substantially reworked, from ...
221	(instantiate_type): Use it.  Simplify.
222	* cvt.c (convert_to_reference): Complain when caller has indicated
223	that's the right thing to do.  Don't crash if instantiate_type
224	fails.
225	* pt.c: Substitute `parameters' for `paramters' throughout.
226	(print_candidates): Don't make it static.
227	(most_specialized_instantiation): Split out from ...
228	(most_specialized): Here.
229
230Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
231
232	* lex.c (lang_init_options): Initialize cpplib.
233	* decl2.c (parse_options,cpp_initialized): Removed.
234	(lang_decode_option): Move initialization of cpplib to
235	lang_init_options.
236
2371998-12-09  Mark Mitchell  <mark@markmitchell.com>
238
239	* decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
240	well as the TYPE_DECL, when a typedef name is assigned to a
241	previously anonymous type.
242
2431998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
244
245	* cp/except.c (call_eh_info): Use __start_cp_handler instead of
246	__cp_eh_info for getting the eh info pointer.  Add table_index to
247	field list.
248	(push_eh_cleanup): Don't increment 'handlers' data field.
249	(process_start_catch_block): Don't set the 'caught' field.
250
251	* cp/exception.cc (CP_EH_INFO): New macro for getting the
252	exception info pointer within library routines.
253	(__cp_eh_info): Use CP_EH_INFO.
254	(__start_cp_handler): Get exception info pointer, set caught field,
255	and increment the handlers field.  Avoids this being done by handlers.
256	(__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
257	(uncaught_exception): Use CP_EH_INFO macro.
258
259Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
260
261	* Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
262
263Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
264
265	* lex.c (check_newline): Add support for \ as `natural'
266	characters in file names in #line to be consistent with #include
267	handling.  We support escape processing in the # 1 "..." version of
268	the command.  See also support in cp/lex.c.
269
2701998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
271
272	* cp/decl2.c: s/data/opts/ when initializing cpp_reader
273	structure.
274
2751998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
276
277	* decl.c (build_typename_type): Set DECL_ARTIFICIAL.
278
279	* error.c (dump_simple_decl): Also print namespace context.
280	(dump_function_decl): Likewise.
281
282	* decl2.c (ambiguous_decl): Don't print old value if it's
283	error_mark_node.
284
285	* decl.c (lookup_name_real): Fix handling of local types shadowed
286	by a non-type decl.  Remove obsolete code.
287	* cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
288
289	* lang-options.h: Add -fpermissive.
290	* decl2.c: Likewise.
291	* cp-tree.h: Add flag_permissive.
292	* decl.c (init_decl_processing): If neither -fpermissive or -pedantic
293	were specified, set flag_pedantic_errors.
294	* call.c (build_over_call): Turn dropped qualifier messages
295	back into pedwarns.
296	* cvt.c (convert_to_reference): Likewise.
297	* typeck.c (convert_for_assignment): Likewise.
298
2991998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
300
301	* decl2.c (coerce_new_type): Use same_type_p.
302	(coerce_delete_type): Likewise.
303
304	* call.c (check_dtor_name): Return 1, not error_mark_node.
305
3061998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
307
308	* lex.c (handle_cp_pragma): Disable #pragma interface/implementation
309	if MULTIPLE_SYMBOL_SPACES.
310
311	* pt.c (check_template_shadow): New fn.
312	* decl2.c (grokfield): Use it.
313	* decl.c (pushdecl): Likewise.
314	(pushdecl_class_level): Likewise.
315	(start_method): Likewise.
316	(xref_tag): Don't try to use 't' if we're defining.
317
318	* call.c (check_dtor_name): Just return an error_mark_node.
319	* pt.c (lookup_template_class): Complain about using non-template here.
320	* parse.y (apparent_template_type): Not here.
321
322	* pt.c (check_explicit_specialization): Complain about specialization
323	with C linkage.
324
325	* lang-options.h: Add -f{no-,}implicit-inline-templates.
326
327	* pt.c (convert_nontype_argument): Don't assume that any integer
328	argument is intended to be a constant-expression.
329
3301998-12-03  Mark Mitchell  <mark@markmitchell.com>
331
332	* class.c (handle_using_decl): Fix comment.  Don't lookup
333	constructors in base classes.
334	(validate_lhs): Fix typo in comment.
335	* search.c (lookup_field_1): Don't return a USING_DECL.
336
337	* cp-tree.h (DECL_ACCESS): Improve documentation.
338
339	* decl.c (expand_static_init): Don't set the initialization-done
340	flag until the initialization is done.
341
3421998-12-02  Mark Mitchell  <mark@markmitchell.com>
343
344	* decl2.c (validate_nonmember_using_decl): Complain about using
345	declarations for class members.
346
3471998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
348
349	* typeck2.c (process_init_constructor): Use same_type_p.
350
351	* decl.c (check_tag_decl): Don't warn about null decl inside a
352	class.
353
354	* pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
355	UNIFY_ALLOW_NONE.
356	(convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
357	(resolve_overloaded_unification): Strip baselinks.
358
359Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
360
361	* g++spec.c: Don't prototype xmalloc.
362
3631998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
364
365	* except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
366
367	* decl.c (check_tag_decl): Do complain about null friend decl at
368	file scope.
369
3701998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
371
372	* lex.c (make_lang_type): Clear the whole struct lang_type, not
373	only the first multiple of sizeof (int).
374
3751998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
376
377	* decl.c (start_decl): An explicit specialization of a static data
378	member is only a definition if it has an initializer.
379
380	* except.c (expand_throw): Use cp_finish_decl for the throw temp.
381	* cvt.c (build_up_reference): Pass DIRECT_BIND down into
382	cp_finish_decl.
383	* init.c (expand_default_init): Check for DIRECT_BIND instead of
384	DECL_ARTIFICIAL.
385
386	* call.c (build_over_call): Use build_decl.
387
388	* except.c (expand_throw): Just use convert, not
389	build_reinterpret_cast.
390
391	* lex.c (handle_generic_pragma): Use token_buffer.
392
393	* decl.c (check_tag_decl): Don't complain about null friend decl.
394
3951998-11-24  Dave Pitts  <dpitts@cozx.com>
396
397	* Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
398	first position.
399	* lex.c (check_newline): Use ISALPHA.
400	(readescape): Use ISGRAPH.
401	(yyerror): Use ISGRAPH.
402
4031998-11-24  Nathan Sidwell  <nathan@acm.org>
404
405	* search.c (get_abstract_virtuals): Do not use initial
406	CLASSTYPE_ABSTRACT_VIRTUALS.
407	* typeck2.c (abstract_virtuals_error): Show location of abstract
408	declaration.
409	* call.c (build_new_method_call): Use
410	CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
411	* class.c (finish_struct_bits): Don't bother working out whether
412	get_abstract_virtuals will do anything, just do it.
413
4141998-11-24  Graham  <grahams@rcp.co.uk>
415
416	* typeck.c (build_component_ref): Remove unused statement.
417
4181998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
419
420	* class.c (add_method): Catch invalid overloads.
421
422	* class.c (add_method): Build up OVERLOADs properly for conversion ops.
423	* search.c (lookup_conversions): Handle getting real OVERLOADs.
424	(add_conversions): Likewise.  Revert last change.
425	* call.c (add_conv_candidate): Pass totype to add_candidate instead
426	of fn.  Don't add a new candidate if the last one was for the same
427	type.
428	(print_z_candidates): Handle getting a type as a function.
429	(joust): If we got two conversion candidates to the same type,
430	just pick one.
431	(build_object_call): Lose 'templates'.
432	(build_user_type_conversion_1): Handle getting real OVERLOADs.
433
4341998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
435
436	* typeck2.c (process_init_constructor): If there are elements
437	that don't have initializers and they need to have constructors
438	run, supply them with initializers.
439
440	* class.c (finish_struct_1): A class with a 0-width bitfield is
441	still empty.
442
4431998-11-23  Mark Mitchell  <mark@markmitchell.com>
444
445	* pt.c (instantiate_class_template): Don't try to figure out what
446	specialization to use for a partial instantiation.  Correct
447	typos in a couple of comments.  Avoid calling uses_template_parms
448	multiple times.
449
4501998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
451
452	* method.c (process_overload_item): Add call to
453	build_mangled_C9x_name for intTI_type_nodes.
454	(build_mangled_C9x_name): Add prototype, define.
455	* decl.c (init_decl_processing): Add names for
456	TImode_type_node.
457
4581998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
459
460	* parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
461
462	* class.c (finish_struct_1): Set things up for 0-width bitfields
463	like we do for others.
464
465	* decl.c (check_tag_decl): New fn.
466	(shadow_tag): Split out from here.
467	* decl2.c (grok_x_components): Call it.
468
4691998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
470
471	* decl.c: Lose warn_about_return_type.
472	(grokdeclarator): Always complain about implicit int, except for
473	`main () { ... }'.
474
475	* decl.c (tag_name): New fn.
476	(xref_tag): Complain about using typedef-name after class-key.
477
478	* init.c (expand_vec_init): Also keep going if from_array.
479
480	* tree.c (is_overloaded_fn): Also handle the output of
481	build_offset_ref.
482
483	* decl.c (grokdeclarator): Use constructor_name when comparing
484	field name against enclosing class.
485	* class.c (finish_struct_anon): Likewise.
486
4871998-11-22  Mark Mitchell  <mark@markmitchell.com>
488
489	* decl.c (poplevel): Remove code to handle KEEP == 2.
490	(finish_function): Don't confuse BLOCK-order when
491	processing a destructor.
492
4931998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
494
495	* decl.c (require_complete_types_for_parms): Call layout_decl
496	after we've completed the type.
497
4981998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
499
500	* decl2.c (validate_nonmember_using_decl): Allow using templates
501	from the global namespace.
502
5031998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
504
505	Handle specifying template args to member function templates.
506	* tree.c (build_overload): Always create an OVERLOAD for a template.
507	* search.c (add_conversions): Handle finding an OVERLOAD.
508	* decl2.c (check_classfn): Likewise.
509	* lex.c (identifier_type): See through a baselink.
510	* parse.y (do_id): Don't call do_identifier if we got a baselink.
511	* class.c (instantiate_type, case TREE_LIST): Recurse.
512
513	* decl.c (grokdeclarator): Allow a boolean constant for array
514	bounds, odd as that sounds.
515
516	* pt.c (unify): Be more strict about non-type parms, except for
517	array bounds.
518	(UNIFY_ALLOW_INTEGER): New macro.
519
5201998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
521
522	* Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
523
5241998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
525
526	* semantics.c (begin_class_definition): Call
527	maybe_process_partial_specialization before push_template_decl.
528	Don't call push_template_decl for a specialization.
529	* search.c (lookup_field): Do return a member template class.
530	* decl2.c (handle_class_head): Handle member template classes.
531
532	* decl.c (grokdeclarator): A parm type need not be complete.
533
534	* pt.c (convert_nontype_argument): Fix thinko.
535
5361998-11-18  Mark Mitchell  <mark@markmitchell.com>
537
538	* cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
539	(global_delete_fndecl): New variable.
540	* decl.c (global_delete_fndecl): Define it.
541	(init_decl_processing): Set it.
542	* init.c (build_builtin_delete_call): Use it.
543	* tree.c (mapcar): Recursively call mapcar for the type of EXPR
544	nodes.
545
5461998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
547
548	* decl.c (cplus_expand_expr_stmt): Always complain about unresolved
549	type.
550
551	* tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
552	* call.c (build_object_call): Also support references to functions.
553	* typeck.c (convert_for_initialization): Don't decay a function
554	if the target is a reference to function.
555
556	* search.c (add_conversions): Get all the overloads from a class.
557
558	* decl.c (grok_ctor_properties): Complain about any constructor
559	that will take a single arg of the class type by value.
560
561	* typeck2.c (build_functional_cast): Can't create objects of
562	abstract classes this way.
563	* cvt.c (ocp_convert): Likewise.
564
565	* decl.c (grokfndecl): Member functions of local classes are not
566	public.
567
5681998-11-18  Mark Mitchell  <mark@markmitchell.com>
569
570	* Make-lang.in (cc1plus): Add dependency on hash.o.
571
5721998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
573
574	* search.c (get_abstract_virtuals): Complain about virtuals with
575	no final overrider.
576	* typeck2.c (abstract_virtuals_error): Remove handling for virtuals
577	with no final overrider.
578	* class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
579	on virtuals with no final overrider.
580
581	* lex.c (reinit_parse_for_block): Add a space after the initial ':'.
582
583	* class.c (finish_struct_1): Don't remove zero-width bit-fields until
584	after layout_type.
585
586	* friend.c (do_friend): Don't set_mangled_name_for_decl.
587
588	* class.c (finish_struct_anon): Complain about non-fields.
589	* decl2.c (build_anon_union_vars): Likewise.
590
591	* decl.c (grokdeclarator): Normal data members can't have the same
592	name as the class, either.
593	* class.c (finish_struct_anon): Neither can members of an
594	anonymous union.
595
5961998-11-17  Mark Mitchell  <mark@markmitchell.com>
597
598	* cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
599	(TYPE_BINFO): Likewise.
600	(IS_AGGR_TYPE): Tweak.
601	(SET_IS_AGGR_TYPE): New macro.
602	(CLASS_TYPE_P): Tweak.
603	(lang_type): Group mark bitfields together.  Remove linenum.
604	(CLASSTYPE_SOURCE_LINE): Remove macro.
605	(CLASSTYPE_MARKED_N): New macro.
606	(SET_CLASSTYPE_MARKED_N): Likewise.
607	(CLEAR_CLASSTYPE_MARKED_N): Likewise.
608	(CLASS_TYPE_MARKED_*): Use them.
609	(SET_CLASSTYPE_MARKED_*): Likewise.
610	(CLEAR_CLASSTYPE_MARKED_*): Likewise.
611	(TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
612	(TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
613	(TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
614	* class.c (class_cache_obstack): New variable.
615	(class_cache_firstobj): Likewise.
616	(finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
617	(pushclass): Free the cache, when appropriate.
618	(popclass): Tidy.
619	(maybe_push_cache_obstack): Use class_cache_obstack.
620	* decl.c (include hash.h).
621	(typename_hash): New function.
622	(typename_compare): Likewise.
623	(build_typename_type): Check the hash table to avoid creating
624	duplicates.
625	(build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
626	(grokdeclarator): Use CLASS_TYPE_P.
627	(xref_basetypes): Likewise.
628	(start_function): Likewise.  Don't put current_class_ref on the
629	permanent obstack.
630	* error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
631	and TYPE_TI_ARGS.
632	* lex.c (note_got_semicolon): Use CLASS_TYPE_P.
633	(make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
634	fields for types other than class types.  Do clear TYPE_ALIAS_SET
635	for types other than class types, though.
636	* method.c (build_overload_identifier): Use CLASS_TYPE_P and
637	TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
638	* pt.c (process_template_parm): Don't set
639	CLASSTYPE_GOT_SEMICOLON.
640	(lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
641	Coerce arguments on the momentary obstack.
642	(for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
643	(instantiate_class_template): Calculate template arguments on the
644	momentary obstack.  Tidy.
645	(tsubst_template_arg_vector): Use make_temp_vec.
646	(tsubst_aggr_type): Put template arguments on the momentary
647	obstack.
648	(tsubst_decl): Likewise.
649	(tsubst): Copy the array bounds index to the permanent obstack
650	before building index types.  Use new macros.
651	(unify): Use new macros.
652	(do_type_instantiation): Likewise.
653	* search.c (lookup_fnfields_1): Use new macros.
654	(dfs_pushdecls): Build envelopes on the cache obstack.
655	(dfs_compress_decls): Use new macros.
656	(push_class_decls): Build on the cache obstack.
657	* semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
658	* sign.c (build_signature_pointer_or_reference_type): Use
659	SET_IS_AGGR_TYPE.
660	* tree.c (make_binfo): Check CLASS_TYPE_P.
661	(copy_template_template_parm): Adjust.
662	(make_temp_vec): Use push_expression_obstack.
663	* typeck.c (complete_type): Use new macros.
664	(comptypes): Likewise.
665
6661998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
667
668	* pt.c (tsubst): Add diagnostics for invalid array, reference
669	and pointer to member types.
670
6711998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
672
673	* typeck2.c (my_friendly_abort): Don't fatal twice in a row.
674
675	* typeck.c (c_expand_start_case): Use build_expr_type_conversion.
676	Simplify.
677
678	* parse.y (structsp): Fix cut-and-paste error.
679
680	* init.c (build_new): Complain about non-integral size.
681
682	* parse.y (unary_expr): Complain about defining types in sizeof.
683
684	* typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
685
686	* rtti.c (build_x_typeid): Complain about typeid without
687	including <typeinfo>.
688	(get_typeid): Likewise.  Complain about typeid of incomplete type.
689	(get_tinfo_fn_dynamic): Likewise.
690	(get_typeid_1): Not static anymore.
691	* except.c (build_eh_type_type): Use get_typeid_1.
692
693	* rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
694	ambiguous or private bases.  Fix warning for reference cast.
695
6961998-11-16  Mark Mitchell  <mark@markmitchell.com>
697
698	* cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
699	* decl.c (duplicate_decls): Remove special-case code to deal with
700	template friends, and just do the obvious thing.
701	* pt.c (register_specialization): Tweak for clarity, and also to
702	clear DECL_INITIAL for an instantiation before it is merged with a
703	specialization.
704	(check_explicit_specialization): Fix indentation.
705	(tsubst_friend_function): Handle both definitions in friend
706	declaration and outside friend declarations.
707	(tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
708	(regenerate_decl_from_template): Tweak accordingly.
709	(instantiate_decl): Likewise.
710
7111998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
712
713	* decl.c (cplus_expand_expr_stmt): Promote warning about naked
714	member function reference to error.
715	* cvt.c (ocp_convert): Complain about converting an overloaded
716	function to void.
717
718	* init.c (build_offset_ref): Just return a lone static member
719	function.
720
721	* decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
722	not internal ones.
723
724	* typeck.c (build_binary_op_nodefault): Improve error handling.
725
726	* decl.c (grokfndecl): Complain about making 'main' a template.
727
728	* typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
729
730	* call.c (build_method_call): Handle a BIT_NOT_EXPR around a
731	TYPE_DECL in a template.
732
7331998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
734
735	* typeck2.c (my_friendly_abort): Add URL in the other case, too.
736
737	* decl.c (struct cp_function): Add named_label_uses.
738	(push_cp_function_context): Save it.
739	(pop_cp_function_context): Restore it.
740	(define_label): Also complain about jumping into the scope of
741	non-POD objects that don't have constructors.
742	* tree.c (pod_type_p): New fn.
743
744	* pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
745	* rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
746	(get_tinfo_fn): Not here.
747	* repo.c (repo_get_id): Abort if we get called for an incomplete
748	type.
749
7501998-11-13  Mark Mitchell  <mark@markmitchell.com>
751
752	* except.c (expand_throw): Make sure first argument to
753	__cp_push_exception is of type `void*' to avoid spurious error
754	messages.
755
7561998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
757
758	* pt.c (try_one_overload): Take orig_targs again.  Only check for
759	mismatches against them; we don't care what a previous call found.
760	(resolve_overloaded_unification): Adjust.
761
762	* search.c (lookup_field): Don't return anything for a non-type
763	field from a dependent type.
764	* decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
765	in an array declarator.
766	(start_decl): Push into the class before looking for the field.
767
7681998-11-08  Mark Mitchell  <mark@markmitchell.com>
769
770	* method.c (build_overload_value): Handle REFERENCE_TYPE.
771
7721998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
773
774	* decl.c (grokdeclarator): Allow namespace-scoped members if they
775	are friends.
776
7771998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
778
779	* pt.c (tsubst_decl): Don't mess with the global value of an
780	un-mangled DECL_ASSEMBLER_NAME.
781
7821998-11-03  Christopher Faylor  <cgf@cygnus.com>
783
784	* decl.c (init_decl_processing): Remove CYGWIN conditional
785	since CYGWIN is now able to deal with trapping signals.
786
787Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
788
789	* cp-tree.h: Don't include gansidecl.h.
790	* exception.cc: Include gansidecl.h (since we don't include config.h)
791	* g++spec.c: Don't include gansidecl.h.
792
7931998-11-06  Mark Mitchell  <mark@markmitchell.com>
794
795	* cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
796	size of dummy.
797	(DECL_DEFINED_IN_CLASS_P): New macro.
798	(TEMPLATE_PARMS_FOR_INLINE): Document.
799	(check_static_variable_definition): New function.
800	* decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
801	appropriate.
802	(check_static_variable_definition): Split out from ...
803	(grokdeclarator): Here.
804	* pt.c (check_default_tmpl_args): New function, split out from ...
805	(push_template_decl_real): Here.
806	(instantiate_template): Fix comment.
807
8081998-11-04  Mark Mitchell  <mark@markmitchell.com>
809
810	* cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
811	(CP_TYPE_VOLATILE_P): Likewise.
812	(CP_TYPE_RESTRICT_P): Likewise.
813
8141998-11-03  Mark Mitchell  <mark@markmitchell.com>
815
816	* pt.c (tsubst): Use build_index_type, not build_index_2_type.
817
8181998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
819
820	* class.c (instantiate_type): Be more helpful.
821
822	* decl2.c (import_export_decl): Call import_export_class.
823
824	* cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
825	* decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
826	* pt.c (tsubst_copy): Likewise.
827
8281998-11-02  Mark Mitchell  <mark@markmitchell.com>
829
830	* init.c (expand_vec_init): Fix off-by-one error.
831
8321998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
833
834	* parse.y (apparent_template_type): New type.
835	(named_complex_class_head_sans_basetype): Use it.
836	* Makefile.in (CONFLICTS): One new conflict.
837	* parse.c: Regenerated.
838
8391998-11-01  Mark Mitchell  <mark@markmitchell.com>
840
841	* cp-tree.h (COMPARE_STRICT): New macro.
842	(COMPARE_BASE): Likewise.
843	(COMPARE_RELAXED): Likewise.
844	(COMPARE_REDECLARATION): Likewise.
845	(same_type_p): Likewise.
846	(same_or_base_type_p): Likewise.
847	* call.c (standard_conversion): Use them, in place of comptypes
848	with numeric arguments.
849	(reference_binding): Likewise.
850	(convert_like): Likewise.
851	(build_over_call): Likewise.
852	(is_subseq): Likewise.
853	(is_properly_derived_from): Likewise.
854	(compare_ics): Likewise.
855	(joust): Likewise.
856	* class.c (delete_duplicate_fields_1): Likewise.
857	(resolves_to_fixed_type_p): Likewise.
858	(instantiate_type): Likewise.  Remove #if 0'd code.
859	* decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
860	(pushdecl): Likewise.
861	(lookup_name_real): Likewise.
862	(grokdeclarator): Likewise.  Check for illegal array declarations.
863	(grokparms): Likewise.
864	(grok_op_properties): Likewise.
865	* decl2.c (check_classfn): Likewise.
866	* friend.c (is_friend): Likewise.
867	(make_friend_class): Likewise.
868	* init.c (expand_aggr_init): Likewise.
869	(expand_vec_init): Likewise.
870	* pt.c (is_member_template_class): Remove declaration.
871	(is_specialization_of): Use COMPARE_* and new macros.
872	(comp_template_parms): Likewise.
873	(convert_nontype_argument): Likewise.
874	(coerce_template_template_parms): Likewise.
875	(template_args_equal): Likewise.
876	(lookup_template_class): Likewise.
877	(type_unification_real): Likewise.
878	(unify): Likewise.
879	(get_bindings_real): Likewise.
880	* search.c (covariant_return_p): Likewise.
881	(get_matching_virtual): Likewise.
882	* sig.c (match_method_types): Likewise.
883	* tree.c (vec_binfo_member): Likewise.
884	(cp_tree_equal): Likewise.
885	* typeck.c (common_type): Likewise.
886	(comp_array_types): Likewise.  Get issues involving unknown array
887	bounds right.
888	(comptypes): Update comments.  Use new flags.
889	(comp_target_types): Use new macros.
890	(compparms): Likewise.
891	(comp_target_parms): Likewise.
892	(string_conv_p): Likewise.
893	(build_component_ref): Likewise.
894	(build_indirect_ref): Likewise.
895	(build_conditional_expr): Likewise.
896	(build_static_cast): Likewise.
897	(build_reinterpret_cast): Likewise.
898	(build_const_cast): Likewise.
899	(build_modify_expr): Likewise.
900	(convert_for_assignment): Likewise.
901	(comp_ptr_ttypes_real): Likewise.
902	(ptr_reasonably_similar): Likewise.
903	(comp_ptr_ttypes_const): Likewise.
904
9051998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
906
907	* rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
908
9091998-10-30  Mark Mitchell  <mark@markmitchell.com>
910
911	* decl2.c (delete_sanity): Pass integer_zero_node, not
912	integer_two_node, to build_vec_delete.
913	* init.c (build_array_eh_cleanup): Remove.
914	(expand_vec_init_try_block): New function.
915	(expand_vec_init_catch_clause): Likewise.
916	(build_vec_delete_1): Don't deal with case that auto_delete_vec
917	might be integer_two_node anymore.
918	(expand_vec_init): Rework for initialization-correctness and
919	exception-correctness.
920	* typeck2.c (process_init_constructor): Make mutual exclusivity
921	of cases more obvious.
922
9231998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
924
925	* decl.c (lookup_name_real): OK, only warn if not lexing.
926	Simplify suggested fix.
927
928	* cp-tree.h (IDENTIFIER_MARKED): New macro.
929	* search.c (lookup_conversions): Use breadth_first_search.
930	(add_conversions): Avoid adding two conversions to the same type.
931	(breadth_first_search): Work with base binfos, rather
932	than binfos and base indices.
933	(get_virtual_destructor): Adjust.
934	(tree_has_any_destructor_p): Adjust.
935	(get_matching_virtual): Adjust.
936
937	* pt.c (push_template_decl_real): Generalize check for incorrect
938	number of template parms.
939	(is_member_template_class): #if 0.
940
9411998-10-29  Richard Henderson  <rth@cygnus.com>
942
943	* Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
944	last.
945
9461998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
947
948	* lex.c: Call check_newline from lang_init always.  After
949	calling cpp_start_read, set yy_cur and yy_lim to read from the
950	cpplib token buffer.
951
9521998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
953
954	* class.c (instantiate_type): Don't consider templates for a normal
955	match.
956
957	* class.c (finish_struct_1): Don't complain about non-copy
958	assignment ops in union members.
959
960	* class.c (build_vtable): Don't pass at_eof to import_export_vtable.
961	(prepare_fresh_vtable): Likewise.
962	(finish_struct_1): Don't call import_export_class.
963	* decl2.c (finish_vtable_vardecl): Do import/export stuff.
964	(finish_prevtable_vardecl): Lose.
965	(finish_file): Don't call it.
966	* pt.c (instantiate_class_template): Likewise.
967	* cp-tree.h: Remove it.
968
969	* init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
970	* decl.c (finish_function): Not here.
971	(start_function): Do set DECL_INITIAL.
972
973	* pt.c (push_template_decl_real): Complain about default template
974	args for enclosing classes.
975
976	* call.c (add_function_candidate): Treat conversion functions
977	as coming from the argument's class.
978	* cp-tree.h (DECL_CONV_FN_P): New fn.
979	(DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
980	* class.c (add_method): Use DECL_CONV_FN_P.
981	* decl2.c (check_classfn): Likewise.
982	* error.c (dump_function_name): Likewise.
983	(dump_function_decl): Likewise.
984	* pt.c (fn_type_unification): Likewise.
985	* search.c (add_conversions): Likewise.
986
9871998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
988
989	* lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
990	* method.c (hack_identifier): Also check for using RESULT_DECL
991	from outer context.
992
9931998-10-27  Mark Mitchell  <mark@markmitchell.com>
994
995	* decl.c (grokdeclarator): Use type_quals, rather than constp,
996	consistently.
997
9981998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
999
1000	* call.c (standard_conversion): instantiate_type here.
1001	(reference_binding): And here.
1002	(implicit_conversion): Not here.
1003	(build_op_delete_call): No need to cons up an OVERLOAD.
1004	* cvt.c (cp_convert_to_pointer): instantiate_type here.
1005	(convert_to_reference): And here.
1006	* decl.c (grok_reference_init): Not here.
1007	(grokparms): Or here.
1008	* typeck2.c (digest_init): Or here.
1009	* typeck.c (decay_conversion): Take the address of overloaded
1010	functions, too.
1011	(require_instantiated_type): Lose.
1012	(convert_arguments): Don't handle unknown types here.
1013	(build_c_cast): Likewise.
1014	(build_binary_op): Gut.
1015	(build_conditional_expr): Don't require_instantiated_type.
1016	(build_modify_expr): Likewise.
1017	(build_static_cast): Don't instantiate_type.
1018	(build_reinterpret_cast): Likewise.
1019	(build_const_cast): Likewise.
1020	(convert_for_initialization): Likewise.
1021	(build_ptrmemfunc): Use type_unknown_p.
1022	(convert_for_assignment): Also do default_conversion on overloaded
1023	functions.  Hand them off to ocp_convert.
1024
10251998-10-26  Mark Mitchell  <mark@markmitchell.com>
1026
1027	* error.c (dump_decl): Deal with TEMPLATE_DECLs that are
1028	VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
1029
1030	* class.c (finish_struct_1): Use build_cplus_array_type to build
1031	array types.
1032	* decl.c (init_decl_processing): Likewise.
1033	* except.c (expand_end_eh_spec): Likewise.
1034	* search.c (expand_upcast_fixups): Simplify very slightly.
1035
10361998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
1037
1038	* decl.c (grokdeclarator): Complain about a variable using
1039	constructor syntax coming back null from start_decl.
1040
1041	* friend.c (make_friend_class): Complain about trying to make
1042	a non-class type a friend.
1043
1044	* decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
1045	(start_function): Not here.
1046
10471998-10-26  Brendan Kehoe  <brendan@cygnus.com>
1048
1049	* decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1050
10511998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
1052
1053	* typeck2.c (process_init_constructor): Only skip anonymous fields
1054	if they are bitfields.
1055
1056	* cp-tree.def (TYPEOF_TYPE): New code.
1057	* error.c (dump_type_real): Handle it.
1058	* pt.c (tsubst): Likewise.
1059	* tree.c (search_tree): Likewise.
1060	* semantics.c (finish_typeof): New fn.
1061	* parse.y (typespec): Use it.
1062	* cp-tree.h: Declare it.
1063
10641998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
1065
1066	* cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
1067
10681998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
1069
1070	* typeck.c (convert_arguments): Don't handle pmf references
1071	specially.
1072
1073	* init.c (build_member_call): Don't try to convert to the base type
1074	if it's ambiguous or pedantic.
1075
1076	* typeck2.c (check_for_new_type): Only depend on pedantic for
1077	C-style casts.
1078
10791998-10-25  Mark Mitchell  <mark@markmitchell.com>
1080
1081	* decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
1082	non-converting constructors.
1083
10841998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1085
1086	* gxxint.texi: Correct documentation for n, N, Q, and B.
1087
10881998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1089
1090	* parse.y (condition): Convert VAR_DECL from reference to indirect
1091	reference.
1092
10931998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
1094
1095	* exception.cc (__cp_pop_exception): Free the original exception
1096	value, not the potentially coerced one.
1097
10981998-10-23  Mark Mitchell  <mark@markmitchell.com>
1099
1100	* Makefile.in (hash.h): Run gperf when necessary.
1101
1102	* cp-tree.h (CP_TYPE_READONLY): Remove.
1103	(CP_TYPE_VOLATILE): Likewise.
1104	(CP_TYPE_QUALS): New macro.
1105	(CP_TYPE_CONST_P): Likewise.
1106	(CP_TYPE_VOLATILE_P): Likewise.
1107	(CP_TYPE_RESTRICT_P): Likewise.
1108	(CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
1109	(cp_build_type_variant): Rename to ...
1110	(cp_build_qualified_type): New function.
1111	(c_apply_type_quals_to_decl): Declare.
1112	(SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
1113	(SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
1114	(cp_type_qual_from_rid): New function.
1115	(compparms): Remove unused parameter.  All callers changed.
1116	(cp_type_quals): New function.
1117	(at_least_as_qualified_p): Likewise.
1118	(more_qualified_p): Likewise.
1119
1120	* call.c (standard_conversion): Replace calls to
1121	cp_build_type_variant with cp_build_qualified_type.  Use
1122	CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
1123	compare them.  Use CP_TYPE_* macros to check qualifiers.
1124	(reference_binding): Likewise.
1125	(implicit_conversion): Likewise.
1126	(add_builtin_candidates): Likewise.
1127	(build_over_call): Likewise.
1128	* class.c (overrides): Compare all qualifiers, not just `const',
1129	on method declarations.
1130	* cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
1131	(convert_pointer_to_real): Likewise.
1132	(type_promotes_to): Likewise.
1133	* decl.c (check_for_uninitialized_const_var): New function.
1134	(init_decl_processing): More CP_TYPE_QUALS conversion, etc.
1135	(cp_finish_decl): Use check_for_uninitialized_const_var.
1136	(grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
1137	handle `restrict'.
1138	(grok_ctor_properties): Likewise.
1139	(grok_op_properties): Likewise.
1140	(start_function): Likewise.
1141	(rever_static_member_fn): Likewise.
1142	* decl2.c (grok_method_quals): Likewise.
1143	(grokfield): Likewise.
1144	* error.c (dump_readonly_or_volatile): Rename to ...
1145	(dump_qualifiers): New function.  Handle `restrict'.
1146	(dump_type_real): Use it.
1147	(dump_aggr_type): Likewise.
1148	(dump_type_prefix): Likewise.
1149	(dump_type_suffix): Likewise.
1150	(dump_function_decl): Likewise.
1151	(cv_as_string): Likewise.
1152	* gxx.gperf: Add __restrict and __restrict__.
1153	* gxxint.texi: Document `u' as used for `__restrict', and a few
1154	other previously undocumented codes.
1155	* hash.h: Regenerated.
1156	* init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
1157	(build_member_call): Likewise.
1158	(build_new_1): Likewise.
1159	* lex.c (init_parse): Add entry for RID_RESTRICT.
1160	(cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
1161	(cp_type_qual_from_rid): Define.
1162	* lex.h (enum rid): Add RID_RESTRICT.
1163	* method.c (process_modifiers): Deal with `restrict'.
1164	* parse.y (primary): More CP_TYPE_QUALS conversion, etc.
1165	* parse.c: Regenerated.
1166	* pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
1167	(tsubst_aggr_type): Likewise.
1168	(tsubst): Likewise.
1169	(check_cv_quals_for_unify): Likewise.
1170	(unify): Likewise.
1171	* rtti.c (init_rtti_processing): Likewise.
1172	(build_headof): Likewise.
1173	(get_tinfo_var): Likewise.
1174	(buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
1175	(expand_class_desc): Likewise.
1176	(expand_attr_desc): Likewise.
1177	(synthesize_tinfo_fn): Likewise.
1178	* search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
1179	(get_matching_virtual): Likewise.
1180	(expand_upcast_fixups): Likewise.
1181	* sig.c (build_signature_pointer_or_reference_name): Take
1182	type_quals, not constp and volatilep.
1183	(build_signature_pointer_or_reference_type): Likewise.
1184	(match_method_types): More CP_TYPE_QUALS conversion, etc.
1185	(build_signature_pointer_constructor): Likewise.
1186	(build_signature_method_call): Likewise.
1187	* tree.c (build_cplus_array_type): Likewise.
1188	(cp_build_type_variant): Rename to ...
1189	(cp_build_qualified_type): New function.  Deal with `__restrict'.
1190	(canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
1191	(build_exception_variant): Likewise.
1192	(mapcar): Likewise.
1193	* typeck.c (qualif_type): Likewise.
1194	(common_type): Likewise.
1195	(comptypes): Likewise.
1196	(comp_cv_target_types): Likewise.
1197	(at_least_as_qualified_p): Define.
1198	(more_qualified_p): Likewise.
1199	(comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
1200	(compparms): Likewise.
1201	(inline_conversion): Likewise.
1202	(string_conv_p): Likewise.
1203	(build_component_ref): Likewise.
1204	(build_indirect_ref): Likewise.
1205	(build_array_ref): Likewise.
1206	(build_unary_op): Likewise.
1207	(build_conditional_expr): Likewise.
1208	(build_static_cast): Likewise.
1209	(build_c_cast): Likewise.
1210	(build_modify_expr): Likewise.
1211	(convert_For_assignment): Likewise.
1212	(comp_ptr_ttypes_real): Likewise.
1213	(cp_type_quals): New function.
1214
12151998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
1216
1217	* cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
1218	(CP_TYPE_VOLATILE): Likewise.
1219	* decl.c (grokdeclarator): Use them.
1220	* tree.c (canonical_type_variant): Likewise.
1221
12221998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1223
1224	* parse.y (named_class_head): Push into class while parsing the
1225	base class list.
1226	* decl2.c (push_scope, pop_scope): New functions.
1227	* cp-tree.h: Declare them.
1228	* init.c (build_new_1): Delay cleanup until end of full expression.
1229
12301998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
1231
1232	* typeck.c (build_component_ref): Use of a type here is an error.
1233
12341998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
1235
1236	Revamp references to member functions.
1237	* method.c (hack_identifier): Call build_component_ref for a
1238	reference to a member function.
1239	* typeck.c (build_component_ref): Only return a single function
1240	if it's static.  Otherwise, return a COMPONENT_REF.
1241	(build_x_function_call): Handle a COMPONENT_REF.
1242	(build_unary_op): Handle all unknown-type things.
1243	* decl2.c (arg_assoc): Handle COMPONENT_REF.
1244	* class.c (instantiate_type): Complain if the function we get is a
1245	nonstatic member function.  Remove code for finding "compatible"
1246	functions.
1247	* pt.c (tsubst_copy): Handle NOP_EXPR.
1248	* tree.c (build_dummy_object): New fn.
1249	(maybe_dummy_object): New fn.
1250	(is_dummy_object): New fn.
1251	* cp-tree.h: Declare them.
1252	* cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
1253	* error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
1254	* init.c (build_member_call): Use maybe_dummy_object and
1255	is_dummy_object.
1256	(build_offset_ref): Use maybe_dummy_object.
1257	(resolve_offset_ref): Use is_dummy_object.
1258	* typeck.c (build_x_function_call): Call build_dummy_object.
1259	(unary_complex_lvalue): Call is_dummy_object.
1260
1261	* typeck.c (build_component_addr): Make sure field is a field.
1262
1263	* call.c (build_new_op): Delete obsolete code.
1264
1265	* pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
1266
12671998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1268
1269	* decl2.c (validate_nonmember_using_decl): Fix using-directives of
1270	std if std is ignored.
1271
12721998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
1273
1274	* decl.c (grokvardecl): Fix thinko.
1275
1276	* decl.c (grokdeclarator): Embedded attrs bind to the right,
1277	not the left.
1278
1279	* parse.y (fn.def2): Fix 'attrs' format.
1280
12811998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
1282
1283	* Makefile.in (CONFLICTS): Update.
1284	* parse.y (expr_or_declarator_intern): New rule.
1285	(expr_or_declarator, direct_notype_declarator, primary,
1286	functional_cast): Use it.
1287	(notype_declarator_intern): New rule.
1288	(notype_declarator, complex_notype_declarator): Use it.
1289
12901998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
1291
1292	* decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
1293	(grokvardecl): Likewise.
1294
1295Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1296
1297	* class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
1298	(add_method): Likewise for arguments 1 & 2 of `bcopy'.
1299
1300	* decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
1301
1302	* pt.c (process_partial_specialization): Cast 1st argument of
1303	`bzero' to (PTR).
1304
1305	* tree.c (build_base_fields): Cast `base_align' to (int) when
1306	comparing against one.
1307
13081998-10-16  Mark Mitchell  <mark@markmitchell.com>
1309
1310	* decl.c (lookup_name_real): Handle template parameters for member
1311	templates where said parameters have the same name as the
1312	surrounding class.
1313
1314	* decl.c (expand_static_init): Build cleanups before entering the
1315	anonymous function used to do them to avoid access-checking
1316	confusion.
1317
1318	* decl.c (grokfndecl): Add back call to cplus_decl_attributes
1319	accidentally removed by previous change, and make DECL_RTL here.
1320	* class.c (add_method): Don't make DECL_RTL here.
1321
1322	* pt.c (for_each_template_parm): Don't examine uninstantiated
1323	default arguments.
1324
13251998-10-16  Dave Brolley  <brolley@cygnus.com>
1326
1327	* lex.c (real_yylex): Fix unaligned access of wchar_t.
1328
13291998-10-16  Mark Mitchell  <mark@markmitchell.com>
1330
1331	* class.c (add_method): Fix documentation to reflect previous
1332	changes.  Check for duplicate method declarations here.
1333	* decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
1334	correctly; such things never match.
1335	(grokfndecl): Don't look for duplicate methods here.
1336	* decl2.c (check_classfn): Don't assume names are mangled.
1337	Don't add bogus member function declarations to a class before the
1338	class type is complete.
1339	(grokfield): Reformat error message.
1340	* method.c (set_mangled_name_for_decl): Don't mangle names while
1341	processing_template_decl.
1342
13431998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
1344
1345	* typeck.c (build_indirect_ref): Complain about a pointer to data
1346	member, too.
1347	* typeck2.c (build_m_component_ref): Don't indirect a pointer to
1348	data member.
1349	* init.c (resolve_offset_ref): Don't undo the above.
1350
1351	* cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
1352	(struct lang_decl_flags): Add `bitfield'.
1353	* class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
1354	DECL_BIT_FIELD.
1355	* decl2.c (grokbitfield, grok_alignof): Likewise.
1356	* init.c (build_offset_ref): Likewise.
1357	* typeck.c (build_component_addr, expr_sizeof): Likewise.
1358	* cvt.c (build_up_reference): Don't crash if taking the address
1359	returns error_mark_node.
1360
1361	* decl.c (grokfndecl): Also check ctype when checking for ::main().
1362
13631998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
1364
1365	* decl.c (grokfndecl): ::main and __builtin_* get C linkage.
1366	Do mangling here.
1367	(grokdeclarator): Instead of here.
1368	* friend.c (do_friend): Lose special handling of ::main and
1369	__builtin_*.
1370	* cp-tree.h (DECL_MAIN_P): Check for C linkage.
1371
1372	* spew.c (yylex): Clear looking_for_typename if we got
1373	'enum { ... };'.
1374
13751998-10-15  Mark Mitchell  <mark@markmitchell.com>
1376
1377	* class.c (maybe_warn_about_overly_private_class): Improve error
1378	messages for class with only private constructors.
1379
1380	* cp-tree.def (TYPENAME_TYPE): Add to documentation.
1381	* cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
1382	(build_typename_type): New function.
1383	* decl.c (build_typename_type): Broken out from ...
1384	(make_typename_type): Use it.
1385	* search.c (lookup_field): Likewise.
1386
13871998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
1388
1389	* pt.c (convert_nontype_argument): Check against type_referred_to.
1390	* decl.c (grokvardecl): Check for declarator name before building
1391	DECL_ASSEMBLER_NAME.
1392
13931998-10-14  Mark Mitchell  <mark@markmitchell.com>
1394
1395	* pt.c (lookup_template_class): Add comment.
1396	(instantiate_class_template): Don't mark the _TYPE node for
1397	member class templates as an instantiation.
1398
13991998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
1400
1401	* decl.c (grokfndecl): Fix my thinko.
1402
14031998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
1404
1405	* tinfo2.cc (fast_compare): Remove.
1406	(before): Just use strcmp.
1407	* tinfo.cc (operator==): Just use strcmp.
1408
14091998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
1410
1411	* decl.c (grokfndecl): Don't check for linkage in `extern "C"'
1412	declarations.
1413
14141998-10-13  Mark Mitchell  <mark@markmitchell.com>
1415
1416	* cp-tree.h (specializations_of_same_template_p): Remove.
1417	* search.c (get_template_base): Don't use it.
1418	(get_template_base_recursive): Likewise.
1419	* pt.c (specializations_of_same_template_p): Remove.
1420	(unify): Don't use it.
1421	(lookup_template_class): Find the correct parent when setting
1422	CLASSTYPE_TI_TEMPLATE.
1423
14241998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
1425
1426	* tinfo.cc (operator==): Always compare names.
1427
14281998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
1429
1430	* decl.c (start_function): Fix cut-and-paste error.
1431
14321998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
1433
1434	* inc/typeinfo: Add #pragma interface.
1435	(operator!=): Just call operator==.
1436	* tinfo.cc: Add #pragma implementation.
1437	(operator==): Move from inc/typeinfo and tinfo2.cc.
1438	Check __COMMON_UNRELIABLE instead of _WIN32.
1439
1440	* typeck2.c (my_friendly_abort): Add URL.
1441
14421998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
1443
1444	* decl.c (start_method): Added extra parameter for attributes.
1445	* cp-tree.h (start_method): Update prototype.
1446	* parse.y (fn.def2): Update start_method parameter list.
1447
14481998-10-11  Mark Mitchell  <mark@markmitchell.com>
1449
1450	* cp-tree.h (specializations_of_same_template_p): Declare.
1451	* pt.c (specializations_of_same_template_p): New function.
1452	(unify): Use it.
1453	* search.c (get_template_base): Use it.
1454	(get_template_base_recursive): Likewise.
1455
14561998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
1457
1458	* decl2.c (start_objects): Add new variable `joiner' and
1459	initialize it properly.
1460
14611998-10-09  Mark Mitchell  <mark@markmitchell.com>
1462
1463	* search.c (expand_upcast_fixups): Tweak to match 1998-10-07
1464	change to vtable types.
1465
1466	* cvt.c (ocp_convert): Avoid infinite recursion caused by
1467	1998-10-03 change.
1468
14691998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
1470
1471	* pt.c (resolve_overloaded_unification): New fn.
1472	(try_one_overload): Likewise.
1473	(unify): Don't fail on unknown type.
1474	(type_unification_real): Likewise.  Use resolve_overloaded_unification
1475	to handle an overloaded argument.
1476	(template_args_equal): Split out...
1477	(comp_template_args): From here.
1478	(determine_specialization): Also allow a template with more
1479	parms than were explicitly specified.
1480	* cp-tree.h: Add template_args_equal.
1481	* call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
1482
1483Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
1484
1485	* semantics.c (finish_asm_stmt): Revert my 1998-09-28
1486	change.
1487
1488Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
1489
1490	* typeck.c (unsigned_type): Only return TItype nodes when
1491	HOST_BITS_PER_WIDE_INT is >= 64 bits.
1492	(signed_type): Likewise.
1493	* decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
1494	when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1495	(init_decl_processing): Only create TItype nodes when
1496	HOST_BITS_PER_WIDE_INT is >= 64 bits.
1497	* cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
1498	when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1499
1500Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1501
1502	* Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
1503	(gxx.gperf): Update comments describing invocation flags.
1504	(hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
1505
15061998-10-07  Mark Mitchell  <mark@markmitchell.com>
1507
1508	* class.c (finish_struct_1): Add commentary on previous change.
1509
1510	* cp-tree.h (vtbl_ptr_type_node): New variable.
1511	* class.c (build_vtbl_ref): Don't indirect through the vptr; it's
1512	already of the right type.
1513	(finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
1514	Simplify code to grow vtable.
1515	* decl.c (vtbl_ptr_type_node): Define.
1516	(init_decl_processing): Initialize it.
1517
15181998-10-06  Mark Mitchell  <mark@markmitchell.com>
1519
1520	* cp-tree.def (PTRMEM_CST): New tree node.
1521	* cp-tree.h (ptrmem_cst): New type.
1522	(lang_type): Remove local_typedecls.
1523	(dummy): Increase to 12 bits from 11.
1524	(CLASSTYPE_LOCAL_TYPEDECLS): Remove.
1525	(PTRMEM_CST_CLASS): New macro.
1526	(PTRMEM_CST_MEMBER): Likewise.
1527	(current_access_specifier): New variable.
1528	(current_class_type): Remove duplicate declaration.
1529	(finish_struct): Change prototype.
1530	(unreverse_member_declarations): New function.
1531	(pushdecl_class_level): Change prototype.
1532	(grok_enum_decls): Remove.
1533	(fixup_anonymous_union): New function.
1534	(grok_x_components): Change prototype.
1535	(tsubst_chain): Remove.
1536	(finish_member_template_decl): Likewise.
1537	(check_explicit_specialization): Fix indentation.
1538	(finish_class_definition): Change prototype.
1539	(finish_member_class_template): Likewise.
1540	(finish_member_declaration): New function.
1541	(check_multiple_declarators): Likewise.
1542	* class.c (class_stack_node_t): New type.
1543	(current_class_base): Remove.
1544	(current_class_stack): Change type.
1545	(current_access_specifier): New variable.
1546	(grow_method): Remove.
1547	(check_member_decl_is_same_in_complete_scope): Break out from
1548	finish_struct.
1549	(make_method_vec): New function.
1550	(free_method_vec): Likewise.
1551	(add_implicitly_declared_members): Break out from finish_struct_1.
1552	(free_method_vecs): New variable.
1553	(add_method): Rework for direct use from parser.
1554	(handle_using_decl): Watch for NULL_TREE while iterating through
1555	CLASSTYPE_METHOD_VEC.
1556	(finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
1557	just do some error-checking.
1558	(warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
1559	(finish_struct_1): Simplify.  Use add_implicitly_declared_members.
1560	(finish_struct): Change prototype.  Simplify; fields and methods
1561	are already set up at this point.
1562	(init_class_processing): Set up current_class_stack.
1563	(pushclass): Save current_access_specifier.
1564	(popclass): Restore it.
1565	(currently_open_class): Simplify.
1566	(build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
1567	* decl.c (saved_scope): Add access_specifier.
1568	(maybe_push_to_top_level): Save it.
1569	(pop_from_top_level): Restore it.
1570	(maybe_process_template_type_declaration): Use
1571	finish_member_declaration.
1572	(pushtag): Likewise.
1573	(pushdecl_class_level): Don't return a value.
1574	(fixup_anonymous_union): Break out from grok_x_components.
1575	(shadow_tag): Use it.
1576	(xref_tag): Complain about using an elaborated type specifier to
1577	reference a template type parameter or typedef name.
1578	(xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1579	(current_local_enum): Remove.
1580	(build_enumerator): Call finish_member_declaration.
1581	(grok_enum_decls): Remove.
1582	* decl2.c (grok_x_components): Simplify.
1583	(check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
1584	(grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1585	(merge_functions): Add to comment.
1586	(arg_assoc_type): Prototype.
1587	(arg_assoc): Pass as many arguments as there are parameters.
1588	* error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
1589	OFFSET_REF.
1590	* expr.c (cpls_expand_expr): Remove dead code.  Handle
1591	PTRMEM_CST.
1592	* friend.c (do_friend): Lookup friends when in nested classes.
1593	Change comments.
1594	* init.c (build_offset_ref): Do lookup even for classes that are
1595	only partially defined.
1596	(decl_constant_value): Remove dead code.
1597	* method.c (build_overload_value): Remove hack where by TYPE was
1598	not a TYPE.  Handle PTRMEM_CST.
1599	(build_template_parm_names): Don't pass a PARM_DECL where a TYPE
1600	should go.
1601	* parse.y (components, notype_components, component_decl,
1602	component_decl_1, component_declarator, component_declarator0):
1603	Now all are itype rather than ttype.  Rework to add members to
1604	classes on the fly.
1605	(typesqpecqual_reserved): Use check_multiple_declarators.
1606	(structsp): Update class to finish_class_definition.
1607	(do_xref_defn): Unsplit into named_class_head.
1608	(access_specifier): Set current_access_specifier.
1609	* pt.c (set_current_access_from_decl): New function.
1610	(finish_member_template_decl): Don't take the parameters.
1611	(comp_template_args): Make more robust.
1612	(lookup_template_class): Don't use current_local_enum.
1613	(for_each_template_parm): Handle PTRMEM_CST.
1614	(instantiate_class_template): Use set_current_access_from_decl,
1615	finish_member_declaration and unreverse_member_declarations.  Set
1616	lineno/input_filename before generating implicit member functions.
1617	(type_unification_real): Don't assume back-unification happens
1618	only for the last argument.
1619	(regenerate_decl_from_template): Call pushclass a bit earlier.
1620	(tsubst_chain): Remove.
1621	(tsubst_enum): Use set_current_access_from_decl.
1622	(set_mangled_name_for_template_decl): Fix indentation.
1623	* search.c (lookup_fnfields_1): Change iteration through
1624	CLASSTYPE_METHOD_VEC.
1625	(dfs_pushdecls): Likewise.
1626	(dfs_compress_decls): Likewise.
1627	(add_conversions): Likewise.
1628	* semantics.c (finish_class_definition): Don't take components.
1629	Change call to finish_struct.
1630	(finish_member_declaration): New function.
1631	(finish_member_class_template): Don't take template parameters.
1632	Change call to grok_x_components.  Call finish_member_template_decl.
1633	(check_multiple_declarators): New function.
1634	* sig.c (append_signature_fields): Work from the TYPE_METHODS, not
1635	a passed in fieldlist.
1636	* tree.c (search_tree): Handle PTRMEM_CST.
1637	(mapcar): Likewise.
1638	* typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
1639	INTEGER_CSTs, for pointer-to-data members.
1640
1641	* call.c (resolve_args): Resolve template specializations, if
1642	possible.
1643
1644Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1645
1646	* Makefile.in (spew.o): Depend on toplev.h.
1647
1648	* call.c (compare_ics): Initialize variables `deref_from_type2',
1649	`deref_to_type1' and `deref_to_type2'.
1650
1651	* except.c (get_eh_type): Hide prototype and definition.
1652	(process_start_catch_block_old): Remove unused static prototype.
1653
1654	* pt.c (tsubst_decl): Initialize variable `argvec'.
1655
1656	* spew.c: Include toplev.h.
1657
16581998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
1659
1660	* pt.c (instantiate_decl): Do save and restore file position.
1661
16621998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1663
1664	* method.c (build_decl_overload_real): Clear
1665	numeric_output_need_bar after __.
1666
16671998-10-05  Nathan Sidwell  <nathan@acm.org>
1668
1669	* call.c (build_new_method_call): Issue 'incomplete type' error,
1670	if class is not defined.
1671
16721998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1673
1674	* call.c (build_object_call): Move declaration of variable
1675	`fn' into the scope where it is used.  Don't access variable
1676	`fn' when it is uninitialized, instead use `fns'.
1677
16781998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
1679
1680	* errfn.c (cp_thing): Print buf as a string not as a printf format
1681	to avoid problems with the operator%.  Consequently, `%%' sequences
1682	in format are copied as `%' in buf.
1683
16841998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
1685
1686	* pt.c (pop_tinst_level): Call extract_interface_info.
1687	(instantiate_decl): Don't save and restore file position.
1688
1689	* decl.c (cp_finish_decl): Make statics in extern inlines and
1690	templates common, if possible and the target doesn't support weak
1691	symbols.
1692
1693	* decl.c (grokdeclarator): Remove redundant calls to
1694	build_type_variant and some duplicated code.
1695	* sig.c (build_signature_reference_type): Only take the type parm.
1696	(build_signature_pointer_type): Likewise.
1697	* tree.c (build_cplus_method_type): Adjust.
1698	* cp-tree.h: Update.
1699
17001998-10-04  Mark Mitchell  <mark@markmitchell.com>
1701
1702	* call.c (build_over_call): Make pedwarns about dropped qualifiers
1703	into full-fledged errors.
1704	* cvt.c (convert_to_reference): Likewise.
1705	* typeck.c (convert_for_assignment): Likewise.
1706
1707	* search.c (expand_upcast_vtables): In addition to unsetting
1708	TREE_READONLY, remove top-level const type qualifier.
1709
17101998-10-03  Mark Mitchell  <mark@markmitchell.com>
1711
1712	* class.c (current_class_ptr, current_class_ref): Clarify
1713	documentation.
1714	* cvt.c (ocp_convert): Don't expect fold to remove all trivial
1715	NOP type conversions.
1716	* decl.c (decls_match): Use comptypes directly; ignore
1717	qualifiers on the DECL.
1718	(duplicate_decls): Remove qualifier checks on DECL.
1719	(grokdeclarator): Make the type built up include top-level
1720	qualifiers.
1721	* decl2.c (do_dtors): Fix spelling error.
1722	* error.c (dump_simple_decl): Don't look at qualifiers on the decl
1723	when printing type information.
1724	* init.c (build_new_1): Add documentation.  Deal with the fact
1725	that type of allocated memory now contains qualifiers.
1726	* lex.c (is_global): Improve error-recovery.
1727	* sig.c (build_member_function_pointer): Don't cast away const
1728	on fields of sigtable_entry_type.
1729	* tree.c (lvalue_type): Don't look at top-level qualifiers on
1730	expressions.
1731	* typeck.c (decay_conversion): Likewise.
1732	(build_component_ref): Make sure the type of the COMPONENT_REF
1733	contains top-level qualifiers, as appropriate.  Improve
1734	error-handling.
1735	(build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
1736	(build_array_ref): Likewise.
1737	(build_unary_op): Improve error-recovery.
1738	(unary_complex_lvalue): Make taking the address a bound member
1739	function an error, not a sorry.
1740	(build_conditional_expr): Look at the type qualifiers, not the
1741	qualifiers on the expression itself.
1742
17431998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
1744
1745	* decl2.c (merge_functions): Remove duplicates.
1746
1747	* decl2.c: Add -f{no-,}implicit-inline-templates.
1748	(import_export_decl): Check it.
1749
1750	* decl.c (lookup_name_real): Template parms also take precedence
1751	over implicit typename.  Only warn if yylex.
1752
1753	* typeck.c (build_conditional_expr): Only fold if ifexp is an
1754	INTEGER_CST.
1755
1756	* decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
1757	instead of linkage.
1758
17591998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1760
1761	* cp-tree.h (FORMAT_VBASE_NAME): New macro.
1762	* class.c (build_vbase_pointer): Use it.
1763	* rtti.c (expand_class_desc): Likewise.
1764	* tree.c (build_vbase_pointer_fields): Likewise.
1765
1766Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
1767
1768	* decl.c (start_decl): Add invocation of
1769	SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1770	(start_function): Add invocation of
1771	SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1772
1773	* lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
1774	HANDLE_GENERIC_PRAGMAS.
1775
17761998-09-28  Anthony Green  <green@cygnus.com>
1777
1778	* semantics.c (finish_asm_stmt): Always permit volatile asms.
1779
17801998-09-28  Mark Mitchell  <mark@markmitchell.com>
1781
1782	* decl.c (grokdeclarator): Tighten checks for invalid
1783	destructors.  Improve error-messages and error-recovery.
1784	* decl2.c (check_classfn): Don't assume that mangled destructor
1785	names contain type information.
1786
17871998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
1788
1789	* search.c (get_base_distance): Remove assert.
1790
1791	* decl2.c (build_anon_union_vars): Don't process a field with no
1792	name.
1793	(finish_anon_union): Also complain about local anon unions with no
1794	members.
1795
17961998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1797
1798	* decl.c (lookup_namespace_name): If the name is a namespace,
1799	return it immediately.
1800
1801Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1802
1803	* cp-tree.h (define_case_label): Remove unused parameter.
1804	(check_java_method): Likewise.
1805	(grokclassfn): Likewise.
1806	(expand_aggr_init): Likewise.
1807	(build_x_delete): Likewise.
1808	(maybe_end_member_template_processing): Likewise.
1809	(unshare_base_binfos): Add prototype.
1810	(string_conv_p): Likewise.
1811	(my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
1812
1813	* cvt.c (build_up_reference): Remove unused parameter
1814	`checkconst', all callers changed.
1815	(build_type_conversion): Mark parameter `code' with
1816	ATTRIBUTE_UNUSED.
1817	(build_expr_type_conversion): Initialize variable `conv'.
1818
1819	* decl.c (push_namespace): Initialize variable `d'.
1820	(define_case_label): Remove unused parameter `decl', all callers
1821	changed.
1822
1823	* decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
1824	`argc' with ATTRIBUTE_UNUSED.
1825	(grokclassfn): Remove unused parameter `cname', all callers
1826	changed.
1827	(check_java_method): Likewise for parameter `ctype'.
1828	(copy_assignment_arg_p): Mark parameter `virtualp' with
1829	ATTRIBUTE_UNUSED.
1830	(finish_prevtable_vardecl): Likewise for parameter `prev'.
1831
1832	* expr.c (extract_init): Likewise for parameters `decl' and `init'.
1833
1834	* init.c (expand_aggr_init_1): Remove unused parameter
1835	`alias_this', all callers changed.
1836	(expand_aggr_init): Likewise.
1837	(expand_default_init): Likewise.
1838	(build_new_1): Initialize variable `susp'.
1839	(build_x_delete): Remove unused parameter `type', all callers
1840	changed.
1841
1842	* lex.c (set_typedecl_interface_info): Mark parameter `prev' with
1843	ATTRIBUTE_UNUSED.
1844	(readescape): Use (unsigned) value in shift.
1845	(real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
1846	comparing to a signed quantity.
1847
1848	* pt.c (maybe_end_member_template_processing): Remove unused
1849	parameter `decl', all callers changed.
1850	(check_explicit_specialization): Add braces around empty body in
1851	an else-statement.
1852	(current_template_args): Initialize variable `args'.
1853	(lookup_template_class): Likewise for variable `prev_local_enum'.
1854	(tsubst_decl): Likewise for variable `r'.
1855	(set_mangled_name_for_template_decl): Initialize variable
1856	`context'.
1857
1858	* spew.c (scan_tokens): Change type of parameter `n' to unsigned.
1859	Likewise for variable `i'.
1860	(yylex): Initialize variable `trrr'.
1861
1862	* typeck.c (compparms): Mark variable `strict' with
1863	ATTRIBUTE_UNUSED.
1864
1865	* xref.c (simplify_type): Cast argument of ctype function to
1866	`unsigned char'.
1867
18681998-09-24  Mark Mitchell  <mark@markmitchell.com>
1869
1870	* cp-tree.h (language_lvalue_valid): Remove.
1871	* decl.c (grokdeclarator): Don't disallow references to functions.
1872	* tree.c (lvalue_p_1): New function, combining duplicated
1873	code from ...
1874	(lvalue_p): Use it.
1875	(real_lvalue_p): Likewise.
1876	* typeck.c (language_lvalue_valid): Remove.
1877	(build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
1878	they don't have TREE_READONLY set.
1879	* typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
1880
18811998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
1882
1883	* spew.c (yylex): Give diagnostic.
1884	* hash.h (is_reserved_word): Add export.
1885	* gxx.gperf: Likewise.
1886	* lex.h (rid): Add RID_EXPORT.
1887	* lex.c (init_parse): Likewise.
1888
1889Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
1890
1891	* friend.c (do_friend): Make warning a full sentence.
1892
18931998-09-22  Mark Mitchell  <mark@markmitchell.com>
1894
1895	* parse.y (component_decl_list): Improve error-recovery.
1896
18971998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
1898
1899	* decl.c (make_typename_type): Move error to point where name
1900	variable can be used by dump_type.
1901
19021998-09-22  Mark Mitchell  <mark@markmitchell.com>
1903
1904	* decl.c (grokfndecl): Improve error-recovery.
1905	* decl2.c (grokfield): Likewise.
1906	* pt.c (finish_member_template_decl): Likewise.
1907
19081998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
1909
1910	* method.c (hack_identifier): Finding multiple members is always
1911	an error.
1912
19131998-09-21  Per Bothner  <bothner@cygnus.com>
1914
1915	* Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
1916
1917Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
1918
1919	* lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
1920
19211998-09-20  Mark Mitchell  <mark@markmitchell.com>
1922
1923	* class.c (maybe_warn_about_overly_private_class): Reformat.
1924
19251998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
1926
1927	* exception.cc (__cplus_type_matcher): Realign some code.
1928
19291998-09-16  Mark Mitchell  <mark@markmitchell.com>
1930
1931	* Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
1932	(tinfo2.o): Likewise.
1933	(exception.o): Likewise.
1934	(new.o): Likewise.
1935	(opnew.o): Likewise.
1936	(opnewnt.o): Likewise.
1937	(opvnew.o): Likewise.
1938	(opvnewnt.o): Likewise.
1939	(opdel.o): Likewise.
1940	(opdelnt.o): Likewise.
1941	(opvdel.o): Likewise.
1942	(opvdelnt.o): Likewise.
1943
19441998-09-16  Richard Henderson  <rth@cygnus.com>
1945
1946	* decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
1947
19481998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
1949
1950	* call.c (build_field_call): Handle static data members too.
1951
1952	* typeck.c (comptypes): When comparing pointer types, check
1953	whether referred types match even in strictest modes.
1954
19551998-09-15  Mark Mitchell  <mark@markmitchell.com>
1956
1957	* cp-tree.h: Revert previous change.
1958	(finish_struct_methods): Remove declaration.
1959	* class.c: Revert previous change.
1960	(maybe_warn_about_overly_private_class): New function.
1961	(finish_struct_methods): Declare here, and make static.  Remove
1962	unnecessary parameters.  Tidy slightly.  Use
1963	maybe_warn_about_overly_private_class.
1964	(finish_struct_1): Adjust.  Remove check for private constructors,
1965	now done elsewhere.
1966	(finish_struct): Adjust.
1967
19681998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
1969
1970	* except.c (expand_start_catch_block): No need to check for new
1971	exception model.
1972	(process_start_catch_block_old): Deleted.
1973	(process_start_catch_block): Add call to start_decl_1().
1974	(expand_end_catch_block): Add call to end_catch_handler().
1975	* exception.cc (__cplus_type_matcher): Only check the exception
1976	language if there is an exception table.
1977
19781998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
1979
1980	* search.c (expand_indirect_vtbls_init): Mark temporary stack slots
1981	as used to prevent conflicts with virtual function tables.
1982
19831998-09-14  Mark Mitchell  <mark@markmitchell.com>
1984
1985	* cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
1986	(CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
1987	* class.c (maybe_class_too_private_p): New function.
1988	(finish_struct_methods): Use it.
1989	(finish_struct_1): Likewise.
1990	(finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
1991	appropriate.
1992
1993	* pt.c (check_specialization_scope): Fix spelling error.
1994	(check_explicit_specialization): Remove code to handle explicit
1995	specializations in class scope; they are now correctly diagnosed
1996	as errors.
1997
19981998-09-10  Mark Mitchell  <mark@markmitchell.com>
1999
2000	* decl.c (pushdecl): Don't copy types if the
2001	DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
2002	type.
2003
20041998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
2005
2006	* class.c (get_enclosing_class): New function.
2007	(is_base_of_enclosing_class): Likewise.
2008	* cp-tree.h (get_enclosing_class): Declare.
2009	(is_base_of_enclosing_class): Likewise.
2010	* pt.c (coerce_template_parms): Use them.
2011
20121998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
2013
2014	* g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
2015	null to decide whether to use it.
2016
2017	* error.c (dump_type_real): Handle NAMESPACE_DECL.
2018	* parse.y (base_class.1): Avoid crash on error.
2019
20201998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2021
2022	* decl.c (make_typename_type): If context is a namespace, the code
2023	is in error.
2024
20251998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
2026
2027	* parse.y (nomods_initdcl0): Set up the parser stack correctly.
2028
20291998-09-08  Mark Mitchell  <mark@markmitchell.com>
2030
2031	* cp-tree.h (anonymous_namespace_name): Declare.
2032	* decl.c: Define it.
2033	(push_namespace): Use anonymous_namespace_name, rather than local
2034	static anon_name.
2035	* error.c (dump_decl): If a namespace is named
2036	anonymous_namespace_name, call it {anonymous}.
2037
2038	* decl.c (grokparms): Distinguish between references and pointers
2039	in error message.
2040
20411998-09-08  Richard Henderson  <rth@cygnus.com>
2042	    Mark Mitchell  <mark@markmitchell.com>
2043
2044	* pt.c (process_partial_specialization): Consistently allocate
2045	and zero tpd.parms based on ntparms.  Use tpd2.parms, not
2046	tpd.parms, where appropriate.
2047
2048Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
2049
2050	* Makefile.in (INCLUDES): Update after recent toplevel gcc
2051	reorganizations.
2052
20531998-09-05  Mark Mitchell  <mark@markmitchell.com>
2054
2055	* cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
2056	* class.c (finish_struct): Remove hackery to deal with explicit
2057	specializations in class scope.
2058	* decl.c (grokfndecl): Improve error-recovery.
2059	* decl2.c (grokfield): Likewise.
2060	* pt.c (check_specialization_scope): New function.
2061	(begin_specialization): Call it.
2062	(process_partial_specialization): New function, split out from
2063	push_template_decl.  Check partial specializations more
2064	stringently.
2065	(push_template_decl): Call it.
2066	(check_explicit_specialization): Don't attempt to handle explicit
2067	specializations in class scope.
2068	(template_parm_data): Document.  Add current_arg and
2069	arg_uses_template_parms.
2070	(mark_template_parm): Set it.
2071	(tsubst_arg_types): Remove unused variable.
2072	* semantics.c (begin_class_definition): Tweak.
2073
20741998-09-04  Mark Mitchell  <mark@markmitchell.com>
2075
2076	* inc/typeinfo (type_info::type_info(const char*)): Make
2077	`explicit'.
2078
2079	* cp-tree.h (hash_tree_cons_simple): New macro.
2080	* pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
2081	(coerce_template_parms): Use make_temp_vec, instead of
2082	make_tree_vec.  Document this behavior.
2083	(lookup_template_class): Likewise.
2084	(tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
2085	Remove dead code (and add assertion to check its deadness).  Fix
2086	bug w.r.t. exception specifications.
2087
20881998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
2089
2090	* decl2.c (import_export_vtable): Always make artificials comdat.
2091	(import_export_decl): Likewise.
2092	* pt.c (mark_decl_instantiated): Likewise.
2093
20941998-09-03  Mark Mitchell  <mark@markmitchell.com>
2095
2096	* cp-tree.h (finish_globally_qualified_member_call_expr):
2097	Rename to ...
2098	(finish_qualified_call_expr).
2099	* semantics.c: Likewise.
2100	* parse.y (primary): Use it.
2101	* method.c (hack_identifier): Remove redundant code.
2102
2103	* init.c (resolve_offset_ref): Call convert_from_reference to
2104	handle members of reference type.  Improve error recovery.
2105
21061998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
2107
2108	* cp-tree.h: Declare warn_nontemplate_friend.
2109	* decl2.c (lang_decode_option): Set.
2110	* lang-options.h: Add -Wnon-template-friend.
2111	* friend.c (do_friend): Use to toggle non-template function warning.
2112
21131998-09-03  Mark Mitchell  <mark@markmitchell.com>
2114
2115	* decl.c (finish_enum): Don't resolve CONST_DECLs to their
2116	corresponding INTEGER_CSTs when processing_template_decl.
2117	* pt.c (tsubst_enum): Tweak accordingly.
2118
21191998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
2120
2121	* decl.c (pushdecl_class_level): Add warning here.
2122	(pushdecl): Tweak.
2123
21241998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
2125
2126	* cvt.c (convert_pointer_to_real): Tidy.
2127	* search.c (get_base_distance_recursive): Simplify.
2128	(get_base_distance): Likewise.
2129
2130	* pt.c (unify): Only special-case INTEGER_TYPE if it uses template
2131	parms.
2132
2133Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
2134
2135	* lex.c (check_newline):  Call HANDLE_PRAGMA before
2136	HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
2137	if unknown pragmas are encountered.
2138	(handle_sysv_pragma): Interpret return code from
2139	handle_pragma_token ().  Return success/failure indication rather
2140	than next unprocessed character.
2141	(pragma_getc): New function: retrieves characters from the
2142	input stream.  Defined when HANDLE_PRAGMA is defined.
2143	(pragma_ungetc): New function: replaces characters back into the
2144	input stream.  Defined when HANDLE_PRAGMA is defined.
2145
21461998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
2147
2148	* decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
2149	* class.c (build_vtable_entry_ref): Likewise.
2150
21511998-09-01  Mark Mitchell  <mark@markmitchell.com>
2152
2153	* cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
2154	* decl2.c (import_export_decl): Likewise.
2155	* pt.c (instantiate_decl): Use it.
2156
21571998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
2158
2159	* decl.c (lookup_name_real): Also do implicit typename thing for
2160	artificial TYPE_DECLs.
2161	* search.c (lookup_field): Likewise.
2162	(lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
2163	* semantics.c (begin_constructor_declarator): Use enter_scope_of.
2164	(enter_scope_of): Extract type from implicit typename.
2165	(begin_class_definition): Likewise.
2166	* lex.c (identifier_type): Handle implicit typename when checking
2167	for SELFNAME.
2168
2169	* cp-tree.h: Declare flag_strict_prototype.
2170	* lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
2171	-fstrict-prototype.
2172	* decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
2173	specified, set it to the value of pedantic.
2174
21751998-09-01  Mark Mitchell  <mark@markmitchell.com>
2176
2177	* decl2.c (arg_assoc): Handle template-id expressions as arguments.
2178
21791998-08-31  Mark Mitchell  <mark@markmitchell.com>
2180
2181	* decl.c (finish_enum): Handle member enums of classes declared in
2182	template functions.
2183
2184	* decl2.c (grok_x_components): Strip attributes before calling
2185	groktypename.
2186
21871998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
2188
2189	* cp-tree.h, decl2.c: Remove support for -fall-virtual,
2190	-fenum-int-equivalence and -fno-nonnull-objects.
2191	* class.c (check_for_override): Remove support for -fall-virtual.
2192	(finish_struct_1): Likewise.
2193	* call.c (build_new_op): Remove support for -fenum-int-equivalence.
2194	* typeck.c (build_binary_op_nodefault): Likewise.
2195	* cvt.c (ocp_convert): Likewise.
2196	* call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
2197	* class.c (build_vbase_path): Likewise.
2198
2199Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
2200
2201	* Makefile.in (INTERFACE): New, set to 1.
2202
22031998-08-30  Mark Mitchell  <mark@markmitchell.com>
2204
2205	* error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
2206	comparing with global_namespace.
2207	(dump_aggr_type): Likewise.
2208
2209	* decl.c (grokfndecl): Issue error on declaration of friend
2210	templates with explicit template arguments.
2211
2212	* pt.c (convert_template_argument): New function, split out
2213	from...
2214	(coerce_template_parms): Here.
2215	(tsubst): Attempt better error-recovery.
2216
22171998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
2218
2219	* pt.c (decl_template_parm_p): Add checks for
2220	TEMPLATE_TEMPLATE_PARM.
2221
22221998-08-28  Mark Mitchell  <mark@markmitchell.com>
2223
2224	* lex.c (do_identifier): Fix thinko in previous change.
2225
22261998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
2227
2228	* search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
2229	* decl2.c (output_vtable_inherit): Call binfo_for_vtable.
2230
22311998-08-28  Richard Henderson  <rth@cygnus.com>
2232
2233	Add support for discarding unused virtual functions.
2234	* lang-options.h: Add -fvtable-gc.
2235	* cp-tree.h: Add flag_vtable_gc.
2236	* decl2.c (output_vtable_inherit): New fn.
2237	(finish_vtable_vardecl): Call it.
2238	* class.c (build_vtable_entry_ref): New fn.
2239	(build_vtbl_ref): Call it.
2240
22411998-08-28  Mark Mitchell  <mark@markmitchell.com>
2242
2243	* cp-tree.h (build_enumerator): Take the enumeration type as a
2244	parameter.
2245	* decl.c (finish_enum): Don't set the TREE_TYPE for the
2246	enumeration constant values if we're processing_template_decls.
2247	Don't set the type for the CONST_DECLs either; that's done in
2248	build_enumerator.
2249	(build_enumerator): Take the enumeration type as a
2250	parameter.
2251	* lex.c (do_identifier): Don't resolve enumeration constants while
2252	processing template declarations, even if they happen to be
2253	TEMPLATE_PARM_INDEXs.
2254
2255	* parse.y (current_enum_type): New variable.
2256	(primary): Don't allow statement-expression in local classes just
2257	as we don't in global classes.
2258	(structsp): Use current_enum_type.
2259	(enum_list): Likewise.
2260	* pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
2261	finish_enum; they no longer occur.
2262
2263	* cp-tree.h (finish_base_specifier): New function.
2264	* parse.y (base_class): Use it.
2265	* semantics.c (finish_base_specifier): Define it.
2266
2267	* parse.y (structsp): Warn on use of typename outside of template
2268	declarations.
2269
22701998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
2271
2272	* lex.c (handle_cp_pragma): Remove #pragma vtable.
2273	* lang-options.h: Remove +e options.
2274	* decl2.c (lang_decode_option): Likewise.
2275	(import_export_vtable): Don't check write_virtuals.
2276	(finish_vtable_vardecl, finish_file): Likewise.
2277	* search.c (dfs_debug_mark): Likewise.
2278	* semantics.c (begin_class_definition): Likewise.
2279	* class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
2280
2281	* call.c (build_over_call): Check flag_elide_constructors.
2282	* decl2.c: flag_elide_constructors defaults to 1.
2283	* typeck.c (convert_arguments): Remove return_loc parm.
2284	(build_function_call_real): Adjust.
2285
2286	* search.c: Tear out all mi_matrix and memoize code.
2287	(lookup_field, lookup_fnfields): Use scratch_tree_cons.
2288	* lang-options.h: Remove documentation for -fhandle-exceptions,
2289	-fmemoize-lookups and -fsave-memoized.
2290	* cp-tree.h: Lose mi_matrix and memoize support.
2291	* decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
2292	* class.c: Lose struct class_level.
2293	(pushclass, popclass): Lose memoize support.
2294	* init.c (build_offset_ref): Likewise.
2295
2296	Never change BINFO_INHERITANCE_CHAIN.
2297	* init.c (emit_base_init): Change modification of
2298	BINFO_INHERITANCE_CHAIN to an assert.
2299	* search.c (get_base_distance_recursive): Likewise.
2300	(get_base_distance): Likewise.
2301	(lookup_member): Likewise.
2302	(convert_pointer_to_single_level): Likewise.
2303	(lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
2304	(lookup_fnfields): Likewise.
2305	* tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
2306	(unshare_base_binfos): Don't call propagate_binfo_offsets.
2307	(layout_basetypes): Call propagate_binfo_offsets instead of
2308	unshare_base_binfos.
2309	* decl.c (xref_basetypes): Call unshare_base_binfos.
2310	* pt.c (instantiate_class_template): Likewise.
2311	* tree.c (reverse_path): Remove 'copy' parm; always make a
2312	temporary copy.
2313	* class.c (build_vbase_path): Just call it.
2314	* search.c (compute_access): Likewise.  Don't re-reverse.
2315
23161998-08-27  Mark Mitchell  <mark@markmitchell.com>
2317
2318	* class.c (build_vbase_path): Use reverse_path.
2319	(finish_base_struct): Move warnings for inaccessible bases to
2320	layout_basetypes.
2321	(modify_one_vtable): Remove check of TREE_USED (binfo).
2322	(fixup_vtable_deltas1): Likewise.
2323	* cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
2324	(xref_tag): Remove binfos parameter.
2325	(make_binfo): Remove chain parameter.
2326	(reverse_path): Add copy parameter.
2327	* decl.c (init_decl_processing): Change calls to xref_tag.
2328	(xref_tag): Remove binfos parameter.
2329	(xref_basetypes): Change calls to make_binfo.
2330	* decl2.c (grok_x_components): Change calls to xref_tag.
2331	(handle_class_head): Likewise.
2332	* friend.c (do_friend): Likewise.
2333	* lex.c (make_lang_type): Change calls to make_binfo.
2334	* parse.y (structsp): Change calls to xref_tag.
2335	(named_complex_class_head_sans_basetype): Likewise.
2336	(named_class_head): Likewise.
2337	* rtti.c (init_rtti_processing): Likewise.
2338	* search.c (compute_access): Change calls to reverse_path.
2339	(dfs_get_vbase_types): Change calls to make_binfo.
2340	(get_vbase_types): Remove dead code.
2341	* tree.c (unshare_base_binfos): Change calls to make_binfo.
2342	(layout_basetypes): Warn here about inaccessible bases.
2343	(make_binfo): Remove chain parameter.
2344	(reverse_path): Add copy parameter.
2345
23461998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
2347
2348	* class.c: #if 0 complete_type_p.
2349	* init.c (build_java_class_ref, build_new_1): Remove unused locals.
2350	* method.c (process_overload_item): Likewise.
2351	* typeck.c (comp_target_types): Likewise.
2352
2353	Stop sharing binfos for indirect virtual bases.
2354	* tree.c (propagate_binfo_offsets): Unshare vbases, too.
2355	(layout_basetypes): Likewise.
2356	(unshare_base_binfos): Copy vbases, too.
2357	* cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
2358	BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
2359	(BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
2360	CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
2361	* search.c (lookup_field, lookup_fnfields, lookup_member): Remove
2362	reference to BINFO_VIA_PUBLIC.
2363	(marked_pushdecls_p, unmarked_pushdecls_p): New fns.
2364	(push_class_decls): Use them.
2365	(dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
2366	(dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
2367
23681998-08-27  Mark Mitchell  <mark@markmitchell.com>
2369
2370	* decl.c (build_enumerator): Set DECL_CONTEXT for the
2371	CONST_DECLs.
2372
23731998-08-26  Mark Mitchell  <mark@markmitchell.com>
2374
2375	* cp-tree.h (finish_enum): Change prototype.
2376	* decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
2377	VALUES parameter.  Don't try to compute mins/maxs if
2378	processing_template_decl.
2379	* parse.y (structsp): Use new calling sequence for finish_enum.
2380	* pt.c (tsubst_enum): Likewise.  Take the new type as input.
2381	(lookup_template_class): Remove unused variables.  Tweak.
2382	Register enums on instantiation list before substituting
2383	enumeration constants.
2384	(tsubst_decl): Remove unused variables.
2385	(regenerate_decl_from_template): Likewise.
2386
2387	* decl.c (duplicate_decls): Don't obliterate the
2388	DECL_TEMPLATE_INFO for a template if we're not replacing it with
2389	anything.
2390
2391	* lex.c (do_identifier): Fix typo in comment.
2392
2393Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2394
2395	* errfn.c: Remove stdarg.h/varargs.h.
2396	* tree.c: Likewise.
2397
23981998-08-25  Brendan Kehoe  <brendan@cygnus.com>
2399
2400	* pt.c (tsubst_copy): Only do typename overloading on an
2401	IDENTIFIER_NODE that happens to look like a typename if it actually
2402	has a type for us to use.
2403
24041998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2405
2406	* typeck.c (comp_cv_target_types): Split out...
2407	(comp_target_types): From here.  Don't allow cv-qual changes under
2408	a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
2409	(build_ptrmemfunc): Pass 1 to nptrs.
2410	* cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2411
24121998-08-25  Mark Mitchell  <mark@markmitchell.com>
2413
2414	* search.c (dependent_base_p): Don't compare a binfo to
2415	current_class_type; use the TREE_TYPE of the binfo instead.
2416
2417	* cp-tree.h (CLASS_TYPE_P): Revise definition.
2418
24191998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
2420
2421	* decl.c (duplicate_decls): Don't complain about different
2422	exceptions from an internal decl even if pedantic.
2423
2424	* typeck.c (convert_for_assignment): Converting from pm of vbase
2425	to derived is an error, not a sorry.
2426
2427	* call.c (build_over_call): Use convert_pointer_to_real for 'this'.
2428	* class.c (fixed_type_or_null): Rename from
2429	resolves_to_fixed_type_p.  Return the dynamic type of the
2430	expression, if fixed, or null.
2431	(resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
2432	does not match the static type.
2433	(build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
2434	resolves_to_fixed_type_p again.
2435
24361998-08-24  Mark Mitchell  <mark@markmitchell.com>
2437
2438	* pt.c (tsubst_decl): Move special case code for dealing with
2439	tricky friend templates here from ...
2440	(regenerate_decl_from_template): Here.
2441
24421998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2443
2444	* decl.c (start_decl): Remove redundant linkage check.
2445
24461998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
2447
2448	* typeck.c (c_expand_return): Handle the case that valtype
2449	is wider than the functions return type.
2450
24511998-08-24  Mark Mitchell  <mark@markmitchell.com>
2452
2453	* cp-tree.h (CLASS_TYPE_P): New macro.
2454	* decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
2455	* pt.c (process_template_parm): Undo previous change.
2456
24571998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
2458
2459	* cp-tree.h: Declare.
2460	* pt.c (decl_template_parm_p): New function.
2461	* decl.c (pushdecl): Check decls for redeclaring template parms.
2462	(xref_tag): Make redeclaration an error, print decl.
2463	* decl2.c (grokfield): Check field_decls for redeclaration as well.
2464
24651998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2466
2467	* parse.y (primary): Fix up the type of string constants.
2468
24691998-08-24  Mark Mitchell  <mark@markmitchell.com>
2470
2471	* typeck.c (convert_for_initialization): Move check for odd uses
2472	of NULL to avoid duplicate warnings.
2473
24741998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
2475
2476	* tree.c (lvalue_type): Fix for arrays.
2477	* typeck.c (string_conv_p): New fn.
2478	(convert_for_assignment): Use it.
2479	(build_unary_op): Use lvalue_type.
2480	* call.c (standard_conversion, convert_like): Use string_conv_p.
2481	(add_function_candidate): Use lvalue_type.
2482	* cvt.c (convert_to_reference): Likewise.
2483	* decl2.c (lang_decode_option): Ignore -traditional.
2484	* decl.c (init_decl_processing): flag_writable_strings inhibits
2485	flag_const_strings.
2486
24871998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
2488
2489	* lang-options.h (lang_options): Add fconst-strings to the list
2490	of valid options.
2491	* decl2.c (lang_f_options, lang_decode_option): Likewise.
2492
24931998-08-24  Nathan Sidwell  <nathan@acm.org>
2494
2495	* lex.c (real_yylex): Don't warn about long long constants if
2496	we're allowing long long.
2497
24981998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
2499
2500	* decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
2501	accessing bindings directly.
2502
2503	* search.c (my_tree_cons): Reimplement.
2504
2505	* lang-specs.h: Remove __HONOR_STD.
2506	* inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
2507
25081998-08-23  Mark Mitchell  <mark@markmitchell.com>
2509
2510	* decl.c (grokdeclarator): Complain about in-class initialization
2511	of aggregates and/or references.
2512	* pt.c (process_template_parm): Clear IS_AGGR_TYPE for
2513	TEMPLATE_TYPE_PARMs.
2514
2515	* decl2.c (grok_array_decl): Add comment.
2516	(mark_used): Don't instantiate an explicit instantiation.
2517	* friend.c (make_friend_class): Remove bogus comment.  Fix check
2518	for partial specializations.
2519	* pt.c (check_explicit_specialization): Don't
2520	SET_DECL_EXPLICIT_INSTANTIATION here.
2521	(mark_decl_instantiated): Or here.
2522	(do_decl_instantiation): Do it here, instead.  Add checks for
2523	duplicate explicit instantiations, etc.  Tidy.
2524	(do_type_instantiation): Likewise.
2525	(instantiate_decl): Improve comments.  Complain about explicit
2526	instantiations where no definition is available.
2527
2528	* cp-tree.h (ansi_null_node): Remove.
2529	* call.c (build_over_call): Warn about converting NULL to an
2530	arithmetic type.
2531	* cvt.c (build_expr_type_conversion): Likewise.  Use
2532	null_ptr_cst_p instead of expanding it inline.
2533	* decl.c (ansi_null_node): Remove.
2534	(init_decl_processing): Make null_node always have integral type.
2535	* except.c (build_throw): Warn about converting NULL to an
2536	arithmetic type.
2537	* lex.c (init_parse): Remove handling of ansi_null_node.
2538	* pt.c (type_unification_real): Don't convert NULL to void* type.
2539	* typeck.c (build_binary_op_nodefault): Fix NULL warnings.
2540	(convert_for_assignment): Warn about converting NULL to an
2541	arithmetic type.
2542	(convert_for_initialization): Likewise.
2543
25441998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
2545
2546	* tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
2547	* pt.c (coerce_template_parms): Use no_linkage_check.
2548	* decl.c (grokvardecl): Likewise.
2549	(grokfndecl): Likewise.  Members of anonymous types have no linkage.
2550
2551	* method.c (process_overload_item): Remove useless code.
2552
25531998-08-20  Per Bothner  <bothner@cygnus.com>
2554
2555	Handle new'ing of Java classes.
2556	* init.c (build_class_classref):  New function.
2557	(build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
2558	constructor does not return this;  don't need to exception-protect.
2559
2560	* pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
2561	* decl2.c (acceptable_java_type):  Handle template-derived types.
2562
25631998-08-20  Per Bothner  <bothner@cygnus.com>
2564
2565	* decl2.c (import_export_vtable):  Suppress vtables for Java classes.
2566
25671998-08-20  Mark Mitchell  <mark@markmitchell.com>
2568
2569	* decl.c (duplicate_decls): Always merge the old and new patterns
2570	for templates, regardless of whether or not the new one has
2571	DECL_INITIAL.  Don't throw away specializations.  Merge
2572	DECL_SAVED_TREE.
2573	* pt.c (tsubst_decl): Use the right pattern when calculating the
2574	complete args for a new template instance.
2575	(do_decl_instantiation): Fix typo in comment.
2576	(regenerate_decl_from_template): Deal with tricky friend template
2577	case.
2578	(instantiate_decl): Likewise.
2579
2580Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
2581
2582	* init.c (build_builtin_delete_call): Add missing assemble_external
2583	call.
2584
25851998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
2586
2587	* parse.y (notype_unqualified_id): Also accept ~A<int>.
2588
25891998-08-19  Mark Mitchell  <mark@markmitchell.com>
2590
2591	* typeck.c (build_binary_op_nodefault): Warn on use of NULL in
2592	arithmetic.
2593	* except.c (build_throw): Warn when NULL is thrown, even with
2594	-ansi.  Use ansi_null_node, rather than integer_zero_node, in the
2595	thrown expression.
2596
2597	* cp-tree.h (ansi_null_node): New variable.
2598	* decl.c (ansi_null_node): New variable.
2599	(init_decl_processing): Initialize its type.
2600	* lex.c (init_parse): Initialize its value.  Use ansi_null_node
2601	for null_node in non-ANSI mode.
2602	* typeck.c (build_binary_op_nodefault): Use ansi_null_node in
2603	place of null_node to avoid spurious errors.
2604
26051998-08-17  Mark Mitchell  <mark@markmitchell.com>
2606
2607	* cp-tree.h (enter_scope_of): New function.
2608	* parse.y (complex_direct_notype_declarator): Use it.
2609	* semantics.c (enter_scope_of): New function.
2610
26111998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
2612
2613	* decl.c (grokparms): No, here.
2614
2615	* decl.c (grokdeclarator): Catch parm with pointer to array of
2616	unknown bound here...
2617	* method.c (process_overload_item): ...not here.
2618
2619	* gxxint.texi: Remove obsolete documentation of overloading code.
2620
2621	* decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
2622	* class.c (finish_struct_bits): Likewise.
2623
2624	* tree.c (lvalue_type): Fix for arrays.
2625	* typeck.c (build_unary_op): Use lvalue_type.
2626	* call.c (add_function_candidate): Likewise.
2627	* cvt.c (convert_to_reference): Likewise.
2628
2629	* decl2.c (lang_decode_option): Ignore -traditional.
2630
2631	* init.c (build_offset_ref): Don't mess with error_mark_node.
2632	* lex.c (do_scoped_id): Use cp_error.
2633
2634	* rtti.c (get_tinfo_fn): Don't mess with the context for now.
2635
26361998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
2637
2638	* decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
2639
2640Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
2641
2642	* cp-tree.h (set_identifier_local_value): Provide prototype.
2643
2644	* decl2.c (do_namespace_alias): Remove unused variables `binding'
2645	and `old'.
2646
2647Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
2648
2649	* Makefile.in: Rename BBISON to BISON so that it can be properly
2650	inherited from the parent makefile.
2651
26521998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
2653
2654	* lang-options.h: Add -finit-priority.
2655	* decl2.c: Likewise.  Check flag_init_priority instead of
2656	USE_INIT_PRIORITY.
2657
2658	* decl2.c (setup_initp): New fn.
2659	(start_objects, finish_objects, do_ctors): Handle init_priority.
2660	(do_dtors, finish_file): Likewise.
2661
26621998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
2663
2664	* pt.c (tsubst_copy): Hush warning.
2665
2666	* rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
2667
26681998-08-12  Mark Mitchell  <mark@markmitchell.com>
2669
2670	* pt.c (print_template_context): Don't abort when instantiating a
2671	synthesized method.
2672
2673	* decl.c (grokdeclarator): Issue errors on namespace qualified
2674	declarators in parameter lists or in class scope.
2675
26761998-08-09  Mark Mitchell  <mark@markmitchell.com>
2677
2678	* pt.c (check_explicit_specialization): Don't abort on bogus
2679	explicit instantiations.
2680
26811998-08-07  Mark Mitchell  <mark@markmitchell.com>
2682
2683	* typeck.c (require_complete_type): Use complete_type_or_else.
2684	(complete_type_or_else): Always return NULL_TREE on failure, as
2685	documented.
2686
2687	* pt.c (tsubst_aggr_type): Prototype.
2688	(tsubst_decl): New function, split out from tsubst.  Set
2689	input_filename and lineno as appropriate.
2690	(pop_tinst_level): Restore the file and line number saved in
2691	push_tinst_level.
2692	(instantiate_class_template): Set input_filename and lineno as
2693	appropriate.
2694	(tsubst): Move _DECL processing to tsubst_decl.  Make sure the
2695	context for a TYPENAME_TYPE is complete.
2696
2697	* decl2.c (grokbitfield): Issue errors on bitfields declared with
2698	function type.
2699	(do_dtors): As in do_ctors, pretend to be a member of the same
2700	class as a static data member while generating a call to its
2701	destructor.
2702
2703	* cvt.c (cp_convert_to_pointer): Handle NULL pointer
2704	conversions, even in complex virtual base class hierarchies.
2705
27061998-08-06  Mark Mitchell  <mark@markmitchell.com>
2707
2708	* cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
2709	(TYPE_TEMPLATE_INFO): Likewise.
2710	(SET_TYPE_TEMPLATE_INFO): Likewise.
2711	(ENUM_TI_TEMPLATE): Likewise.
2712	(ENUM_TI_ARGS): Likewise.
2713	(lookup_nested_type_by_name): Remove.
2714	* decl.c (maybe_process_template_type_declaration): Handle enums.
2715	(start_enum): Don't check for primary-template enum declarations
2716	here.
2717	(finish_enum): Clean up, document.  Make sure template enum
2718	constants get the correct type.
2719	(build_enumerator): Copy initializers for template enumerations,
2720	too.
2721	(grok_enum_decls): Document.
2722	* lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
2723	better.  Build LOOKUP_EXPRs for local variables, even if they are
2724	TREE_PERMANENT.
2725	* pt.c (tsubst_enum): Remove field_chain parameter.
2726	(template_class_depth): Include the depth of surrounding function
2727	contexts.
2728	(push_template_decl): Check for primary-template enum declarations
2729	here.  Deal with enumeration templates.
2730	(lookup_template_class): Likewise.
2731	(for_each_template_parm): Likewise.
2732	(instantiate_class_template): Don't call tsubst_enum directly,
2733	call tsubst instead, to instantiate enums.  Deal with all
2734	field_chain issues here, not in tsubst_enum.
2735	(lookup_nested_type_by_name): Remove.
2736	(tsubst_aggr_type): Revise handling of enumeration types.
2737	(tsubst): Likewise.
2738	(tsubst_copy): Likewise.
2739	(tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
2740
27411998-08-04  Mark Mitchell  <mark@markmitchell.com>
2742
2743	* decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
2744	uses template parameters.
2745	* method.c (build_template_parm_names): Use the full set of
2746	template arguments for tsubst'ing.
2747	(build_overload_identifier): Pass the full set of template
2748	arguments to build_template_parm_names, not just the
2749	innermost_args.
2750	* pt.c (TMPL_ARGS_DEPTH): Define using
2751	TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
2752	(NUM_TMPL_ARGS): New macro.
2753	(add_outermost_template_args): Deal with the case where the outer
2754	args will be completely discarded.
2755	(coerce_template_parms): Use the full set of template arguments
2756	for tsubst'ing.  Simplify.  Add some asserts.  Improve
2757	error messages.
2758	(lookup_template_class): Pass the full set of template arguments
2759	to coerce_template_parms.
2760	(tsubst): Add assertion.
2761	(do_type_instantiation): Don't instantiate member template
2762	classes.
2763
2764	* init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
2765	name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
2766
27671998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
2768
2769	* method.c (set_mangled_name_for_decl): Change return type to void.
2770
2771	* decl.c (lookup_name_real): A namespace-level decl takes priority
2772	over implicit typename.  Avoid doing the same lookup twice.
2773
2774	* search.c (dependent_base_p): New fn.
2775	(dfs_pushdecls, dfs_compress_decls): Use it.
2776
2777	* typeck.c (get_member_function_from_ptrfunc): Don't try to handle
2778	virtual functions if the type doesn't have any.
2779
27801998-08-03  Mark Mitchell  <mark@markmitchell.com>
2781
2782	* decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
2783	uses template parameters.
2784
27851998-08-02  Mark Mitchell  <mark@markmitchell.com>
2786
2787	* cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
2788	* cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
2789	* lex.c (do_identifier): Don't use a second argument, or a type,
2790	when building LOOKUP_EXPRs.
2791	(do_identifier): Likewise.
2792	(do_scoped_id): Likewise.
2793	* method.c (hack_identifier): Improve error message.
2794	* pt.c (lookup_template_function): Don't needlessly call
2795	copy_to_permanent or build_min.
2796	(tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
2797	necessary.
2798	(do_decl_instantiation): Improve error message.
2799	* tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
2800	(build_min): Copy the type to the permanent obstack, too.
2801
28021998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
2803
2804	* init.c (init_init_processing): Remove BI* handling.
2805	(build_builtin_call): Remove.
2806	(build_builtin_delete_call): New fn.
2807	(build_delete): Use it.
2808
28091998-07-31  Mark Mitchell  <mark@markmitchell.com>
2810
2811	* cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
2812	(maybe_check_template_type): New function.
2813	* decl.c (maybe_process_template_type_declaration): New function,
2814	split out from pushtag  Call maybe_check_template_type.
2815	(pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
2816	(xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2817	* friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2818	* pt.c (template_class_depth_real): Generalization of ...
2819	(template_class_depth): Use it.
2820	(register_specialization): Use duplicate_decls for duplicate
2821	declarations of specializations.
2822	(maybe_check_template_type): New function.
2823	(push_template_decl_real): Fix comment.
2824	(convert_nontype_argument): Likewise.
2825	(lookup_template_class): Likewise.  Avoid an infinite loop on
2826	erroneous code.
2827	(tsubst_friend_function): Fix comment.
2828	(tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
2829	an IDENTIFIER_NODE.
2830	* semantics.c (begin_function_definition): Use
2831	reset_specialization to note that template headers don't apply
2832	directly to declarations after the opening curly for a function.
2833
28341998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
2835
2836	* decl.c (push_overloaded_decl): Use current_namespace instead of
2837	DECL_CONTEXT (decl) to determine where we go.
2838
2839	* decl.c (lookup_name_real): Fix typo.
2840
28411998-07-28  Mark Mitchell  <mark@markmitchell.com>
2842
2843	* friend.c (is_friend): Be lenient with member functions to deal
2844	with nested friends.
2845
28461998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
2847
2848	* class.c (finish_struct_1): Convert integer_zero_node to
2849	ssizetype before passing it to set_rtti_entry.
2850	* typeck2.c (initializer_constant_valid_p): Allow conversion of 0
2851	of any size to a pointer.
2852
28531998-07-27  Mark Mitchell  <mark@markmitchell.com>
2854
2855	* cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
2856	(build_template_decl_overload): Remove.
2857	(set_mangled_name_for_decl): New function.
2858	(innermost_args): Remove is_spec parameter.
2859	(most_specialized, most_specialized_class): Remove declarations.
2860	(lookup_template_class): Add entering_scope parameter.
2861	(maybe_process_partial_specialization): New function.
2862	(finish_template_decl): Likewise.
2863	(finish_template_type): Likewise.
2864	* class.c (finish_struct): Clean up processing of member template
2865	specializations.
2866	* decl.c (pushtag): Fix formatting.
2867	(lookup_tag): Improve handling of pseudo-global levels.
2868	(make_typename_type): Adjust call to lookup_template_class.
2869	(shadow_tag): Use maybe_process_partial_specialization.
2870	(xref_tag): Improve handling of member friends.
2871	(start_function): Call push_nested_class before
2872	push_template_decl.  Don't call push_template_decl for
2873	specializations.
2874	* decl2.c (grok_x_components): Don't call xref_tag for
2875	template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
2876	(grokclassfn): Use set_mangled_name_for_decl.
2877	(arg_assoc_class): Adjust call to innermost_args.
2878	(mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
2879	* error.c (dump_function_name): Improve printing of template
2880	function names.
2881	* friend.c (is_friend): Don't compare types of decls to determine
2882	friendship, unless flag_guiding_decls.
2883	(make_friend_class): Partial specializations cannot be friends.
2884	(do_friend): Use set_mangled_name_for_decl.  Call
2885	push_template_decl_real instead of push_template_decl.
2886	* method.c (build_decl_overload_real): Remove prototype.  Give it
2887	external linkage.
2888	(build_overload_identifier): Adjust call to innermost_args.
2889	(build_template_decl_overload): Remove.
2890	(set_mangled_name_for_decl): New function.
2891	* parse.y (.finish_template_type): New non-terminal.
2892	(template_def): Use finish_template_decl.  Use template_extdef
2893	instead of extdef.
2894	(template_extdef, template_datadef): New non-terminals, containing
2895	only those rules for things which can be templates.
2896	(datadef): Tidy.
2897	(template_type, self_template_type): Use .finish_template_type.
2898	(named_class_head): Use maybe_process_partial_specialization.
2899	* pt.c (mangle_class_name_for_template): Remove context parameter.
2900	(get_class_bindings): Remove outer_args parameter.
2901	(complete_template_args): Remove.
2902	(add_outermost_template_args): New function.
2903	(register_specialization): Return the specialization.
2904	(unregister_specialization): New function.
2905	(tsubst_template_parms): Likewise.
2906	(most_specialized, most_specialized_class): Prototype here as
2907	static.
2908	(original_template): Rename to most_general_template.
2909	(tsubst_template_parms): New function.
2910	(set_mangled_name_for_template_decl): Likewise.
2911	(TMPL_ARGS_DEPTH): New macro.
2912	(TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
2913	(TMPL_ARGS_LEVEL): New macro.
2914	(SET_TMPL_ARGS_LEVEL): Likewise.
2915	(TMPL_ARG): Likewise.
2916	(SET_TMPL_ARG): Likewise.
2917	(TMPL_ARGS_DEPTH): Likewise.
2918	(finish_member_template_decl): Use finish_template_decl.
2919	(maybe_process_partial_specialization): New function, split out
2920	from tsubst.
2921	(inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
2922	(maybe_begin_member_template_processing): Use new macros.
2923	(is_member_template): Likewise.
2924	(is_member_template_class): Likewise.
2925	(add_to_template_args): Likewise.  Deal with multiple levels of
2926	args.
2927	(maybe_process_partial_specialization): New function.
2928	(retrieve_specialization): Add consistency check.
2929	(determine_specialization): Return full argument list.
2930	(check_explicit_specialization): Tweak friend handling.  Use full
2931	argument lists.  Simplify.
2932	(current_template_args): Use new macros.
2933	(push_template_decl_real): Change ill-named mainargs to specargs.
2934	Check that a partial specialization actually specializes at least
2935	one parameter.   Improve friend handling.  Modify for full
2936	template arguments.
2937	(classtype_mangled_name): Don't mangle the names of
2938	specializations.
2939	(lookup_template_class): Add entering_scope parameter.  Use it to
2940	avoid finding a template type when an instantiation is required.
2941	Simplify.  Use full template arguments.
2942	(tsubst_friend_function): Use unregister_specialization.  Use new
2943	macros.  Use full template arguments.
2944	(tsubst_friend_class): Substitute, using tsubst_template_parms,
2945	into the template parameters before passing them to
2946	redeclare_class_template.
2947	(instantiate_class_template): Simplify.  Use full template
2948	arguments.  Adjust calls to get_class_bindings.  Use
2949	SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
2950	(innermost_args): Use new macros.
2951	(tsubst_aggr_type): New function, split out from tsubst.
2952	(tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
2953	conventions for lookup_template_class.  Refine handling of partial
2954	instantiations.   Remove calls to complete_template_args.
2955	Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
2956	and set_mangled_name_for_template_decl.
2957	(tsubst_copy): Use tsubst_aggr_type.
2958	(instantiate_template): Use full template arguments.
2959	(more_specialized): Improve formatting.
2960	(more_specialized_class): Adjust calls to get_class_bindings.
2961	(get_bindings_real): Don't call complete_template_args.
2962	(most_specialized): Don't overwrite input; create a new list.
2963	(most_specialized_class): Use most_general_template.
2964	(regenerate_decl_from_template): Use unregister_specialization.
2965	Use full template arguments.
2966	(instantiate_decl): Use full template arguments.
2967	(set_mangled_name_for_template_decl): New function.
2968	* semantics.c (begin_class_definition): Use
2969	maybe_process_partial_specialization.
2970	(finish_member_class_template): New function.
2971	(finish_template_decl): Likewise.
2972	(finish_template_type): Likewise.
2973	(typeck.c): Don't crash after issuing a compiler_error.
2974	* Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
2975
29761998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
2977
2978	* typeck2.c (build_functional_cast): Handle default-initialization.
2979
2980	* call.c (build_over_call): Pass 1 to popclass.
2981
2982	* parse.y (direct_notype_declarator): Add precedence declaration
2983	to notype_unqualified_id case.
2984	* Makefile.in (EXPECT): Adjust.
2985
2986	* tree.c (ovl_member): Fix for single function in OVL.
2987
29881998-07-27  Dave Brolley  <brolley@cygnus.com>
2989
2990	* c-lex.c (yylex): Fix boundary conditions in character literal and
2991	string literal loops.
2992
29931998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
2994
2995	* decl.c (lookup_name_real): OK, do return the from_obj value
2996	unless got_object depends on template parms.
2997
2998	* parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
2999
3000	* pt.c (coerce_template_parms): Also complain about local enums.
3001
3002	* cp-tree.h: Add prototype for set_identifier_local_value.
3003	* decl.c (set_identifier_local_value_with_scope): Make static,
3004	prototype.
3005	* search.c (covariant_return_p): Likewise.
3006	* except.c (build_terminate_handler, alloc_eh_object): Likewise.
3007
3008	* call.c (build_method_call): Only pull out the type of a destructor
3009	if it's a template type parm.
3010	* decl.c (lookup_name_real): Never return the from_obj value.
3011
30121998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3013
3014	* except.c (process_start_catch_block_old): Call start_decl_1 for
3015	catch parm.
3016	* decl.c (start_decl_1): Avoid duplicate error.
3017
3018	* init.c (expand_default_init): Only perform the initialization if
3019	it will do something.
3020
30211998-07-23  H.J. Lu  (hjl@gnu.org)
3022
3023	* parse.y (base_class): Check for invalid base class.
3024
30251998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
3026
3027	* decl2.c (import_export_template): Fold in...
3028	(import_export_class): ...to here.  Handle dllimport/export.
3029
3030	* class.c (build_vtable): Pass at_eof to import_export_vtable.
3031	(prepare_fresh_vtable): Likewise.
3032	* decl2.c (import_export_class): Split out...
3033	(finish_prevtable_vardecl): From here.
3034	* class.c (finish_struct_1): Call import_export_class if at_eof.
3035
3036	* decl.c (start_function): #if 0 mysterious code I wrote and have
3037	forgotten why.
3038	* rtti.c (get_tinfo_fn): If this is for a class type, set
3039	DECL_CONTEXT.
3040
30411998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
3042
3043	* inc/exception: Change terminate and unexpected to ().
3044
3045	* parse.y (named_class_head_sans_basetype_defn): A
3046	named_class_head_sans_basetype followed by '{' or ':' is a defn.
3047
30481998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
3049
3050	* tree.c (canonical_type_variant): New fn to handle arrays.
3051	* cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
3052	* pt.c (unify, default case): Also fold arg.  Fix array bounds case.
3053	* method.c (process_overload_item): Use build_overload_value for
3054	arrays.
3055
30561998-07-20  Dave Brolley  <brolley@cygnus.com>
3057
3058	* lex.c (mbchar.h): #include it.
3059	(GET_ENVIRONMENT): New macro.
3060	(init_parse): Set character set based on LANG environment variable.
3061	(real_yylex): Handle multibyte characters in character literals.
3062	(real_yylex): Handle multibyte characters in string literals.
3063
30641998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
3065
3066	* lex.c (do_identifier): Look for class value even if we don't
3067	have a global value.  Do implicit declaration if parsing is 2.
3068	* semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
3069	lookup.
3070
30711998-07-19  Mark Mitchell  <mark@markmitchell.com>
3072
3073	* decl.c (pushtag): Revert previous change.
3074	* pt.c (lookup_template_class): Don't put out debugging
3075	information for types that use template parameters.
3076
3077	* decl.c (pushtag): Don't put out debugging information for
3078	compiler-generated typedefs.
3079
3080	* error.c (dump_type_real): Don't crash when presented with
3081	intQI_type_node or the like.
3082
3083	* semantics.c (finish_translation_unit): Fix spelling error in
3084	comment.
3085
30861998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
3087
3088	* decl.c (lookup_name_real): Pull out single function here.
3089	(select_decl): Not here.
3090	(unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
3091
3092	* decl.c (qualify_lookup): Tweak again.
3093
3094	* pt.c (lookup_template_class): Don't mess with the context of the
3095	instantiation.
3096	* decl2.c (current_decl_namespace): Remove special handling for
3097	templates.
3098
3099	* pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
3100	a member template specialization.
3101
3102	* tree.c (ovl_member): Use decls_match to compare functions.
3103	* decl.c (decls_match): Check the context of a function.
3104
3105	* parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
3106	in Koenig lookup support rules.
3107	* semantics.c (finish_call_expr): Handle the new cases.
3108
3109	* typeck.c (build_x_function_call): Handle overloaded methods.
3110
3111	* decl.c (grokvardecl): Don't call build_static_name for extern "C".
3112
31131998-07-16  Mark Mitchell  <mark@markmitchell.com>
3114
3115	* semantics.c (finish_object_call_expr): Revert previous change.
3116	* call.c (build_new_method_call): Likewise.  Instead, convert
3117	TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
3118
31191998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
3120
3121	* decl.c (qualify_lookup): Handle templates.
3122
3123	* decl2.c (do_using_directive): Don't pass ancestor.
3124	* decl.c (push_using_directive): Calculate ancestor.
3125
3126	* decl2.c (do_nonmember_using_decl): Allow for type shadowing.
3127	* decl.c (pushdecl): Move type shadowing handling from here...
3128	(duplicate_decls): ...to here.
3129	* decl.c (set_identifier_local_value_with_scope): New fn.
3130	(pushdecl): Use it.
3131	(set_identifier_local_value, lookup_type_current_level): New fns.
3132	* decl2.c (do_local_using_decl): Handle types and binding level
3133	stuff properly.
3134
3135	* init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
3136	* decl.c (select_decl): Extract a lone function from an OVERLOAD.
3137	(lookup_namespace_name): Likewise.
3138	* typeck.c (build_unary_op): Not here anymore.
3139
3140	* decl2.c (do_class_using_decl): Make sure we get an identifier.
3141	* class.c (handle_using_decl): Ignore TYPE_DECLs.
3142
3143	* decl.c (qualify_lookup): New fn.
3144	(lookup_name_real): Use it.
3145
31461998-07-16  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3147
3148	* decl2.c (add_using_namespace): When directly using a namespace
3149	that was indirect before, promote it.
3150
3151	* cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
3152	LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
3153	LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
3154	* decl.c (select_decl): Replace two flag parameters by one.
3155	(unqualified_namespace_lookup): Likewise, pass flag.
3156	(lookup_flags): New function.
3157	(lookup_name_real): Compute flags, pass them.
3158	(lookup_namespace_name): Call with zero-flag.
3159	* decl2.c (ambiguous_decl): Add flag parameter, complain only
3160	according to flags.
3161	(lookup_using_namespace, qualified_lookup_using_namespace):
3162	Add flag parameter, pass them through.
3163	* lex.c (do_scoped_id): Call with zero-flag.
3164
31651998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
3166
3167	* typeck.c (convert_for_assignment): Use comptypes.
3168
31691998-07-16  Mark Mitchell  <mark@markmitchell.com>
3170
3171	* semantics.c (finish_object_call_expr): Move test for the
3172	function called being a TYPE_DECL to ...
3173	* call.c (build_new_method_call): Here.
3174
31751998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
3176
3177	* decl2.c (arg_assoc_class): Also look at template arguments, if any.
3178	(arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
3179
3180	* lex.c (looking_for_typename): Don't initialize.
3181
3182	* decl2.c (ambiguous_decl): Clarify error message.
3183
3184	* decl.c (push_using_directive): Iterate over namespaces used
3185	indirectly.
3186
31871998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3188
3189	* decl2.c (add_using_namespace): Iterate over namespaces used
3190	indirectly.
3191
3192	* decl.c (lookup_name_real): Accept namespace aliases as locals.
3193	(cat_namespace_levels): Ignore aliases.
3194	(duplicate_decls): Ignore duplicate aliases.
3195	* decl2.c (do_namespace_alias): Process block level namespace
3196	aliases.  Store alias with pushdecl.  Remove odr errors.
3197	* parse.y (namespace_alias): New non-terminal.
3198	(extdef): Use it.
3199
32001998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
3201
3202	* decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
3203	Handle TEMPLATE_TYPE_PARM.
3204	(arg_assoc): Rewrite.
3205
3206	* pt.c (complete_template_args): Don't look at the context unless
3207	we have to.
3208
3209	* method.c (build_decl_overload_real): Fix namespace handling.
3210
3211	* typeck.c (build_unary_op): Extract a lone function from an
3212	OVERLOAD.
3213
3214	* call.c (build_scoped_method_call): Handle getting a namespace
3215	for basetype in a destructor call.
3216	(check_dtor_name): Handle enums.
3217
3218	* parse.y (using_directive): New nonterminal.
3219	(extdef, simple_stmt): Use it.
3220
32211998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3222
3223	* decl2.c (add_function): Move error message ...
3224	(arg_assoc_namespace): ... from here.
3225
32261998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
3227
3228	* parse.y (namespace_qualifier): Fix multiple level handling.
3229	* decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
3230	(arg_assoc): Don't skip the first argument of a function.
3231
3232Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
3233
3234	* search.c (my_tree_cons): Clean up.
3235
32361998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
3237
3238	* call.c (joust): Don't warn about "confusing" conversions to the
3239	same type.
3240
32411998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3242
3243	* class.c (push_nested_class): Complain about namespaces.
3244	* decl.c (start_decl): Enter the object's namespace.
3245	(cp_finish_decl): Leave it.
3246	(grokdeclarator): Likewise.
3247	* decl2.c (check_decl_namespace): New function.
3248	(finish_file): Call it.
3249	* parse.y (complex_direct_notype_declarator): Set complexity
3250	of namespace-qualified ids to -1, enter the namespace.
3251
3252	* method.c (build_template_decl_overload): Expect _DECL as first
3253	parameter.  Put context temporarily into current_namespace.
3254	* pt.c (check_explicit_specialization): Change caller.
3255	(tsubst): Likewise.
3256
3257	* init.c (build_offset_ref): Call mark_used and
3258	convert_from_reference for namespace members.
3259
3260Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3261
3262	* search.c (my_tree_cons): The bitfield is at index 2.
3263
3264Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
3265
3266	* lang-options.h: Format changed to work with new --help support
3267	in gcc/toplev.c
3268
32691998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3270
3271	* decl2.c (build_expr_from_tree): Change calls of do_identifier.
3272	Do Koenig lookup in CALL_EXPR.
3273	(arg_assoc): Handle error_mark.
3274	* lex.c (is_global): New function.
3275	(do_identifier): Expect arguments for Koenig lookup.
3276	* parse.y (primary): Add rules for calls of unqualified function calls.
3277	(do_id): Change call of do_identifier.
3278	* pt.c (finish_stmt_expr): Likewise.
3279	* semantics.c (finish_id_expr): Likewise.
3280	(finish_call_expr): Add integer parameter to indicate
3281	argument-dependent lookup.
3282
3283	* decl.c (struct binding_level): New field using_directives.
3284	(push_using_decl): Not sorry anymore.
3285	(push_using_directive): New function.
3286	(lookup_tag): Use CP_DECL_CONTEXT to iterate.
3287	(unqualified_namespace_lookup): New function, code from ...
3288	(lookup_name_real): ... here.
3289	* decl2.c (lookup_using_namespace): Pass using list instead of
3290	initial scope.
3291	(validate_nonmember_using_decl): New function.
3292	(do_nonmember_using_decl): New function.
3293	(do_toplevel_using_decl): Use them.
3294	(do_local_using_decl): New function.
3295	(do_using_directive): Support block-level directives.
3296	* parse.y (simple_stmt): Support using declarations and
3297	directives.
3298	(namespace_qualifier, namespace_using_decl): New non-terminals.
3299
3300	* xref.c (classname): New function.
3301	(GNU_xref_hier): Change class and base parameters to tree.
3302	* decl.c (xref_baseypes): Change caller.
3303	* friend.c (make_friend_class): Likewise.
3304
33051998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
3306
3307	* typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
3308	comparison.
3309
3310	* pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
3311	template template parameter, record its use.
3312	(for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
3313	its template arguments if exists.
3314
3315	* pt.c (coerce_template_template_parms): New function equivalent
3316	to coerce_template_parms when IS_TMPL_PARM is true.
3317	(coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
3318	all callers changed.
3319
3320	(coerce_template_parms): Access ARGLIST properly when creating a
3321	new vector.  Only accept implicit TYPE_DECL as valid argument for
3322	a template template parameter when it is a base class of
3323	current_class_type.  Don't display error message when COMPLAIN is
3324	false.
3325
33261998-07-12  Klaus Kaempf  (kkaempf@progis.de)
3327
3328	* repo.c (get_base_filename): Use file_name_nondirectory.
3329	(open_repo_file): Likewise.
3330	* cp-tree.h (file_name_nondirectory): Add prototype.
3331
33321998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
3333
3334	* friend.c (do_friend): Pull the identifier out of declarator.
3335	Use cp_error and friends.
3336	* decl2.c (qualified_lookup_using_namespace): Fix call to
3337	purpose_member.
3338	* decl.c (lookup_name_real): Don't call complete_type on a namespace.
3339	(grokvardecl): Use DECL_CLASS_SCOPE_P.
3340	* cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
3341	* class.c (warn_hidden): Fix for OVERLOAD.
3342	From grahams@rcp.co.uk:
3343	* cp-tree.h (DEFARG_NODE_CHECK): New macro.
3344	(DEFARG_LENGTH, DEFARG_POINTER): Use it.
3345
3346Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
3347
3348	* g++.1 (-traditional): Remove duplicated documentation.
3349
33501998-07-11  Mark Mitchell  <mark@markmitchell.com>
3351
3352	* method.c (flush_repeats): Add nrepeats parameter.
3353	(issue_nrepeats): Likewise.
3354	(is_back_referenceable_type): New function.  Don't back-reference
3355	TEMPLATE_TYPE_PARMs as well as simple types like integers.
3356	(build_mangled_name_for_type): Likewise.
3357	(build_mangled_name_for_type_with_Gcode): Likewise.
3358	(lasttype): Remove.
3359	(nrepeats): Likewise.
3360	(Nrepeats): Likewise.
3361	(start_squangling): Don't clear the variables removed above.
3362	(end_squangling): Likewise.
3363	(flush_repeats): Tidy.  Use nrepeats parameter rather than
3364	Nrepeats global.
3365	(issue_nrepeats): Likewise, but with nrepeats global.  Use
3366	is_backreferenceable_type.
3367	(build_overload_nested_name): Tidy.  Add comment.  Use
3368	build_mangled_name_for_type.
3369	(build_underscore_int): Comment.
3370	(build_overload_scope_ref): Use build_mangled_name_for_type.
3371	(build_overload_int): Likewise.
3372	(build_template_template_parm_names): Tidy.
3373	(build_template_parm_names): Use build_mangled_name_for_type.
3374	(build_overload_identifier): Add comments.
3375	(build_mangled_name_for_type_with_Gcode): Split out from
3376	build_mangled_name.
3377	(build_mangled_name_for_type): Use it.
3378	(build_mangled_name): Rework to use build_mangled_name_for_type
3379	and to not use global nrepeats/Nrepeats.  Tidy.
3380	(process_modifiers): Tidy.
3381	(check_btype): Use is_backreferenceable_type.  Add comment.
3382	Rename `node' to `type'.
3383	(process_overload_item): Set numeric_output_need_bar here.
3384	Use build_mangled_name_for_type.  Tidy.
3385	(build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
3386	build_mangled_name_for_type.
3387
3388	* pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
3389	for TYPE_DECLs.
3390
33911998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
3392
3393	* cp-tree.h (warn_long_long): Define.
3394	* decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
3395	warning "ANSI C++ does not support `long long'".
3396	* decl2.c (warn_long_long): Define.
3397	(lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
3398
33991998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
3400
3401	* decl.c (xref_tag): Handle attributes between 'class' and name.
3402	* parse.y (aggr): Likewise.
3403	* semantics.c (finish_class_definition): Likewise.
3404	* Makefile.in (EXPECTED): Adjust.
3405
3406	* cp-tree.h: Declare flag_optional_diags and warn_multichar.
3407	* decl2.c: Define them.
3408	(lang_decode_option): Handle them.
3409	* lang-options.h: Add -foptional-diags.
3410	* class.c (finish_struct): Don't complain about multiple meanings of
3411	name if -fno-optional-diags.
3412	* decl.c (pushdecl_class_level): Likewise.
3413	* lex.c (real_yylex): Check warn_multichar.
3414
34151998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
3416
3417	* decl.c (lookup_tag): Use CP_DECL_CONTEXT.
3418
3419	* tree.c (make_binfo): Fix length.
3420
34211998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
3422
3423	* decl2.c (lang_decode_option): Remove warn_template_debugging.
3424	* lang-options.h: Likewise.
3425
3426Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3427
3428	* except.c (build_eh_type_type_ref): Remove unused variable `susp'.
3429	(process_start_catch_block): Likewise for variables
3430	`false_label_rtx', `call_rtx' and `return_value_rtx'.
3431
34321998-06-29  Brendan Kehoe  <brendan@cygnus.com>
3433
3434	* tree.c (build_srcloc): Make sure we allocate this node on the
3435	permanent obstack.
3436
3437Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
3438
3439	* g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
3440	(lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
3441	(lang_specific_driver): Only add -lm automatically if need_math is
3442	nonzero.
3443
3444Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
3445
3446	* Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
3447
3448Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3449
3450	* Makefile.in (EXPR_H): New dependency variable.
3451	(decl2.o): Depend on $(EXPR_H).
3452	(typeck.o): Likewise.
3453	(init.o): Likewise.
3454	(expr.o): Likewise.
3455
34561998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
3457
3458	* decl.c (start_enum): Put local enums on permanent_obstack.
3459
34601998-06-25  Mark Mitchell  <mark@markmitchell.com>
3461
3462	* cp-tree.h (c_get_alias_set): Declare.
3463	* decl.c (init_decl_processing): Set lang_get_alias_set.
3464
34651998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
3466
3467	* cp-tree.h (mark_all_runtime_matches): Add function prototype.
3468	* except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
3469	flag for all function decls which are in the exception table.
3470	* exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
3471	* decl2.c (finish_file): Call mark_all_runtime_matches to make sure
3472	code is emitted for any referenced rtti function.
3473
34741998-06-25  Dave Brolley  <brolley@cygnus.com>
3475
3476	* lang-specs.h: Use new | syntax to eliminate
3477	string concatenation.
3478
34791998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
3480
3481	* cp-tree.h (CP_DECL_CONTEXT): New macro.
3482	* decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
3483	* method.c (build_overload_nested_name): Likewise.
3484	* sig.c (build_signature_pointer_or_reference_type): Don't set
3485	DECL_CONTEXT.
3486
34871998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3488
3489	Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
3490	* cp-tree.h (FROB_CONTEXT): New macro.
3491	(DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
3492	* decl.c (namespace_binding): Replace NULL_TREE with
3493	global_namespace.
3494	(set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
3495	* decl2.c (is_namespace_ancestor, lookup_using_namespace):
3496	Likewise.
3497	* decl.c (pushtag): Use FROB_CONTEXT.
3498	(pushdecl, make_typename_type, define_function, grokdeclarator):
3499	Likewise.
3500	* decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
3501	* pt.c (push_template_decl_real, lookup_template_class, tsubst):
3502	Likewise.
3503	* decl2.c (decl_namespace): Return global_namespace if no context.
3504	* method.c (build_overload_nested_name): Expect null as context.
3505	* pt.c (mangle_class_name_for_template): Do nothing for null
3506	contexts.
3507	(lookup_template_class): Allow for null id_context.
3508
35091998-06-25  Richard Henderson  <rth@cygnus.com>
3510
3511	* method.c (emit_thunk): Set current_function_is_thunk for the
3512	ASM_OUTPUT_MI_THUNK case as well.
3513
35141998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
3515
3516	* exception.cc (__cplus_type_matcher): Get a match_info pointer
3517	instead of an exception table entry as a parameter.
3518
35191998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
3520
3521	* parse.y (function_try_block): Don't call start_catch_handler.
3522	* except.c (call_eh_info): Remove coerced field from declaration.
3523	(build_eh_type_type_ref): New function to create an address of a
3524	rtti function for the new style exception tables.
3525	(expand_start_catch_block): Split function, this contains the
3526	common part.
3527	(process_start_catch_block_old): New function to perform the rest
3528	of expand_start_catch_block under old style exceptions.
3529	(process_start_catch_block_old): New function to perform the rest
3530	of expand_start_catch_block under new style exceptions.
3531	(expand_end_catch_block): Only pop the false label off the stack under
3532	the old style of exceptions.
3533	* semantics.c (finish_try_block): Don't call start_catch_handler.
3534	* exception.cc (struct cp_eh_info): Add original_value field.
3535	(__cplus_type_matcher): Perform type matching on the original exception
3536	value, and if we have a match, set the current value.
3537	(__cp_push_exception): Set the original exception value.
3538
35391998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
3540
3541	* call.c (joust): Fix confusing conversion warning.
3542
3543	* call.c (build_op_delete_call): Add placement parm.  Check
3544	LOOKUP_SPECULATIVELY.
3545	* cp-tree.h, decl2.c, init.c: Adjust.
3546	* decl.c (finish_function): Use it.
3547
3548	* pt.c (tsubst): Diagnose creating void fields or variables.
3549
3550Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3551
3552	* call.c (build_scoped_method_call): Remove unused variable `tmp'.
3553
3554	* cp-tree.h (check_dtor_name): Add prototype.
3555
3556	* init.c (expand_member_init): Remove unused variables
3557	`ptr_type_node', `parm' and `rval'.
3558
3559	* ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
3560	in call to fprintf.
3561	(lang_print_xnode): Likewise.
3562
3563	* typeck2.c (enum_name_string): Cast argument to sprintf to long
3564	and use %ld specifier.
3565
3566	* xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
3567	specifier in call to fprintf.
3568	(GNU_xref_member): Cast argument to sprintf to int.
3569
3570Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
3571
3572	* typeck2.c (pop_init_level): Warn about implicit zero initialization
3573	of struct members.
3574
3575Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3576
3577	* cp-tree.h: Prototype function `check_java_method'.
3578
35791998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3580
3581	* class.c (finish_struct): Make conflicting use of id a pedwarn.
3582	* decl.c (pushdecl_class_level): Likewise.
3583
35841998-06-17  Mark Mitchell  <mark@markmitchell.com>
3585
3586	* pt.c (convert_nontype_argument): Issue an error when presented
3587	with an integer (real) constant that cannot be simplified to an
3588	INT_CST (REAL_CST).
3589
3590	* cp-tree.h (c_get_alias_set): Remove declaration added in
3591	1998-06-13 change that should never have been checked in.
3592
35931998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3594
3595	* typeck.c (build_binary_op_nodefault): Change % in format strings
3596	to %%.
3597
3598	* decl.c (grokvardecl): Don't build_static_name for decls that
3599	aren't at namespace scope.
3600
3601	* init.c (perform_member_init): Catch default-initialization of
3602	references.
3603
36041998-06-17  Mark Mitchell  <mark@markmitchell.com>
3605
3606	* errfn.c (cp_thing): Handle the `%%' formatting sequence.
3607
36081998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
3609
3610	* method.c (hack_identifier): Complain about getting a namespace
3611	or class template.
3612	* typeck.c (decay_conversion): Remove check for namespaces.
3613	* typeck2.c (incomplete_type_error): Likewise.
3614	* parse.y (template_arg): Add PTYPENAME expansion.
3615
36161998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
3617
3618	* decl.c (grokvardecl): Don't build external assembler names for
3619	TYPENAMEs in other namespaces as there is no declarator.
3620	* error.c (cp_file_of, cp_line_of): Don't extract file or line number
3621	info from DECL_CONTEXT if it is NULL.
3622
36231998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
3624
3625	* call.c (check_dtor_name): Split out.
3626	(build_scoped_method_call): Use it.
3627	(build_method_call): Use it.
3628	* init.c (build_offset_ref): Use it.
3629
3630	* typeck.c (build_static_cast): Fix handling of pointers to members.
3631
3632	* decl.c (finish_function): Just return nothing from a constructor.
3633	* typeck.c (c_expand_return): Complain about returning a void
3634	expression from a destructor.
3635
36361998-06-13  Mark Mitchell  <mark@markmitchell.com>
3637
3638	* class.c (alter_access): Accept a BINFO explaining how to get
3639	from the entity whose accessed is being altered to the type doing
3640	the altering.
3641	(handle_using_decl): New function containing code split out from ...
3642	(finish_struct_1): Here.
3643
3644	* cp-tree.h (complete_type_or_else): Declare.
3645	* init.c (build_new_1, build_delete): Use it.
3646	* typeck.c (require_complete_type): Use complete_type, rather than
3647	expanding it inline.
3648	(complete_type_or_else): New function.
3649	(build_component_ref): Use it.
3650	(pointer_int_sum): Make sure the type pointed to is complete.
3651	(pointer_diff): Likewise.
3652
3653	* pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
3654	types.
3655
3656	* search.c (get_matching_virtual): Note that member templates
3657	cannot override virtual functions.
3658
36591998-06-12  Brendan Kehoe  <brendan@cygnus.com>
3660
3661	* pt.c (check_explicit_specialization): If DECLARATOR turned into
3662	an error_mark_node from lookup_template_function, return the same.
3663	(determine_specialization): Also make sure TEMPLATE_ID isn't an
3664	error_mark_node, before we try to read its operands.
3665	* decl.c (grokdeclarator): If we got an error_mark_node from
3666	check_explicit_specialization, just return it right back.
3667
36681998-06-12  Mark Mitchell  <mark@markmitchell.com>
3669
3670	* class.c (instantiate_type): Don't treat template-ids that don't
3671	specify any template arguments as equivalent to ordinary
3672	identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
3673	pointer-to-members for member templates.  Tidy slightly.
3674	* cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
3675	* init.c (build_offset_ref): Handle template-ids like ordinary
3676	identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
3677	offset part of the OFFSET_REF.
3678	* typeck.c (build_unary_op): Change check for unknown types to
3679	look for OFFSET_REFs, not SCOPE_REFs.
3680
36811998-06-11  Mark Mitchell  <mark@markmitchell.com>
3682
3683	* pt.c (is_member_template_class): New function.
3684	(push_template_decl_real): Use it.
3685
36861998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
3687
3688	* friend.c (do_friend): Add support for nested classes using
3689	member functions of the enclosing class as friends.
3690
36911998-06-10  Mark Mitchell  <mark@markmitchell.com>
3692
3693	* call.c (convert_default_arg): Make global, not static.
3694	(convert_arg_for_ellipsis): Split out from ...
3695	(build_over_call): Here.
3696	* cp-tree.h (convert_default_arg); Declare.
3697	(convert_arg_to_ellipsis): Likewise.
3698	(do_member_init): Remove.
3699	* init.c (do_member_init): Remove; this code is dead.
3700	(expand_member_init): Remove much of this code; it is dead.
3701	* typeck.c (convert_arguments): Use convert_default_arg and
3702	convert_arg_for_ellipsis, rather than duplicating here.
3703
3704	* call.c (convert_like): Don't fail silently if
3705	build_user_type_conversion fails.  Always return error_mark_node
3706	for failure.
3707
37081998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3709
3710	* search.c (covariant_return_p): Complain about ambiguous base.
3711
3712	* typeck.c (build_component_ref): Diagnose ref to nested type.
3713
37141998-06-10  Brendan Kehoe  <brendan@cygnus.com>
3715
3716	* decl.c (grokparms): Check that INIT isn't an error_mark_node
3717	before giving error about invalid type for default arg.
3718
37191998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3720
3721	* call.c (build_method_call): Fix thinko.
3722
37231998-06-10  Dave Brolley  <brolley@cygnus.com>
3724
3725	* decl2.c (lang_decode_option): New argc/argv interface.
3726	* cp-tree.h (lang_decode_option): New argc/argv interface.
3727	* lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
3728	specified for cpplib-enabled compilers.
3729	* lex.c (lang_init): Don't check_newline for cpplib.
3730	(init_parse): Don't initialize cpplib here.
3731
37321998-06-10  Brendan Kehoe  <brendan@cygnus.com>
3733
3734	* typeck.c (build_component_ref): Make sure FIELD has a lang_specific
3735	piece before checking DECL_MUTABLE_P.
3736
37371998-06-10  John Carr  <jfc@mit.edu>
3738
3739	* tree.c (debug_binfo): Make printf format match arguments.
3740
3741	* error.c (OB_PUTI): Make printf format match arguments.
3742
37431998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
3744
3745	* init.c (perform_member_init): Handle default-initialization.
3746
3747	* except.c (build_throw): Handle throwing NULL.
3748
3749	* typeck.c (build_x_function_call): Use resolve_offset_ref.
3750
3751	* search.c (compute_access): Only strip an anonymous union
3752	for a FIELD_DECL.
3753
3754	* call.c (add_builtin_candidates): Tweak.
3755
3756	* cvt.c (build_expr_type_conversion): Restore code for conversion
3757	from class types.
3758	* decl2.c (delete_sanity): Use it.  Clean up.
3759
3760	* typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
3761
37621998-06-10  Branko Cibej  <branko.cibej@hermes.si>
3763
3764	* typeck.c (c_expand_return): Don't warn about void expressions on
3765	return statements in functions returning void.
3766
37671998-06-09  Mark Mitchell  <mark@markmitchell.com>
3768
3769	* pt.c (fn_type_unification): Revise documentation.  Tidy.
3770	(type_unification): Likewise.
3771
37721998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
3773
3774	* semantics.c (finish_try_block): Rename expand_start_catch, and delete
3775	expand_end_catch.
3776	* parse.y (function_try_block): Rename expand_start_catch, and delete
3777	expand_end_catch.
3778	* except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
3779	expand_end_catch.
3780
37811998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
3782
3783	* search.c (lookup_member): New fn.
3784	* class.c (finish_struct_1): Use it.
3785	* decl.c (lookup_name_real): Use it.
3786
3787Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3788
3789	* Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
3790
3791	* cp-tree.h: Add prototype for `maybe_print_template_context' and
3792	`maybe_make_one_only'.
3793
3794	* decl.c (auto_function): Remove unused variable `decl'.
3795
3796	* decl2.c: Include dwarf2out.h and dwarfout.h.
3797
3798	* lex.c: Remove redundant declarations of `set_float_handler' and
3799	`asm_out_file'.
3800
38011998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
3802
3803	* except.c (init_exception_processing): Remove NEW_EH_MODEL compile
3804	time flag.  Call __cp_eh_info instead of __cp_exception_info.
3805	* exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
3806	(__cp_exception_info): Return offset into cp_eh_info structure to
3807	match what use to be the start of this structure.
3808	(__cp_eh_info): New function to return a pointer to cp_eh_info struct.
3809	(__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
3810	compile time flag.
3811	(__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
3812	__cp_eh_info instead of __cp_exception_info.
3813
38141998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
3815
3816	* decl.c (cp_finish_decl): Disable inlining of extern inlines
3817	with static variables.
3818
38191998-06-08  Mark Mitchell  <mark@markmitchell.com>
3820
3821	* init.c (build_offset_ref): Correct previous change to use build,
3822	not build_min.
3823
38241998-06-07  Mark Mitchell  <mark@markmitchell.com>
3825
3826	* class.c (instantiate_type): Handle pointer-to-members where the
3827	member is a template.
3828	* init.c (build_offset_ref): Likewise.
3829	* typeck.c (build_unary_op): Likewise.
3830
38311998-06-07  Richard Henderson  <rth@cygnus.com>
3832
3833	* lex.c (lang_init_options): New function.
3834	(lang_init): Remove flag_exceptions == 2 hack.
3835
38361998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
3837
3838	* search.c (envelope_add_decl): Tweak for implicit typename.
3839
3840	* call.c (joust): Also warn about confusing conversion op/constructor
3841	overload resolution.
3842
3843	* spew.c (yylex): Also return the TYPE_DECL if got_object.
3844	Don't clear got_object after '~'.
3845	* call.c (build_scoped_method_call): Tweak destructor handling.
3846	(build_method_call): Likewise.
3847	* pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
3848	TYPE_MAIN_VARIANT for destructors.
3849	* semantics.c (finish_object_call_expr): Complain about calling a
3850	TYPE_DECL.
3851
38521998-06-05  Per Bothner  <bothner@cygnus.com>
3853
3854	* g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
3855	Define - update needed by gcc.c change.
3856
38571998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
3858
3859	* error.c (cp_printers): Use 'o' instead of '_' for the null entry.
3860
38611998-06-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3862
3863	* cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
3864	* decl.c (lookup_name_real): Add namespaces_only parameter.
3865	If set, return only NAMESPACE_DECLs.
3866	(select_decl): Likewise.
3867	(identifier_type_value): Give additional parameter.
3868	(lookup_name_nonclass): Likewise.
3869	(lookup_name): Likewise.
3870	(find_binding): Skip namespace aliases.
3871	(binding_for_name): Likewise.
3872	(push_namespace): Check for namespace aliases.
3873	(lookup_name_namespace_only): New function.
3874	(begin_only_namespace_names, end_only_namespace_names): New functions.
3875	* decl2.c (set_decl_namespace): Skip namespace aliases.
3876	(do_using_directive): Likewise.
3877	(do_namespace_alias): Produce namespace aliases, fix alias
3878	redeclaration.
3879	* error.c (dump_decl): Support SCOPE_REF.
3880	* parse.y (extdef): Wrap lookup with namespace_only for namespace
3881	aliases and using declarations.
3882
38831998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
3884
3885	* tree.c (really_overloaded_fn): Only see through one TREE_LIST.
3886
3887	* error.c (dump_expr): Clean up NEW_EXPR case.
3888
38891998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
3890
3891	Suggested by Brendan Kehoe
3892	* decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
3893	treat it as using ::decl.
3894
3895	* decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
3896
3897	* tree.c (mapcar): Support NEW_EXPR.
3898
3899	* error.c (dump_expr): Support NEW_EXPR.
3900
39011998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
3902
3903	* method.c (make_thunk): Use overload machinery to make name.
3904	* search.c (covariant_return_p): New fn.
3905	(get_matching_virtual): Use it.
3906
3907	* init.c (build_new_1): Fix check for void.
3908
39091998-06-01  Per Bothner  <bothner@cygnus.com>
3910
3911	* cp-tree.h (TYPE_FOR_JAVA):  New macro.
3912	* decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
3913	java_int_type_node, java_long_type_node, java_float_type_node,
3914	java_double_type_node, java_char_type_node, java_boolean_type_node):
3915	New "primitive" types, with predefined names __java_byte etc.
3916	(record_builtin_java_type):  New function.
3917	(init_decl_processing):  Make Java types with record_builtin_java_type.
3918	(pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
3919	(xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
3920	(grokfndecl):  Call check_java_method for Java classes.
3921	* method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
3922	(process_overload_item):  Match types against specific
3923	java_XX_type_node types, rather than using is_java_type.
3924	* class.c (finish_struct_1):  Don't add default copy constructor
3925	or operator= if TYPE_FOR_JAVA.
3926	(pop_lang_conext):  Restore strict_prototyp proper if Java.
3927	* decl2.c (acceptable_java_type, check_java_method):  New functions.
3928	* pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
3929	(tsubst):  Move common statement after if statement.
3930	* typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
3931
39321998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
3933
3934	* pt.c (for_each_template_parm): Use first_rtl_op.
3935
3936	* tree.c (build_cplus_array_type_1): Also check index_type for
3937	template parms.
3938
39391998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
3940
3941	* pt.c (tsubst): Always copy BINFO_BASETYPES.
3942
39431998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
3944
3945	* tree.c (layout_basetypes): If we change TYPE_SIZE, change
3946	TYPE_SIZE_UNIT too.
3947
39481998-05-29  Mark Mitchell  <mark@markmitchell.com>
3949
3950	* decl.c (grokdeclarator): Don't complain about in-class
3951	initialization of static consts if we don't really know the type
3952	of the variable.
3953
39541998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
3955
3956	* cp-tree.h (DECL_DESTRUCTOR_P): New macro.
3957	* method.c (build_destructor_name): New fn.
3958	* decl2.c (maybe_retrofit_in_chrg): Split out...
3959	(grokclassfn): From here.  Reorganize.
3960	* decl.c (grok_ctor_properties): Make sure ctors for types with
3961	vbases have the in_chrg parm.
3962	* pt.c (instantiate_class_template): Update
3963	TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
3964	grok_*_properties.
3965	(tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
3966
39671998-05-28  Mark Mitchell  <mark@markmitchell.com>
3968
3969	* pt.c (instantiate_decl): Make test for whether or not static
3970	variables should be instantiated early match its comment.
3971
39721998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
3973
3974	* decl.c (start_decl): Always pedwarn about vacuously redeclaring
3975	a member.
3976	(start_function): Call check_default_args.
3977	* decl2.c (grokfield): Don't call check_default_args.
3978	(check_default_args): Use cp_error_at.
3979	* lex.c (do_pending_defargs): Call check_default_args.
3980
39811998-05-27  Brendan Kehoe  <brendan@cygnus.com>
3982
3983	* call.c (build_method_call): Make sure get_type_value returns
3984	something before we try to use its TYPE_MAIN_VARIANT.
3985	(build_scoped_method_call): Likewise.
3986
39871998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
3988
3989	* typeck2.c (digest_init): Complain about getting a TREE_LIST to
3990	initialize an array.
3991
3992	* search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
3993	DECL_VIRTUAL_P.
3994
3995	* friend.c (do_friend): Clarify template warning.
3996
39971998-05-27  Mark Mitchell  <mark@markmitchell.com>
3998
3999	* decl.c (shadow_label): Don't treat decls as identifiers.
4000	(maybe_push_to_top_level): Clear shadowed_labels.
4001
4002	* pt.c (instantiate_decl): Reset lineno and filename after calling
4003	regenerate_decl_from_template.
4004
4005	* decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
4006	error_mark_node.
4007
40081998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
4009
4010	* parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
4011
40121998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
4013
4014	* pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
4015	(convert_nontype_argument): Handle cases when nontype template
4016	parameters become classes after substitution.
4017
40181998-05-26  Mark Mitchell  <mark@markmitchell.com>
4019
4020	* friend.c (is_friend): Use comptypes, rather than == to compare
4021	types.  Modify for new representation of template friends.
4022	(make_friend_class): Likewise.
4023	* pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
4024	(instantiate_class_template): Deal with template friends.
4025
4026	* decl.c (store_parm_decls): Remove redundant call to
4027	expand_main_function.
4028
40291998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
4030
4031	* decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
4032	DECL_USE_TEMPLATE.
4033
40341998-05-26  Per Bothner  <bothner@cygnus.com>
4035
4036	* language_as_string:  Handle lang_java.
4037
40381998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
4039
4040	* decl.c (pushdecl): Don't copy the type_decl.
4041
40421998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4043
4044	* class.c (pushclass): Always store TYPE_MAIN_VARIANT in
4045	current_class_type.
4046	* decl.c (grokdeclarator): Put typedefs on the type's obstack.
4047
4048	* parse.y (complex_direct_notype_declarator): Use $1 to access
4049	scope of notype_qualified_id.
4050
40511998-05-26  Dave Brolley  <brolley@cygnus.com>
4052
4053	* lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
4054	(init_parse): Initialize cpplib interface.
4055
4056	* Makefile.in (CXX_OBJS): Make sure dependencies never end with an
4057	empty continuation.
4058
40591998-05-26  Mark Mitchell  <mark@markmitchell.com>
4060
4061	* decl.c (pushtag): Avoid crashing on erroneous input.
4062
40631998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4064
4065	* decl.c (push_namespace): Only produce one unique name for
4066	anonymous namespaces.
4067	(get_unique_name): Remove.
4068
40691998-05-25  Mark Mitchell  <mark@markmitchell.com>
4070
4071	* call.c (tourney): Don't do any extra comparisons.
4072
4073	* decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
4074
4075	* cp-tree.h (processing_template_parmlist): Declare.
4076	* decl.c (pushtag): Don't call push_template_decl when we
4077	shouldn't.
4078	* pt.c (processing_template_parmlist): New variable.
4079	(TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
4080	(complete_template_args): Use it.
4081	(add_to_template_args): Likewise.
4082	(innermost_args): Likewise.
4083	(tsubst): Likewise.
4084	(begin_template_parm_list): Use processing_template_parmlist.
4085	(end_template_parm_list): Likewise.
4086
4087	* cp-tree.h (ANON_UNION_TYPE_P): New macro.
4088	* decl.c (grokdeclarator): Use it.
4089	* decl2.c (grok_x_components): Likewise.
4090	* init.c (initializing_context): Likewise.
4091	* method.c (do_build_copy_constructor): Likewise.
4092	(do_build_assign_ref): Likewise.
4093	* search.c (compute_access): Likewise.
4094	* typeck.c (build_component_ref): Likewise.
4095
4096	* decl.c (grokdeclarator): Don't give a cv-qualified version of an
4097	unnamed type a typedef name "for linkage purposes".
4098
4099	* pt.c (lookup_template_class): Don't look at
4100	IDENTIFIER_CLASS_VALUE when there's no current_class_type.
4101
4102	* method.c (build_overload_int): Handle error cases gracefully.
4103
4104	* pt.c (instantiate_decl): Handle static member variables
4105	correctly.
4106
4107	* pt.c (tsubst): Use the tsubst'd type when producing new
4108	TEMPLATE_PARM_INDEX nodes.
4109
41101998-05-24  Mark Mitchell  <mark@markmitchell.com>
4111
4112	* tree.c (cp_tree_equal): Handle pointers to member functions.
4113
4114	* call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
4115	sure the type of the REF_BIND is a reference type.
4116	(maybe_handle_ref_bind, compare_ics): Rename reference_type to
4117	target_type for clarity.
4118
4119	* parse.y (xcond): Move call to condition_conversion ...
4120	* semantics.c (finish_for_cond): Here.
4121	* parse.c: Regenerated.
4122
41231998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
4124
4125	* decl.c (push_namespace): Namespaces have type void.
4126	* typeck2.c (incomplete_type_error): Complain about namespace
4127	used as expression.
4128	* typeck.c (decay_conversion): Likewise.
4129
41301998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4131
4132	* error.c (dump_expr): Support namespaces.
4133
41341998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
4135
4136	* cp-tree.def: Add SRCLOC.
4137	* cp-tree.h: Add struct tree_srcloc and accessor macros.
4138	* tree.c (build_srcloc, build_srcloc_here): New fns.
4139	* pt.c (add_pending_template): Use build_srcloc_here.
4140	(push_tinst_level): Update last_template_error_tick before erroring.
4141	(instantiate_decl): Restore lineno and input_filename before
4142	calling add_pending_template.
4143	* decl2.c (finish_file): Set up lineno and input_filename for
4144	pending templates.
4145
41461998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
4147
4148	* decl.c (lang_print_error_function): New fn.
4149	(init_decl_processing): Set print_error_function to use it.
4150	* errfn.c (cp_thing): Don't call maybe_print_template_context here.
4151
4152	* call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
4153	ICS_BAD_FLAG.
4154
4155	* cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
4156	copy-initialization.
4157
4158	* class.c (build_vtable_entry): Use int_fits_type_p.
4159	(build_vtable): Pass a signed offset to build_vtable_entry.
4160	(prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
4161	set_rtti_entry): Likewise.
4162
41631998-05-22  Per Bothner  <bothner@cygnus.com>
4164
4165	* cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
4166	(C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
4167
41681998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
4169
4170	* pt.c (print_template_context): Use fprintf instead of cp_error.
4171
4172	* pt.c (determine_specialization): Just return an error_mark_node.
4173	Also print the decl we want in error messages.  If we complain,
4174	return error_mark_node.
4175	(tsubst_friend_function): Set lineno and input_filename so
4176	error messages will be useful.
4177	(instantiate_template): Just return an error_mark_node.
4178	(check_explicit_specialization): Don't mess with a returned
4179	error_mark_node.
4180
4181	* pt.c (print_template_context): Add new argument.
4182	(maybe_print_template_context): New fn.
4183	(push_tinst_level): Increment tinst_level_tick.
4184	(pop_tinst_level): Likewise.
4185	* errfn.c (cp_thing): Call maybe_print_template_context.  Use
4186	xrealloc instead of xmalloc.
4187
4188	* typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
4189
41901998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
4191
4192	* pt.c (tsubst_friend_class): Don't call redeclare_class_template
4193	if the template we looked up is the same as the one we already
4194	have.
4195
4196Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
4197
4198	* lex.c: (handle_sysv_pragma): FILE* parameter not used.
4199	(cpp_reader,parse_in): Add for cpplib.
4200	(check_newline): Call handle_sysv_pragma with new interface.
4201	(check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
4202
4203	* input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
4204	(sub_getch): Call GETC for cpplib.
4205
4206	* cp-tree.h: (get_directive_line): Different prototype for cpplib.
4207	(GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
4208
4209	* Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
4210
42111998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
4212
4213	* decl2.c (maybe_make_one_only): New fn.
4214	(import_export_vtable): Use it.
4215	(import_export_decl): Likewise.
4216	* pt.c (mark_decl_instantiated): Likewise.
4217
42181998-05-21  Mark Mitchell  <mmitchell@usa.net>
4219
4220	* decl2.c (find_representative_member): Rename to ...
4221	(build_anon_union_vars): New function.
4222	(finish_anon_union): Fix stupidity of previous change.
4223
42241998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4225
4226	* decl.c (grokfndecl): Handle definition of specialization in
4227	friend declaration.
4228
4229	* error.c (dump_decl): Fix LOOKUP_EXPR handling.
4230
42311998-05-20  Mark Mitchell  <mmitchell@usa.net>
4232
4233	* class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
4234	to look for type declarations.
4235	(finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
4236	* cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
4237	(finish_member_class_template): Declare.
4238	* decl.c (pushtag): Put member class templates on the
4239	CLASSTYPE_TAGS list, just as for ordinary member classes.
4240	(pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
4241	(lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
4242	IDENTIFIER_NAMESPACE_VALUEs.
4243	* parse.y (component_decl): Move code to ...
4244	* semantics.c (finish_member_class_template): New function.
4245	Don't put member class templates on the list of components for a
4246	class.
4247	* parse.c: Regenerated.
4248	* pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
4249	In fact, don't use DECL_CONTEXT at all here.
4250
42511998-05-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4252
4253	* decl.c (record_unknown_type): New function.
4254	(init_decl_processing): Call it for the unknown and global type
4255	nodes.
4256
42571998-05-20  Mark Mitchell  <mmitchell@usa.net>
4258
4259	* decl2.c (find_representative_member): New function.
4260	(finish_anon_union): Use it.
4261
4262	* cp-tree.h (MAIN_NAME_P): New macro.
4263	(DECL_MAIN_P): Likwise.
4264	* decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
4265	(grokfndecl): Use the new macros.
4266	(grokdeclarator): Likewise.
4267	(start_function): Likewise.
4268	(store_parm_decls): Likewise.
4269	(finsh_function): Likewise.
4270	* friend.c (do_friend): Likewise.
4271	* typeck.c (build_function_call_real): Likewise.
4272	(build_unary_op): Likewise.
4273
4274Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
4275
4276	* decl2.c (start_objects, finish_objects, do_dtors,
4277	do_ctors): Split out from...
4278	(finish_file): ...here.
4279
4280Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
4281
4282	* tree.c (is_overloaded_fn): Don't abort on placeholders from
4283	push_class_decls.
4284
4285Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
4286
4287	* class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
4288
4289	* error.c (dump_expr): Handle an ARROW_EXPR.
4290
4291Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
4292
4293	* decl.c (saveable_obstack): Declare.
4294	(pushdecl): Copy TYPE_DECLs to the same obstack as the type they
4295	declare, if necessary.
4296
4297Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
4298
4299	* call.c (compare_qual): Remove.
4300	(is_subseq): Tweak.
4301	(is_properly_derived_from): New function.
4302	(maybe_handle_ref_bind): Likewise.
4303	(maybe_handle_implicit_object): Likewise.
4304	(compare_ics): Modify substantially to bring into conformance with
4305	the standard.
4306	* cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
4307	(comp_cv_qualification): Declare.
4308	(comp_cv_qual_signature): Likewise.
4309	* typeck.c (comp_cv_qualification): Likewise.
4310	(comp_cv_qual_signature): Likewise.
4311
4312Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4313
4314	* Makefile.in (parse.o): Depend on toplev.h.
4315
4316	* class.c (typecode_p): Remove prototype and definition.
4317
4318	* cp-tree.h (currently_open_class, is_empty_class, member_p):
4319	Add prototype.
4320
4321	* decl.c (push_overloaded_decl_top_level): Remove prototype and
4322	definition.
4323
4324	* errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
4325	in call to `cp_thing'.
4326	(cp_warning): Likewise for function pointer `warning'.
4327
4328	* except.c (do_function_call): Remove prototype and definition.
4329	(call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
4330
4331	* method.c (is_java_type): Add prototype and make it static.
4332
4333	* parse.y: Include toplev.h.
4334
4335	* pt.c (type_unification): Remove unused variable `arg'.
4336	(instantiate_decl): Likewise for `save_ti'.
4337
4338	* tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
4339
4340Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
4341
4342	* init.c (build_member_call): Handle template_ids.
4343	* parse.y (primary): Add global_scope template_id.
4344
4345Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
4346
4347	* decl2.c (get_sentry): Use end_temporary_allocation.
4348	Don't declare permanent_obstack.
4349
4350Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
4351
4352	* parse.y (.finish_new_placement): New non-terminal.
4353	(unary_expr, new_type_id): Use it.
4354	* parse.c: Regenerated.
4355
4356Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
4357
4358	* pt.c (redeclare_class_template): Say where the original definition
4359	of the template-parameter's default argument appeared.
4360
4361Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
4362
4363	* call.c (build_over_call): Tweak empty class handling.
4364
4365	* decl.c (make_typename_type): Use currently_open_class.
4366
4367	* class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
4368
4369Mon May 18 01:43:01 1998  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4370
4371	* decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
4372	for a type unless it is one.
4373
4374	* class.c (finish_struct_1): Use OVL_CURRENT in error message.
4375
4376Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
4377
4378	* Makefile.in (program_transform_name, objdir): Define.
4379
4380	* Makefile.in (BISON): Use bison from the build tree if it exists.
4381	(FLEX): Likewise.
4382
4383Sun May 17 14:52:08 1998  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4384
4385	* typeck.c (type_unknown_p): Return true for TREE_LIST also.
4386
4387	* call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
4388
4389Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
4390
4391	* call.c (build_scoped_method_call): Likewise.
4392
4393Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
4394
4395	* init.c (build_new_1): Call suspend_momentary around the creation
4396	of values that must be saved for exception handling.
4397	* parse.y (.build_new_placement): New non-terminal.
4398	(unary_expr, new_placement): Use it.
4399	* parse.c: Regenerated.
4400
4401Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
4402
4403	* decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
4404	old and new types.
4405
4406	* pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
4407	canonical type.
4408
4409	* call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
4410
4411Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
4412
4413	* decl.c (start_decl): Revert problem change.
4414
4415	* Makefile.in (CONFLICTS): Fix.
4416
4417Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
4418
4419	* decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
4420
4421Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
4422
4423	* class.c (finish_struct_1): Use BINFO_SIZE.
4424
4425	* decl.c (start_decl): Use 'tem'.
4426
4427Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
4428
4429	* exception.cc: Include eh-common.h.
4430	(struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
4431	(__cplus_type_matcher): First stab at new C++ runtime type matcher.
4432	(__cp_push_exception): Initialize eh_info struct as well.
4433	* except.c: Remove local structs and include eh-common.h.
4434	(init_exception_processing): Set language and version codes.
4435	(call_eh_info): Add presence of eh_info to runtime description of
4436	struct cp_eh_info.
4437	(expand_end_eh_spec): Call start_catch_block() and end_catch_block().
4438	* semantics.c (finish_try_block): Call start_catch_block() and
4439	end_catch_block().
4440	* parse.y (function_try_block): Call start_catch_block() and
4441	end_catch_block().
4442
4443Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
4444
4445	* typeck.c (original_type): New function.
4446	(common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
4447	to see if they're actually the same.
4448	* cp-tree.h (original_type): Declare.
4449
4450Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4451
4452	* Makefile.in (lex.o): Depend on output.h.
4453
4454	* call.c (add_function_candidate): Remove unused variable `cand'.
4455	(add_conv_candidate): Likewise.
4456	(build_builtin_candidate): Likewise.
4457
4458	* cp-tree.h: Add prototype for `types_overlap_p'.
4459
4460	* decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
4461
4462	* decl2.c (merge_functions): Remove unused variables `tmp' and
4463	`tempn'.
4464
4465	* error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
4466	(code_as_string): Likewise.
4467	(language_as_string): Likewise.
4468	(parm_as_string): Likewise.
4469	(op_as_string): Likewise.
4470	(assop_as_string): Likewise.
4471	(cv_as_string): Likewise.
4472
4473	* lex.c: Include output.h.
4474
4475	* pt.c (type_unification): Cast first argument of `bzero' to a char*.
4476
4477	* search.c (dfs_no_overlap_yet): Mark parameter `t' with
4478	ATTRIBUTE_UNUSED.
4479
4480	* tinfo.cc (__class_type_info::dcast): Change the type of variable
4481	`i' from int to size_t.
4482
4483	* typeck.c (language_lvalue_valid): Mark parameter `exp' with
4484	ATTRIBUTE_UNUSED.
4485
4486Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
4487
4488	* error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
4489	DECL_NAMESPACE_SCOPE_P.
4490	(lang_decl_name): Likewise.
4491	* pt.c (tsubst_friend_function, tsubst): Likewise.
4492	* decl.c (pushdecl, redeclaration_error_message, start_decl,
4493	cp_finish_decl, start_function): Likewise.
4494	* class.c (finish_struct_1): Likewise.
4495	* call.c (build_over_call): Likewise.
4496	(compare_ics): Use DERIVED_FROM_P.
4497
4498Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
4499
4500	* cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
4501	* method.c (build_mangled_name): Use it.
4502	(build_decl_overload_real): Likewise.
4503
4504	* error.c (dump_simple_decl): New function, broken out from ...
4505	(dump_decl): Use it.
4506
4507Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
4508
4509	* ptree.c (lang_print_xnode): Add missing `break'.
4510
4511	* pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
4512
4513	* call.c (add_template_candidate): Adjust for changes to
4514	fn_type_unification.
4515	(add_template_candidate_real): Likewise.
4516	(add_template_conv_candidate): Likewise.
4517	(build_user_type_conversion_1): Likewise.
4518	(build_new_function_call): Likewise.
4519	(build_object_call): Likewise.
4520	(build_new_op): Likewise.
4521	(build_new_method_call): Likewise.
4522	* class.c (instantiate_type): Likewise.
4523	* cp-tree.h (unification_kind_t): New type.
4524	(fn_type_unification): Adjust prototype.
4525	(type_unificaiton): Likewise.
4526	* pt.c (UNIFY_ALLOW_NONE): New macro.
4527	(UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
4528	(UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
4529	(UNIFY_ALLOW_DERIVED): Likewise.
4530	(unify): Change prototype.
4531	(maybe_adjust_types_for_deduction): New function.
4532	(check_cv_quals_for_unify): Likewise.
4533	(determine_specialization): Adjust.
4534	(fn_type_unification): Likewise.
4535	(type_unification): Likewise.
4536	(type_unification_real): Likewise.  Use
4537	maybe_adjust_types_for_deduction.  Fix mishandling of
4538	back-unification of template functions passed as arguments.  Pass
4539	appropriate combination of UNIFY_ALLOW_* to unify.
4540	(unify): Remove unused NTPARMS parameter.  Use
4541	check_cv_quals_for_unify.  Remove bogus code that allowed
4542	too-generous unification in order to adhere more closely to standard.
4543	(get_bindings_real): Adjust.
4544	(get_class_bindings): Likewise.
4545
4546	* method.c (build_overload_identifier): Only use the innermost
4547	template arguments when mangling.
4548	* pt.c (tsubst_template_argument_vector): New function.
4549	(complete_template_args): Deal with the situation where the
4550	extra_args contain more than one level of arguments.
4551	(lookup_template_class): Deal with member template classes, which
4552	may have more than one level of arguments.
4553	(tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
4554	Improve handling of member template classes.  Use
4555	DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
4556	tsubst_template_argument_vector where appropriate.
4557	(regenerate_decl_from_template): Break out from ...
4558	(instantiate_decl): Here.
4559
4560	* lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
4561	* parse.h: Regenerated.
4562	* parse.c: Really regenerated.
4563
4564	* cp-tree.h (finish_unary_op_expr): New function.
4565	(finish_id_expr): Likewise.
4566	(begin_new_placement): Likewise.
4567	(finish_new_placement): Likewise.
4568	(finish_declarator): Likewise.
4569	(finish_translation_unit): Likewise.
4570	(finish_parmlist): Likewise.
4571	(begin_class_definition): Likewise.
4572	(finish_class_definition): Likewise.
4573	(finish_default_args): Likewise.
4574	(finish_inline_definitions): Likewise.
4575	* parse.y (GCC_ASM_KEYWORD): Remove.
4576	(TYPENAME_ELLIPSIS): Likewise.
4577	* parse.c: Regenerated.
4578	Use new functions in semantics.c in the actions for many rules.
4579	* gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
4580	* hash.h: Regenerated.
4581	* semantics.c (finish_expr_stmt): Allow NULL expr.
4582	(finish_unary_op_expr): New function, containing
4583	code previously in parse.y.
4584	(finish_id_expr): Likewise.
4585	(begin_new_placement): Likewise.
4586	(finish_new_placement): Likewise.
4587	(finish_declarator): Likewise.
4588	(finish_translation_unit): Likewise.
4589	(finish_parmlist): Likewise.
4590	(begin_class_definition): Likewise.
4591	(finish_class_definition): Likewise.
4592	(finish_default_args): Likewise.
4593	(finish_inline_definitions): Likewise.
4594
4595Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
4596
4597	* typeck.c (build_c_cast): Don't decay arrays and functions to
4598	pointer type when converting to a class type.
4599
4600Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
4601
4602	* cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
4603	(DECL_CLASS_SCOPE_P): Likewise.
4604
4605Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
4606
4607	* class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
4608	* decl2.c (constructor_name_full): Likewise.
4609
4610Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
4611
4612	* tree.c (mapcar): Add OVERLOAD support.
4613
4614	* init.c (resolve_offset_ref): We must use basetype_path before we
4615	destroy it with a call to convert_pointer_to.
4616
4617Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
4618
4619	* class.c (currently_open_class): New fn.
4620	* decl.c (lookup_name_real): Use it.
4621	* search.c (lookup_field): Likewise.
4622
4623Fri May  8 23:32:42 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4624
4625	* cp-tree.def (OVERLOAD): New node.
4626	* cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
4627	SET_IDENTIFIER_NAMESPACE_VALUE): Define.
4628	(NAMESPACE_BINDING): Remove.
4629	(IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
4630	namespace_binding.
4631	(OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
4632	Define.
4633	(tree_overload): New struct.
4634	(IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
4635	(REAL_IDENTIFIER_TYPE_VALUE): Define.
4636	(IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
4637	(lang_decl_flags): Remove in_namespace.
4638	(lang_decl): Remove chain.
4639	(DECL_CHAIN, DECL_NAMESPACE): Remove.
4640	(flag_honor_std): Declare extern.
4641	(identifier_type_value, pushdecl_namespace_level, push_using_decl,
4642	namespace_binding, set_namespace_binding,
4643	lookup_function_nonclass, cat_namespace_levels,
4644	set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
4645	scratch_ovl_cons, ovl_member, build_overload): Declare.
4646	(decl_list_length, get_namespace_id, current_namespace_id,
4647	overloaded_globals_p): Remove.
4648	(lookup_using_namespace, qualified_lookup_using_namespace): Change
4649	return type.
4650	(push_scratch_obstack): New macro.
4651	* call.c (add_function_candidate): Special-case type of OVERLOAD node.
4652	(build_user_conversions_1): Iterate using OVL_NEXT for ctors,
4653	convs, fns.
4654	(build_new_function_call): Iterate using OVL_CHAIN.
4655	Print DECL_NAME in when reporting ambiguities.
4656	(build_object_call): Iterate using OVL_NEXT for fns, convs.
4657	(build_new_op): Call lookup_function_nonclass.
4658	Iterate using OVL_NEXT.
4659	(build_op_delete_call): Change detection of members.
4660	Do not wrap TREE_LIST around fields and single global functions.
4661	(build_over_call): Don't push a class level if the context is a
4662	namespace.
4663	(build_new_method_call): Iterate using OVL_NEXT.
4664	* class.c (add_method): Chain overloaded members using
4665	build_overload.  Remove copying of method.
4666	(grow_method): When iterating through the obstack, expect OVERLOAD
4667	nodes.  Chain overload members.
4668	(finish_struct_methods): Chain overload members.  Unpack OVERLOAD
4669	nodes in call to get_baselinks.
4670	(duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
4671	(finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
4672	fdecls that are OVERLOAD nodes.
4673	(validate_lhs): New function.
4674	(instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
4675	code.  Use DECL_NAME in error messages.  Split code between global
4676	and member function processing.
4677	* decl.c (global_type_node): New static variable.
4678	(in_std): New global.
4679	(struct binding_level): New field usings.
4680	(resume_binding_level): Assert that we are not in a class.
4681	(toplevel_bindings_p): Just check for namespace_p or
4682	pseudo_global.
4683	(resume_level): Remove.
4684	(find_binding): New function.
4685	(binding_for_name): Call it.
4686	(namespace_binding, set_namespace_binding): New functions.
4687	(push_namespace): Associate binding level with new namespace,
4688	resume_binding_level for existing namespace.  Remove old code.
4689	Fake std by counting.
4690	(store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
4691	(maybe_push_to_top_level): Save current namespace.
4692	(pop_from_top_level): Restore saved namespace.
4693	(pop_namespace): Call suspend_binding_level.  Remove old code.
4694	(cat_namespace_levels): New function.
4695	(set_identifier_type_value_with_scope): For namespace bindings,
4696	set BINDING_TYPE, and use global_type_node.
4697	Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
4698	(identifier_type_value): New function.
4699	(pushtag): If no context, use current_namespace.
4700	(duplicate_decls): Don't process DECL_CHAIN.
4701	(pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
4702	already set.  Never reset it to NULL_TREE.  Lookup global variables
4703	in their namespace.  Push overloaded templates if they are on
4704	namespace level.
4705	(pushdecl_namespace_level): New function.
4706	(pushdecl_top_level): Implement using pushdecl_namespace_level.
4707	(pushdecl_using_decl): New function.
4708	(overloaded_globals_p): Remove.
4709	(push_overloaded_decl): Create OVERLOAD nodes, and iterate through
4710	them.  Use namespace_binding and set_namespace_value.
4711	(redeclaration_error_message): Complain if the declarations come
4712	from different namespaces.
4713	(lookup_tag): On namespace level, look in the BINDING_TYPE.
4714	(lookup_namespace_name): Pass tree_bindings from stack.  Remove
4715	old code.
4716	(select_decl): New function.
4717	(lookup_name_real): Call it for qualified and unqualified lookup.
4718	Pass tree_bindings from the stack.
4719	If prefer_type is 1, also accept namespaces.
4720	(lookup_function_nonclass): New function.
4721	(init_decl_processing): Set the binding level of the global
4722	namespace to global_binding_level.
4723	Build a proper type list for __builtin_apply.
4724	Initialize std_node to "fake std" if flag_honor_std is set.
4725	Initialize global_type_node.
4726	Allocated bad_alloc in namespace std if flag_honor_std.
4727	(define_function): Set the DECL_CONTEXT to the current_namespace.
4728	(start_decl): A namespace is not considered as a context here.  If
4729	the DECL_CONTEXT is a namespace, push the decl.
4730	(cp_finish_decl): Check for namespaces used as initializers.
4731	(grokfndecl): Add namespace parameter.  Remove processing of
4732	DECL_CHAIN.
4733	(grokvardecl): Add namespace parameter.
4734	(grokdeclarator): Process SCOPEs that are namespaces.  For
4735	mangling, temporarily set the DECL_CONTEXT on anonymous structs.
4736	(start_function): Check for contexts that are namespaces.
4737	Set context for declarations that have not been pushed.
4738	(store_parm_decls): Check for ::main only.
4739	(finish_function): Likewise.
4740	(start_method): Check for contexts that are namespaces.
4741	(start_method): Remove DECL_CHAIN processing.
4742	* decl2.c (flag_honor_std): Declare.
4743	(lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
4744	(decl_namespace_list): New static global.
4745	(grok_x_components): Ignore namespaces as type contexts.
4746	(check_classfn): Expect OVERLOAD nodes.
4747	(grokfield): Remove DECL_CHAIN processing.
4748	(finish_file): Call cat_namespace_levels.
4749	(merge_functions): New function.
4750	(ambiguous_decl): Rewrite.
4751	(lookup_using_namespace): Produce tree_bindings.
4752	(qualified_lookup_using_namespace): Likewise.
4753	(set_decl_namespace, decl_namespace, current_decl_namespace,
4754	push_decl_namespace, pop_decl_namespace): New functions.
4755	(arg_lookup): New struct.
4756	(add_function, arg_assoc_namespace, arg_assoc_class,
4757	arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
4758	New functions.
4759	(get_namespace_id, current_namespace_id): Remove.
4760	(do_toplevel_using_decl): Rewrite.
4761	(do_class_using_decl): Complain about namespace qualifiers.
4762	(do_using_directive): Sorry if not on namespace level.  Complain
4763	about unknown namespaces.
4764	* error.c (dump_aggr_type): Check for namespace contexts.
4765	* except.c (init_exception_processing): Push terminate into std.
4766	* friend.c (is_friend): A namespace is not a context, here.
4767	* init.c (expand_member_init): Remove DECL_CHAIN processing.
4768	(build_offset_ref): Process OVERLOAD nodes.
4769	* lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
4770	* lex.c (identifier_type): Loop using OVL_CHAIN.
4771	(see_typename): Set looking_for_typename to 2.
4772	(real_yylex): Likewise.
4773	(do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
4774	(do_scoped_id): Expect OVERLOAD nodes.
4775	Change calling convention for qualified_lookup_using_namespace.
4776	(build_lang_decl): Don't set in_namespace anymore.
4777	* method.c (typevec_size): New global.
4778	(build_overload_nested_name): Return if global_namespace.
4779	Otherwise, always expect a declaration context.
4780	(build_qualified_name): Likewise.
4781	Make sure we don't write beyond typevec_size.
4782	(build_decl_overload_real): Likewise.
4783	Allocate one extra slot for the namespace.
4784	(hack_identifier): Mark code dead.
4785	Process OVERLOAD and NAMESPACE_DECL nodes.
4786	* parse.y (program): Pop namespaces until in global namespace.
4787	(extdef): In a using-declaration, don't discard the identifier if
4788	there is no declaration.
4789	(left_curly): Ignore type contexts which are namespaces.
4790	(typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
4791	used as scope.
4792	* pt.c (template_class_depth): Expect types to be namespaces.
4793	(determine_specialization): Simplify by expecting OVERLOAD nodes.
4794	(push_template_decl): Push into namespace level.
4795	Reset ctx if it is a namespace.
4796	Set DECL_CONTEXT to current_namespace if not set already.
4797	Ignore real contexts that are namespaces.
4798	(mangle_class_name_for_template): Skip global_namespace.
4799	Mangle other namespaces as declarations.
4800	(lookup_template_function): Set type of OVERLOAD nodes to unknown.
4801	(lookup_template_class): Push into namespace of context.
4802	If the context is a namespace, set it to global_namespace.
4803	Use id_context for mangling.
4804	(for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
4805	(tsubst_friend_function): Ignore namespace contexts.
4806	Push into namespace level.
4807	(tsubst): Handle NAMESPACE_DECL nodes.
4808	Remove DECL_CHAIN processing.
4809	(type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
4810	* ptree.c (print_lang_identifier): Print bindings.
4811	(lang_print_xnode): Print OVERLOAD nodes.
4812	* rtti.c (init_rtti_processing): Push type_info into std.
4813	* search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
4814	(lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
4815	dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
4816	lookup_fnfields_here): Likewise.
4817	Process all nodes, instead of going through TREE_CHAIN.
4818	* sig.c (build_signature_pointer_or_reference_type): Set context
4819	to global_namespace.
4820	(build_signature_table_constructor): Expect OVERLOAD nodes.
4821	* spew.c (yylex): Save old setting of looking_for_typename.
4822	* tree.c (decl_list_length): Remove.
4823	(binding_init): New function.
4824	(count_functions): Rewrite.
4825	(is_overloaded_fn): Expect OVERLOAD nodes.
4826	(really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
4827	(ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
4828	ovl_member): New functions.
4829	* typeck.c (require_complete_type): Expect OVERLOAD nodes.
4830	(type_unknown_p): Likewise.
4831	(require_instantiated_type): Likewise.
4832	(build_component_ref): Declare code dead.
4833	(build_x_function_call): Create and expect OVERLOAD nodes.
4834	(build_function_call_real): Check for ::main only.
4835	(build_unary_op): Likewise.  Expect OVERLOAD nodes.
4836	(convert_for_assignment): Check for TREE_LIST before accessing
4837	TREE_VALUE.
4838	* decl.c (duplicate_decls): Check for namespace bindings instead
4839	of global bindings.
4840	(pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
4841	lookup_name_current_level, start_decl, xref_tag,
4842	finish_enum): Likewise.
4843	* init.c (build_offset_ref): Likewise.
4844	* search.c (lookup_field): Likewise.
4845	(lookup_fnfields): Likewise.
4846	(dfs_debug_mark): Likewise.
4847	* decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
4848	(poplevel_class, pop_from_top_level): Likewise.
4849	* decl2.c (finish_method): Likewise.
4850	* class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
4851	* decl.c (record_builtin_type): Likewise.
4852	(init_decl_processing, grokfndecl): Likewise.
4853	* lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
4854	(make_lang_type): Likewise.
4855	* parse.y (make_thunk): Likewise.
4856	* pt.c (tsubst): Likewise.
4857	* tree.c (debug_binfo): Likewise.
4858	* exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
4859	tinfo2.cc, inc/new.h: Add std qualifications.
4860	* inc/new: Wrap with namespace std if __HONOR_STD.
4861	* inc/typeinfo: Likewise.
4862
4863Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
4864
4865	* call.c (build_user_type_conversion_1): Handle second_conv
4866	properly for templates.
4867
4868Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
4869
4870	* method.c (build_decl_overload_real): Set TREE_USED flag to
4871	zero for build_type_variants nodes as well.
4872
4873Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
4874
4875	* pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
4876
4877Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
4878
4879	* Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
4880	except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
4881	rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
4882	xref.o): Add toplev.h dependencies.
4883
4884Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
4885
4886	* errfn.c (cp_error, cp_warning): Remove declarations for
4887	error and warning respectively.
4888
4889Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4890
4891	* error.c: Convert to using ctype macros defined in system.h.
4892	* method.c: Likewise.
4893	* xref.c: Likewise.
4894	* lex.c: Likewise.  Also remove redundant system header stuff.
4895
4896Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
4897
4898	* call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
4899	expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
4900	search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
4901	xref.c: Add include of toplev.h.
4902
4903Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
4904
4905	* tree.c (perm_manip): Also regenerate the RTL of an extern.
4906	(copy_to_permanent): Use end_temporary_allocation.
4907
4908Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
4909
4910	* init.c (expand_vec_init): The initialization of each array
4911	element is a full-expression.
4912
4913Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
4914
4915	* method.c (build_mangled_name): Add a call to build_type_variant
4916	to get the right type.
4917
4918Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
4919
4920	* Makefile.in: Add .SUFFIXES.
4921
4922	* cp-tree.def: Remove NAMESPACE_DECL.
4923
4924Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
4925
4926	* call.c (build_over_call): Do evaluate arg even if it has empty
4927	class type.
4928	* decl.c (start_function): Don't push a member function.
4929
4930Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
4931
4932	* Makefile.in (g++FAQ.info): Put -o option before input file.
4933
4934Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
4935
4936	* gxxint.texi: Add info for squangling codes K and B.
4937
4938Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
4939
4940	* semantics.c (begin_stmt_expr): Avoid duplicating the effect of
4941	the expression in templates.
4942	(finish_stmt_expr): Likewise.
4943
49441998-04-28  Brendan Kehoe  <brendan@cygnus.com>
4945
4946	* decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
4947
4948Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
4949
4950	* decl.c (maybe_push_to_top_level): Always clear
4951	current_template_parms and processing_template_decl.
4952	(pushtag): Remove check of current_class_type and some comments,
4953	since maybe_push_to_top_level no longer creates confusion.
4954
4955Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
4956
4957	* cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
4958	(DECL_CLASS_TEMPLATE_P): Likewise.
4959	(DECL_PRIMARY_TEMPLATE): Likewise.
4960	(PRIMARY_TEMPLATE_P): Use it.
4961	(push_template_decl_real): New function.
4962	(redeclare_class_template): Take new template parameters as
4963	input.
4964	(is_specialization_of): New function.
4965	(comp_template_args): Declare.
4966	* decl.c (pushtag): Handle friend template classes.
4967	(xref_tag): Likewise.  Use new calling convention for
4968	redeclare_class_template.
4969	* decl2.c (grok_x_components): Handle friend templates.
4970	* friend.c (is_friend): Use is_specialization_of where
4971	appropriate.  Deal with friend class templates.
4972	(make_friend_class): Let a class template be friends with itself.
4973	* pt.c (comp_template_args): Remove declaration.
4974	(tsubst_friend_class): New function.
4975	(push_template_decl_real): New function.
4976	(push_template_decl): Use it.
4977	(redeclare_class_template): Adjust for new calling convention.
4978	(comp_template_args): Give it external linkage.
4979	(instantiate_class_type): Use tsubst_friend_class to deal
4980	with friend templates.
4981	* typeck.c (comptypes): Use comp_template_args, rather than
4982	expanding it inline.
4983	* parse.y (component_decl): Handle a nested template type
4984	like other component type declarations.
4985
4986	* pt.c (check_explicit_specialization): Handle overloaded
4987	constructors correctly.
4988
4989	* pt.c (mabybe_get_template_decl_from_type_decl): New function.
4990	(lookup_template_class): Use it.
4991
4992Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
4993
4994	* cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
4995	* cp-tree.h: Add WRAPPER support.
4996	* call.c (add_candidate): Split out from add_*_candidate fns.
4997	(build_over_call): Take the candidate instead of function and args.
4998	Enforce access control here.  Emit overload warnings here.
4999	(add_warning): New fn.
5000	(joust): Add WARN parm.  If not set, call add_warning instead of
5001	printing a warning.  Re-enable some warnings.
5002	(tourney): Pass it.
5003	(convert_like): Adjust.
5004	(build_new_op): Adjust.
5005	(build_new_function_call): Adjust.
5006	(build_user_type_conversion_1): Adjust.
5007	(USER_CONV_FN): Adjust.
5008	* tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
5009	build_int_wrapper): New fns.
5010
5011Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
5012
5013	* pt.c (unify): Fix typo in previous change.
5014
5015Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
5016
5017	* error.c (dump_type_real): Declare canonical_name.
5018
5019	* typeck.c (comp_target_types): Fix PMFs.
5020
5021Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
5022
5023	* class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
5024	the DECL_RESULTs of a member TEMPLATE_DECL, not just the
5025	TEMPLATE_DECL.
5026
5027	* pt.c (tsubst): Decrease the template-level of
5028	TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
5029	TEMPLATE_PARM_INDEX.
5030	(template_decl_level): New function.
5031	(unify): Make sure to record unifications for template
5032	parameters, even when the parameters exactly match the arguments.
5033	Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
5034	TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
5035	aren't from the level we're currently working on.
5036
5037Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
5038
5039	* errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
5040
5041	* decl2.c (check_member_template): Set DECL_IGNORED for member
5042	class templates, too.
5043
5044	* decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
5045
5046Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
5047
5048	* decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
5049
5050Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
5051
5052	* cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
5053	* decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
5054	(init_decl_processing): Handle TI types.
5055	* typeck.c (unsigned_type, signed_type): Handle TI types.
5056
5057Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
5058
5059	* g++spec.c (lang_specific_driver): New argument in_added_libraries.
5060	New local added_libraries.  Increment count when add library to
5061	arglist.
5062
5063Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
5064
5065	* cp-tree.h (type_as_string_real): New function.
5066	* pt.c (mangle_class_name_for_template): Use it.
5067	* error.c (dump_aggr_type): Change prototype.
5068	(dump_type_prefix): Likewise.
5069	(dump_type_suffix): Likewise.
5070	(dump_type_real): Convert from dump_type.  If desired, the
5071	"canonica" name of a typedef, i.e., the name of the underlying
5072	type, can be printed.
5073	(dump_type): Call dump_type_real.
5074
5075Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
5076
5077	* decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
5078
5079	* typeck.c (comp_target_types): Tweak pedantic case.
5080	(comp_target_parms): Tweak pedantic case.  Clean up somewhat.
5081	Return -1 or 1 instead of 1 or 2.
5082	(compparms): Remove STRICT handling.
5083	(convert_for_assignment): Fix handling of pmfs.
5084
5085Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
5086
5087	* typeck.c (comp_target_types): Handle references like pointers.
5088	(comp_target_parms): Note that return code from comp_target_types
5089	can be negative to indicate failure.
5090
5091Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5092
5093	* Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
5094	which requires a working target compiler to build.
5095
5096Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
5097
5098	* tree.c (avoid_overlap): Add prototype.
5099
5100	* spew.c (num_tokens): Add prototype.
5101	(nth_noken, add_token, consume_token, debug_yychar): Likewise.
5102
5103	* search.c (dfs_check_overlap): Add prototype.
5104	(dfs_no_overlap_yet): Likewise.
5105
5106	* pt.c (original_template): Add prototype.
5107	(inline_needs_template_parms): Likewise.
5108	(push_inline_template_parms_recursive): Likewise.
5109	(retrieve_specialization, register_specialization): Likewise.
5110	(print_candidates, reduce_template_parm_level): Likewise.
5111	(build_template_decl, mark_template_parm): Likewise.
5112	(tsubst_friend_function, get_bindings_real): Likewise.
5113
5114	* method.c (start_squangling): Add prototype.
5115	(end_squangling, check_ktype, issue_ktype): Likewise.
5116	(build_overloaded_scope_ref, check_btype): Likewise.
5117	(build_mangled_template_parm_index): Likewise.
5118
5119	* lex.c (init_cpp_parse): Add prototype.
5120	(handle_cp_pragma, handle_sysv_pragma): Likewise.
5121	(reduce_cmp, token_cmp): Likewise.
5122
5123	* except.c (call_eh_info): Add prototype.
5124	(push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
5125	(get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
5126
5127	* decl2.c (is_namespace_ancestor): Add prototype.
5128	(namespace_ancestor, add_using_namespace): Likewise.
5129	(ambiguous_decl): Likewise.
5130
5131	* decl.c (indent): Add prototype.
5132
5133	* call.c (add_template_candidate_real): Add prototype.
5134
5135Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
5136
5137	* decl2.c (build_expr_from_tree): Just return a PMF.
5138
5139Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
5140
5141	* typeck2.c (process_init_constructor): Don't strip cv-qualifiers
5142	when doing initializations.
5143
5144	* pt.c (unify): Use comptypes to compare type args.
5145
5146Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
5147
5148	* decl.c (duplicate_decls): Fix check for when it's safe to free
5149	the new decl.
5150
5151	* pt.c (mangle_class_name_for_template): Don't pass a typedef type
5152	to type_as_string.
5153
5154Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
5155
5156	* pt.c (build_template_parm_index): Add prototype.
5157
5158	* search.c (my_tree_cons): Don't clear words outside the
5159	newly allocated node.
5160
5161Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
5162
5163	* lex.c (init_parse): Now returns char* containing the filename.
5164
5165Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
5166			  Jeff Law   <law@cygnus.com>
5167
5168	* errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
5169	than a pointer.
5170
5171Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5172
5173	* cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
5174
5175Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5176
5177	* decl.c (duplicate_decls): Don't warn for redundant decls if
5178	friend: let add_friend take care of it.
5179
5180Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
5181
5182	* sig.c (build_signature_pointer_constructor): Don't set
5183	TREE_HAS_CONSTRUCTOR for a signature pointer.
5184	* cvt.c (ocp_convert): Don't force a temporary for internal structs.
5185	* init.c (resolve_offset_ref): Warn about implicit & on pmfs
5186	here, too.
5187	* typeck.c (build_unary_op): Only allow taking the address of a
5188	real constructor.
5189	* typeck2.c (digest_init): Simplify.
5190	(store_init_value): Don't pedwarn about using { } for pmfs.
5191
5192Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
5193
5194	* cp-tree.h (start_decl):  Update prototype.
5195	* decl.c (start_decl):  Like the C version, new parameters
5196	for the attributes.  Call cplus_decl_attributes here,
5197	(pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
5198	(grokdeclarator):  Pass NULL for new start_decl arguments.
5199	* pt.c (tsubst_expr):  Likewise.
5200	* parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
5201	* typeck.c (common_type): Check TYPE_MAIN_VARIANT.
5202	* lex.c (build_lang_decl): Add lang_name_java.
5203	* class.c (push_lang_context): Add lang_name_java.
5204	* method.c (build_mangled_name): Check for is_java_type.
5205
5206Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
5207
5208	* decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
5209	* call.c (build_scoped_method_call): Check for TREE_CODE for
5210	VOID_TYPE instead of type ==  void_type_node.
5211	(build_method_call): Likewise.
5212	* decl.c (lookup_name_real): Likewise.
5213	(grokdeclarator): Likewise.
5214	(start_decl): Likewise.
5215	(grokparms): Likewise.
5216	(start_function): Likewise.
5217	(finish_function): Likewise.
5218	(start_method): Likewise.
5219
5220Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
5221
5222	* lex.c (finput): New variable.
5223	(init_cpp_parse):  Renamed from init_parse.
5224	(init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
5225	(finish_parse): New function.
5226	* cp-tree.h (init_lex, init_parse): Remove declarations.
5227
5228Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
5229
5230	* call.c (build_call): Still evaluate the actual argument.
5231	* class.c (is_empty_class): Update for -fnew-abi.
5232
5233	* decl2.c: -fnew-abi implies -fsquangle.
5234
5235	* method.c (do_build_assign_ref): Don't do anything to copy
5236	an empty class.
5237	(do_build_copy_constructor): Likewise.
5238	* call.c (build_over_call): Likewise.
5239
5240Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
5241
5242	* tree.c (avoid_overlap): Return a value.
5243
5244Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
5245
5246	* method.c (check_btype): Add missing argument to xrealloc.
5247	(check_ktype): Likewise.
5248
5249Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
5250
5251	Implement empty base optimization.
5252	* class.c (finish_struct_1): Add vbase fields earlier.  Set
5253	CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
5254	* search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
5255	(types_overlap_p): New fn.
5256	* tree.c (avoid_overlap): New fn.
5257	(build_base_fields): Use it to avoid overlapping empty bases.
5258	* cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
5259
5260	* decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
5261
5262	Re-implement allocation of base class subobjects.
5263	* tree.c (unshare_base_binfos): New fn.
5264	(layout_basetypes): Use it.  Now handles offsets of both virtual and
5265	non-virtual bases, after layout_type.
5266	(layout_vbasetypes): Remove.
5267	(build_base_fields): Generate FIELD_DECLs for each non-virtual base.
5268	(build_vbase_pointer_fields): Split out from old layout_basetypes.
5269	* class.c (finish_base_struct): Lose offset handling code.
5270	Move nonvdtor warning here.  Don't mess with t_binfo anymore.
5271	(finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
5272	* cp-tree.h: Adjust.
5273
5274Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
5275
5276	* cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
5277	* decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
5278	* class.c (duplicate_tag_error): Likewise.
5279	(finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
5280	* tree.c (layout_vbasetypes): Update from layout_record, remove
5281	var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
5282	(layout_basetypes): Likewise.
5283
5284Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
5285
5286	* class.c, Make sure system.h is included just after config.h.
5287	Delete lingering stdio and errno references too.
5288	* decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
5289
5290Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
5291
5292	* friend.c (is_friend): Fix access control for local classes.
5293
5294	* class.c (is_empty_class): New fn.
5295	* call.c (build_call): Don't pass empty class objects to a function.
5296
5297Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
5298
5299	* call.c (build_over_call): Do name resolution for default
5300	arguments of function templates in the scope of the templates.
5301
5302Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
5303
5304	* call.c: Include system.h.  Remove includes, declarations and
5305	defines provided by system.h.
5306	* class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
5307	* except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
5308	* lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
5309	* semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
5310	* typeck2.c, xref.c: Likewise.
5311	* Makefile.in: Dependencies updated as appropriate.
5312	* Make-lang.in: Likewise.
5313
5314Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
5315
5316	* pt.c (fn_type_unification): Allow incomplete unification without
5317	an immediate error message.
5318
5319Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
5320
5321	* tree.c (member_p): New fn.
5322	* decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
5323	initializing class members.
5324
5325	* cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
5326	* ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
5327
5328	* call.c (build_method_call): Handle non-scoped destructors, too.
5329	* pt.c (tsubst_copy): Likewise.
5330
5331	* pt.c (print_template_context): Split out...
5332	(push_tinst_level): ...from here.
5333
5334	* friend.c (is_friend): Don't pass a type to decl_function_context.
5335
5336	* typeck.c (convert_for_initialization): Always hand off
5337	conversions to class type.
5338
5339Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
5340
5341	* friend.c (is_friend): Local classes have the same access as the
5342	enclosing function.
5343
5344Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
5345
5346	* typeck.c (expand_target_expr): Delete dead function.
5347
5348	* search.c: Put various prototypes inside #ifdef MI_MATRIX.
5349
5350	* repo.c (save_string): Delete dead function.
5351
5352	* method.c (thunk_printable_name): Delete dead function.
5353
5354	* lex.c (yynextch): Delete dead function.
5355
5356	* expr.c (tree_extract_aggr_init): #if 0 out.
5357
5358	* except.c (do_unwind): Delete dead function.
5359	(easy_expand_asm): Likewise.
5360
5361	* cvt.c (build_conversion_type_1): Delete dead function.
5362
5363	* cp-tree.h (push_expression_obstack): Declare.
5364
5365	* call.c (source_type): #if 0 out.
5366
5367	* class.c (alter_access): Remove unused label.  Add braces
5368	around empty else clause.
5369
5370	* lex.c (yyprint): Fix argument to printf.
5371
5372Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
5373
5374	* pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
5375
5376	* pt.c (instantiate_class_template): Make sure template
5377	arguments are permanent.
5378	* init.c (resolve_offset_ref): Don't go looking around in
5379	template types.
5380
5381	* semantics.c: Add routines to handle expressions, and some
5382	declaration processing.
5383	* parse.y: Use them.
5384	(current_class_depth): Move declaration to cp-tree.h.
5385	* parse.c: Regenerated.
5386	* cp-tree.h: Use them.
5387	(current_class_depth): Declare.
5388	* pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
5389
5390Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
5391
5392	* error.c (dump_decl): Be a bit more explicit with template
5393	type arguments, when verbose.
5394
5395Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
5396
5397	* inc/exception: Reorder closing braces.
5398
5399Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
5400
5401	* pt.c (redeclare_class_template): New function.
5402	* cp_tree.h (redeclare_class_template): Declare it.
5403	* decl.c (xref_tag): Use it.
5404
5405Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
5406
5407	* call.c (build_over_call): Check IS_AGGR_TYPE, not
5408	TYPE_LANG_SPECIFIC.
5409	* typeck.c (convert_arguments): Likewise.
5410
5411	* decl.c (grokdeclarator): Remove const and volatile from type after
5412	setting constp and volatilep.
5413
5414	* class.c (finish_struct_1): Don't warn about bool bitfield larger
5415	than one bit.
5416
5417Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
5418
5419	* pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
5420
5421Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
5422
5423	* call.c (build_object_call): Complain about ambiguous operator(),
5424	rather that crashing.
5425	(build_new_op): Likewise.
5426	(build_op_delete_call): Likewise.
5427
5428Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
5429
5430	* cvt.c (perform_qualification_conversions): Use comp_target_types
5431	instead of comp_ptr_ttypes.
5432
5433Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
5434
5435	* cp-tree.h (enforce_access): Declare.
5436	* call.c (enforce_access): Make it extern, not static.
5437	* class.c (alter_access): Use enforce_access; modify code for ISO
5438	compliance, rather than ARM rules.
5439
5440Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5441
5442	* cp-tree.h: Fix typo.
5443
5444Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
5445
5446	* expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
5447	if (aggregate_value_p (type)).
5448
5449	* decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
5450
5451Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
5452
5453	* tree.c (mapcar): When dealing with a DECL, use it's constant
5454	value, if any.
5455	* pt.c (lookup_template_class): Don't mangle the names of template
5456	classes whose arguments are unknown.
5457
5458	* pt.c (tsubst_expr): Handle GOTO_STMT correctly.
5459
5460Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
5461
5462	* decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
5463
5464Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
5465
5466	* decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
5467	boolean_type_node to 1.
5468
5469Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
5470
5471	* error.c (dump_expr): Remove unused variable `l'.
5472
5473	* pt.c (for_each_template_parm): New function, created by
5474	converting uses_template_parms.
5475	(tree_fn_t): New typedef.
5476	(uses_template_parms): Use it.
5477	(mark_template_parm): New function.
5478	(push_template_decl): Check that the argument list of a partial
5479	specialization uses all the template parameters.
5480
5481	* Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
5482	with it; we might want it for debugging.
5483	* cp-tree.h (type_unification): Change interface.
5484	* class.c (finish_struct_1): Skip nested template types, just like
5485	ordinary nested types.
5486	(instantiate_type): Use new interface to type_unification.
5487	* lex.c (init_lex): Add __sz as opname for sizeof.
5488	* method.c (build_overload_scope_ref): New function.
5489	(build_overload_int): Handle complex expressions.  Set
5490	numeric_output_need_bar if necessary.
5491	(build_overload_value): Handle non-PARM_DECL nodes; this
5492	routine is now used by build_overload_int.  Remove some
5493	assignments to numeric_output_need_bar.  Use
5494	build_overload_scope_ref.
5495	(build_qualified_name): Note that some template mangled names end
5496	with digits, and set numeric_output_need_bar appropriately.  Use
5497	build_underscore_int.
5498	* pt.c (unify): Change interface.
5499	(type_unification_real): Likewise.
5500	(determine_specialization): Use new interfaces.
5501	(tsubst): Deal gracefully with situations in which the argument
5502	vector is not fully filled.
5503	(fn_type_unification): Use new interfaces.
5504	(type_unification): Likewise.  Remove NOP_EXPR hack.
5505	(type_unification_real): Likewise.
5506	(unify): Likewise.  Deal with unification of complex expressions.
5507
5508Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
5509
5510	* pt.c (complete_template_args): Initialize skip properly.
5511
5512	* decl.c (make_typename_type): Revert.
5513	(make_implicit_typename): Remove.
5514	(lookup_name_real): Don't call it.  Call lookup_field if we see a
5515	TYPE_DECL from a template base.
5516	* search.c (lookup_field): Do implicit typename stuff.
5517
5518Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
5519			  Geoff Noer    <noer@cygnus.com>
5520
5521	* Makefile.in: Various fixes for building cygwin32 native toolchains.
5522	* Make-lang.in: Likewise.
5523
5524Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5525
5526	* pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
5527
5528Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
5529
5530	* decl.c (make_implicit_typename): Rewrite removed code.
5531	(make_typename_type): Call it if the type we look up comes from
5532	a base that uses template parms.
5533
5534	* pt.c (complete_template_args): Rewrite.
5535	(tsubst, FUNCTION_DECL): Use it.
5536
5537Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
5538
5539	* semantics.c (finish_asm_stmt): Fix combine strings.  Call
5540	c_expand_asm_operands () if output_operands, input_operands or
5541	clobbers is not NULL_TREE.
5542
5543Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5544
5545	* pt.c (complete_template_args): New function.
5546	(get_bindings): Deal with specializations of function templates
5547	with return type containing parameters from outer class
5548	templates.
5549	(tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
5550	substitute arguments and compose a new type.
5551
5552Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
5553
5554	* pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
5555	FUNCTION_DECLs.
5556
5557Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
5558
5559	* decl.c (make_implicit_typename): Lose useless code.
5560
5561	* call.c (standard_conversion): Handle A* -> const A* properly.
5562
5563	* pt.c (get_bindings_real): Rename from get_bindings.  Add
5564	check_rettype parm.
5565	(get_bindings): Pass 1.
5566	(get_bindings_overload): Pass 0.
5567
5568Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
5569
5570	* pt.c (check_explicit_specialization): When reverting a static
5571	member function, also remove the `this' parameter from
5572	last_function_parms.
5573
5574Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
5575
5576	* pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
5577	a function context.
5578
5579	* decl.c (store_bindings): Use free_binding_vecs.
5580	(pop_from_top_level): Likewise.
5581
5582Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
5583
5584	* decl.c (make_implicit_typename): Only change the type of a
5585	TYPENAME_TYPE.
5586
5587Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
5588
5589	* semantics.c: New file, containing routines to perform the
5590	semantic phase of parsing.
5591	* parse.y: Use it.
5592	* pt.c (tsubst_expr): Likewise.
5593	* cp-tree.h: Declare the various functions in semantics.c.
5594	Provide macros to access _STMT tree nodes.
5595	* cp-tree.def: Add ASM_STMT tree node.
5596	* Makefile.in, Make-lang.in: Add dependencies on and for
5597	semantics.c.
5598
5599Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
5600
5601	* pt.c (push_template_decl): Only check primary templates.
5602
5603	* pt.c (check_explicit_specialization): Complain about default args
5604	in explicit specialization.
5605
5606	* parse.y (nomods_initdcl0): Also call cp_finish_decl for a
5607	constructor_declarator.
5608
5609Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
5610
5611	* typeck2.c (build_x_arrow): Don't crash when an aggregate type
5612	has no overloaded operator ->.
5613
5614	* call.c (build_field_call): Don't crash when presented with a
5615	field that is actually a nested type.
5616
5617	* decl.c (pushtag): Deal with friend class injection in local
5618	classes.
5619
5620	* call.c (build_object_call): Don't crash if OBJ is a
5621	pointer-to-member-function.
5622
5623Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
5624
5625	* pt.c (push_template_decl): Complain about template with C linkage,
5626	anonymous template class.
5627
5628Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
5629
5630	* class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
5631	* search.c: Likewise.
5632
5633	* lex.c (do_pending_defargs): Only call
5634	maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
5635
5636	* parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
5637
5638Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
5639
5640	* parse.y: Deal with CONSTRUCTORS in new_initializers.
5641
5642Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
5643
5644	* pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
5645	closely mimics the behavior in parse.y.
5646	(tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
5647	into a compound statement.
5648
5649Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
5650
5651	* cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
5652	* pt.c (inline_needs_template_parms): New fn.
5653	(original_template): New fn.
5654	(push_inline_template_parms_recursive): New fn.
5655	(maybe_begin_member_template_processing): Use them.
5656	(maybe_end_member_template_processing): Likewise.
5657	(is_member_or_friend_template): Rename to is_member_template.
5658	Member functions of local classes are never member templates.
5659
5660Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
5661
5662	* lex.c (do_identifier): Handle TEMPLATE_DECL that was
5663	added in the class scope to catch redefinition error.
5664
5665	* pt.c (reduce_template_parm_level): Also copy
5666	the DECL_TEMPLATE_PARMS field.
5667
5668Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
5669
5670	* pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
5671	reduced-level template type parameter.
5672
5673Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5674
5675	* cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
5676	(DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
5677	* class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
5678	* decl.c (duplicate_decls): Propagate it.
5679	* typeck2.c (abstract_virtuals_error): Use two loops to emit
5680	abstract virtual functions and virtual functions which need a
5681	final overrider separately.
5682
5683Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5684
5685	* lang-specs.h: Properly put brackets around array elements in
5686	initializer.
5687
5688	* typeck.c (build_binary_op_nodefault): Correctly place parens around
5689	&& and || in expression.
5690
5691Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5692
5693	* call.c (default_parm_conversions): Remove prototype definition.
5694	(build_method_call): Remove unused variable result.
5695
5696	* cvt.c (ocp_convert): Remove unused variable conversion.
5697
5698	* decl2.c (ambiguous_decl): Add explicit parameter definition for name.
5699
5700	* except.c (do_unwind): #if 0 definition of unused variables fcall
5701	and next_pc.
5702
5703	* expr.c (extract_scalar_init): #if 0 prototype and function
5704	definition.
5705
5706	* init.c (expand_aggr_init_1): Remove unused variable init_type.
5707	(build_new_1): Remove unused variable t.
5708
5709	* pt.c (instantiate_class_template): Remove unused variable newtag;
5710	cast called function return value to void.
5711	(do_decl_instantiation): Remove unused variables name and fn.
5712
5713	* tree.c (get_type_decl): Add default return to shut up compiler from
5714	complaining control reaches end of non-void function.
5715
5716	* typeck.c (build_x_conditional_expr): Remove unused variable rval.
5717
5718Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5719
5720	* call.c (default_parm_conversions): Remove prototype definition.
5721	(build_method_call): Remove unused variable result.
5722	(build_over_call): Add default case in enumeration switch.
5723
5724Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
5725
5726	* decl2.c (lang_decode_option): Change j's type to size_t.
5727
5728	* tree.c (layout_vbasetypes): record_align and desired_align are of
5729	type unsigned int; const_size and nonvirtual_const_size likewise.
5730
5731Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
5732
5733	* parse.y (new_initializer): Make sure all initializers are
5734	lists.
5735
5736Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
5737
5738	* decl2.c (import_export_decl): Mark tinfo functions for
5739	cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
5740
5741Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
5742
5743	* method.c: Fix typo.
5744
5745Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5746
5747	* method.c: Include "system.h" to get stdlib.h, stdio.h,
5748	ctype.h, string.h, etc.
5749	(issue_nrepeats): Add default case in enumeration switch.
5750	(check_btype): Likewise.
5751	(process_overload_item): Likewise.
5752
5753	* Makefile.in (method.o): Depend on system.h.
5754
5755Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
5756
5757	* lex.c (do_scoped_id): Fix parenthesizing.
5758
5759Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
5760
5761	* rtti.c (get_tinfo_fn_dynamic): If this function is called an
5762	FLAG_RTTI is unset, initialize type info machinery and continue
5763	with FLAG_RTTI enabled.
5764	(get_typeid): Likewise.
5765
5766Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
5767
5768	* typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
5769	from B.
5770
5771Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
5772
5773	* pt.c (finish_member_template_decl): Deal more gracefully with
5774	invalid declarations.
5775
5776Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
5777
5778	* cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
5779	cp-tree.h: Clean up more old overloading code, old RTTI code, and
5780	some formatting quirks.
5781
5782	* call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
5783	method.c, pt.c, ptree.c, typeck.c: Remove support for
5784	-fno-ansi-overloading and overloading METHOD_CALL_EXPR.
5785	* class.h: Remove.
5786	* Makefile.in: Adjust.
5787
5788	* pt.c (unify): Don't allow reduced cv-quals when strict.
5789
5790	* call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
5791	*type_unification* and unify.
5792
5793Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
5794
5795	* parse.y (explicit_template_type): Remove TEMPLATE keyword.
5796	(nested_name_specifier): And add it before this use.
5797	(typename_sub0): And this use.  Also add use without the keyword.
5798	(typename_sub1): Likewise.
5799	* pt.c (instantiate_class_template): Don't actually instantiate
5800	anything if our type uses template parms.
5801
5802Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
5803
5804	* decl.c (start_function): Don't call temporary_allocation for a
5805	nested function.
5806
5807Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
5808
5809	* pt.c (instantiate_class_template): Don't mess with friends if
5810	our type uses template parms.
5811
5812Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
5813
5814	* parse.y (nested_name_specifier): Use explicit_template_type.
5815	(typename_sub): Allow a template_type, an explicit_template_type,
5816	or an implicit template type at the end.
5817	* lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
5818	* decl.c (make_typename_type): Handle template-id where the name
5819	is a TEMPLATE_DECL.
5820	* call.c (build_scoped_method_call): Handle member template
5821	destructor call.
5822	* pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
5823	destructor is represented by the type.
5824
5825	* cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
5826	* parse.y (nested_name_specifier): Add 'template' case.
5827	(explicit_template_type): New rule.
5828	(typename_sub): Use it.
5829	* decl.c (make_typename_type): Handle getting a template-id for NAME.
5830	* pt.c (tsubst): Likewise.
5831
5832Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
5833
5834	* pt.c (add_to_template_args): Fix thinko.
5835	(instantiate_class_template): Call it later.
5836
5837	* pt.c (get_class_bindings): Add outer_args parm.
5838	(most_specialized_class): Likewise.
5839	(instantiate_class_template): Pass it.
5840	(more_specialized_class): Likewise.
5841	(lookup_template_class): Get context from template if none
5842	was specified.
5843	(finish_member_template_decl): Don't do anything with a
5844	partial specialization.
5845	* decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
5846	AGGREGATE_TYPE_P.
5847	* class.c (finish_struct): Member class templates have already been
5848	checked for name clashes.
5849	* decl.c (pushdecl_with_scope): Handle pushing at class level.
5850
5851Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
5852
5853	* pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
5854	(tsubst, *_PARM): Support multiple levels of template classes.
5855	(instantiate_class_template): Look up the pattern from the
5856	original template.
5857	(lookup_template_class): Handle getting a template for d1.
5858	(push_template_decl): Correct setting of 'primary'.
5859	(reduce_template_parm_level): Add 'levels' parm.
5860	(finish_member_template_decl): Support member class templates.
5861	(template_class_depth): Handle multiple levels.
5862	* parse.y (component_decl_1, fn.def2): Remove member template case.
5863	(component_decl): Add member template cases.
5864	* decl2.c (check_member_template): We now handle member template
5865	classes.
5866	* decl.c (pushtag): Handle member templates.
5867	* method.c (do_inline_function_hair): Don't touch
5868	IDENTIFIER_GLOBAL_VALUE.
5869	* init.c (build_offset_ref): If name isn't an identifier, just
5870	return it.
5871	* spew.c (yylex): Handle PTYPENAME like TYPENAME.
5872
5873	* typeck.c (get_delta_difference): Do adjust for conversions to
5874	and from virtual base.
5875
5876Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
5877
5878	* typeck.c (get_delta_difference): Give hard error for conversion
5879	from virtual base.
5880
5881	* cp-tree.h: Tweak formatting.
5882
5883Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
5884
5885	* decl.c (push_namespace): Handle redeclaration error.
5886
5887	* cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
5888	(IDENTIFIER_NAMESPACE_BINDINGS): New macro.
5889	(NAMESPACE_BINDING): New macro.
5890	(IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
5891	* *.c: Use them.
5892
5893	* pt.c (push_template_decl): Use innermost_args.
5894
5895	* decl.c (get_unique_name): Tweak from earlier in the name.
5896
5897Tue Feb 24 22:15:04 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5898
5899	* cp-tree.def: Add CPLUS_BINDING node.
5900	* cp-tree.h (tree_binding): New struct.
5901	(BINDING_SCOPE, BINDING_VALUE): New macros.
5902	(current_namespace, global_namespace): Declare extern.
5903	(struct lang_decl_flags): New field in_namespace.
5904	(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
5905	(DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
5906	(TREE_INDIRECT_USING): New macro.
5907	* decl2.c (current_namespace, global_namespace): Declare.  The
5908	value is a NAMESPACE_DECL now, not a TREE_LIST.
5909	(is_namespace_ancestor, namespace_ancestor): New static functions.
5910	(add_using_namespace, ambiguous_decl): Likewise.
5911	(lookup_using_namespace): New support function for lookup_name.
5912	(qualified_lookup_using_namespace): New support function for
5913	do_scoped_id and lookup_namespace_name.
5914	(get_namespace_id): Mark as obsolete.
5915	(current_namespace_id): Likewise.
5916	(do_namespace_alias): Implement.
5917	(do_using_directive): Implement as call to add_using_namespace.
5918	* decl.c (binding_for_name): New function.
5919	(push_namespace, pop_namespace): Implement.
5920	(push_decl): Don't install a FUNCTION_DECL in the global branch.
5921	(lookup_namespace_name): Implement using qualified lookup.
5922	(lookup_name_real): For global scoping, lookup in
5923	global_namespace.  For namespace scoping, lookup in given
5924	namespace.  For unscoped lookup, iterate over namespace,
5925	considering using directives.
5926	(init_decl_processing): Initialize global_namespace.
5927	(grokvardecl): Build assembler name as static name for globals.
5928	(grokdeclarator): Remove old namespace mangling.
5929	(xref_tag): When installing a global binding for the
5930	tag, make sure we have an identifier.
5931	* method.c (build_overload_nested_name): Mangle namespaces.
5932	(build_qualified_name): Likewise.
5933	(build_decl_overload_real): Likewise.
5934	* lex.c (build_lang_decl): Set namespace for new declaration to
5935	current_namespace.
5936	(do_scoped_id): Find global names in global or current
5937	namespace, or using qualified namespace lookup, depending on
5938	context.
5939	* init.c (build_member_call): When scope is namespace, use
5940	build_x_function_call instead.
5941	(build_offset_ref): When scope is namespace, collapse processing
5942	to lookup_namespace_name instead.
5943	* error.c (dump_decl): Support NAMESPACE_DECL.
5944	* decl.c (pushdecl): Bind globals to current namespace.
5945	(push_overloaded_decl): Likewise.
5946	(lookup_tag): Likewise.
5947	(lookup_name_current_level): Likewise.
5948	(xref_tag): Likewise.
5949	(start_function): Likewise.
5950	* lex.c (do_identifier): Likewise.
5951	(identifier_typedecl_value): Likewise.
5952	(real_yylex): Likewise.
5953	* method.c (do_inline_function_hair): Likewise.
5954	* parse.y (unscoped): Likewise.
5955	* pt.c (check_explicit_specialization): Likewise.
5956	(lookup_template_class): Likewise.
5957	* rtti.c (call_void_fn): Likewise.
5958	* sig.c (build_sigtable): Likewise.
5959	* ptree.c (lang_print_xnode): New function.
5960
5961Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
5962
5963	* pt.c (instantiate_class_template): Don't instantiate if pedantic
5964	and the args use template parms.
5965
5966	* pt.c (push_tinst_level): If the instantiation uses template parms,
5967	fail silently.
5968	* decl.c (xref_basetypes): Do call complete_type for basetypes
5969	that involve template parameters.
5970
5971Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
5972
5973	* typeck2.c (process_init_constructor): Fix labeled init check.
5974
5975Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
5976
5977	* pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
5978	argument to tsubst and friends.
5979
5980	* pt.c (tsubst, FUNCTION_DECL): Tidy.
5981
5982	* typeck.c (build_x_function_call): Handle static member function
5983	templates like non-templates.  Handle friend templates like normal
5984	function templates.
5985	* pt.c (tsubst, *_PARM): Don't use orig_level.
5986	(get_bindings): Don't call add_to_template_args.
5987	(instantiate_template): Likewise.
5988	(tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
5989	* ptree.c (print_lang_type): Print index/level for template parms.
5990
5991Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
5992
5993	* Make-lang.in (cc1plus): Note that cc1plus depends on
5994	cp/cp-tree.h and cp/cp-tree.def.
5995
5996	* cp-tree.def (TEMPLATE_CONST_PARM): Remove.
5997	(TEMPLATE_PARM_INDEX): New tree code, used to indicate a
5998	position in a template parameter list.
5999	* cp-tree.h (template_parm_index): New structure, used as the tree
6000	structure for a TEMPLATE_PARM_INDEX.
6001	(TEMPLATE_PARM_IDX): New macro.
6002	(TEMPLATE_PARM_LEVEL): Likewise.
6003	(TEMPLATE_PARM_DESCENDANTS): Likewise.
6004	(TEMPLATE_PARM_ORIG_LEVEL): Likewise.
6005	(TEMPLATE_PARM_DECL): Likewise.
6006	(TEMPLATE_TYPE_PARM_INDEX): Likewise.
6007	(TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
6008	(TEMPLATE_TYPE_DECL): Likewise.
6009	(TEMPLATE_CONST_IDX): Remove.
6010	(TEMPLATE_CONST_LEVEL): Likewise.
6011	(TEMPLATE_CONST_SET_INFO): Likewise.
6012	(TEMPLATE_TYPE_SET_INFO): Likewise.
6013	(TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
6014	node.
6015	(TEMPLATE_TYPE_LEVEL): Likewise.
6016	* decl.c (decls_match): Call comp_template_parms, rather than
6017	expanding it inline.
6018	(duplicate_decls): If two template declarations are being merged,
6019	then their TEMPLATE_INFOs should be merged as well.
6020	(grokfndecl): Save template-id information when declaring a friend
6021	with explicit template arguments.  Pass arguments to
6022	check_explicit_specialization via correct convention; at some
6023	point check_explicit_specialization changed, but these call-sites
6024	did not.
6025	(grokdeclarator): Tidy up slightly.
6026	* decl2.c (check_classfn): Tidy up slightly.  Don't assume that
6027	two template functions with the same DECL_ASSEMBLER_NAME the same,
6028	since the names are not yet mangled.
6029	* error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
6030	TEMPLATE_CONST_PARM.
6031	(dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
6032	decl for a non-type parameter, rather than printing `<tparm ...>'.
6033	* friend.c (is_friend): Handle TEMPLATE_DECL friends.
6034	(do_friend): Deal with template friends.
6035	* lex.c (do_pending_inlines): Call
6036	maybe_begin_member_template_processing, rather than
6037	conditionally calling begin_member_template_processing.
6038	(process_next_inline): Likewise.  Call
6039	maybe_end_member_template_processing, rather than
6040	conditionally calling end_member_template_processing.
6041	(do_pending_defargs): Likewise.
6042	(do_identifier): Use TEMPLATE_PARM_INDEX instead of
6043	TEMPLATE_CONST_PARM.
6044	* method.c (build_mangled_template_parm_index): New function.
6045	(build_overload_value): Use it.
6046	(build_overload_name): Likewise.
6047	* pt.c (finish_member_template_decl): Allow friend declarations.
6048	(template_class_depth): New function.
6049	(is_member_template): Rename, and modify, to become...
6050	(is_member_or_friend_template): New function.
6051	(end_member_template_processing): Rename, and modify, to become...
6052	(maybe_end_member_template_processing).
6053	(build_template_parm_index): New function.
6054	(reduce_template_parm_level): New function.
6055	(process_template_parm): Modify to use build_template_parm_index.
6056	(push_template_decl): Deal with friend templates.
6057	(uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
6058	TEMPLATE_CONST_PARM.
6059	(tsubst_friend_function): New function.
6060	(instantiate_class_template): Generate the DECL_FRIENDLIST
6061	for a new instantiation by using tsubst_friend_function rather
6062	than just tsubst.
6063	(tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
6064	Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
6065	appropriate new macros.  Use reduce_template_parm_level to
6066	generate lower-level template parameters.  Handle tsubst'ing into
6067	TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
6068	to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
6069	templates.  Similarly for the template parameters for a new
6070	template.
6071	(tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
6072	of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
6073	(unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
6074	(get_bindings): Call add_to_template_args if necessary.
6075	(instantiate_decl): Handle instantiations of friend templates.
6076	* search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
6077	TEMPLATE_TYPE_PARM as a list of fields; it's not!
6078	* spew.c (yylex): Do a little manual constant propagation to
6079	clarify the code.
6080
6081Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
6082
6083	* error.c: Include sys/types.h.
6084
6085Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
6086
6087	* method.c (build_mangled_name): Start CPP directives in column zero.
6088
6089Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
6090
6091	* typeck2.c (process_init_constructor): Sorry about non-trivial
6092	labeled initializers.
6093	* parse.y (initlist): Re-enable labeled initializers.
6094
6095Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6096
6097	* pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
6098	all callers changed.  Rely on the new parameter instead of arg
6099	being a TREE_LIST when determine whether we are working inside
6100	template template parameter.  Clean up is_type test.
6101
6102Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
6103
6104	* cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
6105	* typeck2.c (initializer_constant_valid_p): Allow conversions
6106	between pointers and references.
6107
61081998-02-19  Brendan Kehoe  <brendan@cygnus.com>
6109
6110	* typeck.c (build_unary_op): Only warn about incr/decr a pointer
6111	if pedantic || warn_pointer_arith.
6112
6113Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6114
6115	* pt.c (unify): Handle TEMPLATE_DECL.
6116
61171998-02-18  Brendan Kehoe  <brendan@cygnus.com>
6118
6119	* cp-tree.h (strip_attrs): Remove decl.
6120
61211998-02-18  Doug Evans  <devans@cygnus.com>
6122
6123	* decl.c (duplicate_decls): Call merge_machine_decl_attributes.
6124	Update olddecl's attributes too.
6125	(strip_attrs): Remove function.
6126	* typeck.c (common_type): Call merge_machine_type_attributes.
6127
6128Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
6129
6130	* parse.y (initdcl0_innards): New grammar symbol.
6131	(nomods_initdecls, nomods_initdcl0): Change type from itype to
6132	none, since the resulting value is never used.
6133	(parse_decl): New function.
6134	(datadef): Remove redundant actions.
6135	(initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
6136	* parse.c: Regenerated.
6137
6138Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
6139
6140	* parse.y (simple_stmt): Use getdecls() to check for decl.
6141
6142Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
6143
6144	* Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
6145	macros.
6146	(c++.install-common): Install c++filt properly as native or as cross
6147	variant.
6148	(c++.uninstall): Add c++filt.
6149
6150Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
6151
6152	* call.c (standard_conversion): Fix multi-level ptr conversions.
6153
6154Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
6155
6156	* init.c (build_new): Propagate error_mark_node up.
6157
6158Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
6159
6160	* parse.y (simple_stmt): If the condition isn't a declaration,
6161	start the controlled block after the test.
6162
6163Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
6164
6165	* call.c (build_over_call): Convert builtin abs, labs and fabs to
6166	tree-codes.
6167	* decl.c (init_decl_processing): Re-enable abs, labs and fabs as
6168	builtins.
6169
6170Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
6171
6172	* call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
6173
6174Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
6175
6176	* cp-tree.h: Add access_protected_virtual_node.
6177	* class.c (init_class_processing): Initialize it.
6178	* decl.c (xref_basetypes): Use it.
6179	* parse.y (base_class_access_list): Likewise.
6180
6181	* Make-lang.in (DEMANGLER_PROG): Add $(exeext).
6182	(c++.install-common): Install c++filt.
6183
6184Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
6185
6186	* decl.c (shadow_tag): Give error for typedef-ing built-in types.
6187
6188Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
6189
6190	* call.c (reference_binding): Use comptypes when comparing
6191	TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
6192
6193Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
6194
6195	* tree.c (is_overloaded_fn): Use really_overloaded_fn.
6196	(really_overloaded_fn): Move check here from is_overloaded_fn.
6197	(get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
6198
6199Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
6200
6201	* typeck.c (build_ptrmemfunc): Type-check pointer-to-member
6202	conversions.
6203
6204Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
6205
6206	* cp-tree.h (push_template_decl): Return the decl passed in, or an
6207	equivalent duplicate.
6208	* decl.c (pushtag): Use the return value from push_template_decl.
6209	(duplicate_decls): When duplicating a template declaration, merge
6210	the DECL_TEMPLATE_RESULTs as well.
6211	(make_implicit_typename): Don't try to dive into typename types to
6212	find a context for making a new implicit typename.
6213	(start_decl): Use the return value from push_template_decl.
6214	(grokdeclarator): Complain about declarations list `const operator
6215	int'.  Since we don't correctly handle in-class initializations of
6216	non-static data members, complain about this (now illegal)
6217	practice.  Issue an error for initializations of non-const statics
6218	since that is illegal as well, and since we don't handle that case
6219	correctly either.
6220	(start_function): Use the return value from push_template_decl.
6221	(start_method): Likewise.
6222	* decl2.c (grokfield): Likewise.  Since the change to
6223	grokdeclarator ensures that all initialized fields are in fact
6224	static, remove a redundant test for TREE_PUBLIC.
6225	* parse.y (initlist): Disable labeled initializers since they do
6226	not work as per the documentation, and since they do not use the
6227	same syntax as the C front end.
6228	* pt.c (push_template_decl): Return the decl passed in, or an
6229	equivalent duplicate.
6230	(lookup_template_class): When searching in a nested context,
6231	use the right arguments.
6232	(uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
6233	* typeck.c (build_component_ref): Assign the correct type to the
6234	result of build_vfn_ref.
6235
6236Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
6237
6238	* pt.c (convert_nontype_argument): Fix typo.
6239	(check_explicit_specialization): Allow old-style specialization
6240	of class template members.
6241
6242Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
6243			  Manfred Hollstein  <manfred@s-direktnet.de>
6244
6245	* decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
6246	when deciding to override DECL_ASSEMBLER_NAME.
6247
6248Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
6249
6250	* decl2.c (lang_f_options): Add -fsquangle to option processing list.
6251	* cp-tree.h (flag_do_squangling): Add declaration.
6252	* lang-options.h: Add -fsquangle and -fno-squangle.
6253	* method.c: Add macros and static variables for squangling.
6254	(build_overload_name): Rename to build_mangled_name, add logic for B
6255	compression, and split into process_modifiers and
6256	process_overload_item.
6257	(process_modifiers): New function, to handle constant, reference,
6258	and pointer types.
6259	(process_overload_item): New function, handles issue of type codes.
6260	(build_overload_name): New function, start squangling and call
6261	build_mangled_name.
6262	(ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
6263	(start_squangling): New function to initialize squangling structs.
6264	(end_squangling): New function to destroy squangling structs.
6265	(nrepeats): Rename variable to Nrepeats.
6266	(issue_nrepeats): New function for issuing 'n' type repeats.
6267	(check_ktype): New function to check for type K name compression.
6268	(build_overload_nested_name): Add a check for K name compression.
6269	(build_qualified_name): Add a check for K name compression and don't
6270	use DECL_ASSEMBLER_NAME when squangling is on.
6271	(check_btype): New function, checks for B type compression.
6272	(build_static_name, build_decl_overload_real): Initiate squangling.
6273	(build_typename_overload, build_overload_with_type): Initiate
6274	squangling
6275
6276Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
6277
6278	* method.c (make_thunk): Avoid name buffer overflow.
6279
6280Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
6281
6282	* pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
6283	don't define them yet.
6284
6285	* parse.y (nomods_initdcl0): Add constructor_declarator case.
6286
6287Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6288
6289	* config-lang.in (diff_excludes): Use basename only.
6290
6291Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
6292
6293	* tinfo2.cc: Add tinfo for signed char.
6294
6295Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
6296
6297	* search.c (compute_access): Handle protected constructors in derived
6298	classes as accessible.
6299
6300Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
6301
6302	* expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
6303	Call convert_from_reference sooner.
6304
6305Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
6306
6307	* cvt.c (ocp_convert): Obtain the constant values from constant
6308	decls even if the destination type is the same as the type of the
6309	decl.
6310
6311	* decl2.c (finish_file): Make sure that static inlines with
6312	definitions are not marked DECL_EXTERNAL before returning.
6313
6314Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
6315
6316	* decl.c: Lose arg_looking_for_template.
6317	(lookup_name_real): Likewise.
6318	* parse.y: Lose processing_template_arg, template_arg1.
6319	(primary): Likewise.
6320	* spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
6321
6322Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6323
6324	* error.c (dump_decl): Fix type of default arguments for template
6325	template parameters and nontype template parameters.
6326	* parse.y (template_parm): Handle invalid default template
6327	template arguments here.
6328
6329	* parse.y (template_parm): Use template_arg instead of PTYPENAME
6330	for default template template argument.
6331	* pt.c (coerce_template_parms): Merge default template argument
6332	codes.  Can treat RECORD_TYPE as template name if it is implicitly
6333	created.  Fix argument index in error message.
6334	* typeck.c (comptypes): Merge template argument comparison codes in
6335	TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
6336
6337Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
6338
6339	* lex.c (file_name_nondirectory): Also check for '/'.
6340
6341Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
6342
6343	* parse.y (primary): Deal with statement-expressions in
6344	templates.
6345	* pt.c (tsubst_copy): Handle BIND_EXPR.
6346	* tree.c (mapcar): Likewise.
6347
6348	* call.c (add_template_candidate_real): Pass extra parameter to
6349	fn_type_unification.
6350	* cp-tree.h (fn_type_unification): Add parameter.
6351	* pt.c (fn_type_unification): Add additional parameter to deal with
6352	static member functions.
6353	(get_bindings): Deal with static member functions.
6354
6355	* cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
6356	(revert_static_member_fn): Declare.
6357	* decl.c (revert_static_member_fn): Remove declaration.  Change
6358	linkage from internal to external.
6359	(cp_finish_decl): Deal with virtual functions in classes local to
6360	template functions.
6361	* decl2.c (finish_file): Don't forget to emit increment/decrement
6362	expressions in initializers for file-scope variables.
6363	* parse.y (typename_sub2): If the typename doesn't names a
6364	template, rather than a type, issue an error message.
6365	* pt.c (check_explicit_specialization): Handle specializations of
6366	static member functions.
6367	(coerce_template_parms): Handle offset references to lists of
6368	member functions.
6369	* search.c (note_debug_info_needed): Don't crash when handed a
6370	type which is being defined.
6371	* typeck.c (complete_type): Don't crash when handed NULL_TREE;
6372	that can happen with some illegal code.
6373
6374Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6375
6376	* call.c (user_harshness): Initialize `code' to 0.
6377	(build_method_call): Initialize `candidates', `cp' and `len' to 0.
6378	(null_ptr_cst_p): Add parentheses around && within ||.
6379	(standard_conversion): Likewise.
6380	(z_candidate): Likewise.
6381	(build_user_type_conversion_1): Initialize `args' to NULL_TREE.
6382	(build_object_call): Likewise for `mem_args'.
6383	(build_new_op): Likewise for `mem_arglist'.  Add `return' from
6384	default case in enumeration switch.
6385
6386	* class.c (build_vtable_entry): Add explicit braces to avoid
6387	ambiguous `else'.
6388	(build_class_init_list): Likewise.
6389	(finish_struct_1): Initialize `width' to 0.
6390	(instantiate_type): Initialize `name' to NULL_TREE.  Add
6391	explicit braces to avoid ambiguous `else'.
6392
6393	* cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
6394	`else'.
6395
6396	* decl.c (grok_reference_init): Eliminate unused parameter, all
6397	callers changed.
6398	(record_builtin_type): Initialize `tdecl' to NULL_TREE.
6399	(init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
6400	(cp_finish_decl): Initialize `ttype' to NULL_TREE.
6401	(grokdeclarator): Add parentheses around && within ||.  Add
6402	explicit braces to avoid ambiguous `else'.
6403	(grokparms): Initialize `type' to NULL_TREE.
6404	(xref_tag): Remove unused label `just_return'.
6405	(finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
6406	(finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
6407	(hack_incomplete_structures): Add parentheses around assignment
6408	used as truth value.
6409
6410	* decl2.c (coerce_delete_type): Hide definition of `e3'.
6411
6412	* error.c: Include <stdlib.h>.
6413	(dump_expr): Change the type of `i' to size_t.  Remove unused
6414	label `error'.
6415
6416	* except.c (init_exception_processing): Remove unused variable `d'.
6417	(expand_throw): Likewise for `label'.
6418
6419	* friend.c (add_friends): Add explicit braces to avoid ambiguous
6420	`else'.
6421
6422	* init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
6423	(sort_base_init): Likewise for `binfo'.
6424	(expand_member_init): Likewise for `rval'.
6425	(build_member_call): Add parentheses around assignment used as
6426	truth value.
6427	(build_offset_ref): Add explicit braces to avoid ambiguous `else'.
6428	(build_new): Initialize `nelts' to NULL_TREE.  Initialize
6429	`old_immediate_size_expand' to 0.
6430	(build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
6431	(build_vec_delete_1): Remove unused variable `block'.
6432	(expand_vec_init): Initialize `itype' to NULL_TREE.
6433
6434	* lex.c: Include <strings.h> if we don't have <string.h>.  Protect
6435	declaration of `index' and `rindex' with autoconf macros.
6436	(reinit_parse_for_expr): Remove unused variables
6437	`look_for_semicolon' and `look_for_lbrac'.
6438	(cons_up_default_function): Initialize `args' to NULL_TREE.
6439	(readescape): Initialize `firstdig' to 0.
6440	(real_yylex): Add parentheses around assignment used as truth value.
6441
6442	* method.c: Include <strings.h> if we don't have <string.h>.
6443	Protect declaration of `index' with autoconf macro.
6444
6445	* parse.y (primary): Add explicit braces to avoid ambiguous `else'.
6446	Initialize `type' to NULL_TREE.
6447	(structsp): Remove unused variable `id'.
6448
6449	* pt.c (coerce_template_parms): Add explicit braces to avoid
6450	ambiguous `else'.
6451	(lookup_template_class): Initialize `template' to NULL_TREE.
6452	(instantiate_class_template): Remove unused variable `name' and `e'.
6453	(tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
6454	(do_poplevel): Initialize `saved_warn_unused' to 0.
6455	(type_unification): Remove unused varable `parm'.
6456	(unify): Likewise for `j'.
6457
6458	* repo.c (init_repo): Add parentheses around assignment used as
6459	truth value.
6460	(finish_repo): Remove unused varable `p'.
6461
6462	* search.c (get_binfo): Initialize `type' to NULL_TREE.
6463	(get_base_distance): Likewise.
6464	(lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
6465	and `new_v' to NULL_TREE.
6466	(lookup_fnfields): Likewise for `rval_binfo_h'.
6467	(breadth_first_search): Add parentheses around assignment used as
6468	truth value.
6469	(get_template_base): Initialize `type' to NULL_TREE.
6470
6471	* sig.c (append_signature_fields): Initialize `last_mfptr' to
6472	NULL_TREE.
6473	(build_signature_table_constructor): Likewise for
6474	`last_rhs_field', `pfn' and `vt_off'.
6475	(build_sigtable): Likewise for `init'.
6476
6477	* tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
6478	(propagate_binfo_offsets): Likewise for `delta'.
6479	(hash_tree_cons): Initialize hashcode to 0.
6480	(can_free): Likewise for `size'.
6481	(cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
6482
6483	* typeck.c (convert_sequence): Hide prototype.
6484	(common_type): Add explicit braces to avoid ambiguous `else'.
6485	(comp_target_types): Likewise.
6486	(build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
6487	(build_function_call_real): Add explicit braces to avoid ambiguous
6488	`else'.
6489	(convert_arguments): Initialize `called_thing' to 0.
6490	(convert_for_initialization): Initialize `savew' and `savee' to 0.
6491
6492	* typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
6493	(digest_init): Initialize `old_tail_contents' to NULL_TREE.
6494	(build_x_arrow): Likewise for `last_rval'.
6495
6496	* xref.c (GNU_xref_decl): Initialize `cls' to 0.
6497
6498Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
6499
6500	* decl.c (init_decl_processing): Use set_sizetype.
6501	* decl2.c (sizetype): Don't declare.
6502	* typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
6503	(c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
6504	(build_component_addr, unary_complex_lvalue): Likewise.
6505	* rtti.c (expand_class_desc): Likewise.
6506	* class.c (get_vfield_offset): Likewise.
6507
6508Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
6509
6510	* pt.c (convert_nontype_argument): Move check for is_overloaded_fn
6511	early to avoid bogus error.  Handle overloaded function
6512	names provided as template arguments correctly.
6513	(coerce_template_parms): Don't mishandle overloaded functions when
6514	dealing with template template parameters.
6515	(lookup_template_class): Issue an error message, rather than
6516	crashing, when the TYPE_DECL provided is not a template type.
6517
6518Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
6519
6520	* class.c (instantiate_type): Don't just return a known type if
6521	it's wrong.
6522
6523Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
6524
6525	* class.c (instantiate_type): Remove handling of FUNCTION_DECL
6526	since that code could never be reached.
6527
6528	* error.c (dump_decl): Avoid aborting in the midst of printing an
6529	error message about an illegal template declaration.
6530
6531	* parse.y (structsp): Print an error message, rather than crashing,
6532	when a class-head does not name a class.
6533
6534	* pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
6535	template arguments as a g++ extension.
6536
6537	* cp-tree.def (ALIGNOF_EXPR): New tree code.
6538	* decl2.c (grok_alignof): If processing_template_decl, just store
6539	the expression.
6540	* typeck.c (c_alignof): Likewise.
6541	* decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
6542	* error.c (dump_expr): Likewise.
6543	* pt.c (tsubst_copy): Likewise.
6544	* tree.c (cp_tree_equal): Likewise.
6545	* pt.c (uses_template_parms): Correctly determine whether or not a
6546	SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
6547	folding can be done.
6548
6549	* cp-tree.h (grok_enum_decls): Remove type parameter.
6550	* decl.c (grok_enum_decls): Likewise.
6551	* decl2.c (grok_x_components): Call grok_enum_decls
6552	unconditionally, since it will do nothing if there is no
6553	current_local_enum.  Use the new calling sequence.
6554	* pt.c (tsubst_enum): Use the new calling sequence for
6555	grok_enum_decls.
6556
6557	* decl.c (start_function): Make member functions of local classes
6558	in extern inline functions have comdat linkage here...
6559	(grokdeclarator): Rather than here.
6560
6561Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
6562
6563	* pt.c (convert_nontype_argument): Use decl_constant_value.
6564
6565Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
6566
6567	* call.c (add_template_candidate_real): New function.
6568	(add_template_candidate): Use it.
6569	(add_template_conv_candidate): Likewise.
6570	(joust): Pass extra argument to more_specialized.
6571	* class.c (instantiate_type): Handle a single FUNCTION_DECL.
6572	(is_local_class): Remove.
6573	(finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
6574	* cp-tree.h (is_local_class): Remove.
6575	(perform_array_to_pointer_conversion): Likewise.
6576	(finish_member_template_decl): Add.
6577	(check_explicit_specialization): Return a tree, not an int.
6578	(more_specialized): Take additional argument.
6579	(get_bindings): Likewise.
6580	(TI_PENDING_SPECIALIZATION_FLAG): New macro.
6581	* cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6582	(perform_array_to_pointer_conversion): Remove.
6583	* decl.c (saved_scope): Add processing_specialization,
6584	processing_explicit_instantiation fields.
6585	(maybe_push_to_top_level): Save them.
6586	(pop_from_top_level): Restore them.
6587	(grokfndecl): Use new return value from
6588	check_explicit_specialization.
6589	(start_decl): Don't check flag_guiding_decls before pushing
6590	decls.
6591	(cp_finish_decl): Remove previous (bogus) change.
6592	(grok_declarator): Use decl_function_context rather than
6593	is_local_class.
6594	* decl2.c (finish_file): Pass extra argument to get_bindings.
6595	(build_expr_from_tree): Let build_x_component_ref check
6596	validity of arguments rather than doing it here.
6597	* lex.c (cons_up_default_function): Remove code fooling with
6598	processing_specialization, processing_explicit_instantiation
6599	flags, as that is now done in {maybe_push_top,pop_from}_top_level.
6600	* method.c (build_overload_identifier): Mangle local classes in
6601	template functions correctly.
6602	* parse.y (finish_member_template_decl): Move to pt.c.
6603	* pt.c (finish_member_template_decl): Moved here from parse.y.
6604	(print_candidates): New function.
6605	(determine_specialization): Change interface.  Properly look for
6606	most specialized versions of template candidates.
6607	(check_explicit_specialization): Fully process explicit
6608	instantiations.
6609	(push_template_decl): Avoid looking at CLASSTYPE fields in
6610	FUNCTION_DECLS.
6611	(determine_overloaded_function): Remove.
6612	(convert_nontype_argument): Change name from
6613	convert_nontype_parameter.  Use determine_overloaded_function
6614	instead of instantiate_type.
6615	(mangle_class_name_for_template): Handle type contexts as well as
6616	function contexts.
6617	(classtype_mangled_name): Likewise.
6618	(lookup_template_class): Likewise.
6619	(tsubst): Likewise.
6620	(more_specialized): Take explicit template arguments as a
6621	parameter.
6622	(most_specialized): Likewise.
6623	(get_bindings): Likewise.  Check that return types match before
6624	proclaiming a function a match.
6625	(do_decl_instantiation): Remove code searching for function to
6626	instantiate; that is now done in check_explicit_specialization.
6627	(add_maybe_template): Pass extra argument to get_bindings.
6628	* tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
6629	implementation.
6630	* typeck.c (build_component_ref): Check for invalid arguments.
6631
6632Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
6633
6634	* expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
6635	return_target and call_target are equivalent.
6636
6637	* pt.c (type_unification_real): Just accept function parms that
6638	don't use any template parms.
6639
6640Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
6641
6642	* decl.c (cp_finish_decl): When bailing on a comdat variable, also
6643	unset DECL_NOT_REALLY_EXTERN.
6644
6645	* parse.y (typename_sub*): Fix std::.
6646
6647Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
6648
6649	* error.c (dump_decl): Fix type default template args.
6650	(dump_type): Hand TEMPLATE_DECL off to dump_decl.
6651
6652Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
6653
6654	* lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
6655	(file_name_nondirectory): Use.
6656
6657Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
6658
6659	* pt.c (coerce_template_parms): Don't access elements of ARGLIST
6660	that are not really present.  Substitute default arguments in
6661	template template arguments.  Correctly convert TEMPLATE_DECL to
6662	TEMPLATE_TEMPLATE_PARM.
6663	(comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
6664	are no longer treated specially here.
6665	* parse.y (template_template_parm): Fix copy error.
6666	* decl.c (grokdeclarator): Warn about missing `typename' for nested
6667	type created from template template parameters.
6668	* parse.y (bad_parm): Likewise
6669
6670	* class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
6671	(push_nested_class): Likewise.
6672	* cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
6673	* cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
6674	(copy_template_template_parm): Declare.
6675	* decl.c (arg_looking_for_template): New variable.
6676	(lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
6677	Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
6678	node if arg_looking_for_template is nonzero.
6679	(pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
6680	(grok_op_properties, xref_tag, xref_basetypes): Likewise.
6681	(grokdeclarator): Handle TEMPLATE_DECL.
6682	* decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
6683	* error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
6684	(dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
6685	(dump_decl): Handle unnamed template type parameters.
6686	Handle template template parameters.
6687	(dump_function_name): Handle template template parameters.
6688	* init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
6689	Handle TEMPLATE_TEMPLATE_PARM.
6690	* method.c (build_template_template_parm_names): New function.
6691	(build_template_parm_names): Handle TEMPLATE_DECL.
6692	(build_overload_nested_name, build_overload_name):
6693	Handle TEMPLATE_TEMPLATE_PARM.
6694	* parse.y (maybe_identifier): New nonterminal.
6695	(template_type_parm): Use it.
6696	(template_template_parm, template_arg1): New nonterminal.
6697	(template_parm): Add template_template_parm rules.
6698	(template_arg): Set processing_template_arg.
6699	(template_arg1): Rules moved from template_arg.
6700	(primary, nonnested_type): Set arg_looking_for_template if we are
6701	processing template arguments.
6702	* pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
6703	(process_template_parm): Handle template template parameters.
6704	(coerce_template_parms, comp_template_args): Likewise.
6705	(mangle_class_name_for_template, lookup_template_class): Likewise.
6706	(uses_template_parms): Handle TEMPLATE_DECL and
6707	TEMPLATE_TEMPLATE_PARM.
6708	(current_template_args): Handle TEMPLATE_DECL.
6709	(tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
6710	* search.c (dfs_walk, dfs_record_inheritance):
6711	Handle TEMPLATE_TEMPLATE_PARM.
6712	* tree.c (copy_template_template_parm): New function.
6713	(mapcar): Handle TEMPLATE_TEMPLATE_PARM.
6714	* typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
6715
6716Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
6717
6718	* decl.c (start_decl): Don't allow duplicate definitions of static
6719	data members.
6720
6721	* call.c (build_user_type_conversion_1): Handle user-defined
6722	template conversion operators correctly.
6723
6724	* decl2.c (build_expr_from_tree): Issue an error message if the
6725	object in a COMPONENT_REF is a TEMPLATE_DECL.
6726
6727	* typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
6728
6729	* class.c (is_local_class): New function.
6730	* cp-tree.h (is_local_class): Declare it.
6731	(last_tree): Likewise.
6732	(begin_tree): Likewise.
6733	(end_tree): Likewise.
6734	(lookup_template_class): Change prototype.
6735	* decl.c (cp_finish_decl): Check for NULL where necessary.
6736	Consider FUNCTION_DECLS to declare objects with top-level binding,
6737	when calling make_decl_rtl.
6738	(grokdeclarator): Give members of local classes internal linkage.
6739	(start_function): Remove declaration of last_tree.
6740	(finish_function): Set flag_keep_inline_functions around call to
6741	rest_of_compilation if we are processing a member function in a
6742	local class.
6743	(start_method): Call push_template_decl for member functions of
6744	local classes in template functions.
6745	* decl2.c (import_export_decl): Don't give external linkage to
6746	instantiations of templates with internal linkage.
6747	* parse.y (last_tree): Remove declaration.
6748	(template_type): Pass extra parameter to lookup_template_class.
6749	(self_template_type): Likewise.
6750	(structsp): Move call to reset_specialization into left_curly.
6751	(left_curly): Call reset_specialization, and begin_tree.
6752	* pt.c (saved_trees): New variable.
6753	(mangle_class_name_for_template): Change prototype.  Use
6754	additional function context to name local classes in templates
6755	correctly.
6756	(classtype_mangled_name): Pass the context.
6757	(push_template_decl): Handle local classes and templates, and
6758	member functions for such classes.
6759	(convert_nontype_parameter): Fix handling of pointer-to-member
6760	constants.
6761	(lookup_template_class): Handle local classes in templates.
6762	(tsubst): Likewise.  Don't assume that template instantiations
6763	have external linkage; pay attention to the template declaration.
6764	(mark_decl_instantiated): Likewise.
6765	(begin_tree): New function.
6766	(end_tree): Likewise.
6767
6768	* decl.c (xref_basetypes): Don't call complete_type for basetypes
6769	that involve template parameters; that can lead to infinite
6770	recursion unnecessarily.
6771
6772	* pt.c (register_specialization): Do not register specializations
6773	that aren't ready to be registered yet.
6774	(check_explicit_specialization): Handle explicit specialization of
6775	constructors and destructors.
6776	(build_template_decl): New function.
6777	(push_template_delc): Handle out-of-class specializations of
6778	member templates.
6779
6780	* pt.c (check_explicit_specialization): Set up the template
6781	information before registering the specialization.
6782	(coerce_template_parms): Fix thinko.
6783	(tsubst): Handle specializations of member templates correctly.
6784
6785	* class.c (finish_struct_methods): Remove calls to
6786	check_explicit_specialization from here.
6787	(finish_struct): And insert them here.
6788	* cp-tree.h (perform_qualification_conversions): New function.
6789	(perform_array_to_pointer_conversion): Likewise.
6790	(begin_explicit_instantiation): Likewise.
6791	(end_explicit_instantiation): Likewise.
6792	(determine_specialization): Renamed from
6793	determine_explicit_specialization.
6794	(comp_template_parms): New function.
6795	(processing_explicit_instantiation): New variable.
6796	* cvt.c (perform_qualification_conversions): New function.
6797	(perform_array_to_pointer_conversion): Likewise.
6798	* decl.c (duplicate_decls): Don't consider template functions
6799	alike unless they have the same parameters.  Refine handling of
6800	instantiation/specialization mismatches.
6801	(start_decl): Don't call pushdecl for template specializations,
6802	since they don't affect overloading.
6803	(start_function): Likewise.
6804	(grokfndecl): Call check_explicit_specialization a little later.
6805	Don't call duplicate_decls for memberm template specializations.
6806	(grokdeclarator): Don't update template_count for classes that are
6807	themselves specializations.  Remove use of `2' as parameter to
6808	grokfndecl since that value isn't used.
6809	* lex.c (cons_up_default_function): Save and restore
6810	processing_explicit_instantiation around calls to grokfield.
6811	* parse.y (finish_member_template_decl): New function.
6812	(component_decl_1): Use it.
6813	(fn.def2): Likewise.
6814	(template_arg_list_opt): New nonterminal.
6815	(template_type): Use it.
6816	(self_template_type): Likewise.
6817	(template_id): Likewise.
6818	(object_template_id): Likewise.
6819	(notype_template_declarator): Likwise.
6820	(begin_explicit_instantiation): Likewise.
6821	(end_explicit_instantiation): Likewise.
6822	(explicit_instantiation): Use them.
6823	* pt.c (coerce_template_parms): Add parameters.
6824	(processing_explicit_instantiation): New variable.
6825	(convert_nontype_parameter): New function.
6826	(determine_overloaded_function): Likewise.
6827	(begin_explicit_instantiation): Likewise.
6828	(end_explicit_instantiation): Likewise.
6829	(retrieve_specialization): Likewise.
6830	(register_specialization): Likewise.
6831	(processing_explicit_specialization): Removed.
6832	(determine_specialization): Handle specializations of member
6833	functions of template class instantiations.
6834	(check_explicit_specialization): Refine to conform to standard.
6835	(comp_template_parms): New function.
6836	(coerce_template_parms): Call convert_nontype_parameter.
6837	(tsubst): Refine handling of member templates.  Use
6838	register_specialization.
6839	(instantiate_template): Use retrieve_specialization.
6840	(do_decl_instantiation): Likewise.
6841	(instantiate_decl): Likewise.
6842	(type_unification): Improve handling of explicit template
6843	arguments.
6844	* tree.c (mapcar): Return error_mark_node, rather than aborting,
6845	on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
6846	* typeck.c (build_unary_op): Call determine_specialization, rather
6847	than determine_explicit_specialization.
6848
6849Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
6850
6851	* cvt.c (build_up_reference): A TARGET_EXPR has side effects.
6852
6853Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
6854
6855	* error.c (dump_decl): For enum tags, output the tag, not its value.
6856
68571998-01-13  Brendan Kehoe  <brendan@cygnus.com>
6858
6859	* decl.c (init_decl_processing): Only call init_rtti_processing
6860	FLAG_RTTI is set.
6861
6862Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
6863
6864	* init.c (build_new_1): Split out from build_new.
6865	(build_new): Just return a NEW_EXPR.
6866	* expr.c (cplus_expand_expr): Handle NEW_EXPR.
6867
6868	* decl2.c (get_temp_regvar): Tweak.
6869
6870	* cp-tree.h (TREE_CALLS_NEW): Comment out.
6871	* class.c (resolves_to_fixed_type_p): Remove use.
6872	* method.c (build_opfncall): Likewise.
6873	* call.c (build_new_op): Likewise.
6874
6875Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
6876
6877	* exception.cc (__eh_alloc, __eh_free): New fns.
6878	(__cp_push_exception, __cp_pop_exception): Use them.
6879	(__uncatch_exception): Call terminate here if no exception.
6880	* except.c (build_terminate_handler): New fn.
6881	(expand_start_catch_block): Use it.
6882	(expand_exception_blocks): Likewise.
6883	(alloc_eh_object): New fn.
6884	(expand_throw): Use it.  Protect exception init with terminate.
6885	* typeck.c (build_modify_expr): Remove code that ignores trivial
6886	methods.
6887
6888
6889
6890Copyright (C) 1998 Free Software Foundation, Inc.
6891
6892Copying and distribution of this file, with or without modification,
6893are permitted in any medium without royalty provided the copyright
6894notice and this notice are preserved.
6895