]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
error.c (interesting_scope_p): New fn.
[gcc.git] / gcc / cp / ChangeLog
1 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
2
3 * error.c (interesting_scope_p): New fn.
4 (dump_simple_decl): Use it.
5 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
7
8 1998-12-16 Mark Mitchell <mark@markmitchell.com>
9
10 * class.c (resolve_address_of_overloaded_function): Do conversion
11 to correct type here, rather than ...
12 (instantiate_type): Here.
13
14 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
15 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
16 (decl_template_parm_p): Remove.
17 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
18 paramter.
19 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
20 * pt.c (push_inline_template_parms_recursive): Set it.
21 (decl_template_parm_p): Remove.
22 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
23 (process_template_parm): Set it.
24
25 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
26
27 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
28 if configured with cpplib.
29
30 1998-12-15 Mark Mitchell <mark@markmitchell.com>
31
32 * decl.c (poplevel): Make sure ns_binding is initialized.
33
34 * decl.c (finish_function): Undo inadvertant change in previous
35 patch.
36
37 1998-12-14 Mark Mitchell <mark@markmitchell.com>
38
39 * class.c (pushclass): Tweak handling of class-level bindings.
40 (resolve_address_of_overloaded_function): Update pointer-to-member
41 handling.
42 (instantiate_type): Likewise.
43 * cvt.c (cp_convert_to_pointer): Likewise.
44 * decl.c (pop_binding): Take the DECL to pop, not just the name.
45 Deal with `struct stat' hack.
46 (binding_level): Add to documentation.
47 (push_binding): Clear BINDING_TYPE.
48 (add_binding): New function.
49 (push_local_binding): Use it.
50 (push_class_binding): Likewise.
51 (poplevel): Adjust calls to pop_binding.
52 (poplevel_class): Likewise.
53 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
54 declarations to current binding level.
55 (push_class_level_binding): Likewise.
56 (push_overloaded_decl): Adjust handling of OVERLOADs in local
57 bindings.
58 (lookup_namespace_name): Don't crash when confronted with a
59 TEMPLATE_DECL.
60 (lookup_name_real): Do `struct stat' hack in local binding
61 contexts.
62 (build_ptrmemfunc_type): Adjust documentation.
63 (grokdeclarator): Don't avoid building real array types when
64 processing templates unless really necessary.
65 (finish_method): Adjust calls to pop_binding.
66 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
67 not reparse_decl_as_expr.
68 (build_expr_from_tree): Deal with a template-id as the function to
69 call in a METHOD_CALL_EXPR.
70 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
71 (maybe_adjust_types_For_deduction): Don't do peculiar things with
72 METHOD_TYPEs here.
73 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
74 pointer-to-member types where necessary.
75 * tree.c (build_cplus_array_type_1): Don't avoid building real
76 array types when processing templates unless really necessary.
77 (build_exception_variant): Compare the exception lists correctly.
78
79 1998-12-13 Mark Mitchell <mark@markmitchell.com>
80
81 * cp-tree.def (CPLUS_BINDING): Update documentation.
82 * cp-tree.h (LOCAL_BINDING_P): New macro.
83 (lang_identifier): Rename local_value to bindings.
84 (tree_binding): Make `scope' of type `void*', not `tree'.
85 (BINDING_SCOPE): Update documentation.
86 (IDENTIFIER_LOCAL_VALUE): Remove.
87 (IDENTIFIER_CLASS_VALUE): Document.
88 (IDENTIFIER_BINDING): New macro.
89 (IDENTIFIER_VALUE): Likewise.
90 (TIME_IDENTIFIER_TIME): Likewise.
91 (TIME_IDENTIFIER_FILEINFO): Likewise.
92 (IMPLICIT_TYPENAME_P): Likewise.
93 (set_identifier_local_value): Remove.
94 (push_local_binding): New function.
95 (push_class_binding): Likewise.
96 * class.c (pushclass): Update comments; use push_class_binding.
97 * decl.c (set_identifier_local_value_with_scope): Remove.
98 (set_identifier_local_value): Likewise.
99 (push_binding): New function.
100 (pop_binding): Likewise.
101 (binding_level): Update documentation. Remove shadowed.
102 (BINDING_LEVEL): New macro.
103 (free_binding_nodes): New variable.
104 (poplevel): Adjust for new name-lookup scheme. Don't mess up
105 BLOCK_VARs when doing for-scope extension. Remove effectively
106 dead code.
107 (pushlevel_class): Tweak formatting.
108 (poplevel_class): Adjust for new name-lookup scheme.
109 (print_binding_level): Likewise.
110 (store_bindings): Likewise.
111 (pushdecl): Likewise.
112 (pushdecl_class_level): Likewise.
113 (push_class_level_binding): Likewise.
114 (push_overloaded_decl): Update comments. Adjust for new
115 name-lookup scheme.
116 (lookup_name_real): Likewise.
117 (lookup_name_current_level): Likewise.
118 (cp_finish_decl): Likewise.
119 (require_complete_types_for_parms): Likewise. Remove misleading
120 #if 0'd code.
121 (grok_parms): Likewise. Don't call
122 require_complete_types_for_parms here.
123 (grok_ctor_properties): Don't treat templates as copy
124 constructors.
125 (grop_op_properties): Or as assignment operators.
126 (start_function): Document. Adjust for new name-lookup scheme.
127 (finish_function): Likewise.
128 * decl2.c (do_local_using_decl): Use push_local_binding.
129 * lex.c (begin_definition_of_inclass_inline): New function, split
130 out from ...
131 (do_pending_inlines): Here, and ...
132 (process_next_inline): Here.
133 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
134 (init_filename_times): Likewise.
135 (extract_interface_info): Likewise.
136 (ste_typedecl_interface_info): Likewise.
137 (check_newline): Likewise.
138 (dump_time_statistics): Likewise.
139 (handle_cp_pragma): Likewise.
140 (do_identifier): Adjust for new name-lookup scheme.
141 * parse.y (function_try_block): Return ctor_initializer_opt value.
142 (fndef): Use it.
143 (fn.defpen): Pass appropriate values to start_function.
144 (pending_inline): Use functor_try_block value, and pass
145 appropriate values to finish_function.
146 * pt.c (is_member_template): Update documentation; remove handling
147 of FUNCTION_DECLs. As per name, this function should deal only in
148 TEMPLATE_DECLs.
149 (decl_template_parm_p): Change name of olddecl parameter to decl.
150 (check_template_shadow): Adjust for new name-lookup scheme.
151 (lookup_template_class): Likewise.
152 (tsubst_decl): Tweak so as not to confuse member templates with
153 copy constructors and assignment operators.
154 (unify): Handle UNION_TYPEs.
155 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
156 (lang_print_xnode): Adjust for new name-lookup scheme.
157 * typeck.c (mark_addressable): Likewise.
158 (c_expand_return): Likewise.
159
160 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
161
162 * decl.c (grokdeclarator): Allow field with same name as class
163 in extern "C".
164
165 * decl.c (lookup_name_real): Don't limit field lookup to types.
166 * class.c (check_member_decl_is_same_in_complete_scope): No error
167 if icv and x are the same.
168 * lex.c (do_identifier): Tweak error message.
169
170 1998-12-10 Mark Mitchell <mark@markmitchell.com>
171
172 * decl.c (start_enum): Use push_obstacks, not
173 end_temporary_allocation.
174 (finish_enum): Call pop_obstacks.
175
176 1998-12-10 Mark Mitchell <mark@markmitchell.com>
177
178 * class.c (instantiate_type): Return error_mark_node rather than
179 junk.
180
181 1998-12-09 Mark Mitchell <mark@markmitchell.com>
182
183 * cp-tree.h (most_specialized_instantiation): New function.
184 (print_candidates): Likewise.
185 * class.c (validate_lhs): Remove.
186 (resolve_address_of_overloaded_function): New function, split out
187 and then substantially reworked, from ...
188 (instantiate_type): Use it. Simplify.
189 * cvt.c (convert_to_reference): Complain when caller has indicated
190 that's the right thing to do. Don't crash if instantiate_type
191 fails.
192 * pt.c: Substitute `parameters' for `paramters' throughout.
193 (print_candidates): Don't make it static.
194 (most_specialized_instantiation): Split out from ...
195 (most_specialized): Here.
196
197 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
198
199 * lex.c (lang_init_options): Initialize cpplib.
200 * decl2.c (parse_options,cpp_initialized): Removed.
201 (lang_decode_option): Move initialization of cpplib to
202 lang_init_options.
203
204 1998-12-09 Mark Mitchell <mark@markmitchell.com>
205
206 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
207 well as the TYPE_DECL, when a typedef name is assigned to a
208 previously anonymous type.
209
210 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
211
212 * cp/except.c (call_eh_info): use __start_cp_handler instead of
213 __cp_eh_info for getting the eh info pointer. Add table_index to
214 field list.
215 (push_eh_cleanup): Don't increment 'handlers' data field.
216 (process_start_catch_block): Don't set the 'caught' field.
217
218 * cp/exception.cc (CP_EH_INFO): New macro for getting the
219 exception info pointer within library routines.
220 (__cp_eh_info): Use CP_EH_INFO.
221 (__start_cp_handler): Get exception info pointer, set caught field,
222 and increment the handlers field. Avoids this being done by handlers.
223 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
224 (uncaught_exception): Use CP_EH_INFO macro.
225
226 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
227
228 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
229
230 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
231
232 * lex.c (check_newline): Add support for \ as `natural'
233 characters in file names in #line to be consistent with #include
234 handling. We support escape prcessing in the # 1 "..." version of
235 the command. See also support in cp/lex.c.
236
237 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
238
239 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
240 structure.
241
242 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
243
244 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
245
246 * error.c (dump_simple_decl): Also print namespace context.
247 (dump_function_decl): Likewise.
248
249 * decl2.c (ambiguous_decl): Don't print old value if it's
250 error_mark_node.
251
252 * decl.c (lookup_name_real): Fix handling of local types shadowed
253 by a non-type decl. Remove obsolete code.
254 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
255
256 * lang-options.h: Add -fpermissive.
257 * decl2.c: Likewise.
258 * cp-tree.h: Add flag_permissive.
259 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
260 were specified, set flag_pedantic_errors.
261 * call.c (build_over_call): Turn dropped qualifier messages
262 back into pedwarns.
263 * cvt.c (convert_to_reference): Likewise.
264 * typeck.c (convert_for_assignment): Likewise.
265
266 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
267
268 * decl2.c (coerce_new_type): Use same_type_p.
269 (coerce_delete_type): Likewise.
270
271 * call.c (check_dtor_name): Return 1, not error_mark_node.
272
273 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
274
275 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
276 if MULTIPLE_SYMBOL_SPACES.
277
278 * pt.c (check_template_shadow): New fn.
279 * decl2.c (grokfield): Use it.
280 * decl.c (pushdecl): Likewise.
281 (pushdecl_class_level): Likewise.
282 (start_method): Likewise.
283 (xref_tag): Don't try to use 't' if we're defining.
284
285 * call.c (check_dtor_name): Just return an error_mark_node.
286 * pt.c (lookup_template_class): Complain about using non-template here.
287 * parse.y (apparent_template_type): Not here.
288
289 * pt.c (check_explicit_specialization): Complain about specialization
290 with C linkage.
291
292 * lang-options.h: Add -f{no-,}implicit-inline-templates.
293
294 * pt.c (convert_nontype_argument): Don't assume that any integer
295 argument is intended to be a constant-expression.
296
297 1998-12-03 Mark Mitchell <mark@markmitchell.com>
298
299 * class.c (handle_using_decl): Fix comment. Don't lookup
300 constructors in base classes.
301 (validate_lhs): Fix typo in comment.
302 * search.c (lookup_field_1): Don't return a USING_DECL.
303
304 * cp-tree.h (DECL_ACCESS): Improve documentation.
305
306 * decl.c (expand_static_init): Don't set the initialization-done
307 flag until the initialization is done.
308
309 1998-12-02 Mark Mitchell <mark@markmitchell.com>
310
311 * decl2.c (validate_nonmember_using_decl): Complain about using
312 declarations for class members.
313
314 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
315
316 * typeck2.c (process_init_constructor): Use same_type_p.
317
318 * decl.c (check_tag_decl): Don't warn about null decl inside a
319 class.
320
321 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
322 UNIFY_ALLOW_NONE.
323 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
324 (resolve_overloaded_unification): Strip baselinks.
325
326 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
327
328 * g++spec.c: Don't prototype xmalloc.
329
330 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
331
332 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
333
334 * decl.c (check_tag_decl): Do complain about null friend decl at
335 file scope.
336
337 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
338
339 * lex.c (make_lang_type): Clear the whole struct lang_type, not
340 only the first multiple of sizeof (int).
341
342 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
343
344 * decl.c (start_decl): An explicit specialization of a static data
345 member is only a definition if it has an initializer.
346
347 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
348 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
349 cp_finish_decl.
350 * init.c (expand_default_init): Check for DIRECT_BIND instead of
351 DECL_ARTIFICIAL.
352
353 * call.c (build_over_call): Use build_decl.
354
355 * except.c (expand_throw): Just use convert, not
356 build_reinterpret_cast.
357
358 * lex.c (handle_generic_pragma): Use token_buffer.
359
360 * decl.c (check_tag_decl): Don't complain about null friend decl.
361
362 1998-11-24 Dave Pitts <dpitts@cozx.com>
363
364 * Make-lang.in (DEMANGLER_PROG): Move the output argumnts to the
365 first position.
366 * lex.c (check_newline): Use ISALPHA.
367 (readescape): Use ISGRAPH.
368 (yyerror): Use ISGRAPH.
369
370 1998-11-24 Nathan Sidwell <nathan@acm.org>
371
372 * search.c (get_abstract_virtuals): Do not use initial
373 CLASSTYPE_ABSTRACT_VIRTUALS.
374 * typeck2.c (abstract_virtuals_error): Show location of abstract
375 declaration.
376 * call.c (build_new_method_call): Use
377 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
378 * class.c (finish_struct_bits): Don't bother working out whether
379 get_abstract_virtuals will do anything, just do it.
380
381 1998-11-24 Graham <grahams@rcp.co.uk>
382
383 * typeck.c (build_component_ref): Remove unused statement.
384
385 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
386
387 * class.c (add_method): Catch invalid overloads.
388
389 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
390 * search.c (lookup_conversions): Handle getting real OVERLOADs.
391 (add_conversions): Likewise. Revert last change.
392 * call.c (add_conv_candidate): Pass totype to add_candidate instead
393 of fn. Don't add a new candidate if the last one was for the same
394 type.
395 (print_z_candidates): Handle getting a type as a function.
396 (joust): If we got two conversion candidates to the same type,
397 just pick one.
398 (build_object_call): Lose 'templates'.
399 (build_user_type_conversion_1): Handle getting real OVERLOADs.
400
401 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
402
403 * typeck2.c (process_init_constructor): If there are elements
404 that don't have initializers and they need to have constructors
405 run, supply them with initializers.
406
407 * class.c (finish_struct_1): A class with a 0-width bitfield is
408 still empty.
409
410 1998-11-23 Mark Mitchell <mark@markmitchell.com>
411
412 * pt.c (instantiate_class_template): Don't try to figure out what
413 specialization to use for a partial instantiation. Correct
414 typos in a couple of comments. Avoid calling uses_template_parms
415 multiple times.
416
417 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
418
419 * method.c (process_overload_item): Add call to
420 build_mangled_C9x_name for intTI_type_nodes.
421 (build_mangled_C9x_name): Add prototype, define.
422 * decl.c (init_decl_processing): Add names for
423 TImode_type_node.
424
425 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
426
427 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
428
429 * class.c (finish_struct_1): Set things up for 0-width bitfields
430 like we do for others.
431
432 * decl.c (check_tag_decl): New fn.
433 (shadow_tag): Split out from here.
434 * decl2.c (grok_x_components): Call it.
435
436 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
437
438 * decl.c: Lose warn_about_return_type.
439 (grokdeclarator): Always complain about implicit int, except for
440 `main () { ... }'.
441
442 * decl.c (tag_name): New fn.
443 (xref_tag): Complain about using typedef-name after class-key.
444
445 * init.c (expand_vec_init): Also keep going if from_array.
446
447 * tree.c (is_overloaded_fn): Also handle the output of
448 build_offset_ref.
449
450 * decl.c (grokdeclarator): Use constructor_name when comparing
451 field name against enclosing class.
452 * class.c (finish_struct_anon): Likewise.
453
454 1998-11-22 Mark Mitchell <mark@markmitchell.com>
455
456 * decl.c (poplevel): Remove code to handle KEEP == 2.
457 (finish_function): Don't confuse BLOCK-order when
458 processing a destructor.
459
460 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
461
462 * decl.c (require_complete_types_for_parms): Call layout_decl
463 after we've completed the type.
464
465 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
466
467 * decl2.c (validate_nonmember_using_decl): Allow using templates
468 from the global namespace.
469
470 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
471
472 Handle specifying template args to member function templates.
473 * tree.c (build_overload): Always create an OVERLOAD for a template.
474 * search.c (add_conversions): Handle finding an OVERLOAD.
475 * decl2.c (check_classfn): Likewise.
476 * lex.c (identifier_type): See through a baselink.
477 * parse.y (do_id): Don't call do_identifier if we got a baselink.
478 * class.c (instantiate_type, case TREE_LIST): Recurse.
479
480 * decl.c (grokdeclarator): Allow a boolean constant for array
481 bounds, odd as that sounds.
482
483 * pt.c (unify): Be more strict about non-type parms, except for
484 array bounds.
485 (UNIFY_ALLOW_INTEGER): New macro.
486
487 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
488
489 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
490
491 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
492
493 * semantics.c (begin_class_definition): Call
494 maybe_process_partial_specialization before push_template_decl.
495 Don't call push_template_decl for a specialization.
496 * search.c (lookup_field): Do return a member template class.
497 * decl2.c (handle_class_head): Handle member template classes.
498
499 * decl.c (grokdeclarator): A parm type need not be complete.
500
501 * pt.c (convert_nontype_argument): Fix thinko.
502
503 1998-11-18 Mark Mitchell <mark@markmitchell.com>
504
505 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
506 (global_delete_fndecl): New variable.
507 * decl.c (global_delete_fndecl): Define it.
508 (init_decl_processing): Set it.
509 * init.c (build_builtin_delete_call): Use it.
510 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
511 nodes.
512
513 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
514
515 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
516 type.
517
518 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
519 * call.c (build_object_call): Also support references to functions.
520 * typeck.c (convert_for_initialization): Don't decay a function
521 if the target is a reference to function.
522
523 * search.c (add_conversions): Get all the overloads from a class.
524
525 * decl.c (grok_ctor_properties): Complain about any constructor
526 that will take a single arg of the class type by value.
527
528 * typeck2.c (build_functional_cast): Can't create objects of
529 abstract classes this way.
530 * cvt.c (ocp_convert): Likewise.
531
532 * decl.c (grokfndecl): Member functions of local classes are not
533 public.
534
535 1998-11-18 Mark Mitchell <mark@markmitchell.com>
536
537 * Make-lang.in (cc1plus): Add dependency on hash.o.
538
539 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
540
541 * search.c (get_abstract_virtuals): Complain about virtuals with
542 no final overrider.
543 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
544 with no final overrider.
545 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
546 on virtuals with no final overrider.
547
548 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
549
550 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
551 after layout_type.
552
553 * friend.c (do_friend): Don't set_mangled_name_for_decl.
554
555 * class.c (finish_struct_anon): Complain about non-fields.
556 * decl2.c (build_anon_union_vars): Likewise.
557
558 * decl.c (grokdeclarator): Normal data members can't have the same
559 name as the class, either.
560 * class.c (finish_struct_anon): Neither can members of an
561 anonymous union.
562
563 1998-11-17 Mark Mitchell <mark@markmitchell.com>
564
565 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
566 (TYPE_BINFO): Likewise.
567 (IS_AGGR_TYPE): Tweak.
568 (SET_IS_AGGR_TYPE): New macro.
569 (CLASS_TYPE_P): Tweak.
570 (lang_type): Group mark bitfields together. Remove linenum.
571 (CLASSTYPE_SOURCE_LINE): Remove macro.
572 (CLASSTYPE_MARKED_N): New macro.
573 (SET_CLASSTYPE_MARKED_N): Likewise.
574 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
575 (CLASS_TYPE_MARKED_*): Use them.
576 (SET_CLASSTYPE_MARKED_*): Likewise.
577 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
578 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
579 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
580 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
581 * class.c (class_cache_obstack): New variable.
582 (class_cache_firstobj): Likewise.
583 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
584 (pushclass): Free the cache, when appropriate.
585 (popclass): Tidy.
586 (maybe_push_cache_obstack): Use class_cache_obstack.
587 * decl.c (include hash.h).
588 (typename_hash): New function.
589 (typename_compare): Likewise.
590 (build_typename_type): Check the hash table to avoid creating
591 duplicates.
592 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
593 (grokdeclarator): Use CLASS_TYPE_P.
594 (xref_basetypes): Likewise.
595 (start_function): Likewise. Don't put current_class_ref on the
596 permanent obstack.
597 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
598 and TYPE_TI_ARGS.
599 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
600 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
601 fields for types other than class types. Do clear TYPE_ALIAS_SET
602 for types other than class types, though.
603 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
604 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
605 * pt.c (process_template_parm): Don't set
606 CLASSTYPE_GOT_SEMICOLON.
607 (lookup_template_class) Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
608 Coerce arguments on the momentary obstack.
609 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
610 (instantiate_class_template): Calculate template arguments on the
611 momentary obstack. Tidy.
612 (tsubst_template_arg_vector): Use make_temp_vec.
613 (tsubst_aggr_type): Put template arguments on the momentary
614 obstack.
615 (tsubst_decl): Likewise.
616 (tsubst): Copy the array bounds index to the permanent obstack
617 before building index types. Use new macros.
618 (unify): Use new macros.
619 (do_type_instantiation): Likewise.
620 * search.c (lookup_fnfields_1): Use new macros.
621 (dfs_pushdecls): Build envelopes on the cache obstack.
622 (dfs_compress_decls): Use new macros.
623 (push_class_decls): Build on the cache obstack.
624 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
625 * sign.c (build_signature_pointer_or_reference_type): Use
626 SET_IS_AGGR_TYPE.
627 * tree.c (make_binfo): Check CLASS_TYPE_P.
628 (copy_template_template_parm): Adjust.
629 (make_temp_vec): Use push_expresion_obstack.
630 * typeck.c (complete_type): Use new macros.
631 (comptypes): Likewise.
632
633 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
634
635 * pt.c (tsubst): Add diagnostics for invalid array, reference
636 and pointer to member types.
637
638 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
639
640 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
641
642 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
643 Simplify.
644
645 * parse.y (structsp): Fix cut-and-paste error.
646
647 * init.c (build_new): Complain about non-integral size.
648
649 * parse.y (unary_expr): Complain about defining types in sizeof.
650
651 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
652
653 * rtti.c (build_x_typeid): Complain about typeid without
654 including <typeinfo>.
655 (get_typeid): Likewise. Complain about typeid of incomplete type.
656 (get_tinfo_fn_dynamic): Likewise.
657 (get_typeid_1): Not static anymore.
658 * except.c (build_eh_type_type): Use get_typeid_1.
659
660 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
661 ambiguous or private bases. Fix warning for reference cast.
662
663 1998-11-16 Mark Mitchell <mark@markmitchell.com>
664
665 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
666 * decl.c (duplicate_decls): Remove special-case code to deal with
667 template friends, and just do the obvious thing.
668 * pt.c (register_specialization): Tweak for clarity, and also to
669 clear DECL_INITIAL for an instantiation before it is merged with a
670 specialization.
671 (check_explicit_specialization): Fix indentation.
672 (tsubst_friend_function): Handle both definitions in friend
673 declaration and outside friend declarations.
674 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
675 (regenerate_decl_from_template): Tweak accordingly.
676 (instantiate_decl): Likewise.
677
678 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
679
680 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
681 member function reference to error.
682 * cvt.c (ocp_convert): Complain about converting an overloaded
683 function to void.
684
685 * init.c (build_offset_ref): Just return a lone static member
686 function.
687
688 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
689 not internal ones.
690
691 * typeck.c (build_binary_op_nodefault): Improve error handling.
692
693 * decl.c (grokfndecl): Complain about making 'main' a template.
694
695 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
696
697 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
698 TYPE_DECL in a template.
699
700 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
701
702 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
703
704 * decl.c (struct cp_function): Add named_label_uses.
705 (push_cp_function_context): Save it.
706 (pop_cp_function_context): Restore it.
707 (define_label): Also complain about jumping into the scope of
708 non-POD objects that don't have constructors.
709 * tree.c (pod_type_p): New fn.
710
711 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
712 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
713 (get_tinfo_fn): Not here.
714 * repo.c (repo_get_id): Abort if we get called for an incomplete
715 type.
716
717 1998-11-13 Mark Mitchell <mark@markmitchell.com>
718
719 * except.c (expand_throw): Make sure first argument to
720 __cp_push_exception is of type `void*' to avoid spurious error
721 messages.
722
723 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
724
725 * pt.c (try_one_overload): Take orig_targs again. Only check for
726 mismatches against them; we don't care what a previous call found.
727 (resolve_overloaded_unification): Adjust.
728
729 * search.c (lookup_field): Don't return anything for a non-type
730 field from a dependent type.
731 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
732 in an array declarator.
733 (start_decl): Push into the class before looking for the field.
734
735 1998-11-08 Mark Mitchell <mark@markmitchell.com>
736
737 * method.c (build_overload_value): Handle REFERENCE_TYPE.
738
739 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
740
741 * decl.c (grokdeclarator): Allow namespace-scoped members if they
742 are friends.
743
744 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
745
746 * pt.c (tsubst_decl): Don't mess with the global value of an
747 un-mangled DECL_ASSEMBLER_NAME.
748
749 1998-11-03 Christopher Faylor <cgf@cygnus.com>
750
751 * decl.c (init_decl_processing): Remove CYGWIN conditional
752 since CYGWIN is now able to deal with trapping signals.
753
754 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
755
756 * cp-tree.h: Don't include gansidecl.h.
757 * exception.cc: Include gansidecl.h (since we don't include config.h)
758 * g++spec.c: Don't include gansidecl.h.
759
760 1998-11-06 Mark Mitchell <mark@markmitchell.com>
761
762 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
763 size of dummy.
764 (DECL_DEFINED_IN_CLASS_P): New macro.
765 (TEMPLATE_PARMS_FOR_INLINE): Document.
766 (check_static_variable_definition): New function.
767 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
768 appropriate.
769 (check_static_variable_definition): Split out from ...
770 (grokdeclarator): Here.
771 * pt.c (check_default_tmpl_args): New function, split out from ...
772 (push_template_decl_real): Here.
773 (instantiate_template): Fix comment.
774
775 1998-11-04 Mark Mitchell <mark@markmitchell.com>
776
777 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
778 (CP_TYPE_VOLATILE_P): Likewise.
779 (CP_TYPE_RESTRICT_P): Likewise.
780
781 1998-11-03 Mark Mitchell <mark@markmitchell.com>
782
783 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
784
785 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
786
787 * class.c (instantiate_type): Be more helpful.
788
789 * decl2.c (import_export_decl): Call import_export_class.
790
791 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
792 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
793 * pt.c (tsubst_copy): Likewise.
794
795 1998-11-02 Mark Mitchell <mark@markmitchell.com>
796
797 * init.c (expand_vec_init): Fix off-by-one error.
798
799 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
800
801 * parse.y (apparent_template_type): new type
802 (named_complex_class_head_sans_basetype): use it
803 * Makefile.in (CONFLICTS): one new conflict
804 * parse.c: Regenerated
805
806 1998-11-01 Mark Mitchell <mark@markmitchell.com>
807
808 * cp-tree.h (COMPARE_STRICT): New macro.
809 (COMPARE_BASE): Likewise.
810 (COMPARE_RELAXED): Likewise.
811 (COMPARE_REDECLARATION): Likewise.
812 (same_type_p): Likewise.
813 (same_or_base_type_p): Likewise.
814 * call.c (standard_conversion): Use them, in place of comptypes
815 with numeric arguments.
816 (reference_binding): Likewise.
817 (convert_like): Likewise.
818 (build_over_call): Likewise.
819 (is_subseq): Likewise.
820 (is_properly_derived_from): Likewise.
821 (compare_ics): Likewise.
822 (joust): Likewise.
823 * class.c (delete_duplicate_fields_1): Likewise.
824 (resolves_to_fixed_type_p): Likewise.
825 (instantiate_type): Likewise. Remove #if 0'd code.
826 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
827 (pushdecl): Likewise.
828 (lookup_name_real): Likewise.
829 (grokdeclarator): Likewise. Check for illegal array declarations.
830 (grokparms): Likewise.
831 (grok_op_properties): Likewise.
832 * decl2.c (check_classfn): Likewise.
833 * friend.c (is_friend): Likewise.
834 (make_friend_class): Likewise.
835 * init.c (expand_aggr_init): Likewise.
836 (expand_vec_init): Likewise.
837 * pt.c (is_member_template_class): Remove declaration.
838 (is_specialization_of): Use COMPARE_* and new macros.
839 (comp_template_parms): Likewise.
840 (convert_nontype_argument): Likewise.
841 (coerce_template_template_parms): Likewise.
842 (template_args_equal): Likewise.
843 (lookup_template_class): Likewise.
844 (type_unification_real): Likewise.
845 (unify): Likewise.
846 (get_bindings_real): Likewise.
847 * search.c (covariant_return_p): Likewise.
848 (get_matching_virtual): Likewise.
849 * sig.c (match_method_types): Likewise.
850 * tree.c (vec_binfo_member): Likewise.
851 (cp_tree_equal): Likewise.
852 * typeck.c (common_type): Likewise.
853 (comp_array_types): Likewise. Get issues involving unknown array
854 bounds right.
855 (comptypes): Update comments. Use new flags.
856 (comp_target_types): Use new macros.
857 (compparms): Likewise.
858 (comp_target_parms): Likewise.
859 (string_conv_p): Likewise.
860 (build_component_ref): Likewise.
861 (build_indirect_ref): Likewise.
862 (build_conditional_expr): Likewise.
863 (build_static_cast): Likewise.
864 (build_reinterpret_cast): Likewise.
865 (build_const_cast): Likewise.
866 (build_modify_expr): Likewise.
867 (convert_for_assignment): Likewise.
868 (comp_ptr_ttypes_real): Likewise.
869 (ptr_reasonably_similar): Likewise.
870 (comp_ptr_ttypes_const): Likewise.
871
872 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
873
874 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
875
876 1998-10-30 Mark Mitchell <mark@markmitchell.com>
877
878 * decl2.c (delete_sanity): Pass integer_zero_node, not
879 integer_two_node, to build_vec_delete.
880 * init.c (build_array_eh_cleanup): Remove.
881 (expand_vec_init_try_block): New function.
882 (expand_vec_init_catch_clause): Likewise.
883 (build_vec_delete_1): Don't deal with case that auto_delete_vec
884 might be integer_two_node anymore.
885 (expand_vec_init): Rework for initialization-correctness and
886 exception-correctness.
887 * typeck2.c (process_init_constructor): Make mutual exclusivity
888 of cases more obvious.
889
890 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
891
892 * decl.c (lookup_name_real): OK, only warn if not lexing.
893 Simplify suggested fix.
894
895 * cp-tree.h (IDENTIFIER_MARKED): New macro.
896 * search.c (lookup_conversions): Use breadth_first_search.
897 (add_conversions): Avoid adding two conversions to the same type.
898 (breadth_first_search): Work with base binfos, rather
899 than binfos and base indices.
900 (get_virtual_destructor): Adjust.
901 (tree_has_any_destructor_p): Adjust.
902 (get_matching_virtual): Adjust.
903
904 * pt.c (push_template_decl_real): Generalize check for incorrect
905 number of template parms.
906 (is_member_template_class): #if 0.
907
908 1998-10-29 Richard Henderson <rth@cygnus.com>
909
910 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
911 last.
912
913 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
914
915 * lex.c: Call check_newline from lang_init always. After
916 calling cpp_start_read, set yy_cur and yy_lim to read from the
917 cpplib token buffer.
918
919 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
920
921 * class.c (instantiate_type): Don't consider templates for a normal
922 match.
923
924 * class.c (finish_struct_1): Don't complain about non-copy
925 assignment ops in union members.
926
927 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
928 (prepare_fresh_vtable): Likewise.
929 (finish_struct_1): Don't call import_export_class.
930 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
931 (finish_prevtable_vardecl): Lose.
932 (finish_file): Don't call it.
933 * pt.c (instantiate_class_template): Likewise.
934 * cp-tree.h: Remove it.
935
936 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
937 * decl.c (finish_function): Not here.
938 (start_function): Do set DECL_INITIAL.
939
940 * pt.c (push_template_decl_real): Complain about default template
941 args for enclosing classes.
942
943 * call.c (add_function_candidate): Treat conversion functions
944 as coming from the argument's class.
945 * cp-tree.h (DECL_CONV_FN_P): New fn.
946 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
947 * class.c (add_method): Use DECL_CONV_FN_P.
948 * decl2.c (check_classfn): Likewise.
949 * error.c (dump_function_name): Likewise.
950 (dump_function_decl): Likewise.
951 * pt.c (fn_type_unification): Likewise.
952 * search.c (add_conversions): Likewise.
953
954 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
955
956 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
957 * method.c (hack_identifier): Also check for using RESULT_DECL
958 from outer context.
959
960 1998-10-27 Mark Mitchell <mark@markmitchell.com>
961
962 * decl.c (grokdeclarator): Use type_quals, rather than constp,
963 consistently.
964
965 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
966
967 * call.c (standard_conversion): instantiate_type here.
968 (reference_binding): And here.
969 (implicit_conversion): Not here.
970 (build_op_delete_call): No need to cons up an OVERLOAD.
971 * cvt.c (cp_convert_to_pointer): instantiate_type here.
972 (convert_to_reference): And here.
973 * decl.c (grok_reference_init): Not here.
974 (grokparms): Or here.
975 * typeck2.c (digest_init): Or here.
976 * typeck.c (decay_conversion): Take the address of overloaded
977 functions, too.
978 (require_instantiated_type): Lose.
979 (convert_arguments): Don't handle unknown types here.
980 (build_c_cast): Likewise.
981 (build_binary_op): Gut.
982 (build_conditional_expr): Don't require_instantiated_type.
983 (build_modify_expr): Likewise.
984 (build_static_cast): Don't instantiate_type.
985 (build_reinterpret_cast): Likewise.
986 (build_const_cast): Likewise.
987 (convert_for_initialization): Likewise.
988 (build_ptrmemfunc): Use type_unknown_p.
989 (convert_for_assignment): Also do default_conversion on overloaded
990 functions. Hand them off to ocp_convert.
991
992 1998-10-26 Mark Mitchell <mark@markmitchell.com>
993
994 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
995 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
996
997 * class.c (finish_struct_1): Use build_cplus_array_type to build
998 array types.
999 * decl.c (init_decl_processing): Likewise.
1000 * except.c (expand_end_eh_spec): Likewise.
1001 * search.c (expand_upcast_fixups): Simplify very slightly.
1002
1003 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1004
1005 * decl.c (grokdeclarator): Complain about a variable using
1006 constructor syntax coming back null from start_decl.
1007
1008 * friend.c (make_friend_class): Complain about trying to make
1009 a non-class type a friend.
1010
1011 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
1012 (start_function): Not here.
1013
1014 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
1015
1016 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
1017
1018 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1019
1020 * typeck2.c (process_init_constructor): Only skip anonymous fields
1021 if they are bitfields.
1022
1023 * cp-tree.def (TYPEOF_TYPE): New code.
1024 * error.c (dump_type_real): Handle it.
1025 * pt.c (tsubst): Likewise.
1026 * tree.c (search_tree): Likewise.
1027 * semantics.c (finish_typeof): New fn.
1028 * parse.y (typespec): Use it.
1029 * cp-tree.h: Declare it.
1030
1031 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
1032
1033 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
1034
1035 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
1036
1037 * typeck.c (convert_arguments): Don't handle pmf references
1038 specially.
1039
1040 * init.c (build_member_call): Don't try to convert to the base type
1041 if it's ambiguous or pedantic.
1042
1043 * typeck2.c (check_for_new_type): Only depend on pedantic for
1044 C-style casts.
1045
1046 1998-10-25 Mark Mitchell <mark@markmitchell.com>
1047
1048 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
1049 non-converting constructors.
1050
1051 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
1052
1053 * gxxint.texi: Correct documentation for n, N, Q, and B.
1054
1055 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
1056
1057 * parse.y (condition): Convert VAR_DECL from reference to indirect
1058 reference.
1059
1060 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
1061
1062 * exception.cc (__cp_pop_exception): Free the original exception
1063 value, not the potentially coerced one.
1064
1065 1998-10-23 Mark Mitchell <mark@markmitchell.com>
1066
1067 * Makefile.in (hash.h): Run gperf when necessary.
1068
1069 * cp-tree.h (CP_TYPE_READONLY): Remove.
1070 (CP_TYPE_VOLATILE): Likewise.
1071 (CP_TYPE_QUALS): New macro.
1072 (CP_TYPE_CONST_P): Likewise.
1073 (CP_TYPE_VOLATILE_P): Likewise.
1074 (CP_TYPE_RESTRICT_P): Likewise.
1075 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
1076 (cp_build_type_variant): Rename to ...
1077 (cp_build_qualified_type): New function.
1078 (c_apply_type_quals_to_decl): Declare.
1079 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
1080 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
1081 (cp_type_qual_from_rid): New function.
1082 (compparms): Remove unused parameter. All callers changed.
1083 (cp_type_quals): New function.
1084 (at_least_as_qualified_p): Likewise.
1085 (more_qualified_p): Likewise.
1086
1087 * call.c (standard_conversion): Replace calls to
1088 cp_build_type_variant with cp_build_qualified_type. Use
1089 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
1090 compare them. Use CP_TYPE_* macros to check qualifiers.
1091 (reference_binding): Likewise.
1092 (implicit_conversion): Likewise.
1093 (add_builtin_candidates): Likewise.
1094 (build_over_call): Likewise.
1095 * class.c (overrides): Compare all qualifiers, not just `const',
1096 on method declarations.
1097 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
1098 (convert_pointer_to_real): Likewise.
1099 (type_promotes_to): Likewise.
1100 * decl.c (check_for_uninitialized_const_var): New function.
1101 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
1102 (cp_finish_decl): Use check_for_uninitialized_const_var.
1103 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
1104 handle `restrict'.
1105 (grok_ctor_properties): Likewise.
1106 (grok_op_properties): Likewise.
1107 (start_function): Likewise.
1108 (rever_static_member_fn): Likewise.
1109 * decl2.c (grok_method_quals): Likewise.
1110 (grokfield): Likewise.
1111 * error.c (dump_readonly_or_volatile): Rename to ...
1112 (dump_qualifiers): New function. Handle `restrict'.
1113 (dump_type_real): Use it.
1114 (dump_aggr_type): Likewise.
1115 (dump_type_prefix): Likewise.
1116 (dump_type_suffix): Likewise.
1117 (dump_function_decl): Likewise.
1118 (cv_as_string): Likewise.
1119 * gxx.gperf: Add __restrict and __restrict__.
1120 * gxxint.texi: Document `u' as used for `__restrict', and a few
1121 other previously undocumented codes.
1122 * hash.h: Regenerated.
1123 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
1124 (build_member_call): Likewise.
1125 (build_new_1): Likewise.
1126 * lex.c (init_parse): Add entry for RID_RESTRICT.
1127 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
1128 (cp_type_qual_from_rid): Define.
1129 * lex.h (enum rid): Add RID_RESTRICT.
1130 * method.c (process_modifiers): Deal with `restrict'.
1131 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
1132 * parse.c: Regenerated.
1133 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
1134 (tsubst_aggr_type): Likewise.
1135 (tsubst): Likewise.
1136 (check_cv_quals_for_unify): Likewise.
1137 (unify): Likewise.
1138 * rtti.c (init_rtti_processing): Likewise.
1139 (build_headof): Likewise.
1140 (get_tinfo_var): Likewise.
1141 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
1142 (expand_class_desc): Likewise.
1143 (expand_attr_desc): Likewise.
1144 (synthesize_tinfo_fn): Likewise.
1145 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
1146 (get_matching_virtual): Likewise.
1147 (expand_upcast_fixups): Likewise.
1148 * sig.c (build_signature_pointer_or_reference_name): Take
1149 type_quals, not constp and volatilep.
1150 (build_signature_pointer_or_reference_type): Likewise.
1151 (match_method_types): More CP_TYPE_QUALS conversion, etc.
1152 (build_signature_pointer_constructor): Likewise.
1153 (build_signature_method_call): Likewise.
1154 * tree.c (build_cplus_array_type): Likewise.
1155 (cp_build_type_variant): Rename to ...
1156 (cp_build_qualified_type): New function. Deal with `__restrict'.
1157 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
1158 (build_exception_variant): Likewise.
1159 (mapcar): Likewise.
1160 * typeck.c (qualif_type): Likewise.
1161 (common_type): Likewise.
1162 (comptypes): Likewise.
1163 (comp_cv_target_types): Likewise.
1164 (at_least_as_qualified_p): Define.
1165 (more_qualified_p): Likewise.
1166 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
1167 (compparms): Likewise.
1168 (inline_conversion): Likewise.
1169 (string_conv_p): Likewise.
1170 (build_component_ref): Likewise.
1171 (build_indirect_ref): Likewise.
1172 (build_array_ref): Likewise.
1173 (build_unary_op): Likewise.
1174 (build_conditional_expr): Likewise.
1175 (build_static_cast): Likewise.
1176 (build_c_cast): Likewise.
1177 (build_modify_expr): Likewise.
1178 (convert_For_assignment): Likewise.
1179 (comp_ptr_ttypes_real): Likewise.
1180 (cp_type_quals): New function.
1181
1182 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
1183
1184 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
1185 (CP_TYPE_VOLATILE): Likewise.
1186 * decl.c (grokdeclarator): Use them.
1187 * tree.c (canonical_type_variant): Likewise.
1188
1189 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
1190
1191 * parse.y (named_class_head): Push into class while parsing the
1192 base class list.
1193 * decl2.c (push_scope, pop_scope): New functions.
1194 * cp-tree.h: Declare them.
1195 * init.c (build_new_1): Delay cleanup until end of full expression.
1196
1197 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
1198
1199 * typeck.c (build_component_ref): Use of a type here is an error.
1200
1201 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
1202
1203 Revamp references to member functions.
1204 * method.c (hack_identifier): Call build_component_ref for a
1205 reference to a member function.
1206 * typeck.c (build_component_ref): Only return a single function
1207 if it's static. Otherwise, return a COMPONENT_REF.
1208 (build_x_function_call): Handle a COMPONENT_REF.
1209 (build_unary_op): Handle all unknown-type things.
1210 * decl2.c (arg_assoc): Handle COMPONENT_REF.
1211 * class.c (instantiate_type): Complain if the function we get is a
1212 nonstatic member function. Remove code for finding "compatible"
1213 functions.
1214 * pt.c (tsubst_copy): Handle NOP_EXPR.
1215 * tree.c (build_dummy_object): New fn.
1216 (maybe_dummy_object): New fn.
1217 (is_dummy_object): New fn.
1218 * cp-tree.h: Declare them.
1219 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
1220 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
1221 * init.c (build_member_call): Use maybe_dummy_object and
1222 is_dummy_object.
1223 (build_offset_ref): Use maybe_dummy_object.
1224 (resolve_offset_ref): Use is_dummy_object.
1225 * typeck.c (build_x_function_call): Call build_dummy_object.
1226 (unary_complex_lvalue): Call is_dummy_object.
1227
1228 * typeck.c (build_component_addr): Make sure field is a field.
1229
1230 * call.c (build_new_op): Delete obsolete code.
1231
1232 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
1233
1234 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
1235
1236 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
1237 std if std is ignored.
1238
1239 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1240
1241 * decl.c (grokvardecl): Fix thinko.
1242
1243 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1244 not the left.
1245
1246 * parse.y (fn.def2): Fix 'attrs' format.
1247
1248 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
1249
1250 * Makefile.in (CONFLICTS): Update.
1251 * parse.y (expr_or_declarator_intern): New rule.
1252 (expr_or_declarator, direct_notype_declarator, primary,
1253 functional_cast): Use it.
1254 (notype_declarator_intern): New rule.
1255 (notype_declarator, complex_notype_declarator): Use it.
1256
1257 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
1258
1259 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
1260 (grokvardecl): Likewise.
1261
1262 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1263
1264 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
1265 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
1266
1267 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
1268
1269 * pt.c (process_partial_specialization): Cast 1st argument of
1270 `bzero' to (PTR).
1271
1272 * tree.c (build_base_fields): Cast `base_align' to (int) when
1273 comparing against one.
1274
1275 1998-10-16 Mark Mitchell <mark@markmitchell.com>
1276
1277 * decl.c (lookup_name_real): Handle template parameters for member
1278 templates where said parameters have the same name as the
1279 surrounding class.
1280
1281 * decl.c (expand_static_init): Build cleanups before entering the
1282 anonymous function used to do them to avoid access-checking
1283 confusion.
1284
1285 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
1286 accidentally removed by previous change, and make DECL_RTL here.
1287 * class.c (add_method): Don't make DECL_RTL here.
1288
1289 * pt.c (for_each_template_parm): Don't examine uninstantiated
1290 default arguments.
1291
1292 1998-10-16 Dave Brolley <brolley@cygnus.com>
1293
1294 * lex.c (real_yylex): Fix unaligned access of wchar_t.
1295
1296 1998-10-16 Mark Mitchell <mark@markmitchell.com>
1297
1298 * class.c (add_method): Fix documentation to reflect previous
1299 changes. Check for duplicate method declarations here.
1300 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
1301 correctly; such things never match.
1302 (grokfndecl): Don't look for duplicate methods here.
1303 * decl2.c (check_classfn): Don't assume names are mangled.
1304 Don't add bogus member function declarations to a class before the
1305 class type is complete.
1306 (grokfield): Reformat error message.
1307 * method.c (set_mangled_name_for_decl): Don't mangle names while
1308 procesing_template_decl.
1309
1310 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
1311
1312 * typeck.c (build_indirect_ref): Complain about a pointer to data
1313 member, too.
1314 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
1315 data member.
1316 * init.c (resolve_offset_ref): Don't undo the above.
1317
1318 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
1319 (struct lang_decl_flags): Add `bitfield'.
1320 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
1321 DECL_BIT_FIELD.
1322 * decl2.c (grokbitfield, grok_alignof): Likewise.
1323 * init.c (build_offset_ref): Likewise.
1324 * typeck.c (build_component_addr, expr_sizeof): Likewise.
1325 * cvt.c (build_up_reference): Don't crash if taking the address
1326 returns error_mark_node.
1327
1328 * decl.c (grokfndecl): Also check ctype when checking for ::main().
1329
1330 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
1331
1332 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
1333 Do mangling here.
1334 (grokdeclarator): Instead of here.
1335 * friend.c (do_friend): Lose special handling of ::main and
1336 __builtin_*.
1337 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
1338
1339 * spew.c (yylex): Clear looking_for_typename if we got
1340 'enum { ... };'.
1341
1342 1998-10-15 Mark Mitchell <mark@markmitchell.com>
1343
1344 * class.c (maybe_warn_about_overly_private_class): Improve error
1345 messages for class with only private constructors.
1346
1347 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
1348 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
1349 (build_typename_type): New function.
1350 * decl.c (build_typename_type): Broken out from ...
1351 (make_typename_type): Use it.
1352 * search.c (lookup_field): Likewise.
1353
1354 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
1355
1356 * pt.c (convert_nontype_argument): Check against type_referred_to.
1357 * decl.c (grokvardecl): Check for declarator name before building
1358 DECL_ASSEMBLER_NAME.
1359
1360 1998-10-14 Mark Mitchell <mark@markmitchell.com>
1361
1362 * pt.c (lookup_template_class): Add comment.
1363 (instantiate_class_template): Don't mark the _TYPE node for
1364 member class templates as an instantiation.
1365
1366 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
1367
1368 * decl.c (grokfndecl): Fix my thinko.
1369
1370 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
1371
1372 * tinfo2.cc (fast_compare): Remove.
1373 (before): Just use strcmp.
1374 * tinfo.cc (operator==): Just use strcmp.
1375
1376 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
1377
1378 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
1379 declarations.
1380
1381 1998-10-13 Mark Mitchell <mark@markmitchell.com>
1382
1383 * cp-tree.h (specializations_of_same_template_p): Remove.
1384 * search.c (get_template_base): Don't use it.
1385 (get_template_base_recursive): Likewise.
1386 * pt.c (specializations_of_same_template_p): Remove.
1387 (unify): Don't use it.
1388 (lookup_template_class): Find the correct parent when setting
1389 CLASSTYPE_TI_TEMPLATE.
1390
1391 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
1392
1393 * tinfo.cc (operator==): Always compare names.
1394
1395 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
1396
1397 * decl.c (start_function): Fix cut-and-paste error.
1398
1399 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
1400
1401 * inc/typeinfo: Add #pragma interface.
1402 (operator!=): Just call operator==.
1403 * tinfo.cc: Add #pragma implementation.
1404 (operator==): Move from inc/typeinfo and tinfo2.cc.
1405 Check __COMMON_UNRELIABLE instead of _WIN32.
1406
1407 * typeck2.c (my_friendly_abort): Add URL.
1408
1409 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
1410
1411 * decl.c (start_method): Added extra parameter for attributes.
1412 * cp-tree.h (start_method): Update prototype.
1413 * parse.y (fn.def2): Update start_method parameter list.
1414
1415 1998-10-11 Mark Mitchell <mark@markmitchell.com>
1416
1417 * cp-tree.h (specializations_of_same_template_p): Declare.
1418 * pt.c (specializations_of_same_template_p): New function.
1419 (unify): Use it.
1420 * search.c (get_template_base): Use it.
1421 (get_template_base_recursive): Likewise.
1422
1423 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
1424
1425 * decl2.c (start_objects): Add new variable `joiner' and
1426 initialize it properly.
1427
1428 1998-10-09 Mark Mitchell <mark@markmitchell.com>
1429
1430 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
1431 change to vtable types.
1432
1433 * cvt.c (ocp_convert): Avoid infinite recursion caused by
1434 1998-10-03 change.
1435
1436 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
1437
1438 * pt.c (resolve_overloaded_unification): New fn.
1439 (try_one_overload): Likewise.
1440 (unify): Don't fail on unknown type.
1441 (type_unification_real): Likewise. Use resolve_overloaded_unification
1442 to handle an overloaded argument.
1443 (template_args_equal): Split out...
1444 (comp_template_args): From here.
1445 (determine_specialization): Also allow a template with more
1446 parms than were explicitly specified.
1447 * cp-tree.h: Add template_args_equal.
1448 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
1449
1450 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
1451
1452 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
1453 change.
1454
1455 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
1456
1457 * typeck.c (unsigned_type): Only return TItype nodes when
1458 HOST_BITS_PER_WIDE_INT is >= 64 bits.
1459 (signed_type): Similarly.
1460 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
1461 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1462 (init_decl_processing): Only create TItype nodes when
1463 HOST_BITS_PER_WIDE_INT is >= 64 bits.
1464 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
1465 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
1466
1467 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1468
1469 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
1470 (gxx.gperf): Update comments describing invocation flags.
1471 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
1472
1473 1998-10-07 Mark Mitchell <mark@markmitchell.com>
1474
1475 * class.c (finish_struct_1): Add commentary on prevous change.
1476
1477 * cp-tree.h (vtbl_ptr_type_node): New variable.
1478 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
1479 already of the right type.
1480 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
1481 Simplify code to grow vtable.
1482 * decl.c (vtbl_ptr_type_node): Define.
1483 (init_decl_processing): Initialize it.
1484
1485 1998-10-06 Mark Mitchell <mark@markmitchell.com>
1486
1487 * cp-tree.def (PTRMEM_CST): New tree node.
1488 * cp-tree.h (ptrmem_cst): New type.
1489 (lang_type): Remove local_typedecls.
1490 (dummy): Increase to 12 bits from 11.
1491 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
1492 (PTRMEM_CST_CLASS): New macro.
1493 (PTRMEM_CST_MEMBER): Likewise.
1494 (current_access_specifier): New variable.
1495 (current_class_type): Remove duplicate declaration.
1496 (finish_struct): Change prototype.
1497 (unreverse_member_declarations): New function.
1498 (pushdecl_class_level): Change prototype.
1499 (grok_enum_decls): Remove.
1500 (fixup_anonymous_union): New function.
1501 (grok_x_components): Change prototype.
1502 (tsubst_chain): Remove.
1503 (finish_member_template_decl): Likewise.
1504 (check_explicit_specialization): Fix indentation.
1505 (finish_class_definition): Change prototype.
1506 (finish_member_class_template): Likewise.
1507 (finish_member_declaration): New function.
1508 (check_multiple_declarators): Likewise.
1509 * class.c (class_stack_node_t): New type.
1510 (current_class_base): Remove.
1511 (current_class_stack): Change type.
1512 (current_access_specifier): New variable.
1513 (grow_method): Remove.
1514 (check_member_decl_is_same_in_complete_scope): Break out from
1515 finish_struct.
1516 (make_method_vec): New function.
1517 (free_method_vec): Likewise.
1518 (add_implicitly_declared_members): Break out from finish_struct_1.
1519 (free_method_vecs): New variable.
1520 (add_method): Rework for direct use from parser.
1521 (handle_using_decl): Watch for NULL_TREE while iterating through
1522 CLASSTYPE_METHOD_VEC.
1523 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
1524 just do some error-checking.
1525 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
1526 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
1527 (finish_struct): Change prototype. Simplify; fields and methods
1528 are already set up at this point.
1529 (init_class_processing): Set up current_class_stack.
1530 (pushclass): Save current_access_specifier.
1531 (popclass): Restore it.
1532 (currently_open_class): Simplify.
1533 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
1534 * decl.c (saved_scope): Add access_specifier.
1535 (maybe_push_to_top_level): Save it.
1536 (pop_from_top_level): Restore it.
1537 (maybe_process_template_type_declaration): Use
1538 finish_member_declaration.
1539 (pushtag): Likewise.
1540 (pushdecl_class_level): Don't return a value.
1541 (fixup_anonymous_union): Break out from grok_x_components.
1542 (shadow_tag): Use it.
1543 (xref_tag): Complain about using an elaborated type specifier to
1544 reference a template type parameter or typedef name.
1545 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1546 (current_local_enum): Remove.
1547 (build_enumerator): Call finish_member_declaration.
1548 (grok_enum_decls): Remove.
1549 * decl2.c (grok_x_components): Simplify.
1550 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
1551 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
1552 (merge_functions): Add to comment.
1553 (arg_assoc_type): Prototype.
1554 (arg_assoc): Pass as many arguments as there are parameters.
1555 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
1556 OFFSET_REF.
1557 * expr.c (cpls_expand_expr): Remove dead code. Handle
1558 PTRMEM_CST.
1559 * friend.c (do_friend): Lookup friends when in nested classes.
1560 Change comments.
1561 * init.c (build_offset_ref): Do lookup even for classes that are
1562 only partially defined.
1563 (decl_constant_value): Remove dead code.
1564 * method.c (build_overload_value): Remove hack where by TYPE was
1565 not a TYPE. Handle PTRMEM_CST.
1566 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
1567 should go.
1568 * parse.y (components, notype_components, component_decl,
1569 component_decl_1, component_declarator, component_declarator0):
1570 Now all are itype rather than ttype. Rework to add members to
1571 classes on the fly.
1572 (typesqpecqual_reserved): Use check_multiple_declarators.
1573 (structsp): Update class to finish_class_definition.
1574 (do_xref_defn): Unsplit into named_class_head.
1575 (access_specifier): Set current_access_specifier.
1576 * pt.c (set_current_access_from_decl): New function.
1577 (finish_member_template_decl): Don't take the parameters.
1578 (comp_template_args): Make more robust.
1579 (lookup_template_class): Don't use current_local_enum.
1580 (for_each_template_parm): Handle PTRMEM_CST.
1581 (instantiate_class_template): Use set_current_access_from_decl,
1582 finish_member_declaration and unreverse_member_declarations. Set
1583 lineno/input_filename before generating implicit member functions.
1584 (type_unification_real): Don't assume back-unification happens
1585 only for the last argument.
1586 (regenerate_decl_from_template): Call pushclass a bit earlier.
1587 (tsubst_chain): Remove.
1588 (tsubst_enum): Use set_current_access_from_decl.
1589 (set_mangled_name_for_template_decl): Fix indentation.
1590 * search.c (lookup_fnfields_1): Change iteration through
1591 CLASSTYPE_METHOD_VEC.
1592 (dfs_pushdecls): Likewise.
1593 (dfs_compress_decls): Likewise.
1594 (add_conversions): Likewise.
1595 * semantics.c (finish_class_definition): Don't take components.
1596 Change call to finish_struct.
1597 (finish_member_declaration): New function.
1598 (finish_member_class_template): Don't take template parameters.
1599 Change call to grok_x_components. Call finish_member_template_decl.
1600 (check_multiple_declarators): New function.
1601 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
1602 a passed in fieldlist.
1603 * tree.c (search_tree): Handle PTRMEM_CST.
1604 (mapcar): Likewise.
1605 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
1606 INTEGER_CSTs, for pointer-to-data members.
1607
1608 * call.c (resolve_args): Resolve template specializations, if
1609 possible.
1610
1611 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1612
1613 * Makefile.in (spew.o): Depend on toplev.h.
1614
1615 * call.c (compare_ics): Initialize variables `deref_from_type2',
1616 `deref_to_type1' and `deref_to_type2'.
1617
1618 * except.c (get_eh_type): Hide prototype and definition.
1619 (process_start_catch_block_old): Remove unused static prototype.
1620
1621 * pt.c (tsubst_decl): Initialize variable `argvec'.
1622
1623 * spew.c: Include toplev.h.
1624
1625 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
1626
1627 * pt.c (instantiate_decl): Do save and restore file position.
1628
1629 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
1630
1631 * method.c (build_decl_overload_real): Clear
1632 numeric_output_need_bar after __.
1633
1634 1998-10-05 Nathan Sidwell <nathan@acm.org>
1635
1636 * call.c (build_new_method_call): Issue 'incomplete type' error,
1637 if class is not defined.
1638
1639 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1640
1641 * call.c (build_object_call): Move declaration of variable
1642 `fn' into the scope where it is used. Don't access variable
1643 `fn' when it is uninitialized, instead use `fns'.
1644
1645 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1646
1647 * errfn.c (cp_thing): Print buf as a string not as a printf format
1648 to avoid problems with the operator%. Consequently, `%%' sequences
1649 in format are copied as `%' in buf.
1650
1651 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
1652
1653 * pt.c (pop_tinst_level): Call extract_interface_info.
1654 (instantiate_decl): Don't save and restore file position.
1655
1656 * decl.c (cp_finish_decl): Make statics in extern inlines and
1657 templates common, if possible and the target doesn't support weak
1658 symbols.
1659
1660 * decl.c (grokdeclarator): Remove redundant calls to
1661 build_type_variant and some duplicated code.
1662 * sig.c (build_signature_reference_type): Only take the type parm.
1663 (build_signature_pointer_type): Likewise.
1664 * tree.c (build_cplus_method_type): Adjust.
1665 * cp-tree.h: Update.
1666
1667 1998-10-04 Mark Mitchell <mark@markmitchell.com>
1668
1669 * call.c (build_over_call): Make pedwarns about dropped qualifiers
1670 into full-fledged errors.
1671 * cvt.c (convert_to_reference): Likewise.
1672 * typeck.c (convert_for_assignment): Likewise.
1673
1674 * search.c (expand_upcast_vtables): In addition to unsetting
1675 TREE_READONLY, remove top-level const type qualifier.
1676
1677 1998-10-03 Mark Mitchell <mark@markmitchell.com>
1678
1679 * class.c (current_class_ptr, current_class_ref): Clarify
1680 documentation.
1681 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
1682 NOP type conversions.
1683 * decl.c (decls_match): Use comptypes directly; ignore
1684 qualifiers on the DECL.
1685 (duplicate_decls): Remove qualifier checks on DECL.
1686 (grokdeclarator): Make the type built up include top-level
1687 qualifiers.
1688 * decl2.c (do_dtors): Fix spelling error.
1689 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
1690 when printing type information.
1691 * init.c (build_new_1): Add documentation. Deal with the fact
1692 that type of allocated memory now contains qualifiers.
1693 * lex.c (is_global): Improve error-recovery.
1694 * sig.c (build_member_function_pointer): Don't cast away const
1695 on fields of sigtable_entry_type.
1696 * tree.c (lvalue_type): Don't look at top-level qualifiers on
1697 expressions.
1698 * typeck.c (decay_conversion): Likewise.
1699 (build_component_ref): Make sure the type of the COMPONENT_REF
1700 contains top-level qualifiers, as appropriate. Improve
1701 error-handling.
1702 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
1703 (build_array_ref): Likewise.
1704 (build_unary_op): Improve error-recovery.
1705 (unary_complex_lvalue): Make taking the address a bound member
1706 function an error, not a sorry.
1707 (build_conditional_expr): Look at the type qualifiers, not the
1708 qualifiers on the expression itself.
1709
1710 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
1711
1712 * decl2.c (merge_functions): Remove duplicates.
1713
1714 * decl2.c: Add -f{no-,}implicit-inline-templates.
1715 (import_export_decl): Check it.
1716
1717 * decl.c (lookup_name_real): Template parms also take precedence
1718 over implicit typename. Only warn if yylex.
1719
1720 * typeck.c (build_conditional_expr): Only fold if ifexp is an
1721 INTEGER_CST.
1722
1723 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
1724 instead of linkage.
1725
1726 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
1727
1728 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
1729 * class.c (build_vbase_pointer): Use it.
1730 * rtti.c (expand_class_desc): Likewise.
1731 * tree.c (build_vbase_pointer_fields): Likewise.
1732
1733 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
1734
1735 * decl.c (start_decl): Add invocation of
1736 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1737 (start_function): Add invocation of
1738 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
1739
1740 * lex.c: Replace occurances of HANDLE_SYSV_PRAGMA with
1741 HANDLE_GENERIC_PRAGMAS.
1742
1743 1998-09-28 Anthony Green <green@cygnus.com>
1744
1745 * semantics.c (finish_asm_stmt): Always permit volatile asms.
1746
1747 1998-09-28 Mark Mitchell <mark@markmitchell.com>
1748
1749 * decl.c (grokdeclarator): Tighten checks for invalid
1750 destructors. Improve error-messages and error-recovery.
1751 * decl2.c (check_classfn): Don't assume that mangled destructor
1752 names contain type information.
1753
1754 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
1755
1756 * search.c (get_base_distance): Remove assert.
1757
1758 * decl2.c (build_anon_union_vars): Don't process a field with no
1759 name.
1760 (finish_anon_union): Also complain about local anon unions with no
1761 members.
1762
1763 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
1764
1765 * decl.c (lookup_namespace_name): If the name is a namespace,
1766 return it immediately.
1767
1768 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1769
1770 * cp-tree.h (define_case_label): Remove unused parameter.
1771 (check_java_method): Likewise.
1772 (grokclassfn): Likewise.
1773 (expand_aggr_init): Likewise.
1774 (build_x_delete): Likewise.
1775 (maybe_end_member_template_processing): Likewise.
1776 (unshare_base_binfos): Add prototype.
1777 (string_conv_p): Likewise.
1778 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
1779
1780 * cvt.c (build_up_reference): Remove unused parameter
1781 `checkconst', all callers changed.
1782 (build_type_conversion): Mark parameter `code' with
1783 ATTRIBUTE_UNUSED.
1784 (build_expr_type_conversion): Initialize variable `conv'.
1785
1786 * decl.c (push_namespace): Initialize variable `d'.
1787 (define_case_label): Remove unused parameter `decl', all callers
1788 changed.
1789
1790 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
1791 `argc' with ATTRIBUTE_UNUSED.
1792 (grokclassfn): Remove unused parameter `cname', all callers
1793 changed.
1794 (check_java_method): Likewise for parameter `ctype'.
1795 (copy_assignment_arg_p): Mark parameter `virtualp' with
1796 ATTRIBUTE_UNUSED.
1797 (finish_prevtable_vardecl): Likewise for parameter `prev'.
1798
1799 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
1800
1801 * init.c (expand_aggr_init_1): Remove unused parameter
1802 `alias_this', all callers changed.
1803 (expand_aggr_init): Likewise.
1804 (expand_default_init): Likewise.
1805 (build_new_1): Initialize variable `susp'.
1806 (build_x_delete): Remove unused parameter `type', all callers
1807 changed.
1808
1809 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
1810 ATTRIBUTE_UNUSED.
1811 (readescape): Use (unsigned) value in shift.
1812 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
1813 comparing to a signed quantity.
1814
1815 * pt.c (maybe_end_member_template_processing): Remove unused
1816 parameter `decl', all callers changed.
1817 (check_explicit_specialization): Add braces around empty body in
1818 an else-statement.
1819 (current_template_args): Initialize variable `args'.
1820 (lookup_template_class): Likewise for variable `prev_local_enum'.
1821 (tsubst_decl): Likewise for variable `r'.
1822 (set_mangled_name_for_template_decl): Initialize variable
1823 `context'.
1824
1825 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
1826 Likewise for variable `i'.
1827 (yylex): Initialize variable `trrr'.
1828
1829 * typeck.c (compparms): Mark variable `strict' with
1830 ATTRIBUTE_UNUSED.
1831
1832 * xref.c (simplify_type): Cast argument of ctype function to
1833 `unsigned char'.
1834
1835 1998-09-24 Mark Mitchell <mark@markmitchell.com>
1836
1837 * cp-tree.h (language_lvalue_valid): Remove.
1838 * decl.c (grokdeclarator): Don't disallow references to functions.
1839 * tree.c (lvalue_p_1): New function, combining duplicated
1840 code from ...
1841 (lvalue_p): Use it.
1842 (real_lvalue_p): Likewise.
1843 * typeck.c (language_lvalue_valid): Remove.
1844 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
1845 they don't have TREE_READONLY set.
1846 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
1847
1848 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
1849
1850 * spew.c (yylex): Give diagnostic.
1851 * hash.h (is_reserved_word): Add export.
1852 * gxx.gperf: Ditto.
1853 * lex.h (rid): Add RID_EXPORT.
1854 * lex.c (init_parse): Ditto.
1855
1856 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1857
1858 * friend.c (do_friend): Make warning a full sentence.
1859
1860 1998-09-22 Mark Mitchell <mark@markmitchell.com>
1861
1862 * parse.y (component_decl_list): Improve error-recovery.
1863
1864 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
1865
1866 * decl.c (make_typename_type): Move error to point where name
1867 variable can be used by dump_type.
1868
1869 1998-09-22 Mark Mitchell <mark@markmitchell.com>
1870
1871 * decl.c (grokfndecl): Improve error-recovery.
1872 * decl2.c (grokfield): Likewise.
1873 * pt.c (finish_member_template_decl): Likewise.
1874
1875 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
1876
1877 * method.c (hack_identifier): Finding multiple members is always
1878 an error.
1879
1880 1998-09-21 Per Bothner <bothner@cygnus.com>
1881
1882 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
1883
1884 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
1885
1886 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
1887
1888 1998-09-20 Mark Mitchell <mark@markmitchell.com>
1889
1890 * class.c (maybe_warn_about_overly_private_class): Reformat.
1891
1892 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
1893
1894 * exception.cc (__cplus_type_matcher): realign some code.
1895
1896 1998-09-16 Mark Mitchell <mark@markmitchell.com>
1897
1898 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
1899 (tinfo2.o): Likewise.
1900 (exception.o): Likewise.
1901 (new.o): Likewise.
1902 (opnew.o): Likewise.
1903 (opnewnt.o): Likewise.
1904 (opvnew.o): Likewise.
1905 (opvnewnt.o): Likewise.
1906 (opdel.o): Likewise.
1907 (opdelnt.o): Likewise.
1908 (opvdel.o): Likewise.
1909 (opvdelnt.o): Likewise.
1910
1911 1998-09-16 Richard Henderson <rth@cygnus.com>
1912
1913 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
1914
1915 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
1916
1917 * call.c (build_field_call): handle static data members too
1918
1919 * typeck.c (comptypes): when comparing pointer types, check
1920 whether referred types match even in strictest modes
1921
1922 1998-09-15 Mark Mitchell <mark@markmitchell.com>
1923
1924 * cp-tree.h: Revert previous change.
1925 (finish_struct_methods): Remove declaration.
1926 * class.c: Revert previous change.
1927 (maybe_warn_about_overly_private_class): New function.
1928 (finish_struct_methods): Declare here, and make static. Remove
1929 unnecessary parameters. Tidy slightly. Use
1930 maybe_warn_about_overly_private_class.
1931 (finish_struct_1): Adjust. Remove check for private constructors,
1932 now done elsewhere.
1933 (finish_struct): Adjust.
1934
1935 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
1936
1937 * except.c (expand_start_catch_block): No need to check for new
1938 exception model.
1939 (process_start_catch_block_old): Deleted.
1940 (process_start_catch_block): Add call to start_decl_1().
1941 (expand_end_catch_block): Add call to end_catch_handler().
1942 * exception.cc (__cplus_type_matcher): Only check the exception
1943 language if there is an exception table.
1944
1945 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
1946
1947 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
1948 as used to prevent conflicts with virtual function tables.
1949
1950 1998-09-14 Mark Mitchell <mark@markmitchell.com>
1951
1952 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
1953 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
1954 * class.c (maybe_class_too_private_p): New function.
1955 (finish_struct_methods): Use it.
1956 (finish_struct_1): Likewise.
1957 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
1958 appropriate.
1959
1960 * pt.c (check_specialization_scope): Fix spelling error.
1961 (check_explicit_specialization): Remove code to handle explicit
1962 specializations in class scope; they are now correctly diagnosed
1963 as errors.
1964
1965 1998-09-10 Mark Mitchell <mark@markmitchell.com>
1966
1967 * decl.c (pushdecl): Don't copy types if the
1968 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
1969 type.
1970
1971 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1972
1973 * class.c (get_enclosing_class): New function.
1974 (is_base_of_enclosing_class): Likewise.
1975 * cp-tree.h (get_enclosing_class): Declare.
1976 (is_base_of_enclosing_class): Likewise.
1977 * pt.c (coerce_template_parms): Use them.
1978
1979 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
1980
1981 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
1982 null to decide whether to use it.
1983
1984 * error.c (dump_type_real): Handle NAMESPACE_DECL.
1985 * parse.y (base_class.1): Avoid crash on error.
1986
1987 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
1988
1989 * decl.c (make_typename_type): If context is a namespace, the code
1990 is in error.
1991
1992 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
1993
1994 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
1995
1996 1998-09-08 Mark Mitchell <mark@markmitchell.com>
1997
1998 * cp-tree.h (anonymous_namespace_name): Declare.
1999 * decl.c: Define it.
2000 (push_namespace): Use anonymous_namespace_name, rather than local
2001 static anon_name.
2002 * error.c (dump_decl): If a namespace is named
2003 anonymous_namespace_name, call it {anonymous}.
2004
2005 * decl.c (grokparms): Distinguish between references and pointers
2006 in error message.
2007
2008 1998-09-08 Richard Henderson <rth@cygnus.com>
2009 Mark Mitchell <mark@markmitchell.com>
2010
2011 * pt.c (process_partial_specialization): Consistantly allocate
2012 and zero tpd.parms based on ntparms. Use tpd2.parms, not
2013 tpd.parms, where appropriate.
2014
2015 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
2016
2017 * Makefile.in (INCLUDES): Update after recent toplevel gcc
2018 reorganizations.
2019
2020 1998-09-05 Mark Mitchell <mark@markmitchell.com>
2021
2022 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
2023 * class.c (finish_struct): Remove hackery to deal with explicit
2024 specializations in class scope.
2025 * decl.c (grokfndecl): Improve error-recovery.
2026 * decl2.c (grokfield): Likewise.
2027 * pt.c (check_specialization_scope): New function.
2028 (begin_specialization): Call it.
2029 (process_partial_specialization): New function, split out from
2030 push_template_decl. Check partial specializations more
2031 stringently.
2032 (push_template_decl): Call it.
2033 (check_explicit_specialization): Don't attempt to handle explicit
2034 specializations in class scope.
2035 (template_parm_data): Document. Add current_arg and
2036 arg_uses_template_parms.
2037 (mark_template_parm): Set it.
2038 (tsubst_arg_types): Remove unused variable.
2039 * semantics.c (begin_class_definition): Tweak.
2040
2041 1998-09-04 Mark Mitchell <mark@markmitchell.com>
2042
2043 * inc/typeinfo (type_info::type_info(const char*)): Make
2044 `explicit'.
2045
2046 * cp-tree.h (hash_tree_cons_simple): New macro.
2047 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
2048 (coerce_template_parms): Use make_temp_vec, instead of
2049 make_tree_vec. Document this behavior.
2050 (lookup_template_class): Likewise.
2051 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
2052 Remove dead code (and add ssertion to check its deadness). Fix
2053 bug w.r.t. exception specifications.
2054
2055 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
2056
2057 * decl2.c (import_export_vtable): Always make artificials comdat.
2058 (import_export_decl): Likewise.
2059 * pt.c (mark_decl_instantiated): Likewise.
2060
2061 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2062
2063 * cp-tree.h (finish_globally_qualified_member_call_expr):
2064 Rename to ...
2065 (finish_qualified_call_expr).
2066 * semantics.c: Likewise.
2067 * parse.y (primary): Use it.
2068 * method.c (hack_identifier): Remove redundant code.
2069
2070 * init.c (resolve_offset_ref): Call convert_from_reference to
2071 handle members of reference type. Improve error recovery.
2072
2073 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
2074
2075 * cp-tree.h: Declare warn_nontemplate_friend.
2076 * decl2.c (lang_decode_option): Set.
2077 * lang-options.h: Add -Wnon-template-friend.
2078 * friend.c (do_friend): Use to toggle non-template function warning.
2079
2080 1998-09-03 Mark Mitchell <mark@markmitchell.com>
2081
2082 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
2083 corresponding INTEGER_CSTs when processing_template_decl.
2084 * pt.c (tsubst_enum): Tweak accordingly.
2085
2086 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
2087
2088 * decl.c (pushdecl_class_level): Add warning here.
2089 (pushdecl): Tweak.
2090
2091 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
2092
2093 * cvt.c (convert_pointer_to_real): Tidy.
2094 * search.c (get_base_distance_recursive): Simplify.
2095 (get_base_distance): Likewise.
2096
2097 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
2098 parms.
2099
2100 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
2101
2102 * lex.c (check_newline): Call HANDLE_PRAGMA before
2103 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
2104 if unknown pragmas are encountered.
2105 (handle_sysv_pragma): Interpret return code from
2106 handle_pragma_token (). Return success/failure indication rather
2107 than next unprocessed character.
2108 (pragma_getc): New function: retrieves characters from the
2109 input stream. Defined when HANDLE_PRAGMA is defined.
2110 (pragma_ungetc): New function: replaces characters back into the
2111 input stream. Defined when HANDLE_PRAGMA is defined.
2112
2113 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
2114
2115 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
2116 * class.c (build_vtable_entry_ref): Likewise.
2117
2118 1998-09-01 Mark Mitchell <mark@markmitchell.com>
2119
2120 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
2121 * decl2.c (import_export_decl): Likewise.
2122 * pt.c (instantiate_decl): Use it.
2123
2124 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
2125
2126 * decl.c (lookup_name_real): Also do implicit typename thing for
2127 artificial TYPE_DECLs.
2128 * search.c (lookup_field): Likewise.
2129 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
2130 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
2131 (enter_scope_of): Extract type from implicit typename.
2132 (begin_class_definition): Likewise.
2133 * lex.c (identifier_type): Handle implicit typename when checking
2134 for SELFNAME.
2135
2136 * cp-tree.h: Declare flag_strict_prototype.
2137 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
2138 -fstrict-prototype.
2139 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
2140 specified, set it to the value of pedantic.
2141
2142 1998-09-01 Mark Mitchell <mark@markmitchell.com>
2143
2144 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
2145
2146 1998-08-31 Mark Mitchell <mark@markmitchell.com>
2147
2148 * decl.c (finish_enum): Handle member enums of classes declared in
2149 template functions.
2150
2151 * decl2.c (grok_x_components): Strip attributres before calling
2152 groktypename.
2153
2154 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
2155
2156 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
2157 -fenum-int-equivalence and -fno-nonnull-objects.
2158 * class.c (check_for_override): Remove support for -fall-virtual.
2159 (finish_struct_1): Likewise.
2160 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
2161 * typeck.c (build_binary_op_nodefault): Likewise.
2162 * cvt.c (ocp_convert): Likewise.
2163 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
2164 * class.c (build_vbase_path): Likewise.
2165
2166 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
2167
2168 * Makefile.in (INTERFACE): New, set to 1.
2169
2170 1998-08-30 Mark Mitchell <mark@markmitchell.com>
2171
2172 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
2173 comparing with global_namespace.
2174 (dump_aggr_type): Likewise.
2175
2176 * decl.c (grokfndecl): Issue error on declaration of friend
2177 templates with explicit template arguments.
2178
2179 * pt.c (convert_template_argument): New function, split out
2180 from...
2181 (coerce_template_parms): Here.
2182 (tsubst): Attempt better error-recovery.
2183
2184 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
2185
2186 * pt.c (decl_template_parm_p): Add checks for
2187 TEMPLATE_TEMPLATE_PARM.
2188
2189 1998-08-28 Mark Mitchell <mark@markmitchell.com>
2190
2191 * lex.c (do_identifier): Fix thinko in previous change.
2192
2193 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
2194
2195 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
2196 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
2197
2198 1998-08-28 Richard Henderson <rth@cygnus.com>
2199
2200 Add support for discarding unused virtual functions.
2201 * lang-options.h: Add -fvtable-gc.
2202 * cp-tree.h: Add flag_vtable_gc.
2203 * decl2.c (output_vtable_inherit): New fn.
2204 (finish_vtable_vardecl): Call it.
2205 * class.c (build_vtable_entry_ref): New fn.
2206 (build_vtbl_ref): Call it.
2207
2208 1998-08-28 Mark Mitchell <mark@markmitchell.com>
2209
2210 * cp-tree.h (build_enumerator): Take the enumeration type as a
2211 paramter.
2212 * decl.c (finish_enum): Don't set the TREE_TYPE for the
2213 enumeration constant values if we're processing_template_decls.
2214 Don't set the type for the CONST_DECLs either; that's done in
2215 build_enumerator.
2216 (build_enumerator): Take the enumeration type as a
2217 parameter.
2218 * lex.c (do_identifier): Don't resolve enumeration constants while
2219 processing template declarations, even if they happen to be
2220 TEMPLATE_PARM_INDEXs.
2221
2222 * parse.y (current_enum_type): New variable.
2223 (primary): Don't allow statement-expression in local classes just
2224 as we don't in global classes.
2225 (structsp): Use current_enum_type.
2226 (enum_list): Likewise.
2227 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
2228 finish_enum; they no longer occur.
2229
2230 * cp-tree.h (finish_base_specifier): New function.
2231 * parse.y (base_class): Use it.
2232 * semantics.c (finish_base_specifier): Define it.
2233
2234 * parse.y (structsp): Warn on use of typename outside of template
2235 declarations.
2236
2237 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
2238
2239 * lex.c (handle_cp_pragma): Remove #pragma vtable.
2240 * lang-options.h: Remove +e options.
2241 * decl2.c (lang_decode_option): Likewise.
2242 (import_export_vtable): Don't check write_virtuals.
2243 (finish_vtable_vardecl, finish_file): Likewise.
2244 * search.c (dfs_debug_mark): Likewise.
2245 * semantics.c (begin_class_definition): Likewise.
2246 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
2247
2248 * call.c (build_over_call): Check flag_elide_constructors.
2249 * decl2.c: flag_elide_constructors defaults to 1.
2250 * typeck.c (convert_arguments): Remove return_loc parm.
2251 (build_function_call_real): Adjust.
2252
2253 * search.c: Tear out all mi_matrix and memoize code.
2254 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
2255 * lang-options.h: Remove documentation for -fhandle-exceptions,
2256 -fmemoize-lookups and -fsave-memoized.
2257 * cp-tree.h: Lose mi_matrix and memoize support.
2258 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
2259 * class.c: Lose struct class_level.
2260 (pushclass, popclass): Lose memoize support.
2261 * init.c (build_offset_ref): Likewise.
2262
2263 Never change BINFO_INHERITANCE_CHAIN.
2264 * init.c (emit_base_init): Change modification of
2265 BINFO_INHERITANCE_CHAIN to an assert.
2266 * search.c (get_base_distance_recursive): Likewise.
2267 (get_base_distance): Likewise.
2268 (lookup_member): Likewise.
2269 (convert_pointer_to_single_level): Likewise.
2270 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
2271 (lookup_fnfields): Likewise.
2272 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
2273 (unshare_base_binfos): Don't call propagate_binfo_offsets.
2274 (layout_basetypes): Call propagate_binfo_offsets instead of
2275 unshare_base_binfos.
2276 * decl.c (xref_basetypes): Call unshare_base_binfos.
2277 * pt.c (instantiate_class_template): Likewise.
2278 * tree.c (reverse_path): Remove 'copy' parm; always make a
2279 temporary copy.
2280 * class.c (build_vbase_path): Just call it.
2281 * search.c (compute_access): Likewise. Don't re-reverse.
2282
2283 1998-08-27 Mark Mitchell <mark@markmitchell.com>
2284
2285 * class.c (build_vbase_path): Use reverse_path.
2286 (finish_base_struct): Move warnings for inaccessible bases to
2287 layout_basetypes.
2288 (modify_one_vtable): Remove check of TREE_USED (binfo).
2289 (fixup_vtable_deltas1): Likewise.
2290 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
2291 (xref_tag): Remove binfos parameter.
2292 (make_binfo): Remove chain parameter.
2293 (reverse_path): Add copy parameter.
2294 * decl.c (init_decl_processing): Change calls to xref_tag.
2295 (xref_tag): Remove binfos parameter.
2296 (xref_basetypes): Change calls to make_binfo.
2297 * decl2.c (grok_x_components): Change calls to xref_tag.
2298 (handle_class_head): Likewise.
2299 * friend.c (do_friend): Likewise.
2300 * lex.c (make_lang_type): Change calls to make_binfo.
2301 * parse.y (structsp): Change calls to xref_tag.
2302 (named_complex_class_head_sans_basetype): Likewise.
2303 (named_class_head): Likewise.
2304 * rtti.c (init_rtti_processing): Likewise.
2305 * search.c (compute_access): Change calls to reverse_path.
2306 (dfs_get_vbase_types): Change calls to make_binfo.
2307 (get_vbase_types): Remove dead code.
2308 * tree.c (unshare_base_binfos): Change calls to make_binfo.
2309 (layout_basetypes): Warn here about inaccessible bases.
2310 (make_binfo): Remove chain parameter.
2311 (reverse_path): Add copy parameter.
2312
2313 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
2314
2315 * class.c: #if 0 complete_type_p.
2316 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
2317 * method.c (process_overload_item): Likewise.
2318 * typeck.c (comp_target_types): Likewise.
2319
2320 Stop sharing binfos for indirect virtual bases.
2321 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
2322 (layout_basetypes): Likewise.
2323 (unshare_base_binfos): Copy vbases, too.
2324 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
2325 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
2326 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
2327 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
2328 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
2329 reference to BINFO_VIA_PUBLIC.
2330 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
2331 (push_class_decls): Use them.
2332 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
2333 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
2334
2335 1998-08-27 Mark Mitchell <mark@markmitchell.com>
2336
2337 * decl.c (build_enumerator): Set DECL_CONTEXT for the
2338 CONST_DECLs.
2339
2340 1998-08-26 Mark Mitchell <mark@markmitchell.com>
2341
2342 * cp-tree.h (finish_enum): Change prototype.
2343 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
2344 VALUES parameter. Don't try to compute mins/maxs if
2345 processing_template_decl.
2346 * parse.y (structsp): Use new calling sequence for finish_enum.
2347 * pt.c (tsubst_enum): Likewise. Take the new type as input.
2348 (lookup_template_class): Remove unused variables. Tweak.
2349 Register enums on instantiation list before substituting
2350 enumeration constants.
2351 (tsubst_decl): Remove unused variables.
2352 (regenerate_decl_from_template): Likewise.
2353
2354 * decl.c (duplicate_decls): Don't obliterate the
2355 DECL_TEMPLATE_INFO for a template if we're not replacing it with
2356 anything.
2357
2358 * lex.c (do_identifier): Fix typo in comment.
2359
2360 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2361
2362 * errfn.c: Remove stdarg.h/varargs.h.
2363 * tree.c: Likewise.
2364
2365 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
2366
2367 * pt.c (tsubst_copy): Only do typename overloading on an
2368 IDENTIFIER_NODE that happens to look like a typename if it actually
2369 has a type for us to use.
2370
2371 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
2372
2373 * typeck.c (comp_cv_target_types): Split out...
2374 (comp_target_types): From here. Don't allow cv-qual changes under
2375 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
2376 (build_ptrmemfunc): Pass 1 to nptrs.
2377 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
2378
2379 1998-08-25 Mark Mitchell <mark@markmitchell.com>
2380
2381 * search.c (dependent_base_p): Don't compare a binfo to
2382 current_class_type; use the TREE_TYPE of the binfo instead.
2383
2384 * cp-tree.h (CLASS_TYPE_P): Revise definition.
2385
2386 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
2387
2388 * decl.c (duplicate_decls): Don't complain about different
2389 exceptions from an internal decl even if pedantic.
2390
2391 * typeck.c (convert_for_assignment): Converting from pm of vbase
2392 to derived is an error, not a sorry.
2393
2394 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
2395 * class.c (fixed_type_or_null): Rename from
2396 resolves_to_fixed_type_p. Return the dynamic type of the
2397 expression, if fixed, or null.
2398 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
2399 does not match the static type.
2400 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
2401 resolves_to_fixed_type_p again.
2402
2403 1998-08-24 Mark Mitchell <mark@markmitchell.com>
2404
2405 * pt.c (tsubst_decl): Move special case code for dealing with
2406 tricky friend templates here from ...
2407 (regenerate_decl_from_template): Here.
2408
2409 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
2410
2411 * decl.c (start_decl): Remove redundant linkage check.
2412
2413 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
2414
2415 * typeck.c (c_expand_return): Handle the case that valtype
2416 is wider than the functions return type.
2417
2418 1998-08-24 Mark Mitchell <mark@markmitchell.com>
2419
2420 * cp-tree.h (CLASS_TYPE_P): New macro.
2421 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
2422 * pt.c (process_template_parm): Undo previous change.
2423
2424 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
2425
2426 * cp-tree.h: Declare.
2427 * pt.c (decl_template_parm_p): New function.
2428 * decl.c (pushdecl): Check decls for redeclaring template parms.
2429 (xref_tag): Make redeclaration an error, print decl.
2430 * decl2.c (grokfield): Check field_decls for redeclaration as well.
2431
2432 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
2433
2434 * parse.y (primary): Fix up the type of string constants.
2435
2436 1998-08-24 Mark Mitchell <mark@markmitchell.com>
2437
2438 * typeck.c (convert_for_initialization): Move check for odd uses
2439 of NULL to avoid duplicate warnings.
2440
2441 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
2442
2443 * tree.c (lvalue_type): Fix for arrays.
2444 * typeck.c (string_conv_p): New fn.
2445 (convert_for_assignment): Use it.
2446 (build_unary_op): Use lvalue_type.
2447 * call.c (standard_conversion, convert_like): Use string_conv_p.
2448 (add_function_candidate): Use lvalue_type.
2449 * cvt.c (convert_to_reference): Likewise.
2450 * decl2.c (lang_decode_option): Ignore -traditional.
2451 * decl.c (init_decl_processing): flag_writable_strings inhibits
2452 flag_const_strings.
2453
2454 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
2455
2456 * lang-options.h (lang_options): Add fconst-strings to the list
2457 of valid options.
2458 * decl2.c (lang_f_options, lang_decode_option): Likewise.
2459
2460 1998-08-24 Nathan Sidwell <nathan@acm.org>
2461
2462 * lex.c (real_yylex): Don't warn about long long constants if
2463 we're allowing long long.
2464
2465 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
2466
2467 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
2468 accessing bindings directly.
2469
2470 * search.c (my_tree_cons): Reimplement.
2471
2472 * lang-specs.h: Remove __HONOR_STD.
2473 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
2474
2475 1998-08-23 Mark Mitchell <mark@markmitchell.com>
2476
2477 * decl.c (grokdeclarator): Complain about in-class initialization
2478 of aggregates and/or references.
2479 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
2480 TEMPLATE_TYPE_PARMs.
2481
2482 * decl2.c (grok_array_decl): Add comment.
2483 (mark_used): Don't instantiate an explicit instantiation.
2484 * friend.c (make_friend_class): Remove bogus comment. Fix check
2485 for partial specializations.
2486 * pt.c (check_explicit_specialization): Don't
2487 SET_DECL_EXPLICIT_INSTANTIATION here.
2488 (mark_decl_instantiated): Or here.
2489 (do_decl_instantiation): Do it here, instead. Add checks for
2490 duplicate explicit instantiations, etc. Tidy.
2491 (do_type_instantiation): Likewise.
2492 (instantiate_decl): Improve comments. Complain about explicit
2493 instantiations where no definition is available.
2494
2495 * cp-tree.h (ansi_null_node): Remove.
2496 * call.c (build_over_call): Warn about converting NULL to an
2497 arithmetic type.
2498 * cvt.c (build_expr_type_conversion): Likewise. Use
2499 null_ptr_cst_p instead of expanding it inline.
2500 * decl.c (ansi_null_node): Remove.
2501 (init_decl_processing): Make null_node always have integral type.
2502 * except.c (build_throw): Warn about converting NULL to an
2503 arithmetic type.
2504 * lex.c (init_parse): Remove handling of ansi_null_node.
2505 * pt.c (type_unification_real): Don't convert NULL to void* type.
2506 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
2507 (convert_for_assignment): Warn about converting NULL to an
2508 arithmetic type.
2509 (convert_for_initialization): Likewise.
2510
2511 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
2512
2513 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
2514 * pt.c (coerce_template_parms): Use no_linkage_check.
2515 * decl.c (grokvardecl): Likewise.
2516 (grokfndecl): Likewise. Members of anonymous types have no linkage.
2517
2518 * method.c (process_overload_item): Remove useless code.
2519
2520 1998-08-20 Per Bothner <bothner@cygnus.com>
2521
2522 Handle new'ing of Java classes.
2523 * init.c (build_class_classref): New function.
2524 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
2525 constructor does not return this; don't need to exception-protect.
2526
2527 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
2528 * decl2.c (acceptable_java_type): Handle template-derived types.
2529
2530 1998-08-20 Per Bothner <bothner@cygnus.com>
2531
2532 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
2533
2534 1998-08-20 Mark Mitchell <mark@markmitchell.com>
2535
2536 * decl.c (duplicate_decls): Always merge the old and new patterns
2537 for templates, regardless of whether or not the new one has
2538 DECL_INITIAL. Don't throw away specializations. Merge
2539 DECL_SAVED_TREE.
2540 * pt.c (tsubst_decl): Use the right pattern when calculating the
2541 complete args for a new template instance.
2542 (do_decl_instantiation): Fix typo in comment.
2543 (regenerate_decl_from_template): Deal with tricky friend template
2544 case.
2545 (instantiate_decl): Likewise.
2546
2547 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
2548
2549 * init.c (build_builtin_delete_call): Add missing assemble_external
2550 call.
2551
2552 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
2553
2554 * parse.y (notype_unqualified_id): Also accept ~A<int>.
2555
2556 1998-08-19 Mark Mitchell <mark@markmitchell.com>
2557
2558 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
2559 arithmetic.
2560 * except.c (build_throw): Warn when NULL is thrown, even with
2561 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
2562 thrown expression.
2563
2564 * cp-tree.h (ansi_null_node): New variable.
2565 * decl.c (ansi_null_node): New variable.
2566 (init_decl_processing): Initialize its type.
2567 * lex.c (init_parse): Initialize its value. Use ansi_null_node
2568 for null_node in non-ANSI mode.
2569 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
2570 place of null_node to avoid spurious errors.
2571
2572 1998-08-17 Mark Mitchell <mark@markmitchell.com>
2573
2574 * cp-tree.h (enter_scope_of): New function.
2575 * parse.y (complex_direct_notype_declarator): Use it.
2576 * semantics.c (enter_scope_of): New function.
2577
2578 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
2579
2580 * decl.c (grokparms): No, here.
2581
2582 * decl.c (grokdeclarator): Catch parm with pointer to array of
2583 unknown bound here...
2584 * method.c (process_overload_item): ...not here.
2585
2586 * gxxint.texi: Remove obsolete documentation of overloading code.
2587
2588 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
2589 * class.c (finish_struct_bits): Likewise.
2590
2591 * tree.c (lvalue_type): Fix for arrays.
2592 * typeck.c (build_unary_op): Use lvalue_type.
2593 * call.c (add_function_candidate): Likewise.
2594 * cvt.c (convert_to_reference): Likewise.
2595
2596 * decl2.c (lang_decode_option): Ignore -traditional.
2597
2598 * init.c (build_offset_ref): Don't mess with error_mark_node.
2599 * lex.c (do_scoped_id): Use cp_error.
2600
2601 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
2602
2603 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
2604
2605 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
2606
2607 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
2608
2609 * cp-tree.h (set_identifier_local_value): Provide prototype.
2610
2611 * decl2.c (do_namespace_alias): Remove unused variables `binding'
2612 and `old'.
2613
2614 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
2615
2616 * Makefile.in: Rename BBISON to BISON so that it can be properly
2617 inherited from the parent makefile.
2618
2619 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
2620
2621 * lang-options.h: Add -finit-priority.
2622 * decl2.c: Likewise. Check flag_init_priority instead of
2623 USE_INIT_PRIORITY.
2624
2625 * decl2.c (setup_initp): New fn.
2626 (start_objects, finish_objects, do_ctors): Handle init_priority.
2627 (do_dtors, finish_file): Likewise.
2628
2629 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
2630
2631 * pt.c (tsubst_copy): Hush warning.
2632
2633 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
2634
2635 1998-08-12 Mark Mitchell <mark@markmitchell.com>
2636
2637 * pt.c (print_template_context): Don't abort when instantiating a
2638 synthesized method.
2639
2640 * decl.c (grokdeclarator): Issue errors on namespace qualified
2641 declarators in parameter lists or in class scope.
2642
2643 1998-08-09 Mark Mitchell <mark@markmitchell.com>
2644
2645 * pt.c (check_explicit_specialization): Don't abort on bogus
2646 explicit instantiations.
2647
2648 1998-08-07 Mark Mitchell <mark@markmitchell.com>
2649
2650 * typeck.c (require_complete_type): Use complete_type_or_else.
2651 (complete_type_or_else): Always return NULL_TREE on failure, as
2652 documented.
2653
2654 * pt.c (tsubst_aggr_type): Prototype.
2655 (tsubst_decl): New function, split out from tsubst. Set
2656 input_filename and lineno as appropriate.
2657 (pop_tinst_level): Restore the file and line number saved in
2658 push_tinst_level.
2659 (instantiate_class_template): Set input_filename and lineno as
2660 appropriate.
2661 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
2662 context for a TYPENAME_TYPE is complete.
2663
2664 * decl2.c (grokbitfield): Issue errors on bitfields declared with
2665 function type.
2666 (do_dtors): As in do_ctors, pretend to be a member of the same
2667 class as a static data member while generating a call to its
2668 destructor.
2669
2670 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
2671 conversions, even in complex virtual base class hierarchies.
2672
2673 1998-08-06 Mark Mitchell <mark@markmitchell.com>
2674
2675 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
2676 (TYPE_TEMPLATE_INFO): Likewise.
2677 (SET_TYPE_TEMPLATE_INFO): Likewise.
2678 (ENUM_TI_TEMPLATE): Likewise.
2679 (ENUM_TI_ARGS): Likewise.
2680 (lookup_nested_type_by_name): Remove.
2681 * decl.c (maybe_process_template_type_declaration): Handle enums.
2682 (start_enum): Don't check for primary-template enum declarations
2683 here.
2684 (finish_enum): Clean up, document. Make sure template enum
2685 constants get the correct type.
2686 (build_enumerator): Copy initializers for template enumerations,
2687 too.
2688 (grok_enum_decls): Document.
2689 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
2690 better. Build LOOKUP_EXPRs for local variables, even if they are
2691 TREE_PERMANENT.
2692 * pt.c (tsubst_enum): Remove field_chain parameter.
2693 (template_class_depth): Include the depth of surrounding function
2694 contexts.
2695 (push_template_decl): Check for primary-template enum declarations
2696 here. Deal with enumeration templates.
2697 (lookup_template_class): Likewise.
2698 (for_each_template_parm): Likewise.
2699 (instantiate_class_template): Don't call tsubst_enum directly,
2700 call tsubst instead, to instantiate enums. Deal with all
2701 field_chain issues here, not in tsubst_enum.
2702 (lookup_nested_type_by_name): Remove.
2703 (tsubst_aggr_type): Revise handling of enumeration types.
2704 (tsubst): Likewise.
2705 (tsubst_copy): Likewise.
2706 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
2707
2708 1998-08-04 Mark Mitchell <mark@markmitchell.com>
2709
2710 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
2711 uses template parameters.
2712 * method.c (build_template_parm_names): Use the full set of
2713 template arguments for tsubst'ing.
2714 (build_overload_identifier): Pass the full set of template
2715 arguments to build_template_parm_names, not just the
2716 innermost_args.
2717 * pt.c (TMPL_ARGS_DEPTH): Define using
2718 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
2719 (NUM_TMPL_ARGS): New macro.
2720 (add_outermost_template_args): Deal with the case where the outer
2721 args will be completely discarded.
2722 (coerce_template_parms): Use the full set of template arguments
2723 for tsubst'ing. Simplify. Add some asserts. Improve
2724 error messages.
2725 (lookup_template_class): Pass the full set of template arguments
2726 to coerce_template_parms.
2727 (tsubst): Add assertion.
2728 (do_type_instantiation): Don't instantiate member template
2729 classes.
2730
2731 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
2732 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
2733
2734 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
2735
2736 * method.c (set_mangled_name_for_decl): Change return type to void.
2737
2738 * decl.c (lookup_name_real): A namespace-level decl takes priority
2739 over implicit typename. Avoid doing the same lookup twice.
2740
2741 * search.c (dependent_base_p): New fn.
2742 (dfs_pushdecls, dfs_compress_decls): Use it.
2743
2744 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
2745 virtual functions if the type doesn't have any.
2746
2747 1998-08-03 Mark Mitchell <mark@markmitchell.com>
2748
2749 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
2750 uses template parameters.
2751
2752 1998-08-02 Mark Mitchell <mark@markmitchell.com>
2753
2754 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
2755 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
2756 * lex.c (do_identifier): Don't use a second argument, or a type,
2757 when building LOOKUP_EXPRs.
2758 (do_identifier): Likewise.
2759 (do_scoped_id): Likewise.
2760 * method.c (hack_identifier): Improve error message.
2761 * pt.c (lookup_template_function): Don't needlessly call
2762 copy_to_permanent or build_min.
2763 (tsubst_copy): Remove #if 0'd code. Tsubst into LOOKUP_EXPRs if
2764 necessary.
2765 (do_decl_instantiation): Improve error message.
2766 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
2767 (build_min): Copy the type to the permanent obstack, too.
2768
2769 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
2770
2771 * init.c (init_init_processing): Remove BI* handling.
2772 (build_builtin_call): Remove.
2773 (build_builtin_delete_call): New fn.
2774 (build_delete): Use it.
2775
2776 1998-07-31 Mark Mitchell <mark@markmitchell.com>
2777
2778 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
2779 (maybe_check_template_type): New function.
2780 * decl.c (maybe_process_template_type_declaration): New function,
2781 split out from pushtag Call maybe_check_template_type.
2782 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
2783 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2784 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
2785 * pt.c (template_class_depth_real): Generalization of ...
2786 (template_class_depth): Use it.
2787 (register_specialization): Use duplicate_decls for duplicate
2788 declarations of specializations.
2789 (maybe_check_template_type): New function.
2790 (push_template_decl_real): Fix comment.
2791 (convert_nontype_argument): Likewise.
2792 (lookup_template_class): Likewise. Avoid an infinite loop on
2793 erroneous code.
2794 (tsubst_friend_function): Fix comment.
2795 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
2796 an IDENTIFIER_NODE.
2797 * semantics.c (begin_function_definition): Use
2798 reset_specialization to note that template headers don't apply
2799 directly to declarations after the opening curly for a function.
2800
2801 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
2802
2803 * decl.c (push_overloaded_decl): Use current_namespace instead of
2804 DECL_CONTEXT (decl) to determine where we go.
2805
2806 * decl.c (lookup_name_real): Fix typo.
2807
2808 1998-07-28 Mark Mitchell <mark@markmitchell.com>
2809
2810 * friend.c (is_friend): Be lenient with member functions to deal
2811 with nested friends.
2812
2813 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
2814
2815 * class.c (finish_struct_1): Convert integer_zero_node to
2816 ssizetype before passing it to set_rtti_entry.
2817 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
2818 of any size to a pointer.
2819
2820 1998-07-27 Mark Mitchell <mark@markmitchell.com>
2821
2822 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
2823 (build_template_decl_overload): Remove.
2824 (set_mangled_name_for_decl): New function.
2825 (innermost_args): Remove is_spec parameter.
2826 (most_specialized, most_specialized_class): Remove declarations.
2827 (lookup_template_class): Add entering_scope parameter.
2828 (maybe_process_partial_specialization): New function.
2829 (finish_template_decl): Likewise.
2830 (finish_template_type): Likewise.
2831 * class.c (finish_struct): Clean up processing of member template
2832 specializations.
2833 * decl.c (pushtag): Fix formatting.
2834 (lookup_tag): Improve handling of pseudo-global levels.
2835 (make_typename_type): Adjust call to lookup_template_class.
2836 (shadow_tag): Use maybe_process_partial_specialization.
2837 (xref_tag): Improve handling of member friends.
2838 (start_function): Call push_nested_class before
2839 push_template_decl. Don't call push_template_decl for
2840 specializations.
2841 * decl2.c (grok_x_components): Don't call xref_tag for
2842 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
2843 (grokclassfn): Use set_mangled_name_for_decl.
2844 (arg_assoc_class): Adjust call to innermost_args.
2845 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
2846 * error.c (dump_function_name): Improve printing of template
2847 function names.
2848 * friend.c (is_friend): Don't compare types of decls to determine
2849 friendship, unless flag_guiding_decls.
2850 (make_friend_class): Partial specializations cannot be friends.
2851 (do_friend): Use set_mangled_name_for_decl. Call
2852 push_template_decl_real instead of push_template_decl.
2853 * method.c (build_decl_overload_real): Remove prototype. Give it
2854 external linkage.
2855 (build_overload_identififer): Adjust call to innermost_args.
2856 (build_template_decl_overload): Remove.
2857 (set_mangled_name_for_decl): New function.
2858 * parse.y (.finish_template_type): New non-terminal.
2859 (template_def): Use finish_template_decl. Use template_extdef
2860 instead of extdef.
2861 (template_extdef, template_datadef): New non-terminals, containing
2862 only those rules for things which can be templates.
2863 (datadef): Tidy.
2864 (template_type, self_template_type): Use .finish_template_type.
2865 (named_class_head): Use maybe_process_partial_specialization.
2866 * pt.c (mangle_class_name_for_template): Remove context parameter.
2867 (get_class_bindings): Remove outer_args parameter.
2868 (complete_template_args): Remove.
2869 (add_outermost_template_args): New function.
2870 (register_specialization): Return the specialization.
2871 (unregister_specialization): New function.
2872 (tsubst_template_parms): Likewise.
2873 (most_specialized, most_specialized_class): Prototype here as
2874 static.
2875 (original_template): Rename to most_general_template.
2876 (tsubst_template_parms): New function.
2877 (set_mangled_name_for_template_decl): Likewise.
2878 (TMPL_ARGS_DEPTH): New macro.
2879 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
2880 (TMPL_ARGS_LEVEL): New macro.
2881 (SET_TMPL_ARGS_LEVEL): Likewise.
2882 (TMPL_ARG): Likewise.
2883 (SET_TMPL_ARG): Likewise.
2884 (TMPL_ARGS_DEPTH): Likewise.
2885 (finish_member_template_decl): Use finish_template_decl.
2886 (maybe_process_partial_specialization): New function, split out
2887 from tsubst.
2888 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
2889 (maybe_begin_member_template_processing): Use new macros.
2890 (is_member_template): Likewise.
2891 (is_member_template_class): Likewise.
2892 (add_to_template_args): Likewise. Deal with multiple levels of
2893 args.
2894 (maybe_process_partial_specialization): New function.
2895 (retrieve_specialization): Add consistency check.
2896 (determine_specialization): Return full argument list.
2897 (check_explicit_specialization): Tweak friend handling. Use full
2898 argument lists. Simplify.
2899 (current_template_args): Use new macros.
2900 (push_template_decl_real): Change ill-named mainargs to specargs.
2901 Check that a partial specialization actually specializes at least
2902 one parameter. Improve friend handling. Modify for full
2903 template arguments.
2904 (classtype_mangled_name): Don't mangle the names of
2905 specializations.
2906 (lookup_template_class): Add entering_scope parameter. Use it to
2907 avoid finding a template type when an instantiation is required.
2908 Simplify. Use full template arguments.
2909 (tsubst_friend_function): Use unregister_specialization. Use new
2910 macros. Use full template arguments.
2911 (tsubst_friend_class): Substitute, using tsubst_template_parms,
2912 into the template parameters before passing them to
2913 redeclare_class_template.
2914 (instantiate_class_template): Simplify. Use full template
2915 arguments. Adjust calls to get_class_bindings. Use
2916 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
2917 (innermost_args): Use new macros.
2918 (tsubst_aggr_type): New function, split out from tsubst.
2919 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
2920 conventions for lookup_tmeplate_class. Refine handling of partial
2921 instantiations. Remove calls to complete_template_args.
2922 Simplify. Add consistency checks. Use set_mangled_name_for_decl
2923 and set_mangled_name_for_template_decl.
2924 (tsubst_copy): Use tsubst_aggr_type.
2925 (instantiate_template): Use full template arguments.
2926 (more_specialized): Improve formatting.
2927 (more_specialized_class): Adjust calls to get_class_bindings.
2928 (get_bindings_real): Don't call complete_template_args.
2929 (most_specialized): Don't overwrite input; create a new list.
2930 (most_specialized_class): Use most_general_template.
2931 (regenerate_decl_from_template): Use unregister_specialization.
2932 Use full template arguments.
2933 (instantiate_decl): Use full template arguments.
2934 (set_mangled_name_for_template_decl): New function.
2935 * semantics.c (begin_class_definition): Use
2936 maybe_process_partial_specialization.
2937 (finish_member_class_template): New function.
2938 (finish_template_decl): Likewise.
2939 (finish_template_type): Likewise.
2940 (typeck.c): Don't crash after issuing a compiler_error.
2941 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
2942
2943 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
2944
2945 * typeck2.c (build_functional_cast): Handle default-initialization.
2946
2947 * call.c (build_over_call): Pass 1 to popclass.
2948
2949 * parse.y (direct_notype_declarator): Add precedence declaration
2950 to notype_unqualified_id case.
2951 * Makefile.in (EXPECT): Adjust.
2952
2953 * tree.c (ovl_member): Fix for single function in OVL.
2954
2955 1998-07-27 Dave Brolley <brolley@cygnus.com>
2956
2957 * c-lex.c (yylex): Fix boundary conditions in character literal and
2958 string literal loops.
2959
2960 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
2961
2962 * decl.c (lookup_name_real): OK, do return the from_obj value
2963 unless got_object depends on template parms.
2964
2965 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
2966
2967 * pt.c (coerce_template_parms): Also complain about local enums.
2968
2969 * cp-tree.h: Add prototype for set_identifier_local_value.
2970 * decl.c (set_identifier_local_value_with_scope): Make static,
2971 prototype.
2972 * search.c (covariant_return_p): Likewise.
2973 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
2974
2975 * call.c (build_method_call): Only pull out the type of a destructor
2976 if it's a template type parm.
2977 * decl.c (lookup_name_real): Never return the from_obj value.
2978
2979 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
2980
2981 * except.c (process_start_catch_block_old): Call start_decl_1 for
2982 catch parm.
2983 * decl.c (start_decl_1): Avoid duplicate error.
2984
2985 * init.c (expand_default_init): Only perform the initialization if
2986 it will do something.
2987
2988 1998-07-23 H.J. Lu (hjl@gnu.org)
2989
2990 * parse.y (base_class): Check for invalid base class.
2991
2992 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
2993
2994 * decl2.c (import_export_template): Fold in...
2995 (import_export_class): ...to here. Handle dllimport/export.
2996
2997 * class.c (build_vtable): Pass at_eof to import_export_vtable.
2998 (prepare_fresh_vtable): Likewise.
2999 * decl2.c (import_export_class): Split out...
3000 (finish_prevtable_vardecl): From here.
3001 * class.c (finish_struct_1): Call import_export_class if at_eof.
3002
3003 * decl.c (start_function): #if 0 mysterious code I wrote and have
3004 forgotten why.
3005 * rtti.c (get_tinfo_fn): If this is for a class type, set
3006 DECL_CONTEXT.
3007
3008 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
3009
3010 * inc/exception: Change terminate and unexpected to ().
3011
3012 * parse.y (named_class_head_sans_basetype_defn): A
3013 named_class_head_sans_basetype followed by '{' or ':' is a defn.
3014
3015 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
3016
3017 * tree.c (canonical_type_variant): New fn to handle arrays.
3018 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
3019 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
3020 * method.c (process_overload_item): Use build_overload_value for
3021 arrays.
3022
3023 1998-07-20 Dave Brolley <brolley@cygnus.com>
3024
3025 * lex.c (mbchar.h): #include it.
3026 (GET_ENVIRONMENT): New macro.
3027 (init_parse): Set character set based on LANG environment variable.
3028 (real_yylex): Handle multibyte characters in character literals.
3029 (real_yylex): Handle multibyte characters in string literals.
3030
3031 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
3032
3033 * lex.c (do_identifier): Look for class value even if we don't
3034 have a global value. Do implicit declaration if parsing is 2.
3035 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
3036 lookup.
3037
3038 1998-07-19 Mark Mitchell <mark@markmitchell.com>
3039
3040 * decl.c (pushtag): Revert previous change.
3041 * pt.c (lookup_template_class): Don't put out debugging
3042 information for types that use template parameters.
3043
3044 * decl.c (pushtag): Don't put out debugging information for
3045 compiler-generated typedefs.
3046
3047 * error.c (dump_type_real): Don't crash when presented with
3048 intQI_type_node or the like.
3049
3050 * semantics.c (finish_translation_unit): Fix spelling error in
3051 comment.
3052
3053 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
3054
3055 * decl.c (lookup_name_real): Pull out single function here.
3056 (select_decl): Not here.
3057 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
3058
3059 * decl.c (qualify_lookup): Tweak again.
3060
3061 * pt.c (lookup_template_class): Don't mess with the context of the
3062 instantiation.
3063 * decl2.c (current_decl_namespace): Remove special handling for
3064 templates.
3065
3066 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
3067 a member template specialization.
3068
3069 * tree.c (ovl_member): Use decls_match to compare functions.
3070 * decl.c (decls_match): Check the context of a function.
3071
3072 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
3073 in Koenig lookup support rules.
3074 * semantics.c (finish_call_expr): Handle the new cases.
3075
3076 * typeck.c (build_x_function_call): Handle overloaded methods.
3077
3078 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
3079
3080 1998-07-16 Mark Mitchell <mark@markmitchell.com>
3081
3082 * semantics.c (finish_object_call_expr): Revert previous change.
3083 * call.c (build_new_method_call): Likewise. Instead, convert
3084 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
3085
3086 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
3087
3088 * decl.c (qualify_lookup): Handle templates.
3089
3090 * decl2.c (do_using_directive): Don't pass ancestor.
3091 * decl.c (push_using_directive): Calculate ancestor.
3092
3093 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
3094 * decl.c (pushdecl): Move type shadowing handling from here...
3095 (duplicate_decls): ...to here.
3096 * decl.c (set_identifier_local_value_with_scope): New fn.
3097 (pushdecl): Use it.
3098 (set_identifier_local_value, lookup_type_current_level): New fns.
3099 * decl2.c (do_local_using_decl): Handle types and binding level
3100 stuff properly.
3101
3102 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
3103 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
3104 (lookup_namespace_name): Likewise.
3105 * typeck.c (build_unary_op): Not here anymore.
3106
3107 * decl2.c (do_class_using_decl): Make sure we get an identifier.
3108 * class.c (handle_using_decl): Ignore TYPE_DECLs.
3109
3110 * decl.c (qualify_lookup): New fn.
3111 (lookup_name_real): Use it.
3112
3113 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
3114
3115 * decl2.c (add_using_namespace): When directly using a namespace
3116 that was indirect before, promote it.
3117
3118 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
3119 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
3120 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
3121 * decl.c (select_decl): Replace two flag parameters by one.
3122 (unqualified_namespace_lookup): Likewise, pass flag.
3123 (lookup_flags): New function.
3124 (lookup_name_real): Compute flags, pass them.
3125 (lookup_namespace_name): Call with zero-flag.
3126 * decl2.c (ambiguous_decl): Add flag parameter, complain only
3127 according to flags.
3128 (lookup_using_namespace, qualified_lookup_using_namespace):
3129 Add flag parameter, pass them through.
3130 * lex.c (do_scoped_id): Call with zero-flag.
3131
3132 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
3133
3134 * typeck.c (convert_for_assignment): Use comptypes.
3135
3136 1998-07-16 Mark Mitchell <mark@markmitchell.com>
3137
3138 * semantics.c (finish_object_call_expr): Move test for the
3139 function called being a TYPE_DECL to ...
3140 * call.c (build_new_method_call): Here.
3141
3142 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
3143
3144 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
3145 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
3146
3147 * lex.c (looking_for_typename): Don't initialize.
3148
3149 * decl2.c (ambiguous_decl): Clarify error message.
3150
3151 * decl.c (push_using_directive): Iterate over namespaces used
3152 indirectly.
3153
3154 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3155
3156 * decl2.c (add_using_namespace): Iterate over namespaces used
3157 indirectly.
3158
3159 * decl.c (lookup_name_real): Accept namespace aliases as locals.
3160 (cat_namespace_levels): Ignore aliases.
3161 (duplicate_decls): Ignore duplicate aliases.
3162 * decl2.c (do_namespace_alias): Process block level namespace
3163 aliases. Store alias with pushdecl. Remove odr errors.
3164 * parse.y (namespace_alias): New non-terminal.
3165 (extdef): Use it.
3166
3167 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
3168
3169 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
3170 Handle TEMPLATE_TYPE_PARM.
3171 (arg_assoc): Rewrite.
3172
3173 * pt.c (complete_template_args): Don't look at the context unless
3174 we have to.
3175
3176 * method.c (build_decl_overload_real): Fix namespace handling.
3177
3178 * typeck.c (build_unary_op): Extract a lone function from an
3179 OVERLOAD.
3180
3181 * call.c (build_scoped_method_call): Handle getting a namespace
3182 for basetype in a destructor call.
3183 (check_dtor_name): Handle enums.
3184
3185 * parse.y (using_directive): New nonterminal.
3186 (extdef, simple_stmt): Use it.
3187
3188 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3189
3190 * decl2.c (add_function): Move error message ...
3191 (arg_assoc_namespace): ... from here.
3192
3193 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
3194
3195 * parse.y (namespace_qualifier): Fix multiple level handling.
3196 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
3197 (arg_assoc): Don't skip the first argument of a function.
3198
3199 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
3200
3201 * search.c (my_tree_cons): Clean up.
3202
3203 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
3204
3205 * call.c (joust): Don't warn about "confusing" conversions to the
3206 same type.
3207
3208 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
3209
3210 * class.c (push_nested_class): Complain about namespaces.
3211 * decl.c (start_decl): Enter the object's namespace.
3212 (cp_finish_decl): Leave it.
3213 (grokdeclarator): Likewise.
3214 * decl2.c (check_decl_namespace): New function.
3215 (finish_file): Call it.
3216 * parse.y (complex_direct_notype_declarator): Set complexity
3217 of namespace-qualified ids to -1, enter the namespace.
3218
3219 * method.c (build_template_decl_overload): Expect _DECL as first
3220 parameter. Put context temporarily into current_namespace.
3221 * pt.c (check_explicit_specialization): Change caller.
3222 (tsubst): Likewise.
3223
3224 * init.c (build_offset_ref): Call mark_used and
3225 convert_from_reference for namespace members.
3226
3227 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
3228
3229 * search.c (my_tree_cons): The bitfield is at index 2.
3230
3231 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
3232
3233 * lang-options.h: Format changed to work with new --help support
3234 in gcc/toplev.c
3235
3236 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3237
3238 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
3239 Do Koenig lookup in CALL_EXPR.
3240 (arg_assoc): Handle error_mark.
3241 * lex.c (is_global): New function.
3242 (do_identifier): Expect arguments for Koenig lookup.
3243 * parse.y (primary): Add rules for calls of unqualified function calls.
3244 (do_id): Change call of do_identifier.
3245 * pt.c (finish_stmt_expr): Likewise.
3246 * semantics.c (finish_id_expr): Likewise.
3247 (finish_call_expr): Add integer parameter to indicate
3248 argument-dependent lookup.
3249
3250 * decl.c (struct binding_level): New field using_directives.
3251 (push_using_decl): Not sorry anymore.
3252 (push_using_directive): New function.
3253 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
3254 (unqualified_namespace_lookup): New function, code from ...
3255 (lookup_name_real): ... here.
3256 * decl2.c (lookup_using_namespace): Pass using list instead of
3257 initial scope.
3258 (validate_nonmember_using_decl): New function.
3259 (do_nonmember_using_decl): New function.
3260 (do_toplevel_using_decl): Use them.
3261 (do_local_using_decl): New function.
3262 (do_using_directive): Support block-level directives.
3263 * parse.y (simple_stmt): Support using declarations and
3264 directives.
3265 (namespace_qualifier, namespace_using_decl): New non-terminals.
3266
3267 * xref.c (classname): New function.
3268 (GNU_xref_hier): Change class and base parameters to tree.
3269 * decl.c (xref_baseypes): Change caller.
3270 * friend.c (make_friend_class): Likewise.
3271
3272 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3273
3274 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
3275 comparison.
3276
3277 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
3278 template template parameter, record its use.
3279 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
3280 its template arguments if exists.
3281
3282 * pt.c (coerce_template_template_parms): New function equivalent
3283 to coerce_template_parms when IS_TMPL_PARM is true.
3284 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
3285 all callers changed.
3286
3287 (coerce_template_parms): Access ARGLIST properly when creating a
3288 new vector. Only accept implicit TYPE_DECL as valid argument for
3289 a template template parameter when it is a base class of
3290 current_class_type. Don't display error message when COMPLAIN is
3291 false.
3292
3293 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
3294
3295 * repo.c (get_base_filename): Use file_name_nondirectory.
3296 (open_repo_file): Ditto.
3297 * cp-tree.h (file_name_nondirectory): Add prototype.
3298
3299 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
3300
3301 * friend.c (do_friend): Pull the identifier out of declarator.
3302 Use cp_error and friends.
3303 * decl2.c (qualified_lookup_using_namespace): Fix call to
3304 purpose_member.
3305 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
3306 (grokvardecl): Use DECL_CLASS_SCOPE_P.
3307 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
3308 * class.c (warn_hidden): Fix for OVERLOAD.
3309 From grahams@rcp.co.uk:
3310 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
3311 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
3312
3313 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
3314
3315 * g++.1 (-traditional): Remove duplicated documentation.
3316
3317 1998-07-11 Mark Mitchell <mark@markmitchell.com>
3318
3319 * method.c (flush_repeats): Add nrepeats parameter.
3320 (issue_nrepeats): Likewise.
3321 (is_back_referenceable_type): New function. Don't back-reference
3322 TEMPLATE_TYPE_PARMs as well as simple types like integers.
3323 (build_mangled_name_for_type): Likewise.
3324 (build_mangled_name_for_type_with_Gcode): Likewise.
3325 (lasttype): Remove.
3326 (nrepeats): Likewise.
3327 (Nrepeats): Likewise.
3328 (start_squangling): Don't clear the variables removed above.
3329 (end_squangling): Likewise.
3330 (flush_repeats): Tidy. Use nrepeats parameter rather than
3331 Nrepeats global.
3332 (issue_nrepeats): Likewise, but with nrepeats global. Use
3333 is_backreferenceable_type.
3334 (build_overload_nested_name): Tidy. Add comment. Use
3335 build_mangled_name_for_type.
3336 (build_underscore_int): Comment.
3337 (build_overload_scope_ref): Use build_mangled_name_for_type.
3338 (build_overload_int): Likewise.
3339 (build_template_template_parm_names): Tidy.
3340 (build_template_parm_names): Use build_mangled_name_for_type.
3341 (build_overload_identifier): Add comments.
3342 (build_mangled_name_for_type_with_Gcode): Split out from
3343 build_mangled_name.
3344 (build_mangled_name_for_type): Use it.
3345 (build_mangled_name): Rework to use build_mangled_name_for_type
3346 and to not use global nrepeats/Nrepeats. Tidy.
3347 (process_modifiers): Tidy.
3348 (check_btype): Use is_backreferenceable_type. Add comment.
3349 Rename `node' to `type'.
3350 (process_overload_item): Set numeric_output_need_bar here.
3351 Use build_mangled_name_for_type. Tidy.
3352 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
3353 build_mangled_name_for_type.
3354
3355 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
3356 for TYPE_DECLs.
3357
3358 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
3359
3360 * cp-tree.h (warn_long_long): Define.
3361 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
3362 warning "ANSI C++ does not support `long long'".
3363 * decl2.c (warn_long_long): Define.
3364 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
3365
3366 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
3367
3368 * decl.c (xref_tag): Handle attributes between 'class' and name.
3369 * parse.y (aggr): Likewise.
3370 * semantics.c (finish_class_definition): Likewise.
3371 * Makefile.in (EXPECTED): Adjust.
3372
3373 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
3374 * decl2.c: Define them.
3375 (lang_decode_option): Handle them.
3376 * lang-options.h: Add -foptional-diags.
3377 * class.c (finish_struct): Don't complain about multiple meanings of
3378 name if -fno-optional-diags.
3379 * decl.c (pushdecl_class_level): Likewise.
3380 * lex.c (real_yylex): Check warn_multichar.
3381
3382 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
3383
3384 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
3385
3386 * tree.c (make_binfo): Fix length.
3387
3388 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
3389
3390 * decl2.c (lang_decode_option): Remove warn_template_debugging.
3391 * lang-options.h: Ditto.
3392
3393 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3394
3395 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
3396 (process_start_catch_block): Likewise for variables
3397 `false_label_rtx', `call_rtx' and `return_value_rtx'.
3398
3399 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
3400
3401 * tree.c (build_srcloc): Make sure we allocate this node on the
3402 permanent obstack.
3403
3404 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
3405
3406 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
3407 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
3408 (lang_specific_driver): Only add -lm automatically if need_math is
3409 nonzero.
3410
3411 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
3412
3413 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
3414
3415 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3416
3417 * Makefile.in (EXPR_H): New dependency variable.
3418 (decl2.o): Depend on $(EXPR_H).
3419 (typeck.o): Likewise.
3420 (init.o): Likewise.
3421 (expr.o): Likewise.
3422
3423 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
3424
3425 * decl.c (start_enum): Put local enums on permanent_obstack.
3426
3427 1998-06-25 Mark Mitchell <mark@markmitchell.com>
3428
3429 * cp-tree.h (c_get_alias_set): Declare.
3430 * decl.c (init_decl_processing): Set lang_get_alias_set.
3431
3432 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
3433
3434 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
3435 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
3436 flag for all function decls which are in the exception table.
3437 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
3438 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
3439 code is emitted for any referenced rtti function.
3440
3441 1998-06-25 Dave Brolley <brolley@cygnus.com>
3442
3443 * lang-specs.h: Use new | syntax to eliminate
3444 string concatenation.
3445
3446 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
3447
3448 * cp-tree.h (CP_DECL_CONTEXT): New macro.
3449 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
3450 * method.c (build_overload_nested_name): Likewise.
3451 * sig.c (build_signature_pointer_or_reference_type): Don't set
3452 DECL_CONTEXT.
3453
3454 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3455
3456 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
3457 * cp-tree.h (FROB_CONTEXT): New macro.
3458 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
3459 * decl.c (namespace_binding): Replace NULL_TREE with
3460 global_namespace.
3461 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
3462 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
3463 Likewise.
3464 * decl.c (pushtag): Use FROB_CONTEXT.
3465 (pushdecl, make_typename_type, define_function, grokdeclarator):
3466 Likewise.
3467 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
3468 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
3469 Likewise.
3470 * decl2.c (decl_namespace): Return global_namespace if no context.
3471 * method.c (build_overload_nested_name): Expect null as context.
3472 * pt.c (mangle_class_name_for_template): Do nothing for null
3473 contexts.
3474 (lookup_template_class): Allow for null id_context.
3475
3476 1998-06-25 Richard Henderson <rth@cygnus.com>
3477
3478 * method.c (emit_thunk): Set current_function_is_thunk for the
3479 ASM_OUTPUT_MI_THUNK case as well.
3480
3481 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
3482
3483 * exception.cc (__cplus_type_matcher): Get a match_info pointer
3484 instead of an exception table entry as a parameter.
3485
3486 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
3487
3488 * parse.y (function_try_block): Don't call start_catch_handler.
3489 * except.c (call_eh_info): Remove coerced field from declaration.
3490 (build_eh_type_type_ref): New function to create an address of a
3491 rtti function for the new style exception tables.
3492 (expand_start_catch_block): Split function, this contains the
3493 common part.
3494 (process_start_catch_block_old): New function to perform the rest
3495 of expand_start_catch_block under old style exceptions.
3496 (process_start_catch_block_old): New function to perform the rest
3497 of expand_start_catch_block under new style exceptions.
3498 (expand_end_catch_block): Only pop the false label off the stack under
3499 the old style of exceptions.
3500 * semantics.c (finish_try_block): Don't call start_catch_handler.
3501 * exception.cc (struct cp_eh_info): Add original_value field.
3502 (__cplus_type_matcher): Perform type matching on the original exception
3503 value, and if we have a match, set the current value.
3504 (__cp_push_exception): Set the original expcetion value.
3505
3506 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
3507
3508 * call.c (joust): Fix confusing conversion warning.
3509
3510 * call.c (build_op_delete_call): Add placement parm. Check
3511 LOOKUP_SPECULATIVELY.
3512 * cp-tree.h, decl2.c, init.c: Adjust.
3513 * decl.c (finish_function): Use it.
3514
3515 * pt.c (tsubst): Diagnose creating void fields or variables.
3516
3517 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3518
3519 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
3520
3521 * cp-tree.h (check_dtor_name): Add prototype.
3522
3523 * init.c (expand_member_init): Remove unused variables
3524 `ptr_type_node', `parm' and `rval'.
3525
3526 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
3527 in call to fprintf.
3528 (lang_print_xnode): Likewise.
3529
3530 * typeck2.c (enum_name_string): Cast argument to sprintf to long
3531 and use %ld specifier.
3532
3533 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
3534 specifier in call to fprintf.
3535 (GNU_xref_member): Cast argument to sprintf to int.
3536
3537 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
3538
3539 * typeck2.c (pop_init_level): Warn about implicit zero initialization
3540 of struct members.
3541
3542 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3543
3544 * cp-tree.h: Prototype function `check_java_method'.
3545
3546 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
3547
3548 * class.c (finish_struct): Make conflicting use of id a pedwarn.
3549 * decl.c (pushdecl_class_level): Likewise.
3550
3551 1998-06-17 Mark Mitchell <mark@markmitchell.com>
3552
3553 * pt.c (convert_nontype_argument): Issue an error when presented
3554 with an integer (real) constant that cannot be simplified to an
3555 INT_CST (REAL_CST).
3556
3557 * cp-tree.h (c_get_alias_set): Remove declaration added in
3558 1998-06-13 change that should never have been checked in.
3559
3560 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
3561
3562 * typeck.c (build_binary_op_nodefault): Change % in format strings
3563 to %%.
3564
3565 * decl.c (grokvardecl): Don't build_static_name for decls that
3566 aren't at namespace scope.
3567
3568 * init.c (perform_member_init): Catch default-initialization of
3569 references.
3570
3571 1998-06-17 Mark Mitchell <mark@markmitchell.com>
3572
3573 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
3574
3575 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
3576
3577 * method.c (hack_identifier): Complain about getting a namespace
3578 or class template.
3579 * typeck.c (decay_conversion): Remove check for namespaces.
3580 * typeck2.c (incomplete_type_error): Likewise.
3581 * parse.y (template_arg): Add PTYPENAME expansion.
3582
3583 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
3584
3585 * decl.c (grokvardecl): Don't build external assembler names for
3586 TYPENAMEs in other namespaces as there is no declarator.
3587 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
3588 info from DECL_CONTEXT if it is NULL.
3589
3590 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
3591
3592 * call.c (check_dtor_name): Split out.
3593 (build_scoped_method_call): Use it.
3594 (build_method_call): Use it.
3595 * init.c (build_offset_ref): Use it.
3596
3597 * typeck.c (build_static_cast): Fix handling of pointers to members.
3598
3599 * decl.c (finish_function): Just return nothing from a constructor.
3600 * typeck.c (c_expand_return): Complain about returning a void
3601 expression from a destructor.
3602
3603 1998-06-13 Mark Mitchell <mark@markmitchell.com>
3604
3605 * class.c (alter_access): Accept a BINFO explaining how to get
3606 from the entity whose accessed is being altered to the type doing
3607 the altering.
3608 (handle_using_decl): New function containing code split out from ...
3609 (finish_struct_1): Here.
3610
3611 * cp-tree.h (complete_type_or_else): Declare.
3612 * init.c (build_new_1, build_delete): Use it.
3613 * typeck.c (require_complete_type): Use complete_type, rather than
3614 expanding it inline.
3615 (complete_type_or_else): New function.
3616 (build_component_ref): Use it.
3617 (pointer_int_sum): Make sure the type pointed to is complete.
3618 (pointer_diff): Likewise.
3619
3620 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
3621 types.
3622
3623 * search.c (get_matching_virtual): Note that member templates
3624 cannot override virtual functions.
3625
3626 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
3627
3628 * pt.c (check_explicit_specialization): If DECLARATOR turned into
3629 an error_mark_node from lookup_template_function, return the same.
3630 (determine_specialization): Also make sure TEMPLATE_ID isn't an
3631 error_mark_node, before we try to read its operands.
3632 * decl.c (grokdeclarator): If we got an error_mark_node from
3633 check_explicit_specialization, just return it right back.
3634
3635 1998-06-12 Mark Mitchell <mark@markmitchell.com>
3636
3637 * class.c (instantiate_type): Don't treat template-ids that don't
3638 specify any template arguments as equivalent to ordinary
3639 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
3640 pointer-to-members for member templates. Tidy slightly.
3641 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
3642 * init.c (build_offset_ref): Handle template-ids like ordinary
3643 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
3644 offset part of the OFFSET_REF.
3645 * typeck.c (build_unary_op): Change check for unknown types to
3646 look for OFFSET_REFs, not SCOPE_REFs.
3647
3648 1998-06-11 Mark Mitchell <mark@markmitchell.com>
3649
3650 * pt.c (is_member_template_class): New function.
3651 (push_template_decl_real): Use it.
3652
3653 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
3654
3655 * friend.c (do_friend): Add support for nested classes using
3656 member functions of the enclosing class as friends.
3657
3658 1998-06-10 Mark Mitchell <mark@markmitchell.com>
3659
3660 * call.c (convert_default_arg): Make global, not static.
3661 (convert_arg_for_ellipsis): Split out from ...
3662 (build_over_call): Here.
3663 * cp-tree.h (convert_default_arg); Declare.
3664 (convert_arg_to_ellipsis): Likewise.
3665 (do_member_init): Remove.
3666 * init.c (do_member_init): Remove; this code is dead.
3667 (expand_member_init): Remove much of this code; it is dead.
3668 * typeck.c (convert_arguments): Use convert_default_arg and
3669 convert_arg_for_ellipsis, rather than duplicating here.
3670
3671 * call.c (convert_like): Don't fail silently if
3672 build_user_type_conversion fails. Always return error_mark_node
3673 for failure.
3674
3675 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
3676
3677 * search.c (covariant_return_p): Complain about ambiguous base.
3678
3679 * typeck.c (build_component_ref): Diagnose ref to nested type.
3680
3681 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
3682
3683 * decl.c (grokparms): Check that INIT isn't an error_mark_node
3684 before giving error about invalid type for default arg.
3685
3686 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
3687
3688 * call.c (build_method_call): Fix thinko.
3689
3690 1998-06-10 Dave Brolley <brolley@cygnus.com>
3691
3692 * decl2.c (lang_decode_option): New argc/argv interface.
3693 * cp-tree.h (lang_decode_option): New argc/argv interface.
3694 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
3695 specified for cpplib-enabled compilers.
3696 * lex.c (lang_init): Don't check_newline for cpplib.
3697 (init_parse): Don't initialize cpplib here.
3698
3699 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
3700
3701 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
3702 piece before checking DECL_MUTABLE_P.
3703
3704 1998-06-10 John Carr <jfc@mit.edu>
3705
3706 * tree.c (debug_binfo): Make printf format match arguments.
3707
3708 * error.c (OB_PUTI): Make printf format match arguments.
3709
3710 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
3711
3712 * init.c (perform_member_init): Handle default-initialization.
3713
3714 * except.c (build_throw): Handle throwing NULL.
3715
3716 * typeck.c (build_x_function_call): Use resolve_offset_ref.
3717
3718 * search.c (compute_access): Only strip an anonymous union
3719 for a FIELD_DECL.
3720
3721 * call.c (add_builtin_candidates): Tweak.
3722
3723 * cvt.c (build_expr_type_conversion): Restore code for conversion
3724 from class types.
3725 * decl2.c (delete_sanity): Use it. Clean up.
3726
3727 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
3728
3729 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
3730
3731 * typeck.c (c_expand_return): Don't warn about void expressions on
3732 return statements in functions returning void.
3733
3734 1998-06-09 Mark Mitchell <mark@markmitchell.com>
3735
3736 * pt.c (fn_type_unification): Revise documentation. Tidy.
3737 (type_unification): Likewise.
3738
3739 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
3740
3741 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
3742 expand_end_catch.
3743 * parse.y (function_try_block): Rename expand_start_catch, and delete
3744 expand_end_catch.
3745 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
3746 expand_end_catch.
3747
3748 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
3749
3750 * search.c (lookup_member): New fn.
3751 * class.c (finish_struct_1): Use it.
3752 * decl.c (lookup_name_real): Use it.
3753
3754 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3755
3756 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
3757
3758 * cp-tree.h: Add prototype for `maybe_print_template_context' and
3759 `maybe_make_one_only'.
3760
3761 * decl.c (auto_function): Remove unused variable `decl'.
3762
3763 * decl2.c: Include dwarf2out.h and dwarfout.h.
3764
3765 * lex.c: Remove redundant declarations of `set_float_handler' and
3766 `asm_out_file'.
3767
3768 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
3769
3770 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
3771 time flag. Call __cp_eh_info instead of __cp_exception_info.
3772 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
3773 (__cp_exception_info): Return offset into cp_eh_info structure to
3774 match what use to be the start of this structure.
3775 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
3776 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
3777 compile time flag.
3778 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
3779 __cp_eh_info instead of __cp_exception_info.
3780
3781 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
3782
3783 * decl.c (cp_finish_decl): Disable inlining of extern inlines
3784 with static variables.
3785
3786 1998-06-08 Mark Mitchell <mark@markmitchell.com>
3787
3788 * init.c (build_offset_ref): Correct previous change to use build,
3789 not build_min.
3790
3791 1998-06-07 Mark Mitchell <mark@markmitchell.com>
3792
3793 * class.c (instantiate_type): Handle pointer-to-members where the
3794 member is a template.
3795 * init.c (build_offset_ref): Likewise.
3796 * typeck.c (build_unary_op): Likewise.
3797
3798 1998-06-07 Richard Henderson <rth@cygnus.com>
3799
3800 * lex.c (lang_init_options): New function.
3801 (lang_init): Remove flag_exceptions == 2 hack.
3802
3803 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
3804
3805 * search.c (envelope_add_decl): Tweak for implicit typename.
3806
3807 * call.c (joust): Also warn about confusing conversion op/constructor
3808 overload resolution.
3809
3810 * spew.c (yylex): Also return the TYPE_DECL if got_object.
3811 Don't clear got_object after '~'.
3812 * call.c (build_scoped_method_call): Tweak destructor handling.
3813 (build_method_call): Likewise.
3814 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
3815 TYPE_MAIN_VARIANT for destructors.
3816 * semantics.c (finish_object_call_expr): Complain about calling a
3817 TYPE_DECL.
3818
3819 1998-06-05 Per Bothner <bothner@cygnus.com>
3820
3821 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
3822 Define - update needed by gcc.c change.
3823
3824 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
3825
3826 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
3827
3828 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
3829
3830 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
3831 * decl.c (lookup_name_real): Add namespaces_only parameter.
3832 If set, return only NAMESPACE_DECLs.
3833 (select_decl): Likewise.
3834 (identifier_type_value): Give additional parameter.
3835 (lookup_name_nonclass): Likewise.
3836 (lookup_name): Likewise.
3837 (find_binding): Skip namespace aliases.
3838 (binding_for_name): Likewise.
3839 (push_namespace): Check for namespace aliases.
3840 (lookup_name_namespace_only): New function.
3841 (begin_only_namespace_names, end_only_namespace_names): New functions.
3842 * decl2.c (set_decl_namespace): Skip namespace aliases.
3843 (do_using_directive): Likewise.
3844 (do_namespace_alias): Produce namespace aliases, fix alias
3845 redeclaration.
3846 * error.c (dump_decl): Support SCOPE_REF.
3847 * parse.y (extdef): Wrap lookup with namespace_only for namespace
3848 aliases and using declarations.
3849
3850 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
3851
3852 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
3853
3854 * error.c (dump_expr): Clean up NEW_EXPR case.
3855
3856 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
3857
3858 Suggested by Brendan Kehoe
3859 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
3860 treat it as using ::decl.
3861
3862 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
3863
3864 * tree.c (mapcar): Support NEW_EXPR.
3865
3866 * error.c (dump_expr): Support NEW_EXPR.
3867
3868 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
3869
3870 * method.c (make_thunk): Use overload machinery to make name.
3871 * search.c (covariant_return_p): New fn.
3872 (get_matching_virtual): Use it.
3873
3874 * init.c (build_new_1): Fix check for void.
3875
3876 1998-06-01 Per Bothner <bothner@cygnus.com>
3877
3878 * cp-tree.h (TYPE_FOR_JAVA): New macro.
3879 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
3880 java_int_type_node, java_long_type_node, java_float_type_node,
3881 java_double_type_node, java_char_type_node, java_boolean_type_node):
3882 New "primitive" types, with predefined names __java_byte etc.
3883 (record_builtin_java_type): New function.
3884 (init_decl_processing): Make Java types with record_builtin_java_type.
3885 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
3886 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
3887 (grokfndecl): Call check_java_method for Java classes.
3888 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
3889 (process_overload_item): Match types against specific
3890 java_XX_type_node types, rather than using is_java_type.
3891 * class.c (finish_struct_1): Don't add default copy constructor
3892 or operator= if TYPE_FOR_JAVA.
3893 (pop_lang_conext): Restore strict_prototyp proper if Java.
3894 * decl2.c (acceptable_java_type, check_java_method): New functions.
3895 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
3896 (tsubst): Move common statement after if statement.
3897 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
3898
3899 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
3900
3901 * pt.c (for_each_template_parm): Use first_rtl_op.
3902
3903 * tree.c (build_cplus_array_type_1): Also check index_type for
3904 template parms.
3905
3906 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
3907
3908 * pt.c (tsubst): Always copy BINFO_BASETYPES.
3909
3910 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
3911
3912 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
3913 TYPE_SIZE_UNIT too.
3914
3915 1998-05-29 Mark Mitchell <mark@markmitchell.com>
3916
3917 * decl.c (grokdeclarator): Don't complain about in-class
3918 initialization of static consts if we don't really know the type
3919 of the variable.
3920
3921 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
3922
3923 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
3924 * method.c (build_destructor_name): New fn.
3925 * decl2.c (maybe_retrofit_in_chrg): Split out...
3926 (grokclassfn): From here. Reorganize.
3927 * decl.c (grok_ctor_properties): Make sure ctors for types with
3928 vbases have the in_chrg parm.
3929 * pt.c (instantiate_class_template): Update
3930 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
3931 grok_*_properties.
3932 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
3933
3934 1998-05-28 Mark Mitchell <mark@markmitchell.com>
3935
3936 * pt.c (instantiate_decl): Make test for whether or not static
3937 variables should be instantiated early match its comment.
3938
3939 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
3940
3941 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
3942 a member.
3943 (start_function): Call check_default_args.
3944 * decl2.c (grokfield): Don't call check_default_args.
3945 (check_default_args): Use cp_error_at.
3946 * lex.c (do_pending_defargs): Call check_default_args.
3947
3948 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
3949
3950 * call.c (build_method_call): Make sure get_type_value returns
3951 something before we try to use its TYPE_MAIN_VARIANT.
3952 (build_scoped_method_call): Likewise.
3953
3954 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
3955
3956 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
3957 initialize an array.
3958
3959 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
3960 DECL_VIRTUAL_P.
3961
3962 * friend.c (do_friend): Clarify template warning.
3963
3964 1998-05-27 Mark Mitchell <mark@markmitchell.com>
3965
3966 * decl.c (shadow_label): Don't treat decls as identifiers.
3967 (maybe_push_to_top_level): Clear shadowed_labels.
3968
3969 * pt.c (instantiate_decl): Reset lineno and filename after calling
3970 regenerate_decl_from_template.
3971
3972 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
3973 error_mark_node.
3974
3975 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
3976
3977 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
3978
3979 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
3980
3981 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
3982 (convert_nontype_argument): Handle cases when nontype template
3983 parameters become classes after substitution.
3984
3985 1998-05-26 Mark Mitchell <mark@markmitchell.com>
3986
3987 * friend.c (is_friend): Use comptypes, rather than == to compare
3988 types. Modify for new representation of template friends.
3989 (make_friend_class): Likewise.
3990 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
3991 (instantiate_class_template): Deal with template friends.
3992
3993 * decl.c (store_parm_decls): Remove redundant call to
3994 expand_main_function.
3995
3996 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
3997
3998 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
3999 DECL_USE_TEMPLATE.
4000
4001 1998-05-26 Per Bothner <bothner@cygnus.com>
4002
4003 * language_as_string: Handle lang_java.
4004
4005 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
4006
4007 * decl.c (pushdecl): Don't copy the type_decl.
4008
4009 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4010
4011 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
4012 current_class_type.
4013 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
4014
4015 * parse.y (complex_direct_notype_declarator): Use $1 to access
4016 scope of notype_qualified_id.
4017
4018 1998-05-26 Dave Brolley <brolley@cygnus.com>
4019
4020 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
4021 (init_parse): Initialize cpplib interface.
4022
4023 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
4024 empty continuation.
4025
4026 1998-05-26 Mark Mitchell <mark@markmitchell.com>
4027
4028 * decl.c (pushtag): Avoid crashing on erroneous input.
4029
4030 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4031
4032 * decl.c (push_namespace): Only produce one unique name for
4033 anonymous namespaces.
4034 (get_unique_name): Remove.
4035
4036 1998-05-25 Mark Mitchell <mark@markmitchell.com>
4037
4038 * call.c (tourney): Don't do any extra comparisons.
4039
4040 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
4041
4042 * cp-tree.h (processing_template_parmlist): Declare.
4043 * decl.c (pushtag): Don't call push_template_decl when we
4044 shouldn't.
4045 * pt.c (processing_template_parmlist): New variable.
4046 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
4047 (complete_template_args): Use it.
4048 (add_to_template_args): Likewise.
4049 (innermost_args): Likewise.
4050 (tsubst): Likewise.
4051 (begin_template_parm_list): Use processing_template_parmlist.
4052 (end_template_parm_list): Likewise.
4053
4054 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4055 * decl.c (grokdeclarator): Use it.
4056 * decl2.c (grok_x_components): Likewise.
4057 * init.c (initializing_context): Likewise.
4058 * method.c (do_build_copy_constructor): Likewise.
4059 (do_build_assign_ref): Likewise.
4060 * search.c (compute_access): Likewise.
4061 * typeck.c (build_component_ref): Likewise.
4062
4063 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
4064 unnamed type a typedef name "for linkage purposes".
4065
4066 * pt.c (lookup_template_class): Don't look at
4067 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
4068
4069 * method.c (build_overload_int): Handle error cases gracefully.
4070
4071 * pt.c (instantiate_decl): Handle static member variables
4072 correctly.
4073
4074 * pt.c (tsubst): Use the tsubst'd type when producing new
4075 TEMPLATE_PARM_INDEX nodes.
4076
4077 1998-05-24 Mark Mitchell <mark@markmitchell.com>
4078
4079 * tree.c (cp_tree_equal): Handle pointers to member functions.
4080
4081 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
4082 sure the type of the REF_BIND is a reference type.
4083 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
4084 target_type for clarity.
4085
4086 * parse.y (xcond): Move call to condition_conversion ...
4087 * semantics.c (finish_for_cond): Here.
4088 * parse.c: Regenerated.
4089
4090 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
4091
4092 * decl.c (push_namespace): Namespaces have type void.
4093 * typeck2.c (incomplete_type_error): Complain about namespace
4094 used as expression.
4095 * typeck.c (decay_conversion): Likewise.
4096
4097 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
4098
4099 * error.c (dump_expr): Support namespaces.
4100
4101 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
4102
4103 * cp-tree.def: Add SRCLOC.
4104 * cp-tree.h: Add struct tree_srcloc and accessor macros.
4105 * tree.c (build_srcloc, build_srcloc_here): New fns.
4106 * pt.c (add_pending_template): Use build_srcloc_here.
4107 (push_tinst_level): Update last_template_error_tick before erroring.
4108 (instantiate_decl): Restore lineno and input_filename before
4109 calling add_pending_template.
4110 * decl2.c (finish_file): Set up lineno and input_filename for
4111 pending templates.
4112
4113 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
4114
4115 * decl.c (lang_print_error_function): New fn.
4116 (init_decl_processing): Set print_error_function to use it.
4117 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
4118
4119 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
4120 ICS_BAD_FLAG.
4121
4122 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
4123 copy-initialization.
4124
4125 * class.c (build_vtable_entry): Use int_fits_type_p.
4126 (build_vtable): Pass a signed offset to build_vtable_entry.
4127 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
4128 set_rtti_entry): Likewise.
4129
4130 1998-05-22 Per Bothner <bothner@cygnus.com>
4131
4132 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
4133 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
4134
4135 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
4136
4137 * pt.c (print_template_context): Use fprintf instead of cp_error.
4138
4139 * pt.c (determine_specialization): Just return an error_mark_node.
4140 Also print the decl we want in error messages. If we complain,
4141 return error_mark_node.
4142 (tsubst_friend_function): Set lineno and input_filename so
4143 error messages will be useful.
4144 (instantiate_template): Just return an error_mark_node.
4145 (check_explicit_specialization): Don't mess with a returned
4146 error_mark_node.
4147
4148 * pt.c (print_template_context): Add new argument.
4149 (maybe_print_template_context): New fn.
4150 (push_tinst_level): Increment tinst_level_tick.
4151 (pop_tinst_level): Likewise.
4152 * errfn.c (cp_thing): Call maybe_print_template_context. Use
4153 xrealloc instead of xmalloc.
4154
4155 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
4156
4157 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
4158
4159 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
4160 if the template we looked up is the same as the one we already
4161 have.
4162
4163 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
4164
4165 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
4166 (cpp_reader,parse_in): Add for cpplib.
4167 (check_newline): Call handle_sysv_pragma with new interface.
4168 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
4169
4170 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
4171 (sub_getch): Call GETC for cpplib.
4172
4173 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
4174 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
4175
4176 * Makefile.in (CXX_OBJS): add @extra_cxx_objs@ for cpplib.
4177
4178 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
4179
4180 * decl2.c (maybe_make_one_only): New fn.
4181 (import_export_vtable): Use it.
4182 (import_export_decl): Likewise.
4183 * pt.c (mark_decl_instantiated): Likewise.
4184
4185 1998-05-21 Mark Mitchell <mmitchell@usa.net>
4186
4187 * decl2.c (find_representative_member): Rename to ...
4188 (build_anon_union_vars): New function.
4189 (finish_anon_union): Fix stupidity of previous change.
4190
4191 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
4192
4193 * decl.c (grokfndecl): Handle definition of specialization in
4194 friend declaration.
4195
4196 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
4197
4198 1998-05-20 Mark Mitchell <mmitchell@usa.net>
4199
4200 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
4201 to look for type declarations.
4202 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
4203 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
4204 (finish_member_class_template): Declare.
4205 * decl.c (pushtag): Put member class templates on the
4206 CLASSTYPE_TAGS list, just as for ordinary member classes.
4207 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
4208 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
4209 IDENTIFIER_NAMESPACE_VALUEs.
4210 * parse.y (component_decl): Move code to ...
4211 * semantics.c (finish_member_class_template): New function.
4212 Don't put member class templates on the list of components for a
4213 class.
4214 * parse.c: Regenerated.
4215 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
4216 In fact, don't use DECL_CONTEXT at all here.
4217
4218 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
4219
4220 * decl.c (record_unknown_type): New function.
4221 (init_decl_processing): Call it for the unknown and global type
4222 nodes.
4223
4224 1998-05-20 Mark Mitchell <mmitchell@usa.net>
4225
4226 * decl2.c (find_representative_member): New function.
4227 (finish_anon_union): Use it.
4228
4229 * cp-tree.h (MAIN_NAME_P): New macro.
4230 (DECL_MAIN_P): Likwise.
4231 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
4232 (grokfndecl): Use the new macros.
4233 (grokdeclarator): Likewise.
4234 (start_function): Likewise.
4235 (store_parm_decls): Likewise.
4236 (finsh_function): Likewise.
4237 * friend.c (do_friend): Likewise.
4238 * typeck.c (build_function_call_real): Likewise.
4239 (build_unary_op): Likewise.
4240
4241 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
4242
4243 * decl2.c (start_objects, finish_objects, do_dtors,
4244 do_ctors): Split out from...
4245 (finish_file): ...here.
4246
4247 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
4248
4249 * tree.c (is_overloaded_fn): Don't abort on placeholders from
4250 push_class_decls.
4251
4252 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
4253
4254 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
4255
4256 * error.c (dump_expr): Handle an ARROW_EXPR.
4257
4258 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
4259
4260 * decl.c (saveable_obstack): Declare.
4261 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
4262 declare, if necessary.
4263
4264 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
4265
4266 * call.c (compare_qual): Remove.
4267 (is_subseq): Tweak.
4268 (is_properly_derived_from): New function.
4269 (maybe_handle_ref_bind): Likewise.
4270 (maybe_handle_implicit_object): Likewise.
4271 (compare_ics): Modify substantially to bring into conformance with
4272 the standard.
4273 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
4274 (comp_cv_qualification): Declare.
4275 (comp_cv_qual_signature): Likewise.
4276 * typeck.c (comp_cv_qualification): Likewise.
4277 (comp_cv_qual_signature): Likewise.
4278
4279 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4280
4281 * Makefile.in (parse.o): Depend on toplev.h.
4282
4283 * class.c (typecode_p): Remove prototype and definition.
4284
4285 * cp-tree.h (currently_open_class, is_empty_class, member_p):
4286 Add prototype.
4287
4288 * decl.c (push_overloaded_decl_top_level): Remove prototype and
4289 definition.
4290
4291 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
4292 in call to `cp_thing'.
4293 (cp_warning): Likewise for function pointer `warning'.
4294
4295 * except.c (do_function_call): Remove prototype and definition.
4296 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
4297
4298 * method.c (is_java_type): Add prototype and make it static.
4299
4300 * parse.y: Include toplev.h.
4301
4302 * pt.c (type_unification): Remove unused variable `arg'.
4303 (instantiate_decl): likewise for `save_ti'.
4304
4305 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
4306
4307 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
4308
4309 * init.c (build_member_call): Handle template_ids.
4310 * parse.y (primary): Add global_scope template_id.
4311
4312 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
4313
4314 * decl2.c (get_sentry): Use end_temporary_allocation.
4315 Don't declare permanent_obstack.
4316
4317 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
4318
4319 * parse.y (.finish_new_placement): New non-terminal.
4320 (unary_expr, new_type_id): Use it.
4321 * parse.c: Regenerated.
4322
4323 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
4324
4325 * pt.c (redeclare_class_template): Say where the original definition
4326 of the template-parameter's default argument appeared.
4327
4328 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
4329
4330 * call.c (build_over_call): Tweak empty class handling.
4331
4332 * decl.c (make_typename_type): Use currently_open_class.
4333
4334 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
4335
4336 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4337
4338 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
4339 for a type unless it is one.
4340
4341 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
4342
4343 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
4344
4345 * Makefile.in (program_transform_name, objdir): Define.
4346
4347 * Makefile.in (BISON): Use bison from the build tree if it exists.
4348 (FLEX): Similarly.
4349
4350 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
4351
4352 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
4353
4354 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
4355
4356 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
4357
4358 * call.c (build_scoped_method_call): Likewise.
4359
4360 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
4361
4362 * init.c (build_new_1): Call suspend_momentary around the creation
4363 of values that must be saved for exception handling.
4364 * parse.y (.build_new_placement): New non-terminal.
4365 (unary_expr, new_placement): Use it.
4366 * parse.c: Regenerated.
4367
4368 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
4369
4370 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
4371 old and new types.
4372
4373 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
4374 canonical type.
4375
4376 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
4377
4378 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
4379
4380 * decl.c (start_decl): Revert problem change.
4381
4382 * Makefile.in (CONFLICTS): Fix.
4383
4384 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
4385
4386 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
4387
4388 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
4389
4390 * class.c (finish_struct_1): Use BINFO_SIZE.
4391
4392 * decl.c (start_decl): Use 'tem'.
4393
4394 Thu May 14 16:30:47 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
4395
4396 * exception.cc: Include eh-common.h.
4397 (struct cp_eh_info): add eh_info struct with NEW_EH_MODEL.
4398 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
4399 (__cp_push_exception): Initialize eh_info struct as well.
4400 * except.c: Remove local structs and include eh-common.h.
4401 (init_exception_processing): Set language and version codes.
4402 (call_eh_info): add presence of eh_info to runtime description of
4403 struct cp_eh_info.
4404 (expand_end_eh_spec): call start_catch_block() and end_catch_block().
4405 * semantics.c (finish_try_block): call start_catch_block() and
4406 end_catch_block().
4407 * parse.y (function_try_block): call start_catch_block() and
4408 end_catch_block().
4409
4410 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
4411
4412 * typeck.c (original_type): New function.
4413 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
4414 to see if they're actually the same.
4415 * cp-tree.h (original_type): Declare.
4416
4417 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4418
4419 * Makefile.in (lex.o): Depend on output.h.
4420
4421 * call.c (add_function_candidate): Remove unused variable `cand'.
4422 (add_conv_candidate): Likewise.
4423 (build_builtin_candidate): Likewise.
4424
4425 * cp-tree.h: Add prototype for `types_overlap_p'.
4426
4427 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
4428
4429 * decl2.c (merge_functions): Remove unused variables `tmp' and
4430 `tempn'.
4431
4432 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
4433 (code_as_string): Likewise.
4434 (language_as_string): Likewise.
4435 (parm_as_string): Likewise.
4436 (op_as_string): Likewise.
4437 (assop_as_string): Likewise.
4438 (cv_as_string): Likewise.
4439
4440 * lex.c: Include output.h.
4441
4442 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
4443
4444 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
4445 ATTRIBUTE_UNUSED.
4446
4447 * tinfo.cc (__class_type_info::dcast): Change the type of variable
4448 `i' from int to size_t.
4449
4450 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
4451 ATTRIBUTE_UNUSED.
4452
4453 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
4454
4455 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
4456 DECL_NAMESPACE_SCOPE_P.
4457 (lang_decl_name): Likewise.
4458 * pt.c (tsubst_friend_function, tsubst): Likewise.
4459 * decl.c (pushdecl, redeclaration_error_message, start_decl,
4460 cp_finish_decl, start_function): Likewise.
4461 * class.c (finish_struct_1): Likewise.
4462 * call.c (build_over_call): Likewise.
4463 (compare_ics): Use DERIVED_FROM_P.
4464
4465 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
4466
4467 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
4468 * method.c (build_mangled_name): Use it.
4469 (build_decl_overload_real): Likewise.
4470
4471 * error.c (dump_simple_decl): New function, broken out from ...
4472 (dump_decl): Use it.
4473
4474 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
4475
4476 * ptree.c (lang_print_xnode): Add missing `break'.
4477
4478 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
4479
4480 * call.c (add_template_candidate): Adjust for changes to
4481 fn_type_unification.
4482 (add_template_candidate_real): Likewise.
4483 (add_template_conv_candidate): Likewise.
4484 (build_user_type_conversion_1): Likewise.
4485 (build_new_function_call): Likewise.
4486 (build_object_call): Likewise.
4487 (build_new_op): Likewise.
4488 (build_new_method_call): Likewise.
4489 * class.c (instantiate_type): Likewise.
4490 * cp-tree.h (unification_kind_t): New type.
4491 (fn_type_unification): Adjust prototype.
4492 (type_unificaiton): Likewise.
4493 * pt.c (UNIFY_ALLOW_NONE): New macro.
4494 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
4495 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
4496 (UNIFY_ALLOW_DERIVED): Likewise.
4497 (unify): Change prototype.
4498 (maybe_adjust_types_for_deduction): New function.
4499 (check_cv_quals_for_unify): Likewise.
4500 (determine_specialization): Adjust.
4501 (fn_type_unification): Likewise.
4502 (type_unification): Likewise.
4503 (type_unification_real): Likewise. Use
4504 maybe_adjust_types_for_deduction. Fix mishandling of
4505 back-unification of template functions passed as arguments. Pass
4506 appropriate combination of UNIFY_ALLOW_* to unify.
4507 (unify): Remove unused NTPARMS parameter. Use
4508 check_cv_quals_for_unify. Remove bogus code that allowed
4509 too-generous unification in order to adhere more closely to standard.
4510 (get_bindings_real): Adjust.
4511 (get_class_bindings): Likewise.
4512
4513 * method.c (build_overload_identifier): Only use the innermost
4514 template arguments when mangling.
4515 * pt.c (tsubst_template_argument_vector): New function.
4516 (complete_template_args): Deal with the situation where the
4517 extra_args contain more than one level of arguments.
4518 (lookup_template_class): Deal with member template classes, which
4519 may have more than one level of arguments.
4520 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
4521 Improve handling of member template classes. Use
4522 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
4523 tsubst_template_argument_vector where appropriate.
4524 (regenerate_decl_from_template): Break out from ...
4525 (instantiate_decl): Here.
4526
4527 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
4528 * parse.h: Regenerated.
4529 * parse.c: Really regenerated.
4530
4531 * cp-tree.h (finish_unary_op_expr): New function.
4532 (finish_id_expr): Likewise.
4533 (begin_new_placement): Likewise.
4534 (finish_new_placement): Likewise.
4535 (finish_declarator): Likewise.
4536 (finish_translation_unit): Likewise.
4537 (finish_parmlist): Likewise.
4538 (begin_class_definition): Likewise.
4539 (finish_class_definition): Likewise.
4540 (finish_default_args): Likewise.
4541 (finish_inline_definitions): Likewise.
4542 * parse.y (GCC_ASM_KEYWORD): Remove.
4543 (TYPENAME_ELLIPSIS): Likewise.
4544 * parse.c: Regenerated.
4545 Use new functions in semantics.c in the actions for many rules.
4546 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
4547 * hash.h: Regenerated.
4548 * semantics.c (finish_expr_stmt): Allow NULL expr.
4549 (finish_unary_op_expr): New function, containing
4550 code previously in parse.y.
4551 (finish_id_expr): Likewise.
4552 (begin_new_placement): Likewise.
4553 (finish_new_placement): Likewise.
4554 (finish_declarator): Likewise.
4555 (finish_translation_unit): Likewise.
4556 (finish_parmlist): Likewise.
4557 (begin_class_definition): Likewise.
4558 (finish_class_definition): Likewise.
4559 (finish_default_args): Likewise.
4560 (finish_inline_definitions): Likewise.
4561
4562 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
4563
4564 * typeck.c (build_c_cast): Don't decay arrays and functions to
4565 pointer type when converting to a class type.
4566
4567 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
4568
4569 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
4570 (DECL_CLASS_SCOPE_P): Likewise.
4571
4572 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
4573
4574 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
4575 * decl2.c (constructor_name_full): Likewise.
4576
4577 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
4578
4579 * tree.c (mapcar): Add OVERLOAD support.
4580
4581 * init.c (resolve_offset_ref): We must use basetype_path before we
4582 destroy it with a call to convert_pointer_to.
4583
4584 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
4585
4586 * class.c (currently_open_class): New fn.
4587 * decl.c (lookup_name_real): Use it.
4588 * search.c (lookup_field): Likewise.
4589
4590 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
4591
4592 * cp-tree.def (OVERLOAD): New node.
4593 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
4594 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
4595 (NAMESPACE_BINDING): Remove.
4596 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
4597 namespace_binding.
4598 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
4599 Define.
4600 (tree_overload): New struct.
4601 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
4602 (REAL_IDENTIFIER_TYPE_VALUE): Define.
4603 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
4604 (lang_decl_flags): Remove in_namespace.
4605 (lang_decl): Remove chain.
4606 (DECL_CHAIN, DECL_NAMESPACE): Remove.
4607 (flag_honor_std): Declare extern.
4608 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
4609 namespace_binding, set_namespace_binding,
4610 lookup_function_nonclass, cat_namespace_levels,
4611 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
4612 scratch_ovl_cons, ovl_member, build_overload): Declare.
4613 (decl_list_length, get_namespace_id, current_namespace_id,
4614 overloaded_globals_p): Remove.
4615 (lookup_using_namespace, qualified_lookup_using_namespace): Change
4616 return type.
4617 (push_scratch_obstack): New macro.
4618 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
4619 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
4620 convs, fns.
4621 (build_new_function_call): Iterate using OVL_CHAIN.
4622 Print DECL_NAME in when reporting ambiguities.
4623 (build_object_call): Iterate using OVL_NEXT for fns, convs.
4624 (build_new_op): Call lookup_function_nonclass.
4625 Iterate using OVL_NEXT.
4626 (build_op_delete_call): Change detection of members.
4627 Do not wrap TREE_LIST around fields and single global functions.
4628 (build_over_call): Don't push a class level if the context is a
4629 namespace.
4630 (build_new_method_call): Iterate using OVL_NEXT.
4631 * class.c (add_method): Chain overloaded members using
4632 build_overload. Remove copying of method.
4633 (grow_method): When iterating through the obstack, expect OVERLOAD
4634 nodes. Chain overload members.
4635 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
4636 nodes in call to get_baselinks.
4637 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
4638 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
4639 fdecls that are OVERLOAD nodes.
4640 (validate_lhs): New function.
4641 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
4642 code. Use DECL_NAME in error messages. Split code between global
4643 and member function processing.
4644 * decl.c (global_type_node): New static variable.
4645 (in_std): New global.
4646 (struct binding_level): New field usings.
4647 (resume_binding_level): Assert that we are not in a class.
4648 (toplevel_bindings_p): Just check for namespace_p or
4649 pseudo_global.
4650 (resume_level): Remove.
4651 (find_binding): New function.
4652 (binding_for_name): Call it.
4653 (namespace_binding, set_namespace_binding): New functions.
4654 (push_namespace): Associate binding level with new namespace,
4655 resume_binding_level for existing namespace. Remove old code.
4656 Fake std by counting.
4657 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
4658 (maybe_push_to_top_level): Save current namespace.
4659 (pop_from_top_level): Restore saved namespace.
4660 (pop_namespace): Call suspend_binding_level. Remove old code.
4661 (cat_namespace_levels): New function.
4662 (set_identifier_type_value_with_scope): For namespace bindings,
4663 set BINDING_TYPE, and use global_type_node.
4664 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
4665 (identifier_type_value): New function.
4666 (pushtag): If no context, use current_namespace.
4667 (duplicate_decls): Don't process DECL_CHAIN.
4668 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
4669 already set. Never reset it to NULL_TREE. Lookup global variables
4670 in their namespace. Push overloaded templates if they are on
4671 namespace level.
4672 (pushdecl_namespace_level): New function.
4673 (pushdecl_top_level): Implement using pushdecl_namespace_level.
4674 (pushdecl_using_decl): New function.
4675 (overloaded_globals_p): Remove.
4676 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
4677 them. Use namespace_binding and set_namespace_value.
4678 (redeclaration_error_message): Complain if the declarations come
4679 from different namespaces.
4680 (lookup_tag): On namespace level, look in the BINDING_TYPE.
4681 (lookup_namespace_name): Pass tree_bindings from stack. Remove
4682 old code.
4683 (select_decl): New function.
4684 (lookup_name_real): Call it for qualified and unqualified lookup.
4685 Pass tree_bindings from the stack.
4686 If prefer_type is 1, also accept namespaces.
4687 (lookup_function_nonclass): New function.
4688 (init_decl_processing): Set the binding level of the global
4689 namespace to global_binding_level.
4690 Build a proper type list for __builtin_apply.
4691 Initialize std_node to "fake std" if flag_honor_std is set.
4692 Initialize global_type_node.
4693 Allocated bad_alloc in namespace std if flag_honor_std.
4694 (define_function): Set the DECL_CONTEXT to the current_namespace.
4695 (start_decl): A namespace is not considered as a context here. If
4696 the DECL_CONTEXT is a namespace, push the decl.
4697 (cp_finish_decl): Check for namespaces used as initializers.
4698 (grokfndecl): Add namespace parameter. Remove processing of
4699 DECL_CHAIN.
4700 (grokvardecl): Add namespace parameter.
4701 (grokdeclarator): Process SCOPEs that are namespaces. For
4702 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
4703 (start_function): Check for contexts that are namespaces.
4704 Set context for declarations that have not been pushed.
4705 (store_parm_decls): Check for ::main only.
4706 (finish_function): Likewise.
4707 (start_method): Check for contexts that are namespaces.
4708 (start_method): Remove DECL_CHAIN processing.
4709 * decl2.c (flag_honor_std): Declare.
4710 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
4711 (decl_namespace_list): New static global.
4712 (grok_x_components): Ignore namespaces as type contexts.
4713 (check_classfn): Expect OVERLOAD nodes.
4714 (grokfield): Remove DECL_CHAIN processing.
4715 (finish_file): Call cat_namespace_levels.
4716 (merge_functions): New function.
4717 (ambiguous_decl): Rewrite.
4718 (lookup_using_namespace): Produce tree_bindings.
4719 (qualified_lookup_using_namespace): Likewise.
4720 (set_decl_namespace, decl_namespace, current_decl_namespace,
4721 push_decl_namespace, pop_decl_namespace): New functions.
4722 (arg_lookup): New struct.
4723 (add_function, arg_assoc_namespace, arg_assoc_class,
4724 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
4725 New functions.
4726 (get_namespace_id, current_namespace_id): Remove.
4727 (do_toplevel_using_decl): Rewrite.
4728 (do_class_using_decl): Complain about namespace qualifiers.
4729 (do_using_directive): Sorry if not on namespace level. Complain
4730 about unknown namespaces.
4731 * error.c (dump_aggr_type): Check for namespace contexts.
4732 * except.c (init_exception_processing): Push terminate into std.
4733 * friend.c (is_friend): A namespace is not a context, here.
4734 * init.c (expand_member_init): Remove DECL_CHAIN processing.
4735 (build_offset_ref): Process OVERLOAD nodes.
4736 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
4737 * lex.c (identifier_type): Loop using OVL_CHAIN.
4738 (see_typename): Set looking_for_typename to 2.
4739 (real_yylex): Likewise.
4740 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
4741 (do_scoped_id): Expect OVERLOAD nodes.
4742 Change calling convention for qualified_lookup_using_namespace.
4743 (build_lang_decl): Don't set in_namespace anymore.
4744 * method.c (typevec_size): New global.
4745 (build_overload_nested_name): Return if global_namespace.
4746 Otherwise, always expect a declaration context.
4747 (build_qualified_name): Likewise.
4748 Make sure we don't write beyond typevec_size.
4749 (build_decl_overload_real): Likewise.
4750 Allocate one extra slot for the namespace.
4751 (hack_identifier): Mark code dead.
4752 Process OVERLOAD and NAMESPACE_DECL nodes.
4753 * parse.y (program): Pop namespaces until in global namespace.
4754 (extdef): In a using-declaration, don't discard the identifier if
4755 there is no declaration.
4756 (left_curly): Ignore type contexts which are namespaces.
4757 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
4758 used as scope.
4759 * pt.c (template_class_depth): Expect types to be namespaces.
4760 (determine_specialization): Simplify by expecting OVERLOAD nodes.
4761 (push_template_decl): Push into namespace level.
4762 Reset ctx if it is a namespace.
4763 Set DECL_CONTEXT to current_namespace if not set already.
4764 Ignore real contexts that are namespaces.
4765 (mangle_class_name_for_template): Skip global_namespace.
4766 Mangle other namepaces as declarations.
4767 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
4768 (lookup_template_class): Push into namespace of context.
4769 If the context is a namespace, set it to global_namespace.
4770 Use id_context for mangling.
4771 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
4772 (tsubst_friend_function): Ignore namespace contexts.
4773 Push into namespace level.
4774 (tsubst): Handle NAMESPACE_DECL nodes.
4775 Remove DECL_CHAIN processing.
4776 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
4777 * ptree.c (print_lang_identifier): Print bindings.
4778 (lang_print_xnode): Print OVERLOAD nodes.
4779 * rtti.c (init_rtti_processing): Push type_info into std.
4780 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
4781 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
4782 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
4783 lookup_fnfields_here): Likewise.
4784 Process all nodes, instead of going through TREE_CHAIN.
4785 * sig.c (build_signature_pointer_or_reference_type): Set context
4786 to global_namespace.
4787 (build_signature_table_constructor): Expect OVERLOAD nodes.
4788 * spew.c (yylex): Save old setting of looking_for_typename.
4789 * tree.c (decl_list_length): Remove.
4790 (binding_init): New function.
4791 (count_functions): Rewrite.
4792 (is_overloaded_fn): Expect OVERLOAD nodes.
4793 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
4794 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
4795 ovl_member): New functions.
4796 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
4797 (type_unknown_p): Likewise.
4798 (require_instantiated_type): Likewise.
4799 (build_component_ref): Declare code dead.
4800 (build_x_function_call): Create and expect OVERLOAD nodes.
4801 (build_function_call_real): Check for ::main only.
4802 (build_unary_op): Likewise. Expect OVERLOAD nodes.
4803 (convert_for_assignment): Check for TREE_LIST before accessing
4804 TREE_VALUE.
4805 * decl.c (duplicate_decls): Check for namespace bindings instead
4806 of global bindings.
4807 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
4808 lookup_name_current_level, start_decl, xref_tag,
4809 finish_enum): Likewise.
4810 * init.c (build_offset_ref): Likewise.
4811 * search.c (lookup_field): Likewise.
4812 (lookup_fnfields): Likewise.
4813 (dfs_debug_mark): Likewise.
4814 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
4815 (poplevel_class, pop_from_top_level): Likewise.
4816 * decl2.c (finish_method): Likewise.
4817 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
4818 * decl.c (record_builtin_type): Likewise.
4819 (init_decl_processing, grokfndecl): Likewise.
4820 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
4821 (make_lang_type): Likewise.
4822 * parse.y (make_thunk): Likewise.
4823 * pt.c (tsubst): Likewise.
4824 * tree.c (debug_binfo): Likewise.
4825 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
4826 tinfo2.cc, inc/new.h: Add std qualifications.
4827 * inc/new: Wrap with namespace std if __HONOR_STD.
4828 * inc/typeinfo: Likewise.
4829
4830 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
4831
4832 * call.c (build_user_type_conversion_1): Handle second_conv
4833 properly for templates.
4834
4835 Thu May 7 17:09:25 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
4836
4837 * method.c (build_decl_overload_real): Set TREE_USED flag to
4838 zero for build_type_variants nodes as well.
4839
4840 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
4841
4842 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
4843
4844 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
4845
4846 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
4847 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
4848 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
4849 xref.o): Add toplev.h dependencies.
4850
4851 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
4852
4853 * errfn.c (cp_error, cp_warning): Remove declarations for
4854 error and warning respectively.
4855
4856 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4857
4858 * error.c: Convert to using ctype macros defined in system.h.
4859 * method.c: Likewise.
4860 * xref.c: Likewise.
4861 * lex.c: Likewise. Also remove redundant system header stuff.
4862
4863 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
4864
4865 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
4866 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
4867 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
4868 xref.c: Add include of toplev.h.
4869
4870 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
4871
4872 * tree.c (perm_manip): Also regenerate the RTL of an extern.
4873 (copy_to_permanent): Use end_temporary_allocation.
4874
4875 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
4876
4877 * init.c (expand_vec_init): The initialization of each array
4878 element is a full-expression.
4879
4880 Tue May 5 18:24:13 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
4881
4882 * method.c (build_mangled_name): Add a call to build_type_variant
4883 to get the right type.
4884
4885 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
4886
4887 * Makefile.in: Add .SUFFIXES.
4888
4889 * cp-tree.def: Remove NAMESPACE_DECL.
4890
4891 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
4892
4893 * call.c (build_over_call): Do evaluate arg even if it has empty
4894 class type.
4895 * decl.c (start_function): Don't push a member function.
4896
4897 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
4898
4899 * Makefile.in (g++FAQ.info): Put -o option before input file.
4900
4901 Thu Apr 30 13:05:33 EDT 1998 Andrew MacLeod <amacleod@cygnus.com>
4902
4903 * gxxint.texi: Add info for squangling codes K and B.
4904
4905 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
4906
4907 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
4908 the expression in templates.
4909 (finish_stmt_expr): Likewise.
4910
4911 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
4912
4913 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
4914
4915 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
4916
4917 * decl.c (maybe_push_to_top_level): Always clear
4918 current_template_parms and processing_template_decl.
4919 (pushtag): Remove check of current_class_type and some comments,
4920 since maybe_push_to_top_level no longer creates confusion.
4921
4922 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
4923
4924 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
4925 (DECL_CLASS_TEMPLATE_P): Likewise.
4926 (DECL_PRIMARY_TEMPLATE): Likewise.
4927 (PRIMARY_TEMPLATE_P): Use it.
4928 (push_template_decl_real): New function.
4929 (redeclare_class_template): Take new template parameters as
4930 input.
4931 (is_specialization_of): New function.
4932 (comp_template_args): Declare.
4933 * decl.c (pushtag): Handle friend template classes.
4934 (xref_tag): Likewise. Use new calling convention for
4935 redeclare_class_template.
4936 * decl2.c (grok_x_components): Handle friend templates.
4937 * friend.c (is_friend): Use is_specialization_of where
4938 appropriate. Deal with friend class templates.
4939 (make_friend_class): Let a class template be friends with itself.
4940 * pt.c (comp_template_args): Remove declaration.
4941 (tsubst_friend_class): New function.
4942 (push_template_decl_real): New function.
4943 (push_template_decl): Use it.
4944 (redeclare_class_template): Adjust for new calling convention.
4945 (comp_template_args): Give it external linkage.
4946 (instantiate_class_type): Use tsubst_friend_class to deal
4947 with friend templates.
4948 * typeck.c (comptypes): Use comp_template_args, rather than
4949 expanding it inline.
4950 * parse.y (component_decl): Handle a nested template type
4951 like other component type declarations.
4952
4953 * pt.c (check_explicit_specialization): Handle overloaded
4954 constructors correctly.
4955
4956 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
4957 (lookup_template_class): Use it.
4958
4959 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
4960
4961 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
4962 * cp-tree.h: Add WRAPPER support.
4963 * call.c (add_candidate): Split out from add_*_candidate fns.
4964 (build_over_call): Take the candidate instead of function and args.
4965 Enforce access control here. Emit overload warnings here.
4966 (add_warning): New fn.
4967 (joust): Add WARN parm. If not set, call add_warning instead of
4968 printing a warning. Reenable some warnings.
4969 (tourney): Pass it.
4970 (convert_like): Adjust.
4971 (build_new_op): Adjust.
4972 (build_new_function_call): Adjust.
4973 (build_user_type_conversion_1): Adjust.
4974 (USER_CONV_FN): Adjust.
4975 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
4976 build_int_wrapper): New fns.
4977
4978 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
4979
4980 * pt.c (unify): Fix typo in previous change.
4981
4982 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
4983
4984 * error.c (dump_type_real): Declare canonical_name.
4985
4986 * typeck.c (comp_target_types): Fix PMFs.
4987
4988 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
4989
4990 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
4991 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
4992 TEMPLATE_DECL.
4993
4994 * pt.c (tsubst): Decrease the template-level of
4995 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
4996 TEMPLATE_PARM_INDEX.
4997 (template_decl_level): New function.
4998 (unify): Make sure to record unifications for template
4999 parameters, even when the parameters exactly match the arguments.
5000 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
5001 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
5002 aren't from the level we're currently working on.
5003
5004 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
5005
5006 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
5007
5008 * decl2.c (check_member_template): Set DECL_IGNORED for member
5009 class templates, too.
5010
5011 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
5012
5013 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5014
5015 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
5016
5017 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
5018
5019 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
5020 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
5021 (init_decl_processing): Handle TI types.
5022 * typeck.c (unsigned_type, signed_type): Handle TI types.
5023
5024 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
5025
5026 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
5027 New local added_libraries. Increment count when add library to
5028 arglist.
5029
5030 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
5031
5032 * cp-tree.h (type_as_string_real): New function.
5033 * pt.c (mangle_class_name_for_template): Use it.
5034 * error.c (dump_aggr_type): Change prototype.
5035 (dump_type_prefix): Likewise.
5036 (dump_type_suffix): Likewise.
5037 (dump_type_real): Convert from dump_type. If desired, the
5038 "canonica" name of a typedef, i.e., the name of the underlying
5039 type, can be printed.
5040 (dump_type): Call dump_type_real.
5041
5042 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
5043
5044 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
5045
5046 * typeck.c (comp_target_types): Tweak pedantic case.
5047 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
5048 Return -1 or 1 instead of 1 or 2.
5049 (compparms): Remove STRICT handling.
5050 (convert_for_assignment): Fix handling of pmfs.
5051
5052 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
5053
5054 * typeck.c (comp_target_types): Handle references like pointers.
5055 (comp_target_parms): Note that return code from comp_target_types
5056 can be negative to indicate failure.
5057
5058 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5059
5060 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
5061 which requires a working target compiler to build.
5062
5063 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
5064
5065 * tree.c (avoid_overlap): Add prototype.
5066
5067 * spew.c (num_tokens): Add prototype.
5068 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
5069
5070 * search.c (dfs_check_overlap): Add prototype.
5071 (dfs_no_overlap_yet): Likewise.
5072
5073 * pt.c (original_template): Add prototype.
5074 (inline_needs_template_parms): Likewise.
5075 (push_inline_template_parms_recursive): Likewise.
5076 (retrieve_specialization, register_specialization): Likewise.
5077 (print_candidates, reduce_template_parm_level): Likewise.
5078 (build_template_decl, mark_template_parm): Likewise.
5079 (tsubst_friend_function, get_bindings_real): Likewise.
5080
5081 * method.c (start_squangling): Add prototype.
5082 (end_squangling, check_ktype, issue_ktype): Likewise.
5083 (build_overloaded_scope_ref, check_btype): Likewise.
5084 (build_mangled_template_parm_index): Likewise.
5085
5086 * lex.c (init_cpp_parse): Add prototype.
5087 (handle_cp_pragma, handle_sysv_pragma): Likewise.
5088 (reduce_cmp, token_cmp): Likewise.
5089
5090 * except.c (call_eh_info): Add prototype.
5091 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
5092 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
5093
5094 * decl2.c (is_namespace_ancestor): Add prototype.
5095 (namespace_ancestor, add_using_namespace): Likewise.
5096 (ambiguous_decl): Likewise.
5097
5098 * decl.c (indent): Add prototype.
5099
5100 * call.c (add_template_candidate_real): Add prototype.
5101
5102 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
5103
5104 * decl2.c (build_expr_from_tree): Just return a PMF.
5105
5106 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
5107
5108 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
5109 when doing initializations.
5110
5111 * pt.c (unify): Use comptypes to compare type args.
5112
5113 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
5114
5115 * decl.c (duplicate_decls): Fix check for when it's safe to free
5116 the new decl.
5117
5118 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
5119 to type_as_string.
5120
5121 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
5122
5123 * pt.c (build_template_parm_index): Add prototype.
5124
5125 * search.c (my_tree_cons): Don't clear words outside the
5126 newly allocated node.
5127
5128 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
5129
5130 * lex.c (init_parse): Now returns char* containing the filename.
5131
5132 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
5133 Jeff Law <law@cygnus.com>
5134
5135 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
5136 than a pointer.
5137
5138 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5139
5140 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
5141
5142 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
5143
5144 * decl.c (duplicate_decls): Don't warn for redundant decls if
5145 friend: let add_friend take care of it.
5146
5147 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
5148
5149 * sig.c (build_signature_pointer_constructor): Don't set
5150 TREE_HAS_CONSTRUCTOR for a signature pointer.
5151 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
5152 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
5153 here, too.
5154 * typeck.c (build_unary_op): Only allow taking the address of a
5155 real constructor.
5156 * typeck2.c (digest_init): Simplify.
5157 (store_init_value): Don't pedwarn about using { } for pmfs.
5158
5159 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
5160
5161 * cp-tree.h (start_decl): Update prototype.
5162 * decl.c (start_decl): Like the C version, new parameters
5163 for the attributes. Call cplus_decl_attributes here,
5164 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
5165 (grokdeclarator): Pass NULL for new start_decl arguments.
5166 * pt.c (tsubst_expr): Likewise.
5167 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
5168 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
5169 * lex.c (build_lang_decl): Add lang_name_java.
5170 * class.c (push_lang_context): Add lang_name_java.
5171 * method.c (build_mangled_name): Check for is_java_type.
5172
5173 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
5174
5175 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
5176 * call.c (build_scoped_method_call): Check for TREE_CODE for
5177 VOID_TYPE instead of type == void_type_node.
5178 (build_method_call): Ditto.
5179 * decl.c (lookup_name_real): Ditto.
5180 (grokdeclarator): Ditto.
5181 (start_decl): Ditto.
5182 (grokparms): Ditto.
5183 (start_function): Ditto.
5184 (finish_function): Ditto.
5185 (start_method): Ditto.
5186
5187 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
5188
5189 * lex.c (finput): New variable.
5190 (init_cpp_parse): Renamed from init_parse.
5191 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
5192 (finish_parse): New function.
5193 * cp-tree.h (init_lex, init_parse): Remove declarations.
5194
5195 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
5196
5197 * call.c (build_call): Still evaluate the actual argument.
5198 * class.c (is_empty_class): Update for -fnew-abi.
5199
5200 * decl2.c: -fnew-abi implies -fsquangle.
5201
5202 * method.c (do_build_assign_ref): Don't do anything to copy
5203 an empty class.
5204 (do_build_copy_constructor): Likewise.
5205 * call.c (build_over_call): Likewise.
5206
5207 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
5208
5209 * tree.c (avoid_overlap): Return a value.
5210
5211 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
5212
5213 * method.c (check_btype): Add missing argument to xrealloc.
5214 (check_ktype): Likewise.
5215
5216 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
5217
5218 Implement empty base optimization.
5219 * class.c (finish_struct_1): Add vbase fields earlier. Set
5220 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
5221 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
5222 (types_overlap_p): New fn.
5223 * tree.c (avoid_overlap): New fn.
5224 (build_base_fields): Use it to avoid overlapping empty bases.
5225 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
5226
5227 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
5228
5229 Re-implement allocation of base class subobjects.
5230 * tree.c (unshare_base_binfos): New fn.
5231 (layout_basetypes): Use it. Now handles offsets of both virtual and
5232 non-virtual bases, after layout_type.
5233 (layout_vbasetypes): Remove.
5234 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
5235 (build_vbase_pointer_fields): Split out from old layout_basetypes.
5236 * class.c (finish_base_struct): Lose offset handling code.
5237 Move nonvdtor warning here. Don't mess with t_binfo anymore.
5238 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
5239 * cp-tree.h: Adjust.
5240
5241 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
5242
5243 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
5244 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
5245 * class.c (duplicate_tag_error): Likewise.
5246 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
5247 * tree.c (layout_vbasetypes): Update from layout_record, remove
5248 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
5249 (layout_basetypes): Likewise.
5250
5251 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
5252
5253 * class.c, Make sure system.h is included just after config.h.
5254 Delete lingering stdio and errno references too.
5255 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
5256
5257 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
5258
5259 * friend.c (is_friend): Fix access control for local classes.
5260
5261 * class.c (is_empty_class): New fn.
5262 * call.c (build_call): Don't pass empty class objects to a function.
5263
5264 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
5265
5266 * call.c (build_over_call): Do name resolution for default
5267 arguments of function templates in the scope of the templates.
5268
5269 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
5270
5271 * call.c: Include system.h. Remove includes, declarations and
5272 defines provided by system.h.
5273 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
5274 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
5275 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
5276 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
5277 * typeck2.c, xref.c: Likewise.
5278 * Makefile.in: Dependencies updated as appropriate.
5279 * Make-lang.in: Likewise.
5280
5281 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
5282
5283 * pt.c (fn_type_unification): Allow incomplete unification without
5284 an immediate error message.
5285
5286 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
5287
5288 * tree.c (member_p): New fn.
5289 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
5290 initializing class members.
5291
5292 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
5293 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
5294
5295 * call.c (build_method_call): Handle non-scoped destructors, too.
5296 * pt.c (tsubst_copy): Likewise.
5297
5298 * pt.c (print_template_context): Split out...
5299 (push_tinst_level): ...from here.
5300
5301 * friend.c (is_friend): Don't pass a type to decl_function_context.
5302
5303 * typeck.c (convert_for_initialization): Always hand off
5304 conversions to class type.
5305
5306 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
5307
5308 * friend.c (is_friend): Local classes have the same access as the
5309 enclosing function.
5310
5311 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
5312
5313 * typeck.c (expand_target_expr): Delete dead function.
5314
5315 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
5316
5317 * repo.c (save_string): Delete dead function.
5318
5319 * method.c (thunk_printable_name): Delete dead function.
5320
5321 * lex.c (yynextch): Delete dead function.
5322
5323 * expr.c (tree_extract_aggr_init): #if 0 out.
5324
5325 * except.c (do_unwind): Delete dead function.
5326 (easy_expand_asm): Likewise.
5327
5328 * cvt.c (build_conversion_type_1): Delete dead function.
5329
5330 * cp-tree.h (push_expression_obstack): Declare.
5331
5332 * call.c (source_type): #if 0 out.
5333
5334 * class.c (alter_access): Remove unused label. Add braces
5335 around empty else clause.
5336
5337 * lex.c (yyprint): Fix argument to printf.
5338
5339 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
5340
5341 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
5342
5343 * pt.c (instantiate_class_template): Make sure template
5344 arguments are permanent.
5345 * init.c (resolve_offset_ref): Don't go looking around in
5346 template types.
5347
5348 * semantics.c: Add routines to handle expressions, and some
5349 declaration processing.
5350 * parse.y: Use them.
5351 (current_class_depth): Move declaration to cp-tree.h.
5352 * parse.c: Regenerated.
5353 * cp-tree.h: Use them.
5354 (current_class_depth): Declare.
5355 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
5356
5357 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
5358
5359 * error.c (dump_decl): Be a bit more explicit with template
5360 type arguments, when verbose.
5361
5362 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
5363
5364 * inc/exception: Reorder closing braces.
5365
5366 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
5367
5368 * pt.c (redeclare_class_template): New function.
5369 * cp_tree.h (redeclare_class_template): Declare it.
5370 * decl.c (xref_tag): Use it.
5371
5372 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
5373
5374 * call.c (build_over_call): Check IS_AGGR_TYPE, not
5375 TYPE_LANG_SPECIFIC.
5376 * typeck.c (convert_arguments): Likewise.
5377
5378 * decl.c (grokdeclarator): Remove const and volatile from type after
5379 setting constp and volatilep.
5380
5381 * class.c (finish_struct_1): Don't warn about bool bitfield larger
5382 than one bit.
5383
5384 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
5385
5386 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
5387
5388 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
5389
5390 * call.c (build_object_call): Complain about ambiguous operator(),
5391 rather that crashing.
5392 (build_new_op): Likewise.
5393 (build_op_delete_call): Likewise.
5394
5395 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
5396
5397 * cvt.c (perform_qualification_conversions): Use comp_target_types
5398 instead of comp_ptr_ttypes.
5399
5400 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
5401
5402 * cp-tree.h (enforce_access): Declare.
5403 * call.c (enforce_access): Make it extern, not static.
5404 * class.c (alter_access): Use enforce_access; modify code for ISO
5405 compliance, rather than ARM rules.
5406
5407 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5408
5409 * cp-tree.h: Fix typo.
5410
5411 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
5412
5413 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
5414 if (aggregate_value_p (type)).
5415
5416 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
5417
5418 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
5419
5420 * tree.c (mapcar): When dealing with a DECL, use it's constant
5421 value, if any.
5422 * pt.c (lookup_template_class): Don't mangle the names of template
5423 classes whose arguments are unknown.
5424
5425 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
5426
5427 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
5428
5429 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
5430
5431 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
5432
5433 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
5434 boolean_type_node to 1.
5435
5436 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
5437
5438 * error.c (dump_expr): Remove unused variable `l'.
5439
5440 * pt.c (for_each_template_parm): New function, created by
5441 converting uses_template_parms.
5442 (tree_fn_t): New typedef.
5443 (uses_template_parms): Use it.
5444 (mark_template_parm): New function.
5445 (push_template_decl): Check that the argument list of a partial
5446 specialization uses all the template parameters.
5447
5448 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
5449 with it; we might want it for debugging.
5450 * cp-tree.h (type_unification): Change interface.
5451 * class.c (finish_struct_1): Skip nested template types, just like
5452 ordinary nested types.
5453 (instantiate_type): Use new interface to type_unification.
5454 * lex.c (init_lex): Add __sz as opname for sizeof.
5455 * method.c (build_overload_scope_ref): New function.
5456 (build_overload_int): Handle complex expressions. Set
5457 numeric_output_need_bar if necessary.
5458 (build_overload_value): Handle non-PARM_DECL nodes; this
5459 routine is now used by build_overload_int. Remove some
5460 assignments to numeric_output_need_bar. Use
5461 build_overload_scope_ref.
5462 (build_qualified_name): Note that some template mangled names end
5463 with digits, and set numeric_output_need_bar appropriately. Use
5464 build_underscore_int.
5465 * pt.c (unify): Change interface.
5466 (type_unification_real): Likewise.
5467 (determine_specialization): Use new interfaces.
5468 (tsubst): Deal gracefully with situations in which the argument
5469 vector is not fully filled.
5470 (fn_type_unification): Use new interfaces.
5471 (type_unification): Likewise. Remove NOP_EXPR hack.
5472 (type_unification_real): Likewise.
5473 (unify): Likewise. Deal with unification of complex expresions.
5474
5475 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
5476
5477 * pt.c (complete_template_args): Initialize skip properly.
5478
5479 * decl.c (make_typename_type): Revert.
5480 (make_implicit_typename): Remove.
5481 (lookup_name_real): Don't call it. Call lookup_field if we see a
5482 TYPE_DECL from a template base.
5483 * search.c (lookup_field): Do implicit typename stuff.
5484
5485 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
5486 Geoff Noer <noer@cygnus.com>
5487
5488 * Makefile.in: Various fixes for building cygwin32 native toolchains.
5489 * Make-lang.in: Likewise.
5490
5491 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5492
5493 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
5494
5495 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
5496
5497 * decl.c (make_implicit_typename): Rewrite removed code.
5498 (make_typename_type): Call it if the type we look up comes from
5499 a base that uses template parms.
5500
5501 * pt.c (complete_template_args): Rewrite.
5502 (tsubst, FUNCTION_DECL): Use it.
5503
5504 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
5505
5506 * semantics.c (finish_asm_stmt): Fix combine strings. Call
5507 c_expand_asm_operands () if output_operands, input_operands or
5508 clobbers is not NULL_TREE.
5509
5510 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5511
5512 * pt.c (complete_template_args): New function.
5513 (get_bindings): Deal with specializations of function templates
5514 with return type containing parameters from outer class
5515 templates.
5516 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
5517 substitute arguments and compose a new type.
5518
5519 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
5520
5521 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
5522 FUNCTION_DECLs.
5523
5524 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
5525
5526 * decl.c (make_implicit_typename): Lose useless code.
5527
5528 * call.c (standard_conversion): Handle A* -> const A* properly.
5529
5530 * pt.c (get_bindings_real): Rename from get_bindings. Add
5531 check_rettype parm.
5532 (get_bindings): Pass 1.
5533 (get_bindings_overload): Pass 0.
5534
5535 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
5536
5537 * pt.c (check_explicit_specialization): When reverting a static
5538 member function, also remove the `this' parameter from
5539 last_function_parms.
5540
5541 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
5542
5543 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
5544 a function context.
5545
5546 * decl.c (store_bindings): Use free_binding_vecs.
5547 (pop_from_top_level): Likewise.
5548
5549 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
5550
5551 * decl.c (make_implicit_typename): Only change the type of a
5552 TYPENAME_TYPE.
5553
5554 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
5555
5556 * semantics.c: New file, containing routines to perform the
5557 semantic phase of parsing.
5558 * parse.y: Use it.
5559 * pt.c (tsubst_expr): Likewise.
5560 * cp-tree.h: Declare the various functions in semantics.c.
5561 Provide macros to access _STMT tree nodes.
5562 * cp-tree.def: Add ASM_STMT tree node.
5563 * Makefile.in, Make-lang.in: Add dependencies on and for
5564 semantics.c.
5565
5566 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
5567
5568 * pt.c (push_template_decl): Only check primary templates.
5569
5570 * pt.c (check_explicit_specialization): Complain about default args
5571 in explicit specialization.
5572
5573 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
5574 constructor_declarator.
5575
5576 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
5577
5578 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
5579 has no overloaded operator ->.
5580
5581 * call.c (build_field_call): Don't crash when presented with a
5582 field that is actually a nested type.
5583
5584 * decl.c (pushtag): Deal with friend class injection in local
5585 classes.
5586
5587 * call.c (build_object_call): Don't crash if OBJ is a
5588 pointer-to-member-function.
5589
5590 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
5591
5592 * pt.c (push_template_decl): Complain about template with C linkage,
5593 anonymous template class.
5594
5595 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
5596
5597 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
5598 * search.c: Likewise.
5599
5600 * lex.c (do_pending_defargs): Only call
5601 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
5602
5603 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
5604
5605 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
5606
5607 * parse.y: Deal with CONSTRUCTORS in new_initializers.
5608
5609 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
5610
5611 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
5612 closely mimics the behavior in parse.y.
5613 (tsubst_expr): Return the resuting BLOCK when making a tsubst'ing
5614 into a compound statement.
5615
5616 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
5617
5618 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
5619 * pt.c (inline_needs_template_parms): New fn.
5620 (original_template): New fn.
5621 (push_inline_template_parms_recursive): New fn.
5622 (maybe_begin_member_template_processing): Use them.
5623 (maybe_end_member_template_processing): Likewise.
5624 (is_member_or_friend_template): Rename to is_member_template.
5625 Member functions of local classes are never member templates.
5626
5627 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5628
5629 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
5630 added in the class scope to catch redefinition error.
5631
5632 * pt.c (reduce_template_parm_level): Also copy
5633 the DECL_TEMPLATE_PARMS field.
5634
5635 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
5636
5637 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
5638 reduced-level template type parameter.
5639
5640 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
5641
5642 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
5643 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
5644 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
5645 * decl.c (duplicate_decls): Propagate it.
5646 * typeck2.c (abstract_virtuals_error): Use two loops to emit
5647 abstract virtual functions and virtual functions which need a
5648 final overrider separately.
5649
5650 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
5651
5652 * lang-specs.h: Properly put brackets around array elements in
5653 initializer.
5654
5655 * typeck.c (build_binary_op_nodefault): Correctly place parens around
5656 && and || in expression.
5657
5658 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
5659
5660 * call.c (default_parm_conversions): Remove prototype definition.
5661 (build_method_call): Remove unused variable result.
5662
5663 * cvt.c (ocp_convert): Remove unused variable conversion.
5664
5665 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
5666
5667 * except.c (do_unwind): #if 0 definition of unused variables fcall
5668 and next_pc.
5669
5670 * expr.c (extract_scalar_init): #if 0 prototype and function
5671 definition.
5672
5673 * init.c (expand_aggr_init_1): Remove unused variable init_type.
5674 (build_new_1): Remove unused variable t.
5675
5676 * pt.c (instantiate_class_template): Remove unused variable newtag;
5677 cast called function return value to void.
5678 (do_decl_instantiation): Remove unused variables name and fn.
5679
5680 * tree.c (get_type_decl): Add default return to shut up compiler from
5681 complaining control reaches end of non-void function.
5682
5683 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
5684
5685 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
5686
5687 * call.c (default_parm_conversions): Remove prototype definition.
5688 (build_method_call): Remove unused variable result.
5689 (build_over_call): Add default case in enumeration switch.
5690
5691 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
5692
5693 * decl2.c (lang_decode_option): Change j's type to size_t.
5694
5695 * tree.c (layout_vbasetypes): record_align and desired_align are of
5696 type unsigned int; const_size and nonvirtual_const_size likewise.
5697
5698 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
5699
5700 * parse.y (new_initializer): Make sure all initializers are
5701 lists.
5702
5703 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
5704
5705 * decl2.c (import_export_decl): Mark tinfo functions for
5706 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
5707
5708 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
5709
5710 * method.c: Fix typo.
5711
5712 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5713
5714 * method.c: Include "system.h" to get stdlib.h, stdio.h,
5715 ctype.h, string.h, etc.
5716 (issue_nrepeats): Add default case in enumeration switch.
5717 (check_btype): Likewise.
5718 (process_overload_item): Likewise.
5719
5720 * Makefile.in (method.o): Depend on system.h.
5721
5722 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
5723
5724 * lex.c (do_scoped_id): Fix parenthesizing.
5725
5726 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
5727
5728 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
5729 FLAG_RTTI is unset, initialize type info machinery and continue
5730 with FLAG_RTTI enabled.
5731 (get_typeid): Ditto.
5732
5733 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
5734
5735 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
5736 from B.
5737
5738 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
5739
5740 * pt.c (finish_member_template_decl): Deal more gracefully with
5741 invalid declarations.
5742
5743 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
5744
5745 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
5746 cp-tree.h: Clean up more old overloading code, old RTTI code, and
5747 some formatting quirks.
5748
5749 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
5750 method.c, pt.c, ptree.c, typeck.c: Remove support for
5751 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
5752 * class.h: Remove.
5753 * Makefile.in: Adjust.
5754
5755 * pt.c (unify): Don't allow reduced cv-quals when strict.
5756
5757 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
5758 *type_unification* and unify.
5759
5760 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
5761
5762 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
5763 (nested_name_specifier): And add it before this use.
5764 (typename_sub0): And this use. Also add use without the keyword.
5765 (typename_sub1): Likewise.
5766 * pt.c (instantiate_class_template): Don't actually instantiate
5767 anything if our type uses template parms.
5768
5769 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
5770
5771 * decl.c (start_function): Don't call temporary_allocation for a
5772 nested function.
5773
5774 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
5775
5776 * pt.c (instantiate_class_template): Don't mess with friends if
5777 our type uses template parms.
5778
5779 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
5780
5781 * parse.y (nested_name_specifier): Use explicit_template_type.
5782 (typename_sub): Allow a template_type, an explicit_template_type,
5783 or an implicit template type at the end.
5784 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
5785 * decl.c (make_typename_type): Handle template-id where the name
5786 is a TEMPLATE_DECL.
5787 * call.c (build_scoped_method_call): Handle member template
5788 destructor call.
5789 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
5790 destructor is represented by the type.
5791
5792 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
5793 * parse.y (nested_name_specifier): Add 'template' case.
5794 (explicit_template_type): New rule.
5795 (typename_sub): Use it.
5796 * decl.c (make_typename_type): Handle getting a template-id for NAME.
5797 * pt.c (tsubst): Likewise.
5798
5799 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
5800
5801 * pt.c (add_to_template_args): Fix thinko.
5802 (instantiate_class_template): Call it later.
5803
5804 * pt.c (get_class_bindings): Add outer_args parm.
5805 (most_specialized_class): Likewise.
5806 (instantiate_class_template): Pass it.
5807 (more_specialized_class): Likewise.
5808 (lookup_template_class): Get context from template if none
5809 was specified.
5810 (finish_member_template_decl): Don't do anything with a
5811 partial specialization.
5812 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
5813 AGGREGATE_TYPE_P.
5814 * class.c (finish_struct): Member class templates have already been
5815 checked for name clashes.
5816 * decl.c (pushdecl_with_scope): Handle pushing at class level.
5817
5818 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
5819
5820 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
5821 (tsubst, *_PARM): Support multiple levels of template classes.
5822 (instantiate_class_template): Look up the pattern from the
5823 original template.
5824 (lookup_template_class): Handle getting a template for d1.
5825 (push_template_decl): Correct setting of 'primary'.
5826 (reduce_template_parm_level): Add 'levels' parm.
5827 (finish_member_template_decl): Support member class templates.
5828 (template_class_depth): Handle multiple levels.
5829 * parse.y (component_decl_1, fn.def2): Remove member template case.
5830 (component_decl): Add member template cases.
5831 * decl2.c (check_member_template): We now handle member template
5832 classes.
5833 * decl.c (pushtag): Handle member templates.
5834 * method.c (do_inline_function_hair): Don't touch
5835 IDENTIFIER_GLOBAL_VALUE.
5836 * init.c (build_offset_ref): If name isn't an identifier, just
5837 return it.
5838 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
5839
5840 * typeck.c (get_delta_difference): Do adjust for conversions to
5841 and from virtual base.
5842
5843 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
5844
5845 * typeck.c (get_delta_difference): Give hard error for conversion
5846 from virtual base.
5847
5848 * cp-tree.h: Tweak formatting.
5849
5850 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
5851
5852 * decl.c (push_namespace): Handle redeclaration error.
5853
5854 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
5855 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
5856 (NAMESPACE_BINDING): New macro.
5857 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
5858 * *.c: Use them.
5859
5860 * pt.c (push_template_decl): Use innermost_args.
5861
5862 * decl.c (get_unique_name): Tweak from earlier in the name.
5863
5864 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
5865
5866 * cp-tree.def: Add CPLUS_BINDING node.
5867 * cp-tree.h (tree_binding): new struct
5868 (BINDING_SCOPE, BINDING_VALUE): new macros
5869 (current_namespace, global_namespace): declare extern
5870 (struct lang_decl_flags): new field in_namespace
5871 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): new macros
5872 (DECL_NAMESPACE, SET_DECL_NAMESPACE): new macros
5873 (TREE_INDIRECT_USING): new macro
5874 * decl2.c (current_namespace, global_namespace): Declare. The
5875 value is a NAMESPACE_DECL now, not a TREE_LIST.
5876 (is_namespace_ancestor, namespace_ancestor):new static functions.
5877 (add_using_namespace, ambiguous_decl): likewise.
5878 (lookup_using_namespace): new support function for lookup_name.
5879 (qualified_lookup_using_namespace): new support function for
5880 do_scoped_id and lookup_namespace_name
5881 (get_namespace_id): mark as obsolete.
5882 (current_namespace_id): Likewise.
5883 (do_namespace_alias): Implement.
5884 (do_using_directive): Implement as call to add_using_namespace.
5885 * decl.c (binding_for_name): new function.
5886 (push_namespace, pop_namespace): implement.
5887 (push_decl): don't install a FUNCTION_DECL in the global branch.
5888 (lookup_namespace_name): implement using qualified lookup.
5889 (lookup_name_real): For global scoping, lookup in
5890 global_namespace. For namespace scoping, lookup in given
5891 namespace. For unscoped lookup, iterate over namespace,
5892 considering using directives.
5893 (init_decl_processing): initialize global_namespace.
5894 (grokvardecl): Build assembler name as static name for globals.
5895 (grokdeclarator): Remove old namespace mangling.
5896 (xref_tag): When installing a global binding for the
5897 tag, make sure we have an identifier.
5898 * method.c (build_overload_nested_name): mangle namespaces.
5899 (build_qualified_name): Likewise.
5900 (build_decl_overload_real): Likewise.
5901 * lex.c (build_lang_decl): set namespace for new declaration to
5902 current_namespace.
5903 (do_scoped_id): find global names in global or current
5904 namespace, or using qualified namespace lookup, depending on
5905 context.
5906 * init.c (build_member_call): When scope is namespace, use
5907 build_x_function_call instead.
5908 (build_offset_ref): When scope is namespace, collapse processing
5909 to lookup_namespace_name instead.
5910 * error.c (dump_decl): Support NAMESPACE_DECL.
5911 * decl.c (pushdecl): Bind globals to current namespace.
5912 (push_overloaded_decl): Likewise.
5913 (lookup_tag): Likewise.
5914 (lookup_name_current_level): Likewise.
5915 (xref_tag): Likewise.
5916 (start_function): Likewise.
5917 * lex.c (do_identifier): Likewise.
5918 (identifier_typedecl_value): Likewise.
5919 (real_yylex): Likewise.
5920 * method.c (do_inline_function_hair): Likewise.
5921 * parse.y (unscoped): Likewise.
5922 * pt.c (check_explicit_specialization): Likewise.
5923 (lookup_template_class): Likewise.
5924 * rtti.c (call_void_fn): Likewise.
5925 * sig.c (build_sigtable): Likewise.
5926 * ptree.c (lang_print_xnode): New function.
5927
5928 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
5929
5930 * pt.c (instantiate_class_template): Don't instantiate if pedantic
5931 and the args use template parms.
5932
5933 * pt.c (push_tinst_level): If the instantiaton uses template parms,
5934 fail silently.
5935 * decl.c (xref_basetypes): Do call complete_type for basetypes
5936 that involve template parameters.
5937
5938 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
5939
5940 * typeck2.c (process_init_constructor): Fix labeled init check.
5941
5942 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
5943
5944 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
5945 argument to tsubst and friends.
5946
5947 * pt.c (tsubst, FUNCTION_DECL): Tidy.
5948
5949 * typeck.c (build_x_function_call): Handle static member function
5950 templates like non-templates. Handle friend templates like normal
5951 function templates.
5952 * pt.c (tsubst, *_PARM): Don't use orig_level.
5953 (get_bindings): Don't call add_to_template_args.
5954 (instantiate_template): Likewise.
5955 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
5956 * ptree.c (print_lang_type): Print index/level for template parms.
5957
5958 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
5959
5960 * Make-lang.in (cc1plus): Note that cc1plus depends on
5961 cp/cp-tree.h and cp/cp-tree.def.
5962
5963 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
5964 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
5965 position in a template parameter list.
5966 * cp-tree.h (template_parm_index): New structure, used as the tree
5967 structure for a TEMPLATE_PARM_INDEX.
5968 (TEMPLATE_PARM_IDX): New macro.
5969 (TEMPLATE_PARM_LEVEL): Likewise.
5970 (TEMPLATE_PARM_DESCENDANTS): Likewise.
5971 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
5972 (TEMPLATE_PARM_DECL): Likewise.
5973 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
5974 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
5975 (TEMPLATE_TYPE_DECL): Likewise.
5976 (TEMPLATE_CONST_IDX): Remove.
5977 (TEMPLATE_CONST_LEVEL): Likewise.
5978 (TEMPLATE_CONST_SET_INFO): Likewise.
5979 (TEMPLATE_TYPE_SET_INFO): Likewise.
5980 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
5981 node.
5982 (TEMPLATE_TYPE_LEVEL): Likewise.
5983 * decl.c (decls_match): Call comp_template_parms, rather than
5984 expanding it inline.
5985 (duplicate_decls): If two template declarations are being merged,
5986 then their TEMPLATE_INFOs should be merged as well.
5987 (grokfndecl): Save template-id information when declaring a friend
5988 with explicit template arguments. Pass arguments to
5989 check_explicit_specialization via correct convention; at some
5990 point check_explicit_specialization changed, but these call-sites
5991 did not.
5992 (grokdeclarator): Tidy up slightly.
5993 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
5994 two template functions with the same DECL_ASSEMBLER_NAME the same,
5995 since the names are not yet mangled.
5996 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
5997 TEMPLATE_CONST_PARM.
5998 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
5999 decl for a non-type parameter, rather than printing `<tparm ...>'.
6000 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
6001 (do_friend): Deal with template friends.
6002 * lex.c (do_pending_inlines): Call
6003 maybe_begin_member_template_processing, rather than
6004 conditionally calling begin_member_template_processing.
6005 (process_next_inline): Likewise. Call
6006 maybe_end_member_template_processing, rather than
6007 conditionally calling end_member_template_processing.
6008 (do_pending_defargs): Likewise.
6009 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
6010 TEMPLATE_CONST_PARM.
6011 * method.c (build_mangled_template_parm_index): New function.
6012 (build_overload_value): Use it.
6013 (build_overload_name): Likewise.
6014 * pt.c (finish_member_template_decl): Allow friend declarations.
6015 (template_class_depth): New function.
6016 (is_member_template): Rename, and modify, to become...
6017 (is_member_or_friend_template): New function.
6018 (end_member_template_processing): Rename, and modify, to become...
6019 (maybe_end_member_template_processing).
6020 (build_template_parm_index): New function.
6021 (reduce_template_parm_level): New function.
6022 (process_template_parm): Modify to use build_template_parm_index.
6023 (push_template_decl): Deal with friend templates.
6024 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
6025 TEMPLATE_CONST_PARM.
6026 (tsubst_friend_function): New function.
6027 (instantiate_class_template): Generate the DECL_FRIENDLIST
6028 for a new instantiation by using tsubst_friend_function rather
6029 than just tsubst.
6030 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
6031 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
6032 appropriate new macros. Use reduce_template_parm_level to
6033 generate lower-level template parameters. Handle tsubst'ing into
6034 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
6035 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
6036 templates. Similarly for the template parameters for a new
6037 template.
6038 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
6039 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
6040 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
6041 (get_bindings): Call add_to_template_args if necessary.
6042 (instantiate_decl): Handle instantiations of friend templates.
6043 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
6044 TEMPLATE_TYPE_PARM as a list of fields; it's not!
6045 * spew.c (yylex): Do a little manual constant propogation to
6046 clarify the code.
6047
6048 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
6049
6050 * error.c: Include sys/types.h.
6051
6052 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
6053
6054 * method.c (build_mangled_name): Start CPP directives in column zero.
6055
6056 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
6057
6058 * typeck2.c (process_init_constructor): Sorry about non-trivial
6059 labeled initializers.
6060 * parse.y (initlist): Reenable labeled initializers.
6061
6062 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6063
6064 * pt.c (coerce_template_parms) Add a new parameter, is_tmpl_parm,
6065 all callers changed. Rely on the new parameter instead of arg
6066 being a TREE_LIST when determine whether we are working inside
6067 template template parameter. Clean up is_type test.
6068
6069 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
6070
6071 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
6072 * typeck2.c (initializer_constant_valid_p): Allow conversions
6073 between pointers and refrerences.
6074
6075 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
6076
6077 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
6078 if pedantic || warn_pointer_arith.
6079
6080 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6081
6082 * pt.c (unify): Handle TEMPLATE_DECL.
6083
6084 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
6085
6086 * cp-tree.h (strip_attrs): Remove decl.
6087
6088 1998-02-18 Doug Evans <devans@cygnus.com>
6089
6090 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
6091 Update olddecl's attributes too.
6092 (strip_attrs): Remove function.
6093 * typeck.c (common_type): Call merge_machine_type_attributes.
6094
6095 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
6096
6097 * parse.y (initdcl0_innards): New grammar symbol.
6098 (nomods_initdecls, nomods_initdcl0): Change type from itype to
6099 none, since the resulting value is never used.
6100 (parse_decl): New function.
6101 (datadef): Remove redundant actions.
6102 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
6103 * parse.c: Regenerated.
6104
6105 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
6106
6107 * parse.y (simple_stmt): Use getdecls() to check for decl.
6108
6109 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
6110
6111 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
6112 macros.
6113 (c++.install-common): Install c++filt properly as native or as cross
6114 variant.
6115 (c++.uninstall): Add c++filt.
6116
6117 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
6118
6119 * call.c (standard_conversion): Fix multi-level ptr conversions.
6120
6121 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
6122
6123 * init.c (build_new): Propagate error_mark_node up.
6124
6125 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
6126
6127 * parse.y (simple_stmt): If the condition isn't a declaration,
6128 start the controlled block after the test.
6129
6130 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6131
6132 * call.c (build_over_call): Convert builtin abs, labs and fabs to
6133 tree-codes.
6134 * decl.c (init_decl_processing): Reenable abs, labs and fabs as
6135 builtins.
6136
6137 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6138
6139 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
6140
6141 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
6142
6143 * cp-tree.h: Add access_protected_virtual_node.
6144 * class.c (init_class_processing): Initialize it.
6145 * decl.c (xref_basetypes): Use it.
6146 * parse.y (base_class_access_list): Likewise.
6147
6148 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
6149 (c++.install-common): Install c++filt.
6150
6151 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6152
6153 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
6154
6155 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
6156
6157 * call.c (reference_binding): Use comptypes when comparing
6158 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
6159
6160 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
6161
6162 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
6163 (really_overloaded_fn): Move check here from is_overloaded_fn.
6164 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
6165
6166 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
6167
6168 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
6169 conversions.
6170
6171 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
6172
6173 * cp-tree.h (push_template_decl): Return the decl passed in, or an
6174 equivalent duplicate.
6175 * decl.c (pushtag): Use the return value from push_template_decl.
6176 (duplicate_decls): When duplicating a template declaration, merge
6177 the DECL_TEMPLATE_RESULTs as well.
6178 (make_implicit_typename): Don't try to dive into typename types to
6179 find a context for making a new implicit typename.
6180 (start_decl): Use the return value from push_template_decl.
6181 (grokdeclarator): Complain about declarations list `const operator
6182 int'. Since we don't correctly handle in-class initializations of
6183 non-static data members, complain about this (now illegal)
6184 practice. Issue an error for initializations of non-const statics
6185 since that is illegal as well, and since we don't handle that case
6186 correctly either.
6187 (start_function): Use the return value from push_template_decl.
6188 (start_method): Likewise.
6189 * decl2.c (grokfield): Likewise. Since the change to
6190 grokdeclarator ensures that all initialized fields are in fact
6191 static, remove a redundant test for TREE_PUBLIC.
6192 * parse.y (initlist): Disable labeled initializers since they do
6193 not work as per the documentation, and since they do not use the
6194 same syntax as the C front end.
6195 * pt.c (push_template_decl): Return the decl passed in, or an
6196 equivalent duplicate.
6197 (lookup_template_class): When searching in a nested context,
6198 use the right arguments.
6199 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
6200 * typeck.c (build_component_ref): Assign the correct type to the
6201 result of build_vfn_ref.
6202
6203 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
6204
6205 * pt.c (convert_nontype_argument): Fix typo.
6206 (check_explicit_specialization): Allow old-style specialization
6207 of class template members.
6208
6209 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
6210 Manfred Hollstein <manfred@s-direktnet.de>
6211
6212 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
6213 when deciding to override DECL_ASSEMBLER_NAME.
6214
6215 Tue Feb 10 15:30:55 EST 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
6216
6217 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
6218 * cp-tree.h (flag_do_squangling): Add declaration.
6219 * lang-options.h: Add -fsquangle and -fno-squangle.
6220 * method.c: Add macros and static variables for squangling.
6221 (build_overload_name): Rename to build_mangled_name, add logic for B
6222 compression, and split into process_modifiers and
6223 process_overload_item.
6224 (process_modifiers): New function, to handle constant, reference,
6225 and pointer types.
6226 (process_overload_item): New function, handles issue of type codes.
6227 (build_overload_name): New function, start squangling and call
6228 build_mangled_name.
6229 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
6230 (start_squangling): New function to initialize squangling structs.
6231 (end_squangling): New function to destroy squangling structs.
6232 (nrepeats): Rename variable to Nrepeats.
6233 (issue_nrepeats): New function for issuing 'n' type repeats.
6234 (check_ktype): New function to check for type K name compression.
6235 (build_overload_nested_name): Add a check for K name compression.
6236 (build_qualified_name): Add a check for K name compression and don't
6237 use DECL_ASSEMBLER_NAME when squangling is on.
6238 (check_btype): New function, checks for B type compression.
6239 (build_static_name, build_decl_overload_real): Initiate squangling.
6240 (build_typename_overload, build_overload_with_type): Initiate
6241 squangling
6242
6243 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
6244
6245 * method.c (make_thunk): Avoid name buffer overflow.
6246
6247 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
6248
6249 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
6250 don't define them yet.
6251
6252 * parse.y (nomods_initdcl0): Add constructor_declarator case.
6253
6254 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6255
6256 * config-lang.in (diff_excludes): Use basename only.
6257
6258 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
6259
6260 * tinfo2.cc: Add tinfo for signed char.
6261
6262 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
6263
6264 * search.c (compute_access): Handle protected constructors in derived
6265 classes as accessible.
6266
6267 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
6268
6269 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
6270 Call convert_from_reference sooner.
6271
6272 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
6273
6274 * cvt.c (ocp_convert): Obtain the constant values from constant
6275 decls even if the destination type is the same as the type of the
6276 decl.
6277
6278 * decl2.c (finish_file): Make sure that static inlines with
6279 definitions are not marked DECL_EXTERNAL before returning.
6280
6281 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
6282
6283 * decl.c: Lose arg_looking_for_template.
6284 (lookup_name_real): Likewise.
6285 * parse.y: Lose processing_template_arg, template_arg1
6286 (primary): Likewise.
6287 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
6288
6289 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6290
6291 * error.c (dump_decl): Fix type of default arguments for template
6292 template parameters and nontype template parameters.
6293 * parse.y (template_parm): Handle invalid default template
6294 template arguments here.
6295
6296 * parse.y (template_parm): Use template_arg instead of PTYPENAME
6297 for default template template argument.
6298 * pt.c (coerce_template_parms): Merge default template argument
6299 codes. Can treat RECORD_TYPE as template name if it is implicitly
6300 created. Fix argument index in error message.
6301 * typeck.c (comptypes): Merge template argument comparison codes in
6302 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
6303
6304 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
6305
6306 * lex.c (file_name_nondirectory): Also check for '/'.
6307
6308 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
6309
6310 * parse.y (primary): Deal with statement-expressions in
6311 templates.
6312 * pt.c (tsubst_copy): Handle BIND_EXPR.
6313 * tree.c (mapcar): Likewise.
6314
6315 * call.c (add_template_candidate_real): Pass extra parameter to
6316 fn_type_unification.
6317 * cp-tree.h (fn_type_unification): Add parameter.
6318 * pt.c (fn_type_unification): Add additional parameter to deal with
6319 static member functions.
6320 (get_bindings): Deal with static member functions.
6321
6322 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
6323 (revert_static_member_fn): Declare.
6324 * decl.c (revert_static_member_fn): Remove declaration. Change
6325 linkage from internal to external.
6326 (cp_finish_decl): Deal with virtual functions in classes local to
6327 template functions.
6328 * decl2.c (finish_file): Don't forget to emit increment/decrement
6329 expressions in initializers for file-scope variables.
6330 * parse.y (typename_sub2): If the typename doesn't names a
6331 template, rather than a type, issue an error message.
6332 * pt.c (check_explicit_specialization): Handle specializations of
6333 static member functions.
6334 (coerce_template_parms): Handle offset references to lists of
6335 member functions.
6336 * search.c (note_debug_info_needed): Don't crash when handed a
6337 type which is being defined.
6338 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
6339 that can happen with some illegal code.
6340
6341 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6342
6343 * call.c (user_harshness): Initialize `code' to 0.
6344 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
6345 (null_ptr_cst_p): Add parentheses around && within ||.
6346 (standard_conversion): Likewise.
6347 (z_candidate): Likewise.
6348 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
6349 (build_object_call): Likewise for `mem_args'.
6350 (build_new_op): Likewise for `mem_arglist'. Add `return' from
6351 default case in enumeration switch.
6352
6353 * class.c (build_vtable_entry): Add explicit braces to avoid
6354 ambiguous `else'.
6355 (build_class_init_list): Likewise.
6356 (finish_struct_1): Initialize `width' to 0.
6357 (instantiate_type): Initialize `name' to NULL_TREE. Add
6358 explicit braces to avoid ambiguous `else'.
6359
6360 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
6361 `else'.
6362
6363 * decl.c (grok_reference_init): Eliminate unused parameter, all
6364 callers changed.
6365 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
6366 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
6367 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
6368 (grokdeclarator): Add parentheses around && within ||. Add
6369 explicit braces to avoid ambiguous `else'.
6370 (grokparms): Initialize `type' to NULL_TREE.
6371 (xref_tag): Remove unused label `just_return'.
6372 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
6373 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
6374 (hack_incomplete_structures): Add parentheses around assignment
6375 used as truth value.
6376
6377 * decl2.c (coerce_delete_type): Hide definition of `e3'.
6378
6379 * error.c: Include <stdlib.h>.
6380 (dump_expr): Change the type of `i' to size_t. Remove unused
6381 label `error'.
6382
6383 * except.c (init_exception_processing): Remove unused variable `d'.
6384 (expand_throw): Likewise for `label'.
6385
6386 * friend.c (add_friends): Add explicit braces to avoid ambiguous
6387 `else'.
6388
6389 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
6390 (sort_base_init): Likewise for `binfo'.
6391 (expand_member_init): Likewise for `rval'.
6392 (build_member_call): Add parentheses around assignment used as
6393 truth value.
6394 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
6395 (build_new): Initialize `nelts' to NULL_TREE. Initialize
6396 `old_immediate_size_expand' to 0.
6397 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
6398 (build_vec_delete_1): Remove unused variable `block'.
6399 (expand_vec_init): Initialize `itype' to NULL_TREE.
6400
6401 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
6402 declaration of `index' and `rindex' with autoconf macros.
6403 (reinit_parse_for_expr): Remove unused variables
6404 `look_for_semicolon' and `look_for_lbrac'.
6405 (cons_up_default_function): Initialize `args' to NULL_TREE.
6406 (readescape): Initialize `firstdig' to 0.
6407 (real_yylex): Add parentheses around assignment used as truth value.
6408
6409 * method.c: Include <strings.h> if we don't have <string.h>.
6410 Protect declaration of `index' with autoconf macro.
6411
6412 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
6413 Initialize `type' to NULL_TREE.
6414 (structsp): Remove unused variable `id'.
6415
6416 * pt.c (coerce_template_parms): Add explicit braces to avoid
6417 ambiguous `else'.
6418 (lookup_template_class): Initialize `template' to NULL_TREE.
6419 (instantiate_class_template): Remove unused variable `name' and `e'.
6420 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
6421 (do_poplevel): Initialize `saved_warn_unused' to 0.
6422 (type_unification): Remove unused varable `parm'.
6423 (unify): Likewise for `j'.
6424
6425 * repo.c (init_repo): Add parentheses around assignment used as
6426 truth value.
6427 (finish_repo): Remove unused varable `p'.
6428
6429 * search.c (get_binfo): Initiize `type' to NULL_TREE.
6430 (get_base_distance): Likewise.
6431 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
6432 and `new_v' to NULL_TREE.
6433 (lookup_fnfields): Likewise for `rval_binfo_h'.
6434 (breadth_first_search): Add parentheses around assignment used as
6435 truth value.
6436 (get_template_base): Initialize `type' to NULL_TREE.
6437
6438 * sig.c (append_signature_fields): Initialize `last_mfptr' to
6439 NULL_TREE.
6440 (build_signature_table_constructor): Likewise for
6441 `last_rhs_field', `pfn' and `vt_off'.
6442 (build_sigtable): Likewise for `init'.
6443
6444 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
6445 (propagate_binfo_offsets): Likewise for `delta'.
6446 (hash_tree_cons): Initialize hashcode to 0.
6447 (can_free): Likewise for `size'.
6448 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
6449
6450 * typeck.c (convert_sequence): Hide prototype.
6451 (common_type): Add explicit braces to avoid ambiguous `else'.
6452 (comp_target_types): Likewise.
6453 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
6454 (build_function_call_real): Add explicit braces to avoid ambiguous
6455 `else'.
6456 (convert_arguments): Initialize `called_thing' to 0.
6457 (convert_for_initialization): Initialize `savew' and `savee' to 0.
6458
6459 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
6460 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
6461 (build_x_arrow): Likewise for `last_rval'.
6462
6463 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
6464
6465 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
6466
6467 * decl.c (init_decl_processing): Use set_sizetype.
6468 * decl2.c (sizetype): Don't declare.
6469 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
6470 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
6471 (build_component_addr, unary_complex_lvalue): Likewise.
6472 * rtti.c (expand_class_desc): Likewise.
6473 * class.c (get_vfield_offset): Likewise.
6474
6475 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
6476
6477 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
6478 early to avoid bogus error. Handle overloaded function
6479 names provided as template arguments correctly.
6480 (coerce_template_parms): Don't mishandle overloaded functions when
6481 dealing with template template parameters.
6482 (lookup_template_class): Issue an error message, rather than
6483 crashing, when the TYPE_DECL provided is not a template type.
6484
6485 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
6486
6487 * class.c (instantiate_type): Don't just return a known type if
6488 it's wrong.
6489
6490 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
6491
6492 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
6493 since that code could never be reached.
6494
6495 * error.c (dump_decl): Avoid aborting in the midst of printing an
6496 error message about an illegal template declaration.
6497
6498 * parse.y (structsp): Print an error message, rather than crashing,
6499 when a class-head does not name a class.
6500
6501 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
6502 template arguments as a g++ extension.
6503
6504 * cp-tree.def (ALIGNOF_EXPR): New tree code.
6505 * decl2.c (grok_alignof): If processing_template_decl, just store
6506 the expression.
6507 * typeck.c (c_alignof): Likewise.
6508 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
6509 * error.c (dump_expr): Likewise.
6510 * pt.c (tsubst_copy): Likewise.
6511 * tree.c (cp_tree_equal): Likewise.
6512 * pt.c (uses_template_parms): Correctly determine whether or not a
6513 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
6514 folding can be done.
6515
6516 * cp-tree.h (grok_enum_decls): Remove type parameter.
6517 * decl.c (grok_enum_decls): Likewise.
6518 * decl2.c (grok_x_components): Call grok_enum_decls
6519 unconditionally, since it will do nothing if there is no
6520 current_local_enum. Use the new calling sequence.
6521 * pt.c (tsubst_enum): Use the new calling sequence for
6522 grok_enum_decls.
6523
6524 * decl.c (start_function): Make member functions of local classes
6525 in extern inline functions have comdat linkage here...
6526 (grokdeclarator): Rather than here.
6527
6528 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
6529
6530 * pt.c (convert_nontype_argument): Use decl_constant_value.
6531
6532 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
6533
6534 * call.c (add_template_candidate_real): New function.
6535 (add_template_candidate): Use it.
6536 (add_template_conv_candidate): Likewise.
6537 (joust): Pass extra argument to more_specialized.
6538 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
6539 (is_local_class): Remove.
6540 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
6541 * cp-tree.h (is_local_class): Remove.
6542 (perform_array_to_pointer_conversion): Likewise.
6543 (finish_member_template_decl): Add.
6544 (check_explicit_specialization): Return a tree, not an int.
6545 (more_specialized): Take additional argument.
6546 (get_bindings): Likewise.
6547 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
6548 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6549 (perform_array_to_pointer_conversion): Remove.
6550 * decl.c (saved_scope): Add processing_specialization,
6551 processing_explicit_instantiation fields.
6552 (maybe_push_to_top_level): Save them.
6553 (pop_from_top_level): Restore them.
6554 (grokfndecl): Use new return value from
6555 check_explicit_specialization.
6556 (start_decl): Don't check flag_guiding_decls before pushing
6557 decls.
6558 (cp_finish_decl): Remove previous (bogus) change.
6559 (grok_declarator): Use decl_function_context rather than
6560 is_local_class.
6561 * decl2.c (finish_file): Pass extra argument to get_bindings.
6562 (build_expr_from_tree): Let build_x_component_ref check
6563 validity of arguments rather than doing it here.
6564 * lex.c (cons_up_default_function): Remove code fooling with
6565 processing_specialization, processing_explicit_instantiation
6566 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
6567 * method.c (build_overload_identifier): Mangle local classes in
6568 template functions correctly.
6569 * parse.y (finish_member_template_decl): Move to pt.c.
6570 * pt.c (finish_member_template_decl): Moved here from parse.y.
6571 (print_candidates): New function.
6572 (determine_specialization): Change interface. Properly look for
6573 most specialized versions of template candidates.
6574 (check_explicit_specialization): Fully process explicit
6575 instantiations.
6576 (push_template_decl): Avoid looking at CLASSTYPE fields in
6577 FUNCTION_DECLS.
6578 (determine_overloaded_function): Remove.
6579 (convert_nontype_argument): Change name from
6580 convert_nontype_parameter. Use determine_overloaded_function
6581 instead of instantiate_type.
6582 (mangle_class_name_for_template): Handle type contexts as well as
6583 function contexts.
6584 (classtype_mangled_name): Likewise.
6585 (lookup_template_class): Likewise.
6586 (tsubst): Likewise.
6587 (more_specialized): Take explict template arguments as a
6588 parameter.
6589 (most_specialized): Likewise.
6590 (get_bindings): Likewise. Check that return types match before
6591 proclaiming a function a match.
6592 (do_decl_instantiation): Remove code searching for function to
6593 instantiate; that is now done in check_explicit_specialization.
6594 (add_maybe_template): Pass extra argument to get_bindings.
6595 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
6596 implementation.
6597 * typeck.c (build_component_ref): Check for invalid arguments.
6598
6599 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
6600
6601 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
6602 return_target and call_target are equivalent.
6603
6604 * pt.c (type_unification_real): Just accept function parms that
6605 don't use any template parms.
6606
6607 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
6608
6609 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
6610 unset DECL_NOT_REALLY_EXTERN.
6611
6612 * parse.y (typename_sub*): Fix std::.
6613
6614 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
6615
6616 * error.c (dump_decl): Fix type default template args.
6617 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
6618
6619 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
6620
6621 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
6622 (file_name_nondirectory): Use.
6623
6624 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6625
6626 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
6627 that are not really present. Substitute default arguments in
6628 template template arguments. Correctly convert TEMPLATE_DECL to
6629 TEMPLATE_TEMPLATE_PARM.
6630 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
6631 are no longer treated specially here.
6632 * parse.y (template_template_parm): Fix copy error.
6633 * decl.c (grokdeclarator): Warn about missing `typename' for nested
6634 type created from template template parameters.
6635 * parse.y (bad_parm): Likewise
6636
6637 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
6638 (push_nested_class): Likewise.
6639 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
6640 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
6641 (copy_template_template_parm): Declare.
6642 * decl.c (arg_looking_for_template): New variable.
6643 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
6644 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
6645 node if arg_looking_for_template is nonzero.
6646 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
6647 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
6648 (grokdeclarator): Handle TEMPLATE_DECL.
6649 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
6650 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
6651 (dump_type_prefix, dump_type_suffix) Handle TEMPLATE_TEMPLATE_PARM.
6652 (dump_decl): Handle unnamed template type parameters.
6653 Handle template template parameters.
6654 (dump_function_name): Handle template template parameters.
6655 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
6656 Handle TEMPLATE_TEMPLATE_PARM.
6657 * method.c (build_template_template_parm_names): New function.
6658 (build_template_parm_names): Handle TEMPLATE_DECL.
6659 (build_overload_nested_name, build_overload_name):
6660 Handle TEMPLATE_TEMPLATE_PARM.
6661 * parse.y (maybe_identifier): New nonterminal.
6662 (template_type_parm): Use it.
6663 (template_template_parm, template_arg1): New nonterminal.
6664 (template_parm): Add template_template_parm rules.
6665 (template_arg): Set processing_template_arg.
6666 (template_arg1): Rules moved from template_arg.
6667 (primary, nonnested_type): Set arg_looking_for_template if we are
6668 processing template arguments.
6669 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
6670 (process_template_parm): Handle template template parameters.
6671 (coerce_template_parms, comp_template_args): Likewise.
6672 (mangle_class_name_for_template, lookup_template_class): Likewise.
6673 (uses_template_parms): Handle TEMPLATE_DECL and
6674 TEMPLATE_TEMPLATE_PARM.
6675 (current_template_args): Handle TEMPLATE_DECL.
6676 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
6677 * search.c (dfs_walk, dfs_record_inheritance):
6678 Handle TEMPLATE_TEMPLATE_PARM.
6679 * tree.c (copy_template_template_parm): New function.
6680 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
6681 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
6682
6683 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
6684
6685 * decl.c (start_decl): Don't allow duplicate definitions of static
6686 data members.
6687
6688 * call.c (build_user_type_conversion_1): Handle user-defined
6689 template conversion operators correctly.
6690
6691 * decl2.c (build_expr_from_tree): Issue an error message if the
6692 object in a COMPONENT_REF is a TEMPLATE_DECL.
6693
6694 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
6695
6696 * class.c (is_local_class): New function.
6697 * cp-tree.h (is_local_class): Declare it.
6698 (last_tree): Likewise.
6699 (begin_tree): Likewise.
6700 (end_tree): Likewise.
6701 (lookup_template_class): Change prototype.
6702 * decl.c (cp_finish_decl): Check for NULL where necesary.
6703 Consider FUNCTION_DECLS to declare objects with top-level binding,
6704 when calling make_decl_rtl.
6705 (grokdeclarator): Give members of local classes internal linkage.
6706 (start_function): Remove declaration of last_tree.
6707 (finish_function): Set flag_keep_inline_functions around call to
6708 rest_of_compilation if we are processing a member function in a
6709 local class.
6710 (start_method): Call push_template_decl for member functions of
6711 local classes in template functions.
6712 * decl2.c (import_export_decl): Don't give external linkage to
6713 instantiations of templates with internal linkage.
6714 * parse.y (last_tree): Remove declaration.
6715 (template_type): Pass extra parameter to lookup_template_class.
6716 (self_template_type): Likewise.
6717 (structsp): Move call to reset_specialization into left_curly.
6718 (left_curly): Call reset_specialization, and begin_tree.
6719 * pt.c (saved_trees): New variable.
6720 (mangle_class_name_for_template): Change prototype. Use
6721 additional function context to name local classes in templates
6722 correctly.
6723 (classtype_mangled_name): Pass the context.
6724 (push_template_decl): Handle local classes and templates, and
6725 member functions for such classes.
6726 (convert_nontype_parameter): Fix handling of pointer-to-member
6727 constants.
6728 (lookup_template_class): Handle local classes in templates.
6729 (tsubst): Likewise. Don't assume that template instantiations
6730 have external linkage; pay attention to the template declaration.
6731 (mark_decl_instantiated): Likewise.
6732 (begin_tree): New function.
6733 (end_tree): Likewise.
6734
6735 * decl.c (xref_basetypes): Don't call complete_type for basetypes
6736 that involve template parameters; that can lead to infinite
6737 recursion unnecessarily.
6738
6739 * pt.c (register_specialization): Do not register specializations
6740 that aren't ready to be registered yet.
6741 (check_explicit_specialization): Handle explicit specialization of
6742 constructors and destructors.
6743 (build_template_decl): New function.
6744 (push_template_delc): Handle out-of-class specializations of
6745 member templates.
6746
6747 * pt.c (check_explicit_specialization): Set up the template
6748 information before registering the specialization.
6749 (coerce_template_parms): Fix thinko.
6750 (tsubst): Handle specializations of member templates correctly.
6751
6752 * class.c (finish_struct_methods): Remove calls to
6753 check_explicit_specialization from here.
6754 (finish_struct): And insert them here.
6755 * cp-tree.h (perform_qualification_conversions): New function.
6756 (perform_array_to_pointer_conversion): Likewise.
6757 (begin_explicit_instantiation): Likewise.
6758 (end_explicit_instantiation): Likewise.
6759 (determine_specialization): Renamed from
6760 determine_explicit_specialization.
6761 (comp_template_parms): New function.
6762 (processing_explicit_instantiation): New variable.
6763 * cvt.c (perform_qualification_conversions): New function.
6764 (perform_array_to_pointer_conversion): Likewise.
6765 * decl.c (duplicate_decls): Don't consider template functions
6766 alike unless they have the same parameters. Refine handling of
6767 instantiation/specialization mismatches.
6768 (start_decl): Don't call pushdecl for template specializations,
6769 since they don't affect overloading.
6770 (start_function): Likewise
6771 (grokfndecl): Call check_explicit_specialization a little later.
6772 Don't call duplicate_decls for memberm template specializations.
6773 (grokdeclarator): Don't update template_count for classes that are
6774 themselves specializations. Remove use of `2' as parameter to
6775 grokfndecl since that value isn't used.
6776 * lex.c (cons_up_default_function): Save and restore
6777 processing_explicit_instantiation around calls to grokfield.
6778 * parse.y (finish_member_template_decl): New function.
6779 (component_decl_1): Use it.
6780 (fn.def2): Likewise.
6781 (template_arg_list_opt): New nonterminal.
6782 (template_type): Use it.
6783 (self_template_type): Likewise.
6784 (template_id): Likewise.
6785 (object_template_id): Likewise.
6786 (notype_template_declarator): Likwise.
6787 (begin_explicit_instantiation): Likewise.
6788 (end_explicit_instantiation): Likewise.
6789 (explicit_instantiation): Use them.
6790 * pt.c (coerce_template_parms): Add parameters.
6791 (processing_explicit_instantiation): New variable.
6792 (convert_nontype_parameter): New function.
6793 (determine_overloaded_function): Likewise.
6794 (begin_explicit_instantiation): Likewise.
6795 (end_explicit_instantiation): Likewise.
6796 (retrieve_specialization): Likewise.
6797 (register_specialization): Likewise.
6798 (processing_explicit_specialization): Removed.
6799 (determine_specialization): Handle specializations of member
6800 functions of template class instantiations.
6801 (check_explicit_specialization): Refine to conform to standard.
6802 (comp_template_parms): New function.
6803 (coerce_template_parms): Call convert_nontype_parameter.
6804 (tsubst): Refine handling of member templates. Use
6805 register_specialization.
6806 (instantiate_template): Use retrieve_specialization.
6807 (do_decl_instantiation): Likewise.
6808 (instantiate_decl): Likewise.
6809 (type_unification): Improve handling of explict template
6810 arguments.
6811 * tree.c (mapcar): Return error_mark_node, rather than aborting,
6812 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
6813 * typeck.c (build_unary_op): Call determine_specialization, rather
6814 than determine_explicit_specialization.
6815
6816 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
6817
6818 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
6819
6820 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
6821
6822 * error.c (dump_decl): For enum tags, output the tag, not its value.
6823
6824 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
6825
6826 * decl.c (init_decl_processing): Only call init_rtti_processing
6827 FLAG_RTTI is set.
6828
6829 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
6830
6831 * init.c (build_new_1): Split out from build_new.
6832 (build_new): Just return a NEW_EXPR.
6833 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
6834
6835 * decl2.c (get_temp_regvar): Tweak.
6836
6837 * cp-tree.h (TREE_CALLS_NEW): Comment out.
6838 * class.c (resolves_to_fixed_type_p): Remove use.
6839 * method.c (build_opfncall): Likewise.
6840 * call.c (build_new_op): Likewise.
6841
6842 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
6843
6844 * exception.cc (__eh_alloc, __eh_free): New fns.
6845 (__cp_push_exception, __cp_pop_exception): Use them.
6846 (__uncatch_exception): Call terminate here if no exception.
6847 * except.c (build_terminate_handler): New fn.
6848 (expand_start_catch_block): Use it.
6849 (expand_exception_blocks): Likewise.
6850 (alloc_eh_object): New fn.
6851 (expand_throw): Use it. Protect exception init with terminate.
6852 * typeck.c (build_modify_expr): Remove code that ignores trivial
6853 methods.
6854
6855 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6856
6857 * call.c (add_builtin_candidate): Add default case in enumeration
6858 switch.
6859 (build_new_op): Likewise.
6860 (convert_like): Likewise.
6861 * cvt.c (build_expr_type_conversion): Likewise.
6862 * tree.c (real_lvalue_p): Likewise.
6863 (lvalue_p): Likewise.
6864 (cp_tree_equal): Likewise.
6865 * typeck.c (comptypes): Likewise.
6866 (build_component_ref): Likewise.
6867 (build_function_call_real): Likewise.
6868 (build_binary_op_nodefault): Likewise.
6869 (build_unary_op): Likewise.
6870 (build_modify_expr): Likewise.
6871 * typeck2.c (initializer_constant_valid_p): Likewise.
6872
6873 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
6874
6875 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
6876
6877 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
6878
6879 * pt.c (coerce_template_parms): Make sure to digest_init if
6880 possible.
6881
6882 * decl.c (duplicate_decls): Make the newdecl virtual if the
6883 olddecl was, just as is done with other attributes of olddecl.
6884
6885 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
6886
6887 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
6888 address of an OFFSET_REF.
6889
6890 * cp-tree.def: Add AGGR_INIT_EXPR.
6891 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
6892 AGGR_INIT_EXPR where appropriate.
6893 * expr.c (cplus_expand_expr): Likewise. Simplify.
6894
6895 * decl2.c (finish_file): Remove call to register_exception_table.
6896
6897 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6898
6899 * pt.c (instantiate_class_template): Don't do injection when
6900 processing_template_decl is true, as pollutes current_binding_level
6901 for base classes.
6902
6903 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
6904
6905 * pt.c (maybe_fold_nontype_arg): Add prototype.
6906
6907 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
6908
6909 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
6910 * error.c (dump_expr): Likewise.
6911
6912 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
6913
6914 * typeck.c (build_function_call_real): Remove "inline called before
6915 definition" pedwarn.
6916
6917 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
6918
6919 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
6920
6921 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
6922
6923 * pt.c (type_unification_real): Change __null to type void* with
6924 a warning.
6925
6926 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
6927
6928 * call.c (implicit_conversion): Don't call
6929 build_user_type_conversion_1 with a NULL expr, since it will
6930 crash.
6931
6932 * pt.c (unify): Don't try to unify array bounds if either array is
6933 unbounded.
6934
6935 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
6936
6937 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
6938 Replace extern decls with casts.
6939
6940 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
6941 Update last_parm_cleanup_insn.
6942 (store_after_parms): Remove.
6943 * cp-tree.h: Adjust.
6944
6945 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
6946
6947 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
6948 (finish_file): Check DECL_COMDAT instead of weak|one_only.
6949 (import_export_vtable): Use make_decl_one_only instead of
6950 comdat_linkage for win32 tweak.
6951 (import_export_decl): Likewise.
6952 * pt.c (mark_decl_instantiated): Likewise.
6953
6954 * decl2.c (finish_file): Lose handling of templates in pending_statics.
6955
6956 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
6957
6958 * decl2.c (finish_file): Lose call to expand_builtin_throw.
6959 * except.c (expand_builtin_throw): Remove.
6960 * cp-tree.h: Remove ptr_ptr_type_node.
6961 * decl.c: Likewise.
6962
6963 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
6964
6965 * decl.c (ptr_ptr_type_node): Define.
6966 (init_decl_processing): Initialize it.
6967 * cp-tree.h: Declare it.
6968 * exception.cc (__cp_exception_info): Use __get_eh_info.
6969 (__cp_push_exception): Ditto.
6970 (__cp_pop_exception): Ditto.
6971
6972 From Scott Snyder <snyder@d0sgif.fnal.gov>:
6973 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
6974 saved_pc.
6975 (init_exception_processing): Removed saved_pc initialization.
6976
6977 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
6978
6979 * pt.c (instantiate_decl): Defer all templates but inline functions.
6980
6981 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
6982
6983 * init.c (expand_vec_init): Don't fold a list of parameters.
6984
6985 * decl.c (copy_args_p): Handle copy elision for types with virtual
6986 bases.
6987 * call.c (build_over_call): Likewise.
6988
6989 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
6990
6991 * pt.c (lookup_template_function): Copy the template arguments,
6992 not just the list containing them, to the permanent obstack.
6993
6994 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
6995
6996 * except.c (expand_start_catch_block): suspend_momentary for the
6997 terminate handler.
6998
6999 * error.c (dump_decl): Handle LOOKUP_EXPR.
7000
7001 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
7002
7003 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
7004 permanent obstack if we are processing a template decl.
7005 * typeck.c (build_static_cast): Likewise.
7006 (build_const_cast): Likewise.
7007 (build_reinterpret_cast): Likewise.
7008
7009 * pt.c (coerce_template_parms): Coerce some expressions, even
7010 when processing_template_decl.
7011
7012 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7013
7014 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
7015 handling of pointer difference expressions.
7016
7017 * typeck.c (comp_target_types): Comparison of function/method types
7018 is independent of nptrs.
7019
7020 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
7021
7022 * pt.c (tsubst): Avoid creating pointer to reference and
7023 reference to reference types.
7024
7025 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
7026
7027 * parse.y (do_id): New nonterminal.
7028 (template_id): Use it.
7029
7030 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
7031
7032 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
7033 * spew.c (yylex): Don't do_identifier here.
7034 * decl2.c (build_expr_from_tree): Revert last change.
7035
7036 * decl2.c (build_expr_from_tree): Expand the name for a method call.
7037 * parse.y (object_template_id): Don't try to take the DECL_NAME.
7038
7039 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
7040
7041 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
7042 alloc_expr.
7043 * call.c (build_op_delete_call): Adjust.
7044
7045 * except.c (expand_end_catch_block): Lose rethrow region.
7046 (expand_start_catch_block): Likewise.
7047 (expand_end_catch_block): Don't expand_leftover_cleanups.
7048
7049 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7050
7051 * pt.c (tsubst): Remove tree_cons call (places redundant info into
7052 DECL_TEMPLATE_INSTANTIATION).
7053
7054 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
7055
7056 * tree.c (is_overloaded_fn): Handle getting a fn template.
7057 (really_overloaded_fn): Likewise.
7058 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
7059 * pt.c (check_explicit_specialization): Tweak.
7060 (determine_explicit_specialization): Tweak.
7061
7062 * tree.c, cp-tree.h (get_target_expr): New fn.
7063
7064 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
7065
7066 * pt.c (check_explicit_specialization): Fix misspelling in
7067 diagnostic: `preceeded'.
7068 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
7069 `conversiona'.
7070
7071 1997-12-02 Mark Mitchell <mmitchell@usa.net>
7072
7073 * pt.c (determine_explicit_specialization): Avoid an internal
7074 error for bad specializations.
7075
7076 * method.c (build_overload_value): Handle SCOPE_REF.
7077
7078 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
7079
7080 * class.c (prepare_fresh_vtable): Enable even more complex MI
7081 vtable names.
7082
7083 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
7084
7085 * exception.cc (__check_eh_spec): Optimize a bit.
7086
7087 * exception.cc (__cp_pop_exception): Lose handler arg.
7088 * except.c (do_pop_exception): Likewise.
7089 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
7090 (expand_end_catch_block): Likewise.
7091
7092 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7093
7094 * pt.c (check_explicit_specialization): Complain about using a
7095 template-id for a non-specialization.
7096
7097 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
7098
7099 * repo.c: Prototype rindex only if needed.
7100 * xref.c: Likewise.
7101
7102 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7103
7104 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
7105
7106 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
7107
7108 * typeck.c (build_const_cast): Handle references here instead of
7109 handing off to convert_to_reference.
7110
7111 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
7112 TerminateFunctionCall.
7113 (init_exception_processing): Likewise. Terminate et al are now
7114 the fns, not ADDR_EXPRs.
7115 (various): Lose redundant assemble_external calls.
7116 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
7117
7118 * cp-tree.h (struct lang_decl_flags): Add comdat.
7119 (DECL_COMDAT): New macro.
7120 * decl.c (duplicate_decls): Propagate it.
7121 (cp_finish_decl): Handle it.
7122 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
7123
7124 * class.c: Remove static pending_hard_virtuals.
7125 (add_virtual_function): Take pointers to pending_virtuals
7126 and pending_hard_virtuals.
7127 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
7128
7129 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
7130
7131 * decl2.c (import_export_vtable): If we support one_only but not
7132 weak symbols, mark instantiated template vtables one_only.
7133 (import_export_decl): Likewise for tinfo functions.
7134 (finish_vtable_vardecl): Also write out vtables from explicitly
7135 instantiated template classes.
7136 * pt.c (mark_class_instantiated): Revert last change.
7137
7138 * except.c (expand_throw): Call mark_used on the destructor.
7139
7140 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
7141
7142 * lex.c (lang_init): Enable flag_exceptions by default if no
7143 command line switch was specified.
7144
7145 1997-11-26 Mark Mitchell <mmitchell@usa.net>
7146
7147 * pt.c (unify): Handle `void' template parameters in
7148 specializations.
7149
7150 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
7151
7152 * rtti.c (build_dynamic_cast): Handle template case here.
7153 (build_dynamic_cast_1): Not here.
7154
7155 * typeck2.c (digest_init): Make copies where appropriate.
7156
7157 * decl2.c (delete_sanity): resolve_offset_ref.
7158
7159 * except.c: Call terminate without caching so many bits.
7160
7161 * except.c (expand_start_catch_block): Fix catching a reference
7162 to pointer.
7163
7164 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
7165
7166 * init.c (build_new): Copy size to the saveable obstack.
7167
7168 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
7169 TRY_CATCH_EXPR for now.
7170
7171 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
7172
7173 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
7174 has DECL_LANG_SPECIFIC.
7175
7176 * exception.cc (struct cp_eh_info): Add handlers field.
7177 (__cp_push_exception): Initialize it.
7178 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
7179 (__throw_bad_exception): Remove.
7180 * except.c (call_eh_info): Add handlers field.
7181 (get_eh_handlers): New fn.
7182 (push_eh_cleanup): Increment handlers.
7183
7184 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
7185
7186 * except.c (expand_start_eh_spec): Use the try/catch code.
7187 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
7188 doing everything inline.
7189 (init_exception_processing): throw_type_match now takes
7190 const void pointers.
7191 * exception.cc (__check_eh_spec): New fn.
7192 * inc/exception: Neither terminate nor unexpected return.
7193 * decl.c: Make const_ptr_type_node public.
7194 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
7195
7196 * except.c (expand_start_catch_block): We only need the rethrow
7197 region for non-sjlj exceptions.
7198 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
7199
7200 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
7201
7202 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
7203 (various.o): Likewise.
7204 * inc/new: Add placement deletes. Add throw specs for default new.
7205 * new.cc (set_new_handler): Move here from libgcc2.
7206 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
7207 (new): Move from libgcc2. Throw bad_alloc.
7208 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
7209 * decl.c (init_decl_processing): Update exception specs on new and
7210 delete.
7211
7212 * method.c (build_decl_overload_real): Don't mess with global
7213 placement delete.
7214
7215 * init.c (build_new): Check for null throw spec, not nothrow_t.
7216
7217 * decl.c (duplicate_decls): Don't complain about different exceptions
7218 from an internal declaration.
7219
7220 * call.c (build_op_delete_call): Fix check for member fns again.
7221
7222 * decl2.c (import_export_decl): Interface hackery affects
7223 virtual synthesized methods.
7224
7225 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7226
7227 * decl.c (start_decl): Don't just complain about a mismatched
7228 scope, fix it.
7229
7230 * decl.c (make_implicit_typename): Handle case where t is not
7231 actually from context.
7232 * tree.c (get_type_decl): Lose identifier case.
7233 * spew.c (yylex): Lose useless call to identifer_typedecl_value.
7234 * parse.y (nonnested_type): Just use lookup_name.
7235 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
7236
7237 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
7238
7239 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
7240 T was built in C language context (for example, by
7241 output_func_start_profiler).
7242
7243 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
7244
7245 * decl.c (make_implicit_typename): New fn.
7246 (lookup_name_real): Use it. Use current_class_type as the context.
7247
7248 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
7249
7250 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
7251
7252 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
7253
7254 * friend.c (do_friend): Warn about non-template friends in templates.
7255
7256 * call.c (build_op_delete_call): Fix handling of inherited delete.
7257
7258 * search.c (dfs_record_inheritance): Ignore template type parms.
7259
7260 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
7261
7262 * call.c (build_new_op): Fix copy error.
7263 (build_op_new_call): New fn.
7264 (build_op_delete_call): New fn.
7265 * cp-tree.h: Declare them.
7266 * init.c (build_new): Use them. Support placement delete.
7267 (build_x_delete): Use build_op_delete_call.
7268 (build_delete): Likewise.
7269 * decl2.c (delete_sanity): Likewise.
7270 (coerce_delete_type): Don't complain about placement delete.
7271
7272 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
7273
7274 * call.c (build_new_function_call): Remove unused 'obj' parm.
7275 * cp-tree.h, typeck.c: Adjust.
7276
7277 * init.c (build_new): Make the cleanup last longer.
7278 (expand_vec_init): Call do_pending_stack_adjust.
7279
7280 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
7281
7282 * pt.c (do_type_instantiation): Fix typo.
7283 (mark_class_instantiated): If we support one_only but not weak
7284 symbols, don't mark this as known.
7285
7286 * init.c (build_new): Handle vec delete in EH cleanup.
7287
7288 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7289
7290 * call.c (build_method_call): Call complete_type before checking
7291 for destructor.
7292
7293 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
7294
7295 * decl.c (add_block_current_level): Delete.
7296 * init.c (build_vec_delete_1): Delete build_block and
7297 add_block_current_level calls.
7298
7299 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
7300
7301 * init.c (build_new): Handle freeing allocated memory when the
7302 constructor throws.
7303
7304 * call.c (build_new_method_call): Fix flags arg.
7305
7306 * pt.c (do_type_instantiation): Don't try to instantiate
7307 member templates.
7308 (mark_decl_instantiated): If we support one_only but not
7309 weak symbols, mark this one_only.
7310 * decl2.c (import_export_vtable): Don't defer handling of vtables
7311 if MULTIPLE_SYMBOL_SPACES.
7312
7313 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
7314
7315 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
7316
7317 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
7318
7319 * except.c (do_pop_exception): Return a value.
7320
7321 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
7322
7323 * call.c (build_new_method_call): Handle getting a
7324 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
7325 if we got template parms.
7326 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
7327 not just the args.
7328 * decl2.c (build_expr_from_tree): Tweak last change.
7329 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
7330 (maybe_fold_nontype_arg): Split out from tsubst_copy.
7331 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
7332
7333 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7334
7335 * pt.c (tsubst_copy): Handle explicit template arguments in
7336 function calls.
7337 * typeck.c (build_x_function_call): Likewise.
7338 * decl2.c (build_expr_from_tree): Lookup function name if it
7339 hasn't been done.
7340
7341 * pt.c (tsubst): Instantiate template functions properly when
7342 template parameter does not appear in function arguments and return
7343 type.
7344 (comp_template_args): Handle member templates required by tsubst.
7345
7346 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
7347
7348 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
7349 previous change.
7350
7351 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7352
7353 * pt.c (coerce_template_parms): Tweak error message.
7354
7355 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
7356 return type defaults to `int', even if there are storage-class
7357 specifiers.
7358
7359 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
7360
7361 Complete nested exception support.
7362 * except.c (do_pop_exception): Split out...
7363 (push_eh_cleanup): From here. Handle the EH region by hand.
7364 (expand_start_catch_block): Add a new level for the catch parm.
7365 Move the rethrow region outside the two cleanup regions.
7366 Protect the initializer for the catch parm with terminate.
7367 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
7368 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
7369 popping off the middle of the stack.
7370 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
7371 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
7372 (build_cplus_new): Only wrap CALL_EXPRs.
7373 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
7374 the constructor call.
7375
7376 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7377
7378 * Make-lang.in (c++.distdir): Make inc subdirectory.
7379
7380 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
7381
7382 * decl2.c (finish_file): Put back some code.
7383
7384 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7385
7386 * decl2.c (finish_file): Remove redundant code.
7387 * method.c (emit_thunk): Don't let the backend defer generic thunks.
7388
7389 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
7390
7391 * except.c (call_eh_info): Split out...
7392 (push_eh_info): From here.
7393 (expand_builtin_throw): Use it.
7394 (expand_start_catch_block): Move region start back.
7395
7396 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
7397
7398 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
7399 (real_yylex): Record wide strings using target endianness, not host.
7400
7401 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
7402
7403 * repo.c (rindex): Add decl unconditionally.
7404 (get_base_filename, open_repo_file): Don't cast rindex.
7405 * xref.c (rindex): Add decl unconditionally.
7406 (index): Remove unused decl.
7407 (open_xref_file): Don't cast rindex.
7408
7409 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
7410
7411 * class.c (build_vbase_path): Propagate the result type properly.
7412
7413 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
7414
7415 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
7416 remaining use of saved_throw_type with a call to get_eh_type.
7417
7418 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
7419
7420 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
7421 (file_name_nondirectory): New function, doing the same as the macro.
7422 (set_typedecl_interface_info): Use it instead of the macro.
7423 (check_newline): Likewise.
7424 (handle_cp_pragma): Likewise.
7425
7426 * repo.c (get_base_filename): Cast result of rindex to char*.
7427 (open_repo_file): Likewise.
7428 * xref.c (open_xref_file): Likewise.
7429 * error.c (dump_char): Make its arg int, not char.
7430
7431 * except.c (push_eh_info): Pass the number of fields - 1 down, not
7432 the exact number of fields.
7433
7434 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
7435
7436 Support for nested exceptions.
7437 * tinfo2.cc (__is_pointer): New fn.
7438 * exception.cc (struct cp_eh_info): Define.
7439 (__cp_exception_info, __uncatch_exception): New fns.
7440 (__cp_push_exception, __cp_pop_exception): New fns.
7441 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
7442 Lose empty_fndecl.
7443 (init_exception_processing): Likewise. __eh_pc is now external.
7444 (push_eh_info): New fn.
7445 (get_eh_{info,value,type,caught}): New fns.
7446 (push_eh_cleanup): Just call __cp_pop_exception.
7447 (expand_start_catch_block): Use push_eh_info. Start the eh region
7448 sooner.
7449 (expand_end_eh_spec): Use push_eh_info.
7450 (expand_throw): Call __cp_push_exception to set up the exception info.
7451 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
7452 when we rethrow.
7453 (expand_builtin_throw): Don't refer to empty_fndecl.
7454
7455 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
7456
7457 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
7458
7459 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
7460
7461 * method.c (build_template_parm_names, build_decl_overload_real):
7462 Add static to definitions.
7463 * pt.c (add_to_template_args, note_template_header,
7464 processing_explicit_specialization, type_unification_real): Likewise.
7465 ({determine,check}_explicit_specialization): Use a single string for
7466 error messages.
7467
7468 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
7469
7470 * except.c (expand_exception_blocks): Call do_pending_stack_adust.
7471 (expand_end_catch_block): Likewise.
7472 (expand_end_eh_spec): Likewise.
7473
7474 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
7475
7476 * decl.c (duplicate_decls): Handle template specializations
7477 correctly.
7478 * error.c (dump_function_name): Fix printing of specializations of
7479 member functions that are not member templates.
7480 * cp-tree.h (processing_specialization): Make global.
7481 * pt.c (processing_specialization): Likewise.
7482 * lex.c (cons_up_default_function): Save and restore
7483 processing_specialization to avoid confusion.
7484
7485 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
7486
7487 * decl.c (init_decl_processing): Give null_node unknown* type.
7488 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
7489 (common_type): Likewise.
7490 * error.c (args_as_string): Recognize null_node.
7491
7492 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7493
7494 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
7495 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
7496
7497 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
7498
7499 * Make-lang.in (g++): Include prefix.o.
7500
7501 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
7502
7503 * pt.c (determine_explicit_specialization): Initialize "dummy"
7504 to keep Purify quiet.
7505
7506 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
7507
7508 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
7509 (build_overload_int): Not here.
7510
7511 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
7512
7513 * class.c (build_type_pathname): Remove.
7514 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
7515
7516 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
7517
7518 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
7519 &&label GNU extension.
7520
7521 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
7522
7523 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
7524 so as to avoid incorrect manglings.
7525 * method.c (build_decl_overload_real): Don't mangle return types
7526 for constructors.
7527
7528 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
7529
7530 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
7531 scratch_tree_cons): Define as macros for now.
7532 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
7533 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
7534 typeck2.c: Use them and the expression_obstack variants.
7535
7536 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7537
7538 * decl.c (store_return_init): Allow classes with explicit ctors to
7539 be used with the named return values extension.
7540
7541 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
7542
7543 * pt.c (instantiate_decl): Fix previous change.
7544
7545 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
7546
7547 * pt.c (tsubst): Fix thinko.
7548 (instantiate_decl): Really use the original template.
7549
7550 * call.c (build_new_method_call): Use simple constructor_name for
7551 error messages.
7552
7553 Wed Oct 8 22:44:42 1997 Jeffrey A Law (law@cygnus.com)
7554
7555 * method.c (build_underscore_int): Don't use ANSI specific
7556 features.
7557
7558 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
7559
7560 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
7561 for our key method; it might have been inlined by -O3.
7562
7563 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
7564
7565 * decl.c (make_typename_type): Do not try to call lookup_field for
7566 non-aggregate types.
7567
7568 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
7569
7570 * typeck.c (build_reinterpret_cast): Tweak.
7571
7572 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
7573
7574 * typeck.c (build_reinterpret_cast): converting a void pointer
7575 to function pointer with a reinterpret_cast produces a warning
7576 if -pedantic is issued
7577
7578 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7579
7580 * typeck.c (c_expand_return): Don't warn about returning a
7581 reference-type variable as a reference.
7582
7583 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
7584
7585 * method.c (build_static_name): Fix typo.
7586
7587 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
7588
7589 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
7590 OLDDECL before we try to do DECL_USE_TEMPLATE.
7591
7592 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
7593
7594 * decl.c (duplicate_decls): Don't warn about template instances.
7595
7596 * typeck.c (mark_addressable): Lose ancient code that unsets
7597 DECL_EXTERNAL.
7598
7599 * pt.c (do_decl_instantiation): Lose support for instantiating
7600 non-templates.
7601
7602 * call.c (build_new_function_call): Fix handling of null explicit
7603 template args.
7604 (build_new_method_call): Likewise.
7605
7606 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
7607
7608 * method.c (build_underscore_int): Fix typo.
7609
7610 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
7611
7612 * tree.c (print_lang_statistics): #if 0 call to
7613 print_inline_obstack_statistics until its definition is checked in.
7614
7615 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
7616
7617 * decl2.c (finish_file): Move dump_tree_statistics to end.
7618
7619 * pt.c (instantiate_decl): Look for the original template.
7620 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
7621 of member templates.
7622
7623 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
7624
7625 * Makefile.in (g++FAQ.*): New rules.
7626 (CONFLICTS): Update.
7627 * g++FAQ.texi: Moved from libg++.
7628
7629 * parse.y (PFUNCNAME): Only specify the type once.
7630
7631 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
7632
7633 * lex.c (real_yylex): Clean up the code to fully behave the way
7634 the c-lex.c parser does for complex and real numbers.
7635
7636 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
7637
7638 * method.c (build_decl_overload_real): Reformat.
7639
7640 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
7641
7642 * method.c (synthesize_method): If at_eof, determine our linkage.
7643
7644 1997-09-29 Paul Eggert <eggert@twinsun.com>
7645
7646 * lex.c (real_yylex): Treat `$' just like `_', except issue a
7647 diagnostic if !dollars_in_ident or if pedantic.
7648
7649 * lang-specs.h (@c++): -ansi no longer implies -$.
7650
7651 * decl2.c (lang_decode_option):
7652 -traditional and -ansi now do not mess with
7653 dollars_in_ident.
7654
7655 Mon Sep 29 19:57:51 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
7656
7657 * Makefile.in (parse.o, decl.o): Also depend on
7658 $(srcdir)/../except.h $(srcdir)/../output.h.
7659 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
7660 $(srcdir)/../except.h $(srcdir)/../output.h.
7661 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
7662 ../insn-codes.h.
7663
7664 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
7665
7666 * expr.c (cplus_expand_expr): Make it static.
7667
7668 * decl2.c, init.c, typeck.c: Include "expr.h".
7669 (expand_expr): Use proper values when calling the function.
7670
7671 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
7672
7673 * lang-options.h: new -Wold-style-cast flag.
7674 * cp-tree.h (warn_old_style_cast): new variable.
7675 * decl2.c (warn_old_style_cast): ditto.
7676 (lang_decode_option): support -Wold-style-cast.
7677 (reparse_absdcl_as_casts): produce old-style-cast warning.
7678
7679 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7680
7681 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
7682 TREE_USED, reset value based on already_used.
7683
7684 * init.c (expand_member_init): Revert change.
7685
7686 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
7687
7688 * cp-tree.h, decl.c, decl2.c, pt.c:
7689 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
7690
7691 * decl2.c (lang_decode_option): Add missing ;.
7692
7693 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
7694
7695 * friend.c (do_friend): Disable injection for all template-derived
7696 decls.
7697 * decl2.c (lang_decode_option): Handle -fguiding-decls.
7698 * parse.y (notype_template_declarator): New nonterminal.
7699 (direct_notype_declarator): Use it.
7700 (complex_direct_notype_declarator): Likewise.
7701 (object_template_id): Accept any kind of identifier after TEMPLATE.
7702 (notype_qualified_id): Don't add template declarators here.
7703
7704 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
7705
7706 * call.c (add_template_candidate): Add explicit_targs parameter.
7707 (build_scoped_method_call): Use it.
7708 (build_overload_call_real): Likewise.
7709 (build_user_type_conversion_1): Likewise.
7710 (build_new_function_call): Likewise.
7711 (build_object_call): Likewise.
7712 (build_new_op): Likewise.
7713 (build_new_method_call): Likewise.
7714 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
7715 (build_new_method_call): Likewise.
7716
7717 * class.c (finish_struct_methods): Add specialization pass to
7718 determine which methods were specializing which other methods.
7719 (instantiate_type): Handle TEMPLATE_ID_EXPR.
7720
7721 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
7722
7723 * cp-tree.h (name_mangling_version): New variable.
7724 (flag_guiding_decls): Likewise.
7725 (build_template_decl_overload): New function.
7726 (begin_specialization): Likewise.
7727 (reset_specialization): Likewise.
7728 (end_specialization): Likewise.
7729 (determine_explicit_specialization): Likewise.
7730 (check_explicit_specialization): Likewise.
7731 (lookup_template_function): Likewise.
7732 (fn_type_unification): Add explicit_targs parameter.
7733 (type_unification): Likewise.
7734
7735 * decl.c (duplicate_decls): Add smarts for explicit
7736 specializations.
7737 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
7738 specializations.
7739 (grokfndecl): Call check_explicit_specialization.
7740
7741 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
7742 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
7743 (check_classfn): Handle specializations.
7744
7745 * error.c (dump_function_name): Print specialization arguments.
7746
7747 * friend.c (do_friend): Don't call pushdecl for template
7748 instantiations.
7749
7750 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
7751
7752 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
7753 and -fno-guiding-decls.
7754
7755 * lex.c (identifier_type): Return PFUNCNAME for template function
7756 names.
7757
7758 * method.c (build_decl_overload_real): New function.
7759 (build_template_parm_names): New function.
7760 (build_overload_identifier): Use it.
7761 (build_underscore_int): New function.
7762 (build_overload_int): Use it. Add levels for template
7763 parameters.
7764 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
7765 (build_overload_nested_names): Handle template type parameters.
7766 (build_template_decl_overload): New function.
7767
7768 * parse.y (YYSTYPE): New ntype member.
7769 (nested_name_specifier): Use it.
7770 (nested_name_specifier_1): Likewise.
7771 (PFUNCNAME): New token.
7772 (template_id, object_template_id): New non-terminals.
7773 (template_parm_list): Note specializations.
7774 (template_def): Likewise.
7775 (structsp): Likewise.
7776 (fn.def2): Handle member template specializations.
7777 (component_decl_1): Likewise.
7778 (direct_notype_declarator): Handle template-ids.
7779 (component_decl_1): Likewise.
7780 (direct_notype_declarator): Handle template-ids.
7781 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
7782
7783 * pt.c (processing_specializations): New variable.
7784 (template_header_count): Likewise.
7785 (type_unification_real): New function.
7786 (processing_explicit_specialization): Likewise.
7787 (note_template_header): Likewise.
7788 (is_member_template): Handle specializations.
7789 (end_template_decl): Call reset_specialization.
7790 (push_template_decl): Handle member template specializations.
7791 (tsubst): Likewise.
7792 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
7793 (instantiate_template): Handle specializations.
7794 (instantiate_decl): Likewise.
7795 (fn_type_unification): Handle explicit_targs.
7796 (type_unification): Likewise. Allow incomplete unification
7797 without an error message, if allow_incomplete.
7798 (get_bindings): Use new calling sequence for fn_type_unification.
7799
7800 * spew.c (yylex): Handle PFUNCNAME.
7801
7802 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
7803 (really_overloaded_fn): Likewise.
7804 (get_first_fn): Handle function templates.
7805
7806 * typeck.c (build_x_function_call): Use really_overloaded_fn.
7807 Handle TEMPLATE_ID_EXPR.
7808 (build_x_unary_op): Likewise.
7809 (build_unary_op): Likewise.
7810 (mark_addressable): Templates whose address is taken are marked
7811 as used.
7812
7813 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7814
7815 * decl.c (init_decl_processing): Declare __builtin_constant_p as
7816 accepting any kind of type, not only int.
7817
7818 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
7819
7820 * search.c (get_matching_virtual): Notice virtual bases when sorrying
7821 about covariant returns.
7822
7823 * parse.y (member_init): Also imply typename here. Remove ancient
7824 extension for initializing base members.
7825
7826 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
7827
7828 Handle multi-level typenames and implicit typename in base list.
7829 * parse.y (typename_sub{,[0-2]}): New rules.
7830 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
7831 (nonnested_type): New rule.
7832 (complete_type_name): Use it.
7833 (base_class.1): Use typename_sub and nonnested_type.
7834 (nested_name_specifier): Don't elide std:: here.
7835 * decl.c (make_typename_type): Handle getting a type for NAME.
7836 (lookup_name_real): Turn std:: into :: here.
7837
7838 Rvalue conversions were removed in London.
7839 * call.c (is_subseq): Don't consider lvalue transformations.
7840 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
7841 (joust): Reenable ?: kludge.
7842
7843 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
7844
7845 * decl.c (start_function): Up warning of no return type to be a
7846 pedwarn.
7847
7848 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7849
7850 * init.c (expand_member_init): Don't set TREE_USED.
7851 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
7852 set,don't clear TREE_USED wholesale.
7853
7854 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
7855
7856 * call.c (build_over_call): Do require_complete_type before
7857 build_cplus_new.
7858
7859 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
7860
7861 * search.c (lookup_field): Call complete_type in all cases.
7862
7863 * decl.c (finish_function): Just warn about flowing off the end.
7864
7865 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
7866
7867 * decl.c (grokparms): Don't bash a permanent list node if we're
7868 in a function.
7869
7870 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
7871
7872 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
7873
7874 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
7875
7876 * call.c (build_new_op): Give better error for syntactically
7877 correct, but semantically invalid, use of undeclared template.
7878
7879 * call.c (compare_qual): Handle pmfs.
7880
7881 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
7882 after the exception spec.
7883
7884 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
7885
7886 * call.c (null_ptr_cst_p): Integer type, not integral type.
7887
7888 * call.c (joust): Disable warnings until they can be moved to the
7889 right place.
7890
7891 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
7892
7893 * Makefile.in, config-lang.in: Convert to autoconf.
7894
7895 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
7896
7897 * decl.c (lookup_name_real): Add implicit 'typename' to types from
7898 base classes.
7899
7900 * pt.c (most_specialized_class): Fix typo.
7901 (tsubst): Move constant folding to TREE_VEC case.
7902
7903 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
7904
7905 * pt.c (do_poplevel): Don't warn about unused local variables
7906 while processing_template_decl since we don't always know whether
7907 or not they will need constructing/destructing.
7908
7909 * pt.c (uses_template_parms): Check the values of an enumeration
7910 type to make sure they don't depend on template parms.
7911
7912 * decl.c (make_typename_type): Don't lookup the field if the
7913 context uses template parms, even if we're not
7914 processing_template_decl at the moment.
7915
7916 * pt.c (coerce_template_parms): Avoid looking at the
7917 TYPE_LANG_DECL portion of a typename type, since there won't be
7918 one.
7919 (tsubst): Do constant folding as necessary to make sure that
7920 arguments passed to lookup_template_class really are constants.
7921
7922 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
7923
7924 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
7925 * decl2.c (finish_file): Only register exception tables if we
7926 need to.
7927
7928 * decl.c (init_decl_processing): Add __builtin_[fs]p.
7929
7930 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
7931
7932 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
7933
7934 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
7935
7936 * error.c (dump_decl): Avoid crashing when presented with a
7937 uninitialized constant, as can occur with a template parameter.
7938 (dump_expr): Make sure that there are enough levels of
7939 current_template_parms before we start diving through them.
7940
7941 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
7942
7943 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
7944 c-typeck.c.
7945
7946 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
7947
7948 * except.c (expand_throw): Call build_delete for all
7949 exception types, not just objects with destructors.
7950
7951 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
7952
7953 * decl.c (current_local_enum): Remove static.
7954 * pt.c (tsubst_enum): Save and restore value of current_local_enum
7955 in case template is expanded in enum decl.
7956 (instantiate_class_template) : Use new tsubst_enum signature.
7957 (tsubst_expr): Likewise.
7958
7959 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
7960
7961 * pt.c (begin_member_template_processing): Take a function as
7962 argument, not a set of template arguments. Use the template
7963 parameters, rather than the arguments. Handle non-type parameters
7964 correctly. Push a binding level for the parameters so that multiple
7965 member templates using the same parameter names can be declared.
7966 (end_member_template_processing): Pop the binding level.
7967 (push_template_decl): Mark member templates as static when
7968 appropriate.
7969
7970 * lex.c (do_pending_inlines): Pass the function, not its template
7971 arguments, to begin_member_template_processing.
7972 (process_next_inline): Likewise.
7973 (do_pending_defargs): Likewise.
7974
7975 * error.c (dump_expr): Obtain the correct declaration for a
7976 TEMPLATE_CONST_PARM.
7977
7978 * call.c (add_template_conv_candidate): New function.
7979 (build_object_call): Handle member templates, as done in the other
7980 build_ functions.
7981
7982 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
7983
7984 * decl.c (replace_defag): Undo previous change.
7985 * lex.c (do_pending_defargs): Deal with member templates.
7986
7987 * pt.c (is_member_template): Avoid crashing when passed a
7988 non-function argument.
7989
7990 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
7991
7992 * class.c (grow_method): Remove check for redeclaration.
7993
7994 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
7995
7996 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
7997 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
7998 (PRIMARY_TEMPLATE_P): Use it.
7999 * call.c (build_overload_call_real): Use it.
8000 * class.c (instantiate_type): Likewise.
8001 * decl.c (decls_match): Likewise.
8002 * method.c (build_overload_identifier): Likewise.
8003 * pt.c (push_template_decl): Likewise.
8004 (classtype_mangled_name): Likewise.
8005 (lookup_template_class): Likewise.
8006
8007 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
8008 DECL_NTPARMS to conform to usage elsewhere.
8009 * call.c (add_template_candidate): Likewise.
8010 * class.c (instantiate_type): Likewise.
8011 * pt.c (instantiate_template): Likewise.
8012 (get_bindings): Likewise.
8013
8014 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
8015 is_member_template.
8016
8017 * pt.c (unify): Undo changes to allow multiple levels of template
8018 parameters.
8019 (type_unification): Likewise.
8020 (fn_type_unification): Likewise.
8021 (get_class_bindings): Likewise.
8022 * cp-tree.h (Likewise).
8023
8024 * decl.c (replace_defarg): Check that the type of the default
8025 parameter does not invlove a template type before complaining
8026 about the initialization.
8027
8028 * error.c (dump_expr): Deal with template constant parameters in
8029 member templates correctly.
8030
8031 * pt.c (is_member_template): Deal with class specializations
8032 correctly.
8033 (tsubst): Handle "partial instantiation" of member templates
8034 correctly.
8035
8036 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
8037
8038 * pt.c (type_unification): Change calling squence to allow for
8039 multiple levels of template parameters.
8040 (tsubst_expr): Likewise.
8041 (tsubst): Likewise.
8042 (tsubst_copy): Likewise.
8043 (instantiate_template): Likewise.
8044 (unify): Likewise.
8045 * call.c (build_overload_call_real): Use it.
8046 (add_builtin_candidate): Use it.
8047 (build_new_method_call): Use it.
8048 * class.c (instantiate_type): Use it.
8049 * decl.c (grokdeclarator): Use it.
8050 * decl2.c (finish_file): Use it.
8051 * method.c (build_overload_identifier): Use it.
8052
8053 * call.c (add_template_candidate): Add additional parameter for
8054 the function return type. Call fn_type_unification istead of
8055 type_unification.
8056 (build_user_type_conversion_1): Handle member templates.
8057 (build_new_function_call): Likewise.
8058 (build_new_op): Likewise.
8059 (build_new_method_call): Likewise.
8060
8061 * class.c (grow_method): Don't give an error message indicating
8062 that two member templates with the same name are ambiguous.
8063 (finish_struct): Treat member template functions just like member
8064 functions.
8065
8066 * cp-tree.h (check_member_template): Add declaration.
8067 (begin_member_template_processing): Likewise.
8068 (end_member_template_processing): Likewise.
8069 (fn_type_unification): Likewise.
8070 (is_member_template): Likewise.
8071 (tsubst): Change prototype.
8072 (tsubst_expr): Likewise.
8073 (tsubst_copy): Likewise.
8074 (instantiate_template): Likewise.
8075 (get_bindings): Likewise.
8076
8077 * decl.c (decls_match): Handle multiple levels of template
8078 parameters.
8079 (pushdecl): Handle template type params just like other type
8080 declarations.
8081 (push_class_level_binding): Return immediately if the
8082 class_binding_level is NULL.
8083 (grokfndecl): If check_classfn() returns a member_template, use
8084 the result of the template, not the template itself.
8085
8086 * decl2.c (check_member_template): New function. Check to see
8087 that the entity declared to be a member template can be one.
8088 (check_classfn): Allow redeclaration of member template functions
8089 with different types; the new functions can be specializations or
8090 explicit instantiations.
8091
8092 * error.c (dump_decl): Handle multiple levels of template
8093 parameters.
8094 (dump_function_decl): Update to handle function templates.
8095
8096 * lex.c (do_pending_inlines): Set up template parameter context
8097 for member templates.
8098 (process_next_inline): Likewise.
8099
8100 * method. (build_overload_identifier): Adjust for multiple levels
8101 of template parameters.
8102
8103 * parse.y (fn.def2): Add member templates.
8104 (component_decl_1): Likewise.
8105
8106 * pt.c (begin_member_template_processing): New function.
8107 (end_member_template_processing): Likewise.
8108 (is_member_template): Likewise.
8109 (fn_type_unification): Likewise.
8110 (current_template_parms): Return a vector of all the template
8111 parms, not just the innermost level of parms.
8112 (push_template_decl): Deal with the possibility of member
8113 templates.
8114 (lookup_template_class): Likewise.
8115 (uses_template_parms): Likewise.
8116 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
8117 TEMPLATE_CONST_PARM to deal with multiple levels of template
8118 arguments. Add processing of TEMPLATE_DECL to produce new
8119 TEMPLATE_DECLs from old ones.
8120 (do_decl_instantiation): Handle member templates.
8121
8122 * search.c (lookup_fnfields_1): Handle member template conversion
8123 operators.
8124
8125 * tree.c (cp_tree_equal): Check the levels, as well as the
8126 indices, of TEMPLATE_CONST_PARMs.
8127
8128 * typeck.c (comptypes): Check the levels, as well as the indices,
8129 fo TEMPLATE_TYPE_PARMs.
8130 (build_x_function_call): Treat member templates like member
8131 functions.
8132
8133 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8134
8135 * typeck.c (c_expand_return): Always convert_for_initialization
8136 before checking for returning a pointer to local.
8137
8138 * pt.c (type_unification): If strict and the function parm doesn't
8139 use template parms, just compare types.
8140
8141 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
8142
8143 * method.c (build_overloaded_value): Replace direct call
8144 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
8145
8146 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
8147
8148 * typeck.c (convert_arguments): Don't arbitrarily choose the first
8149 of a set of overloaded functions.
8150
8151 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
8152
8153 * lex.c (real_yylex): Don't elide __FUNCTION__.
8154
8155 * method.c (build_overload_value): Add in_template parm.
8156 (build_overload_int): Likewise.
8157 (build_overload_identifier): Pass it.
8158
8159 * decl.c (duplicate_decls): Don't bash a previous template
8160 definition with a redeclaration.
8161
8162 * pt.c (unify): float doesn't match double.
8163
8164 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
8165 TYPE_DECL. Handle getting non-template types.
8166 * parse.y (explicit_instantiation): Use typespec instead of
8167 aggr template_type.
8168
8169 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
8170
8171 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
8172
8173 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
8174
8175 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
8176 (compare_ics): Likewise.
8177
8178 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8179
8180 * call.c (joust): Warn about choosing one conversion op over
8181 another because of 'this' argument when the other return type is
8182 better.
8183 (source_type): New fn.
8184
8185 * call.c (build_new_op): Strip leading REF_BIND from first operand
8186 to builtin operator.
8187
8188 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
8189 use its RTL.
8190
8191 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
8192
8193 * call.c (null_ptr_cst_p): Remove support for (void*)0.
8194
8195 Wed Aug 27 02:03:34 1997 Jeffrey A Law (law@cygnus.com)
8196
8197 * typeck.c (expand_target_expr): Make definition match declaration.
8198
8199 * class.c (get_basefndecls): Make definition match declaration.
8200
8201 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
8202
8203 * input.c (sub_getch): Eventually give up and release the input file.
8204
8205 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
8206 right place.
8207
8208 * call.c (joust): Tweak message.
8209
8210 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
8211
8212 * error.c (type_as_string): Put const/volatile on template type
8213 parameters where appropriate.
8214
8215 Sat Aug 23 17:47:22 1997 Jeffrey A Law (law@cygnus.com)
8216
8217 * call.c (strictly_better): Make arguments unsigned ints.
8218
8219 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
8220
8221 * lex.c (real_yylex): Refer to __complex instead of complex.
8222
8223 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
8224
8225 * lex.c (real_yylex): Don't use getc directly.
8226
8227 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
8228
8229 * call.c (is_subseq): Don't try to be clever.
8230
8231 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8232
8233 * parse.y, pt.c: Include "except.h".
8234 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
8235 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
8236 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
8237 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
8238 prototyping.
8239
8240 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
8241
8242 * decl2.c (mark_vtable_entries): Instead of replacing pure
8243 virtuals with a reference to __pure_virtual, copy the decl and
8244 change the RTL.
8245
8246 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
8247
8248 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
8249
8250 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
8251
8252 * pt.c (instantiate_class_template): Call repo_template_used
8253 before finish_prevtable_vardecl.
8254
8255 * call.c (is_subseq): New fn.
8256 (compare_ics): Use it.
8257
8258 * repo.c (finish_repo): Don't crash on no args.
8259
8260 * parse.y (named_complex_class_head_sans_basetype): Handle
8261 explicit global scope.
8262 * decl2.c (handle_class_head): New fn.
8263
8264 * pt.c (unify): Add CONST_DECL case.
8265
8266 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8267
8268 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
8269
8270 * cp-tree.h (report_type_mismatch): Add prototype.
8271 * call.c (build_overload_call_real): Remove erroneous fourth
8272 argument to report_type_mismatch.
8273 (build_user_type_conversion_1): Remove erroneous second arg to
8274 tourney.
8275 (build_new_function_call): Likewise.
8276 (build_object_call): Likewise.
8277 (build_new_op): Likewise.
8278 (build_new_method_call): Likewise.
8279
8280 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8281
8282 * error.c (dump_decl): Don't bother processing a function with no
8283 DECL_LANG_SPECIFIC.
8284
8285 * method.c (emit_thunk): Call init_function_start in the macro case.
8286
8287 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
8288
8289 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
8290 defined and used to set flag_vtable_thunks.
8291
8292 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8293
8294 * parse.y: Don't clear the inlines from their obstack until they've
8295 all been processed.
8296
8297 * decl.c (duplicate_decls): Don't complain about exception
8298 specification mismatch if flag_exceptions is off.
8299
8300 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
8301
8302 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
8303
8304 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
8305
8306 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
8307 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
8308 Include <stdio.h> before include files that formerly used STDIO_PROTO.
8309
8310 * decl.c, g++spec.c, lex.c, method.c, repo.c:
8311 Include "config.h" first, as per autoconf manual.
8312
8313 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
8314
8315 * decl.c (duplicate_decls): Tweak wording.
8316 * lex.c (do_pending_defargs): Don't die if we see a default arg
8317 that isn't a DEFAULT_ARG.
8318 * error.c (dump_expr): Handle DEFAULT_ARG.
8319
8320 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
8321 * lang-options.h: Add -fhandle-exceptions.
8322
8323 * class.c (build_vtable): vtables are artificial.
8324 (prepare_fresh_vtable): Likewise.
8325
8326 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8327
8328 * cvt.c (ocp_convert): After converting to the target type, set
8329 LOOKUP_NO_CONVERSION.
8330
8331 * call.c (joust): Warn about potentially confusing promotion rules
8332 with -Wsign-promo.
8333 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
8334
8335 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
8336
8337 * exception.cc: Declare __terminate_func with noreturn attribute.
8338
8339 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
8340
8341 * parse.y: Break out eat_saved_input, handle errors.
8342 (function_try_block): Use compstmt instead of compstmt_or_error.
8343
8344 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
8345
8346 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
8347
8348 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8349
8350 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
8351 existence of cc1plus check whether $(LANGUAGES) contains C++.
8352
8353 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8354
8355 * method.c (do_build_copy_constructor): When copying an anonymous
8356 union member loop around to handle nested anonymous unions. Use
8357 the offset of the member relative to the outer structure, not the
8358 union.
8359
8360 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8361
8362 * call.c (resolve_args): New fn.
8363 (build_new_function_call): Use it.
8364 (build_object_call): Likewise.
8365 (build_new_method_call): Likewise.
8366
8367 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
8368
8369 * call.c (build_over_call): tsubst all default parms from templates.
8370
8371 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
8372
8373 * decl.c (struct cp_function): Add static_labelno.
8374 (push_cp_function_context): Save it.
8375 (pop_cp_function_context): Restore it.
8376
8377 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8378
8379 * typeck.c (build_component_ref_1): Convert from reference.
8380
8381 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8382
8383 * parse.y (current_declspecs, prefix_attributes): Initialize to
8384 NULL_TREE.
8385
8386 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
8387 before we try to force it to be a TREE_LIST.
8388 (decl): Make sure $1.t is non-nil.
8389
8390 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
8391
8392 * pt.c (uses_template_parms): Handle template first-parse codes.
8393
8394 * decl.c (cp_finish_decl): Only warn about user-defined statics.
8395
8396 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
8397
8398 * pt.c (unify): Handle BOOLEAN_TYPE.
8399
8400 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
8401 * pt.c (tsubst): Don't set it.
8402 * call.c (build_over_call): Use uses_template_parms.
8403
8404 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
8405
8406 * method.c (build_overload_nested_name): Use static_labelno
8407 instead of var_labelno.
8408 (build_qualified_name): New fn.
8409 (build_overload_name): Split out from here.
8410 (build_static_name): Use build_qualified_name.
8411 * decl.c (cp_finish_decl): Statics in extern inline functions
8412 have comdat linkage.
8413 (start_function): Initialize static_labelno.
8414
8415 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8416
8417 * class.c (finish_struct_methods): add check of warn_ctor_dtor_privacy
8418 before "all member functions in class [] are private"
8419
8420 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
8421
8422 * lex.c (do_scoped_id): convert_from_reference.
8423 * init.c (build_offset_ref): Likewise.
8424
8425 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
8426
8427 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
8428
8429 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
8430
8431 * typeck.c (get_member_function_from_ptrfunc): Promote index
8432 before saving it.
8433
8434 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
8435
8436 * tree.c (layout_basetypes): Move non-virtual destructor warning.
8437 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
8438
8439 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8440
8441 * decl.c (grokdeclarator): Call add_defarg_fn for the function
8442 type, too.
8443 * lex.c (add_defarg_fn): Adjust.
8444 (do_pending_defargs): Adjust. Don't skip the first parm.
8445
8446 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
8447
8448 * decl.c (build_enumerator): Global enumerators are also readonly.
8449
8450 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
8451 (build_dynamic_cast): Call it and convert_from_reference.
8452
8453 * lex.c (add_defarg_fn): New fn.
8454 (snarf_defarg): Don't add to defarg_types.
8455 (do_pending_defargs): Lose defarg_types. All fns we process now
8456 have defargs.
8457 * decl.c (grokfndecl): Call add_defarg_fn.
8458
8459 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
8460 * cp-tree.def: Add DEFAULT_ARG.
8461 * spew.c (yylex): Call snarf_defarg as appropriate.
8462 * parse.y: New tokens DEFARG and DEFARG_MARKER.
8463 (defarg_again, pending_defargs, defarg, defarg1): New rules.
8464 (structsp): Use pending_defargs.
8465 (parms, full_parm): Use defarg.
8466 * lex.c (init_lex): Initialize inline_text_firstobj.
8467 (do_pending_inlines): Never pass the obstack to feed_input.
8468 (process_next_inline): Call end_input instead of restore_pending_input.
8469 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
8470 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
8471 * input.c (end_input): New fn.
8472 (sub_getch): At the end of some fed input, just keep returning EOF
8473 until someone calls end_input.
8474 Remove 'obstack' field from struct input_source.
8475 * decl.c (grokparms): Handle DEFAULT_ARG.
8476 (replace_defarg): New fn.
8477 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
8478
8479 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
8480
8481 * call.c (implicit_conversion): If nothing else works, try binding
8482 an rvalue to a reference.
8483
8484 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
8485
8486 * decl.c (init_decl_processing): fix Jun 30 patch -- move
8487 ifndef for Cygwin32 to include SIGSEGV.
8488
8489 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
8490
8491 * class.c (finish_struct_1): Only complain about pointers without
8492 copy stuff if there are any constructors.
8493
8494 * rtti.c (build_dynamic_cast): Call complete_type on the types.
8495
8496 * decl.c (grokfndecl): If the function we chose doesn't actually
8497 match, die.
8498
8499 * decl2.c (grokclassfn): Don't specify 'const int' for the
8500 artificial destructor parm.
8501
8502 * pt.c (type_unification): If we are called recursively, nothing
8503 decays.
8504
8505 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
8506
8507 * decl.c (init_decl_processing): Stop trying to catch signals
8508 other than SIGABRT since the Cygwin32 library doesn't support
8509 them correctly yet. This fixes a situation in which g++ causes
8510 a hang on SIGSEGVs and other such signals in our Win32-hosted
8511 tools.
8512
8513 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
8514
8515 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
8516
8517 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
8518
8519 * typeck2.c (store_init_value): Always return the value if our
8520 type needs constructing.
8521
8522 * method.c (hack_identifier): Convert class statics from
8523 reference, too.
8524
8525 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
8526
8527 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
8528
8529 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
8530
8531 * typeck.c (c_expand_return): Make sure we clean up temporaries at
8532 the end of return x;
8533
8534 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8535
8536 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
8537
8538 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
8539
8540 * except.c (expand_builtin_throw): Add support
8541 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
8542
8543 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
8544
8545 * repo.c (extract_string): Null-terminate.
8546
8547 * cp-tree.h (TI_SPEC_INFO): New macro.
8548 (CLASSTYPE_TI_SPEC_INFO): New macro.
8549 * pt.c (push_template_decl): Correctly determine # of template parms
8550 for partial specs.
8551
8552 * call.c (compare_ics): Really fix 'this' conversions.
8553
8554 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
8555 non-template fn.
8556
8557 * pt.c (push_template_decl): Complain about mismatch in # of
8558 template parms between a class template and a member template.
8559
8560 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8561
8562 * method.c (synthesize_method): You can't call
8563 function_cannot_inline_p after finish_function.
8564 * decl.c (finish_function): Turn on flag_inline_functions and turn
8565 off DECL_INLINE before handing a synthesized method to the
8566 backend.
8567
8568 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8569
8570 * method.c (synthesize_method): Remove July 30 change to never set
8571 DECL_INLINE if at_eof.
8572
8573 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
8574
8575 * xref.c (GNU_xref_member): Ensure that the node has a
8576 decl_lang_specific part before checking DECL_FRIEND_P.
8577
8578 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
8579
8580 * pt.c (instantiate_class_template): Diagnose non-class types used
8581 as bases.
8582
8583 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
8584
8585 * typeck.c (build_conditional_expr): Use convert_for_initialization
8586 instead of convert_and_check.
8587
8588 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8589
8590 * parse.y (typespec): Don't pedwarn for typeof.
8591
8592 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
8593
8594 * repo.c (finish_repo): Only check changes if we would write a
8595 repo file.
8596
8597 * call.c (compare_ics): Fix handling of 'this' conversions.
8598
8599 * pt.c (do_decl_instantiation): Support static data too. Rename
8600 from do_function_instantiation.
8601 * cp-tree.h: Adjust.
8602 * parse.y: Adjust.
8603
8604 * repo.c (extract_string): New fn.
8605 (get_base_filename): Use it.
8606 (init_repo): Compare old args with current args.
8607
8608 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
8609
8610 * Makefile.in, Make-lang.in: Protect C-ls with a comment
8611 character, idea from Paul Eggert <eggert@twinsun.com>.
8612
8613 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
8614
8615 * typeck.c (c_expand_return): Be more persistent in looking for
8616 returned temps.
8617
8618 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
8619 pointer to reference.
8620
8621 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
8622
8623 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
8624
8625 * init.c (build_member_call, build_offset_ref):
8626 Use do_scoped_id instead of do_identifier.
8627
8628 * cvt.c (convert): Remove bogosity.
8629
8630 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8631
8632 * cvt.c (build_up_reference): Do checks of ARGTYPE and
8633 TARGET_TYPE before trying to use get_binfo.
8634
8635 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
8636
8637 * cvt.c (build_up_reference): Call get_binfo to get access control.
8638
8639 * decl2.c (import_export_decl): If we don't support weaks, leave
8640 statics undefined.
8641
8642 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
8643
8644 * except.c (expand_builtin_throw): Add support for machines that
8645 cannot access globals after throw's epilogue when
8646 -fno-sjlj-exceptions is used.
8647
8648 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
8649
8650 * parse.y: 'std::' becomes '::'.
8651 * lex.c (real_yylex): Remove 'namespace' warning.
8652 * init.c (build_member_call): Ignore 'std::'.
8653 (build_offset_ref): Likewise.
8654 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
8655 (do_toplevel_using_decl): Ignore 'using std::whatever'.
8656 * decl.c (push_namespace): Just sorry.
8657 (pop_namespace): Nop.
8658 (init_decl_processing): Declare std namespace.
8659
8660 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
8661
8662 * search.c (push_class_decls): A name which ambiguously refers to
8663 several instantiations of the same template just refers to the
8664 template.
8665
8666 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
8667
8668 * decl.c (build_enumerator): fix problem with unsigned long
8669 enumerated values being smashed to ints, causing overflow
8670 when computing next enumerated value. (for enum values around
8671 MAX_VAL).
8672
8673 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
8674
8675 * typeck.c (build_component_ref): Only call mark_used on a decl.
8676
8677 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8678
8679 * typeck.c (build_c_cast): Make the check for a ptr to function
8680 more specific before possible default_conversion call.
8681
8682 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
8683
8684 * except.c (expand_exception_blocks): Simplify and fix and make
8685 sure we don't end a region in a sequence, as expand_end_bindings
8686 doesn't like it.
8687
8688 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
8689
8690 * except.c (init_exception_processing): Mark terminate as not
8691 returning so that the optimizer can optimize better.
8692
8693 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
8694
8695 * cvt.c (convert): Don't do any extra work, if we can avoid it
8696 easily.
8697
8698 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
8699
8700 * *.[chy]: Change cp_convert to ocp_convert, change convert to
8701 cp_convert. convert is now reserved for the backend, and doesn't
8702 have the semantics a frontend person should ever want.
8703
8704 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
8705
8706 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
8707 Lose -traditional support.
8708
8709 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
8710
8711 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
8712
8713 * parse.y (self_reference): Do it for templates, too.
8714 * class.c (pushclass): Don't overload_template_name; the alias
8715 generated by build_self_reference serves the same purpose.
8716
8717 * tree.c (list_hash): Make static, take more args.
8718 (list_hash_lookup): Likewise.
8719 (list_hash_add): Make static.
8720 (list_hash_canon): Lose.
8721 (hash_tree_cons): Only build a new node if one isn't already in the
8722 hashtable.
8723 (hash_tree_chain): Use hash_tree_cons.
8724 * cp-tree.h: Adjust.
8725 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
8726 of calling lookup_name.
8727
8728 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
8729
8730 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
8731 doesn't refer to the CONST_DECLs.
8732
8733 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
8734
8735 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
8736 is bigger.
8737 (expand_class_desc): Convert the last argument to a sizetype.
8738
8739 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8740
8741 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
8742 __real__): Add reswords.
8743 * hash.h: Regenerate.
8744 * lex.h (rid): Add RID_COMPLEX.
8745 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
8746 * lex.c (init_lex): Add building of RID_COMPLEX.
8747 (real_yylex): General cleanup in line with what c-lex.c also has,
8748 sans the cruft for traditional; add handling of SPEC_IMAG, complex
8749 types, and imaginary numeric constants.
8750 * parse.y (REALPART, IMAGPART): Add tokens.
8751 (unary_expr): Add REALPART and IMAGPART rules.
8752 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
8753 * decl.c (complex_{integer,float,double,long}_type_node): Define
8754 types.
8755 (init_decl_processing): Set up the types.
8756 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
8757 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
8758 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
8759 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
8760 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
8761 COMPLEX_TYPE case.
8762 * method.c (build_overload_name): Add handling of the different
8763 COMPLEX_TYPEs, prefixing them with `J'.
8764 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
8765 as a template parm.
8766 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
8767 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
8768 (mapcar): Handle COMPLEX_CST.
8769 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
8770 (common_type): Add code for complex types.
8771 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
8772 (convert_for_assignment): Likewise.
8773 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
8774
8775 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
8776
8777 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
8778 tsubst_expr, as it might try to do overload resolution.
8779
8780 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
8781
8782 * pt.c (instantiate_class_template): Oops.
8783
8784 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
8785
8786 * cp-tree.def: Add TAG_DEFN.
8787 * pt.c (tsubst_enum): New fn.
8788 (instantiate_class_template): Use it.
8789 (tsubst_expr): Support TAG_DEFN.
8790 (tsubst): Support local enums.
8791 (tsubst_copy): Likewise.
8792 * decl.c (finish_enum): Likewise.
8793 (start_enum): If this is a local enum, switch to permanent_obstack.
8794
8795 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
8796
8797 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
8798 (finish_function): Put the base init code for constructors just
8799 after the parm cleanup insns.
8800 (struct cp_function): Add last_parm_cleanup_insn.
8801 (push_cp_function_context): Likewise.
8802 (pop_cp_function_context): Likewise.
8803
8804 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
8805
8806 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
8807
8808 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8809
8810 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
8811 for THUNK_FNDECL before we switch to temporary allocation.
8812
8813 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
8814
8815 * call.c (build_new_op): Handle null arg2 for ?:.
8816
8817 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
8818
8819 * except.c (expand_exception_blocks): Ensure that we flow through
8820 the end of the exception region for the exception specification.
8821 Move exception region for the exception specification in, so that
8822 it doesn't protect the parm cleanup. Remove some obsolete code.
8823 * decl.c (store_parm_decls): Likewise.
8824 (finish_function): Likewise.
8825
8826 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
8827
8828 * init.c (build_new): Fix nothrow handling.
8829
8830 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8831
8832 * init.c (emit_base_init): Don't warn about the initialization
8833 list for an artificial member.
8834
8835 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8836
8837 * expr.c (do_case): Handle !START case for the error msg.
8838
8839 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
8840
8841 * decl2.c, lang-options.h: New option -Weffc++.
8842 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
8843 to -Weffc++.
8844
8845 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
8846 to MULTIPLE_SYMBOL_SPACES.
8847
8848 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
8849
8850 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
8851
8852 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
8853
8854 * typeck.c (c_expand_return): Don't complain about returning void
8855 to void in an artificial function.
8856 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
8857 don't set DECL_RESULT, set DECL_ARTIFICIAL.
8858 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
8859
8860 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
8861
8862 * init.c (init_decl_processing): Add supoprt for setjmp/longjmp based
8863 exception handling.
8864 * except.c (init_exception_processing): Likewise.
8865 (expand_end_catch_block): Likewise.
8866 (expand_exception_blocks): Likewise.
8867 (expand_throw): Likewise.
8868 * exception.cc (__default_terminate): Likewise.
8869
8870 * init.c (perform_member_init): Use new method of expr level
8871 cleanups, instead of cleanups_this_call and friends.
8872 (emit_base_init): Likewise.
8873 (expand_aggr_vbase_init_1): Likewise.
8874 (expand_vec_init): Likewise.
8875 * decl.c (cp_finish_decl): Likewise.
8876 (expand_static_init): Likewise.
8877 (store_parm_decls): Likewise.
8878 (cplus_expand_expr_stmt): Likewise.
8879 * decl2.c (finish_file): Likewise.
8880
8881 * Make-lang.in (exception.o): Ok to compile with -O now.
8882
8883 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
8884 we know it will be done later by the backend.
8885
8886 * decl2.c (lang_f_options): Remove support for short temps.
8887 * lang-options.h: Likewise.
8888
8889 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
8890
8891 * tree.c (varargs_function_p): New fn.
8892 * method.c (emit_thunk): Replace broken generic code with code to
8893 generate a heavyweight thunk function.
8894
8895 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
8896
8897 * pt.c (process_template_parm): pedwarn about floating-point parms.
8898
8899 * decl.c (grokdeclarator): inline no longer implies static.
8900
8901 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
8902
8903 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
8904
8905 * class.c (check_for_override): The signature of an overriding
8906 function is not changed.
8907
8908 * call.c (build_over_call): Move setting of conv into the loop.
8909 Note: this change, along with the related changes of the 18th thru
8910 the 20th of April, fix an infinite loop problem in conversions.
8911
8912 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
8913
8914 * call.c (build_user_type_conversion_1): Really ignore rvalue
8915 conversions when looking for a REFERENCE_TYPE.
8916
8917 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
8918 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
8919 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
8920 (build_unary_op): Likewise.
8921 * call.c (build_over_call): See through a CONVERT_EXPR around the
8922 ADDR_EXPR for on a temporary.
8923 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
8924 the ADDR_EXPR for a local variable.
8925
8926 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
8927
8928 * call.c (build_user_type_conversion_1): If we're trying to
8929 convert to a REFERENCE_TYPE, only consider lvalue conversions.
8930 (build_new_function_call): Print candidates.
8931 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
8932 (reference_binding): Binding a temporary of a reference-related type
8933 is BAD.
8934
8935 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8936
8937 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
8938 * tinfo2.cc (type_info::before): Likewise.
8939
8940 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
8941
8942 * call.c (implicit_conversion): Oops.
8943
8944 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
8945
8946 * call.c (implicit_conversion): Try to find a reference conversion
8947 before binding a const reference to a temporary.
8948
8949 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
8950
8951 * exception.cc (__default_unexpected): Call terminate by default,
8952 so that if the user overrides terminate, the correct function will
8953 be called.
8954
8955 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
8956
8957 * parse.y (left_curly): Avoid trying to use any fields of
8958 error_mark_node, as there aren't any.
8959
8960 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
8961
8962 * lex.c (do_identifier): Avoid breaking on overloaded methods
8963 as default arguments.
8964
8965 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
8966
8967 * call.c (add_template_candidate): Initialize the variable "dummy".
8968
8969 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
8970
8971 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
8972 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
8973
8974 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
8975
8976 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
8977 (debug_binfo): Delete decl, not needed.
8978
8979 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
8980 promotes_to_aggr_type): Delete fns.
8981 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
8982 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
8983 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
8984
8985 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
8986
8987 * friend.c (is_friend_type): Delete fn.
8988 * cp-tree.h (is_friend_type): Delete decl.
8989
8990 * decl.c (original_result_rtx, double_ftype_double,
8991 double_ftype_double_double, int_ftype_int, long_ftype_long,
8992 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
8993 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
8994
8995 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
8996 fwd decls.
8997 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
8998
8999 * decl.c (pushdecl_nonclass_level): #if 0, unused.
9000 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
9001
9002 * lex.c (reinit_lang_specific): #if 0, unused.
9003 * cp-tree.h (reinit_lang_specific): #if 0 decl.
9004
9005 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
9006 * cp-tree.h (revert_static_member_fn): Delete decl.
9007
9008 * class.c (root_lang_context_p): Delete fn.
9009 * cp-tree.h (root_lang_context_p): Delete decl.
9010
9011 * decl.c (set_current_level_tags_transparency): #if 0, unused.
9012 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
9013
9014 * lex.c (set_vardecl_interface_info): Make static.
9015 * cp-tree.h (set_vardecl_interface_info): Delete decl.
9016
9017 * call.c (find_scoped_type): Make static.
9018 * cp-tree.h (find_scoped_type): Delete decl.
9019
9020 * search.c (convert_pointer_to_vbase): Make static.
9021 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
9022
9023 * decl.c (const_ptr_type_node): Likewise.
9024 * cp-tree.h (const_ptr_type_node): Delete decl.
9025
9026 * typeck.c (common_base_type): Make static.
9027 * cp-tree.h (common_base_types): Delete erroneous decl.
9028
9029 * pt.c (classtype_mangled_name): Make static.
9030 * cp-tree.h (classtype_mangled_name): Delete decl.
9031
9032 * lex.c (check_newline): Make static.
9033 * cp-tree.h (check_newline): Delete decl.
9034
9035 * typeck.c (build_x_array_ref): Delete fn, same idea as
9036 grok_array_decl.
9037 * cp-tree.h (build_x_array_ref): Delete decl.
9038
9039 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
9040 copy_lang_decl.
9041 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
9042
9043 * class.c (build_vtable_entry): Make static.
9044 * cp-tree.h (build_vtable_entry): Delete decl.
9045
9046 * class.c (build_vbase_pointer): Make static.
9047 * cp-tree.h (build_vbase_pointer): Delete decl.
9048
9049 * sig.c (build_sptr_ref): Add forward decl and make static.
9050 * cp-tree.h (build_sptr_ref): Delete decl.
9051
9052 * call.c (build_new_method_call): Add forward decl and make static.
9053 * cp-tree.h (build_new_method_call): Delete decl.
9054
9055 * call.c (build_object_call): Make static.
9056 * class.c (check_for_override, complete_type_p, mark_overriders):
9057 Likewise.
9058 * decl.c (cp_function_chain): Likewise.
9059 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
9060 Likewise.
9061 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
9062 Likewise.
9063 * tree.c (build_cplus_array_type_1): Likewise.
9064 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
9065 (comp_target_parms): Likewise.
9066
9067 * init.c (build_builtin_call): Make static.
9068 * cp-tree.h (build_builtin_call): Delete decl.
9069
9070 * typeck.c (binary_op_error): Delete decl.
9071 * cp-tree.h (binary_op_error): Likewise.
9072
9073 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9074
9075 * call.c (build_method_call): Compare against error_mark_node
9076 directly, rather than the ERROR_MARK tree code.
9077 * cvt.c (cp_convert): Likewise.
9078 * decl.c (print_binding_level): Likewise.
9079 (duplicate_decls): Likewise.
9080 (grokdeclarator): Likewise.
9081 (grokdeclarator): Likewise.
9082 * init.c (expand_aggr_init_1): Likewise.
9083 (decl_constant_value): Likewise.
9084 * method.c (build_opfncall): Likewise.
9085 (hack_identifier): Likewise.
9086 * typeck.c (build_modify_expr): Likewise.
9087
9088 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
9089
9090 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9091
9092 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
9093
9094 * pt.c (coerce_template_parms): Add new error message.
9095
9096 * method.c (build_overload_value): Implement name mangling for
9097 floating-point template arguments.
9098
9099 * method.c (build_overload_int, icat, dicat): Fix mangling of template
9100 arguments whose absolute value doesn't fit in a signed word.
9101
9102 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9103
9104 * friend.c: New file; put all of the friend stuff in here.
9105 * init.c: Instead of here.
9106 * Makefile.in (CXX_OBJS): Add friend.o.
9107 (friend.o): Add dependencies.
9108 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
9109
9110 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
9111
9112 * call.c (build_scoped_method_call): Complain if the scope isn't a
9113 base.
9114
9115 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9116
9117 * parse.y (left_curly): Don't crash on erroneous type.
9118
9119 * init.c (build_delete): Fix type of ref.
9120
9121 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
9122
9123 * search.c (get_vbase_1): Renamed from get_vbase.
9124 (get_vbase): Wrapper, now non-static.
9125 (convert_pointer_to_vbase): Now static.
9126
9127 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
9128 * init.c (build_delete): Pass one.
9129 (build_partial_cleanup_for): Use build_scoped_method_call.
9130 * decl.c (finish_function): Pass a binfo.
9131
9132 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9133
9134 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
9135
9136 * typeck.c (build_c_cast): Lose other reference to flag.
9137
9138 * call.c (build_field_call): Don't look for [cd]tor_identifier.
9139 * decl2.c (delete_sanity): Remove meaningless use of
9140 LOOKUP_HAS_IN_CHARGE.
9141 * decl.c (finish_function): Use build_scoped_method_call instead
9142 of build_delete for running vbase dtors.
9143 * init.c (build_delete): Call overload resolution code instead of
9144 duplicating it badly.
9145
9146 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
9147
9148 * call.c (build_over_call): Call mark_used before trying to elide
9149 the call.
9150
9151 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
9152
9153 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9154
9155 * typeck.c (build_modify_expr): Always pedwarn for a cast to
9156 non-reference used as an lvalue.
9157
9158 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
9159
9160 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
9161
9162 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
9163
9164 * parse.y (handler): Fix template typo.
9165
9166 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9167
9168 * error.c (lang_decl_name): New fn.
9169 * tree.c (lang_printable_name): Use it.
9170
9171 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
9172
9173 * g++spec.c: Include config.h so that we can catch bzero #defines
9174 from the config file.
9175
9176 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
9177
9178 * new1.cc: Include a declaration for malloc, to avoid warning, and
9179 avoid lossing on systems that require one (ones that define malloc
9180 in xm.h).
9181
9182 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
9183
9184 * decl2.c (max_tinst_depth): New variable.
9185 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
9186 option.
9187 * pt.c (max_tinst_depth): Variable moved.
9188 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
9189 as legal.
9190
9191 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
9192
9193 * decl.c (xref_basetypes): Allow a base class that depends on
9194 template parms to be incomplete.
9195
9196 * decl2.c (build_expr_from_tree): Support typeid(type).
9197 * rtti.c (get_typeid): Support templates.
9198 (expand_si_desc, expand_class_desc): Fix string length.
9199 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
9200
9201 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
9202
9203 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
9204
9205 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
9206
9207 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
9208
9209 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
9210 smashes together template and non-template decls of the same
9211 signature.
9212
9213 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
9214
9215 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
9216
9217 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9218
9219 * decl.c (duplicate_decls): Next route, pedwarn about different
9220 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
9221
9222 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9223
9224 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
9225 (struct lang_type): Delete has_default_implementation member.
9226 Increase dummy to 21.
9227 * decl.c (start_method): Delete usage.
9228
9229 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
9230 store_after_parms, start_decl_1, auto_function): Add decls.
9231 (get_arglist_len_in_bytes, declare_implicit_exception,
9232 have_exceptions_p, make_type_decl, typedecl_for_tag,
9233 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
9234 build_component_type_expr, cplus_exception_name,
9235 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
9236 * call.c (build_this): Make static.
9237 (is_complete): Likewise.
9238 (implicit_conversion): Likewise.
9239 (reference_binding): Likewise.
9240 (standard_conversion): Likewise.
9241 (strip_top_quals): Likewise.
9242 (non_reference): Likewise.
9243 (build_conv): Likewise.
9244 (user_harshness): Likewise.
9245 (rank_for_ideal): Likewise.
9246 * decl.c (start_decl_1): Delete forward decl.
9247 (push_decl_level): Make static.
9248 (resume_binding_level): Make static.
9249 (namespace_bindings_p): Make static.
9250 (declare_namespace_level): Make static.
9251 (lookup_name_real): Make static.
9252 (duplicate_decls): Make static. Take register off NEWDECL and
9253 OLDDECL parm decls.
9254 * decl2.c (get_sentry): Make static.
9255 (temp_name_p): Delete fn.
9256 * except.c (auto_function): Delete decl.
9257 * lex.c (handle_{cp,sysv}_pragma): Make static.
9258 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
9259 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
9260 * pt.c (tsubst_expr_values): Make static.
9261 * rtti.c (combine_strings): Delete decl.
9262
9263 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
9264
9265 * pt.c (push_template_decl): Handle getting a typedef.
9266
9267 * call.c (build_new_function_call): Complain about void arg.
9268
9269 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9270
9271 * decl.c (duplicate_decls): Give pedwarn of different exceptions
9272 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
9273
9274 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
9275
9276 * except.c (expand_throw): Don't expand the cleanup tree here,
9277 since we are not going to write the rtl out. Fixes problem with
9278 -g -O on SPARC.
9279
9280 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
9281
9282 * Make-lang.in: Add $(exeext) as necessary.
9283
9284 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
9285
9286 * parse.y (handler_seq): Must have at least one catch clause.
9287
9288 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
9289
9290 * call.c (add_builtin_candidate): Restore ?: hack.
9291
9292 * decl.c (grok_op_properties): More warnings.
9293
9294 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9295
9296 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
9297 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
9298
9299 * decl.c (duplicate_decls): Scale back to a warning, and only do
9300 'em if -pedantic.
9301
9302 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
9303
9304 * decl.c (duplicate_decls): pedwarn mismatched exception
9305 specifications.
9306
9307 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
9308
9309 * call.c (build_new_method_call): Don't display the invisible
9310 argument for controlling virtual bases.
9311
9312 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
9313
9314 * new: Add nothrow new and delete, bad_alloc and throw specifications
9315 for delete.
9316 * decl.c (init_decl_processing): Add throw specification for delete.
9317 * new.cc (nothrow): Define.
9318 * lex.c (real_yylex): Removing warning that throw and friends are
9319 keywords.
9320 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
9321 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
9322 * Make-lang.in: Add new{1,2}.{cc,o}.
9323
9324 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
9325
9326 * lex.c (cons_up_default_function): Fix return type of synth op=.
9327
9328 * init.c (emit_base_init): Add warnings for uninitialized members
9329 and bases.
9330
9331 * decl.c (xref_basetypes): Add warning for non-polymorphic type
9332 with destructor used as base type.
9333
9334 * decl.c (grok_op_properties): Add warning for op= returning void.
9335 * typeck.c (c_expand_return): Add warning for op= returning anything
9336 other than *this.
9337
9338 * class.c (finish_struct_1): Add warning for class with pointers
9339 but not copy ctor or copy op=.
9340
9341 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
9342 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
9343 (instantiate_template): If -fexternal-templates, add this
9344 instantiation to pending_templates.
9345
9346 * decl2.c (copy_assignment_arg_p): Disable old hack to support
9347 Booch components.
9348
9349 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
9350
9351 * cvt.c (cp_convert): Pedwarn enum to pointer conversions.
9352
9353 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
9354
9355 * call.c (standard_conversion): Handle getting references. Tack
9356 on RVALUE_CONV here. Do it for non-class types, too.
9357 (reference_binding): Pass references to standard_conversion.
9358 (implicit_conversion): Likewise.
9359 (add_builtin_candidate): Disable one ?: kludge.
9360 (convert_like): Handle RVALUE_CONVs for non-class types.
9361 (joust): Disable the other ?: kludge.
9362
9363 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9364
9365 * decl.c (init_decl_processing): Add code to build up common
9366 function types beforehand, to avoid creation then removal of
9367 things already in the hash table.
9368
9369 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
9370
9371 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
9372 the arguments.
9373
9374 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
9375 current_template_parms.
9376
9377 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
9378
9379 * search.c (lookup_field): Don't return a function, check want_type.
9380
9381 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9382
9383 * init.c (build_new): Make sure PLACEMENT has a type.
9384
9385 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
9386
9387 * init.c (build_new): Support new (nothrow).
9388
9389 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
9390
9391 * pt.c (instantiate_decl): Also do push_to_top_level before setting
9392 up DECL_INITIAL.
9393
9394 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
9395 * pt.c (tsubst): Defer instantiation of default args.
9396 * call.c (build_over_call): Until here.
9397
9398 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9399
9400 * search.c (lookup_field): Make sure we have an
9401 IDENTIFIER_CLASS_VALUE before we try to return it.
9402
9403 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
9404
9405 * call.c (build_method_call): Delete unused var PARM.
9406 (build_overload_call_real): Likewise.
9407 (build_object_call): Delete unused var P.
9408 (build_new_op): Likewise.
9409 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
9410 var definitions, which are never used.
9411 (shadow_tag): Delete unused var FN.
9412 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
9413 * init.c (build_new): Delete unused var ALLOC_TEMP.
9414 * method.c (hack_identifier): Delete unused var CONTEXT.
9415 (do_build_copy_constructor): Delete unused var NAME.
9416 (synthesize_method): Delete unused var BASE.
9417 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
9418 * rtti.c (build_headof): Delete unused var VPTR.
9419 (get_typeid): Delete unused var T.
9420 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
9421 and ORIG_OP2.
9422 (build_ptrmemfunc): Delete unused vars U and NINDEX.
9423 * typeck2.c (build_functional_cast): Delete unused var BINFO.
9424
9425 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
9426
9427 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
9428 things in a type being defined.
9429 * decl.c (finish_enum): Reverse the values so that they are in
9430 the correct order.
9431
9432 * pt.c (instantiate_class_template): Don't initialize
9433 BINFO_BASETYPES until the vector is filled out.
9434 (unify): Don't abort on conflicting bindings, just fail.
9435 (instantiate_decl): Do push_tinst_level before any tsubsting.
9436
9437 * method.c (build_overload_value): Handle getting a
9438 TEMPLATE_CONST_PARM for a pointer.
9439
9440 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
9441
9442 * init.c (expand_member_init): Don't give 'not a base' error for
9443 templates.
9444
9445 * pt.c (instantiate_decl): Call import_export_decl later.
9446
9447 * pt.c (instantiate_class_template): Return a value.
9448
9449 * parse.y (extension): New rule for __extension__.
9450 (extdef, unary_expr, decl, component_decl): Use it.
9451
9452 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
9453
9454 * class.c (base_binfo): Remove unused base_has_virtual member.
9455 (finish_base_struct): Likewise.
9456 (finish_struct_1): Likewise.
9457
9458 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
9459
9460 * search.c (expand_upcast_fixups): Fix bogus code generation
9461 problem where the generated code uses the wrong index into the
9462 runtime built vtable on the stack. Old code could clobber random
9463 stack values.
9464
9465 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
9466
9467 * init.c (perform_member_init): Make sure the partial EH cleanups
9468 live on the function_obstack.
9469
9470 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
9471
9472 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
9473 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
9474
9475 Tue Dec 24 10:24:03 1996 Jeffrey A Law (law@cygnus.com)
9476
9477 * decl.c (grokvardecl): Avoid ANSI style initialization.
9478
9479 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
9480
9481 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
9482
9483 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
9484
9485 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
9486
9487 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9488
9489 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
9490 arguments we compare against. Start the count of I at 1, not 0,
9491 since argv[0] is still the command.
9492
9493 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
9494
9495 * lang-specs.h: Accept .cp as an C++ extension.
9496
9497 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9498
9499 * cp-tree.h (ptr_reasonably_similar): Add decl.
9500
9501 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9502
9503 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
9504 pointer. New local SPECBITS with the parm's value.
9505 (grokdeclarator): Pass &specbits down.
9506
9507 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
9508 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
9509
9510 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
9511 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
9512
9513 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
9514 not an error_mark_node.
9515
9516 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
9517
9518 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
9519 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
9520
9521 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
9522
9523 * decl.c (grokdeclarator): When giving an anonymous struct a name,
9524 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
9525 not affected).
9526
9527 * typeck2.c (build_m_component_ref): If component is a pointer
9528 to data member, resolve the OFFSET_REF now.
9529
9530 * call.c (convert_like): Don't go into infinite recursion.
9531
9532 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
9533
9534 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
9535 * tree.c (layout_basetypes): And on the vbase ptr.
9536
9537 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
9538
9539 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
9540 CHAR_TYPE_SIZE so bool is always the same size as another type.
9541
9542 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
9543
9544 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
9545
9546 * decl2.c (grok_x_components): Remove synthesized methods from
9547 TYPE_METHODS of an anonymous union, complain about member
9548 functions.
9549 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
9550 anonymous unions.
9551 (finish_function): Just clear the DECL_RTL of our arguments.
9552
9553 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
9554
9555 * decl2.c (finish_file): Emit DWARF debugging info for static data
9556 members.
9557
9558 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
9559
9560 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
9561
9562 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
9563 IDENTIFIER_NODE.
9564
9565 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
9566
9567 * Make-lang.in (g++-cross$(exeext)): Fix typo.
9568
9569 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9570
9571 Make the g++ driver now be a standalone program, rather than one
9572 that tries to run the gcc driver after munging up the options.
9573 * Make-lang.in (g++.c, g++spec.o): New rules.
9574 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
9575 added.
9576 (g++$(exeext)): New rule, based on xgcc rule.
9577 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
9578 * g++spec.c: New file.
9579 * g++.c: Removed file.
9580
9581 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
9582
9583 * cvt.c (build_up_reference): Arrange for any temporary values
9584 that have been keep in registers until now to be put into memory.
9585
9586 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9587
9588 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
9589 that make -j3 bootstrap works better.
9590
9591 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
9592
9593 * decl.c (pushtag): Do pushdecl for anon tags.
9594
9595 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
9596
9597 * typeck.c (c_expand_return): Fix logic.
9598 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
9599
9600 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
9601
9602 * g++.c (main): Make sure arglist has a final NULL entry. Add
9603 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
9604 stdin/stdout of the invoked program are redirected to
9605 nowheresville.
9606
9607 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
9608
9609 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
9610
9611 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
9612
9613 * init.c (resolve_offset_ref): Handle obj.vfn better.
9614 * typeck.c (build_component_ref): Set TREE_TYPE on result from
9615 build_vfn_ref.
9616
9617 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
9618
9619 * typeck.c (convert_for_assignment): Also handle anachronistic
9620 implicit conversions from (::*)() to cv void*.
9621 * cvt.c (cp_convert_to_pointer): Likewise.
9622
9623 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
9624
9625 * lex.c (handle_cp_pragma): Fix bogus warning.
9626
9627 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
9628
9629 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
9630 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
9631
9632 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
9633
9634 * class.c (finish_struct_1): Support DWARF2_DEBUG.
9635 * search.c (dfs_debug_mark): Likewise.
9636 * decl2.c (finish_vtable_vardecl): Likewise.
9637 * decl.c (pushtag, finish_enum): Likewise.
9638 * lex.c (check_newline): Use debug_* instead of calling *out
9639 functions directly.
9640
9641 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9642
9643 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
9644 on some picky hosts.
9645
9646 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
9647
9648 * class.c (finish_struct_1): A class has a non-trivial copy
9649 constructor if it has virtual functions.
9650
9651 * cvt.c (cp_convert): Always call a constructor.
9652
9653 * call.c (reference_binding): Still tack on a REF_BIND
9654 for bad conversions.
9655 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
9656
9657 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
9658 (c_expand_return): Likewise.
9659 * typeck2.c (digest_init): Likewise for { }.
9660 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
9661 * cvt.c (cp_convert): Handle failure better.
9662
9663 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9664
9665 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
9666 of GCC be path-relative.
9667
9668 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
9669
9670 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
9671 it does need choose-temp.o and pexecute.o.
9672
9673 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9674
9675 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
9676 that we still use it.
9677 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
9678
9679 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
9680
9681 * init.c (expand_default_init): Avoid calling constructors to
9682 initialize reference temps.
9683
9684 * cvt.c (convert_to_reference): Fix.
9685
9686 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
9687
9688 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
9689 (convert_to_reference): Likewise.
9690 * typeck.c (convert_for_initialization): Likewise.
9691 * init.c (expand_default_init): Likewise.
9692 (expand_aggr_init_1): Likewise.
9693 * cp-tree.h (CONV_NONCONVERTING): Lose.
9694 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
9695 * *.c: Adjust.
9696 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
9697
9698 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
9699
9700 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
9701
9702 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
9703
9704 * init.c (expand_aggr_init_1): Don't crash on non-constructor
9705 TARGET_EXPR.
9706
9707 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9708
9709 * g++.c: Include gansidecl.h.
9710 (VPROTO, PVPROTO, VA_START): Delete.
9711 (choose_temp_base_try, choose_temp_base, perror_exec,
9712 run_dos) [__MSDOS__]: Delete fns.
9713 (pfatal_with_name): Delete fn.
9714 (temp_filename): Declare like in gcc.c.
9715 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
9716 (error_count, signal_count): Define.
9717 (error): Delete both definitions.
9718 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
9719 (pfatal_pexecute): Add fn from gcc.c.
9720 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
9721 code to use the pexecute stuff also used by gcc.c.
9722 (MIN_FATAL_STATUS): Define.
9723 * Make-lang.in (g++): Add dependency on and linking with
9724 choose-temp.o and pexecute.o.
9725
9726 * cp-tree.h: Include gansidecl.h.
9727 (STDIO_PROTO): Delete #undef/#define.
9728 * cvt.c (NULL): Delete #undef/#define.
9729 * expr.c (NULL): Likewise.
9730 * init.c (NULL): Likewise.
9731 * rtti.c (NULL): Likewise.
9732 * xref.c (NULL): Likewise.
9733
9734 * cp-tree.h (build_user_type_conversion): Add prototype.
9735 * call.c (build_user_type_conversion): Delete prototype. Correct
9736 decl of FLAGS arg to be an int.
9737 * cvt.c (build_user_type_conversion): Likewise.
9738
9739 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
9740
9741 * cp-tree.def: Add TRY_BLOCK and HANDLER.
9742 * except.c (expand_start_catch_block): Support templates.
9743 * parse.y (try_block, handler_seq): Likewise.
9744 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
9745
9746 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
9747
9748 * pt.c (current_template_args): New fn.
9749 (push_template_decl): Use it.
9750 * decl.c (grokdeclarator): Use it.
9751
9752 * decl2.c (build_expr_from_tree): Dereference ref vars.
9753
9754 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
9755 the decl-specifier-seq.
9756
9757 * decl.c (grok_op_properties): Don't force the type of a conversion
9758 op to be complete. Don't warn about converting to the same type
9759 for template instantiations.
9760
9761 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
9762 methods.
9763
9764 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
9765
9766 * typeck.c (get_delta_difference): Remove previous bogusness.
9767 Don't give errors if force is set.
9768
9769 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
9770
9771 * decl2.c (finish_file): Don't emit debug info.
9772 * decl.c (pushdecl): Lose obsolete code.
9773 (grokdeclarator): Still do the long long thing after complaining.
9774 * search.c (note_debug_info_needed): Don't do anything if we're in a
9775 template.
9776 * method.c (synthesize_method): For non-local classes,
9777 push_to_top_level first.
9778
9779 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
9780
9781 * typeck.c (get_delta_difference): Add no_error parameter.
9782 (build_ptrmemfunc): Call get_delta_difference with no_error set;
9783 we don't want error messages when converting unrelated
9784 pointer-to-member functions.
9785
9786 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
9787
9788 * error.c (dump_expr): Improve the wording on error messages that
9789 involve pointer to member functions.
9790
9791 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
9792
9793 * cvt.c (cp_convert_to_pointer): Move code for conversions from
9794 (::*)() to void* or (*)() up a bit, so that we can convert from
9795 METHOD_TYPEs as well.
9796
9797 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
9798
9799 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
9800 There are no 'member' types.
9801 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
9802 (build_x_typeid): Handle errors.
9803
9804 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
9805
9806 * typeck.c (convert_for_assignment): Handle anachronistic implicit
9807 conversions from (::*)() to void* or (*)().
9808 * cvt.c (cp_convert_to_pointer): Likewise.
9809 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
9810 conversions from here.
9811 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
9812 * lang-options.h: Likewise.
9813 * decl2.c (warn_pmf2ptr): Define.
9814 * cp-tree.h: Declare it.
9815 * typeck2.c (digest_init): Allow pmfs down into
9816 convert_for_initialization.
9817
9818 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
9819
9820 * typeck.c (c_expand_return): Fix for returning overloaded fn.
9821
9822 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
9823
9824 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
9825 * decl.c (grok_reference_init): Pass DIRECT_BIND.
9826 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
9827 DIRECT_BIND.
9828 * call.c (convert_like): Don't pass INDIRECT_BIND.
9829 * typeck.c (convert_arguments): Likewise.
9830 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
9831
9832 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
9833
9834 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
9835 similar code in build_up_ref.
9836 * cvt.c (build_up_reference): Drastically simplify.
9837
9838 Mon Oct 28 12:45:05 1996 Jeffrey A Law (law@cygnus.com)
9839
9840 * typeck.c (signed_or_unsigned_type): If the given type already
9841 as the correct signedness, then just return it.
9842
9843 * typeck.c ({un,}signed_type): If can't do anything, call
9844 signed_or_unsigned_type.
9845
9846 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
9847
9848 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
9849 current_class_type is NULL.
9850
9851 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
9852
9853 * class.c (finish_struct_1): Avoid empty structs by adding a field
9854 so layout_type gets the mode right.
9855
9856 * typeck.c (c_expand_return): Drastically simplify.
9857
9858 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
9859
9860 * typeck.c (decay_conversion): Handle overloaded methods.
9861
9862 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
9863
9864 * call.c (build_over_call): A TARGET_EXPR has side-effects.
9865
9866 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
9867
9868 * cvt.c (convert_to_pointer_force): Add code to support pointer to
9869 member function to pointer to function conversions.
9870 * init.c (resolve_offset_ref): Add code to allow faked up objects,
9871 ignoring them if they are not used, and giving an error, if they
9872 are needed.
9873 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
9874 code, and so that we can give an error, if we needed an object,
9875 and one was not provided.
9876 (build_c_cast): Don't call default_conversion when we want to
9877 convert to pointer to function from a METHOD_TYPE.
9878
9879 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
9880
9881 * Make-lang.in (cplib2.ready): Fix logic.
9882
9883 * decl.c (shadow_tag): Only complain about non-artificial function
9884 members.
9885
9886 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
9887
9888 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
9889
9890 * expr.c (cplus_expand_expr): Pre-tweak call_target like
9891 expand_inline_function would.
9892
9893 * pt.c (mark_decl_instantiated): If extern_p, call
9894 mark_inline_for_output.
9895
9896 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
9897
9898 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
9899 pmd conversions.
9900
9901 * typeck.c (get_delta_difference): Fix wording, as we can be used
9902 for pointer to data members.
9903
9904 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
9905
9906 * pt.c (tsubst): If the function decl isn't a member of this
9907 template, return a copy of the decl (including copying the
9908 lang-specific part) so we don't hose ourselves later.
9909
9910 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
9911
9912 * class.c (finish_struct): Remove DWARF-specific tag handling.
9913 * decl.c (pushtag): Likewise.
9914 (finish_function): Always clear DECL_ARGUMENTS on function decls with
9915 no saved RTX.
9916 * decl2.c (finish_file): Emit DWARF debugging info for static data
9917 members.
9918
9919 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
9920
9921 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
9922 isn't the same as the new one before we whack it.
9923
9924 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
9925
9926 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
9927 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
9928 warn_traditional and warn_strict_prototypes; remove ancient
9929 'overload' code; remove references to flag_traditional.
9930
9931 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
9932
9933 * input.c (sub_getch): Handle 8-bit characters in string literals.
9934
9935 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
9936
9937 * tree.c (mapcar): Handle CONSTRUCTORs.
9938 (copy_to_permanent): Handle expression_obstack properly.
9939
9940 * Make-lang.in (cplib2.txt): Also depend on the headers.
9941
9942 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
9943 INT_TYPE_SIZE.
9944 (expand_class_desc): Use USItype for offset field.
9945 * tinfo.h (struct __class_type_info): Likewise.
9946
9947 * method.c (build_overload_int): TYPE_PRECISION should be applied
9948 to types.
9949
9950 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
9951
9952 * call.c (build_new_op): A COND_EXPR involving void must be a
9953 builtin.
9954
9955 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
9956
9957 * typeck.c (build_x_component_ref): New fn.
9958 (build_object_ref): Use it.
9959 * parse.y (primary): Use it.
9960 * decl2.c (build_expr_from_tree): Use it.
9961 * cp-tree.h: Declare it.
9962
9963 * decl.c (start_decl): variable-sized arrays cannot be initialized.
9964 * error.c (dump_type_suffix): Handle variable arrays.
9965
9966 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9967
9968 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
9969
9970 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
9971
9972 * decl.c (lookup_name_real): Don't try to look up anything in a
9973 TYPENAME_TYPE.
9974
9975 * tinfo2.cc (__throw_type_match_rtti): Oops.
9976
9977 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
9978
9979 * Make-lang.in (exception.o): Use -fno-PIC for now.
9980
9981 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
9982
9983 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
9984 calling them.
9985 (get_tinfo_fn_dynamic): Extracted from build_typeid.
9986 * tinfo2.cc (__dynamic_cast): Adjust.
9987
9988 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
9989 (build_x_typeid): Likewise.
9990
9991 * parse.y: Call build_x_typeid instead of build_typeid.
9992 * cp-tree.def: Add TYPEID_EXPR.
9993 * pt.c (tsubst_copy): Handle typeid.
9994 * decl2.c (build_expr_from_tree): Likewise.
9995 * rtti.c (build_x_typeid): Throw bad_typeid from here.
9996 (build_typeid): Not here.
9997 * cp-tree.h: Declare build_x_typeid.
9998
9999 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
10000
10001 * call.c (convert_like): Pull out constant values.
10002
10003 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
10004
10005 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10006
10007 * decl.c (init_decl_processing): Create short int types before
10008 creating size_t in case a machine description needs to use
10009 unsigned short for size_t.
10010
10011 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
10012
10013 * Make-lang.in (exception.o): Turn off pic.
10014
10015 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
10016 type, multi-level ptr conversions.
10017
10018 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
10019 (throw_bad_cast): Use it.
10020 (throw_bad_typeid): New fn.
10021 (build_typeid): Throw bad_typeid as needed.
10022 Use build_call.
10023 (synthesize_tinfo_fn): Handle functions and arrays before checking
10024 for cv-quals.
10025
10026 * Remove .h from standard C++ headers, add new.h, move into inc
10027 subdirectory.
10028
10029 * exception*: Remove pointer from object, constructors. Add
10030 default exception::what that uses type_info::name. Add
10031 __throw_bad_typeid.
10032
10033 * init.c (build_new): Don't add a cookie to new (void *) T[2].
10034
10035 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
10036
10037 * Make-lang.in: Building C++ code depends on cc1plus.
10038
10039 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10040
10041 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
10042 a HOST_WIDE_INT, not a tree.
10043
10044 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
10045
10046 * exception.cc: Don't include <stdlib.h>.
10047
10048 * Make-lang.in (c++.clean): Remove cplib2.*.
10049
10050 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
10051
10052 * parse.y (component_decl_1, component_costructor_declarator case):
10053 Pass attributes/prefix_attributes in tree list.
10054
10055 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
10056
10057 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
10058
10059 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10060
10061 * lex.c (do_identifier): Don't do deferred lookup in a template
10062 header.
10063
10064 * typeck2.c (store_init_value): Oops.
10065
10066 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
10067 New files for C++ lang-support library.
10068 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
10069 (CXX_LIB2FUNCS): Define.
10070 And rules for building the C++ lang-support code.
10071 * config-lang.in (headers): Define.
10072 (lib2funcs): Define.
10073
10074 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10075
10076 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
10077 digest_init.
10078 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
10079 * typeck2.c (store_init_value): Check for initializing pmf with { }
10080 here.
10081 (process_init_constructor): Not here.
10082
10083 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10084
10085 * pt.c (begin_template_parm_list): Increment
10086 processing_template_decl here.
10087 (end_template_parm_list): Not here.
10088 (process_template_parm): No need to add 1 to it now.
10089 * *.c: Use processing_template_decl instead of current_template_parms
10090 to check for being in a template.
10091
10092 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
10093 (tsubst_copy): Handle CONSTRUCTOR.
10094 (instantiate_decl): Set up context properly for variables.
10095 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
10096 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
10097
10098 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10099
10100 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
10101
10102 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10103
10104 * method.c (make_thunk): Call comdat_linkage before setting the
10105 TREE_CODE.
10106
10107 * decl2.c (comdat_linkage): Use make_decl_one_only.
10108 (import_export_decl): Likewise.
10109 * decl.c (init_decl_processing): Check supports_one_only instead of
10110 SUPPORTS_WEAK.
10111
10112 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
10113
10114 * decl2.c (grokfield): Tighten checking for access decls.
10115
10116 * decl.c (make_typename_type): Resolve references to
10117 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
10118 (lookup_name_real): Types that depend on a template parameter get
10119 an implicit 'typename' unless they're in the current scope.
10120 (start_decl_1): We don't care about incomplete types that depend
10121 on a template parm.
10122 (grokdeclarator): Resolve 'typename's in the type specifier that
10123 refer to members of the current scope.
10124
10125 * call.c (build_over_call): Remove 'inline called before
10126 definition' diagnostic.
10127 (build_method_call): Likewise.
10128 * decl.c (duplicate_decls): Downgrade 'used before declared
10129 inline' to a warning, only with -Winline.
10130
10131 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
10132
10133 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
10134
10135 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10136
10137 * call.c (build_method_call): When calling a signature
10138 default implementation, as in other cases, let instance_ptr simply
10139 be instance.
10140
10141 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
10142
10143 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
10144
10145 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
10146
10147 * except.c (expand_start_catch_block): Add a pushlevel so that -g
10148 works on hppa and SPARC.
10149
10150 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10151
10152 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
10153
10154 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10155
10156 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
10157 before testing whether it's a signature.
10158
10159 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
10160
10161 * call.c (build_new_method_call): Don't complain about signature
10162 pointers and references not being an aggr type.
10163 (build_this): If a signature pointer or reference was passed in,
10164 just return it.
10165 (build_new_method_call): If instance is a signature pointer, set
10166 basetype to the signature type of instance.
10167 * sig.c (build_signature_method_call): Deleted basetype and
10168 instance parameters, they can be found as the DECL_CONTEXT of
10169 function and as the first argument passed in.
10170 * cp-tree.h: Changed declaration of build_signature_method_call.
10171 * call.c (build_method_call): Deleted first two arguments in call
10172 of build_signature_method_call.
10173 (build_over_call): Added call to build_signature_method_call.
10174
10175 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10176
10177 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
10178 target_expr.
10179
10180 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10181
10182 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
10183
10184 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
10185
10186 * except.c (expand_start_try_stmts): Move to except.c in the backend.
10187 (expand_end_try_stmts): Remove.
10188
10189 * init.c (perform_member_init): Use add_partial_entry () instead
10190 of directly manipulating lists.
10191 (emit_base_init): Ditto.
10192
10193 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
10194
10195 * except.c (expand_exception_blocks): Always make sure USE and
10196 CLOBBER insns that came at the end still do, the backend relies
10197 upon this.
10198
10199 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
10200
10201 * call.c (build_over_call): We can only use a TARGET_EXPR of the
10202 right type.
10203
10204 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
10205
10206 * cvt.c (convert_to_reference): Revert last change, don't complain
10207 about temp without target decl.
10208
10209 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
10210
10211 * decl.c (grokdeclarator): Don't core dump when void() is given.
10212
10213 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
10214
10215 * decl.c (copy_args_p): Don't crash.
10216
10217 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
10218
10219 * pt.c (tsubst): And support template args inside the exception
10220 specification.
10221
10222 * pt.c (tsubst): Add support for exception specifications in
10223 template functions.
10224
10225 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
10226
10227 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
10228 fields now.
10229 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
10230 (start_function): Likewise.
10231 (start_method): Likewise.
10232 (grokfield): Likewise.
10233 (make_call_declarator): Add throw spec parameter.
10234 (set_quals_and_spec): Add routine.
10235 * lex.c (set_quals_and_spec): Likewise.
10236 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
10237 * decl.c (shadow_tag): Eliminate the throw spec parameter to
10238 grokdeclarator.
10239 (groktypename): Likewise.
10240 (start_decl): Eliminate the throw spec parameter. Eliminate the
10241 throw spec parameter to grokdeclarator. Eliminate the throw spec
10242 field in DECL_STMT.
10243 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
10244 (grokfndecl): Remove useless set of raises.
10245 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
10246 the throw spec parameter to start_decl. Pull the throw spec out
10247 of the call declarator.
10248 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
10249 (start_function): Eliminate the throw spec parameter. Eliminate
10250 the throw spec parameter to grokdeclarator.
10251 (start_method): Likewise.
10252 * decl2.c (grokfield): Likewise.
10253 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
10254 (grokoptypename): Likewise.
10255 (finish_file): Eliminate the throw spec parameter to
10256 start_function. Add throw spec to make_call_declarator.
10257 * except.c (init_exception_processing): Add throw spec to
10258 make_call_declarator. Eliminate the throw spec parameter to
10259 start_decl.
10260 (expand_start_catch_block): Eliminate the throw spec parameter to
10261 grokdeclarator.
10262 (expand_builtin_throw): Add throw spec to make_call_declarator.
10263 Eliminate the throw spec parameter to start_function.
10264 (start_anon_func): Likewise.
10265 * lex.c (make_call_declarator): Add throw spec parameter.
10266 (set_quals_and_spec): New routine.
10267 (cons_up_default_function): Add throw spec to make_call_declarator.
10268 Eliminate the throw spec parameter to grokfield.
10269 * method.c (synthesize_method): Eliminate the throw spec parameter
10270 to start_function.
10271 * pt.c (process_template_parm): Eliminate the throw spec parameter
10272 to grokdeclarator.
10273 (tsubst): Add throw spec to make_call_declarator.
10274 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
10275 (do_function_instantiation): Eliminate the throw spec parameter to
10276 grokdeclarator. Eliminate the throw spec parameter to
10277 start_function.
10278 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
10279 to start_function.
10280 * parse.y (datadef): Remove non-winning optimization.
10281 (decl): Likewise.
10282 (fndef): Remove ambiguous error productions uncovered by grammer
10283 fixing.
10284 (constructor_declarator): Add exception_specification_opt here.
10285 (component_constructor_declarator): Likewise.
10286 (direct_after_type_declarator): Likewise.
10287 (complex_direct_notype_declarator): Likewise.
10288 (direct_abstract_declarator): Likewise.
10289 (fn.def1): Remove exception_specification_opt.
10290 (fn.def2): Likewise.
10291 (condition): Likewise.
10292 (initdcl0): Likewise.
10293 (initdcl): Likewise.
10294 (notype_initdcl0): Likewise.
10295 (nomods_initdcl0): Likewise.
10296 (component_decl_1): Likewise.
10297 (component_declarator): Likewise.
10298 (after_type_component_declarator0): Likewise.
10299 (after_type_component_declarator): Likewise.
10300 (notype_component_declarator): Likewise.
10301
10302 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10303
10304 * call.c (build_over_call): Also use an INIT_EXPR when
10305 initializing anything from an rvalue.
10306
10307 * call.c (build_over_call): Call stabilize_reference when building
10308 an INIT_EXPR instead of calling the copy ctor.
10309
10310 * call.c (joust): Extend the previous change to all comparisons.
10311
10312 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
10313 NO_LINKAGE_HEURISTICS.
10314
10315 * decl2.c (finish_file): Emit any statics that weren't already.
10316
10317 * typeck.c (build_static_cast): Implement.
10318 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
10319 * decl.c (grokparms): Use can_convert_arg instead of
10320 implicit_conversion directly.
10321 (copy_args_p): New fn.
10322 * cvt.c (convert_to_reference): Don't complain about temp with
10323 static_cast.
10324 (build_up_reference): Handle TARGET_EXPRs.
10325 * call.c (build_over_call): Elide unnecessary temps.
10326 (can_convert*): Use new overloading code.
10327
10328 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
10329
10330 * call.c: Move TYPE_PTR*_MACROS ...
10331 * cp-tree.h: To here.
10332 * typeck.c (build_reinterpret_cast): Implement.
10333
10334 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
10335 ptr_complete_ob.
10336 (joust): If we're comparing a function to a builtin and the worst
10337 conversion for the builtin is worse than the worst conversion for the
10338 function, take the function.
10339
10340 * typeck.c (build_const_cast): Implement.
10341 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
10342 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
10343
10344 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
10345
10346 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
10347 too early. Make sure we explode if exprtype turns out to be a
10348 NULL_TREE when it shouldn't be.
10349
10350 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
10351
10352 * cp-tree.h: New routine make_call_declarator.
10353 * lex.c (make_call_declarator): Define it.
10354 * except.c (init_exception_processing): Use it.
10355 (expand_builtin_throw): Likewise.
10356 (start_anon_func): Likewise.
10357 * decl2.c (finish_file): Likewise.
10358 * lex.c (cons_up_default_function): Likewise.
10359 * parse.y: Likewise.
10360 * pt.c (tsubst): Likewise.
10361
10362 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
10363
10364 * decl2.c (groktypefield): Remove unused code.
10365
10366 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
10367
10368 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
10369 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
10370 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
10371 nonempty_cv_qualifiers.
10372 * hash.h: Rebuild.
10373
10374 * lex.c (make_pointer_declarator): Change type_quals into
10375 cv_qualifiers.
10376 (make_reference_declarator): Likewise.
10377
10378 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10379
10380 * decl.c (start_function): Only check interface_* for templates
10381 with flag_alt_external_templates.
10382
10383 * call.c (build_new_op): Check for comparison of different enum types.
10384 (build_over_call): Fix arg # output.
10385
10386 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
10387
10388 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
10389
10390 * call.c (build_new_op): Check for erroneous args.
10391
10392 * call.c (build_new_method_call): Add missing args to cp_error.
10393
10394 * tree.c (error_type): Dont print reference-to-array.
10395
10396 * typeck.c (convert_for_assignment): Don't say contravariance for
10397 removing const.
10398
10399 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
10400
10401 * call.c (build_over_call): Diagnose bad convs for `this'.
10402
10403 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
10404 on _ctor_arg.
10405
10406 * call.c (convert_like): Handle bad convs.
10407 (build_over_call): Handle bad convs better.
10408
10409 * decl2.c: -fansi-overloading is now the default.
10410
10411 * call.c (build_new_method_call): Check for erroneous args.
10412
10413 * pt.c (instantiate_class_template): Propagate
10414 TYPE_USES_MULTIPLE_INHERITANCE.
10415
10416 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
10417
10418 * call.c (enforce_access): Add static to routine.
10419
10420 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
10421
10422 * call.c (build_user_type_conversion_1): Fix bad handling.
10423 (compare_ics): Likewise.
10424
10425 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
10426
10427 * call.c (standard_conversion): Oops.
10428
10429 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
10430
10431 * g++.c: Update test for win32 (&& ! cygwin32).
10432
10433 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
10434
10435 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
10436 (ptr_reasonably_similar): New fn.
10437 * call.c (BAD_RANK): New rank.
10438 (ICS_BAD_FLAG): New macro.
10439 (standard_conversion): Handle almost-right pointer conversions.
10440 (reference_binding): Handle bad rvalue bindings.
10441 (add_*_candidate): Stuff.
10442 (build_over_call): Pass bad conversions to convert_for_initialization.
10443 (compare_ics): Handle bad convs.
10444 (joust): Likewise.
10445
10446 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
10447
10448 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
10449 integer_type_node when computing pointer offsets.
10450
10451 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
10452
10453 * tree.c (lvalue_type): New fn.
10454 (error_type): New fn.
10455 * call.c (op_error): Use error_type.
10456 (add_conv_candidate): Use lvalue_type.
10457 (add_builtin_candidates): Likewise.
10458 * error.c (args_as_string): Use error_type.
10459
10460 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
10461
10462 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
10463 (tsubst): Not here.
10464
10465 * decl.c (init_decl_processing): With -ansi, __null's type is the
10466 signed integral type with the same number of bits as a pointer.
10467 Introduce a new variable null_node for it.
10468 * cp-tree.h: Adjust.
10469 * call.c (null_ptr_cst_p): Adjust.
10470
10471 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
10472
10473 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
10474 optimize.
10475
10476 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
10477
10478 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
10479 fns of classes without virtual functions.
10480
10481 * call.c (add_function_candidate): Handle `this' specially.
10482 (compare_ics): Likewise.
10483
10484 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
10485
10486 * typeck.c (build_conditional_expr): Fix handling of __null.
10487
10488 * decl2.c (comdat_linkage): New fn.
10489 (import_export_vtable): Use it.
10490 (import_export_decl): Use it.
10491 * method.c (make_thunk): Use it.
10492
10493 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
10494
10495 * pt.c (end_template_decl): If we don't actually have parms, return.
10496 * parse.y (template_header): Accept 'template <>'.
10497
10498 * errfn.c: Allow 5 args.
10499
10500 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
10501
10502 * tree.c (make_temp_vec): New fn.
10503 * pt.c (push_template_decl): Handle partial specs.
10504 (instantiate_class_template): Likewise.
10505 (more_specialized): Use get_bindings.
10506 (more_specialized_class): New fn.
10507 (get_class_bindings): New fn.
10508 (most_specialized_class): New fn.
10509 (do_function_instantiation): List candidates for ambiguous case.
10510 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
10511 (shadow_tag): Call push_template_decl for partial specializations.
10512 * parse.y: Likewise.
10513 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
10514 DECL_TEMPLATE_MEMBERS.
10515 * call.c (print_z_candidates): Reduce duplication.
10516
10517 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
10518
10519 * decl2.c (lang_decode_option): Allow -fansi-overloading.
10520
10521 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
10522
10523 * pt.c (get_bindings): New fn.
10524 (most_specialized): Likewise.
10525 (do_function_instantiation): Use them.
10526 (add_maybe_template): New fn.
10527 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
10528 * call.c (build_new_op): Handle guiding decls.
10529 (build_new_function_call): Likewise.
10530 * decl2.c (finish_file): Likewise.
10531
10532 * decl2.c (mark_used): Do synthesis here.
10533 * call.c (build_method_call): Not here.
10534 (build_over_call): Or here.
10535 * typeck.c (build_function_call_real): Or here.
10536 * tree.c (bot_manip): Call mark_used on functions used in default
10537 args.
10538
10539 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
10540
10541 * decl2.c (import_export_vtable): Delete code that disabled vtable
10542 heuristic on systems with ASM_OUTPUT_EXTERNAL.
10543
10544 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
10545
10546 * typeck.c (build_x_function_call): Handle static call context
10547 better.
10548
10549 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
10550 the function, not its outer block.
10551
10552 * call.c (build_field_call): Pass fields on to build_opfncall
10553 regardless of TYPE_OVERLOADS_CALL_EXPR.
10554 (build_method_call): Pass on to build_new_method_call sooner.
10555
10556 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
10557 gives us.
10558 * class.c (instantiate_type): Don't put a POINTER_TYPE to
10559 METHOD_TYPE on an expression. Also make a copy of rhs instead of
10560 modifying it.
10561
10562 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
10563
10564 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
10565 (add_builtin_candidate): Don't take enums for ++.
10566 (build_new_method_call): Handle non-aggregates and field calls.
10567 Move new overloading code from...
10568 * cvt.c: Here.
10569
10570 * decl.c (grokparms): Don't check default args in templates.
10571
10572 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
10573
10574 * cvt.c (build_new_op): Fix args to build_unary_op.
10575 (add_builtin_candidates): Don't call type_promotes_to on float.
10576
10577 * decl.c (grokparms): Check the type of the default arg.
10578
10579 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
10580 returning NULL_TREE.
10581
10582 * typeck.c (build_x_binary_op): Avoid doing extra work.
10583 (build_x_unary_op): Likewise.
10584 (build_x_conditional_expr): Likewise.
10585 * cvt.c (build_over_call): Return.
10586 (add_builtin_candidate): Fix MEMBER_REF.
10587 (build_new_op): Likewise.
10588
10589 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
10590
10591 * method.c (build_overload_name): Put bug fix into code but leave
10592 disabled for now so we can be bug compatible with older releases
10593 that do repeats incorrectly. In the future, we can enable it.
10594
10595 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
10596
10597 * cvt.c (convert_like): Don't call build_cplus_new twice.
10598
10599 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
10600 Control new overloading code with -fansi-overloading.
10601
10602 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
10603
10604 * cvt.c (build_over_call): Call build_cplus_new.
10605 * call.c (build_method_call): Likewise.
10606 * typeck.c (build_function_call_real): Likewise.
10607 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
10608 the COND_EXPR in a TARGET_EXPR so they use the same slot.
10609
10610 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
10611 recursive calls.
10612 * typeck.c (complete_type): Propagate
10613 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
10614
10615 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
10616
10617 * cvt.c (joust): More ?: kludging. Sigh.
10618 (build_over_call): Don't try to synthesize global fns.
10619
10620 * search.c (lookup_conversions): Use binfo marking.
10621
10622 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
10623
10624 * search.c (build_mi_matrix): Use the correct value of cid
10625 when determining the new mi_size.
10626
10627 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
10628
10629 * cvt.c (add_builtin_candidates): Do consider type conversion ops
10630 for the first parms of += et al.
10631 (strip_top_quals): New fn.
10632 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
10633 (implicit_conversion): Likewise.
10634 (add_builtin_candidates): Be careful about arrays.
10635 (build_new_method_call): Handle vtable optimization.
10636
10637 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
10638
10639 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
10640 * cvt.c (reference_binding): Use it.
10641 (implicit_conversion): Use it.
10642 (add_builtin_candidate, COND_EXPR): Use it.
10643
10644 * cvt.c (build_new_function_call): Check for error args.
10645
10646 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
10647
10648 * gxx.gperf: Add __null.
10649 * hash.h: Regenerate.
10650 * lex.h: Add RID_NULL.
10651 * lex.c (init_lex): Create null_pointer_node here, stick it in
10652 RID_NULL.
10653 * decl.c (init_decl_processing): Still set its type here.
10654 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
10655 (convert_to_pointer_force): Likewise.
10656 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
10657 if (! pedantic).
10658 * call.c (convert_harshness): Use null_ptr_cst_p.
10659 * typeck.c (convert_for_assignment): Likewise. Don't produce
10660 null_pointer_node.
10661
10662 * error.c (args_as_string): Handle lists of actual args, too.
10663 * cvt.c (null_ptr_cst): Support (void*)0 for now.
10664 (build_user_type_conversion_1): Improve diagnostics.
10665 (build_new_function_call): Likewise.
10666 (build_object_call): Likewise.
10667 (build_new_method_call): Likewise. Move call before def diagnostic...
10668 (build_over_call): Here.
10669
10670 * cvt.c (build_new_method_call): Don't complain about no match if
10671 LOOKUP_SPECULATIVELY.
10672 (build_over_call): Fix 'this' for virtual fn.
10673 (build_new_method_call): Add diagnostic.
10674
10675 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
10676
10677 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
10678 constructors to be passed in.
10679 (build_over_call): Likewise.
10680 (build_user_type_conversion_1): Pass them in.
10681 (convert_like): Likewise.
10682 (build_object_call): Handle overloaded conversions.
10683 (build_over_call): Pass the right args to build_vfn_ref.
10684 (standard_conversion): Fix pmf convs.
10685 (joust): Handle comparing statics and non-statics.
10686 (build_new_method_call): New fn.
10687 * call.c (build_method_call): Call it if NEW_OVER.
10688
10689 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
10690
10691 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
10692 %D instead.
10693
10694 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
10695
10696 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
10697 instead of just maybe_build_cleanup so that we deallocate the
10698 thrown object.
10699
10700 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10701
10702 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
10703 * cp-tree.h (finish_prevtable_vardecl): Add decl.
10704
10705 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
10706
10707 * pt.c (instantiate_class_template): Call complete_type. Also, if
10708 we're at the end of the file and we just instantiated a template
10709 class with a vtable, call finish_prevtable_vardecl.
10710
10711 * error.c (dump_decl): Don't explode (or explode more gracefully
10712 as appropriate) if the object being dumped has a null type.
10713 (dump_expr): Likewise.
10714
10715 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
10716 by counting the number of nodes that we'll need before allocating
10717 the array.
10718 (lookup_fnfields): Fix comment.
10719 (breadth_first_search): Fix comment.
10720
10721 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
10722
10723 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
10724 TYPE_ALIGN.
10725 * class.c (finish_struct): Call cplus_decl_attributes here.
10726 (finish_struct_1): Not here.
10727 * cp-tree.h: Adjust.
10728
10729 * pt.c (type_unification): New parameter STRICT.
10730 (unify): If STRICT, don't allow cv addition or base deduction.
10731 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
10732
10733 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
10734
10735 * search.c (get_template_base{_recursive}): New fns.
10736 * pt.c (more_specialized): New fn.
10737 (do_function_instantiation): Use it.
10738 (unify): Handle base deduction.
10739 * cvt.c (joust): Use more_specialized.
10740 Don't arbitrarily choose between non-builtin candidates.
10741 (build_over_call): Call require_complete_type.
10742
10743 * decl.c (start_function): Statics are static even in a #pragma
10744 interface file.
10745
10746 * decl2.c (import_export_vtable): Disable vtable heuristic on
10747 systems with ASM_OUTPUT_EXTERNAL.
10748
10749 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
10750 (standard_conversion): No std conv to enum type.
10751
10752 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
10753 for ptm's.
10754
10755 * cvt.c (reference_binding): Bind directly to a base subobject of
10756 a class rvalue.
10757
10758 * cvt.c (build_new_op): Enforce access control.
10759
10760 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
10761
10762 * typeck2.c (process_init_constructor): When scanning the
10763 union for a named field, skip things that aren't FIELD_DECLs.
10764
10765 * method.c (synthesize_method): Don't scan fndecl's rtl if
10766 we're at the end of the file; just assume the function can't
10767 be inlined.
10768
10769 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10770
10771 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
10772 it failed.
10773
10774 * cvt.c (build_user_type_conversion_1): Handle overloaded
10775 conversion ops.
10776
10777 * cvt.c (add_builtin_candidates): Don't consider type conversion
10778 operators for the first parameter of operator=.
10779
10780 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
10781
10782 * typeck.c (complete_type): Only call layout_type if we're not
10783 expanding a template.
10784
10785 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
10786
10787 * cvt.c (compare_ics): Oops.
10788
10789 * cvt.c (op_error): Oops.
10790
10791 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
10792 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
10793 (build_conv): Use them.
10794 (implicit_conversion): Use them.
10795 (convert_like): Handle them.
10796 (build_new_op): Handle builtin COND_EXPR again.
10797 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
10798 in lists of types for COND_EXPR.
10799 (add_builtin_candidate): Add enum candidates for COND_EXPR.
10800
10801 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
10802
10803 * typeck.c (build_modify_expr): Always attempt to build a call to
10804 the assignment operator, even if we're using a default one.
10805 (convert_for_initialization): Call complete_type.
10806
10807 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
10808
10809 * cvt.c (reference_binding): A REF_BIND gets the reference type.
10810 (implicit_conversion): Likewise.
10811 (convert_like): Likewise.
10812 (compare_ics): Likewise.
10813 (compare_qual): Likewise.
10814 (print_z_candidates): Handle no candidates.
10815 (build_new_op): Don't handle builtin COND_EXPR for now.
10816
10817 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
10818
10819 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
10820
10821 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
10822
10823 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
10824
10825 * cvt.c (build_builtin_candidate): Oops.
10826 (build_new_op): Oops.
10827
10828 * method.c (build_opfncall): Pass COND_EXPR on.
10829 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
10830 (add_builtin_candidate{,s}): Likewise.
10831 (add_builtin_candidates): Likewise.
10832 (print_z_candidates, op_error, build_new_op): Likewise.
10833 (type_decays_to): New fn.
10834 * lex.c (init_lex): Just say ?: for COND_EXPR.
10835
10836 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
10837
10838 * typeck.c (complete_type): Call layout_type rather than building
10839 a new array type.
10840
10841 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
10842 only use ptrdiff_t.
10843
10844 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
10845
10846 * cvt.c: Always compile the new overloading code (but don't use it).
10847 (implicit_conversion): Add a BASE_CONV when converting to
10848 the same class type.
10849 (convert_like): Handle BASE_CONV.
10850
10851 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
10852
10853 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
10854 (add_builtin_candidate): Likewise.
10855
10856 NEW_OVER changes:
10857 * typeck.c (build_x_function_call): Try an operator function
10858 whenever we call an object of class type.
10859 * method.c (build_opfncall): Pass CALL_EXPRs through.
10860 * cvt.c (implicit_conversion): Do const-ref case first.
10861 (add_conv_candidate, build_object_call, op_error): New fns.
10862 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
10863 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
10864 builtin candidates.
10865 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
10866 Fall back on preincrement handling. Use op_error.
10867 Handle warn_synth.
10868 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
10869 an error_mark_node.
10870 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
10871 properly.
10872
10873 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
10874
10875 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
10876
10877 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
10878
10879 * typeck.c (build_component_ref_1): Use build_component_ref
10880 instead of open coding it here.
10881
10882 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
10883
10884 * g++.c (main): Don't link with -lg++.
10885
10886 NEW_OVER changes:
10887 * cvt.c (convert_to_reference): Don't use convert_from_refeence on
10888 result of build_type_conversion.
10889 (cp_convert): Only call build_method_call for ctors if
10890 build_type_conversion failed.
10891 (ptr_complete_ob): New function.
10892 (TYPE_PTR{,OB,MEM}_P): New macros.
10893 ({add,build}_builtin_candidate{,s}): New functions.
10894 (print_z_candidates): Handle builtins.
10895 (build_user_type_conversion_1): Don't use conversion fns for
10896 converting to a base type.
10897 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
10898 (build_user_type_conversion): Use convert_from_reference.
10899 (build_new_op): New function.
10900 (build_over_call): Fix handling of methods.
10901 (compare_ics): Handle AMBIG_CONV properly.
10902 * typeck2.c: Increment abort count.
10903 * method.c (build_opfncall): Forward most requests to build_new_op.
10904 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
10905
10906 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10907
10908 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
10909 invalid second argument to dump_expr_list.
10910
10911 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
10912
10913 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
10914
10915 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
10916
10917 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
10918 ASSEMBLE_EXTERNAL.
10919
10920 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
10921
10922 * typeck2.c (process_init_constructor): New pedwarn for using { }
10923 to initialize a pointer to member function.
10924 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
10925 we can avoid the new error.
10926
10927 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
10928
10929 * typeck.c (build_ptrmemfunc1): New function to hide details of
10930 pointer to member functions better.
10931
10932 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
10933
10934 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
10935 methods into the actual method, as we know the implied object is
10936 not used.
10937
10938 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
10939
10940 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
10941 inside a system header.
10942
10943 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
10944
10945 * call.c (build_method_call): Call complete_type on the
10946 instance type.
10947
10948 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
10949
10950 * typeck.c (build_component_ref): Always build up an OFFSET_REF
10951 for obj_ptr->func so that we can know which object to use in a
10952 method call.
10953
10954 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
10955
10956 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
10957 around things. Also improve maintainability.
10958
10959 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
10960
10961 * decl.c (grokdeclarator): Check for overflow when evaluating an
10962 array dimension.
10963
10964 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
10965
10966 * cvt.c (cp_convert): Don't check for ambiguity with constructor
10967 if NEW_OVER.
10968
10969 * typeck.c (build_x_function_call): Pass function overload
10970 questions to new overloading code if NEW_OVER.
10971 * init.c (expand_aggr_init_1): Only check for type conversion ops
10972 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
10973 Don't check for ambiguity with constructor if NEW_OVER.
10974 * cvt.c (convert_to_reference): Dereference the result of a type
10975 conversion operator.
10976 (build_conv): Propagate ICS_USER_FLAG.
10977 (implicit_conversion): Call instantiate_type.
10978 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
10979 (add_function_candidate): Fix cv-quals on argtype.
10980 (print_z_candidates): New function.
10981 (build_new_function_call): Call it.
10982 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
10983 consider non-converting constructors.
10984 Call print_z_candidates.
10985 Return an AMBIG_CONV for an ambiguous conversion.
10986 (build_user_type_conversion): Handle AMBIG_CONV.
10987 (convert_like): Fix test for building TARGET_EXPR.
10988 Call instantiate_type.
10989 Handle AMBIG_CONV and LVALUE_CONV.
10990 (build_over_call): Handle 0 args and ellipsis.
10991 * cp-tree.def: Add AMBIG_CONV.
10992
10993 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
10994
10995 * decl.c (lookup_name_real): If we find mem in obj when parsing
10996 `obj->mem', make sure we return the right value.
10997
10998 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
10999
11000 * search.c (get_base_distance): Call complete_type.
11001
11002 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
11003
11004 * decl.c (store_bindings): Make static.
11005
11006 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11007
11008 * init.c (expand_aggr_init_1): Don't check type conversions if
11009 NEW_OVER.
11010
11011 * cvt.c (z_candidate): Put back template field.
11012 (add_function_candidate): Set it.
11013 (add_template_candidate): Likewise.
11014 (joust): Use it.
11015 (compare_qual): Handle references and pointers to members.
11016 (compare_ics): Handle reference bindings.
11017
11018 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
11019
11020 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
11021
11022 * call.c (compute_conversion_costs): Call complete_type.
11023
11024 * tree.c (vec_binfo_member): Use comptypes instead of comparing
11025 pointers, so we can handle template parameters.
11026
11027 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
11028
11029 * cvt.c (cp_convert_to_pointer): We have to call complete_type
11030 here; let's make it explicit instead of a side effect of an
11031 error check.
11032
11033 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11034
11035 * cvt.c (z_candidate): Remove template field.
11036 (reference_binding): Handle binding to temporary.
11037 (implicit_conversion): Likewise.
11038 (add_function_candidate): Handle artificial constructor parms.
11039 Handle functions with too few parms.
11040 (add_template_candidate): New function.
11041 (build_user_type_conversion_1): Handle constructors.
11042 (convert_like): Likewise.
11043 (build_over_call): Likewise.
11044 (build_new_function_call): Support templates.
11045 (compare_ics): Fix reference, inheritance handling.
11046
11047 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
11048
11049 * decl.c: Add signed_size_zero_node.
11050 (init_decl_processing): Build it.
11051 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
11052 when we're trying to make a negative delta.
11053
11054 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11055
11056 Stop doing this damn index==strchr variable name confusion.
11057 * class.c (add_virtual_function): Change local var INDEX to be
11058 named IDX.
11059 (add_method): Likewise.
11060 * lex.c (print_parse_statistics): Likewise.
11061 * search.c (make_memoized_table_entry): Likewise.
11062 (lookup_fnfields_here): Likewise.
11063 (lookup_field): Likewise.
11064 (lookup_fnfields): Likewise.
11065 (get_baselinks): Likewise.
11066 * sig.c (build_signature_table_constructor): Likewise.
11067 (build_signature_method_call): Likewise.
11068 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
11069 (get_member_function_from_ptrfunc): Likewise.
11070 (build_ptrmemfunc): Change local var INDEX to be IDX.
11071 (c_expand_start_case): Likewise.
11072
11073 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11074
11075 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
11076 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
11077 (convert_to_reference): Use build_type_conversion to convert to
11078 the reference type directly.
11079 (standard_conversion): Fix void* case, non-conversions.
11080 (reference_binding): Fix expr == 0 case, non-conversions.
11081 (convert_like): Support REF_BIND.
11082 (compare_qual): Split out from compare_ics.
11083 (compare_ics): Use it, handle icses with only a qual_conv.
11084
11085 * init.c (expand_vec_init): Don't crash if decl is NULL.
11086
11087 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
11088
11089 * mpw-config.in: New file, configury for Mac MPW.
11090 * mpw-make.sed: New file, makefile editing for MPW.
11091
11092 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11093
11094 * pt.c (instantiate_class_template): Call repo_template_used.
11095
11096 * search.c (lookup_conversions): Only lookup conversions in
11097 complete types.
11098
11099 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11100
11101 * cp-tree.def: Renamed from tree.def, to avoid confusion with
11102 gcc's tree.def.
11103 * cp-tree.h, lex.c: Include cp-tree.def.
11104 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
11105
11106 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
11107
11108 * init.c (build_vec_delete_1): Call complete_type.
11109
11110 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
11111
11112 * except.c (start_anon_func): Make sure anonymous functions are
11113 never external.
11114
11115 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11116
11117 * decl.c (finish_function): If function_depth > 1, set nested.
11118
11119 * decl2.c (grokbitfield): Revert Bob's change.
11120 * class.c (finish_struct_1): Fix handling of named bitfield widths.
11121
11122 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
11123
11124 * pt.c (add_pending_template): Handle types.
11125 (lookup_template_class): With -fexternal-templates, just add the class
11126 to pending_templates instead of instantiating it now.
11127 * decl2.c (finish_file): Handle types in pending_templates.
11128
11129 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
11130
11131 * decl2.c (grokbitfield): Handle constant decls appropriately.
11132 Give an appropriate error message now instead of spewing core
11133 later.
11134
11135 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
11136
11137 * decl2.c: Don't turn on thunks by default for now.
11138
11139 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
11140
11141 * typeck.c (complete_type): Handle error_mark_node.
11142 (common_type, OFFSET_TYPE): Handle template_type_parms.
11143
11144 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
11145
11146 * pt.c (instantiate_decl): If at_eof, call import_export_decl
11147 regardless of DECL_INLINE.
11148
11149 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
11150
11151 * class.c (finish_struct_bits): Copy TYPE_SIZE.
11152
11153 * rtti.c (build_dynamic_cast): Support templates.
11154 * tree.def: Support DYNAMIC_CAST_EXPR.
11155 * pt.c (tsubst_copy): Likewise.
11156 * decl2.c (build_expr_from_tree): Likewise.
11157
11158 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
11159
11160 * typeck.c (build_static_cast): Support templates.
11161 (build_const_cast): Likewise.
11162 * tree.def: Support CONST/STATIC_CAST_EXPR.
11163 * pt.c (tsubst_copy): Likewise.
11164 * decl2.c (build_expr_from_tree): Likewise.
11165
11166 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
11167
11168 * decl2.c (finish_vtable_vardecl): Don't trust
11169 TREE_SYMBOL_REFERENCED for vtables of local classes.
11170
11171 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
11172
11173 * pt.c (tsubst_copy): Handle operator T.
11174
11175 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11176
11177 * init.c (build_delete): Move creation of PARMS inside test of
11178 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
11179
11180 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
11181
11182 * typeck.c (build_conditional_expr): Don't assume that
11183 the arguments to ?: are always pointers or records.
11184
11185 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
11186
11187 * decl2.c (import_export_decl): Still emit static/weak/comdat
11188 copies of inline template functions with -fno-implicit-templates.
11189
11190 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
11191
11192 * init.c (build_delete): Determine the complete basetype
11193 path to the destructor we're calling.
11194
11195 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
11196
11197 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
11198 initialize the enum, because we really and truly don't know where
11199 it came from.
11200 (start_enum): Don't copy integer_zero_node because
11201 build_enumerator will do it.
11202
11203 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11204
11205 * decl.c (finish_function): Do access control on base destructors.
11206
11207 * pt.c (tsubst, case FUNCTION_DECL): Set up
11208 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
11209 hose us.
11210
11211 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
11212
11213 * cvt.c (build_up_reference): If we have already extended the
11214 lifetime of the temporary, don't try it again.
11215 * typeck.c (c_expand_return): Don't try and convert the return
11216 value twice when we want a reference, once is enough.
11217
11218 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
11219
11220 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
11221 LOOKUP_ONLYCONVERTING at all for now.
11222
11223 * search.c (add_conversions): Put the conversion function in
11224 TREE_VALUE, the basetype in TREE_PURPOSE.
11225 * cvt.c (build_type_conversion): Adjust.
11226 * cvt.c (build_expr_type_conversion): Adjust.
11227 * call.c (user_harshness): Adjust.
11228
11229 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
11230
11231 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
11232 backend's benefit.
11233
11234 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
11235
11236 * except.c (expand_start_catch_block): Add a dummy region, if we
11237 get an error, so that we can avoid core dumping later.
11238
11239 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
11240
11241 * cp-tree.h (OFFSET_REF): Remove.
11242 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
11243 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
11244 * init.c (expand_aggr_init_1): Likewise.
11245 (build_new): Likewise.
11246 * typeck.c (expand_target_expr): Likewise.
11247
11248 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
11249
11250 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
11251 TARGET_EXPR.
11252
11253 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
11254
11255 * cvt.c (build_up_reference): Redo how and when temporaries are
11256 created.
11257 * decl.c (grok_reference_init): Don't try and be smart about
11258 running cleanups.
11259
11260 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
11261
11262 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
11263 (TARGET_EXPR...), now that it has 4 arguments.
11264 * tree.c (build_cplus_new): Likewise.
11265
11266 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11267
11268 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
11269
11270 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
11271 * decl.c (struct saved_scope): Remove named_labels,
11272 {base,member}_init_list.
11273 (maybe_push_to_top_level): Don't set them. Call
11274 push_cp_function_context if appropriate.
11275 (pop_from_top_level): Likewise.
11276
11277 * method.c (do_build_assign_ref): Remove obsolete check of
11278 TYPE_HAS_ASSIGN_REF (basetype).
11279
11280 * decl.c (grokfndecl): Diagnose user definition of
11281 implicitly-declared methods.
11282
11283 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
11284
11285 * method.c (do_build_copy_constructor): Add code to give
11286 meaningful error messages instead of crashing.
11287 (do_build_assign_ref): Don't synthesize assignment operators for
11288 classes containing reference or const members.
11289
11290 * class.c (struct base_info): Remove cant_synth_copy_ctor
11291 and cant_synth_asn_ref.
11292 (finish_base_struct): Remove the code that tries to conditionalize
11293 synthesis of copy constructors & assignment operators based on
11294 access permissions. Instead, let it fail when it tries to
11295 synthesize the copy constructor. This will give meaningful error
11296 messages instead of silently generating code to perform a bitcopy.
11297
11298 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
11299
11300 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
11301 determining types for constant values.
11302
11303 * decl.c (struct named_label_list): Use instead of stuffing
11304 random items into a TREE_LIST node.
11305 (named_label_uses): Use the new struct.
11306 (poplevel): Likewise.
11307 (lookup_label): Likewise.
11308 (define_label): Add an error message to tell the user the line
11309 where the goto is located in addition to the destination of the
11310 goto.
11311 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
11312 named_label_uses.
11313 (finish_function): Likewise.
11314
11315 (start_decl): Complain about defining a static data member
11316 in a different type from which it was declared.
11317
11318 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
11319
11320 * cvt.c (build_expr_type_conversion): Adjust.
11321
11322 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
11323
11324 * call.c (build_method_call): Always convert 'this' to the
11325 appropriate type.
11326
11327 * search.c (add_conversions): Put the conversion function in
11328 TREE_VALUE, the type in TREE_PURPOSE.
11329 * cvt.c (build_type_conversion): Adjust.
11330 * call.c (user_harshness): Adjust.
11331
11332 * method.c (emit_thunk): Call temporary_allocation and
11333 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
11334
11335 * tree.c (build_cplus_array_type): Handle tweaking of
11336 TYPE_MAIN_VARIANT here.
11337 * typeck.c (common_type): Not here.
11338
11339 * typeck.c (complete_type): Only try to complete an array type if
11340 it has a domain.
11341
11342 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
11343
11344 * decl.c (grokvardecl): Call complete_type.
11345 (grokdeclarator): Call complete_type for PARM_DECLs.
11346
11347 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
11348
11349 * pt.c (instantiate_class_template): Re-set
11350 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
11351
11352 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
11353
11354 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
11355 smart enough to do it right.
11356 * tree.c (cp_expand_decl_cleanup): Likewise.
11357 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
11358 cp_expand_decl_cleanup.
11359 (store_parm_decls): Likewise.
11360 (hack_incomplete_structures): Likewise.
11361 * except.c (push_eh_cleanup): Likewise.
11362
11363 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
11364
11365 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
11366 frontend to the backend where it belongs.
11367 * tree.c (unsave_expr): Likewise.
11368 (unsave_expr_now): Likewise.
11369 * tree.def (UNSAVE_EXPR): Likewise.
11370 * cp-tree.h (unsave_expr): Likewise.
11371 (unsave_expr_now): Likewise.
11372
11373 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
11374
11375 * init.c (emit_base_init): Make sure the partial EH cleanups live
11376 on the function_obstack.
11377
11378 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
11379
11380 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
11381 when checking for pointer types.
11382
11383 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11384
11385 * pt.c (instantiate_class_template): Remove obsolete check for
11386 access declarations.
11387
11388 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
11389
11390 * call.c (build_overload_call): Simplify calls to
11391 build_overload_call by removing last parameter.
11392 (build_method_call): Likewise.
11393 * cp-tree.h: Likewise.
11394 * method.c (build_opfncall): Likewise.
11395 * typeck.c (build_x_function_call): Likewise.
11396
11397 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
11398
11399 * call.c (default_parm_conversions): Factor out common code.
11400 (build_method_call): Use it.
11401 (build_overload_call_real): Use it.
11402
11403 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
11404
11405 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
11406 but pedwarn as the code is bogus.
11407 * typeck.c (decay_conversion): Likewise.
11408 (build_function_call_real): Use build_addr_func instead of
11409 default_conversion. Don't allow pointer-to-method functions down
11410 here.
11411 (build_unary_op): Use real pointer-to-member functions instead of
11412 fake ones.
11413 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
11414 (convert_for_assignment): Removed some obsolete code.
11415 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
11416 build_x_function_call instead of current_class_ptr. Only call
11417 digest_init once on an initializer, we do this just checking
11418 TREE_TYPE.
11419 (build_expr_from_tree): Pass current_class_ref to
11420 build_x_function_call instead of current_class_ptr.
11421 * init.c (build_member_call): Likewise.
11422 * pase.y: Likewise.
11423 * error.c (dump_expr): Handle OFFSET_REFs better.
11424 * pt.c (unify): Handle pointer-to-member functions better.
11425 * decl.c (finish_function): Clear out current_class_ref just like
11426 we do for current_class_ptr.
11427
11428 * typeck.c (get_delta_difference): Handle virtual bases better.
11429
11430 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
11431
11432 * sig.c (build_signature_table_constructor): Use the delta for
11433 the original basetype for this virtual function with thunks.
11434 (build_signature_method_call): We still need to adjust 'this'
11435 with thunks.
11436
11437 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
11438
11439 * call.c (build_addr_func): New routine. Used to get the `real'
11440 address of a function or a method. Needed to avoid getting a
11441 pointer-to-member function.
11442 (build_call): New routine to build CALL_EXPRs.
11443 (build_method_call): Use it.
11444 * cvt.c (convert_to_aggr): Likewise.
11445 * typeck.c (build_function_call_real): Likewise.
11446 * sig.c (build_signature_table_constructor): Use build_addr_func.
11447 * cp-tree.h (build_call, build_addr_func): Declare them.
11448
11449 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
11450
11451 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
11452 * parse.y: Remove uses of LOOKUP_AGGR.
11453
11454 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
11455
11456 * *.[chy]: Rename current_class_decl to current_class_ptr, and
11457 C_C_D to current_class_ref.
11458
11459 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
11460
11461 * call.c (convert_harshness): Tighten up pointer conversions.
11462
11463 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
11464
11465 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
11466 (finish_file): Likewise.
11467
11468 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
11469
11470 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
11471
11472 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
11473 code.
11474
11475 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
11476
11477 * decl2.c: Turn on thunks by default where supported.
11478
11479 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
11480
11481 * cp-tree.h (build_overload_call_maybe): Removed.
11482 * call.c (build_overload_call_real): Invert meaning of last arg to
11483 be require_complete.
11484 (build_overload_call): Likewise.
11485 * typeck.c (build_x_function_call): Use build_overload_call_real
11486 instead of build_overload_call_maybe.
11487
11488 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
11489
11490 * decl2.c (finish_file): Don't try to emit functions that haven't
11491 been compiled.
11492
11493 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11494
11495 * decl2.c (finish_vtable_vardecl): Oops.
11496
11497 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
11498 Also store the bindings from previous_class_values.
11499 (pop_from_top_level): Restore them.
11500
11501 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
11502
11503 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
11504 symbol has been referenced.
11505 (finish_file): Re-join synthesis/vtable loop with inline emission
11506 loop, disable inlining when an inline is output.
11507
11508 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
11509
11510 * except.c (init_exception_processing): Setup saved_in_catch.
11511 (push_eh_cleanup): Reset __eh_in_catch.
11512 (expand_start_catch_block): Set __eh_in_catch.
11513
11514 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
11515
11516 * except.c (push_eh_cleanup): Add tracking for whether or not we
11517 have an active exception object.
11518 (expand_builtin_throw): Use it to make sure a rethrow without an
11519 exception object is caught.
11520
11521 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
11522
11523 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
11524 cache.
11525
11526 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
11527
11528 * decl2.c (finish_file): Also use sentries for vars with
11529 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
11530 created).
11531
11532 * lex.c (handle_cp_pragma): Disable #pragma
11533 interface/implementation if SUPPORTS_ONE_ONLY > 1.
11534
11535 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
11536
11537 * method.c (emit_thunk): Wrap default case in
11538 temporary/permanent_allocation.
11539
11540 * method.c (make_thunk): Use DECL_ONE_ONLY.
11541 (emit_thunk): Call assemble_end_function.
11542
11543 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
11544
11545 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
11546 (import_export_decl): Likewise.
11547 (finish_prevtable_vardecl): Disable vtable hack if
11548 SUPPORTS_ONE_ONLY > 1.
11549
11550 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
11551
11552 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
11553 PREDECREMENT_EXPRs take two arguments, not one.
11554
11555 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
11556
11557 * class.c (build_vtable_entry): Don't build thunks for abstract
11558 virtuals.
11559
11560 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
11561 frontend.
11562
11563 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
11564
11565 * class.c (set_rtti_entry): Use size_zero_node.
11566 (build_vtable): Likewise.
11567
11568 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
11569
11570 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
11571 (prepare_fresh_vtable): Likewise.
11572
11573 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
11574
11575 * method.c (emit_thunk): Call mark_used on the target function.
11576
11577 * call.c (build_method_call): Don't warn about pending templates.
11578
11579 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
11580
11581 * decl2.c (finish_file): Fix list walking logic.
11582
11583 * typeck2.c (check_for_new_type): Only warn if -pedantic.
11584
11585 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
11586
11587 * class.c (finish_struct_1): Remove old code for
11588 dont_allow_type_definitions.
11589 * cp-tree.h: Likewise.
11590 * spew.c: Make sure cp-tree.h is included before parse.h, so the
11591 definition of flagged_type_tree is found before it is used.
11592 * lex.c: Likewise.
11593 * parse.y: Added the ftype member to the type union, and changed a
11594 number of rules to use it instead of ttype. Added calls to
11595 check_for_new_type() as appropriate.
11596 * typeck2.c (check_for_new_type): New function for checking
11597 if a newly defined type appears in the specified tree.
11598 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
11599 for check_for_new_type().
11600
11601 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
11602
11603 * decl2.c (finish_file): Only use a sentry if the decl is public.
11604
11605 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
11606 don't pass LOOKUP_ONLYCONVERTING.
11607
11608 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
11609
11610 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
11611 properly keeps track of const and volatile type modifiers.
11612
11613 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
11614
11615 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
11616 * pt.c (comp_template_args): Use it.
11617
11618 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
11619 assemble_external for artificial function decls.
11620
11621 * decl.c (cp_finish_decl): Oops.
11622
11623 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
11624
11625 * decl2.c (import_export_decl): Put static data member templates
11626 into common storage, or make them weak, depending on whether they
11627 are dynamically or statically initialized.
11628 (get_sentry): New function.
11629 (finish_file): Do import_export_decl for static data members before
11630 building the init/fini functions. Don't init/fini a variable that's
11631 EXTERNAL. Use a sentry for variables in common. Fix mismatching
11632 push/pop_temp_slots.
11633 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
11634 expand_static_init thang.
11635 * method.c (get_id_2): New function.
11636
11637 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
11638
11639 * parse.y (empty_parms): Make sure we use C++-style prototypes
11640 when we're declaring member functions.
11641
11642 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
11643
11644 * Makefile.in (CONFLICTS): 16 s/r conflicts.
11645 * parse.y (self_template_type): New nonterminal.
11646
11647 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
11648
11649 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
11650 name.
11651 * parse.y (base_class.1): Allow 'typename foo::bar'.
11652
11653 * lex.c (check_newline): Remove #pragma code that plays with the
11654 input stream, since we now deal with tokens. Clear nextchar when
11655 we're done.
11656 (handle_cp_pragma): Use real_yylex.
11657 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
11658 in one place.
11659
11660 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
11661
11662 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
11663
11664 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
11665
11666 * parse.y: New token SELFNAME for potential constructor.
11667 * spew.c (yylex): Handle it.
11668 * lex.c (identifier_type): Produce it.
11669
11670 * parse.y (complete_type_name): In :: case, don't push class binding.
11671 (complex_type_name): Likewise.
11672
11673 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
11674
11675 * typeck.c (build_reinterpret_cast): Handle pointer to member
11676 functions.
11677
11678 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11679
11680 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
11681 pragmas.
11682 (check_newline): Put the vtable/unit/implementation/interface pragma
11683 code into handle_cp_pragma, replacing it with a call.
11684 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
11685 args. Get the next token after handling the pragma token.
11686
11687 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
11688
11689 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
11690 (convert_to_pointer_force): Likewise.
11691
11692 * init.c (build_new): Fix array new without -fcheck-new.
11693
11694 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
11695
11696 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
11697 tree.c: Lose TYPE_NESTED_NAME.
11698
11699 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
11700 as identifiers.
11701
11702 * tree.def: Add VEC_INIT_EXPR.
11703 * expr.c (cplus_expand_expr): Handle it.
11704 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
11705 the extra file-scope symbol nastiness.
11706
11707 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
11708
11709 * method.c (make_thunk): Thunks are static.
11710 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
11711
11712 * decl2.c (mark_vtable_entries): Emit thunks as needed.
11713 (finish_file): Don't emit them here.
11714
11715 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
11716
11717 * rtti.c (build_dynamic_cast): Handle null pointers.
11718 (ifnonnull): New function.
11719
11720 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
11721
11722 * call.c (build_method_call): Remember the original basetype we
11723 were called with. Give an error message instead of trying
11724 (incorrectly) to call a non-static member function through a
11725 non-inherited class.
11726
11727 * search.c (expand_upcast_fixups): Mark the new fixup as
11728 DECL_ARTIFICIAL.
11729
11730 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11731
11732 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
11733
11734 * class.c (set_rtti_entry): Fix for thunks.
11735
11736 * decl2.c (import_export_decl): Still emit typeinfo fns for
11737 cv-variants of builtin types.
11738
11739 * rtti.c (expand_class_desc): Set up base_info_type_node here.
11740 (init_rtti_processing): Instead of here.
11741
11742 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
11743
11744 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
11745 (build_typeid): Only complain about taking dynamic typeid without
11746 -frtti.
11747
11748 * decl2.c: flag_rtti defaults to 1.
11749
11750 * rtti.c (get_tinfo_var): The general class case is now smaller.
11751 (init_rtti_processing): Pack the latter three fields of base_info
11752 into 32 bits.
11753
11754 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
11755
11756 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
11757
11758 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
11759
11760 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
11761 (push_memoized_context): Split out code to undefer pop_type_level to
11762 (clear_memoized_cache): here.
11763 (pop_memoized_context): We can only handle one layer of deferral of
11764 pop_type_level so clear the cache, if there was a previous level.
11765
11766 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11767
11768 * rtti.c (init_rtti_processing): Build up base_info_type_node.
11769 (expand_class_desc): Use one pointer to an array of base_info
11770 structs, passed using a CONSTRUCTOR.
11771
11772 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
11773
11774 * class.c (build_vbase_path): Remove block extern for
11775 flag_assume_nonnull_objects here.
11776 (build_vfn_ref): Split out functionality into build_vtbl_ref.
11777 (build_vtbl_ref): New routine.
11778 (build_vtable): Set up rtti info here.
11779 (add_virtual_function): Note in CLASSTYPE_RTTI the best
11780 place where we can get the rtti pointers from to avoid having to
11781 search around for a place.
11782 (finish_base_struct): Likewise.
11783 (finish_struct_1): Likewise. Never create totally new vtables
11784 with totally new vtable pointers for rtti. Disable code to layout
11785 vtable pointers better until we want to break binary
11786 compatibility.
11787 * rtti.c (build_headof_sub): New routine to convert down to a
11788 sub-object that has an rtti pointer in the vtable.
11789 (build_headof): Use it. Also, use build_vtbl_ref now to be more
11790 maintainable.
11791 (build_dynamic_cast): Make sure we have saved it, if we need to.
11792 * search.c (dfs_init_vbase_pointers): Disable code that deals with
11793 a more efficient vtable layout, enable later.
11794 * call.c (flag_assume_nonnull_objects): Moved declaration to
11795 * cp-tree.h: here. Declare build_vtbl_ref.
11796 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
11797 function calls that want a tree.
11798
11799 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11800
11801 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
11802 other X subobjects in the most derived type. Ack.
11803
11804 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
11805 get_typeid will do it for us.
11806 (get_typeid_1): Break out call-building for expand_*_desc to use.
11807 (get_typeid): Call it.
11808 (expand_*_desc): Likewise.
11809 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
11810 and void *.
11811 (init_decl_processing): Lose builtin_type_tdescs lossage.
11812 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
11813
11814 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
11815
11816 * pt.c (tsubst): When calling set_nested_typename, use
11817 TYPE_NESTED_NAME (current_class_type) instead of
11818 current_class_name.
11819
11820 * decl.c (pushdecl): Likewise.
11821 (pushdecl_class_level): Likewise.
11822 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
11823 set_nested_typename.
11824
11825 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
11826
11827 * rtti.c (synthesize_tinfo_fn): Handle arrays.
11828
11829 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
11830
11831 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
11832
11833 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
11834 (init_rtti_processing): Lose bad_cast_type.
11835 (build_dynamic_cast): Use throw_bad_cast.
11836
11837 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
11838
11839 * decl2.c (finish_file): Don't synthesize artificial functions
11840 that are external and not inline.
11841
11842 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
11843
11844 * decl2.c (finish_file): Handle having new inlines added to
11845 saved_inlines by synthesis.
11846
11847 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
11848
11849 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
11850
11851 RTTI rewrite to initialize nodes as needed, not require that
11852 users #include <typeinfo>, complete functionality and reduce wasted
11853 space.
11854 * rtti.c (init_rtti_processing): New fn.
11855 (build_typeid): The vtable entry is now a function.
11856 (get_tinfo_var): New fn.
11857 (get_tinfo_fn): Likewise.
11858 (get_typeid): Use it.
11859 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
11860 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
11861 points __rtti_*.
11862 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
11863 (synthesize_tinfo_fn): New fn.
11864 * method.c (build_t_desc_overload): Lose.
11865 (build_overload_with_type): More generic.
11866 * decl.c (init_decl_processing): Call init_rtti_processing.
11867 * class.c (set_rtti_entry): Use get_tinfo_fn.
11868 * decl2.c (mark_vtable_entries): Mark the rtti function.
11869 (finish_prevtable_vardecl): Don't build_t_desc.
11870 (import_export_decl): Handle tinfo functions.
11871 (finish_file): Likewise.
11872 * typeck.c (inline_conversion): New fn.
11873 (build_function_call_real): Use it.
11874 * cp-tree.h: Add decls.
11875
11876 * method.c (hack_identifier): Also convert component_refs from
11877 references.
11878
11879 * lex.c (cons_up_default_function): Use the type, not the name, in
11880 declspecs.
11881
11882 * decl2.c (import_export_vtable): Fix weak vtables.
11883
11884 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
11885
11886 * search.c (get_base_distance_recursive): Fix access checks for
11887 protected bases.
11888
11889 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11890
11891 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
11892 cp-tree.h.
11893 (convert_harshness): Add prototypes wrapped by PROTO.
11894 * decl2.c (grok_function_init): Likewise.
11895 (do_toplevel_using_decl): Change to void return type.
11896 * class.c (build_vtable_entry): Remove decl of make_thunk.
11897 (merge_overrides): Fix order of arg definitions.
11898 (finish_vtbls): Likewise.
11899 (fixup_vtable_deltas): Likewise.
11900 (modify_all_direct_vtables): Likewise.
11901 (modify_all_indirect_vtables): Likewise.
11902 * search.c (get_base_distance_recursive): Likewise.
11903 (get_abstract_virtuals_1): Likewise.
11904 (fixup_virtual_upcast_offsets): Likewise.
11905 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
11906 * init.c (perform_member_init): Fix order of arg definitions.
11907 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
11908 * cp-tree.h (make_thunk): Add decl.
11909 (overload_template_name, push_template_decl): Add decls.
11910 (do_toplevel_using_decl): Change to void return type.
11911 (vec_binfo_member): Add decl.
11912
11913 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11914
11915 * typeck.c (mark_addressable, convert_for_assignment,
11916 convert_for_initialization, pointer_int_sum, pointer_diff,
11917 unary_complex_lvalue): Add prototypes wrapped by PROTO.
11918 (convert_sequence): #if 0 fn decl, since definition also is.
11919
11920 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
11921
11922 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
11923 cast to pointer types for type searching.
11924
11925 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11926
11927 * typeck.c (get_delta_difference): Use cp_error, not error, in the
11928 case where BINFO == 0.
11929
11930 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
11931
11932 * call.c (build_method_call): Fix wording of error messages so
11933 constructors come out right.
11934
11935 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
11936
11937 * decl.c (push_overloaded_decl): Don't warn about hidden
11938 constructors when both the type and the function are declared
11939 in a system header file.
11940
11941 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
11942
11943 * class.c (finish_struct_1): Propagate the TYPE_PACKED
11944 flag for the type to the type's fields.
11945
11946 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
11947
11948 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
11949
11950 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
11951
11952 * class.c (base_info, finish_base_struct): Replace
11953 needs_virtual_dtor with base_has_virtual.
11954
11955 (finish_struct_1): Remove the old code that tried to make default
11956 destructors virtual. Use base_has_virtual when checking if we need
11957 to add a vtable entry for the rtti code.
11958
11959 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
11960
11961 * pt.c (push_template_decl): Complain about template decl with
11962 inappropriate declaration.
11963
11964 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
11965
11966 * typeck.c (build_x_unary_op): Remove bogus check for taking
11967 the address of a member function.
11968
11969 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
11970
11971 * parse.y (constructor_declarator): Only push the class if
11972 we are not already in the class.
11973
11974 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
11975
11976 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
11977 Add additional argument to INIT_CUMULATIVE_ARGS.
11978
11979 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
11980
11981 * decl.c (shadow_tag): Fix error about anon union with methods.
11982
11983 * parse.y (self_reference): Only generate a self-reference if this
11984 is a non-template class.
11985 (opt.component_decl_list): Only use it if it was generated.
11986
11987 * parse.y (component_decl_1): Use constructor_declarator.
11988 (fn.def2): Likewise.
11989 (notype_component_declarator0): Likewise.
11990
11991 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
11992
11993 * typeck.c (build_x_unary_op): Add checks for taking the address
11994 of a TARGET_EXPR or of a member function, and give appropriate
11995 warnings.
11996
11997 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
11998
11999 * pt.c (process_template_parm): Allow template type parms to be
12000 used as types for template const parms.
12001
12002 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
12003
12004 * init.c (expand_vec_init): Ensure the eh cleanups are on the
12005 function_obstack.
12006
12007 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
12008
12009 * decl.c (lookup_name_real): Be even more picky about the
12010 ambiguous lookup warning.
12011 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
12012 * parse.y (constructor_declarator): Rather than here.
12013
12014 * parse.y (constructor_declarator): New nonterminal.
12015 (fn.def1): Use it.
12016 (explicit_instantiation): Likewise.
12017
12018 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12019
12020 Add implicit declaration of class name at class scope.
12021 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
12022 * parse.y (self_reference): New nonterminal.
12023 (opt.component_decl_list): Use it.
12024 (fn.def1): Add nested_name_specifier type_name cases.
12025 * class.c (build_self_reference): New function.
12026 (finish_struct): Handle access_default later, move self-reference
12027 decl to the end.
12028 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
12029 * cp-tree.h: Adjust.
12030
12031 * pt.c (do_function_instantiation): Separate handling of member
12032 functions and non-member functions properly.
12033
12034 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12035
12036 * pt.c (process_template_parm): Improve error for 'volatile class K'.
12037
12038 * class.c (finish_struct_1): Check the right slot for destructors.
12039
12040 * decl.c (start_enum): Complain about enum templates.
12041
12042 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
12043
12044 * init.c (resolve_offset_ref): Offset pointers to member data by one.
12045 * typeck.c (unary_complex_lvalue): Likewise.
12046
12047 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
12048
12049 * typeck.c (c_expand_return): Check for a returned local
12050 array name, similar to the check for an ADDR_EXPR.
12051
12052 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12053
12054 * decl.c (cp_finish_decl): Don't build cleanups for static
12055 variables here.
12056
12057 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
12058
12059 * typeck.c (build_modify_expr): Fix error messages to be more
12060 accurate.
12061 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
12062 assignment operators.
12063 * error.c (assop_as_string): Likewise. Add support for `%Q' for
12064 assignment operators.
12065
12066 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
12067
12068 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
12069 give an error if initialized. Pedwarn about nested type with the
12070 same name as its enclosing class.
12071
12072 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
12073
12074 * typeck.c (require_complete_type): Be sure to instantiate the
12075 MAIN_VARIANT of the type.
12076
12077 * decl2.c (finish_file): Instantiate pending templates before
12078 processing static constructors and destructors.
12079
12080 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
12081 unless at_eof.
12082
12083 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
12084
12085 * decl2.c (delete_sanity): If error_mark_node is passed
12086 in as an expression, quit while we're ahead.
12087
12088 * decl.c (grokdeclarator): Give an error message if `friend'
12089 is combined with any storage class specifiers.
12090
12091 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
12092
12093 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
12094 definition of nonexistent nested type.
12095
12096 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
12097 not to say 'typedef'.
12098
12099 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12100
12101 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
12102 * search.c (dfs_walk, dfs_init_vbase_pointers,
12103 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
12104 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
12105
12106 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
12107
12108 * except.c (build_throw): Support minimal parse.
12109 * pt.c (tsubst_copy): Support THROW_EXPR.
12110 * decl2.c (build_expr_from_tree): Likewise.
12111
12112 * pt.c (mangle_class_name_for_template): Always allocate
12113 scratch_firstobj.
12114
12115 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
12116
12117 * cvt.c (cp_convert_to_pointer): Give an appropriate error
12118 when trying to cast from an incomplete type.
12119
12120 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12121
12122 * pt.c (instantiate_class_template): Don't bother setting up
12123 CLASSTYPE_TAGS explicitly, as the nested types will add
12124 themselves.
12125
12126 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
12127
12128 * decl.c (shadow_tag): Remove old error check for usage of
12129 an enum without a previous declaration.
12130 (xref_tag): Add error message about usage of enums without a
12131 previous declaration.
12132
12133 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
12134
12135 * lex.c (do_identifier): Only do name consistency check if we're
12136 parsing.
12137
12138 * pt.c (push_template_decl): Don't crash if we get a member defn
12139 that doesn't match.
12140
12141 * decl.c (xref_tag_from_type): New function to do an xref without
12142 always having to figure out code_type_node.
12143 * cp-tree.h: Declare it.
12144 * pt.c (instantiate_class_template): Use it for friend classes.
12145 (lookup_template_class): Use it.
12146
12147 * typeck2.c (build_functional_cast): Pull out a single parm before
12148 passing it to build_c_cast.
12149
12150 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
12151
12152 * expr.c (do_case): Give an error message if a pointer is
12153 given as a case value.
12154
12155 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
12156
12157 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
12158 an overload list.
12159
12160 * lex.c (cons_up_default_function): Really, now, interface hackery
12161 does not apply to synthesized methods.
12162
12163 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
12164
12165 * call.c (build_method_call): Ctors and dtors now have special names
12166 with respect to lookups.
12167 * class.c (add_method): Likewise.
12168 (grow_method): Likewise.
12169 (finish_struct_methods): Likewise.
12170 (warn_hidden): Likewise.
12171 (finish_struct_1): Likewise.
12172 * cvt.c (convert_to_reference): Likewise.
12173 (convert_to_aggr): Likewise.
12174 (cp_convert): Likewise.
12175 * decl2.c (check_classfn): Likewise.
12176 * init.c (expand_member_init): Likewise.
12177 (expand_default_init): Likewise.
12178 (expand_aggr_init_1): Likewise.
12179 (build_offset_ref): Likewise.
12180 (build_new): Likewise.
12181 (build_delete): Likewise.
12182 * lex.c (do_inline_function_hair): Likewise.
12183 * search.c (lookup_field_1): Likewise.
12184 (lookup_fnfields_here): Likewise.
12185 (lookup_field): Likewise.
12186 (lookup_fnfields): Likewise.
12187 (get_virtual_destructor): Likewise.
12188 (dfs_debug_mark): Likewise.
12189 (dfs_pushdecls): Likewise.
12190 (dfs_compress_decls): Likewise.
12191 * tree.c (layout_basetypes): Likewise.
12192 * typeck.c (build_component_ref): Likewise.
12193 (build_x_function_call): Likewise.
12194 (build_modify_expr): Likewise.
12195 (convert_for_initialization): Likewise.
12196 (build_functional_cast): Likewise.
12197 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
12198 (CTOR_NAME): New.
12199 (DTOR_NAME): New.
12200 * decl.c (ctor_identifier): New.
12201 (dtor_identifier): New.
12202 (init_decl_processing): Set them.
12203
12204 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
12205
12206 * typeck.c (build_component_ref): Don't get confused by fields whose
12207 context has no type name, like pointer to member functions.
12208
12209 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
12210
12211 * decl.c (grokdeclarator): Handle typedef without declarator.
12212
12213 * pt.c (tsubst): Handle SCOPE_REF in declarator.
12214
12215 * parse.y (bad_parm): Catch another case of missing `typename'.
12216
12217 * lex.c (yyprint): Handle TYPE_DECLs.
12218
12219 * decl.c (start_function): Don't try to be clever.
12220
12221 * lex.c: Lose compiler_error_with_decl.
12222 * typeck2.c: Lose error_with_aggr_type.
12223 (incomplete_type_error): Use cp_* instead of old functions.
12224 (readonly_error): Likewise.
12225 * typeck.c (convert_arguments): Likewise.
12226 * search.c (lookup_nested_field): Likewise.
12227 * method.c (make_thunk): Likewise.
12228 * decl.c (grokparms): Likewise.
12229 * cp-tree.h: Update.
12230
12231 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
12232 and value.
12233
12234 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
12235
12236 * method.c (build_opfncall): When deleting a pointer to an
12237 array, build a new pointer to the tree past any ARRAY_TYPE
12238 nodes.
12239
12240 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12241
12242 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
12243
12244 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
12245
12246 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
12247 and ! DECL_INLINE.
12248
12249 * decl.c (finish_function): Don't set nested based on
12250 hack_decl_function_context.
12251 * parse.y (function_try_block): Check for nested function.
12252 (pending_inlines): Likewise.
12253
12254 * decl2.c (build_expr_from_tree): If a unary op already has a
12255 type, just return it.
12256
12257 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
12258
12259 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
12260 (finish_file): Check the return value of walk_vtables.
12261 (finish_prevtable_vardecl): Return int.
12262 (finish_vtable_vardecl): Likewise.
12263 (prune_vtable_vardecl): Likewise.
12264 * lex.c (set_vardecl_interface_info): Likewise.
12265 * cp-tree.h: Adjust return types.
12266
12267 * class.c (delete_duplicate_fields_1): Don't complain about
12268 duplicate nested types if they're the same type.
12269 (finish_struct): Remove check for duplicate.
12270 * decl2.c (grokfield): Don't check for typedef of anonymous type.
12271
12272 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12273
12274 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
12275
12276 * decl.c (grokdeclarator): Lose special handling of class-level
12277 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
12278 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
12279
12280 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
12281
12282 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
12283
12284 * search.c (compute_access): Fix handling of anonymous union
12285 members.
12286 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
12287 from anonymous unions to their members.
12288
12289 * typeck.c (build_x_function_call): For static member functions,
12290 hand off to build_member_call.
12291
12292 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
12293
12294 * typeck.c (build_component_ref): Handle OFFSET_REFs.
12295
12296 * init.c (expand_vec_init): Fix init == 0 case.
12297
12298 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
12299
12300 * init.c (build_new): Pedwarn about init and array new.
12301 (expand_vec_init): Handle lists, use convert_for_initialization.
12302
12303 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
12304 when converting to an aggregate type.
12305 * cvt.c (cp_convert): Pass it through.
12306
12307 * typeck.c (build_conditional_expr): Handle user-defined
12308 conversions to slightly different types.
12309
12310 * decl.c (grokdeclarator): Force an array type in a parm to be
12311 permanent.
12312
12313 * decl2.c (do_using_directive): Sorry.
12314 (do_namespace_alias): Likewise.
12315 * lex.c (real_yylex): Warn about using the `namespace' keyword.
12316
12317 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
12318
12319 * parse.y (datadef): Move call to note_list_got_semicolon up.
12320
12321 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
12322
12323 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
12324
12325 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
12326
12327 * decl.c (cp_finish_decl): The exception regions have to be
12328 nested, not overlapping. We start the exception region for a
12329 decl, after it has been fully built, and all temporaries for it
12330 have been cleaned up.
12331
12332 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
12333
12334 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
12335
12336 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
12337
12338 * tree.def: Add RETURN_INIT.
12339 * pt.c (instantiate_decl): Handle RETURN_INIT.
12340 * decl.c (store_return_init): Handle minimal_parse_mode.
12341
12342 * tree.c (cp_build_type_variant): Just return an error_mark_node.
12343 * decl.c (make_typename_type): Don't try to get the file and line
12344 of an identifier.
12345 * typeck.c (comptypes): Handle TYPENAME_TYPE.
12346
12347 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
12348
12349 * decl.c (poplevel): Make sure we clear out and restore old local
12350 non-VAR_DECL values by default when they go out of scope.
12351
12352 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
12353
12354 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
12355 referring to addresses of variables and functions.
12356
12357 * error.c (dump_expr): Support SIZEOF_EXPR.
12358
12359 * init.c (do_friend): Use the return value of check_classfn.
12360
12361 * typeck.c (convert_arguments): Call complete_type.
12362
12363 * method.c (hack_identifier): After giving an error, set value to
12364 error_mark_node.
12365
12366 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12367
12368 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
12369 lossage for local classes.
12370 * cp-tree.h: Declare it.
12371 * decl.c (lookup_name_real): Evil, painful hack for local classes.
12372 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
12373 Use hack_decl_function_context.
12374 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
12375 (start_function): Use hack_decl_function_context.
12376 (finish_function): Likewise.
12377 * method.c (synthesize_method): Likewise.
12378 * lex.c (process_next_inline): Likewise.
12379 (do_pending_inlines): Likewise.
12380 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
12381 done with it.
12382
12383 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
12384
12385 * sig.c (build_signature_pointer_or_reference_type): Align
12386 signature pointers/references on 8-byte boundaries so they can be
12387 grabbed 2 words at a time on a Sparc.
12388
12389 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
12390
12391 * method.c (hack_identifier): Requiring a static chain is now a
12392 hard error.
12393 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
12394 functions.
12395
12396 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12397
12398 * init.c (build_offset_ref): Call complete_type.
12399
12400 * decl.c (pop_from_top_level): Always pop previous_class_type.
12401
12402 * parse.y: Handle multiple decls in a for-init-statement.
12403 * pt.c (tsubst_expr): Likewise.
12404
12405 * pt.c (tsubst): Use tsubst_expr for the second operand of an
12406 ARRAY_REF.
12407
12408 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
12409 (poplevel_class): Set it here.
12410 (pop_from_top_level): Pop it here if we're returning to class scope.
12411 * class.c (pushclass): Don't set it here.
12412
12413 * decl.c (maybe_push_to_top_level): Save current_template_parms,
12414 and clear it if !pseudo.
12415 (pop_from_top_level): Restore it.
12416
12417 * decl2.c (finish_file): Push the dummy each time we walk the list
12418 of vtables.
12419
12420 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
12421 something for CAST_EXPR.
12422
12423 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
12424
12425 * cvt.c (cp_convert): Warn about implicit conversion of the
12426 address of a function to bool, as it is always true.
12427
12428 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
12429
12430 * typeck.c (c_expand_return): Fix warning for local externs returned.
12431
12432 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
12433
12434 * tree.c (mapcar): Propagate const and volatile properly.
12435
12436 * typeck.c (complete_type): Be sure to instantiate the
12437 MAIN_VARIANT of the type.
12438
12439 * method.c (synthesize_method): Class interface hackery does not
12440 apply to synthesized methods.
12441
12442 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
12443
12444 * pt.c (comp_template_args): Use comptypes rather than just
12445 checking for TEMPLATE_TYPE_PARM equivalence.
12446
12447 * typeck.c (build_x_function_call): Call complete_type before
12448 checking TYPE_OVERLOADS_CALL_EXPR.
12449
12450 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
12451
12452 * g++.c (main): Check also for new define ALT_LIBM.
12453
12454 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
12455
12456 * pt.c (instantiate_class_template): If we don't have a pattern
12457 yet, that's OK.
12458 (coerce_template_parms): If we see a local class, bail.
12459
12460 * decl.c (grok_reference_init): Make sure there's a type before
12461 checking its code.
12462
12463 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
12464 (push_template_decl): Likewise.
12465
12466 * parse.y (named_class_head): Set
12467 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
12468
12469 * decl.c (xref_tag): Diagnose redeclaration of template
12470 type-parameter name.
12471
12472 * error.c (dump_type): Handle anonymous template type parms.
12473
12474 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
12475 TYPE_STUB_DECL.
12476 (coerce_template_parms): Likewise.
12477
12478 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
12479
12480 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
12481 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
12482
12483 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
12484
12485 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
12486 before trying to get its STUB_DECL.
12487 (coerce_template_parms): Likewise.
12488
12489 * parse.y (template_type_parm): If they didn't use 'class',
12490 pretend they did after giving an error.
12491
12492 * pt.c (coerce_template_parms): Diagnose use of local class.
12493
12494 * decl.c (grok_reference_init): Use instantiate_type.
12495
12496 * error.c (dump_expr): Handle TEMPLATE_DECLs.
12497
12498 * parse.y (named_class_head): Diagnose mismatching types and tags.
12499
12500 * decl.c (pushdecl): Type decls and class templates clash with
12501 artificial type decls, not hide them.
12502
12503 * decl.c (redeclaration_error_message): Diagnose redefinition of
12504 templates properly.
12505 (duplicate_decls): Diagnose disallowed overloads for template
12506 functions, too.
12507
12508 * decl.c (start_decl): Call complete_type before checking for a
12509 destructor.
12510
12511 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
12512
12513 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
12514
12515 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12516
12517 * decl.c (grok_op_properties): Don't check for operator++(int) in
12518 a template.
12519
12520 * tree.c (perm_manip): Return a copy of variable and function
12521 decls with external linkage.
12522
12523 * tree.def: Change some of the min tree codes to type "1".
12524 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
12525 * method.c (build_overload_int): Emit something arbitrary for
12526 anything but an INTEGER_CST if we're in a template.
12527
12528 * decl.c (cp_finish_decl): Call complete_type before deciding
12529 whether or not to lay out the decl.
12530
12531 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
12532
12533 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
12534
12535 * typeck2.c (build_x_arrow): Call complete_type.
12536
12537 * pt.c (add_pending_template): Broken out.
12538 (lookup_template_class): If -fexternal-templates, call it for all
12539 the methods of implemented types.
12540 (instantiate_class_template): Instead of instantiating them here.
12541 (instantiate_decl): Handle -fexternal-templates earlier.
12542
12543 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12544
12545 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
12546 memoized lookup stuff inside GATHER_STATISTICS.
12547
12548 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12549
12550 * decl.c (start_decl): Complain about array of incomplete type
12551 here.
12552 (grokdeclarator): Not here.
12553
12554 * parse.y (template_parm): Expand full_parm inline so we can set
12555 the rule's precedence.
12556
12557 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
12558 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
12559 * decl2.c (grokbitfield): Don't check for integer constant here.
12560 * class.c (finish_struct_1): Check here.
12561
12562 * decl.c (define_label): Make the min decl go on permanent_obstack.
12563
12564 * pt.c (unify): Don't handle CONST_DECLs.
12565 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
12566 (tsubst_copy): Likewise.
12567
12568 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
12569 CONST_DECL for a template parm.
12570
12571 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
12572
12573 * decl.c (grokdeclarator): Complain about array of incomplete type
12574 here.
12575 (start_decl_1): Not here.
12576
12577 * pt.c (tsubst): Handle pointer-to-function declarators.
12578
12579 * method.c (hack_identifier): If pedantic, diagnose local class
12580 methods that require a static chain.
12581
12582 * decl.c (grok_op_properties): No longer static.
12583 * cp-tree.h: Declare it.
12584 * pt.c (tsubst): Call it for operators.
12585 Use tsubst_copy for TREE_VECs.
12586
12587 * parse.y (template_arg): The expr has precedence like '>'.
12588
12589 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
12590
12591 * pt.c (coerce_template_parms): Don't coerce an expression using
12592 template parms.
12593 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
12594 (tsubst): Don't use build_index_2_type if the max_value uses template
12595 parms.
12596 * method.c (build_overload_int): Emit something arbitrary for an
12597 expression using template parms.
12598
12599 * parse.y (template_close_bracket): New non-terminal to catch use
12600 of '>>' instead of '> >' in template class names.
12601 (template_type): Use it.
12602 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
12603
12604 * tree.def: Add CAST_EXPR.
12605 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
12606 CONVERT_EXPR for minimal_parse_mode.
12607 * typeck.c (build_c_cast): Likewise.
12608 * pt.c (tsubst_copy): Likewise.
12609 * decl2.c (build_expr_from_tree): Likewise.
12610 * error.c (dump_expr): Likewise.
12611
12612 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12613
12614 * except.c (SetTerminate, SetUnexpected): Put back global vars.
12615 (init_exception_processing): Put back decl/init of
12616 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
12617 fns from libstdc++.
12618
12619 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
12620 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
12621 Delete unused fns.
12622 * cp-tree.h (declare_uninstantiated_type_level,
12623 uninstantiated_type_level_p): Delete prototypes.
12624
12625 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
12626
12627 * pt.c (tsubst_expr): Add default return.
12628
12629 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12630
12631 * error.c (fndecl_as_string): Delete unused arg CNAME.
12632 * sig.c (build_signature_table_constructor,
12633 build_signature_method_call): Fix calls.
12634
12635 * class.c (the_null_vtable_entry): Delete var definition.
12636 (init_class_processing): Delete tree the_null_vtable_entry init.
12637 * decl.c (no_print_{functions, builtins}): Declare as static.
12638 (__tp_desc_type_node): #if 0 var definition.
12639 (init_type_desc): #if 0 init of __tp_desc_type_node.
12640 (vb_off_identifier): Move var decl into init_decl_processing.
12641 (current_function_assigns_this): Declare as static.
12642 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
12643 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
12644 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
12645 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
12646 * init.c (BI_header_type, BI_header_size): Declare as static.
12647 * pt.c (template_classes): Delete unused var.
12648 (add_pending_template): Delete decl for non-existent fn.
12649 (lookup_template_class): Delete vars CODE and TAG_CODE.
12650 (instantiate_template): Delete unused var TARGS.
12651 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
12652 Delete decls.
12653 (__tp_desc_type_node): #if 0 var decl.
12654 (fndecl_as_string): Fix prototype.
12655
12656 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
12657
12658 * tree.def: Add GOTO_STMT.
12659 * pt.c (tsubst_expr): Support goto and labels.
12660 * decl.c (define_label): Support minimal parsing.
12661 * parse.y (simple_stmt): Likewise.
12662
12663 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12664
12665 * xref.c (GNU_xref_member): Only define/set var I if
12666 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
12667 used.
12668 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
12669 (GNU_xref_end): Fix call.
12670 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
12671 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
12672
12673 * tree.c (build_exception_variant): Delete unused vars I, A, T,
12674 T2, and CNAME.
12675 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
12676 (mapcar): Delete unused var CODE.
12677 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
12678 (break_out_cleanups): Fix call.
12679 (bot_manip): Likewise.
12680 * call.c (build_method_call): Likewise.
12681 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
12682 Likewise.
12683 * typeck.c (unary_complex_lvalue, build_modify_expr,
12684 convert_for_initialization): Likewise.
12685 * typeck2.c (build_functional_cast): Likewise.
12686 * cp-tree.h (build_cplus_new): Fix prototype.
12687
12688 * repo.c (open_repo_file): Delete unused var Q.
12689 (repo_compile_flags, repo_template_declared,
12690 repo_template_defined, repo_class_defined, repo_inline_used,
12691 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
12692 (repo_get_id, repo_vtable_used): Declare as static.
12693 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
12694 prototypes.
12695
12696 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
12697
12698 * parse.y (pending_inlines): Add function_try_block case.
12699
12700 * pt.c (unify): Fix for template const parms.
12701
12702 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12703
12704 * lex.c (extract_interface_info): Delete forward decl.
12705 (default_copy_constructor_body, default_assign_ref_body): Delete
12706 decls for non-existent functions.
12707 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
12708 (init_lex): Delete setting them.
12709 (cons_up_default_function): Delete unused vars FUNC_BUF,
12710 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
12711 #if 0'd synth code.
12712 (toplevel, expression_obstack): Delete unused extern decls.
12713 (tree_node_kind): Delete unused enum.
12714 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
12715 GATHER_STATISTICS.
12716 (tree_node_kind_names): Delete unused extern decl.
12717 (synth_obstack): Delete unused var.
12718 (init_lex): Don't set it.
12719 (init_parse): Add decl before use.
12720 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
12721 (current_unit_{name, language}): Delete unused vars.
12722 (check_newline): Don't bother setting them, just accept the #pragma.
12723 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
12724 (current_unit_{name, language}): Delete decls.
12725
12726 * search.c: Wrap all of the memoized functions, macros, and
12727 variables inside #ifdef GATHER_STATISTICS.
12728 (lookup_field, lookup_fnfields): Likewise.
12729 (init_search_processing): Likewise.
12730 (reinit_search_statistics): Wrap whole function.
12731 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
12732
12733 * decl.c (finish_function): Only call pop_memoized_context if
12734 GATHER_STATISTICS is defined.
12735 (start_function): Likewise for push_memoized_context.
12736 * class.c (pushclass, popclass): Likewise.
12737
12738 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
12739 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
12740
12741 * cvt.c (cp_convert): Delete unused local var FORM.
12742 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
12743 prototypes.
12744
12745 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
12746
12747 * pt.c (do_poplevel): Oops; really return what we get from
12748 poplevel this time.
12749
12750 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12751
12752 * cp-tree.h (is_aggr_type): Add prototype.
12753
12754 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
12755 * method.c ({push,pop}_cp_function_context): Delete decls.
12756 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
12757 (SetUnexpected, SetTerminate): Delete unused vars.
12758 (init_exception_processing): Don't set SetUnexpected or
12759 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
12760 (output_exception_table_entry): Delete unused array LABEL.
12761 (expand_internal_throw): Delete unused var PARAMS.
12762 (expand_start_catch_block): Delete unused var CLEANUP.
12763 (emit_exception_table): Delete unused var EH_NODE_DECL.
12764 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
12765 GOTO_UNWIND_AND_THROW. Don't set them.
12766 (end_eh_unwinder): Add top decl.
12767 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
12768 (exception_section, push_rtl_perm, do_function_call,
12769 lang_interim_eh, push_eh_cleanup, eh_outer_context,
12770 expand_end_eh_spec, end_eh_unwinder): Declare as static.
12771 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
12772 throw_used): Likewise.
12773 * cp-tree.h (expand_end_eh_spec): Delete prototype.
12774
12775 * search.c (dfs_mark, dfs_mark_vtable_path,
12776 dfs_unmark_vtable_path, dfs_mark_new_vtable,
12777 dfs_unmark_new_vtable, dfs_clear_search_slot,
12778 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
12779 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
12780 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
12781 functions.
12782 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
12783 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
12784 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
12785 Only define #ifdef GATHER_STATISTICS.
12786 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
12787 is defined.
12788 (vbase_decl): Delete var definition.
12789 (init_search): Delete old decl.
12790 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
12791 never actually used.
12792 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
12793 (get_base_distance_recursive): Delete unused fourth arg
12794 BASETYPE_PATH. Fix call .
12795 (get_base_distance): Fix call.
12796 (push_class_decls): Delete unused var ID.
12797 (make_memoized_table_entry): Declare as static.
12798 (breadth_first_search): Declare as static.
12799 (tree_has_any_destructor_p): Declare as static.
12800 (pop_class_decls): Delete unused arg pop_class_decls.
12801 * class.c (popclass): Fix call to pop_class_decls.
12802 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
12803 tree_has_any_destructor_p): Delete prototypes.
12804
12805 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
12806 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
12807 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
12808 (build_user_desc): Delete unused var T.
12809 (build_class_desc): Delete unused vars T and OFF.
12810 (build_t_desc): Delete unused var NAME_STRING.
12811 (build_headof): Make static.
12812 (get_bad_cast_node): Likewise.
12813 (get_def_to_follow): Likewise.
12814 * cp-tree.h (init_type_desc): Add prototype.
12815 (build_headof): Remove prototype.
12816
12817 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
12818
12819 * pt.c (tsubst): Only look for matching decls at file scope for
12820 non-member functions.
12821
12822 * call.c (build_scoped_method_call): Handle scoped destructor
12823 calls in templates.
12824
12825 * decl.c (*_top_level): Also save previous_class_values.
12826
12827 * pt.c (tsubst_expr): Support do {} while loops.
12828 * parse.y (simple_stmt): Likewise.
12829 * tree.def: Likewise.
12830
12831 * method.c (build_overload_identifier): For a class nested in a
12832 template class, don't mangle in the template parms from our
12833 context.
12834
12835 * lex.c, cp-tree.h: Remove support for template instantiations in
12836 the pending_inlines code.
12837 * pt.c: Remove dead functions and unused arguments.
12838 (uses_template_parms): TYPENAME_TYPEs always use template parms.
12839 * parse.y: Stop passing anything to end_template_decl.
12840 * tree.c (print_lang_statistics): Only print tinst info #ifdef
12841 GATHER_STATISTICS.
12842
12843 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12844
12845 * init.c (expand_recursive_init{,_1}): Delete decls.
12846 (sort_member_init): Delete unused var INIT.
12847 (emit_base_init): Delete unused var X.
12848 (build_offset_ref): Delete unused var CNAME.
12849 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
12850 (emit_base_init): Delete unused local var BASE. Delete extern
12851 decl of IN_CHARGE_IDENTIFIER.
12852 (build_delete): Delete unused local var VIRTUAL_SIZE.
12853
12854 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
12855 (build_delete): Fix call.
12856 * decl2.c (delete_sanity): Likewise.
12857 * cp-tree.h (build_vec_delete): Update prototype.
12858
12859 * typeck.c (common_base_type): Delete unused var TMP.
12860 (build_binary_op): Delete local var ARGS_SAVE.
12861 (build_array_ref): Delete unused var ITYPE.
12862 (c_expand_return): Delete unused var USE_TEMP.
12863
12864 * typeck.c (compexcepttypes): Delete unused arg STRICT.
12865 (comptypes): Fix calls.
12866 * decl.c (duplicate_decls): Likewise.
12867 * cp-tree.h (compexcepttypes): Delete extra arg.
12868
12869 * decl2.c (check_classfn): Delete unused second arg CNAME.
12870 * decl.c (start_decl, grokfndecl): Fix calls.
12871 * init.c (do_friend): Likewise.
12872 * cp-tree.h (check_classfn): Update prototype.
12873
12874 * cp-tree.h (signature_error, import_export_vtable,
12875 append_signature_fields, id_in_current_class, mark_used,
12876 copy_assignment_arg_p): Add decls.
12877 * decl2.c (mark_used): Delete decl.
12878
12879 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
12880
12881 * class.c (get_vtable_entry): Diable unused function.
12882 (doing_hard_virtuals): Delete unused static global var.
12883 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
12884 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
12885 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
12886 (modify_one_vtable): Delete unused var OLD_RTTI.
12887 (finish_struct_anon): Delete unused vars OFFSET and X.
12888 (finish_struct_bits): Delete unused var METHOD_VEC.
12889 (get_basefndecls): Delete unused var PURPOSE. Delete unused
12890 for-scope local variable METHODS.
12891
12892 * call.c (user_harshness): Delete unused/unneeded arg PARM.
12893 (ideal_candidate): Delete unused args BASETYPE and PARMS.
12894 (build_method_call): Delete unused args passed into ideal_candidate.
12895 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
12896 * cp-tree.h (synthesize_method): Add decl.
12897
12898 * decl.c (note_level_for_for): Give void return type.
12899 (pushdecl_nonclass_level): Likewise.
12900 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
12901 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
12902 (suspend_binding_level): Delete unused var LEVEL.
12903 (duplicate_decls): Delete unused var CTYPE.
12904 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
12905 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
12906 PTR_ENDLINK.
12907 (grokdeclarator): Delete unused var C.
12908 (grokdeclarator): Delete unused var SIZE_VARIES.
12909 (grokparms): Delete unused var SAW_VOID.
12910 (start_function): Delete unused var OLDDECL.
12911 (cplus_expand_expr_stmt): Delete unused var
12912 REMOVE_IMPLICIT_IMMEDIATELY.
12913
12914 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
12915
12916 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
12917
12918 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
12919
12920 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
12921 (build_min_nt): Likewise.
12922 * pt.c (do_pushlevel): Emit line note.
12923 (do_poplevel): Return what we get from poplevel.
12924 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
12925 * parse.y: Use do_pushlevel and do_poplevel.
12926 * cp-tree.h: Declare do_poplevel.
12927
12928 * cp-tree.h: Declare at_eof.
12929 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
12930 * decl2.c (import_export_decl): Renamed from import_export_inline.
12931 (finish_file): Call it to do interface handling for statics.
12932 * pt.c (tsubst_copy): Call mark_used on variables and functions
12933 used here.
12934
12935 * decl2.c (finish_file): Don't emit statics we can't generate.
12936 * pt.c (instantiate_decl): Don't set interface on instantiations
12937 we can't generate.
12938
12939 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
12940 * tree.c (print_lang_statistics): Print max template depth.
12941 * pt.c (push_tinst_level): Dump entire instantiation context.
12942 (instantiate_class_template): Use it and pop_tinst_level.
12943 (instantiate_decl): Likewise.
12944
12945 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
12946 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
12947
12948 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
12949
12950 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
12951 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
12952 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
12953 the new template implementation.
12954
12955 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12956
12957 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
12958
12959 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
12960
12961 * decl.c (cp_finish_decl): Delay emitting the debug information for
12962 a typedef that has been installed as the canonical typedef, if the
12963 type has not yet been defined.
12964
12965 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
12966
12967 * decl2.c (grokfield): Still call pop_nested_class for access decls.
12968
12969 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
12970
12971 * decl.c (lookup_label): Call label_rtx.
12972
12973 * decl.c (make_binding_level): New function.
12974 (pushlevel, pushlevel_class): Call it instead of explicit
12975 duplicate calls to xmalloc.
12976
12977 * decl.c (init_decl_processing): Delete useless build_pointer_type
12978 call.
12979
12980 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
12981 (sizet_ftype_string): Delete variable.
12982 (init_decl_processing): Add built-in functions fabsf, fabsl,
12983 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
12984 variable strlen_ftype, used for strlen.
12985
12986 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
12987
12988 * decl.c (push_to_top_level): Start from current_binding_level
12989 again for now; the stl hacks depend on g++ being broken in this
12990 way, and it'll be fixed in the template rewrite.
12991
12992 * tree.def: Add USING_DECL.
12993 * decl2.c (do_class_using_decl): Implement.
12994 (grokfield): Pass access decls off to do_class_using_decl instead of
12995 grokdeclarator.
12996 * error.c (dump_decl): Handle USING_DECLs.
12997 * decl.c (grokdeclarator): Remove code for handling access decls.
12998 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
12999 as access decls for now.
13000 (finish_struct): Don't check USING_DECLs for other uses of the name.
13001
13002 * search.c (get_matching_virtual): Use cp_error_at.
13003
13004 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13005
13006 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
13007 match c-typeck.c.
13008 (self_promoting_args_p): Move the check that TYPE is non-nil
13009 before trying to look at its main variant.
13010 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
13011
13012 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
13013 Delete macros.
13014 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
13015 (do_friend): Delete call to xref_friend.
13016 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
13017
13018 * typeck.c (convert_sequence): #if 0 unused function.
13019
13020 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
13021 be in decl_in_memory_p.
13022 (decl_in_memory_p): Delete decl.
13023 * expr.c (decl_in_memory_p): Delete fn.
13024 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
13025
13026 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
13027
13028 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
13029
13030 * class.c (finish_struct_1): Check for a pure-specifier on a
13031 non-virtual function here.
13032
13033 * decl2.c (grok_function_init): Don't check whether the function
13034 is virtual here.
13035 (grokfield): Don't call check_for_override here.
13036
13037 * decl.c (push_to_top_level): Start from inner_binding_level,
13038 check class_shadowed in class levels.
13039
13040 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
13041
13042 * decl.c (resume_level): Ignore things that don't have names, instead
13043 of core dumping.
13044
13045 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13046
13047 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
13048
13049 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
13050
13051 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
13052 synthesized dtor.
13053
13054 * parse.y (complete_type_name): Bind global_scope earlier.
13055 (complex_type_name): Likewise.
13056 (qualified_type_name): Remove.
13057
13058 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
13059
13060 * decl.c (grokfndecl): Move code that looks for virtuals in base
13061 classes...
13062 * class.c (check_for_override): ... to a new function.
13063 (finish_struct_1): Call it.
13064
13065 * cp-tree.h: Declare warn_sign_compare.
13066
13067 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
13068 rather than extra_warnings to decide whether to warn about
13069 comparison of signed and unsigned.
13070
13071 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
13072 implies -Wsign-compare. -Wall doesn't imply -W.
13073
13074 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
13075
13076 * typeck.c (build_component_ref): Fix to handle anon unions in base
13077 classes as well.
13078
13079 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13080
13081 * class.c (resolves_to_fixed_type_p): Delete code dealing with
13082 a WITH_CLEANUP_EXPR, since we don't generate them any more.
13083 * cvt.c (build_up_reference): Likewise.
13084 * decl.c (grok_reference_init): Likewise.
13085 (cp_finish_decl): Likewise.
13086 * error.c (dump_expr): Likewise.
13087 * tree.c (real_lvalue_p): Likewise.
13088 (lvalue_p): Likewise.
13089 (build_cplus_new): Likewise.
13090 (unsave_expr_now): Likewise.
13091 * typeck.c (unary_complex_lvalue, build_modify_expr,
13092 c_expand_return): Likewise.
13093
13094 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13095
13096 Make the C++ front-end pay attention to attributes for structures.
13097 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
13098 finish_struct_1.
13099 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
13100 Take out old round_up_size use and setting the DECL_ALIGN possibly
13101 using it. Take out setting of TYPE_ALIGN to round_up_size, which
13102 can override what the attribute set.
13103 * cp-tree.h (finish_struct): Update prototype.
13104 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
13105 attributes to finish_struct.
13106 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
13107 value down into finish_struct.
13108 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
13109
13110 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
13111
13112 * decl.c (poplevel): Re-word dead for local handling.
13113 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
13114 (cp_finish_decl): If is_for_scope, check for duplicates so
13115 we can disable is_for_scope. Otherwise, preserve_temp_slots.
13116
13117 * lex.c (do_identifier): Use global binding in preference of
13118 dead for local variable.
13119
13120 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
13121
13122 * init.c (initializing_context): Handle anon union changes, the
13123 context where fields of anon unions can be initialized now has to be
13124 found by walking up the TYPE_CONTEXT chain.
13125
13126 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
13127
13128 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
13129 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
13130 (obscure_complex_init): If bss is supported, always set
13131 DECL_INITIAL to error_mark_node.
13132
13133 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13134
13135 * init.c (is_friend): Make sure there's a context before we see if
13136 it's an aggr type.
13137
13138 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
13139
13140 * init.c (is_friend): Classes are not friendly with nested classes.
13141
13142 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
13143
13144 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
13145 and record its result.
13146
13147 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
13148
13149 * class.c (finish_struct_anon): Switch around code to not move anon
13150 union elements around, nor mess up their contexts, nor offsets,
13151 instead we now build up the right number of COMPONENT_REFs for all
13152 the anon unions that may be present at build_component_ref time.
13153 * typeck.c (lookup_anon_field): New routine to handle field lookup
13154 on fields without names. We find them, based upon their unique type
13155 instead.
13156 * typeck.c (build_component_ref): Allow FIELD_DECL components.
13157 Handle finding components in anonymous unions, and ensure that a
13158 COMPONENT_REF is built for each level as necessary.
13159
13160 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
13161
13162 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
13163 code that ensures that copy ctors are used if appropriate.
13164
13165 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13166
13167 * init.c (build_vec_delete): Only give an error if base isn't an
13168 error_mark_node.
13169
13170 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
13171
13172 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
13173 (yylex): If we see `new', keep slurping.
13174
13175 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
13176
13177 * class.c (finish_struct_1): Move code for handling anon unions...
13178 (finish_struct_anon): to here. Fixup so that we do the offset
13179 calculations right, and so that the fields are physically moved to
13180 the containers's chain.
13181
13182 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13183
13184 * decl.c (grokdeclarator): Avoid trying to get an operand off an
13185 identifier node.
13186
13187 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
13188
13189 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
13190 POINTER_SIZE to agree with expr.c.
13191
13192 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
13193
13194 * search.c (lookup_field): Don't report ambiguities if protect is 0,
13195 instead return NULL_TREE.
13196
13197 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
13198
13199 * class.c (finish_struct_1): Call warn_hidden if we want warnings
13200 about overloaded virtual functions.
13201 (warn_hidden): New routine to warn of virtual functions that are
13202 hidden by other virtual functions, that are not overridden.
13203 (get_basefndecls): New routine, used by warn_hidden.
13204 (mark_overriders): New routine, used by warn_hidden.
13205 * search.c (get_matching_virtual): Remove old warning that just
13206 isn't very useful.
13207
13208 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13209
13210 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
13211
13212 * typeck.c (null_ptr_cst_p): Delete unused fn.
13213 (build_function_call_maybe): Delete unused fn.
13214
13215 * expr.c (extract_init): #if 0 the code after unconditional return 0
13216 for now.
13217
13218 Delete old cadillac code.
13219 * edsel.c: Remove file.
13220 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
13221 * Makefile.in (CXX_OBJS): Delete edsel.o.
13222 (edsel.o): Delete rule.
13223 * cp-tree.h (flag_cadillac): Delete var decl.
13224 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
13225 * decl2.c (flag_cadillac): Delete var definition.
13226 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
13227 (grokfield): Delete code depending on flag_cadillac.
13228 (finish_anon_union): Likewise.
13229 * class.c (finish_struct_1): Likewise.
13230 (pushclass): Likewise.
13231 (popclass): Likewise.
13232 (push_lang_context): Likewise.
13233 (pop_lang_context): Likewise.
13234 * decl.c (init_decl_processing): Likewise.
13235 (start_decl): Likewise.
13236 (cp_finish_decl): Likewise.
13237 (xref_tag): Likewise.
13238 (finish_enum): Likewise.
13239 (start_function): Likewise.
13240 (finish_function): Likewise.
13241 (finish_stmt): Likewise.
13242 * lex.c (lang_init): Likewise.
13243 (check_newline): Likewise.
13244
13245 * lex.c (do_pending_inlines): Delete synthesized method kludge.
13246
13247 Delete defunct, ancient garbage collection implementation.
13248 * rtti.c: New file with the RTTI stuff from gc.c.
13249 * gc.c: Removed file (moved the remaining stuff into rtti.c).
13250 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
13251 (rtti.o): New rule, replacing gc.o.
13252 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
13253 * cp-tree.h: Delete gc-related fn decls.
13254 (DECL_GC_OFFSET): Delete macro.
13255 (flag_gc): Delete extern decl.
13256 * decl.c (current_function_obstack_index): Delete var decl.
13257 (current_function_obstack_usage): Delete var decl.
13258 (start_function): Delete clearing of current_function_obstack_index
13259 and current_function_obstack_usage.
13260 (init_decl_processing): Delete code relying on -fgc.
13261 Delete call to init_gc_processing.
13262 (cp_finish_decl): Delete calls to build_static_gc_entry and
13263 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
13264 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
13265 and to expand_expr of a __gc_main call.
13266 (maybe_gc_cleanup): Delete var decl.
13267 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
13268 * decl2.c (flag_gc): Delete var decl.
13269 (lang_f_options): Delete offering of -fgc.
13270 (lang_decode_option): Delete -fgc and -fno-gc handling.
13271 (get_temp_regvar): Delete gc code.
13272 * init.c (build_new): Delete gc code.
13273 * lex.c (init_lex): Delete checking of flag_gc.
13274
13275 * typeck.c (convert_arguments): Delete gc code.
13276 (build_component_addr): Delete -fgc warning.
13277 (build_modify_expr): Delete gc code.
13278
13279 * decl2.c (build_push_scope): Delete fn.
13280 * cp-tree.h (build_push_scope): Delete decl.
13281
13282 * search.c (clear_search_slots): Delete fn.
13283 * cp-tree.h (clear_search_slots): Delete decl.
13284
13285 * search.c (tree_needs_constructor_p): Delete fn.
13286 * cp-tree.h (tree_needs_constructor_p): Delete decl.
13287
13288 * tree.c (id_cmp): Delete fn.
13289
13290 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
13291 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
13292
13293 * tree.c (decl_value_member): Delete fn.
13294 * cp-tree.h (decl_value_member): Delete decl.
13295
13296 * tree.c (list_hash_lookup_or_cons): Delete fn.
13297 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
13298
13299 * method.c (cplus_exception_name): Delete fn.
13300 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
13301
13302 * spew.c (shift_tokens): Delete fn.
13303
13304 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13305
13306 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
13307 to cp_finish_decl.
13308 * parse.y: Likewise.
13309
13310 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13311
13312 * tree.c (build_cplus_staticfn_type): Delete function definition;
13313 never used.
13314 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
13315
13316 * tree.c (virtual_member): Delete function definition; never used.
13317 * cp-tree.h (virtual_member): Delete decl.
13318
13319 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
13320
13321 * typeck.c (build_component_ref): Handle getting vbase pointers
13322 out of complex multiple inheritance better.
13323
13324 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
13325
13326 * typeck.c (build_object_ref): Make sure we use the real type, not
13327 any reference type.
13328
13329 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
13330
13331 * tree.c (build_exception_variant): Don't create new types if we
13332 don't have to, also build new types on the right obstack.
13333
13334 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13335
13336 * decl.c (store_bindings): Split out from push_to_top_level.
13337 (push_to_top_level): Call it for b->type_shadowed on class binding
13338 levels.
13339
13340 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
13341
13342 * search.c (expand_upcast_fixups): Fix so that offsets stored in
13343 vbase_offsets are always right. Fixes a problem where virtual base
13344 upcasting and downcasting could be wrong during conversions on this
13345 during virtual function dispatch at ctor/dtor time when dynamic
13346 vtable fixups for deltas are needed. This only sounds easier than
13347 it is. :-)
13348 (fixup_virtual_upcast_offsets): Change to reflect new calling
13349 convention for expand_upcast_fixups.
13350
13351 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13352
13353 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
13354 check that it's usable as the bitfield width.
13355
13356 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13357
13358 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
13359 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
13360 only ever used for functions in it.
13361
13362 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13363
13364 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
13365 (nested_type): Likewise.
13366 (nested_name_specifier): Use lastiddecl.
13367
13368 * decl.c (grokdeclarator): Adjust accordingly.
13369 * init.c (expand_member_init): Likewise.
13370 * parse.y (base_class): Likewise.
13371 * typeck2.c (build_functional_cast): Likewise.
13372
13373 * typeck2.c (build_functional_cast): Fill in name after we've
13374 checked for non-aggr type.
13375
13376 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
13377
13378 * decl2.c (warn_pointer_arith): Default to on.
13379
13380 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
13381
13382 * lex.c (is_rid): New function.
13383 * decl.c (grokdeclarator): Diagnose reserved words used as
13384 declarator-ids.
13385
13386 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
13387
13388 * tree.c (get_decl_list): Don't lose cv-quals.
13389
13390 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
13391 typespecs used as declarator-ids.
13392
13393 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
13394
13395 * decl.c (poplevel): When poping a level, don't give a warning for
13396 any subblocks that already exist.
13397
13398 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
13399
13400 * typeck.c (build_object_ref): Finish what I started.
13401
13402 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
13403
13404 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
13405
13406 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
13407 scope.
13408
13409 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
13410
13411 * decl.c (xref_tag): Handle passing a type in directly.
13412
13413 * parse.y (qualified_type_name): Pull out the type.
13414 (nested_type): Likewise.
13415 Take types directly instead of as identifiers.
13416 * call.c (build_scoped_method_call): Take types directly instead of
13417 as identifiers.
13418 * decl.c (xref_basetypes): Likewise.
13419 * init.c (expand_member_init): Likewise.
13420 (build_member_call): Likewise.
13421 (build_offset_ref): Likewise.
13422 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
13423 * method.c (do_build_assign_ref): Likewise.
13424 * decl.c (grokdeclarator): Handle a type appearing as the
13425 declarator-id for constructors.
13426 * method.c (do_build_copy_constructor): current_base_init_list now
13427 uses the types directly, not their names.
13428 * init.c (sort_base_init): Likewise.
13429 (expand_member_init): Likewise.
13430 * init.c (is_aggr_type): New function, like is_aggr_typedef.
13431
13432 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
13433
13434 * tree.c (layout_basetypes): Call build_lang_field_decl instead
13435 of build_lang_decl if first arg is a FIELD_DECL.
13436
13437 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13438
13439 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
13440 non-empty.
13441 * except.c (expand_start_catch_block): Set TREE_USED to avoid
13442 warnings about the catch handler.
13443
13444 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
13445
13446 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
13447 expand_target_expr.
13448
13449 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13450
13451 Fix access control to use trees rather than integers.
13452 * class.c (access_{default, public, protected, private,
13453 default_virtual, public_virtual, private_virtual}_node): Add
13454 definitions.
13455 (init_class_processing): Do creation of those nodes.
13456 * cp-tree.h (access_type): Delete enum decl.
13457 (access_{default, public, protected, private, default_virtual,
13458 public_virtual, private_virtual}_node): Add decls.
13459 (compute_access): Change return type.
13460 * search.c (compute_access): Have tree return type, instead of enum.
13461 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
13462 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
13463 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
13464 * parse.y (VISSPEC): Make ttype rather than itype.
13465 (base_class_access_list): Likewise.
13466 * *.[cy]: Change all refs of `access_public' to `access_public_node',
13467 etc.
13468 * call.c (build_method_call): Make ACCESS be a tree.
13469 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
13470 * cvt.c (convert_to_aggr): Likewise.
13471 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
13472 Likewise.
13473 * method.c (hack_identifier): Likewise.
13474 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
13475
13476 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
13477
13478 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
13479 frontend, and make it more consistent with respect to
13480 warn_pointer_arith.
13481
13482 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
13483
13484 * decl.c (pushdecl): Check for duplicate parameter names.
13485
13486 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
13487
13488 * decl.c (expand_static_init): Call assemble_external for atexit.
13489
13490 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
13491
13492 * except.c (do_unwind): Remove some generated dead code.
13493 (eh_outer_context): New routine, factor out some common code from
13494 expand_builtin_throw and end_eh_unwinder. Add code to do return
13495 address masking for the PA.
13496 (expand_builtin_throw): Use eh_outer_context instead of open coding
13497 it here.
13498 (end_eh_unwinder): Likewise.
13499
13500 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
13501
13502 * except.c (expand_throw): Call assemble_external for __empty, if we
13503 use it.
13504
13505 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
13506
13507 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
13508 NORMAL_RETURN_ADDR_OFFSET.
13509 (end_eh_unwinder): Likewise.
13510
13511 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
13512
13513 * gc.c (build_dynamic_cast): Make sure we don't cast away const
13514 when dealing with references, and make sure we handle dynamic
13515 casting to a cv qualified reference.
13516
13517 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
13518
13519 * except.c (struct eh_context): New structure top hold eh context
13520 information.
13521 (push_eh_context): New routine.
13522 (pop_eh_context): Likewise.
13523 * decl.c (push_cp_function_context): Use them.
13524 (pop_cp_function_context): Likewise.
13525
13526 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
13527
13528 * decl2.c (finish_file): Also prune uninteresting functions in the
13529 inline emission loop.
13530
13531 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
13532
13533 * sig.c (build_signature_table_constructor): Mark functions
13534 in the signature as referenced.
13535
13536 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
13537
13538 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
13539 the inline emission stuff.
13540
13541 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
13542
13543 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
13544 weak symbols.
13545 * lang-options.h: Add -f{no-,}weak.
13546 * decl.c (init_decl_processing): If the target does not support weak
13547 symbols, don't use them.
13548 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
13549
13550 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
13551
13552 * init.c (expand_member_init): warning for base init after members.
13553
13554 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
13555
13556 * cvt.c (build_expr_type_conversion): Don't convert to a reference
13557 type.
13558
13559 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
13560
13561 * method.c (report_type_mismatch): Improve wording for volatile
13562 mismatches.
13563
13564 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
13565
13566 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
13567 expand_assignment, as the later doesn't handle things that have
13568 copy constructors well. The compiler would do bitwise copying,
13569 instead of ctor calling in some cases.
13570
13571 Wed Dec 13 17:05:54 PST 1995 Paul Eggert <eggert@twinsun.com>
13572
13573 * g++.c (my_strerror): Return "cannot access" if errno is 0.
13574 (pfatal_with_name, perror_exec): Don't assume that
13575 the returned value from my_strerror contains no '%'s.
13576 (concat): Remove.
13577 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
13578
13579 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
13580
13581 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
13582 TYPE_METHODS/TREE_CHAIN mean what they used to.
13583 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
13584 instead of TYPE_METHODS.
13585 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
13586 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
13587 * cp-tree.h (CLASSTYPE_METHODS): Lose.
13588 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
13589 TYPE_METHODS.
13590 (struct lang_decl): Lose next_method field.
13591 (DECL_NEXT_METHOD): Lose.
13592 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
13593 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
13594 anymore.
13595 (finish_struct_methods): Don't mess with the TREE_CHAINs in
13596 fn_fields.
13597
13598 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
13599 vector.
13600
13601 * call.c (build_method_call): Synthesize here even when not inlining.
13602 * typeck.c (build_function_call_real): Likewise.
13603
13604 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
13605
13606 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
13607 == DBX_DEBUG, call dbxout_start_new_source_file and
13608 dbxout_resume_previous_source_file when appropriate.
13609
13610 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
13611
13612 * except.c (start_anon_func): Push to the top level.
13613 (end_anon_func): Pop from the top level.
13614
13615 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
13616
13617 * cp-tree.h (build_cleanup): New routine to build cleanups.
13618 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
13619 call at ctor time and use atexit to run it later.
13620 * decl2.c (build_cleanup): New routine, taken from finish_file.
13621 (finish_file): Use build_cleanup instead, and don't put function
13622 local statics in global dtor list.
13623
13624 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
13625
13626 * except.c (expand_throw): Ensure that we have cleanups, if we try
13627 and expand cleanups.
13628
13629 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
13630
13631 * except.c (expand_throw): Add logic to manage dynamic cleanups for
13632 the EH object.
13633 (expand_end_catch_block): Use the magic of expand_goto, instead of
13634 emit_jump so that we get the cleanup for any catch clause parameter
13635 and the cleanup for the exception object. Update to reflect label
13636 changes.
13637 (push_eh_cleanup): New routine to register a cleanup for an
13638 exception object.
13639 (empty_fndecl): Used to default cleanup actions to
13640 nothing.
13641 (init_exception_processing): Setup empty_fndecl. Setup
13642 saved_cleanup.
13643 (expand_start_catch_block): Update to reflect label changes. Call
13644 push_eh_object to register the cleanup for the EH object.
13645 (start_anon_func): New routine to start building lambda expressions
13646 from trees.
13647 (end_anon_func): New routine to end them.
13648 (struct labelNode): Change so that we can use tree labels, or rtx
13649 labels.
13650 (saved_cleanup): Object to check for dynamic cleanups for the
13651 exception handling object.
13652 (push_label_entry): Change so that we can use tree labels, or rtx
13653 labels.
13654 (pop_label_entry): Likewise.
13655 (top_label_entry): Likewise.
13656 (expand_start_all_catch): Use tree label instead of rtx label, so
13657 that we can get the magic of expand_goto.
13658 (expand_end_all_catch): Update to reflect label changes.
13659
13660 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
13661 use UNSAVE_EXPRs.
13662 typeck.c (get_member_function_from_ptrfunc): Remove remnants of
13663 building_cleanup logic, as we now use UNSAVE_EXPRs.
13664 * cp-tree.h (unsave_expr): Declare it.
13665 * decl.c (building_cleanup): Remove.
13666 (maybe_build_cleanup): Remove building_cleanup logic, and use
13667 UNSAVE_EXPR instead.
13668
13669 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
13670
13671 * gc.c (build_t_desc): Update error message to say <typeinfo>.
13672
13673 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13674
13675 * decl.c (pushdecl): Only warn about shadowing a local variable if
13676 warn_shadow is true.
13677
13678 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
13679
13680 * typeck.c (build_binary_op_nodefault): Added warning about
13681 comparisons between different enum types with -Wall, unless
13682 -fenum-int-equiv set.
13683
13684 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
13685
13686 * class.c (finish_struct_1): Skip down to the inner type in
13687 multidimensional arrays. Ensures ctors will be made for types that
13688 need constructing.
13689
13690 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
13691
13692 * decl.c (last_dtor_insn): New to track the last compiler generated
13693 insn in a dtor.
13694 (store_parm_decls): Set it.
13695 (finish_function): Use it to see if the dtor is empty. Avoid doing
13696 vtable setup all the time, if we can.
13697 (struct cp_function): Add last_dtor_insn.
13698 (push_cp_function_context): Save it.
13699 (pop_cp_function_context): Restore it.
13700
13701 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
13702
13703 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
13704 warnings.
13705
13706 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
13707
13708 * typeck.c (expand_target_expr): Make sure targets get put into the
13709 current temp_slot_level, so that the free_temp_slots call will reuse
13710 them.
13711
13712 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
13713
13714 * class.c (finish_struct_1): Delay delta fixups for virtual bases
13715 until after we have done the hard virtuals, to avoid a bogus `every
13716 virtual function must have a unique final overrider' for virtual
13717 functions that are only overridden by hard virtuals.
13718
13719 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
13720
13721 * pt.c (do_function_instantiation): Don't try to find a file-scope
13722 template for a member function.
13723
13724 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
13725
13726 * g++.c (main): Add handling of -nodefaultlibs.
13727
13728 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
13729
13730 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
13731 distinguish between direct bindings of reference variables, and
13732 indirect bindings of reference variables.
13733 * cvt.c (build_up_reference): Use it.
13734 * typeck.c (convert_arguments): Use it to indicate this is an
13735 indirect binding.
13736 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
13737 as they are unused.
13738 (expand_static_init): Likewise.
13739 (cplus_expand_expr_stmt): Likewise.
13740 * decl2.c (finish_file): Likewise.
13741 * init.c (perform_member_init): Likewise.
13742 (emit_base_init): Likewise.
13743 (expand_aggr_vbase_init_1): Likewise.
13744
13745 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13746
13747 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
13748 get a DECL_LANG_SPECIFIC node.
13749 * cp-tree.h (lang_decl_flags): Add new member `level'.
13750 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
13751 decl_flags level member.
13752
13753 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13754
13755 * call.c (build_method_call): Make sure instance has a
13756 TYPE_LANG_SPECIFIC node before we dive into it.
13757
13758 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
13759
13760 * method.c (make_thunk): use TREE_SET_CODE to set thunk's tree code.
13761
13762 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
13763
13764 * decl.c (duplicate_decls): When smashing decls, smash staticness in
13765 the usual way.
13766
13767 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
13768
13769 * decl.c (poplevel): Handle the merging of subblocks of cleanups
13770 when finishing blocks that have already been created (usually due to
13771 the fixup goto code). Fixes bad debugging information.
13772
13773 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
13774
13775 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
13776 that's not a list of overloaded functions.
13777
13778 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13779
13780 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
13781 before trying to use DECL_ABSTRACT_VIRTUAL_P.
13782
13783 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
13784
13785 * decl2.c (mark_used): New function for hooking into setting of
13786 TREE_USED on decls.
13787 * call.c (build_method_call): Use it.
13788 * class.c (instantiate_type): Likewise.
13789 * init.c (build_offset_ref): Likewise. Don't call assemble_external
13790 for all like-named functions.
13791 * method.c (hack_identifier): Likewise.
13792 (emit_thunk): Don't call assemble_external.
13793 (make_thunk): Create thunk as a FUNCTION_DECL so that it
13794 gets the right mode and ENCODE_SECTION_INFO works.
13795
13796 * parse.y: Use mark_used. Pass operator names to do_identifier.
13797 * lex.c (do_identifier): Handle operator names.
13798
13799 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
13800
13801 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13802
13803 * errfn.c: Include stdio.h.
13804 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
13805
13806 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
13807
13808 * typeck2.c (digest_init): Always convert initializers to the
13809 right type.
13810
13811 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
13812
13813 * init.c (member_init_ok_or_else): Don't allow member initializers
13814 for indirect members, as it is invalid.
13815
13816 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13817
13818 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
13819
13820 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
13821
13822 * parse.y (for.init.statement): Catch compound statements inside for
13823 initializations, if we're being pedantic.
13824
13825 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
13826
13827 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
13828 looking for.
13829
13830 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
13831
13832 * error.c (dump_expr): Don't core dump when a boolean expression is
13833 used as a default argument.
13834
13835 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
13836
13837 * class.c (finish_struct_bits): Check aggregate_value_p instead of
13838 RETURN_IN_MEMORY.
13839
13840 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
13841
13842 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
13843 BLKmode type that would otherwise be returned in registers.
13844
13845 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13846
13847 * g++.c (WITHLIBC): New macro.
13848 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
13849 saw_libc and pass it at the end if it was set.
13850
13851 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
13852
13853 * parse.y (fn.def1): Call split_specs_attrs in
13854 declmods notype_declarator case.
This page took 0.680392 seconds and 5 git commands to generate.