]> gcc.gnu.org Git - gcc.git/blob - gcc/cp/ChangeLog
search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
[gcc.git] / gcc / cp / ChangeLog
1 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
2
3 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
4 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
5
6 1999-09-07 Mark Mitchell <mark@codesourcery.com>
7
8 * Makefile.in (tree.o): Depend on ggc.h.
9 * class.c (make_method_vec): Remove.
10 (free_method_vec): Likewise.
11 (free_method_vecs): Remove.
12 (add_method): Don't use them.
13 * cp-tree.def (PTRMEM_CST): Make it longer.
14 (TEMPLATE_PARM_INDEX): Make it shorter.
15 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
16 (template_parm_index): Remove RTL field.
17 (ptrmem_cst): Add RTL field.
18 (finish_function): Removed parameter.
19 (process_next_inline): Change prototype.
20 (init_cplus_unsave): Rename to init_tree.
21 (binding_init): Remove.
22 * decl.c (free_binding_nodes): Remove.
23 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
24 (pop_binding): Don't use free_binding_nodes.
25 (free_binding_vecs): Remove.
26 (store_bindings): Don't use them.
27 (pop_from_top_level): Likewise.
28 (lookup_namespace_name): Simplify.
29 (build_typename_type): Don't use obstack_free.
30 (unqualified_namespace_lookup): Simplify.
31 (lookup_name_real): Simplify.
32 (start_function): Remove comment about leaks.
33 (finish_function): Removed nested parameter. Call
34 expand_end_bindings even when building_stmt_tree.
35 Call ggc_push_context and ggc_pop_context around
36 rest_of_compilation, if necessary.
37 (mark_cp_function_context): Handle a NULL language-context.
38 (lang_mark_false_label_stack): Fix typo.
39 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
40 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
41 pointer to method types.
42 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
43 * decl2.c (finish_objects): Adjust call to finish_function.
44 (finish_static_store_duration_function): Likewise.
45 (do_nonmember_using_decl): Remove call to binding_init.
46 * except.c (end_anon_func): Adjust call to finish_function.
47 * lex.c (mark_impl_file_chain): New function.
48 (init_parse): Call init_tree, not init_cplus_unsave.
49 Add GC roots.
50 (cp_pramga_interface): Use xmalloc, not permalloc.
51 (cp_pragma_implementation): Likewise.
52 (begin_definition_of_inclass_inline): Simplify.
53 (process_next_inline): Adjust prototype.
54 (do_scoped_id): Don't call binding_init.
55 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
56 * method.c (emit_thunk): Adjust call to finish_function.
57 (synthesize_method): Likewise.
58 * parse.y (%union): Add a new `pi' variant.
59 (PRE_PARSED_FUNCTION_DECL): Use it.
60 (fn.defpen): Likewise.
61 (fndef): Adjust call to finish_function.
62 * pt.c (instantiate_decl): Likewise.
63 * rtti.c (syntheisze_tinfo_fn): Likewise.
64 * semantics.c (expand_body): Likewise.
65 * tree.c: Include ggc.h.
66 (mark_list_hash): New function.
67 (binding_init): Remove.
68 (init_cplus_unsave): Rename to ...
69 (init_tree): This. Add GC roots.
70
71 1999-09-05 Mark Mitchell <mark@codesourcery.com>
72
73 Get ready for garbage collection.
74 * Makefile.in (CXX_TREE_H): Add varray.h
75 (lex.o): Depend on ggc.h.
76 (decl.o): Likewise.
77 (decl2.o): Likewise.
78 (method.o): Likewise.
79 (search.o): Likewise.
80 (pt.o): Likewise.
81 (repo.o): Likewise.
82 * class.c: Include ggc.h.
83 (current_class_name): Remove.
84 (current_class_type): Likewise.
85 (current_access_specifier): Likewise.
86 (previous_class_type): Likewise.
87 (previous_class_values): Likewise.
88 (class_cache_firstobj): Likewise.
89 (current_lang_base): Likewise.
90 (current_lang_stack): Likewise.
91 (current_lang_stacksize): Likewise.
92 (lang_name_c): Likewise.
93 (lang_name_cplusplus): Likewise.
94 (lang_name_java): Likewise.
95 (current_lang_name): Likewise.
96 (base_layout_decl): Likewise.
97 (access_default_node): Likewise.
98 (access_public_node): Likewise.
99 (access_protected_node): Likewise.
100 (access_private_node): Likewise.
101 (access_default_virtual_node): Likewise.
102 (access_public_virtual_node): Likewise.
103 (access_protected_virtual_node): Likewise.
104 (access_private_virtual_node): Likewise.
105 (signed_zero_node): Likewise.
106 (init_class_processing): Don't build base_layout_decl.
107 (push_lang_context): Adjust now that current_lang_base is a varray.
108 (pop_lang_context): Likewise.
109 * cp-tree.h: Include varray.h.
110 (cp_global_trees): Add access_default, access_public,
111 access_protected, access_private, access_default_virtual,
112 access_public_virtual, access_protected_virtual,
113 access_private_virtual, ctor_identifier, delta2_identifier,
114 delta_identifier, dtor_identifier, in_charge_identifier,
115 index_identifier, nelts_identifier, this_identifier,
116 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
117 lang_name_c, lang_name_cplusplus, lang_name_java,
118 empty_except_spec, null, jclass, minus_one, terminate.
119 (saved_scope): Move here from decl.c. Define globals in terms of
120 saved_scope: current_namespace, current_class_name,
121 current_class_type, current_access_specifier, current_lang_stack,
122 current_lang_base, current_lang_name, current_function_parms,
123 current_template_parms, processing_template_decl,
124 processing_specialization, processing_explicit_instantiation,
125 previous_class_type, previous_class_values, class_cache_firstobj.
126 (scope_chain): New variable.
127 (init_pt): New function.
128 * decl.c (current_namespace): Remove.
129 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
130 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
131 (delta_identifier, delta2_identifier): Likewise.
132 (pfn_or_delta2_identifier, tag_identifier): Likewise
133 (vt_off_identifier, empty_except_spec, null_node): Likewise.
134 (current_function_parms, current_lang_base): Remove.
135 (current_lang_stack, previous_class_values): Remove.
136 (class_binding_level): Macroize.
137 (saved_scope): Remove.
138 (current_saved_scope): Rename to scope_chain.
139 (mark_saved_scope): Adjust for new scope structure.
140 (maybe_push_to_top_level): Likewise.
141 (pop_from_top_level): Likewise.
142 (duplicate_decls): Adjust now that current_lang_base is a varray.
143 (build_typename_type): Call ggc_add_tree_hash_table_root.
144 (init_decl_processing): Call init_pt. Call push_to_top_level to
145 set up globals. Add GC roots.
146 (xref_basetypes): Adjust now that current_lang_base is a varray.
147 * decl.h (this_identifier): Remove.
148 (in_charge_identifier): Likewise.
149 * decl2.c: Don't include varray.h.
150 (current_namespace): Remove.
151 (init_decl2): Add GC roots.
152 * except.c (Terminate): Remove.
153 (init_exception_processing): Use terminate_node instead.
154 (build_terminate_handler): Likewise.
155 * init.c (nc_nelts_field_id): Remove.
156 (minus_one): Likewise.
157 (init_init_processing): Use minus_one_node and nelts_identifier
158 instead. Add GC roots.
159 (jclass_node): Remove.
160 (build_new_1): Use nelts_identifier.
161 (build_vec_init): Likewise.
162 (build_vec_delete): Likewise.
163 * lex.c: Include ggc.h.
164 (defarg_fn): Move declaration early.
165 (defarg_parms): Likewise.
166 (init_parse): Add GC roots.
167 (handle_cp_pragma): Remove redundant declaration of
168 pending_vtables.
169 * method.c: Include ggc.h.
170 (btypelist): Make it a varray. All uses changed.
171 (ktypelist): Likewise.
172 (init_method): Add GC roots.
173 * pt.c: Don't include varray.h. Include ggc.h.
174 (current_template_parms): Remove.
175 (processing_template_decl): Likewise.
176 (processing_specialization): Likewise.
177 (processing_explicit_instantiation): Likewise.
178 (init_pt): New function.
179 * repo.c: Include ggc.h.
180 (init_repo): Add GC roots.
181 * search.c: Don't include varray.h.
182 (_vptr_name): Remove.
183 (lookup_field_1): Use vtpr_identifier instead.
184 (expand_indirect_vtbls_init): Remove redundant declaration of
185 in_charge_identifier.
186 (init_search_processing): Use vptr_identifier.
187
188 1999-09-05 Richard Henderson <rth@cygnus.com>
189 Bernd Schmidt <bernds@cygnus.co.uk>
190 Mark Mitchell <mark@codesourcery.com>
191
192 * Makefile.in (parse.o): Depend on ggc.h.
193 (decl2.o): Depend on ggc.h.
194 (init.o): Depend on ggc.h.
195 * cp-tree.h (init_decl2): Declare.
196 (cp_parse_init): Likewise.
197 * decl.c (ggc_p): Define to zero.
198 (mark_saved_scope): New function.
199 (init_decl_processing): Call cp_parse_init, and cp_decl2.
200 Register GC roots.
201 (expand_static_init): Add GC roots.
202 * decl2.c: Include ggc.h.
203 (init_decl2): New function.
204 * init.c: Include ggc.h.
205 (init_init_processing): Add GC roots.
206 * parse.y: Include ggc.h.
207 (cp_parse_init): New function.
208
209 1999-09-04 Mark Mitchell <mark@codesourcery.com>
210
211 * decl.c (init_decl_processing): Set mark_lang_status.
212 (lang_mark_false_label_stack): Adjust prototype.
213 * decl2.c (grok_function_init): Remove extraneous declaration of
214 abort_fndecl.
215
216 * Make-lang.in (cc1plus): Remove dependency on GGC.
217 * Makefile.in (OBJS): Don't mention ggc-simple.o.
218 (OBJDEPS): Don't mention ggc-simple.o.
219
220 * Make-lang.in (cc1plus): Depend on $(GGC).
221 * Makefile.in (OBJS): Add ggc-simple.o.
222 (OBJDEPS): Likewise.
223 * cp-tree.h (language_function): Rename members to `x_' versions;
224 we now have x_named_labels, x_ctor_label, x_dtor_label,
225 x_base_init_list, x_member_init_list, x_base_init_expr,
226 x_current_class_ptr, x_current_class_ref, x_last_tree,
227 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
228 x_result_rtx.
229 (dtor_label, ctor_label, current_base_init_list,
230 current_member_init_list, base_init_expr, current_class_ptr,
231 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
232 * decl.c: Include ggc.h.
233 (last_dtor_insn): Adjust to use x_ names.
234 (last_parm_cleanup_insn): Likewise.
235 (original_result_rtx): Likewise.
236 (named_labels): Likewise.
237 (mark_binding_level): New function.
238 (mark_cp_function_context): Likewise.
239 (mark_false_label_stack): Likewise.
240 (lang_mark_tree): Likewise.
241 (lang_cleanup_tree): Likewise.
242
243 1999-09-03 Mark Mitchell <mark@codesourcery.com>
244
245 * Makefile.in (CXX_TREE_H): Include function.h.
246 (decl.o): Don't depend on function.h.
247 (decl2.o): Likewise.
248 (typeck.o): Likewise.
249 (init.o): Likewise.
250 (method.o): Likewise.
251 * cp-tree.h: Include function.h.
252 (cp_function): Rename to language_function. Remove next.
253 (cp_function_chain): Make it a macro, not a variable.
254 (push_cp_function_context): Don't declare.
255 (pop_cp_function_context): Likewise.
256 * decl.c: Don't include function.h.
257 (push_cp_function_context): Make it static. Make it suitable for
258 a save_lang_status callback.
259 (pop_cp_function_context): Likewise.
260 (maybe_push_to_top_level): Call push_function_context_to, not
261 push_cp_function_context.
262 (pop_from_top_level): Call pop_function_context_from, not
263 pop_cp_function_context.
264 (init_decl_processing): Set save_lang_status and
265 restore_lang_status. Call push_function_context_to, not
266 push_cp_function_context.
267 (cp_function_chain): Remove.
268 * decl2.c: Don't include function.h.
269 * except.c: Don't include function.h.
270 (start_anon_func): Call push_function_context_to, not
271 push_cp_function_context.
272 (end_anon_func): Call pop_function_context_from, not
273 pop_cp_function_context.
274 * init.c: Don't include function.h.
275 * lex.c (begin_definition_of_inclass_inline): Call
276 push_function_context_to, not push_cp_function_context.
277 (process_next_inline): Call pop_function_context_from, not
278 pop_cp_function_context.
279 * method.c: Don't include function.h.
280 (synthesize_method): Call push_function_context_to, not
281 push_cp_function_context. Call pop_function_context_from, not
282 pop_cp_function_context.
283 * typeck.c: Don't include function.h.
284
285 * decl.c (expand_static_init): Tweak handling of static
286 initializations for objects without constructors.
287
288 1999-09-03 Nathan Sidwell <nathan@acm.org>
289
290 * typeck.c (build_indirect_ref): Reject dereference of pointer to
291 void.
292
293 1999-09-02 Mark Mitchell <mark@codesourcery.com>
294
295 * cp-tree.h (cp_function): Move here, from decl.c.
296 (cp_function_chain): Declare.
297 (dtor_label): New macro, instead of variable.
298 (ctor_label): Likewise.
299 (current_base_init_list): Likewise.
300 (current_member_init_list): Likewise.
301 (base_init_expr): Likewise.
302 (current_class_ptr): Likewise.
303 (current_class_ref): Likewise.
304 (last_tree): Likewise.
305 (last_expr_type): Likewise.
306 (current_function_returns_value): Likewise.
307 (current_function_returns_null): Likewise.
308 (current_function_just_assigned_this): Likewise.
309 (current_function_parms_stored): Likewise.
310 (temp_name_counter): Likewise.
311 (static_labelno): Likewise.
312 (expanding_p): Likewise.
313 (stmts_are_full_exprs_p): Likewise.
314 (in_function_try_handler): Likewise.
315 (lang_type): Remove nested type_flags. All uses changed.
316 * call.c (ctor_label): Remove.
317 (dtor_label): Likewise.
318 * class.c (current_class_ptr): Remove.
319 (current_class_ref): Likewise.
320 * decl.c (static_labelno): Remove.
321 (dtor_label): Likewise.
322 (last_dtor_insn): New macro, instead of variable.
323 (last_parm_cleanup_insn): Likewise.
324 (original_result_rtx): Likewise.
325 (in_function_try_handler): Remove.
326 (named_label_uses): New macro, instead of variable.
327 (named_labels): Likewise.
328 (current_function_returns_value): Remove.
329 (current_function_returns_null): Likewise.
330 (current_function_assigns_this): New macro, instead of variable.
331 (current_function_just_assigned_this): Likewise.
332 (current_binding_level): Likewise.
333 (init_decl_processing): Call push_cp_function_context.
334 (cp_function): Move to cp-tree.h
335 (cp_function_chain): Make it global.
336 (temp_name_counter): Remove.
337 (push_cp_function_context): Simplify.
338 (pop_cp_function_context): Likewise.
339 * decl2.c (temp_name_counter): Remove.
340 * init_c (current_base_init_list): Likewise.
341 (current_member_init_list): Likewise.
342 (base_init_expr): Likewise.
343 * method.c (static_labelno): Likewise.
344 * pt.c (last_tree): Likewise.
345 * semantics.c (expanding_p): Likewise.
346 (stmts_are_full_exprs_p): Likewise.
347 (last_expr_type): Likewise.
348 * typeck.c (dtor_label): Likewise.
349 (ctor_label): Likewise.
350
351 1999-09-01 Alex Samuel <samuel@codesourcery.com>
352
353 * decl2.c (arg_assoc_template_arg): New prototype. New function.
354 (arg_assoc_class): Use arg_assoc_template_arg for template
355 arguments.
356 (arg_assoc): Likewise.
357 * pt.c (mangle_class_name_for_template): Allow member template
358 template arguments.
359
360 1999-09-02 Nathan Sidwell <nathan@acm.org>
361
362 * call.c (build_conditional_expr): Warn on enum mismatches.
363 (convert_arg_to_ellipsis): Move non-pod check to after
364 conversion.
365
366 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
367
368 * gxx.gperf (hash, is_reserved_word): Add prototypes.
369
370 * init.c (build_vec_init): Initialize variable `try_block'.
371
372 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
373 Likewise for bzero/memset.
374 (token_getch, token_put_back): Add static prototypes. Remove
375 `inline' from the definitions.
376 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
377
378 1999-09-01 Mark Mitchell <mark@codesourcery.com>
379
380 * cp-tree.h (lang_type): Move align into type_flags.
381 (CLASSTYPE_ALIGN): Adjust accordingly.
382 * call.c (direct_reference_binding): Remove misleading comment.
383
384 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
385
386 * parse.y (language_string): Constify.
387
388 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
389
390 * repo.c (getpwd): Don't prototype.
391 * xref.c (getpwd): Likewise
392
393 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
394
395 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
396 Remove hacks for stuff which now comes from libiberty.
397
398 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
399
400 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
401
402 1999-08-30 Mark Mitchell <mark@codesourcery.com>
403
404 * cp-tree.h (begin_init_stmts): Declare.
405 (finish_init_stmts): Likewise.
406 * cvt.c (build_up_reference): Wrap the declaration of a temporary
407 in a statement-expression so that we will see it when expanding
408 tree structure later.
409 * init.c (begin_init_stmts): Don't make it static.
410 (finish_init_stmts): Likewise.
411
412 * cp-tree.h (start_handler_parms): New function.
413 (expand_start_catch_block): Take only one parameter.
414 (start_handler_parms): New function.
415 * decl.c (start_handler_parms): Define it.
416 * except.c (process_start_catch_block): Take only one parameter.
417 Don't call grokdeclarator here.
418 (expand_start_catch_block): Don't call grokdeclarator here,
419 either.
420 * parse.y (handler_args): Adjust call to
421 expand_start_catch_block. Use start_handler_parms.
422 * pt.c (push_template_decl_real): Make permanent lists have
423 permanent elements.
424 (tsubst_expr): Adjust calls to expand_start_catch_block
425 appropriately.
426 * semantics.c (expand_stmt): Likewise.
427
428 1999-08-29 Alex Samuel <samuel@codesourcery.com>
429
430 * pt.c (push_template_decl_real): Use template declaration from
431 class type if it exists.
432
433 1999-08-29 Mark Mitchell <mark@codesourcery.com>
434
435 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
436 (maybe_inject_for_scope_var): Declare it.
437 (initialize_local_var): Likewise.
438 * decl.c (maybe_inject_for_scope_var): Make it global.
439 (initialize_local_var): Likewise. Move cleanup handling here,
440 from cp_finish_decl.
441 (make_rtl_for_nonlocal_decl): Use
442 push_obstacks_nochange/pop_obstacks, rather than
443 end_temporary_allocation/resume_temporary_allocation.
444 (cp_finish_decl): Try to complete the type of a variable when it
445 is declared. Move cleanup-handling to initialize_local_var.
446 (expand_static_init): Use tree-building code, rather than
447 RTL-building code.
448 * decl2.c (get_temp_name): Assert non-initializedness of
449 temporaries.
450 * init.c (create_temporary_var): Move RTL-assigning code to ...
451 (get_temp_regvar): Here.
452 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
453 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
454 call initialize_local_var to generate initialization code.
455
456 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
457
458 * cp-tree.h (fndecl_as_string, type_as_string,
459 type_as_string_real, args_as_string, decl_as_string,
460 expr_as_string, code_as_string, language_as_string,
461 parm_as_string, op_as_string, assop_as_string, cv_as_string,
462 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
463
464 * errfn.c (cp_printer): Likewise.
465
466 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
467 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
468 cp_file_of, code_as_string, language_as_string, parm_as_string,
469 op_as_string, assop_as_string, args_as_string, cv_as_string):
470 Likewise.
471
472 * tree.c (lang_printable_name): Likewise.
473
474 1999-08-28 Richard Henderson <rth@cygnus.com>
475
476 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
477
478 1999-08-28 Mark Mitchell <mark@codesourcery.com>
479
480 * cp-tree.h (strip_array_types): New function.
481 * decl.c (maybe_deduce_size_from_array_init): New function, split
482 out from cp_finish_decl.
483 (layout_var_decl): Likewise.
484 (maybe_commonize_var): Likewise.
485 (maybe_inject_for_scope_var): Likewise.
486 (initialize_local_var): Likewise.
487 (build_cleanup_on_safe_obstack): Likewise.
488 (check_initializer): Likewise.
489 (make_rtl_for_nonlocal_decl): Likewise.
490 (cp_finish_decl): Use them.
491 * typeck.c (strip_array_types): New function.
492
493 * cp-tree.def (LABEL_STMT): New tree node.
494 * cp-tree.h (LABEL_STMT_LABEL): New macro.
495 (shadow_label): Remove.
496 (declare_local_label): New function.
497 (finish_label_decl): Likewise.
498 * decl.c (make_label_decl): New function, split out from
499 lookup_label.
500 (shadowed_labels): Remove.
501 (binding_level): Add shadowed_labels.
502 (clear_binding_level): Remove.
503 (push_binding_level): Just bzero the new binding level.
504 (pushlevel): Fix indentation.
505 (pop_label): New function.
506 (pop_labels): Likewise, split out from poplevel.
507 (poplevel): Pop local labels. Use pop_labels.
508 (maybe_push_to_top_level): Don't clear shadowed_labels.
509 (lookup_label): Use make_label_decl.
510 (shadow_label): Remove.
511 (declare_local_label): New function.
512 (define_label): Simplify.
513 (start_function): Don't clear shadowed_labels.
514 (cp_function): Remove shadowed_labels.
515 (push_cp_function_context): Don't save shadowed_labels.
516 (pop_cp_function_context): Don't restore it.
517 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
518 * parse.y (label_decl): Use finish_label_decl.
519 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
520 declarations.
521 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
522 building_stmt_tree.
523 (finish_label_decl): New function.
524 (expand_stmt): Handle LABEL_STMTs and local label declarations.
525
526 1999-08-26 Mark Mitchell <mark@codesourcery.com>
527
528 * decl.c (lookup_label): Build labels on the permanent obstack
529 when building statement trees. Don't build RTL for labels when
530 building statement trees.
531 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
532 building statement trees.
533 (finish_label_stmt): Likewise.
534 (expand_stmt): Adjust accordingly.
535 * pt.c (tsubst_expr); Likewise.
536 (do_decl_instantiation): Robustify.
537
538 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
539 * tree.c (build_cplus_new): Set it.
540 * expr.c (cplus_expand_expr): Use it.
541 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
542
543 * decl.c (store_parm_decls): Reset immediate_size_expand.
544 (finish_function): Likewise.
545
546 * tree.c (cplus_unsave_expr_now): Don't return a value.
547
548 * semantics.c (do_poplevel): Always initialize the return value.
549
550 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
551
552 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
553 * tree.h (cplus_unsave_expr_now) : Same.
554
555 1999-08-25 Mark Mitchell <mark@codesourcery.com>
556
557 * decl.c (grokdeclarator): Amend comment.
558 * except.c (expand_start_catch_block): Call push_template_decl for
559 catch-block parameters.
560 * method.c (synthesize_method): Build an empty compound statement
561 for the body of a constructor.
562
563 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
564
565 * tree.c (cp_build_qualified_type_real): If we're asking for the
566 same quals we already have, just return.
567
568 1999-08-25 Mark Mitchell <mark@codesourcery.com>
569
570 * cp-tree.def (SUBOBJECT): New tree node.
571 * cp-tree.h (CLEANUP_P): New macro.
572 (SUBOBJECT_CLEANUP): Likewise.
573 (keep_next_level): Add parameter.
574 (get_temp_regvar): Don't declare.
575 (emit_base_init): Remove parameter.
576 (expand_aggr_init): Rename to build_aggr_init.
577 (expand_vec_init): Rename to build_vec_init.
578 (do_pushlevel): Remove.
579 (do_poplevel): Likewise.
580 (finish_cleanup): New function.
581 (finish_subobject): Likewise.
582 (stmts_are_full_exprs_p): New variable.
583 * decl.c (keep_next_level): Add parameter.
584 (cp_finish_decl): Use build_aggr_init, not
585 expand_aggr_init. Use finish_expr_stmt to expand the code.
586 (expand_static_init): Use tree-generating, not RTL-generating,
587 functions to handle the initialization.
588 (start_function): Remove dead code. Always have a momentary
589 obstack inside the function, even before hitting the first curly
590 brace.
591 (cplus_expand_expr_stmt): Move calls to
592 expand_{start,end}_target_temps into semantics.c.
593 (cp_function): Add stmts_are_full_exprs_p.
594 (push_cp_function_context): Save it.
595 (pop_cp_function_context): Restore it.
596 * decl2.c (get_temp_regvar): Move to init.c.
597 (do_static_initialization): Use build_{aggr,vec}_init.
598 (do_static_destruction): Fix typo in comment.
599 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
600 * except.c (expand_throw): Use create_temporary_var.
601 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
602 * init.c (expand_vec_init_try_block): Remove.
603 (expand_vec_init_catch_clause): Likewise.
604 (get_temp_regvar): New function.
605 (begin_init_stmts): Likewise.
606 (finish_init_stmts): Likewise.
607 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
608 structure here.
609 (emit_base_init): Likewise. Remove unused parameter.
610 (expand_virtual_init): Likewise.
611 (expand_cleanup_for_base): Use finish_subobject.
612 (expand_aggr_vbase_init_1): Simplify.
613 (construct_virtual_bases): Use tree-generating functions to build
614 up initialization.
615 (expand_aggr_init): Likewise. Rename to build_aggr_init.
616 (expand_default_init): Likewise.
617 (expand_aggr_init_1): Likewise.
618 (expand_vec_init): Rename to build_vec_init.
619 * method.c (do_build_copy_constructor): Use tree-generating
620 functions. Don't call clear_last_expr.
621 (do_build_assign_ref): Likewise.
622 (synthesize_method): Call clear_last_expr here.
623 * parse.y (base_init): Don't call clear_last_expr here.
624 (nodecls): Likewise.
625 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
626 * semantics.c (do_pushlevel): Move to here.
627 (do_poplevel): Likewise.
628 (stmts_are_full_exprs_p): New variable.
629 (finish_expr_stmt): Handle logic for temoprary cleanup here.
630 (finish_for_stmt): Use finish_expr_stmt.
631 (finish_cleanup): New function.
632 (finish_function_try_block): Fix indentation.
633 (finish_subobject): New function.
634 (setup_vtbl_ptr): Call keep_next_level here.
635 (finish_stmt_expr): Handle a block with no scope inside the
636 statement-expression.
637 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
638 SUBOBJECT.
639 * tree.c (search_tree): Handle INIT_EXPR.
640 (mapcar): Likewise.
641 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
642 * typeck2.c (store_init_value): Change expand_aggr_init to
643 build_aggr_init in comment.
644
645 1999-08-25 Mark Mitchell <mark@codesourcery.com>
646
647 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
648
649 1999-08-25 Nathan Sidwell <nathan@acm.org>
650
651 * decl2.c (handle_class_head): Be graceful about additional
652 scope qualifiers. Adjust comments to reflect reality.
653
654 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
655
656 * call.c (build_conditional_expr): Fix typo.
657 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
658 lvalue before trying to mess with the sides.
659
660 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
661
662 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
663
664 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
665
666 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
667
668 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
669 Return arbitrary pointer or NULL.
670 (check_eh_spec): Call __throw_type_match_rtti_2.
671 * tinfo.h (*::dcast): Return int. Add valp parm.
672 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
673 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
674 (__throw_type_match_rtti): Now just a wrapper.
675
676 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
677 (init_exception_processing): Don't initialize them.
678
679 1999-08-23 Paul Burchard <burchard@pobox.com>
680
681 * decl.c (check_default_argument): Fix typo.
682
683 1999-08-22 Mark Mitchell <mark@codesourcery.com>
684
685 * cp-tree.def (STMT_EXPR): Fix typo in node name.
686
687 * dump.c (dump_next_stmt): New function.
688 (dequeue_and_dump): Use it.
689
690 * pt.c (tsubst_copy): Make sure to initialize return value for a
691 STMT_EXPR, even when processing_template_decl.
692 * semantics.c (finish_stmt_expr): A statement-expression whose
693 last statement is not an expression-statement has type `void'.
694
695 1999-08-20 Mark Mitchell <mark@codesourcery.com>
696
697 * semantics.c (finish_stmt_expr): Fix typo in comment.
698 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
699 (mapcar): Likewise.
700 * init.c (build_vec_delete_1): Make the children of a permanent
701 BIND_EXPR permanent.
702 * pt.c (register_specialization): Don't register a specialization
703 more than once.
704
705 1999-08-18 Andrew Haley <aph@cygnus.com>
706
707 * method.c (process_overload_item): Call build_mangled_C9x_name ()
708 for all integer parameter types larger than long long.
709
710 1999-08-19 Mark Mitchell <mark@codesourcery.com>
711
712 * pt.c (redeclare_class_template): Merge default template
713 arguments in both directions.
714
715 * typeck.c (common_type): Undo 1999-08-18 change. Remove
716 compiler_error message.
717
718 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
719
720 * cp-tree.h: Declare flag_use_repository.
721 * pt.c (do_decl_instantiation): Don't complain about duplicate
722 instantiation with -frepo.
723 (do_type_instantiation): Likewise.
724
725 * pt.c (push_template_decl_real): Complain about everything
726 that isn't a valid template.
727
728 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
729 affect inlines.
730
731 1999-08-19 Mark Mitchell <mark@codesourcery.com>
732
733 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
734 * decl2.c (build_expr_from_tree): Handle it.
735 * error.c (dump_expr): Likewise.
736 * pt.c (for_each_template_parm): Likewise.
737 (tsubst_copy): Likewise.
738 * tree.c (search_tree): Likewise.
739 * semantics.c (finish_pseudo_destructor_call): Create it.
740
741 1999-08-18 Mark Mitchell <mark@codesourcery.com>
742
743 * search.c (setup_class_bindings): Robustify.
744 * typeck.c (common_type): Use same_type_p, not pointer equality,
745 to compare types.
746
747 * cp-tree.h (build_lang_field_decl): Remove.
748 * class.c (build_vtable): Replace calls to build_lang_field_decl
749 with build_lang_decl.
750 (prepare_fresh_vtable): Likewise.
751 (finish_struct_1): Likewise.
752 (init_class_processing): Likewise.
753 * decl.c (push_using_decl): Likewise.
754 (init_decl_processsing): Likewise.
755 (grokvardecl): Likewise.
756 (build_ptrmemfunc_type): Likewise.
757 (grokdeclarator): Likewise.
758 (build_enumerator): Likewise.
759 * decl2.c (grok_x_components): Likewise.
760 (do_class_using_decl): Likewise.
761 * except.c (call_eh_info): Likewise.
762 * init.c (init_init_processing): Likewise.
763 * rtti.c (expand_class_decl): Likewise.
764 * tree.c (build_base_fields): Likewise.
765 (build_vbase_pointer_fields): Likewise.
766 * lex.c (build_lang_decl): Build declarations on the permanent
767 obstack if we're building statmeent trees.
768 (retrofit_lang_decl): Handle both the full lang_decl and also the
769 smaller lang_decl_flags here.
770 (build_lang_field_decl): Remove.
771 * pt.c (push_template_decl_real): Issue errors for variable
772 declarations that are not static members.
773
774 1999-08-18 Richard Henderson <rth@cygnus.com>
775
776 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
777 (mapcar): Likewise.
778
779 1999-08-17 Mark Mitchell <mark@codesourcery.com>
780
781 * cp-tree.h (back_end_hook): New variable.
782 * decl2.c (back_end_hook): Define it.
783 (finish_file): If it's non-NULL, call it.
784
785 * decl.c (add_decl_to_level): New function.
786 (push_local_binding): Use it.
787 (find_binding): Fix typo in comment.
788 (pushdecl): Use add_decl_to_level. Put templates on the
789 corresponding namespace-scope binding levels.
790 * dump.c (dequeue_and_dump): Print the specializations of a
791 template.
792 * pt.c (push_template_decl_real): Don't push a template multiple
793 times.
794
795 1999-08-17 Mark Mitchell <mark@codesourcery.com>
796
797 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
798 (CALL_DECLARATOR_QUALS): Likewise.
799 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
800 * decl.c (grokdeclarator): Adjust to use them.
801 * decl2.c (grokfield): Likewise.
802 (reparse_absdcl_as_casts): Likewise.
803 * lex.c (make_call_declarator): Likewise.
804 (set_quals_and_spec): Likewise.
805 * pt.c (tsubst): Likewise.
806 * tree.c (mapcar): Remove special hack to handle third operand of
807 a CALL_EXPR.
808
809 1999-08-16 Mark Mitchell <mark@codesourcery.com>
810
811 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
812 * class.c (build_vtable): Use build_lang_field_decl to build the
813 VAR_DECLs for vtables.
814 (prepare_fresh_vtable): Likewise.
815 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
816 CAN_HAVE_FULL_LANG_DECL_P.
817 (push_using_decl): Use build_lang_decl to build USING_DECLs.
818 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
819 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
820 (build_lang_field_decl): Likewise.
821 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
822 to copy.
823
824 * cp-tree.def (STMT_EXPR): New tree node.
825 * cp-tree.h (STMT_EXPR_STMT): New macro.
826 (store_return_init): Change prototype.
827 (finish_named_return_value): New function.
828 (expand_stmt): Likewise.
829 (expand_body): Likewise.
830 (begin_stmt_tree): Likewise.
831 (finish_stmt_tree): Likewise.
832 (expanding_p): New variable.
833 (last_expr_type): Likewise.
834 (building_stmt_tree): New macro.
835 * decl.c (start_function): Use building_stmt_tree, not
836 processing_template_decl, where appropriate.
837 (store_parm_decls): Likewise.
838 (store_return_init): Move most of the body to semantics.c.
839 (finish_function): Use building_stmt_tree.
840 (finish_stmt): Clear last_expr_type here.
841 (cp_function): Add expanding_p, last_tree, last_expr_type.
842 (push_cp_function_context): Save them.
843 (pop_cp_function_context): Restore them.
844 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
845 * error.c (dump_expr): Handle STMT_EXPR.
846 * except.c (expand_start_catch_block): Use building_stmt_tree.
847 Use add_decl_stmt.
848 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
849 (do_case): Move add_tree call to semantics.c.
850 * parse.y (return_init): Use finish_named_return_value.
851 (for.init.statement): Use finish_expr_stmt.
852 * parse.c: Regenerated.
853 * pt.c (do_pushlevel): Move to semantics.c.
854 (do_poplevel): Likewise.
855 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
856 (tsubst_expr): Don't expand all the way to RTL here. Handle
857 RETURN_INIT and CTOR_INITIALIZER.
858 (instantiate_decl): Call expand_body after tsubst'ing into
859 DECL_SAVED_TREE.
860 * semantics.c (expand_stmts): New function.
861 (expanding_p): New variable.
862 (last_expr_type): Likewise.
863 (finish_expr_stmt): Use building_stmt_tree.
864 (begin_if_stmt): Likewise.
865 (finish_if_stmt_cond): Likewise.
866 (finish_then_clause): Likewise.
867 (begin_else_clause): Likewise.
868 (finish_else_clause): Likewise.
869 (begin_while_stmt): Likewise.
870 (finish_while_stmt_cond): Likewise.
871 (finish_while_stmt): Likewise.
872 (finish_do_body): Likewise.
873 (finish_do_stmt): Likewise.
874 (finish_return_stmt): Likewise.
875 (begin_for_stmt): Likewise.
876 (fnish_for_init_stmt): Likewise.
877 (finish_for_cond): Likewise.
878 (finish_for_expr): Likewise.
879 (finish_for_stmt): Likewise.
880 (finish_break_stmt): Likewise.
881 (finish_continue_stmt): Likewise.
882 (finish_switch_cond): Likewise.
883 (finish_switch_stmt): Likewise.
884 (finish_case_label): Call add_tree here if necessary.
885 (finish_goto_statement): Use building_stmt_tree.
886 (begin_try_block): Likewise.
887 (begin_function_try_block): Likewise.
888 (finish_try_block): Likewise.
889 (finish_function_try_block): Likewise.
890 (finish_handler_sequence): Likewise.
891 (finish_function_handler_sequence): Likewise.
892 (begin_handler): Likewise.
893 (finish_handler_parms): Likewise.
894 (finish_handler): Likewise.
895 (begin_compound_stmt): Likewise.
896 (finish_compound_stmt): Likewise.
897 (finish_asm_stmt): Likewise.
898 (finish_label_stmt): Likewise.
899 (finish_named_return_value): New function.
900 (setup_vtbl_ptr): Moved here from decl2.c.
901 (do_pushlevel): Moved here from pt.c.
902 (do_poplevel): Likewise.
903 (begin_stmt_expr): Use building_stmt_tree.
904 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
905 when building_stmt_tree.
906 (begin_stmt_tree): New function.
907 (finish_stmt_tree): Likewise.
908 (expand_stmt): Likewise.
909 (expand_body): Likewise.
910 * tree.c (build_cplus_method_type): Make sure the argument types
911 end up on the same obstack as the METHOD_TYPE.
912 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
913 THROW_EXPR, STMT_EXPR.
914 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
915 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
916 sorry, if an unsupported node is encountered.
917 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
918 (c_expand_return): Don't call add_tree here.
919
920 1999-08-15 Mark Mitchell <mark@codesourcery.com>
921
922 * pt.c (check_default_tmpl_args): Don't check in local scopes.
923 (tsubst_decl): Make sure the declaration is on a saveable
924 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
925 variable.
926 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
927
928 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
929
930 Speed up Koenig lookup.
931 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
932 to return namespaces we've looked at.
933 * decl2.c (lookup_using_namespace): Likewise.
934 (add_function): Don't call ovl_member.
935 (lookup_arg_dependent): Initialize k.namespaces to the list of
936 namespaces seen in unqualified lookup.
937 * call.c (equal_functions): Move here from tree.c.
938 (joust): Use it to handle duplicate candidates.
939 * tree.c (ovl_member): Use ==.
940
941 1999-08-13 Mark Mitchell <mark@codesourcery.com>
942
943 * cp-tree.def (DECL_STMT): Make it smaller.
944 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
945 (lang_decl): ... here. Add next.
946 (DECL_SAVED_TREE): Adjust accordingly.
947 (DECL_IMPLICIT_TYPEDEF_P): New macro.
948 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
949 (DECL_STMT_DECL): Likewise.
950 (create_implicit_typedef): New function.
951 (maybe_push_decl): Likewise.
952 (tsubst_default_argument): New function.
953 (at_function_scope_p): Likewise.
954 (add_decl_stmt): Likewise.
955 (push_permanent_obstack): Likewise.
956 * call.c (convert_default_arg): Use tsubst_default_argument.
957 * class.c (add_method): Use push_permanent_obstack.
958 (build_self_reference): Create a TEMPLATE_DECL for the
959 self-reference, if necessary.
960 * decl.c (pseudo_global_level_p): Only look at the current binding
961 level.
962 (push_binding): Use push_permanent_obstack.
963 (create_implicit_typedef): New function.
964 (pushtag): Use it.
965 (duplicate_decls): Use push_permanent_obstack.
966 (maybe_push_decl): New function.
967 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
968 (start_decl_1): Remove dead code.
969 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
970 pseudo_global_level_p.
971 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
972 template.
973 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
974 pseudo_global_level_p.
975 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
976 a template.
977 (get_sentry): Use push_permanent_obstack.
978 * dump.c (dequeue_and_dump): Enable DECL_STMT.
979 * except.c (call_eh_info): Use push_permanent_obstack.
980 (build_eh_type_ref): Likewise.
981 (do_pop_exception): Likewise.
982 (expand_eh_spec): Likewise.
983 (alloc_eh_object): Likewise.
984 (expand_throw): Likewise.
985 * init.c (build_java_class_ref): Likewise.
986 * lex.c (get_time_identifier): Likewise.
987 (free_lang_decl_chain): Correct type.
988 (retrofit_lang_decl): Adjust accordingly.
989 (build_lang_field_decl): Likewise.
990 * lex.h (free_lang_decl_chain): Likewise.
991 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
992 * parse.c: Regenerated.
993 * pt.c (tsubst_default_arguments): New function.
994 (retrieve_local_specialization): Likewise.
995 (register_local_specialization): Likewise.
996 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
997 pseudo_global_level_p to determine whether or not a template is
998 primary.
999 (lookup_template_class): Likewise. Use create_implicit_typedef.
1000 (instantiate_class_template): Call tsubst_default_arguments for
1001 member functions, if appropriate.
1002 (tsubst_default_argument): New function.
1003 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
1004 * search.c (at_function_scope_p): New function.
1005 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1006 (finish_label_stmt): Likewise.
1007 (add_decl_stmt): New function.
1008 (begin_class_definition): Likewise.
1009 (finish_typeof): Likewise.
1010 * tree.c (copy_template_template_parm): Likewise.
1011 (copy_to_permanent): Likewise.
1012 (push_permanent_obstack): Define.
1013 (mark_addressable): Use it.
1014 * typeck.c (mark_addressable): Likewise.
1015
1016 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
1017
1018 * cp-tree.h (init_cplus_unsave): New.
1019 (cplus_unsave_expr_now): New.
1020 * lex.c (init_parse): Call init_cplus_unsave.
1021 * tree.c (init_cplus_unsave): New.
1022 (cplus_unsave_expr_now): New.
1023
1024 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1025
1026 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
1027 decl_constant_value to simplify array bounds.
1028
1029 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
1030
1031 * lang-options.h: Add -fms-extensions.
1032 * cp-tree.h: Declare flag_ms_extensions.
1033 * decl2.c: Define it.
1034 * class.c (instantiate_type): Don't complain about taking the address
1035 of a bound member function if -fms-extensions.
1036 * typeck.c (build_unary_op): Likewise.
1037 * decl.c (grokdeclarator): Or about implicit int.
1038 * init.c (resolve_offset_ref): Or about implicit '&'.
1039
1040 1999-08-11 Mark Mitchell <mark@codesourcery.com>
1041
1042 * cp-tree.h (minimal_parse_mode): Remove.
1043 (finish_label_stmt): New function.
1044 * decl.c (saved_scope): Remove minimal parse mode.
1045 (maybe_push_to_top_level): Don't save it.
1046 (pop_from_top_level): Don't restore it.
1047 (define_label): Split out template-handling code to semantics.c.
1048 (start_decl): Don't use minimal_parse_mode.
1049 (cp_finish_decl): Likewise.
1050 (start_function): Don't increment it.
1051 (store_return_init): Don't use it.
1052 (finish_function): Don't decrement it.
1053 * parse.y (label_colon): Use finish_label_stmt throughout.
1054 * parse.c: Regenerated.
1055 * pt.c (minimal_parse_mode): Don't define it.
1056 (tsubst_expr): Use finish_label_stmt.
1057 * semantics.c (finish_label_stmt): New function.
1058
1059 * dump.c (queue): Be careful when computing bitmasks.
1060 (dequeue_and_dump): Describe binfos as binfos, not as
1061 vectors.
1062
1063 * parse.y (pedantic): Give it itype. Adjust usage accordingly
1064 throughout.
1065 * parse.c: Regenerated.
1066
1067 * Make-lang.in (CXX_SRCS): Remove sig.c.
1068 * Makefile.in (CXX_OBJS): Remove sig.o.
1069 (sig.o): Remove.
1070 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1071 (CPTI_SIGNATURE_TYPE): Likewise.
1072 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1073 (opaque_type_node): Likewise.
1074 (signature_type_node): Likewise.
1075 (sigtable_entry_type): Likewise.
1076 (flag_handle_signatures): Likewise.
1077 (lang_type): Remove is_signature, is_signature_pointer,
1078 is_signature_reference, has_opaque_typedecls,
1079 sigtables_has_been_generated. Adjust dummy. Remove signature,
1080 signature_pointer_to, signature_reference_to.
1081 (IS_SIGNATURE): Remove.
1082 (SET_SIGNATURE): Remove.
1083 (CLEAR_SIGNATURE): Remove.
1084 (IS_SIGNATURE_POINTER): Remove.
1085 (IS_SIGNATURE_REFERENCE): Remove.
1086 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1087 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1088 (CLASSTYPE_SIGNATURE): Remove.
1089 (SIGNATURE_TYPE): Remove.
1090 (SIGNATURE_METHOD_VEC): Remove.
1091 (SIGNATURE_POINTER_TO): Remove.
1092 (SIGNATURE_REFERENCE_TO): Remove.
1093 (lang_decl_flags): Remove is_default_implementation. Rename
1094 memfunc_pointer_to to saved_tree.
1095 (IS_DEFAULT_IMPLEMENTATION): Remove.
1096 (DECL_MEMFUNC_POINTER_TO): Remove.
1097 (DECL_MEMFUNC_POINTING_TO): Remove.
1098 (DECL_SAVED_TREE): Adjust definition.
1099 (tag_types): Remove signature_type_node.
1100 (SIGNATURE_FIELD_NAME): Remove.
1101 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1102 (SIGNATURE_OPTR_NAME): Likewise.
1103 (SIGNATURE_SPTR_NAME): Likewise.
1104 (SIGNATURE_POINTER_NAME): Likewise.
1105 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1106 (SIGNATURE_REFERENCE_NAME): Likewise.
1107 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1108 (SIGTABLE_PTR_TYPE): Likewise.
1109 (SIGTABLE_NAME_FORMAT): Likewise.
1110 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1111 (SIGTABLE_TAG_NAME): Likewise.
1112 (SIGTABLE_VB_OFF_NAME): Likewise.
1113 (SIGTABLE_VT_OFF_NAME): Likewise.
1114 (finish_base_specifiers): Change prototype.
1115 (build_signature_pointer_type): Remove.
1116 (build_signature_reference_type): Remove.
1117 (build_signature_pointer_constructor): Remove.
1118 (build_signature_method_call): Remove.
1119 (build_optr_ref): Likewise.
1120 (append_signature_fields): Likewise.
1121 (signature_error): Likewise.
1122 * call.c (build_this): Remove signature support.
1123 (build_over_call): Likewise.
1124 (build_new_method_call): Likewise.
1125 * class.c (add_implicitly_declared_members): Likewise.
1126 (finish_struct_1): Likewise.
1127 (finish_struct): Likewise.
1128 * cvt.c (cp_convert_to_pointer): Likewise.
1129 (convert_to_pointer_force): Likewise.
1130 (ocp_convert): Likewise.
1131 * decl.c (sigtable_decl_p): Remove.
1132 (init_decl_processing): Remove support for signatures.
1133 (cp_finish_decl): Likewise.
1134 (grokdeclarator): Likewise.
1135 (grokparms): Likewise.
1136 (xref_tag): Likewise.
1137 (start_function): Likewise.
1138 (start_method): Likewise.
1139 * decl2.c (finish_sigtable_vardecl): Remove.
1140 (flag_handle_signatures): Remove.
1141 (lang_f_options): Remove handle-signatures.
1142 (grokfield): Remove support for signatures.
1143 (grokbitfield): Likewise.
1144 (finish_file): Likewise.
1145 (reparse_absdcl_as_casts): Likewise.
1146 * error.c (dump_type_real): Likewise.
1147 (dump_function_decl): Likewise.
1148 * friend.c (make_friend_class): Likewise.
1149 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1150 * hash.h: Regenerated.
1151 * init.c (build_new_1): Remove support for signatures.
1152 * lang-options.h: Remove -fhandle-signatures,
1153 -fno-handle-signatures.
1154 * lex.c (init_parse): Remove support for signatures.
1155 (yyprint): Likewise.
1156 * lex.h (rid): Remove RID_SIGNATURE.
1157 * method.c (build_decl_overload_real): Remove support for
1158 signatures.
1159 (hack_identifier): Likewise.
1160 * parse.y (base_class): Likewise.
1161 (base_class.1): Likewise.
1162 (access_specifier): Likewise.
1163 * search.c (lookup_member): Likewise.
1164 * semantics.c (finish_qualified_object_call_expr): Likewise.
1165 (finish_template_type_parm): Likewise.
1166 (begin_class_definition): Likewise.
1167 (finish_base_specifier): Likewise.
1168 * sig.c: Remove.
1169 * tree.c (build_cplus_method_type): Remove support for signatures.
1170 * typeck.c (require_complete_type): Likewise.
1171 (c_sizeof): Likewise.
1172 (c_alignof): Likewise.
1173 (build_object_ref): Likewise.
1174 (build_component_ref): Likewise.
1175 (build_indirect_ref): Likewise.
1176 (build_c_cast): Likewise.
1177 (build_modify_expr): Likewise.
1178 (convert_for_initialization): Likewise.
1179 * typeck2.c (signature_error): Remove.
1180 (store_init_value): Remove support for signatures.
1181 (digest_init): Likewise.
1182 (build_x_arrow): Likewise.
1183 (build_functional_cast): Likewise.
1184 * xref.c (GNU_xref_decl): Likewise.
1185
1186 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1187
1188 * lex.c (do_identifier): Remove unnecessary lookup of class field.
1189
1190 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1191
1192 * decl2.c (set_decl_namespace): Do not complain about non-matching
1193 decls if processing a template.
1194
1195 1999-08-09 Mark Mitchell <mark@codesourcery.com>
1196
1197 * decl.c (build_ptrmemfunc_type): Handle qualified
1198 pointer-to-member types here.
1199 * tree.c (cp_build_qualified_type_real): Simplify handling here.
1200
1201 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1202
1203 * lex.c (lang_identify): Likewise.
1204
1205 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
1206
1207 * Makefile.in: Update dependencies.
1208 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
1209 NULL_RTX.
1210 * decl.c: Include "function.h"
1211 (cleanup_label, return_label): Delete declarations.
1212 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
1213 (finish_function): Rename last_parm_insn variable to
1214 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
1215 * decl2.c: Include "function.h".
1216 (rtl_expr_chain): Delete declaration.
1217 * method.c: Include "function.h"
1218 * tree.c (build_vbase_pointer_fields): Don't initialize
1219 DECL_SAVED_INSNS with NULL_RTX.
1220 * typeck.c: Include "function.h"
1221
1222 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
1223
1224 * semantics.c (begin_function_try_block, finish_function_try_block,
1225 finish_function_handler_sequence): New fns.
1226 * parse.y (function_try_block): Use them.
1227 * pt.c (instantiate_decl): Likewise.
1228
1229 * cp-tree.h: Declare in_function_try_handler.
1230 * decl.c: Define it.
1231 (start_function): Clear it.
1232 (struct cp_function, push_cp_function_context): Save it.
1233 (pop_cp_function_context): Restore it.
1234 * parse.y (function_try_block): Set and clear it.
1235 * except.c (expand_end_catch_block): Rethrow if we reach the end
1236 of a function-try-block handler in a ctor or dtor.
1237 * typeck.c (c_expand_return): Complain about returning from a
1238 function-try-block handler of a ctor.
1239
1240 * parse.y (function_try_block): Call end_protect_partials
1241 before expand_start_all_catch.
1242
1243 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
1244
1245 * decl.c (struct binding_level): Add eh_region field.
1246 (push_binding_level): Set it.
1247 (define_label): Complain about jumping into an EH block.
1248
1249 * ptree.c (print_lang_type): Print the real type of a PMF.
1250 Print what exceptions a fn type throws.
1251
1252 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1253
1254 * class.c (count_fields, add_fields_to_vec): Add static prototype.
1255
1256 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
1257 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
1258 char*.
1259
1260 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
1261 Constify a char*.
1262
1263 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
1264 char*.
1265
1266 * dump.c (queue_and_dump_index, dump_int, dump_string,
1267 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
1268 a char*.
1269 (dump_stmt): Add static prototype.
1270
1271 * errfn.c (cp_thing): Constify a char*.
1272
1273 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
1274 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
1275 dump_expr): Constify a char*.
1276
1277 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
1278 read_line_number): Add static prototype.
1279 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
1280 (real_yylex): Move label `letter' into the scope where it is used.
1281
1282 * method.c (build_mangled_template_parm_index, build_overload_int,
1283 build_decl_overload_real, get_id_2): Constify a char*.
1284
1285 * search.c (check_final_overrider): Make static.
1286
1287 * typeck.c (composite_pointer_type): Constify a char*.
1288
1289 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1290
1291 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
1292 we're looking at a class.
1293
1294 * decl.c (lookup_name_real): Set the complain flag if we're
1295 looking for a namespace member.
1296
1297 * lex.c (real_yylex): We can have a number with no digits.
1298
1299 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
1300
1301 * search.c (binfo_from_vbase): New fn.
1302 * cp-tree.h: Declare it.
1303 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
1304 from pointer to member of virtual base.
1305 * typeck.c (get_delta_difference): Likewise.
1306
1307 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
1308
1309 * pt.c (tsubst): Use build_index_type to build in-template array
1310 index type. Fixes g++.oliva/dwarf1.C.
1311 * decl.c (grokdeclarator): Likewise, just for consistency, as it
1312 doesn't seem to trigger the bug without it.
1313
1314 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1315
1316 * typeck2.c (add_exception_specifier): Use complete_type.
1317
1318 1999-08-06 Mark Mitchell <mark@codesourcery.com>
1319
1320 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
1321 (dump_binary_op): Bulletproof.
1322 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
1323 * tree.c (search_tree): Don't enumerate all the nodes of classes
1324 `1', `2', and `<'; handle them generically. Don't be sorry about
1325 "unrecognized tree codes"; just abort.
1326 (no_linkage_check): Don't do linkage checks for templates.
1327
1328 * tree.c (cp_build_qualified_type_real): Handle
1329 pointer-to-member-function types correctly.
1330
1331 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
1332
1333 * decl.c (pushdecl): Only give an error for shadowing a parm
1334 from *this* function.
1335
1336 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
1337
1338 * typeck2.c: Update URLs and mail addresses.
1339
1340 1999-08-04 Nathan Sidwell <nathan@acm.org>
1341
1342 * cp-tree.h (empty_except_spec): New global var.
1343 (compexcepttypes): Remove prototype.
1344 (comp_except_specs): Prototype new global function.
1345 (add_exception_specifier): Prototype new global function.
1346 * decl.c (empty_except_spec): Define new global var.
1347 (duplicate_decls): Use comp_except_specs, reword error message.
1348 (init_decl_processing): Initialize empty_except_spec.
1349 Adjust build_exception_variant calls.
1350 * parse.y (exception_specification_opt): Use empty_except_spec.
1351 (ansi_raise_identifier): Call check_for_new_type.
1352 (ansi_raise_identifiers): Use add_exception_specifier.
1353 * pt.c (tsubst): Use add_exception_specifier to build exception
1354 specifier.
1355 * search.c (check_final_overrider): New static function, broken
1356 out of get_matching_virtual. Check throw specifiers, reword
1357 diagnostics.
1358 (get_matching_virtual): Use check_final_overrider.
1359 * tree.c (build_exception_variant): Use comp_except_specs.
1360 * typeck.c (compexcepttypes): Remove.
1361 (comp_except_types): New static function, helper for
1362 comp_except_specs. Compare two types as exception specifiers.
1363 (comp_except_specs): New global function, compare two exception
1364 specifiers.
1365 (comptypes): Adjust for comp_except_specs.
1366 * typeck2.c (add_exception_specifier): New global function.
1367
1368 * class.c (check_for_override): Reword error message.
1369
1370 1999-08-03 Nathan Sidwell <nathan@acm.org>
1371
1372 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
1373 * cp-tree.h (struct lang_type): Added non_pod_class flag.
1374 (CLASSTYPE_NON_POD_P): New macro to access it.
1375 * class.c (finish_struct_1): Determine non-PODness.
1376 Check for arrays of pointers (-Weffc++).
1377 Remove array inspection duplicated code.
1378 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
1379 Use CLASSTYPE_NON_POD_P.
1380
1381 1999-08-03 Nathan Sidwell <nathan@acm.org>
1382
1383 * class.c (duplicate_tag_error): Preserve template information.
1384
1385 1999-08-03 Nathan Sidwell <nathan@acm.org>
1386
1387 * decl.c (start_enum): Show location of previous definition.
1388 * parse.y (enumlist_opt): New reduction.
1389 (structsp): Simplify enum rules to use enumlist_opt.
1390
1391 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
1392
1393 * lex.c (yyprint): Handle PFUNCNAME.
1394
1395 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1396 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1397
1398 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
1399
1400 * decl.c (start_decl): Set attributes before duplicate_decls call.
1401
1402 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1403
1404 * Make-lang.in (CXX_SRCS): Add dump.c.
1405 * Makefile.in (CXX_OBJS): Add dump.o.
1406 (dump.o): New target.
1407 * cp-tree.h (DECL_CONV_FN_P): Document.
1408 (DECL_OVERLOADED_OPERATOR_P): New function.
1409 (TYPE_PTRMEM_CLASS_TYPE): New macro.
1410 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1411 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1412 (ASM_VOLATILE_P): New macro.
1413 (STMT_LINENO): Likewise.
1414 (cp_namespace_decls): New function.
1415 (dump_node_to_file): New function.
1416 * decl.c (cp_namespace_decls): New function.
1417 (walk_namespaces_r): Use it.
1418 (wrapup_globals_for_namespace): Likewise.
1419 * decl2.c (flag_dump_translation_unit): New variable.
1420 (lang_decode_option): Handle -fdump-translation-unit.
1421 (finish_file): If flag_dump_translation_unit is set, dump the
1422 translation unit.
1423 * dump.c: New file.
1424 * lang-options.h: Add -fdump-translation-unit.
1425 * pt.c (tsubst_template_parms): Robustify.
1426 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1427 (tsubst_expr): Use STMT_LINENO.
1428 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
1429 for invalid cv-qualifiers even while building templates.
1430
1431 1999-08-02 Richard Henderson <rth@cygnus.com>
1432
1433 * call.c: Include defaults.h instead of expr.h.
1434 * decl.c: Likewise.
1435 * pt.c: Likewise.
1436 * typeck.c: Include defaults.h.
1437
1438 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1439
1440 * lex.c (errorcount, sorrycount): Don't declare.
1441 * repo.c (errorcount, sorrycount): Likewise.
1442 * typeck2.c (errorcount, sorrycount): Likewise.
1443
1444 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
1445
1446 * call.c (convert_default_arg, build_over_call): Change all uses of
1447 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1448 Ensure expr.h is included.
1449 * decl.c (grokparams): Ditto.
1450 * pt.c (tsubst_decl): Ditto.
1451 * typeck.c (convert_arguments): Ditto.
1452
1453 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
1454
1455 * class.c (mark_overriders): Fix order of args to overrides.
1456 (warn_hidden): Likewise. Fix for having virtual and non-virtual
1457 functions with the same name.
1458
1459 1999-08-02 Richard Henderson <rth@cygnus.com>
1460
1461 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1462
1463 1999-08-01 Mark Mitchell <mark@codesourcery.com>
1464
1465 * call.c (build_conditional_expr): Fix typo in comment.
1466
1467 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
1468
1469 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1470 case_stack; use in_control_zone_p.
1471 * typeck.c (c_expand_return): Likewise.
1472
1473 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
1474
1475 * except.c (catch_clauses): Delete declaration.
1476
1477 1999-07-30 Mark Mitchell <mark@codesourcery.com>
1478
1479 * call.c (build_conditional_expr): Call convert_from_reference to
1480 avoid reference/non-reference type confusion. Fix typo.
1481
1482 1999-07-30 Richard Henderson <rth@cygnus.com>
1483
1484 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1485 * cp-tree.h (initializer_constant_valid_p): Remove.
1486
1487 1999-07-28 Mark Mitchell <mark@codesourcery.com>
1488
1489 * call.c (conditional_conversion): Don't build BASE_CONVs for
1490 conversions between things that have the same type.
1491 (build_conditional_expr): Tweak.
1492 (convert_like): Some BASE_CONVs really do require the generation
1493 of code.
1494
1495 * init.c (perform_member_init): Don't go through build_modify_expr
1496 for simple initializations.
1497
1498 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
1499
1500 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1501 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1502 virtual functions and MI. Simplify.
1503
1504 * method.c: Remove prototype for largest_union_member.
1505 * pt.c (determine_specialization): Fix uninitialized warning.
1506 * lex.c (real_yylex): Likewise.
1507
1508 1999-07-27 Mark Mitchell <mark@codesourcery.com>
1509
1510 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1511 here too.
1512
1513 * cp-tree.h (BINFO_VIRTUALS): Document new format.
1514 * class.c (modify_one_vtable): Change prototype accordingly.
1515 (modify_all_vtables): Likewise.
1516 (modify_all_direct_vtables): Likewise.
1517 (modify_all_indirect_vtables): Likewise.
1518 (build_vtable_entry_for_fn): New function.
1519 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1520 (modify_vtable_entry): Likewise.
1521 (add_virtual_function): Likewise.
1522 (build_vtbl_initializer): New function.
1523 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1524 (fixup_vtable_deltas1): Likewise.
1525 (fixup_vtable_deltas): Likewise.
1526 (override_one_vtable): Likewise.
1527 (finish_struct_1): Likewise.
1528
1529 * error.c (dump_expr): Likewise.
1530 * search.c (get_abstract_virtuals_1): Likewise.
1531 (get_abstract_virtuals): Likewise.
1532 (expand_upcast_fixups): Likewise.
1533 * tree.c (debug_binfo): Likewise.
1534 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1535 __pure_virtual here.
1536
1537 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1538
1539 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1540 as per 1999-07-26 change.
1541
1542 * typeck.c (c_sizeof): Don't allow non-static data members.
1543 (expr_sizeof): Likewise.
1544
1545 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
1546
1547 * input.c (feed_input): Only touch lineno and input_filename
1548 if !USE_CPPLIB. Save the old values before setting the new ones.
1549
1550 * input.c (feed_input): Add file, line parms.
1551 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1552 (real_yylex): Check linemode before input_redirected().
1553
1554 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1555 from op new to warning.
1556
1557 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1558
1559 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1560 * call.c: All uses changed.
1561 * typeck.c: Likewise.
1562
1563 1999-07-26 Nathan Sidwell <nathan@acm.org>
1564
1565 * exception.cc (__cplus_type_matcher): Match __eh_matcher
1566 prototype.
1567
1568 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1569
1570 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1571 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1572 (strip_top_quals): Declare.
1573 (ncp_convert): Likewise.
1574 (type_after_usual_arithmetic_converions): Likewise.
1575 (composite_pointer_type): Likewise.
1576 * call.c (strip_top_quals): Don't make it static.
1577 (promoted_arithmetic_type_p): New function.
1578 (conditional_conversion): Likewise.
1579 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1580 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
1581 for converting a type to itself.
1582 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1583 (implicit_conversion): Make sure the from and to types are
1584 complete.
1585 (add_builtin_candidate): Correct handling of ?: operator.
1586 (add_builtin_candidates): Improve documentation.
1587 (build_conditional_expr): New function.
1588 (can_convert): Implement in terms of can_convert_arg.
1589 (ncp_convert): New function.
1590 * typeck.c (type_after_usual_arithmetic_conversions): New
1591 function, split out from common_type.
1592 (composite_pointer_type): New function, split out from
1593 build_conditional_expr.
1594 (common_type): Use type_after_usual_arithmetic_conversions.
1595 Remove redundant attribute merging.
1596 (comptypes): Tidy. Handle COMPLEX_TYPE.
1597 (build_binary_op_nodefault): Use null_ptr_cst_p.
1598 (build_conditional_expr): Remove.
1599 (convert_for_assignment): Use new conversion functions.
1600
1601 * cp-tree.h (abstract_virtuals_error): Change declaration.
1602 * typeck2.c (abstract_virtuals_error): Check to see if an error
1603 ocurred, and return a boolean value accordingly.
1604 (build_functional_cast): Adjust accordingly.
1605 * class.c (finish_struct_1): Likewise.
1606 * cvt.c (ocp_convert): Likewise.
1607 * decl.c (cp_finish_decl): Likewise.
1608 (grokparams): Likewise.
1609 (grok_op_properties): Likewise.
1610 (start_function): Likewise.
1611 * init.c (build_new_1): Likewise.
1612
1613 * pt.c (unify): Don't get confused by pointers-to-member functions.
1614
1615 * search.c (build_cplus_new): Robustify.
1616
1617 1999-07-24 Richard Henderson <rth@cygnus.com>
1618
1619 * gxx.gperf (__builtin_va_arg): New.
1620 * parse.y (VA_ARG): New token.
1621 (unary_expr): Recognize it.
1622
1623 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
1624
1625 * g++FAQ.texi: Deleted per Joe Buck's request.
1626 * Makefile.in: Corresponding changes.
1627
1628 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
1629
1630 * lex.c: Sync with C frontend.
1631 (whitespace_cr): New fn.
1632 (skip_white_space): Use it.
1633 (init_parse): Reorder.
1634 (yyprint): Support CONSTANT.
1635 (pragma_getc, pragma_ungetc): Bring back.
1636 (read_line_number): Change in_system_header directly.
1637 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1638 (parse_float): Update to C version.
1639 (yylex): Handle '$' under the letter case.
1640 Remove looking_for_typename handling.
1641 Support hex floating point constants.
1642 Follow C's lead for choosing type of integer constants.
1643 Rearrange stuff to match C frontend.
1644 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1645 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1646
1647 1999-07-23 Mark Mitchell <mark@codesourcery.com>
1648
1649 * call.c (reference_binding): Tweak.
1650 (mayble_handle_implicit_object): Use direct_reference_binding to
1651 create the right implicit conversion sequence.
1652
1653 1999-07-22 Mark Mitchell <mark@codesourcery.com>
1654
1655 * pt.c (convert_nontype_argument): Don't call decl_constant_value
1656 if we're converting to a reference type.
1657
1658 * call.c (NEED_TEMPORARY_P): New macro.
1659 (standard_conversion): Set it, for derived-to-base conversions.
1660 (reference_related_p): New function.
1661 (reference_compatible_p): Likewise.
1662 (convert_class_to_reference): Likewise.
1663 (direct_reference_binding): Likewise.
1664 (reference_binding): Rework for standards-compliance.
1665 (convert_like): Adjust accordingly.
1666 (maybe_handle_ref_bind): Simplify; the right conversion sequences
1667 are now built up in reference_binding.
1668 (initialize_reference): New function.
1669 * cp-tree.h (ICS_USER_FLAG): Document.
1670 (ICS_THIS_FLAG): Likewise.
1671 (ICS_BAD_FLAG): Likewise.
1672 (NEED_TEMPORARY_P): Likewise.
1673 (cp_lvalue_kind): New type.
1674 (real_lvalue_p): Return it.
1675 * error.c (dump_expr): Provide more accurate representation for
1676 AGGR_INIT_EXPRs.
1677 * init.c (expand_default_init): Do not try to perform implicit
1678 conversions for a brace-enclosed initializer.
1679 * search.c (lookup_conversions): Document.
1680 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
1681 appropriately.
1682 (real_lvalue_p): Adjust accordingly.
1683 (lvalue_p): Likewise.
1684 (build_cplus_new): Don't allow the creation of an abstract class.
1685 * typeck.c (convert_for_initialization): Use initialize_reference.
1686
1687 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
1688
1689 * lex.c (real_yylex) : Correct the test for overflow when lexing
1690 integer literals.
1691
1692 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
1693
1694 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1695 not DECL_BUILT_IN, to determine if a function is internally declared.
1696 (duplicate_decls): Likewise. Improve handling of builtins.
1697 (push_overloaded_decl): Remove special handling of builtins.
1698
1699 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1700
1701 * decl.c (grokdeclarator): Pull out decl_constant_value in
1702 templates, too.
1703
1704 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1705 * cp-tree.h, pt.c, semantics.c: Adjust.
1706 * method.c (largest_union_member): Remove.
1707
1708 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1709
1710 * lex.c (token_getch, token_put_back): New fns.
1711 (real_yylex): Use them.
1712
1713 * lex.c (lang_init): Generalize.
1714 (lang_init_options): Tell cpplib this is C++.
1715 (nextchar): Remove. Replace uses with put_back.
1716 (skip_white_space): Handle linemode here. Optimize for cpplib.
1717 (extend_token_buffer_to): New fn.
1718 (extend_token_buffer): Use it.
1719 (read_line_number, check_newline): Just deal with tokens.
1720 (real_yylex): More cpplib optimizations. Simplify. Don't produce
1721 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1722 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1723 * parse.y (PAREN_STAR_PAREN): Remove.
1724 * input.c: Don't use the putback machinery with cpplib.
1725 (sub_getch): Fold back into getch.
1726 (getch): Don't handle linemode here.
1727 (feed_input): Unget any text in the token buffer.
1728
1729 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1730 nextyychar, nextyylval): Remove.
1731
1732 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
1733 Jason Merrill <jason@yorick.cygnus.com>
1734
1735 * lex.c (indent_level): New variable.
1736 (init_parse): Set cpp_token to CPP_DIRECTIVE.
1737 (consume_string): Make this smart about USE_CPPLIB.
1738 (yyungetc): Use put_back function.
1739 (pragma_getc, pragma_ungetc): Functions deleted.
1740 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1741 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1742 pragma_ungetc.
1743 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1744 Also, clean up cases where we redundantly set token_buffer[0].
1745 (read_line_number): New fn.
1746 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1747 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1748 (sub_getch): Conditionalize out code that's not appropriate if
1749 USE_CPPLIB.
1750 (put_back): Rewrite in case USE_CPPLIB is defined.
1751 (input_redirected): Ditto.
1752
1753 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1754
1755 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
1756 c_global_trees and accessor macros defined in c-common.h.
1757 (cp_tree_index): New enumeration.
1758 (cp_global_trees): Declare new array. Add accessor macros for it, and
1759 delete declarations of tree nodes replaced by it.
1760 (builtin_function): Delete macro, add declaration for new function.
1761 Include c-common.h.
1762 * decl.c: Delete definitions for tree nodes that were replaced by
1763 cp_global_trees and c_global_trees.
1764 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
1765 to generate the common builtins here.
1766 (builtin_function): New function.
1767 * decl2.c (abort_fndecl): Delete declaration.
1768 * except.c (expand_builtin_return_address): Delete declaration.
1769 (builtin_return_address_fndecl): Delete variable.
1770 (const_ptr_type_node): Delete declaration.
1771 * lex.c (cons_up_default_function): Delete declaration of
1772 void_list_node.
1773 * parse.y (void_list_node): Delete declaration.
1774 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
1775 Delete variables.
1776 (const_string_type_node): Delete declaration.
1777 * search.c (abort_fndecl): Delete declaration.
1778 * Makefile.in: Update dependencies.
1779
1780 1999-07-19 Mark Mitchell <mark@codesourcery.com>
1781
1782 * pt.c (check_default_tmpl_args): Move test for missing default
1783 arguments here, from ...
1784 (end_template_parm_list): Here.
1785
1786 1999-07-18 Mark Mitchell <mark@codesourcery.com>
1787
1788 * decl.c (lookup_nested_type): Remove.
1789 (pushtag): Don't call it.
1790
1791 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
1792
1793 * Makefile.in (INTERFACE): Bump to 2.
1794
1795 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
1796
1797 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
1798 instructions to gcc.gnu.org. Removed e-mail address.
1799
1800 1999-07-17 Mark Mitchell <mark@codesourcery.com>
1801
1802 * pt.c (determine_specialization): Tighten error-checking.
1803 (end_template_parm_list): Likewise.
1804
1805 1999-07-14 Mark Mitchell <mark@codesourcery.com>
1806
1807 * pt.c (check_default_tmpl_args): Handle friends defined in the
1808 class just like member functions defined in the class.
1809
1810 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1811 Jason Merrill <jason@yorick.cygnus.com>
1812
1813 * cp-tree.h (struct lang_decl): Added field for storing sorted
1814 FIELD_DECLs (used in TYPE_DECLs).
1815 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
1816 (DECL_SORTED_FIELDS): New macro.
1817 * class.c (method_name_cmp): New function.
1818 (finish_struct_methods): Modified to support sorting and searching
1819 methods.
1820 (finish_struct_anon): Changed code in inner loop to use ELT rather
1821 than UELT (which required an extra indirection for every reference).
1822 (field_decl_cmp): New function to support sorting FIELD_DECLs.
1823 (finish_struct_1): Sort fields.
1824 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
1825 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
1826 Also, switch to using array indexing rather than a changing pointer.
1827 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
1828 DECL_SORTED_FIELDS.
1829
1830 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
1831
1832 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
1833 casts in system headers or extern "C" blocks.
1834
1835 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
1836 errors to pedwarn.
1837
1838 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
1839
1840 * decl2.c (write_virtuals): Deleted declaration.
1841 * cp-tree.h (write_virtuals): Deleted extern declaration.
1842 * class.c (finish_struct_1): Removed #if 0'd code that mentions
1843 write_virtuals.
1844 * semantics.c (begin_class_definition): Rewrite code to not depend
1845 on write_virtuals.
1846
1847 * lex.c (cp_pragma_interface): New function.
1848 (cp_pragma_implementation): Likewise.
1849 (handle_cp_pragma): Call them.
1850
1851 * typeck.c (comptypes): Simplify C code in look_hard.
1852
1853 * xref.c (PALLOC): Use xcalloc, not calloc.
1854 (SALLOC): Use xmalloc, not malloc.
1855
1856 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
1857
1858 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
1859 is NO_DEBUG.
1860
1861 * decl.c (duplicate_decls): If a redeclaration doesn't match the
1862 initial declaration, then don't save the inline info and by all
1863 means don't mark the function as a builtin function.
1864
1865 * decl.c (lookup_name_real): Set NONCLASS to 1 if
1866 CURRENT_CLASS_TYPE is 0.
1867
1868 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
1869 NULL_TREE.
1870
1871 * ptree.c (print_lang_type): Added vtable-needs-writing.
1872
1873 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
1874
1875 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
1876
1877 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
1878
1879 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1880 Merged into c-common.
1881
1882 1999-07-05 Dave Brolley <brolley@cygnus.com>
1883
1884 * lex.c (errorcount): Declare it.
1885 (finish_parse): Update errorcount for when using CPPLIB.
1886
1887 1999-07-05 Mark Mitchell <mark@codesourcery.com>
1888
1889 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
1890 parameters.
1891 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
1892 * decl.c (push_class_binding): Use it.
1893 (lookup_name_real): Likewise.
1894
1895 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
1896
1897 * cp-tree.h (widest_integer_literal_type_node,
1898 widest_unsigned_literal_type) : New.
1899 * decl.c (widest_integer_literal_type_node,
1900 widest_unsigned_literal_type) : New.
1901 (init_decl_processing): Handle/use the two new types.
1902 * lex.c (real_yylex): Same.
1903 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
1904 Same.
1905
1906 1999-07-01 Mark Mitchell <mark@codesourcery.com>
1907
1908 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
1909 to anonymous cv-qualified types.
1910
1911 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
1912
1913 * lex.c (real_yylex) : Change integer literal overflow handling to
1914 be like c-lex.c.
1915
1916 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
1917
1918 1999-06-28 Richard Henderson <rth@cygnus.com>
1919
1920 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
1921
1922 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
1923
1924 * error.c (dump_type_real): Handle TREE_LIST again.
1925
1926 * typeck.c (comp_target_parms): Don't complain about
1927 converting from () to (...) if !flag_strict_prototype.
1928
1929 * decl.c (grokdeclarator): Update the names of all variants when
1930 de-anonymizing.
1931
1932 1999-06-21 Mark Mitchell <mark@codesourcery.com>
1933
1934 * init.c (expand_aggr_vbase_init): Rename to
1935 construct_virtual_bases. Conditionalize construction here,
1936 rather than ...
1937 (emit_base_init): Here.
1938
1939 1999-06-19 Mark Mitchell <mark@codesourcery.com>
1940
1941 * semantics.c (finish_asm_statement): Apply decay conversions to
1942 input operands.
1943
1944 * decl.c (expand_static_init): When building an anonymous function
1945 for use with atexit, compute its body before and after entering
1946 the function.
1947
1948 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
1949 EXIT_EXPR.
1950
1951 1999-06-18 Mark Mitchell <mark@codesourcery.com>
1952
1953 * init.c (expand_aggr_vbase_init): Add flag parameter.
1954 (build_partial_cleanup_for): Remove, inlining into ..
1955 (expand_cleanup_for_base): ... here. Take flag parameter.
1956 (emit_base_init): Pass the in_chrg parameter to
1957 emit_aggr_vbase_init.
1958 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
1959
1960 1999-06-16 Mark Mitchell <mark@codesourcery.com>
1961
1962 * decl2.c (import_export_decl): Use same_type_p, rather than
1963 relying on pointer-equality for types.
1964
1965 * method.c (do_build_copy_constructor): Simplify.
1966
1967 * call.c (build_method_call): Remove bogus code for two-argument
1968 delete.
1969 * init.c (build_new_1): Expand on comment, and remove dead code.
1970
1971 * init.c (expand_cleanup_for_base): New function, split out
1972 from ...
1973 (emit_base_init): Here.
1974 (expand_aggr_vbase_init): Use it.
1975
1976 1999-06-15 Mark Mitchell <mark@codesourcery.com>
1977
1978 * cp-tree.h (class_cache_firstobj): Declare.
1979 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1980 * class.c (permanent_obstack): Remove declaration.
1981 (class_cache_firstobj): Make it global.
1982 (add_method): Don't use permanent_obstack directly.
1983 (pushclass): Only free the class_cache_obstack if we know how far
1984 back to free it.
1985 (maybe_push_cache_obstack): Rename to push_cache_obstack.
1986 * decl.c: Remove dead comment.
1987 (saved_scope): Add class_cache_firstobj.
1988 (push_to_top_level): Save it.
1989 (pop_from_top_level): Restore it.
1990 (push_class_level_binding): Use push_cache_obstack, not
1991 maybe_push_cache_obstack.
1992 * search.c (push_class_decls): Likewise.
1993
1994 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
1995
1996 * pt.c (tsubst_friend_function): Push into namespace of friend
1997 function before pushdecl'ing it.
1998
1999 1999-06-14 Nathan Sidwell <nathan@acm.org>
2000
2001 * call.c (build_new_op): Remove REF_BIND from all operands.
2002
2003 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
2004
2005 * init.c (build_new_1): Look up operator delete even if there was
2006 no explicit new placement.
2007
2008 1999-06-08 Nathan Sidwell <nathan@acm.org>
2009
2010 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2011 of ...
2012 (build_throw): ... here. Call it.
2013 (process_start_catch_block): Call it.
2014
2015 1999-06-07 Mark Mitchell <mark@codesourcery.com>
2016
2017 * search.c (convert_pointer_to_single_level): Reimplement without
2018 using get_binfo.
2019
2020 1999-06-06 Mark Mitchell <mark@codesourcery.com>
2021
2022 * method.c (is_back_referenceable_type): Back-reference bools when
2023 not squangling.
2024
2025 1999-06-07 Dave Brolley <brolley@cygnus.com>
2026
2027 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2028 * input.c (putback_buffer): New structure type.
2029 (putback): Replaces putback_char member.
2030 (putback): Replaces putback_char static variable.
2031 (feed_input): Use putback.
2032 (end_input): Use putback.
2033 (sub_getch): Use putback.
2034 (put_back): Use putback.
2035
2036 1999-06-05 Mark Mitchell <mark@codesourcery.com>
2037
2038 * decl.c (grokdeclarator): Fix typo in last change.
2039
2040 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
2041
2042 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2043 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2044
2045 1999-06-04 Nathan Sidwell <nathan@acm.org>
2046
2047 * except.c (build_throw): Check throw expression validity.
2048
2049 1999-06-03 Mark Mitchell <mark@codesourcery.com>
2050
2051 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2052 just because flag_signed_bitfields is false.
2053
2054 1999-06-03 Nathan Sidwell <nathan@acm.org>
2055
2056 * semantics.c (begin_class_definition): Update the struct's
2057 location here ...
2058 * class.c (finish_struct): ... rather than here.
2059
2060 * decl.c (make_typename_type): Don't rely on uninitialized
2061 variable.
2062
2063 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2064
2065 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2066
2067 1999-05-31 Mark Mitchell <mark@codesourcery.com>
2068
2069 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2070 and friends rather than messing with current_obstack directly.
2071 (cp_build_qualified_type_real): Rework ARRAY_TYPE
2072 allocation to match practice throughout the rest of the
2073 compiler.
2074
2075 1999-05-30 Mark Mitchell <mark@codesourcery.com>
2076
2077 * lex.c (make_lang_type): Create TYPE_BINFO for
2078 TEMPLATE_TYPE_PARMs just like for non-template types.
2079
2080 * decl.c (start_decl): Move checks on initialization to ...
2081 (cp_finish_decl): Here. Tidy formatting slightly.
2082
2083 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2084
2085 * decl.c (add_binding): Don't complain about a redeclaration of a
2086 semantically identical typedef in a local scope.
2087
2088 1999-05-28 Nathan Sidwell <nathan@acm.org>
2089
2090 * decl.c (complete_array_type): Allocate off same obstack. Fix
2091 DO_DEFAULT comment to match reality.
2092
2093 * friend.c (make_friend_class): Fix diagnostic typo.
2094
2095 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2096
2097 * decl.c (lookup_namespace_name): Handle getting a
2098 TEMPLATE_ID_EXPR.
2099 (expand_static_init): Don't call pushdecl for implicitly declared
2100 `atexit' used to register destructors.
2101
2102 1999-05-25 Mark Mitchell <mark@codesourcery.com>
2103
2104 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2105 intialize a vtable.
2106
2107 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2108 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
2109 by combining TEMPLATE_INFO and LEVEL into a single union.
2110 (DECL_TEMPLATE_INFO): Reformat.
2111 (DECL_SAVED_TREE): Document.
2112 (DECL_TEMPLATE_INJECT): Remove.
2113 * class.c (finish_struct): Remove code to deal with
2114 DECL_TEMPLATE_INJECT.
2115
2116 * decl.c (maybe_process_template_type_declaration): Handle all new
2117 types in templates uniformly.
2118 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2119 DECL_CONTEXT.
2120 * pt.c (lookup_template_class): Inject template instantiations of
2121 forward-declarations.
2122 (instantiate_class_template): Remove code processing
2123 DECL_TEMPLATE_INJECT.
2124
2125 * pt.c (lookup_template_class): Tweak lookup to find member
2126 templates.
2127
2128 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2129 ASM_CV_QUAL.
2130 * semantics.c (finish_asm_stmt): Make strings permanent if they're
2131 used in a template.
2132
2133 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
2134
2135 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2136 parts of pointer to data member types.
2137
2138 1999-05-24 Mark Mitchell <mark@codesourcery.com>
2139
2140 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2141 and then make it look like `abort'. Just use `abort' instead.
2142
2143 * typeck.c (build_static_cast): Don't allow static_casts that cast
2144 away constness.
2145 (casts_away_constness_r): New function.
2146 (casts_away_constness): Likewise.
2147
2148 * decl.c (lookup_tag): Remove code no longer needed after
2149 name-lookup improvements.
2150 * decl2.c (handle_class_head): Make error-recovery more robust.
2151 * friend.c (make_friend_class): Reject templated typename types.
2152 * lex.c (is_global): A template parameter isn't global.
2153 * parse.y (class_head): Robustify.
2154 * parse.c: Regenerated.
2155
2156 1999-05-22 Mark Mitchell <mark@codesourcery.com>
2157
2158 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2159 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
2160
2161 * cp-tree.h (push_nested_namespace): Declare.
2162 (pop_nested_namespace): Likewise.
2163 * decl.c (push_nested_namespace): New function.
2164 (pop_nested_namespace): Likewise.
2165 * pt.c (instantiate_class_template): Use them.
2166
2167 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2168
2169 * cp-tree.h (cplus_expand_constant): Declare.
2170 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2171 converted from one pointer-to-object type to another.
2172 * expr.c (cplus_expand_constant): Don't make it static.
2173 * typeck.c (build_component_ref): Don't crash when presented with
2174 a component which is a TEMPLATE_DECL.
2175 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
2176 cast from a pointer-to-member constant to its own type does not
2177 result in a valid non-type template argument.
2178
2179 1999-05-21 Mark Mitchell <mark@codesourcery.com>
2180 Nathan Sidwell <nathan@acm.org>
2181
2182 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2183 * cp-tree.h: Fix typo in documentation on pointers-to-members.
2184 (cp_build_qualified_type): Make it a macro.
2185 (cp_build_qualified_type_real): Declare.
2186 * decl.c (grokdeclarator): Remove misleading comment. Avoid
2187 problem with template parameters and restrict-qualification.
2188 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2189 * hash.h: Regenerated.
2190 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2191 the enumeration.
2192 (NORID): Remove definition.
2193 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2194 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
2195 (fn_type_unification): Check that the function type resulting from
2196 the deduction is legal.
2197 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2198 (unify): Use cp_build_qualified_type_real.
2199 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
2200 (cp_build_qualified_type): Rename to ...
2201 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
2202 and modify appropriately.
2203
2204 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
2205 reveal optimization opportunities.
2206
2207 * pt.c (tsubst): Don't issue error messages when we're not
2208 complaining, even if we see a qualified function type.
2209 (check_cv_quals_for_unify): Don't allow a qualified function
2210 type.
2211
2212 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2213
2214 * class.c (instantiate_type): Downgrade errors for object-dependent
2215 memfn refs to pedwarn.
2216
2217 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2218
2219 * decl.c (grokdeclarator): Don't treat [] as indicating a
2220 zero-sized array in a typedef.
2221
2222 * call.c (build_object_call): Don't look at DECL_NAME for a type.
2223 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
2224 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
2225
2226 * pt.c (for_each_template_parm): Rework to match documentation.
2227 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
2228
2229 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2230
2231 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
2232
2233 * class.c (finish_base_struct): Allow non-COM bases for COM classes
2234 except at the leftmost position.
2235 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
2236 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
2237 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
2238
2239 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
2240 (build_cplus_new): Make sure that what we return is of the right type.
2241
2242 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2243
2244 * cp-tree.h (make_ptrmem_cst): New function.
2245 * expr.c (cplus_expand_constant): Split out from ...
2246 (cplus_expand_expr): Here. Use cplus_expand_constant.
2247 (init_cplus_expand): Set lang_expand_constant.
2248 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
2249
2250 * tree.c (make_ptrmem_cst): Define.
2251 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
2252 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
2253
2254 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2255
2256 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
2257
2258 * decl2.c (start_static_storage_duration_function): Fix comment.
2259 (finish_file): Create static storage duration functions lazily.
2260
2261 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2262
2263 Implement anonymous structs.
2264 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
2265 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
2266 * class.c (finish_struct_1): Remove redundant check for anon struct.
2267 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
2268 (check_tag_decl): Check for anonymous struct here.
2269 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
2270 * init.c (sort_member_init, emit_base_init): Handle getting fields
2271 as well as names in current_member_init_list.
2272 (perform_member_init): Handle getting an anon aggr.
2273 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
2274 (do_build_copy_constructor): Likewise.
2275
2276 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2277
2278 * tree.c (cp_build_qualified_type): Don't allow qualified function
2279 types.
2280
2281 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
2282
2283 * gxxint.texi: Fix typo.
2284
2285 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2286
2287 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
2288 * class.c (finish_struct_1): Use CLASS_TYPE_P.
2289 * ptree.c (print_lang_type): Likewise.
2290 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
2291 IS_AGGR_TYPE_CODE.
2292 * typeck2.c (digest_init): Likewise.
2293
2294 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
2295
2296 * call.c (joust): Compare the types of the conv ops, not the
2297 target types of the conversions.
2298
2299 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
2300
2301 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
2302 was not given.
2303
2304 1999-05-17 Mark Mitchell <mark@codesourcery.com>
2305
2306 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
2307 * decl.c (grokfndecl): Don't allow inline declarations of friend
2308 template specializations, or friend template specializations with
2309 default arguments.
2310 * pt.c (tsubst): Handle substitution into array types that does
2311 not yield a fixed upper bound, even when not processing a
2312 template.
2313 (tsubst_copy): Deal with the fact that the second operand to a
2314 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
2315 * search.c (marked_pushdecls_p): Don't descend into
2316 TEMPLATE_TYPE_PARMs and the like.
2317 (unmarked_pushdecls_p): Likewise.
2318
2319 * call.c (build_over_call): Don't throw away
2320 initializations/copies of empty classes; use MODIFY_EXPR and
2321 INIT_EXPR as for non-empty classes.
2322 * class.c (finish_struct_1): Put the padding byte for an empty
2323 class on the TYPE_NONCOPIED_PARTS list for the class.
2324
2325 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2326
2327 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
2328 indicate a reference to a field that is a qualified name.
2329
2330 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
2331
2332 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
2333 ASM_OUTPUT_CONSTRUCTOR.
2334
2335 * friend.c (do_friend): Add attrlist arg. Remove support for
2336 getting a non-decl as 'decl'.
2337 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
2338 rtl.
2339 (grokdeclarator): Adjust.
2340 * cp-tree.h: Adjust.
2341
2342 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2343
2344 * cp-tree.h (permanent_p): New function.
2345 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
2346 possibly complex tree node.
2347 * tree.c (mapcar): Adjust comments, and follow coding standards in
2348 conditional.
2349 (permanent_p): New function.
2350
2351 1999-05-13 Per Bothner <bothner@cygnus.com>
2352
2353 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
2354 primitive Java types, if we actually see `extern "Java"'.
2355
2356 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2357
2358 * lang-specs.h: Pass -$ to the preprocessor.
2359
2360 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
2361
2362 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
2363 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
2364 (resolve_offset_ref): Don't handle a raw baselink.
2365 * cvt.c (build_expr_type_conversion): Likewise.
2366 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
2367 convert_for_initialization): Likewise.
2368 * class.c (instantiate_type): Handle seeing a baselink under an
2369 OFFSET_REF.
2370 * error.c (dump_expr): Likewise.
2371 * pt.c (for_each_template_parm): Likewise.
2372 (resolve_overloaded_unification): Likewise.
2373 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
2374 * typeck.c (expr_sizeof): Also complain about other permutations
2375 of overloaded functions.
2376
2377 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
2378
2379 * init.c (resolve_offset_ref): Don't return a raw method.
2380 Use BASELINK_P.
2381 * typeck.c (decay_conversion): Don't handle a raw method.
2382 Resolve all OFFSET_REFs.
2383 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
2384 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
2385 same_type_p for pmf bits. Don't use build_binary_op to compare
2386 raw pointers to methods.
2387 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2388 to decide when to call resolve_offset_ref.
2389 (build_c_cast, convert_for_initialization): Likewise.
2390 * cvt.c (build_expr_type_conversion): Likewise.
2391
2392 1999-05-06 Nathan Sidwell <nathan@acm.org>
2393
2394 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2395
2396 1999-05-05 Mark Mitchell <mark@codesourcery.com>
2397
2398 * decl2.c (start_objects): Don't let static constructors and
2399 destructors get inlined.
2400
2401 * parse.y (nested_name_specifier): Make sure ordinary types are
2402 complete, just like template types.
2403 * parse.c: Regenerated.
2404
2405 * pt.c (check_explicit_specialization): Improve error messages.
2406
2407 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
2408
2409 * typeck.c (string_conv_p): Use same_type_p to check whether we
2410 try to convert between char and wchar_t.
2411
2412 1999-05-03 Mark Mitchell <mark@codesourcery.com>
2413
2414 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2415 lookup to error_mark_node here.
2416 (lookup_member): Revise documentation. Add comments. Don't set
2417 the TREE_TYPE to error_mark_node here, and don't build up an extra
2418 TREE_LIST for ambiguous lookups.
2419 (setup_class_bindings): Adjust accordingly.
2420 (push_class_decls): Revise out-of-date comments.
2421
2422 * typeck.c (build_const_cast): Tighten checks for legality.
2423
2424 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2425
2426 * init.c (build_member_call): Lookup names coming from
2427 namespace-scoped LOOKUP_EXPR.
2428
2429 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
2430
2431 * gxxint.texi: Add documentation for 'I'.
2432
2433 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2434
2435 * tinfo.cc (operator==): Qualify type_info with std::.
2436
2437 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2438
2439 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
2440 (DECL_COMDAT): Remove definition.
2441
2442 1999-05-01 Mark Mitchell <mark@codesourcery.com>
2443
2444 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2445 change.
2446
2447 1999-04-30 Mark Mitchell <mark@codesourcery.com>
2448
2449 * class.c (build_vtable): Use build_lang_decl when building
2450 vtables, not just build_decl.
2451 (prepare_fresh_vtable): Likewise.
2452 * decl.c (wrapup_globals_for_namespace): Mark vtables as
2453 DECL_EXTERNAL when calling wrapup_global_declarations.
2454 * decl2.c (priority_info_s): Add initializations_p and
2455 destructions_p members.
2456 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2457 when deciding what vtables to write out.
2458 (ssdf_decls): New variable.
2459 (ssdf_decls_used): Likewise.
2460 (start_static_storage_duration_function): Deal with being called
2461 multiple times. Avoid inlining this function.
2462 (generate_inits_for_priority): Deal with reuse of priority map.
2463 (get_priority_info): Clear initializations_p and destructions_p.
2464 (do_static_initialization): Tweak comment.
2465 (do_static_destruction): Likewise. Fix condition on sentries for
2466 destruction.
2467 (generate_ctor_or_dtor_function): Call all of the static storage
2468 duration functions.
2469 (generate_ctor_or_dtor_function_for_priority): Check
2470 initializations_p and destructions_p to see what priorities need
2471 initialization functions.
2472 (finish_file): Rework to generate multiple static storage duration
2473 functions, rather than just one.
2474
2475 * typeck.c (build_const_cast): Tweak last change to handle
2476 templates correctly.
2477
2478 * typeck.c (build_const_cast): Disallow use of const_cast to
2479 anything but a pointer or reference type.
2480
2481 1999-04-30 Nathan Sidwell <nathan@acm.org>
2482
2483 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2484 signature type.
2485
2486 1999-04-29 Mark Mitchell <mark@codesourcery.com>
2487
2488 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2489 (finish_file): Indent comments properly.
2490
2491 1999-04-29 Richard Henderson <rth@cygnus.com>
2492
2493 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2494 (do_static_destruction): Likewise.
2495
2496 1999-04-29 Nathan Sidwell <nathan@acm.org>
2497
2498 * cp-tree.h (TYPE_NOTHROW_P): New macro.
2499 * decl2.c (delete_sanity): Warn on deleting void *.
2500 * init.c (build_new_1): Use TYPE_NOTHROW_P.
2501 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2502 throwing operator new.
2503
2504 1999-04-28 Nathan Sidwell <nathan@acm.org>
2505
2506 * cp-tree.h (build_component_addr): Remove prototype.
2507 * typeck.c (build_component_addr): Make static. Remove MSG
2508 argument.
2509 (build_component_addr): Remove MSG parameter, clean up
2510 comment.
2511 (build_x_function_call): Use cp_error.
2512 (build_unary_op): Adjust call of build_component_addr.
2513
2514 1999-04-28 Mark Mitchell <mark@codesourcery.com>
2515
2516 * pt.c (tsubst_friend_class): Check for NULL.
2517
2518 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2519
2520 * search.c (binfo_for_vtable): Initialize bfvi.var.
2521
2522 1999-04-27 Nathan Sidwell <nathan@acm.org>
2523
2524 * rtti.c (build_x_typeid): Check rtti is enabled.
2525
2526 1999-04-26 Mark Mitchell <mark@codesourcery.com>
2527
2528 * search.c (is_subobject_of_p): Make sure we're looking at the
2529 right baseclasses.
2530
2531 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
2532
2533 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2534
2535 1999-04-23 Mark Mitchell <mark@codesourcery.com>
2536
2537 * decl2.c (finish_file): Tweak handling of extern inlines so that
2538 they are not unnecessarily put out.
2539
2540 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2541 such as base classes.
2542
2543 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
2544
2545 * tree.c (build_exception_variant): Fix typo: use the chain of U,
2546 not trying V, while cycling through U.
2547
2548 1999-04-22 Mark Mitchell <mark@codesourcery.com>
2549
2550 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2551 preserves_first_arg. Enlarge dummy accordingly.
2552 (DECL_TINFO_FN_P): New macro.
2553 (SET_DECL_TINFO_FN_P): Likeiwse.
2554 (DECL_RETURNS_FIRST_ARG): Remove.
2555 (DECL_PRESERVES_THIS): Likewise.
2556 (DECL_INIT_PRIORITY): New macro.
2557 (finish_struct_1): Change prototype.
2558 (cat_namespace_levels): Remove prototype.
2559 (vtable_decl_p): New prototype.
2560 (vtype_decl_p): Likewise.
2561 (sigtable_decl_p): Likewise.
2562 (walk_globals_pred): New typedef.
2563 (walk_globals_fn): Likewise.
2564 (walk_globals): New prototype.
2565 (walk_namespaces_fn): New typedef.
2566 (walk_namespaces): New prototype.
2567 (wrapup_globals_for_namespace): Likewise.
2568 (walk_vtables): Remove prototype.
2569 (walk_sigtables): Likewise.
2570 (instantiate_pending_templates): New prototype.
2571 * class.c (finish_struct_1): Don't return a value.
2572 * decl.h (pending_statics): Remove declaration.
2573 * decl.c (walk_namespaces_r): New function.
2574 (walk_globals_r): Likewise.
2575 (vtable_decl_p): Likewise.
2576 (vtype_decl_p): Likewise.
2577 (sigtable_decl_p): Likewise.
2578 (walk_namespaces): Likewise.
2579 (walk_globals_data): New type.
2580 (walk_globals): New function.
2581 (wrapup_globals_for_namespace): Likewise.
2582 (expand_static_init): Remove assertion. Remove redundancy in
2583 conditional. Don't put static data members in static_aggregates
2584 Tidy.
2585 (finish_function): Remove redundancy in conditional. Don't set
2586 DECL_RETURNS_FIRST_ARG.
2587 (cat_namespace_levels): Remove.
2588 * decl2.c: Include splay-tree.h and varray.h.
2589 (priority_info_s): New structure.
2590 (finish_vtable_vardecl): Change prototype. Adjust for new calling
2591 conventions.
2592 (prune_vtable_vardecl): Likewise.
2593 (finish_sigtable_vardecl): Likewise.
2594 (setup_initp): Remove.
2595 (do_dtors): Remove.
2596 (do_ctors): Remove.
2597 (start_static_storage_duration_function): New function.
2598 (generate_inits_for_priority): Likewise.
2599 (finish_static_storage_duration_function): Likewise.
2600 (get_priority_info): Likewise.
2601 (do_static_initialization): Likewise.
2602 (do_static_destruction): Likewise.
2603 (do_static_initialization_and_destruction): Likewise.
2604 (generate_ctor_or_dtor_function): Likewise.
2605 (generate_ctor_and_dtor_functions_for_priority): Likewise.
2606 (pending_statics): Make it a varray.
2607 (pending_statics_used): New variable.
2608 (saved_inlines): Make it a varray.
2609 (saved_inlines_used): New variable.
2610 (finish_static_data_member): Change method of updating
2611 pending_statics.
2612 (mark_inline_for_output): Remove #if 0'd code. Change method of
2613 updating saved_inlines.
2614 (walk_vtables): Remove.
2615 (walk_sigtables): Likewise.
2616 (import_export_decl): Use DECL_TINFO_FN_P.
2617 (pending_templates): Remove declaration.
2618 (maybe_templates): Likewise.
2619 (static_aggregates_initp): Likewise.
2620 (setup_initp): Likewise.
2621 (finish_objects): Simplify.
2622 (INITIALIZE_P_IDENTIFIER): New macro.
2623 (PRIORITY_IDENTIFIER): New macro.
2624 (SSDF_IDENTIFIER): New macro.
2625 (initialize_p_decl): New variable.
2626 (priority_decl): Likewise.
2627 (ssdf_decl): Likewise.
2628 (priority_info_map): Likewise.
2629 (finish_file): Recode output of static intializers and other
2630 file-scope finalization tasks.
2631 * error.c (OB_END_TEMPLATE_ID): New macro.
2632 (dump_type_real): Use it.
2633 (dump_decl): Likewise.
2634 (dump_function_name): Likewise.
2635 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2636 interface.
2637 (check_newline): Use walk_globals, not walk_vtables.
2638 * pt.c (pending_tempalte_expansions): Remove.
2639 (set_vardecl_interface_info): Likewise.
2640 (pending_templates): Make static.
2641 (maybe_templates): Likewise.
2642 (instantiate_class_template): Adjust call to finish_struct_1.
2643 (instantiate_pending_templates): New function.
2644 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2645 * tree.c (static_aggregates_initp): Remove.
2646 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2647 instead.
2648 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2649
2650 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2651 with the RTL code RETURN.
2652 * hash.h: Regenerated.
2653 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2654 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2655 * parse.c: Regenerated.
2656 * pt.c: Include varray.h. Include rtl.h since varray.h requires
2657 it.
2658 (inline_parm_levels): New variable.
2659 (inline_parm_levels_used): Likewise.
2660 (maybe_begin_member_template_processing): Update them.
2661 (maybe_end_member_template_processing): Use them, rather than
2662 guessing how many levels to pop.
2663
2664 * decl.c (make_typename_type): Tighten error-checking.
2665
2666 1999-04-20 Mark Mitchell <mark@codesourcery.com>
2667
2668 * cp-tree.h (build_binary_op): Remove unneeded parameter.
2669 * class.c (build_vrable_entry_ref): Adjust call to
2670 build_binary_op.
2671 * decl.c (expand_static_init): Likewise.
2672 (grokdeclarator): Likewise.
2673 (finish_function): Likewise.
2674 * decl2.c (delete_sanity): Likewise.
2675 (do_dtors): Likewise.
2676 (do_ctors): Likewise.
2677 * error.c (dump_type_suffix): Likewise.
2678 * expr.c (cplus_expand_expr): Likewise.
2679 * init.c (resolve_offset_ref): Likewise.
2680 (build_new): Likewise.
2681 (build_new_1): Likewise.
2682 (build_vec_delete_1): Likewise.
2683 (expand_vec_init_catch_clause): Likewise.
2684 (build_delete): Likewise.
2685 * pt.c (tsubst): Likewise.
2686 * rtti.c (synthesize_tinfo_fn): Likewise.
2687 * search.c (expand_upcast_fixups): Likewise.
2688 (expand_direct_vtbls_init): Likewise.
2689 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2690 (build_binary_op_nodefault): Likewise.
2691 (point_int_sum): Likewise.
2692 (pointer_diff): Likewise.
2693 (build_unary_op): Likewise.
2694 (build_modify_expr): Likewise.
2695 (get_delta_difference): Likewise.
2696 (build_ptrmemfunc): Likewise.
2697 (expand_ptrmemfunc_cst): Likewise.
2698
2699 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
2700
2701 * decl.c (grokfndecl): Always call cplus_decl_attributes.
2702 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2703
2704 1999-04-19 Mark Mitchell <mark@codesourcery.com>
2705
2706 * cp-tree.h (finish_static_data_member_decl): New function.
2707 * decl2.c (finish_static_data_member_decl): Split out from ...
2708 (grokfield): Here.
2709 * pt.c (instantiate_class_template): Use it here instead of
2710 trying to fake it.
2711 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2712 finish_static_data_member_decl will do that. Explicit set
2713 DECL_EXTERNAL to match non-template processing.
2714
2715 1999-04-18 Mark Mitchell <mark@codesourcery.com>
2716
2717 * cp-tree.h (finish_class_definition): Add parameter.
2718 * parse.y (structsp): Use it. Don't call pop_scope here.
2719 * parse.c: Regenerated.
2720 * semantics.c (finish_class_definition): Pop it here.
2721
2722 1999-04-17 Mark Mitchell <mark@codesourcery.com>
2723
2724 * decl.c (xref_tag): Revise handling of nested template
2725 declarations.
2726 * pt.c (check_explicit_specialization): Tweak handling of friend
2727 templates in template classes.
2728 (tsubst_friend_class): Handle friend declarations for nested
2729 member template classes.
2730
2731 1999-04-16 Mark Mitchell <mark@codesourcery.com>
2732
2733 * class.c (finish_struct): Remove unused variable.
2734 (pushclass): Likewise.
2735 (invalidate_class_lookup_cache): Likewise.
2736 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2737 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2738 doesn't get obliterated.
2739 (make_typename_type): Handle template classes correctly.
2740
2741 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2742 (storetags): Declare.
2743 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2744 (pushclass): Likewise. Use storetags to install tag declarations,
2745 not pushtag.
2746 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2747 * decl.c (storetags): Make it global.
2748 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2749 implicit typename declaration.
2750 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
2751 * method.c (hack_identifier): Likewise.
2752 * search.c (lookup_member): Likewise.
2753
2754 * decl.c (warn_about_implicit_typename_lookup): New function.
2755 (lookup_name_real): Use it. Rework handling of implicit typename
2756 extension.
2757
2758 1999-04-15 Mark Mitchell <mark@codesourcery.com>
2759
2760 * cp-tree.h (lookup_nested_field): Remove.
2761 * class.c (push_nested_class): Handle UNION_TYPEs.
2762 (pop_nested_class): Likewise.
2763 * decl.c (lookup_name_real): Don't call lookup_nested_field.
2764 (start_decl): Use push_nested_class, not just pushclass.
2765 (cp_finish_decl): Use pop_nested_class, not just popclass.
2766 * search.c (lookup_nested_field): Remove.
2767
2768 * cp-tree.h (lang_type): Add documentation.
2769 * decl2.c (handle_class_head): Create template declarations here,
2770 as appropriate.
2771 * parse.y (class_head): Return whether or not we entered a new
2772 scope, as well as the type named.
2773 (named_class_head): Likewise.
2774 (named_complex_class_head_sans_basetype): Likewise.
2775 (structsp): Adjust accordingly. Pop scope when required.
2776 * parse.c: Regenerated.
2777 * pt.c (check_default_tmpl_args): Robustify.
2778 (redeclare_class_template): Likewise.
2779 (instantiate_class_template): An instantiation of an
2780 anonymous union is itself an anonymous union.
2781 * semantics.c (begin_class_definition): Don't create template
2782 declarations here.
2783
2784 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
2785
2786 * parse.y (after_type_declarator_intern): New nonterminal.
2787 (after_type_declarator): Use it.
2788 (direct_after_type_declarator): Likewise. Move above
2789 nonnested_type to fix reduce/reduce conflict resolution.
2790 (declmods): Reducing from just 'attributes' has EMPTY precedence.
2791 * Makefile.in (CONFLICTS): Update.
2792
2793 * decl.c (define_label): Downgrade error for jumping over a
2794 non-POD decl to pedwarn.
2795
2796 1999-04-14 Mark Mitchell <mark@codesourcery.com>
2797
2798 * cp-tree.h (popclass): Change declaration.
2799 (pop_nested_class): Likewise.
2800 (poplevel_class): Remove declaration.
2801 * call.c (convert_default_argument): Pass no arguments to
2802 popclass.
2803 * class.c (finish_struct_1): Likewise.
2804 (finish_struct): Likewise.
2805 (popclass): Remove argument. Simplify code accordingly.
2806 (pop_nested_class): Likewise.
2807 * decl.c (poplevel_class): Declare it here, and make it static.
2808 (poplevel): Handle class scopes.
2809 (poplevel_class): Don't take an rgument. Simplify.
2810 (pop_everything): Pass no arguments to pop_nested_class.
2811 (cp_finish_decl): Pass no arguments to popclass.
2812 (grokdeclarator): Pass no arguments to pop_nested_class.
2813 (finish_function): Likewise.
2814 * decl2.c (grokfield): Likewise.
2815 (pop_scope): Pass no arguments to popclass.
2816 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
2817 * pt.c (instantiate_class_template): Move call to pushclass, and
2818 document. Pass no arguments to popclass.
2819 (regenerate_decl_from_template): Likewise.
2820
2821 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
2822
2823 * typeck.c (build_unary_op): Handle taking the address of a unique
2824 bound non-static member function.
2825
2826 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
2827
2828 * lang-options.h (-Wdeprecated): New flag.
2829 * decl2.c (warn_deprecated): New flag.
2830 (lang_decode_option): Deprecated this-is-variable,
2831 external-templates, alt-external-templates.
2832 Support -Wdeprecated.
2833 * errfn.c (cp_deprecated): New function.
2834
2835 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
2836
2837 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
2838 of the decls themselves.
2839
2840 * pt.c (tsubst_function_type): Copy attributes over.
2841
2842 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
2843 and com_interface.
2844 * cp-tree.h: Add prototype.
2845 * decl.c (init_decl_processing): Set valid_lang_attribute.
2846
2847 1999-04-13 Mark Mitchell <mark@codesourcery.com>
2848
2849 * class.c (finish_struct_1): Look at the const-ness of the field's
2850 type, not the TREE_READONLY-ness of the declaration.
2851 * method.c (synthesize_method): Likewise.
2852 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
2853 creating new declarations.
2854
2855 1999-04-13 Mike Stump <mrs@wrs.com>
2856
2857 * decl2.c (import_export_decl): Because vtables always reference
2858 virtual functions, even if they are inlined, don't allow
2859 -fno-implement-inlines to not emit them, instead, emit them with
2860 the vtable.
2861 * decl.c (start_function): Likewise.
2862
2863 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
2864
2865 * cp-tree.h (struct lang_type): Add com_interface.
2866 (CLASSTYPE_COM_INTERFACE): New macro.
2867 * class.c (set_rtti_entry): COM interface classes have no RTTI
2868 entries in their vtables; adjust.
2869 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
2870 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
2871 finish_struct_1): Likewise.
2872 * decl2.c (mark_vtable_entries): Likewise.
2873 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
2874 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
2875 expand_upcast_fixups): Likewise.
2876 * tree.c (debug_binfo): Likewise.
2877
2878 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
2879 * typeck.c (comptypes): If we get it, ignore attributes.
2880 * class.c (instantiate_type): Use BASELINK_P. Change complain
2881 parameter to flags; 2 means ignore attributes.
2882 * call.c (build_op_delete_call): Pass it.
2883
2884 * decl.c (xref_tag): Only complain once about using a typedef-name
2885 with 'struct'. Downgrade to pedwarn.
2886
2887 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
2888
2889 * parse.y (absdcl_intern): New nonterminal.
2890 (absdcl, direct_abstract_declarator): Use it.
2891
2892 * pt.c (lookup_template_class): Look through implict typename.
2893
2894 1999-04-11 Mark Mitchell <mark@codesourcery.com>
2895
2896 * friend.c (add_friend): Deal gracefully with error_mark_node.
2897 * method.c (build_overload_value): Handle pointers-to-members as
2898 template parameters.
2899
2900 * decl.c (push_binding): Fix typo in comment.
2901
2902 1999-04-10 Mark Mitchell <mark@codesourcery.com>
2903
2904 * error.c (dump_type_real): If a typename is a template-id, put
2905 out the template arguments.
2906 (dump_expr): Handle TEMPLATE_ID_EXPR.
2907 * pt.c (lookup_template_class): Now that full arguments are
2908 available everywhere, remove code that tried to guess them.
2909
2910 1999-04-09 Mark Mitchell <mark@codesourcery.com>
2911
2912 * decl.c (make_typename_type): Complain if we don't find a type
2913 when trying to make a typename type for a non-template type.
2914
2915 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
2916
2917 * decl.c (start_decl): Pass attributes to grokdeclarator.
2918 (grokdeclarator): Handle attributes on constructor-syntax
2919 initializers.
2920
2921 1999-04-08 Mark Mitchell <mark@codesourcery.com>
2922
2923 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
2924 don't have types.
2925
2926 * search.c (template_self_reference_p): Tweak.
2927
2928 1999-04-07 Mark Mitchell <mark@codesourcery.com>
2929
2930 * init.c (build_offset_ref): Don't build yet another weird data
2931 structure to describe overloaded functions.
2932
2933 1999-04-06 Mark Mitchell <mark@codesourcery.com>
2934
2935 * cp-tree.h (BASELINK_P): New macro.
2936 (SET_BASELINK_P): Likewise.
2937 * init.c (build_member_call): Remove needless assignment in if
2938 statement.
2939 * search.c (lookup_field_r): Fix handling when we are looking
2940 specifically for a type; these are not hidden by functions and
2941 variables.
2942 (lookup_member): Use SET_BASELINK_P.
2943 * tree.c (is_overloaded_fn): Use BASELINK_P.
2944 (really_overloaed_fn): Likewise.
2945 (get_first_fn): Likewise.
2946
2947 1999-04-05 Mark Mitchell <mark@codesourcery.com>
2948
2949 * decl.c (lookup_name_current_level): Tweak, and improve
2950 documentation.
2951
2952 * class.c (maybe_fixup_vptrs): Remove declaration.
2953 (build_class_init_list): Likewise.
2954 * decl.c (pushdecl_class_level): Call check_template_shadow here
2955 ...
2956 (push_class_level_binding): ... not here.
2957 * search.c (dfs_push_type_decls): Only avoid
2958 template-self-reference TYPE_DECLs if they are from base classes.
2959
2960 1999-04-04 Mark Mitchell <mark@codesourcery.com>
2961
2962 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
2963 nodes. Tidy.
2964
2965 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
2966
2967 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
2968 (finish_struct_1): Don't call build_class_init_list.
2969
2970 1999-04-02 Mark Mitchell <mark@codesourcery.com>
2971
2972 * tinfo.h (__class_type_info): Fix illegal declaration.
2973
2974 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
2975 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
2976 (IDENTIFIER_CLASS_VALUE): Improve documentation.
2977 (is_properly_derived_from): Declare.
2978 (invalidate_class_lookup_cache): Likewise.
2979 (maybe_maybe_note_name_used_in_class): Likewise.
2980 (note_name_declared_in_class): Likewise.
2981 (push_using_decl): Remove duplicate declaration.
2982 (id_in_current_class): Remove declaration.
2983 (push_class_binding): Change prototype.
2984 (clear_identitifer_class_values): Declare.
2985 * call.c (is_properly_derived_from): Make it global.
2986 (build_new_function_call): Be careful about updating candidates.
2987 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
2988 asked to make illegal calls.
2989 * class.c: Include splay-tree.h.
2990 (class_stack_node): Add names_used slot.
2991 (check_member_decl_is_same_in_complete_scope): Remove.
2992 (add_method): Fix comment. Push the declaration into class
2993 scope.
2994 (finish_struct_1): When popping the class, pop the bindings too.
2995 Remove check for data member/function member conflict.
2996 (finish_struct): Remove calls to
2997 check_member_decl_is_same_in_complete_scope. Change calls to
2998 popclass.
2999 (pushclass): Clear names_used in the class stack entry.
3000 Use invalidate_class_lookup_cache to remove cached entries, rather
3001 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
3002 before entering a new class. Remove dead code. Don't mess with
3003 current_function_decl when pushing declarations.
3004 (invalidate_class_lookup_cache): New function, split out from ...
3005 (popclass): Here. Clean up names_used on our way out.
3006 (instantiate_type): Adjust.
3007 (build_self_reference): Don't push the declaration here.
3008 (maybe_note_name_used_in_class): New function.
3009 (note_name_declared_in_class): Likewise.
3010 * decl.c (add_binding): Change prototype.
3011 (find_class_binding_level): New function.
3012 (innermost_nonclass_level): Likewise.
3013 (current_binding_level): Update documentation.
3014 (inner_binding_level): Remove. Replace with current_binding_level
3015 throughout.
3016 (push_binding_level): Remove special handling of
3017 class_binding_level.
3018 (pop_binding_level): Likewise. Use find_class_binding_level.
3019 (suspend_binding_level): Likewise.
3020 (global_bindings_p): Use innermost_nonclass_level.
3021 (toplevel_bindings_p): Likewise.
3022 (namespace_bindings_p): Likewise.
3023 (pseudo_global_level_p): Likewise.
3024 (push_binding): Clear INHERITED_VALUE_BINDING_P.
3025 (add_binding): Check for illegal multiple declarations. Return a
3026 value indicating whether or not the new binding was legal.
3027 (push_local_binding): Skip over class binding levels. Check
3028 return value from add_binding.
3029 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
3030 note_name_declared_in_class.
3031 (pushlevel_class): Remove "fake out the rest of the compiler"
3032 code.
3033 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3034 (clear_identifier_class_values): New function.
3035 (pop_from_top_level): Use it.
3036 (pop_everything): Tweak.
3037 (maybe_process_template_type_declaration): Don't push the
3038 declaration for the template here.
3039 (pushtag): Don't push tag declarations into class scope here.
3040 (pushdecl): Apply DeMorgan's law for readability.
3041 (pushdecl_class_level): Remove special-case code for
3042 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
3043 (push_class_level_bindng): Deal with inherited bindings.
3044 (lookup_name_real): Remove special-case code for
3045 TYPE_BEING_DEFINED, and some implicit typename magic.
3046 (grokdeclarator): Handle COMPONENT_REF for a template function.
3047 (build_enumerator): Don't call pushdecl_class_level here.
3048 (id_in_current_class): Remove.
3049 * decl2.c (grokfield): Don't call pushdecl_class_level or
3050 check_template_shadow.
3051 * errfn.c (cp_file_of): Don't declare.
3052 (cp_line_of): Likewise.
3053 * error.c (dump_decl): Handle an OVERLOAD.
3054 (cp_file_of): Likewise.
3055 (cp_line_of): Likewise.
3056 * init.c (build_member_call): Handle a COMPONENT_REF.
3057 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3058 pushdecl_class_level.
3059 * method.c (hack_identifier): Build COMPONENT_REFs for references
3060 to member templates as well as member functions. Remove dead
3061 code.
3062 * parse.y (left_curly): Remove.
3063 (nonnested_type): Call maybe_note_name_used_in_class, not
3064 pushdecl_class_level.
3065 * parse.c: Regenerated.
3066 (nested_name_specifier_1): Likewise.
3067 * pt.c (check_explicit_specialization): Adjust, for robustness.
3068 (check_template_shadow): Handle OVERLOADs.
3069 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3070 TEMPLATE_DECL, if appropriate.
3071 * search.c (envelope_add_decl): Remove.
3072 (dfs_pushdecls): Likewise.
3073 (dfs_compress_decls): Likewise.
3074 (dfs_push_decls): New function.
3075 (dfs_push_type_decls): Likewise.
3076 (setup_class_bindings): Likewise.
3077 (template_self_reference_p): Likewise.
3078 (lookup_field_r): Use it.
3079 (looup_member): Remove old comment. Deal with ambiguity.
3080 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3081 and remove envelope processing.
3082 * semantics.c (begin_class_definition): Let pushclass push
3083 declarations for base classes.
3084 (finish_member_declaration): Push declarations into class scope.
3085 * typeck.c (build_component_ref): Just put an OVERLOAD into the
3086 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3087 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
3088 * Makefile.in (class.o): Depend on splay-tree.h.
3089
3090 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
3091
3092 * cvt.c (convert_pointer_to_real): Use same_type_p.
3093 * typeck.c (comp_target_types): Use same_type_p.
3094
3095 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
3096
3097 * semantics.c (begin_inline_definitions,
3098 finish_inline_definitions): Rename from finish_default_args and
3099 begin_inline_definitions, respectively, to something that isn't a
3100 total lie. :)
3101 * parse.y (structsp): Adjust.
3102
3103 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3104 (list_hash_lookup): Likewise.
3105 (hash_tree_chain): Adjust.
3106 * pt.c (tsubst): Adjust.
3107 (tsubst_arg_types): Use plain hash_tree_cons.
3108 * cp-tree.h (hash_tree_cons_simple): Lose.
3109 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3110
3111 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3112
3113 * Makefile.in (hash.h): Generate using gperf language 'C', not
3114 'KR-C', so gperf uses the `const' keyword on strings.
3115
3116 * gxx.gperf (resword): Const-ify a char*.
3117
3118 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
3119
3120 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3121 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3122 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3123 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3124 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3125 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3126 tree.c: Adjust.
3127
3128 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
3129
3130 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3131
3132 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
3133
3134 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3135
3136 1999-03-27 Mark Mitchell <mark@codesourcery.com>
3137
3138 * cp-tree.h (add_friend): Declare.
3139 (add_friends): Likewise.
3140 * friend.c (add_friend): Make it global. Don't add to
3141 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3142 (add_friends): Make it global.
3143 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3144 befriending class is a template.
3145 * parse.y (component_decl_1): Fix typo in comment.
3146 * parse.c: Regenerated.
3147 * pt.c (instantiate_class_template): Use add_friend and
3148 add_friends rather that duplicating some of their functionality
3149 here.
3150
3151 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
3152
3153 * call.c (build_field_call): Unify 'this' and non-'this' cases.
3154
3155 * typeck.c (build_indirect_ref): Check for 'this' sooner.
3156
3157 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3158
3159 * call.c (op_error): Const-ify a char*.
3160 (add_candidate, source_type, add_warning): Add static prototype.
3161 (print_z_candidates): Const-ify a char*.
3162
3163 * class.c (resolve_address_of_overloaded_function,
3164 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3165 (get_vtable_name, finish_struct_1): Const-ify a char*.
3166
3167 * cvt.c (convert_to_reference): Likewise.
3168
3169 * decl.c (redeclaration_error_message, record_builtin_type,
3170 record_unknown_type, member_function_or_else, bad_specifiers):
3171 Likewise.
3172 (find_binding, select_decl, unqualified_namespace_lookup,
3173 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3174 Add static prototype.
3175 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3176 implicitly_declare, record_builtin_java_type, define_function,
3177 grok_op_properties, tag_name): Const-ify a char*.
3178
3179 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3180 (define_function, finish_builtin_type): Const-ify a char*.
3181 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3182 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3183 (file_name_nondirectory): Const-ify a char*.
3184 (init_filename_times): Don't prototype.
3185 (compiler_error): Prototype.
3186 (yyerror, init_repo): Const-ify a char*.
3187 (build_srcloc): Don't prototype.
3188 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3189 Const-ify a char*.
3190 (warn_for_assignment): Don't prototype.
3191 (convert_for_initialization, readonly_error, check_for_new_type,
3192 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3193 Const-ify a char*.
3194
3195 * decl2.c (acceptable_java_type, output_vtable_inherit,
3196 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3197 merge_functions, decl_namespace, validate_nonmember_using_decl,
3198 do_nonmember_using_decl): Add static prototype.
3199 (lang_f_options): Const-ify a char*.
3200 (finish_builtin_type): Likewise.
3201 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
3202 prototype.
3203
3204 * errfn.c: Include cp-tree.h.
3205 (cp_thing): Add static prototype.
3206 (compiler_error): Don't protoptype.
3207 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
3208 passing it to `cp_thing'.
3209
3210 * error.c (interesting_scope_p): Add static prototype.
3211
3212 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
3213 a char*.
3214
3215 * init.c (compiler_error): Don't prototype.
3216 (member_init_ok_or_else): Const-ify a char*.
3217 (build_java_class_ref): Add static prototype.
3218
3219 * lex.c (compiler_error): Don't prototype.
3220 (get_time_identifier, interface_strcmp, extend_token_buffer,
3221 handle_cp_pragma): Const-ify a char*.
3222 (is_global, init_filename_times): Add static prototype.
3223 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
3224 (compiler_error): Change from fixed args to variable args.
3225 (yyerror): Const-ify a char*.
3226
3227 * parse.y (cond_stmt_keyword): Const-ify a char*.
3228 (parse_decl): Add static prototype.
3229
3230 * pt.c (template_args_equal, print_template_context): Likewise.
3231 (print_candidates, check_default_tmpl_args): Const-ify a char*.
3232 (instantiate_class_template): Likewise.
3233
3234 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
3235
3236 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
3237 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
3238
3239 * search.c (lookup_field_info, lookup_member): Likewise.
3240 (lookup_member): Cast the first argument of `bzero' to a PTR.
3241
3242 * sig.c (compiler_error): Don't prototype.
3243 (build_signature_pointer_or_reference_nam): Const-ify a char*.
3244 (get_sigtable_name, build_member_function_pointer): Likewise.
3245
3246 * tree.c (compiler_error): Don't prototype.
3247 (no_linkage_helper, build_srcloc): Add static prototype.
3248 (build_vbase_pointer_fields): Const-ify a char*.
3249 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
3250
3251 * typeck.c (compiler_error): Don't prototype.
3252 (convert_for_assignment): Const-ify a char*.
3253 (comp_cv_target_types): Add static prototype.
3254 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
3255 build_component_addr, build_unary_op, convert_for_initialization):
3256 Const-ify a char*.
3257
3258 * typeck2.c (ack): Add static prototype and change from fixed args
3259 to variable args.
3260 (readonly_error, check_for_new_type): Const-ify a char*.
3261
3262 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
3263 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
3264 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
3265 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
3266 gen_assign, GNU_xref_member): Const-ify a char*.
3267
3268 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3269
3270 * gxxint.texi: Remove old discussion on copying virtual bases.
3271
3272 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
3273
3274 * Make-lang.in: Remove all references to g++.o/g++.c.
3275 Link g++ from gcc.o.
3276
3277 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3278
3279 * decl2.c (comdat_linkage): Treat vtables like functions.
3280
3281 1999-03-25 Mark Mitchell <mark@codesourcery.com>
3282
3283 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
3284
3285 1999-03-25 Nathan Sidwell <nathan@acm.org>
3286
3287 * decl.c (init_decl_processing): Add `signed' type as a synonym
3288 for `int'.
3289
3290 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3291
3292 * typeck.c (common_type): Handle cv-qual unification for pointers
3293 to members.
3294
3295 * decl.c (unqualified_namespace_lookup): Return error_mark_node
3296 on error.
3297 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
3298 * lex.c (do_identifier): If we got error_mark_node, call
3299 lookup_name again.
3300
3301 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3302
3303 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
3304 classes.
3305
3306 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
3307
3308 * decl.c (lookup_name_real): Do nested field lookup regardless of
3309 TYPE_BEING_DEFINED.
3310
3311 1999-03-24 Mark Mitchell <mark@codesourcery.com>
3312
3313 * cp-tree.h (lang_type): Remove has_assignment and
3314 has_real_assignment. Add befriending_classes.
3315 (TYPE_HAS_ASSIGNMENT): Remove.
3316 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
3317 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
3318 (lang_decl): Document.
3319 (DECL_BEFRIENDING_CLASSES): New macro.
3320 (FRIEND_NAME): Move declaration to more obvious location.
3321 (FRIEND_DECLS): Likewise.
3322 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
3323 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
3324 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
3325 (grok_op_properties): Likewise.
3326 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
3327 (add_friend): Likewise. Don't do weird things with assignment
3328 operators. Update DECL_BEFRIENDING_CLASSES.
3329 (add_friends): Don't do weird things with assignment operators.
3330 (make_friend_class): Likewise. Update
3331 CLASSTYPE_BEFRIENDING_CLASSES.
3332 * pt.c (instantiate_class_template): Don't set
3333 TYPE_HAS_ASSIGNMENT.
3334 (tsubst_copy): Substitute the TREE_TYPE for more unary
3335 expressions.
3336 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
3337 * search.c (protected_accessible_p): New function.
3338 (friend_accessible_p): Likewise.
3339 (accessible_p): Use them.
3340
3341 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3342
3343 * pt.c (convert_nontype_argument): Don't create things that aren't
3344 PTRMEM_CSTs when applying a qualification conversion to a
3345 PTRMEM_CST.
3346
3347 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3348
3349 * Makefile.in (OBJS): Don't mention hash.o.
3350 (OBJDEPS): Likewise.
3351
3352 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
3353
3354 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
3355 * decl.c (expand_static_init): Make sure we don't add any after
3356 then.
3357
3358 * decl.c (cp_finish_decl): Move intelligence about handling
3359 DECL_COMDAT for variables from here...
3360 * decl2.c (comdat_linkage): ...to here.
3361 (maybe_make_one_only): Tweak.
3362 (import_export_decl): Call comdat_linkage for variables, too.
3363 (finish_file): Handle template statics properly.
3364
3365 1999-03-22 Mark Mitchell <mark@codesourcery.com>
3366
3367 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
3368 Document internals of pointer-to-member-functions.
3369 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
3370 (PFN_FROM_PTRMEMFUNC): Likewise.
3371 (build_type_conversion): Remove unused parameter.
3372 (build_ptrmemfunc1): Declare.
3373 (expand_ptrmemfunc_cst): New function.
3374 (delta2_from_ptrmemfunc): Likewise.
3375 (pfn_from_ptrmemfunc): Likewise.
3376 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
3377 build_type_conversion. Use TYPE_PTRMEM_P for readability.
3378 (convert_to_reference): Remove unused parameter to
3379 build_type_conversion.
3380 (ocp_convert): Likewise.
3381 (build_user_type_conversion): Likewise.
3382 * error.c (dump_expr): Handle NULL pointer-to-member functions.
3383 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
3384 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
3385 open when handling pointer-to-member functions.
3386 * pt.c (convert_nontype_argument): Clean up error messages. Be
3387 more stringent with pointers-to-members.
3388 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
3389 (build_unary_op): Tidy ever-so-slightly.
3390 (build_conditional_expr): Remove extra parameter to
3391 build_type_conversion.
3392 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3393 we're using.
3394 (expand_ptrmemfunc_cst): Define.
3395 (delta2_from_ptrmemfunc): Likewise.
3396 (pfn_from_ptrmemfunc): Likewise.
3397
3398 1999-03-19 Mark Mitchell <mark@codesourcery.com>
3399
3400 * init.c (build_member_call): Handle template-id expressions
3401 correctly.
3402 * typeck.c (build_x_function_call): Likewise.
3403
3404 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
3405
3406 * friend.c (make_friend_class): Avoid core dump when
3407 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3408
3409 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
3410
3411 * decl.c (start_function): Suppress normal linkage heuristics
3412 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3413
3414 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
3415
3416 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3417 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3418
3419 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
3420
3421 * parse.y (named_complex_class_head_sans_basetype):
3422 Do not push a scope for error_mark_node.
3423 (maybe_base_class_list): Likewise.
3424
3425 * decl.c (start_decl): Check for error_mark_node as a type.
3426 Detected by g++.brendan/array-refs.C.
3427 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
3428 (maybe_build_cleanup_1): Likewise. Detected by
3429 g++.jason/incomplete1.C.
3430
3431 * tree.c (build_dummy_object): Use void_zero_node instead of the
3432 error_mark_node.
3433 (is_dummy_object): Check for such a node.
3434 Detected by g++.bob/inherit1.C
3435
3436 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
3437
3438 * method.c (old_backref_index): Split out...
3439 (flush_repeats): From here. Rename back from try_old_backref.
3440 (build_mangled_name): Put back some old-style repeat handling.
3441
3442 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3443
3444 * lex.c: Don't include setjmp.h.
3445 (parse_float): New static function.
3446 (pf_args): New struct.
3447 (real_yylex): Use them in call to `do_float_handler'.
3448
3449 1999-03-15 Mark Mitchell <mark@markmitchell.com>
3450
3451 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3452 * tree.c (layout_basetypes): Not here.
3453 * search.c (dfs_search): Remove; no longer used.
3454
3455 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3456
3457 * decl2.c (validate_nonmember_using_decl): Issue sensible
3458 error-messages on bogus qualifiers.
3459
3460 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
3461
3462 * call.c (add_function_candidate): Fix uninitialized variable.
3463
3464 * Makefile.in (search.o): Add dependency on varray.h.
3465
3466 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
3467
3468 * decl.c (duplicate_decls): Use same_type_p.
3469 * method.c (try_old_backref): Renamed from flush_repeats. Use
3470 same_type_p. Don't try to handle repeats. Return success.
3471 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
3472 calls from old-style code, too.
3473 (check_ktype): Use same_type_p.
3474 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
3475 (build_qualified_name): Simplify logic.
3476 (process_overload_item): Strip typedefs and quals at the top.
3477 (build_mangled_name_for_type_with_Gcode): Remove call to
3478 type_canonical_variant.
3479 (build_mangled_name): Likewise. Remove support for old-style
3480 repeats, which have been disabled since 2.7.2. Don't mess with
3481 TREE_USED.
3482 (build_decl_overload_real): Don't mess with TREE_USED.
3483
3484 1999-03-13 Nathan Sidwell <nathan@acm.org>
3485
3486 * error.c (cp_printers): Add 'F' escape character.
3487 (dump_type_real): Remove TREE_LIST (fnargs) printing.
3488 Functionality moved to dump_parameters.
3489 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3490 (dump_function_decl): Extend meaning of V parameter. Use
3491 dump_parameters and dump_exception_spec.
3492 (dump_parameters): New static function.
3493 (dump_exception_spec): New static function.
3494 (fndecl_as_string): Change argument semantics. Use
3495 dump_function_decl directly.
3496
3497 * sig.c (build_signature_table_constructor): Use cp_error.
3498
3499 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
3500
3501 * semantics.c (finish_switch_cond): Handle error cases gracefully.
3502 Detected by g++.law/enum5.C.
3503
3504 * typeck.c (build_modify_expr): Check for errors after resolving
3505 offsets. Detected by g++.brendan/static1.C.
3506
3507 * decl.c (complete_array_type): Ignore initial_value if it is an
3508 error. Detected by g++.benjamin/17930.C.
3509
3510 * typeck2.c (process_init_constructor): Return error if one argument
3511 is in error. Detected by g++.benjamin/13478.C.
3512
3513 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3514
3515 * decl.c (select_decl): Allow class templates when we need types.
3516 * decl2.c (ambiguous_decl): Likewise.
3517
3518 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3519
3520 * lex.c (do_identifier): Correct call to enforce_access.
3521 * search.c (accessible_p): Tweak comment.
3522
3523 1999-03-10 Mark Mitchell <mark@markmitchell.com>
3524
3525 * semantics.c (begin_class_definition): Call build_self_reference.
3526 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3527
3528 * search.c (assert_canonical_unmarked): Fix typo in prototype.
3529
3530 * search.c (dfs_canonical_queue): New function.
3531 (dfs_assert_unmarked_p): Likewise.
3532 (assert_canonical_unmarked): Likewise.
3533 (access_in_type): Use it.
3534 (accessible_p): Likewise. Walk the whole tree when umarking.
3535
3536 * sig.c (build_signature_table_constructor): Use accessible_p
3537 instead of compute_access.
3538
3539 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3540
3541 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3542
3543 1999-03-09 Mark Mitchell <mark@markmitchell.com>
3544
3545 * cp-tree.h (flag_access_control): Declare.
3546 (TREE_VIA_PPUBLIC): Document.
3547 (DECL_NONSTATIC_MEMBER_P): New macro.
3548 (enforce_access): Return an indication of whether or not access
3549 was permitted.
3550 (build_self_reference): Change prototype.
3551 (compute_access): Replace with ...
3552 (accessible_p): New function.
3553 (dfs_walk): Change prototype.
3554 (dfs_unmark): Likewise.
3555 (markedp): Likewise.
3556 * call.c (enforce_access): Use accessible_p.
3557 * class.c (build_self_reference): Insert the declaration into the
3558 list of members for this type, and make it public.
3559 * decl.c (xref_basetypes): Avoid ill-timed recursion.
3560 * init.c (build_offset_ref): Use lookup_member, not three separate
3561 name-lookups. Call enforce_access rather than checking for
3562 illegal accesses here.
3563 (resolve_offset_ref): Likewise.
3564 * lex.c (do_identifier): Likewise.
3565 * method.c (hack_identifier): Likewise.
3566 * parse.y (self_reference): Remove.
3567 (opt_component_decl_list): Don't use it.
3568 * parse.c: Regenerated.
3569 * pt.c (print_candidates): Generalize to handle lists of
3570 overloaded functions.
3571 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3572 not set.
3573 (get_template_base): Use new calling convention for dfs_walk.
3574 * search.c: Include varray.h. Add prototypes.
3575 (dfs_walk): Accept a data pointer to pass to the work functions.
3576 All callers changed. All work functions changed.
3577 (breadth_first_search): Rename to bfs_walk, and make consistent
3578 with dfs_walk.
3579 (dfs_walk_real): New function.
3580 (canonical_binfo): New function.
3581 (context_for_name_lookup): Likewise.
3582 (shared_marked_p): Likewise.
3583 (shared_unmarked_p): Likewise.
3584 (lokup_field_queue_p): Likewise.
3585 (lookup_field_r): Generalize to handle both functions and fields.
3586 (lookup_field): Just call lookup_member.
3587 (lookup_fnfields): Likewise.
3588 (lookup_member): Move body of lookup_field here and generalize.
3589 (dfs_accessible_queue_p): Likewise.
3590 (dfs_accessible_p): Likewise.
3591 (dfs_access_in_type): Likewise.
3592 (access_in_type): Likewise.
3593 (compute_access): Remove, and replace with ...
3594 (accessible_p): New function.
3595 (vbase_types): Remove.
3596 (vbase_decl_ptr_intermediate): Likewise.
3597 (vbase_decl_ptr): Likewise.
3598 (vbase_init_result): Likewise.
3599 (closed_envelopes): Likewise.
3600 (bvtable): Likewise.
3601
3602 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3603
3604 * call.c (add_function_candidate): Check for proper number of args
3605 before checking the validity of those args.
3606
3607 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
3608
3609 * cp-tree.h (struct lang_type): Add anon_union field.
3610 (ANON_UNION_TYPE_P): Use it instead of examining type.
3611 (SET_ANON_UNION_TYPE_P): New macro.
3612 * decl.c (check_tag_decl): Use it.
3613
3614 * search.c (compute_access): Handle non-type contexts earlier, and
3615 handle NULL_TREE.
3616
3617 * tree.c (build_exception_variant): Use copy_to_permanent.
3618
3619 * decl2.c (setup_initp): Give statics with no priority the default
3620 priority here.
3621 (do_dtors, do_ctors, finish_file): Remove special handling of
3622 non-prioritized statics.
3623
3624 1999-03-05 Mark Mitchell <mark@markmitchell.com>
3625
3626 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3627 * decl.c (make_typename_type): Don't issue an error if an
3628 immediate lookup fails; it migt be resolved later.
3629 * friend.c (is_friend): Add comment.
3630 * search.c (breadth_first_search): Add POSTFN and DATA
3631 parameters. Tidy. All callers changed.
3632 (lookup_field_queue_p): New function.
3633 (lookup_field_r): Likewise.
3634 (lookup_field_post): Likewise.
3635 (lookup_field): Use them, via breadth_first_search, instead of
3636 duplicating logic.
3637 (compute_access): Robustify.
3638 (lookup_fnfield_info): New structure.
3639
3640 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
3641
3642 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3643
3644 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
3645
3646 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3647 cc happy.
3648
3649 * decl2.c (import_export_class): Also return if
3650 CLASSTYPE_INTERFACE_ONLY is set.
3651
3652 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
3653
3654 * decl.c (push_overloaded_decl): Only overwrite the old binding if
3655 there was one.
3656 * decl2.c (do_local_using_decl): Fix loop termination.
3657
3658 1999-03-02 Mark Mitchell <mark@markmitchell.com>
3659
3660 * cp-tree.h (determine_specialization): Don't declare.
3661 * pt.c (determine_specialization): Make it static. Eliminate
3662 complain parameter. Note that decl is always non-NULL now, and
3663 simplify accordingly.
3664
3665 * decl.c (maybe_push_to_top_level): Always call
3666 push_cp_function_context.
3667 (pop_from_top_level): Always call pop_cp_function_context.
3668
3669 1999-02-26 Nathan Sidwell <nathan@acm.org>
3670
3671 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3672 diagnostics.
3673 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3674 * init.c (build_new_1): Extra arg to complete_type_or_else.
3675 (build_delete): Likewise.
3676 * typeck.c (require_complete_type): Likewise.
3677 (pointer_int_sum): Likewise.
3678 (pointer_diff): Likewise.
3679 (build_component_ref): Likewise.
3680
3681 * typeck2.c (incomplete_type_error): Always use cp_error.
3682 Show declaration of undefined type, if appropriate.
3683 Deal with UNKNOWN_TYPE nodes.
3684
3685 * typeck.c (require_complete_type): Use TYPE_SIZE as
3686 size_zero_node to mean incomplete type.
3687 (require_complete_type_in_void): New function.
3688 (build_compound_expr): Call complete_type_in_void for LHS.
3689 (build_c_cast): Call complete_type_in_void for void cast.
3690 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3691 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3692 require_complete_type_in_void. Call it.
3693 * cp-tree.h (require_complete_type_in_void): Prototype new function.
3694
3695 * typeck.c (convert_arguments): Use alternative format for
3696 function decls. Don't require_complete_type here. Simplify
3697 diagnostic printing.
3698 (convert_for_initialization): Don't require_complete_type on RHS yet.
3699 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3700
3701 * call.c (build_over_call): Cope with qualified void return type.
3702 * semantics.c (finish_call_expr): Likewise.
3703 * typeck.c (build_function_call_real): Likewise.
3704 (c_expand_return): Likewise.
3705 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3706
3707 * call.c (print_z_candidates): Use alternate print format, to be
3708 consistent with (pt.c) print_candidates.
3709 * method.c (hack_identifier): List candidate members.
3710 * search.c (lookup_field): Build ambiguous list, and show it, if
3711 ambiguous.
3712
3713 1999-02-26 Mark Mitchell <mark@markmitchell.com>
3714
3715 * typeck.c (decay_conversion): Don't confuse constant array
3716 variables with their initializers.
3717
3718 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3719 merging decls.
3720 * pt.c (regenerate_decl_from_template): Tweak for clarity.
3721 (instantiate_decl): Mark a decl instantiated before regenerating
3722 it to avoid recursion.
3723 * tree.c (mapcar): Don't call decl_constant_value unless we know
3724 something is TREE_READONLY_DECL_P.
3725
3726 * class.c (check_for_override): Don't stop checking when we find
3727 the first overridden function. Delete #if 0'd code.
3728 * search.c (get_matching_virtual): Likewise.
3729
3730 1999-02-25 Richard Henderson <rth@cygnus.com>
3731
3732 * lang-specs.h: Define __FAST_MATH__ when appropriate.
3733
3734 1999-02-24 Mike Stump <mrs@wrs.com>
3735
3736 * typeck.c (convert_for_assignment): Allow boolean integral constant
3737 expressions to convert to null pointer.
3738
3739 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
3740
3741 * decl.c (lookup_namespace_name): Resolve namespace aliases.
3742
3743 * class.c (push_nested_class): Allow namespaces.
3744
3745 * decl2.c (set_decl_namespace): Add friendp parameter.
3746 * decl.c (grokfndecl): Pass it.
3747 (grokvardecl): Likewise.
3748 * cp-tree.h: Change declaration.
3749
3750 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
3751
3752 * pt.c (tsubst): Allow an array of explicit size zero.
3753
3754 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
3755
3756 * errfn.c: Change varargs code to look like toplev.c.
3757
3758 * method.c (process_modifiers): Don't prepend 'U' for char or
3759 wchar_t.
3760
3761 1999-02-20 Craig Burley <craig@jcb-sc.com>
3762
3763 * Make-lang.in (cplib2.ready): Don't consider updating
3764 cplib2 stuff if the current directory isn't writable, as
3765 it won't work (such as during a `make install').
3766
3767 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
3768
3769 * decl2.c (start_objects): Make file scope constructors and
3770 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
3771 ASM_OUTPUT_DESTRUCTOR are defined.
3772
3773 1999-02-19 Mark Mitchell <mark@markmitchell.com>
3774
3775 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
3776 (fn_type_unification): Adjust prototype.
3777 (lookup_fnfields_1): Declare.
3778 * call.c (add_template_candidate_real): Adjust call to
3779 fn_type_unification.
3780 * class.c (add_method): Don't allow duplicate declarations of
3781 constructors or destructors.
3782 (resolve_address_of_overloaded_function): Remove unused variable.
3783 Adjust call to fn_type_unification.
3784 * decl.c (grokfndecl): Be more robust in the face of illegal
3785 specializations.
3786 * decl2.c (check_classfn): Remove hokey handling of member
3787 templates.
3788 * pt.c (determine_specialization): Improve comments. Adjust to
3789 handle template argument deduction as per the standard.
3790 (check_explicit_specialization): Fix comment spacing. Handle
3791 type-conversion operators correctly. Improve error-recovery.
3792 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
3793 (get_bindings_real): Simplify handling of static members.
3794 * search.c (lookup_fnfields_1): Make it have external linkage.
3795 * typeck.c (compparms): Fix comment.
3796 (build_unary_op): Don't try to figure out which template
3797 specialization is being referred to when when the address-of
3798 operator is used with a template function.
3799
3800 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3801
3802 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
3803 keyword to match an analogous change at the top level.
3804
3805 * tree.c (lvalue_or_else): Likewise.
3806
3807 1999-02-17 Mark Mitchell <mark@markmitchell.com>
3808
3809 * decl.c (xref_basetypes): Comment.
3810 * pt.c (instantiate_class_template): Use xref_basetypes.
3811
3812 1999-02-16 Mark Mitchell <mark@markmitchell.com>
3813
3814 * cp-tree.h (tsubst): Change prototype.
3815 (tsubst_expr): Likewise.
3816 (tsubst_copy): Likewise.
3817 (type_unification): Remove prototype.
3818 * call.c (convert_default_arg): Adjust call to tsubst_expr.
3819 * class.c (resolve_address_of_overloaded_function): Just use
3820 fn_type_unification.
3821 * decl.c (grokdeclarator): Adjust call to tsubst.
3822 * method.c (build_template_parm_names): Likewise.
3823 * pt.c (GTB_VIA_VIRTUAL): New macro.
3824 (GTB_IGNORE_TYPE): Likewise.
3825 (resolve_overloaded_unification): Add `complain' parameter.
3826 (try_one_overload): Likewise.
3827 (tsubst_template_arg_vector): Likewise.
3828 (tsubst_template_parms): Likewise.
3829 (tsubst_aggr_type): Likewise.
3830 (tsubst_arg_types): Likewise.
3831 (tsubst_call_declarator_parms): Likewise.
3832 (unify): Remove explicit_mask.
3833 (type_unification_real): Likewise.
3834 (get_template_base_recursive): Likewise.
3835 (coerce_template_template_parms): Provide prototype.
3836 (tsubst_function_type): Likewise.
3837 (try_class_unification): New function.
3838 All callers changed to use new complain parameter.
3839 (get_template_base): Use try_class_unification.
3840 (unify): Adjust handling of classes derived from template types.
3841 (fn_type_unification): Substitute explicit arguments before
3842 unification.
3843
3844 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3845
3846 * decl.c (pushdecl): Remove dead code.
3847
3848 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
3849
3850 * decl2.c (finish_objects): Fix code I missed in previous change.
3851
3852 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
3853
3854 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
3855 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
3856
3857 * pt.c (maybe_process_partial_specialization): Complain about
3858 'template <>' on non-specialization.
3859
3860 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
3861
3862 * decl.c (grokdeclarator): Catch wierd declarators.
3863 * decl2.c (finish_file): Don't abort because of namespace parsing
3864 failure.
3865 (check_decl_namespace): Remove.
3866
3867 1999-02-09 Mark Mitchell <mark@markmitchell.com>
3868
3869 * cp-tree.h (get_template_base): Don't declare.
3870 (dfs_walk): Declare.
3871 (dfs_unmark): Likewise.
3872 (markedp): Likewise.
3873 * pt.c (unify): Remove duplicate declaration. Pass tparms and
3874 targs to get_template_base.
3875 (get_template_base_recursive): Move here from search.c. Check to
3876 see that the base found can be instantiated to form the desired
3877 type.
3878 (get_template_base): Likewise.
3879 (get_class_bindings): Simplify.
3880 * search.c (get_template_base_recursive): Move to pt.c.
3881 (get_template_base): Likewise.
3882 (markedp): Make it global.
3883 (dfs_walk): Likewise.
3884 (dfs_unmark): Likewise.
3885
3886 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
3887
3888 * pt.c (maybe_process_partial_specialization): Complain about
3889 specialization in wrong namespace.
3890 * tree.c (decl_namespace_context): New fn.
3891
3892 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3893
3894 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
3895 * pt.c (coerce_template_template_parms): Handle nested
3896 template template parameters.
3897
3898 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
3899
3900 * typeck2.c: Update email addresses.
3901
3902 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3903
3904 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
3905 turned off.
3906
3907 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
3908
3909 * lex.c (retrofit_lang_decl): Split out...
3910 (build_lang_decl): From here.
3911 * decl.c (pushdecl): Call it for functions generated by the middle
3912 end that don't have DECL_LANG_SPECIFIC.
3913 * cp-tree.h: Declare it.
3914
3915 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
3916 (start_objects, finish_objects): Only use special
3917 init_priority code if the user specified a priority.
3918 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
3919 objects.
3920
3921 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
3922
3923 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
3924 mkstemp.o. Get them from libiberty now.
3925 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
3926
3927 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3928
3929 * decl2.c (lang_decode_option): Use read_integral_parameter.
3930
3931 1999-02-01 Mark Mitchell <mark@markmitchell.com>
3932
3933 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
3934 before calling complete_type_or_else.
3935
3936 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3937
3938 * input.c (inline): Don't define, its handled by system.h.
3939
3940 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
3941
3942 * decl2.c: Don't define flag_no_ident here. Don't process
3943 -f(no-)ident here.
3944 * cp-tree.h: Don't declare flag_no_ident here.
3945 * lang-specs.h: Map -Qn to -fno-ident.
3946
3947 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
3948
3949 * cp-tree.h (struct tree_binding): Replace scope field with a union.
3950 (BINDING_SCOPE): Adjust.
3951 * decl.c (BINDING_LEVEL): Adjust.
3952
3953 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
3954
3955 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
3956 member constants.
3957
3958 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
3959 a ctor initializer.
3960
3961 * tree.c (equal_functions): Fix name in prototype.
3962
3963 * decl.c (push_local_binding): Add FLAGS argument.
3964 (pushdecl, push_overloaded_decl): Pass it.
3965 * decl2.c (do_local_using_decl): Likewise.
3966 * cp-tree.h: Adjust prototype.
3967 * decl.c (poplevel): Fix logic.
3968
3969 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
3970 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
3971 (cat_namespace_levels): Don't loop forever.
3972
3973 1999-01-25 Richard Henderson <rth@cygnus.com>
3974
3975 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
3976
3977 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
3978
3979 * class.c (resolve_address_of_overloaded_function): Mark the
3980 chosen function used.
3981
3982 * call.c (build_call): Make sure that a function coming in has
3983 been marked used already.
3984 * decl.c (expand_static_init): Call mark_used instead of
3985 assemble_external.
3986 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
3987 alloc_eh_object, expand_throw): Likewise.
3988 * init.c (build_builtin_delete_call): Likewise.
3989 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
3990 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
3991 expand_generic_desc): Likewise.
3992
3993 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3994
3995 * tree.c (equal_functions): New function.
3996 (ovl_member): Call it.
3997
3998 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
3999
4000 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4001
4002 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
4003
4004 * decl.c (decls_match): Return 1 if old and new are identical.
4005 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4006
4007 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4008
4009 * decl.c (start_function): Make member functions one_only on windows.
4010 * decl2.c (import_export_decl): Likewise.
4011
4012 * decl.c (grokdeclarator): Don't complain about implicit int in
4013 a system header. Change same-name field check to not complain in
4014 a system header instead of within extern "C".
4015
4016 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4017
4018 * cp-tree.h (PUSH_GLOBAL): New macro.
4019 (PUSH_LOCAL): Likewise.
4020 (PUSH_USING): Likewise.
4021 (namespace_bindings_p): Declare.
4022 (push_overloaded_decl): Likewise.
4023 * decl.c (push_overloaded_decl): Don't make it static. Check for
4024 illegal declarations after using declarations here.
4025 (namespace_bindings_p): Likewise.
4026 (duplicate_decls): Don't consider declarations from different
4027 namespaces to be the same.
4028 (pushdecl): Use symbolic PUSH_ constants in calls to
4029 push_overloaded_decl.
4030 (push_overloaded_decl_1): Likewise.
4031 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4032 (do_nonmember_using_decl): Check for illegal using declarations
4033 after ordinary declarations here.
4034 (do_local_using_decl): Call pushdecl to insert declarations.
4035
4036 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
4037
4038 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4039
4040 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4041
4042 * tree.c (build_cplus_array_type_1): Don't call build_array_type
4043 for types involving template parameters.
4044
4045 * cp-tree.h (PARM_DECL_EXPR): Delete.
4046 (convert_default_arg): Change prototype.
4047 (check_default_argument): Declare.
4048 (search_tree): Likewise.
4049 * call.c (convert_default_arg): Take the function to which the
4050 default argument belongs as a parameter, and do any necessary
4051 instantiation here, instead of ...
4052 (build_over_call): Here.
4053 * decl.c (local_variable_p): New function.
4054 (check_default_argument): Likewise, split out and tidied from ...
4055 (grokparms): Here.
4056 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4057 * pt.c (tsubst_call_declarator_parms): New function.
4058 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
4059 with CALL_EXPRs, rather than trying to be clever.
4060 (tsubst): Use tsubst_call_declarator_parms.
4061 * tree.c (search_tree): Don't make it static.
4062 * typeck.c (convert_arguments): Use new interface to
4063 convert_default_arg.
4064
4065 1999-01-20 Mark Mitchell <mark@markmitchell.com>
4066
4067 * error.c (dump_function_decl): Don't print the argument types for
4068 a function when the verbosity level is negative.
4069
4070 * call.c (build_over_call): Check format attributes at call-time.
4071
4072 * pt.c (tsubst_copy): Fix comment.
4073 (unify): Don't allow unification with variable-sized arrays.
4074
4075 * semantics.c (finish_stmt_expr): When processing a template make
4076 the BIND_EXPR long-lived.
4077
4078 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
4079
4080 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4081 (import_export_vtable): Not here.
4082
4083 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4084
4085 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4086 non-static member function.
4087
4088 1999-01-18 Nathan Sidwell <nathan@acm.org>
4089
4090 * class.c (instantiate_type): Only diagnose illegal address of member
4091 function if complaining.
4092
4093 * decl.c (lookup_name_real): Remove duplicate code.
4094
4095 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4096
4097 * tree.c (copy_template_template_parm): Use permanent_obstack.
4098
4099 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4100
4101 * pt.c (unify): Remove restrictions on deduction of argument
4102 of template template parameters.
4103
4104 1999-01-18 Nathan Sidwell <nathan@acm.org>
4105
4106 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4107
4108 * class.c (resolve_address_of_overloaded_function): Show list of
4109 all candidates, when none of them match.
4110
4111 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
4112
4113 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4114 definition of 'casting away const' in reinterpret_cast<>.
4115
4116 1999-01-18 Graham <grahams@rcp.co.uk>
4117
4118 * cvt.c: Add include for decl.h, remove extern for
4119 static_aggregates which is now provided by decl.h.
4120
4121 * Makefile.in (cvt.o): Add dependency for decl.h and missing
4122 dependencies for convert.h and flags.h.
4123
4124 1999-01-18 Nathan Sidwell <nathan@acm.org>
4125
4126 * decl2.c (do_dtors): Set current location to that of the
4127 decl, for sensible diagnostics and debugging.
4128 (check_classfn): Issue `incomplete type' error, if
4129 class is not defined.
4130
4131 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4132
4133 * cp-tree.h: Add prototype for bound_pmf_p.
4134
4135 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4136 Manfred Hollstein <manfred@s-direktnet.de>
4137
4138 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4139 -Wreturn-type.
4140
4141 1999-01-16 Nathan Sidwell <nathan@acm.org>
4142
4143 * cp-tree.h (struct lang_type): Added has_mutable flag.
4144 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4145 (TYPE_HAS_MUTABLE_P): New macro to read it.
4146 (cp_has_mutable_p): Prototype for new function.
4147 * class.c (finish_struct_1): Set has_mutable from members.
4148 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4149 it contains a mutable.
4150 * typeck.c (cp_has_mutable_p): New function.
4151
4152 1999-01-15 Mark Mitchell <mark@markmitchell.com>
4153
4154 * pt.c (process_template_parm): Ignore top-level qualifiers on
4155 non-type parameters.
4156
4157 * decl.c (start_function): Use current_function_parms in the call
4158 to require_complete_type_for_parms, not the probably empty
4159 DECL_ARGUMENTS.
4160
4161 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
4162
4163 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4164
4165 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4166 that we don't suppress the other copies.
4167 * lex.c (handle_cp_pragma): Likewise.
4168
4169 1999-01-13 Mark Mitchell <mark@markmitchell.com>
4170
4171 * decl.c (grokdeclarator): Undo 1998-12-14 change.
4172 * tree.c (build_cplus_array_type_1): Likewise.
4173 * pt.c (instantiate_class_template): Remove misleading comment.
4174 (tsubst_aggr_type): Substitute if there are template parameters,
4175 regardless of whether or not they use template arguments.
4176 (unify): Likewise, but for unification.
4177
4178 1999-01-12 Richard Henderson <rth@cygnus.com>
4179
4180 * cp-tree.h (flag_permissive): Declare extern.
4181
4182 1999-01-06 Mark Mitchell <mark@markmitchell.com>
4183
4184 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4185 here.
4186 (lang_type): Add is_partial_instantiation. Decrease width of
4187 dummy.
4188 (PARTIAL_INSTANTIATION_P): New macro.
4189 (OPERATOR_TYPENAME_P): Remove.
4190 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4191 OPERATOR_TYPENAME_P.
4192 (grok_op_properties): Likewise.
4193 * friend.c (do_friend): Handle friends that are member functions
4194 correctly.
4195 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4196 * pt.c (instantiate_class_template): Rework for clarity. Avoid
4197 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
4198 any more partial instantiation than is absolutely necessary for
4199 implicit typename. Set PARTIAL_INSTANTIATION_P.
4200 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
4201 * semantics.c (begin_class_definition): Handle partial
4202 specializations of a type that was previously partially
4203 instantiated.
4204
4205 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
4206
4207 * g++spec.c (LIBSTDCXX): Provide default definition.
4208 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
4209
4210 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4211
4212 * Make-lang.in (g++.o): Depend on prefix.h.
4213
4214 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
4215
4216 * tree.c (bound_pmf_p): New fn.
4217 * typeck.c (build_c_cast): Use it.
4218
4219 * decl.c (grok_op_properties): Use same_type_p.
4220
4221 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4222
4223 * Makefile.in (cvt.o): Depend on toplev.h.
4224
4225 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
4226
4227 * cvt.c: Include toplev.h.
4228
4229 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
4230 definitions.
4231
4232 * init.c (expand_vec_init): Initialize variable `itype'.
4233
4234 * lex.c (yyerror): Cast the argument passed to a ctype function to
4235 an unsigned char.
4236
4237 * method.c (build_mangled_C9x_name): Wrap prototype and definition
4238 in "HOST_BITS_PER_WIDE_INT >= 64".
4239
4240 * typeck.c (build_binary_op): Mark parameter `convert_p' with
4241 ATTRIBUTE_UNUSED.
4242
4243 1998-12-22 Mark Mitchell <mark@markmitchell.com>
4244
4245 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
4246 * tree.c (build_exception_variant): Don't crash on empty throw
4247 specs.
4248
4249 1998-12-18 DJ Delorie <dj@cygnus.com>
4250
4251 * cvt.c (convert_to_reference): Check for both error_mark_node
4252 and NULL_NODE after call to convert_for_initialization.
4253
4254 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
4255
4256 * error.c (interesting_scope_p): New fn.
4257 (dump_simple_decl): Use it.
4258 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
4259 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
4260
4261 1998-12-16 Mark Mitchell <mark@markmitchell.com>
4262
4263 * class.c (resolve_address_of_overloaded_function): Do conversion
4264 to correct type here, rather than ...
4265 (instantiate_type): Here.
4266
4267 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
4268 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
4269 (decl_template_parm_p): Remove.
4270 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
4271 parameter.
4272 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
4273 * pt.c (push_inline_template_parms_recursive): Set it.
4274 (decl_template_parm_p): Remove.
4275 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
4276 (process_template_parm): Set it.
4277
4278 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
4279
4280 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
4281 if configured with cpplib.
4282
4283 1998-12-15 Mark Mitchell <mark@markmitchell.com>
4284
4285 * decl.c (poplevel): Make sure ns_binding is initialized.
4286
4287 * decl.c (finish_function): Undo inadvertent change in previous
4288 patch.
4289
4290 1998-12-14 Mark Mitchell <mark@markmitchell.com>
4291
4292 * class.c (pushclass): Tweak handling of class-level bindings.
4293 (resolve_address_of_overloaded_function): Update pointer-to-member
4294 handling.
4295 (instantiate_type): Likewise.
4296 * cvt.c (cp_convert_to_pointer): Likewise.
4297 * decl.c (pop_binding): Take the DECL to pop, not just the name.
4298 Deal with `struct stat' hack.
4299 (binding_level): Add to documentation.
4300 (push_binding): Clear BINDING_TYPE.
4301 (add_binding): New function.
4302 (push_local_binding): Use it.
4303 (push_class_binding): Likewise.
4304 (poplevel): Adjust calls to pop_binding.
4305 (poplevel_class): Likewise.
4306 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
4307 declarations to current binding level.
4308 (push_class_level_binding): Likewise.
4309 (push_overloaded_decl): Adjust handling of OVERLOADs in local
4310 bindings.
4311 (lookup_namespace_name): Don't crash when confronted with a
4312 TEMPLATE_DECL.
4313 (lookup_name_real): Do `struct stat' hack in local binding
4314 contexts.
4315 (build_ptrmemfunc_type): Adjust documentation.
4316 (grokdeclarator): Don't avoid building real array types when
4317 processing templates unless really necessary.
4318 (finish_method): Adjust calls to pop_binding.
4319 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
4320 not reparse_decl_as_expr.
4321 (build_expr_from_tree): Deal with a template-id as the function to
4322 call in a METHOD_CALL_EXPR.
4323 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
4324 (maybe_adjust_types_For_deduction): Don't do peculiar things with
4325 METHOD_TYPEs here.
4326 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
4327 pointer-to-member types where necessary.
4328 * tree.c (build_cplus_array_type_1): Don't avoid building real
4329 array types when processing templates unless really necessary.
4330 (build_exception_variant): Compare the exception lists correctly.
4331
4332 1998-12-13 Mark Mitchell <mark@markmitchell.com>
4333
4334 * cp-tree.def (CPLUS_BINDING): Update documentation.
4335 * cp-tree.h (LOCAL_BINDING_P): New macro.
4336 (lang_identifier): Rename local_value to bindings.
4337 (tree_binding): Make `scope' of type `void*', not `tree'.
4338 (BINDING_SCOPE): Update documentation.
4339 (IDENTIFIER_LOCAL_VALUE): Remove.
4340 (IDENTIFIER_CLASS_VALUE): Document.
4341 (IDENTIFIER_BINDING): New macro.
4342 (IDENTIFIER_VALUE): Likewise.
4343 (TIME_IDENTIFIER_TIME): Likewise.
4344 (TIME_IDENTIFIER_FILEINFO): Likewise.
4345 (IMPLICIT_TYPENAME_P): Likewise.
4346 (set_identifier_local_value): Remove.
4347 (push_local_binding): New function.
4348 (push_class_binding): Likewise.
4349 * class.c (pushclass): Update comments; use push_class_binding.
4350 * decl.c (set_identifier_local_value_with_scope): Remove.
4351 (set_identifier_local_value): Likewise.
4352 (push_binding): New function.
4353 (pop_binding): Likewise.
4354 (binding_level): Update documentation. Remove shadowed.
4355 (BINDING_LEVEL): New macro.
4356 (free_binding_nodes): New variable.
4357 (poplevel): Adjust for new name-lookup scheme. Don't mess up
4358 BLOCK_VARs when doing for-scope extension. Remove effectively
4359 dead code.
4360 (pushlevel_class): Tweak formatting.
4361 (poplevel_class): Adjust for new name-lookup scheme.
4362 (print_binding_level): Likewise.
4363 (store_bindings): Likewise.
4364 (pushdecl): Likewise.
4365 (pushdecl_class_level): Likewise.
4366 (push_class_level_binding): Likewise.
4367 (push_overloaded_decl): Update comments. Adjust for new
4368 name-lookup scheme.
4369 (lookup_name_real): Likewise.
4370 (lookup_name_current_level): Likewise.
4371 (cp_finish_decl): Likewise.
4372 (require_complete_types_for_parms): Likewise. Remove misleading
4373 #if 0'd code.
4374 (grok_parms): Likewise. Don't call
4375 require_complete_types_for_parms here.
4376 (grok_ctor_properties): Don't treat templates as copy
4377 constructors.
4378 (grop_op_properties): Or as assignment operators.
4379 (start_function): Document. Adjust for new name-lookup scheme.
4380 (finish_function): Likewise.
4381 * decl2.c (do_local_using_decl): Use push_local_binding.
4382 * lex.c (begin_definition_of_inclass_inline): New function, split
4383 out from ...
4384 (do_pending_inlines): Here, and ...
4385 (process_next_inline): Here.
4386 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
4387 (init_filename_times): Likewise.
4388 (extract_interface_info): Likewise.
4389 (ste_typedecl_interface_info): Likewise.
4390 (check_newline): Likewise.
4391 (dump_time_statistics): Likewise.
4392 (handle_cp_pragma): Likewise.
4393 (do_identifier): Adjust for new name-lookup scheme.
4394 * parse.y (function_try_block): Return ctor_initializer_opt value.
4395 (fndef): Use it.
4396 (fn.defpen): Pass appropriate values to start_function.
4397 (pending_inline): Use functor_try_block value, and pass
4398 appropriate values to finish_function.
4399 * pt.c (is_member_template): Update documentation; remove handling
4400 of FUNCTION_DECLs. As per name, this function should deal only in
4401 TEMPLATE_DECLs.
4402 (decl_template_parm_p): Change name of olddecl parameter to decl.
4403 (check_template_shadow): Adjust for new name-lookup scheme.
4404 (lookup_template_class): Likewise.
4405 (tsubst_decl): Tweak so as not to confuse member templates with
4406 copy constructors and assignment operators.
4407 (unify): Handle UNION_TYPEs.
4408 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4409 (lang_print_xnode): Adjust for new name-lookup scheme.
4410 * typeck.c (mark_addressable): Likewise.
4411 (c_expand_return): Likewise.
4412
4413 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
4414
4415 * decl.c (grokdeclarator): Allow field with same name as class
4416 in extern "C".
4417
4418 * decl.c (lookup_name_real): Don't limit field lookup to types.
4419 * class.c (check_member_decl_is_same_in_complete_scope): No error
4420 if icv and x are the same.
4421 * lex.c (do_identifier): Tweak error message.
4422
4423 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4424
4425 * decl.c (start_enum): Use push_obstacks, not
4426 end_temporary_allocation.
4427 (finish_enum): Call pop_obstacks.
4428
4429 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4430
4431 * class.c (instantiate_type): Return error_mark_node rather than
4432 junk.
4433
4434 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4435
4436 * cp-tree.h (most_specialized_instantiation): New function.
4437 (print_candidates): Likewise.
4438 * class.c (validate_lhs): Remove.
4439 (resolve_address_of_overloaded_function): New function, split out
4440 and then substantially reworked, from ...
4441 (instantiate_type): Use it. Simplify.
4442 * cvt.c (convert_to_reference): Complain when caller has indicated
4443 that's the right thing to do. Don't crash if instantiate_type
4444 fails.
4445 * pt.c: Substitute `parameters' for `paramters' throughout.
4446 (print_candidates): Don't make it static.
4447 (most_specialized_instantiation): Split out from ...
4448 (most_specialized): Here.
4449
4450 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
4451
4452 * lex.c (lang_init_options): Initialize cpplib.
4453 * decl2.c (parse_options,cpp_initialized): Removed.
4454 (lang_decode_option): Move initialization of cpplib to
4455 lang_init_options.
4456
4457 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4458
4459 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4460 well as the TYPE_DECL, when a typedef name is assigned to a
4461 previously anonymous type.
4462
4463 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
4464
4465 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4466 __cp_eh_info for getting the eh info pointer. Add table_index to
4467 field list.
4468 (push_eh_cleanup): Don't increment 'handlers' data field.
4469 (process_start_catch_block): Don't set the 'caught' field.
4470
4471 * cp/exception.cc (CP_EH_INFO): New macro for getting the
4472 exception info pointer within library routines.
4473 (__cp_eh_info): Use CP_EH_INFO.
4474 (__start_cp_handler): Get exception info pointer, set caught field,
4475 and increment the handlers field. Avoids this being done by handlers.
4476 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4477 (uncaught_exception): Use CP_EH_INFO macro.
4478
4479 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
4480
4481 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4482
4483 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
4484
4485 * lex.c (check_newline): Add support for \ as `natural'
4486 characters in file names in #line to be consistent with #include
4487 handling. We support escape processing in the # 1 "..." version of
4488 the command. See also support in cp/lex.c.
4489
4490 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
4491
4492 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4493 structure.
4494
4495 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
4496
4497 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4498
4499 * error.c (dump_simple_decl): Also print namespace context.
4500 (dump_function_decl): Likewise.
4501
4502 * decl2.c (ambiguous_decl): Don't print old value if it's
4503 error_mark_node.
4504
4505 * decl.c (lookup_name_real): Fix handling of local types shadowed
4506 by a non-type decl. Remove obsolete code.
4507 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4508
4509 * lang-options.h: Add -fpermissive.
4510 * decl2.c: Likewise.
4511 * cp-tree.h: Add flag_permissive.
4512 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4513 were specified, set flag_pedantic_errors.
4514 * call.c (build_over_call): Turn dropped qualifier messages
4515 back into pedwarns.
4516 * cvt.c (convert_to_reference): Likewise.
4517 * typeck.c (convert_for_assignment): Likewise.
4518
4519 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
4520
4521 * decl2.c (coerce_new_type): Use same_type_p.
4522 (coerce_delete_type): Likewise.
4523
4524 * call.c (check_dtor_name): Return 1, not error_mark_node.
4525
4526 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
4527
4528 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4529 if MULTIPLE_SYMBOL_SPACES.
4530
4531 * pt.c (check_template_shadow): New fn.
4532 * decl2.c (grokfield): Use it.
4533 * decl.c (pushdecl): Likewise.
4534 (pushdecl_class_level): Likewise.
4535 (start_method): Likewise.
4536 (xref_tag): Don't try to use 't' if we're defining.
4537
4538 * call.c (check_dtor_name): Just return an error_mark_node.
4539 * pt.c (lookup_template_class): Complain about using non-template here.
4540 * parse.y (apparent_template_type): Not here.
4541
4542 * pt.c (check_explicit_specialization): Complain about specialization
4543 with C linkage.
4544
4545 * lang-options.h: Add -f{no-,}implicit-inline-templates.
4546
4547 * pt.c (convert_nontype_argument): Don't assume that any integer
4548 argument is intended to be a constant-expression.
4549
4550 1998-12-03 Mark Mitchell <mark@markmitchell.com>
4551
4552 * class.c (handle_using_decl): Fix comment. Don't lookup
4553 constructors in base classes.
4554 (validate_lhs): Fix typo in comment.
4555 * search.c (lookup_field_1): Don't return a USING_DECL.
4556
4557 * cp-tree.h (DECL_ACCESS): Improve documentation.
4558
4559 * decl.c (expand_static_init): Don't set the initialization-done
4560 flag until the initialization is done.
4561
4562 1998-12-02 Mark Mitchell <mark@markmitchell.com>
4563
4564 * decl2.c (validate_nonmember_using_decl): Complain about using
4565 declarations for class members.
4566
4567 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
4568
4569 * typeck2.c (process_init_constructor): Use same_type_p.
4570
4571 * decl.c (check_tag_decl): Don't warn about null decl inside a
4572 class.
4573
4574 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4575 UNIFY_ALLOW_NONE.
4576 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4577 (resolve_overloaded_unification): Strip baselinks.
4578
4579 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4580
4581 * g++spec.c: Don't prototype xmalloc.
4582
4583 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
4584
4585 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4586
4587 * decl.c (check_tag_decl): Do complain about null friend decl at
4588 file scope.
4589
4590 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4591
4592 * lex.c (make_lang_type): Clear the whole struct lang_type, not
4593 only the first multiple of sizeof (int).
4594
4595 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4596
4597 * decl.c (start_decl): An explicit specialization of a static data
4598 member is only a definition if it has an initializer.
4599
4600 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4601 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4602 cp_finish_decl.
4603 * init.c (expand_default_init): Check for DIRECT_BIND instead of
4604 DECL_ARTIFICIAL.
4605
4606 * call.c (build_over_call): Use build_decl.
4607
4608 * except.c (expand_throw): Just use convert, not
4609 build_reinterpret_cast.
4610
4611 * lex.c (handle_generic_pragma): Use token_buffer.
4612
4613 * decl.c (check_tag_decl): Don't complain about null friend decl.
4614
4615 1998-11-24 Dave Pitts <dpitts@cozx.com>
4616
4617 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4618 first position.
4619 * lex.c (check_newline): Use ISALPHA.
4620 (readescape): Use ISGRAPH.
4621 (yyerror): Use ISGRAPH.
4622
4623 1998-11-24 Nathan Sidwell <nathan@acm.org>
4624
4625 * search.c (get_abstract_virtuals): Do not use initial
4626 CLASSTYPE_ABSTRACT_VIRTUALS.
4627 * typeck2.c (abstract_virtuals_error): Show location of abstract
4628 declaration.
4629 * call.c (build_new_method_call): Use
4630 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4631 * class.c (finish_struct_bits): Don't bother working out whether
4632 get_abstract_virtuals will do anything, just do it.
4633
4634 1998-11-24 Graham <grahams@rcp.co.uk>
4635
4636 * typeck.c (build_component_ref): Remove unused statement.
4637
4638 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4639
4640 * class.c (add_method): Catch invalid overloads.
4641
4642 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4643 * search.c (lookup_conversions): Handle getting real OVERLOADs.
4644 (add_conversions): Likewise. Revert last change.
4645 * call.c (add_conv_candidate): Pass totype to add_candidate instead
4646 of fn. Don't add a new candidate if the last one was for the same
4647 type.
4648 (print_z_candidates): Handle getting a type as a function.
4649 (joust): If we got two conversion candidates to the same type,
4650 just pick one.
4651 (build_object_call): Lose 'templates'.
4652 (build_user_type_conversion_1): Handle getting real OVERLOADs.
4653
4654 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4655
4656 * typeck2.c (process_init_constructor): If there are elements
4657 that don't have initializers and they need to have constructors
4658 run, supply them with initializers.
4659
4660 * class.c (finish_struct_1): A class with a 0-width bitfield is
4661 still empty.
4662
4663 1998-11-23 Mark Mitchell <mark@markmitchell.com>
4664
4665 * pt.c (instantiate_class_template): Don't try to figure out what
4666 specialization to use for a partial instantiation. Correct
4667 typos in a couple of comments. Avoid calling uses_template_parms
4668 multiple times.
4669
4670 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
4671
4672 * method.c (process_overload_item): Add call to
4673 build_mangled_C9x_name for intTI_type_nodes.
4674 (build_mangled_C9x_name): Add prototype, define.
4675 * decl.c (init_decl_processing): Add names for
4676 TImode_type_node.
4677
4678 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4679
4680 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4681
4682 * class.c (finish_struct_1): Set things up for 0-width bitfields
4683 like we do for others.
4684
4685 * decl.c (check_tag_decl): New fn.
4686 (shadow_tag): Split out from here.
4687 * decl2.c (grok_x_components): Call it.
4688
4689 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
4690
4691 * decl.c: Lose warn_about_return_type.
4692 (grokdeclarator): Always complain about implicit int, except for
4693 `main () { ... }'.
4694
4695 * decl.c (tag_name): New fn.
4696 (xref_tag): Complain about using typedef-name after class-key.
4697
4698 * init.c (expand_vec_init): Also keep going if from_array.
4699
4700 * tree.c (is_overloaded_fn): Also handle the output of
4701 build_offset_ref.
4702
4703 * decl.c (grokdeclarator): Use constructor_name when comparing
4704 field name against enclosing class.
4705 * class.c (finish_struct_anon): Likewise.
4706
4707 1998-11-22 Mark Mitchell <mark@markmitchell.com>
4708
4709 * decl.c (poplevel): Remove code to handle KEEP == 2.
4710 (finish_function): Don't confuse BLOCK-order when
4711 processing a destructor.
4712
4713 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4714
4715 * decl.c (require_complete_types_for_parms): Call layout_decl
4716 after we've completed the type.
4717
4718 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
4719
4720 * decl2.c (validate_nonmember_using_decl): Allow using templates
4721 from the global namespace.
4722
4723 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4724
4725 Handle specifying template args to member function templates.
4726 * tree.c (build_overload): Always create an OVERLOAD for a template.
4727 * search.c (add_conversions): Handle finding an OVERLOAD.
4728 * decl2.c (check_classfn): Likewise.
4729 * lex.c (identifier_type): See through a baselink.
4730 * parse.y (do_id): Don't call do_identifier if we got a baselink.
4731 * class.c (instantiate_type, case TREE_LIST): Recurse.
4732
4733 * decl.c (grokdeclarator): Allow a boolean constant for array
4734 bounds, odd as that sounds.
4735
4736 * pt.c (unify): Be more strict about non-type parms, except for
4737 array bounds.
4738 (UNIFY_ALLOW_INTEGER): New macro.
4739
4740 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
4741
4742 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4743
4744 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
4745
4746 * semantics.c (begin_class_definition): Call
4747 maybe_process_partial_specialization before push_template_decl.
4748 Don't call push_template_decl for a specialization.
4749 * search.c (lookup_field): Do return a member template class.
4750 * decl2.c (handle_class_head): Handle member template classes.
4751
4752 * decl.c (grokdeclarator): A parm type need not be complete.
4753
4754 * pt.c (convert_nontype_argument): Fix thinko.
4755
4756 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4757
4758 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
4759 (global_delete_fndecl): New variable.
4760 * decl.c (global_delete_fndecl): Define it.
4761 (init_decl_processing): Set it.
4762 * init.c (build_builtin_delete_call): Use it.
4763 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
4764 nodes.
4765
4766 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4767
4768 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
4769 type.
4770
4771 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
4772 * call.c (build_object_call): Also support references to functions.
4773 * typeck.c (convert_for_initialization): Don't decay a function
4774 if the target is a reference to function.
4775
4776 * search.c (add_conversions): Get all the overloads from a class.
4777
4778 * decl.c (grok_ctor_properties): Complain about any constructor
4779 that will take a single arg of the class type by value.
4780
4781 * typeck2.c (build_functional_cast): Can't create objects of
4782 abstract classes this way.
4783 * cvt.c (ocp_convert): Likewise.
4784
4785 * decl.c (grokfndecl): Member functions of local classes are not
4786 public.
4787
4788 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4789
4790 * Make-lang.in (cc1plus): Add dependency on hash.o.
4791
4792 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4793
4794 * search.c (get_abstract_virtuals): Complain about virtuals with
4795 no final overrider.
4796 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
4797 with no final overrider.
4798 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
4799 on virtuals with no final overrider.
4800
4801 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
4802
4803 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
4804 after layout_type.
4805
4806 * friend.c (do_friend): Don't set_mangled_name_for_decl.
4807
4808 * class.c (finish_struct_anon): Complain about non-fields.
4809 * decl2.c (build_anon_union_vars): Likewise.
4810
4811 * decl.c (grokdeclarator): Normal data members can't have the same
4812 name as the class, either.
4813 * class.c (finish_struct_anon): Neither can members of an
4814 anonymous union.
4815
4816 1998-11-17 Mark Mitchell <mark@markmitchell.com>
4817
4818 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
4819 (TYPE_BINFO): Likewise.
4820 (IS_AGGR_TYPE): Tweak.
4821 (SET_IS_AGGR_TYPE): New macro.
4822 (CLASS_TYPE_P): Tweak.
4823 (lang_type): Group mark bitfields together. Remove linenum.
4824 (CLASSTYPE_SOURCE_LINE): Remove macro.
4825 (CLASSTYPE_MARKED_N): New macro.
4826 (SET_CLASSTYPE_MARKED_N): Likewise.
4827 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
4828 (CLASS_TYPE_MARKED_*): Use them.
4829 (SET_CLASSTYPE_MARKED_*): Likewise.
4830 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
4831 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4832 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
4833 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
4834 * class.c (class_cache_obstack): New variable.
4835 (class_cache_firstobj): Likewise.
4836 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
4837 (pushclass): Free the cache, when appropriate.
4838 (popclass): Tidy.
4839 (maybe_push_cache_obstack): Use class_cache_obstack.
4840 * decl.c (include hash.h).
4841 (typename_hash): New function.
4842 (typename_compare): Likewise.
4843 (build_typename_type): Check the hash table to avoid creating
4844 duplicates.
4845 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
4846 (grokdeclarator): Use CLASS_TYPE_P.
4847 (xref_basetypes): Likewise.
4848 (start_function): Likewise. Don't put current_class_ref on the
4849 permanent obstack.
4850 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
4851 and TYPE_TI_ARGS.
4852 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
4853 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
4854 fields for types other than class types. Do clear TYPE_ALIAS_SET
4855 for types other than class types, though.
4856 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
4857 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4858 * pt.c (process_template_parm): Don't set
4859 CLASSTYPE_GOT_SEMICOLON.
4860 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4861 Coerce arguments on the momentary obstack.
4862 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4863 (instantiate_class_template): Calculate template arguments on the
4864 momentary obstack. Tidy.
4865 (tsubst_template_arg_vector): Use make_temp_vec.
4866 (tsubst_aggr_type): Put template arguments on the momentary
4867 obstack.
4868 (tsubst_decl): Likewise.
4869 (tsubst): Copy the array bounds index to the permanent obstack
4870 before building index types. Use new macros.
4871 (unify): Use new macros.
4872 (do_type_instantiation): Likewise.
4873 * search.c (lookup_fnfields_1): Use new macros.
4874 (dfs_pushdecls): Build envelopes on the cache obstack.
4875 (dfs_compress_decls): Use new macros.
4876 (push_class_decls): Build on the cache obstack.
4877 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
4878 * sign.c (build_signature_pointer_or_reference_type): Use
4879 SET_IS_AGGR_TYPE.
4880 * tree.c (make_binfo): Check CLASS_TYPE_P.
4881 (copy_template_template_parm): Adjust.
4882 (make_temp_vec): Use push_expression_obstack.
4883 * typeck.c (complete_type): Use new macros.
4884 (comptypes): Likewise.
4885
4886 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
4887
4888 * pt.c (tsubst): Add diagnostics for invalid array, reference
4889 and pointer to member types.
4890
4891 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4892
4893 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
4894
4895 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
4896 Simplify.
4897
4898 * parse.y (structsp): Fix cut-and-paste error.
4899
4900 * init.c (build_new): Complain about non-integral size.
4901
4902 * parse.y (unary_expr): Complain about defining types in sizeof.
4903
4904 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
4905
4906 * rtti.c (build_x_typeid): Complain about typeid without
4907 including <typeinfo>.
4908 (get_typeid): Likewise. Complain about typeid of incomplete type.
4909 (get_tinfo_fn_dynamic): Likewise.
4910 (get_typeid_1): Not static anymore.
4911 * except.c (build_eh_type_type): Use get_typeid_1.
4912
4913 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
4914 ambiguous or private bases. Fix warning for reference cast.
4915
4916 1998-11-16 Mark Mitchell <mark@markmitchell.com>
4917
4918 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
4919 * decl.c (duplicate_decls): Remove special-case code to deal with
4920 template friends, and just do the obvious thing.
4921 * pt.c (register_specialization): Tweak for clarity, and also to
4922 clear DECL_INITIAL for an instantiation before it is merged with a
4923 specialization.
4924 (check_explicit_specialization): Fix indentation.
4925 (tsubst_friend_function): Handle both definitions in friend
4926 declaration and outside friend declarations.
4927 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
4928 (regenerate_decl_from_template): Tweak accordingly.
4929 (instantiate_decl): Likewise.
4930
4931 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
4932
4933 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
4934 member function reference to error.
4935 * cvt.c (ocp_convert): Complain about converting an overloaded
4936 function to void.
4937
4938 * init.c (build_offset_ref): Just return a lone static member
4939 function.
4940
4941 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
4942 not internal ones.
4943
4944 * typeck.c (build_binary_op_nodefault): Improve error handling.
4945
4946 * decl.c (grokfndecl): Complain about making 'main' a template.
4947
4948 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
4949
4950 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
4951 TYPE_DECL in a template.
4952
4953 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
4954
4955 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
4956
4957 * decl.c (struct cp_function): Add named_label_uses.
4958 (push_cp_function_context): Save it.
4959 (pop_cp_function_context): Restore it.
4960 (define_label): Also complain about jumping into the scope of
4961 non-POD objects that don't have constructors.
4962 * tree.c (pod_type_p): New fn.
4963
4964 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
4965 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
4966 (get_tinfo_fn): Not here.
4967 * repo.c (repo_get_id): Abort if we get called for an incomplete
4968 type.
4969
4970 1998-11-13 Mark Mitchell <mark@markmitchell.com>
4971
4972 * except.c (expand_throw): Make sure first argument to
4973 __cp_push_exception is of type `void*' to avoid spurious error
4974 messages.
4975
4976 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
4977
4978 * pt.c (try_one_overload): Take orig_targs again. Only check for
4979 mismatches against them; we don't care what a previous call found.
4980 (resolve_overloaded_unification): Adjust.
4981
4982 * search.c (lookup_field): Don't return anything for a non-type
4983 field from a dependent type.
4984 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
4985 in an array declarator.
4986 (start_decl): Push into the class before looking for the field.
4987
4988 1998-11-08 Mark Mitchell <mark@markmitchell.com>
4989
4990 * method.c (build_overload_value): Handle REFERENCE_TYPE.
4991
4992 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
4993
4994 * decl.c (grokdeclarator): Allow namespace-scoped members if they
4995 are friends.
4996
4997 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
4998
4999 * pt.c (tsubst_decl): Don't mess with the global value of an
5000 un-mangled DECL_ASSEMBLER_NAME.
5001
5002 1998-11-03 Christopher Faylor <cgf@cygnus.com>
5003
5004 * decl.c (init_decl_processing): Remove CYGWIN conditional
5005 since CYGWIN is now able to deal with trapping signals.
5006
5007 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5008
5009 * cp-tree.h: Don't include gansidecl.h.
5010 * exception.cc: Include gansidecl.h (since we don't include config.h)
5011 * g++spec.c: Don't include gansidecl.h.
5012
5013 1998-11-06 Mark Mitchell <mark@markmitchell.com>
5014
5015 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
5016 size of dummy.
5017 (DECL_DEFINED_IN_CLASS_P): New macro.
5018 (TEMPLATE_PARMS_FOR_INLINE): Document.
5019 (check_static_variable_definition): New function.
5020 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5021 appropriate.
5022 (check_static_variable_definition): Split out from ...
5023 (grokdeclarator): Here.
5024 * pt.c (check_default_tmpl_args): New function, split out from ...
5025 (push_template_decl_real): Here.
5026 (instantiate_template): Fix comment.
5027
5028 1998-11-04 Mark Mitchell <mark@markmitchell.com>
5029
5030 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5031 (CP_TYPE_VOLATILE_P): Likewise.
5032 (CP_TYPE_RESTRICT_P): Likewise.
5033
5034 1998-11-03 Mark Mitchell <mark@markmitchell.com>
5035
5036 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5037
5038 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
5039
5040 * class.c (instantiate_type): Be more helpful.
5041
5042 * decl2.c (import_export_decl): Call import_export_class.
5043
5044 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5045 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5046 * pt.c (tsubst_copy): Likewise.
5047
5048 1998-11-02 Mark Mitchell <mark@markmitchell.com>
5049
5050 * init.c (expand_vec_init): Fix off-by-one error.
5051
5052 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
5053
5054 * parse.y (apparent_template_type): New type.
5055 (named_complex_class_head_sans_basetype): Use it.
5056 * Makefile.in (CONFLICTS): One new conflict.
5057 * parse.c: Regenerated.
5058
5059 1998-11-01 Mark Mitchell <mark@markmitchell.com>
5060
5061 * cp-tree.h (COMPARE_STRICT): New macro.
5062 (COMPARE_BASE): Likewise.
5063 (COMPARE_RELAXED): Likewise.
5064 (COMPARE_REDECLARATION): Likewise.
5065 (same_type_p): Likewise.
5066 (same_or_base_type_p): Likewise.
5067 * call.c (standard_conversion): Use them, in place of comptypes
5068 with numeric arguments.
5069 (reference_binding): Likewise.
5070 (convert_like): Likewise.
5071 (build_over_call): Likewise.
5072 (is_subseq): Likewise.
5073 (is_properly_derived_from): Likewise.
5074 (compare_ics): Likewise.
5075 (joust): Likewise.
5076 * class.c (delete_duplicate_fields_1): Likewise.
5077 (resolves_to_fixed_type_p): Likewise.
5078 (instantiate_type): Likewise. Remove #if 0'd code.
5079 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
5080 (pushdecl): Likewise.
5081 (lookup_name_real): Likewise.
5082 (grokdeclarator): Likewise. Check for illegal array declarations.
5083 (grokparms): Likewise.
5084 (grok_op_properties): Likewise.
5085 * decl2.c (check_classfn): Likewise.
5086 * friend.c (is_friend): Likewise.
5087 (make_friend_class): Likewise.
5088 * init.c (expand_aggr_init): Likewise.
5089 (expand_vec_init): Likewise.
5090 * pt.c (is_member_template_class): Remove declaration.
5091 (is_specialization_of): Use COMPARE_* and new macros.
5092 (comp_template_parms): Likewise.
5093 (convert_nontype_argument): Likewise.
5094 (coerce_template_template_parms): Likewise.
5095 (template_args_equal): Likewise.
5096 (lookup_template_class): Likewise.
5097 (type_unification_real): Likewise.
5098 (unify): Likewise.
5099 (get_bindings_real): Likewise.
5100 * search.c (covariant_return_p): Likewise.
5101 (get_matching_virtual): Likewise.
5102 * sig.c (match_method_types): Likewise.
5103 * tree.c (vec_binfo_member): Likewise.
5104 (cp_tree_equal): Likewise.
5105 * typeck.c (common_type): Likewise.
5106 (comp_array_types): Likewise. Get issues involving unknown array
5107 bounds right.
5108 (comptypes): Update comments. Use new flags.
5109 (comp_target_types): Use new macros.
5110 (compparms): Likewise.
5111 (comp_target_parms): Likewise.
5112 (string_conv_p): Likewise.
5113 (build_component_ref): Likewise.
5114 (build_indirect_ref): Likewise.
5115 (build_conditional_expr): Likewise.
5116 (build_static_cast): Likewise.
5117 (build_reinterpret_cast): Likewise.
5118 (build_const_cast): Likewise.
5119 (build_modify_expr): Likewise.
5120 (convert_for_assignment): Likewise.
5121 (comp_ptr_ttypes_real): Likewise.
5122 (ptr_reasonably_similar): Likewise.
5123 (comp_ptr_ttypes_const): Likewise.
5124
5125 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
5126
5127 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5128
5129 1998-10-30 Mark Mitchell <mark@markmitchell.com>
5130
5131 * decl2.c (delete_sanity): Pass integer_zero_node, not
5132 integer_two_node, to build_vec_delete.
5133 * init.c (build_array_eh_cleanup): Remove.
5134 (expand_vec_init_try_block): New function.
5135 (expand_vec_init_catch_clause): Likewise.
5136 (build_vec_delete_1): Don't deal with case that auto_delete_vec
5137 might be integer_two_node anymore.
5138 (expand_vec_init): Rework for initialization-correctness and
5139 exception-correctness.
5140 * typeck2.c (process_init_constructor): Make mutual exclusivity
5141 of cases more obvious.
5142
5143 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
5144
5145 * decl.c (lookup_name_real): OK, only warn if not lexing.
5146 Simplify suggested fix.
5147
5148 * cp-tree.h (IDENTIFIER_MARKED): New macro.
5149 * search.c (lookup_conversions): Use breadth_first_search.
5150 (add_conversions): Avoid adding two conversions to the same type.
5151 (breadth_first_search): Work with base binfos, rather
5152 than binfos and base indices.
5153 (get_virtual_destructor): Adjust.
5154 (tree_has_any_destructor_p): Adjust.
5155 (get_matching_virtual): Adjust.
5156
5157 * pt.c (push_template_decl_real): Generalize check for incorrect
5158 number of template parms.
5159 (is_member_template_class): #if 0.
5160
5161 1998-10-29 Richard Henderson <rth@cygnus.com>
5162
5163 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5164 last.
5165
5166 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
5167
5168 * lex.c: Call check_newline from lang_init always. After
5169 calling cpp_start_read, set yy_cur and yy_lim to read from the
5170 cpplib token buffer.
5171
5172 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
5173
5174 * class.c (instantiate_type): Don't consider templates for a normal
5175 match.
5176
5177 * class.c (finish_struct_1): Don't complain about non-copy
5178 assignment ops in union members.
5179
5180 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5181 (prepare_fresh_vtable): Likewise.
5182 (finish_struct_1): Don't call import_export_class.
5183 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5184 (finish_prevtable_vardecl): Lose.
5185 (finish_file): Don't call it.
5186 * pt.c (instantiate_class_template): Likewise.
5187 * cp-tree.h: Remove it.
5188
5189 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5190 * decl.c (finish_function): Not here.
5191 (start_function): Do set DECL_INITIAL.
5192
5193 * pt.c (push_template_decl_real): Complain about default template
5194 args for enclosing classes.
5195
5196 * call.c (add_function_candidate): Treat conversion functions
5197 as coming from the argument's class.
5198 * cp-tree.h (DECL_CONV_FN_P): New fn.
5199 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
5200 * class.c (add_method): Use DECL_CONV_FN_P.
5201 * decl2.c (check_classfn): Likewise.
5202 * error.c (dump_function_name): Likewise.
5203 (dump_function_decl): Likewise.
5204 * pt.c (fn_type_unification): Likewise.
5205 * search.c (add_conversions): Likewise.
5206
5207 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5208
5209 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
5210 * method.c (hack_identifier): Also check for using RESULT_DECL
5211 from outer context.
5212
5213 1998-10-27 Mark Mitchell <mark@markmitchell.com>
5214
5215 * decl.c (grokdeclarator): Use type_quals, rather than constp,
5216 consistently.
5217
5218 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5219
5220 * call.c (standard_conversion): instantiate_type here.
5221 (reference_binding): And here.
5222 (implicit_conversion): Not here.
5223 (build_op_delete_call): No need to cons up an OVERLOAD.
5224 * cvt.c (cp_convert_to_pointer): instantiate_type here.
5225 (convert_to_reference): And here.
5226 * decl.c (grok_reference_init): Not here.
5227 (grokparms): Or here.
5228 * typeck2.c (digest_init): Or here.
5229 * typeck.c (decay_conversion): Take the address of overloaded
5230 functions, too.
5231 (require_instantiated_type): Lose.
5232 (convert_arguments): Don't handle unknown types here.
5233 (build_c_cast): Likewise.
5234 (build_binary_op): Gut.
5235 (build_conditional_expr): Don't require_instantiated_type.
5236 (build_modify_expr): Likewise.
5237 (build_static_cast): Don't instantiate_type.
5238 (build_reinterpret_cast): Likewise.
5239 (build_const_cast): Likewise.
5240 (convert_for_initialization): Likewise.
5241 (build_ptrmemfunc): Use type_unknown_p.
5242 (convert_for_assignment): Also do default_conversion on overloaded
5243 functions. Hand them off to ocp_convert.
5244
5245 1998-10-26 Mark Mitchell <mark@markmitchell.com>
5246
5247 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
5248 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
5249
5250 * class.c (finish_struct_1): Use build_cplus_array_type to build
5251 array types.
5252 * decl.c (init_decl_processing): Likewise.
5253 * except.c (expand_end_eh_spec): Likewise.
5254 * search.c (expand_upcast_fixups): Simplify very slightly.
5255
5256 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5257
5258 * decl.c (grokdeclarator): Complain about a variable using
5259 constructor syntax coming back null from start_decl.
5260
5261 * friend.c (make_friend_class): Complain about trying to make
5262 a non-class type a friend.
5263
5264 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
5265 (start_function): Not here.
5266
5267 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
5268
5269 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
5270
5271 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5272
5273 * typeck2.c (process_init_constructor): Only skip anonymous fields
5274 if they are bitfields.
5275
5276 * cp-tree.def (TYPEOF_TYPE): New code.
5277 * error.c (dump_type_real): Handle it.
5278 * pt.c (tsubst): Likewise.
5279 * tree.c (search_tree): Likewise.
5280 * semantics.c (finish_typeof): New fn.
5281 * parse.y (typespec): Use it.
5282 * cp-tree.h: Declare it.
5283
5284 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
5285
5286 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
5287
5288 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5289
5290 * typeck.c (convert_arguments): Don't handle pmf references
5291 specially.
5292
5293 * init.c (build_member_call): Don't try to convert to the base type
5294 if it's ambiguous or pedantic.
5295
5296 * typeck2.c (check_for_new_type): Only depend on pedantic for
5297 C-style casts.
5298
5299 1998-10-25 Mark Mitchell <mark@markmitchell.com>
5300
5301 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
5302 non-converting constructors.
5303
5304 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5305
5306 * gxxint.texi: Correct documentation for n, N, Q, and B.
5307
5308 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
5309
5310 * parse.y (condition): Convert VAR_DECL from reference to indirect
5311 reference.
5312
5313 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
5314
5315 * exception.cc (__cp_pop_exception): Free the original exception
5316 value, not the potentially coerced one.
5317
5318 1998-10-23 Mark Mitchell <mark@markmitchell.com>
5319
5320 * Makefile.in (hash.h): Run gperf when necessary.
5321
5322 * cp-tree.h (CP_TYPE_READONLY): Remove.
5323 (CP_TYPE_VOLATILE): Likewise.
5324 (CP_TYPE_QUALS): New macro.
5325 (CP_TYPE_CONST_P): Likewise.
5326 (CP_TYPE_VOLATILE_P): Likewise.
5327 (CP_TYPE_RESTRICT_P): Likewise.
5328 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
5329 (cp_build_type_variant): Rename to ...
5330 (cp_build_qualified_type): New function.
5331 (c_apply_type_quals_to_decl): Declare.
5332 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
5333 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
5334 (cp_type_qual_from_rid): New function.
5335 (compparms): Remove unused parameter. All callers changed.
5336 (cp_type_quals): New function.
5337 (at_least_as_qualified_p): Likewise.
5338 (more_qualified_p): Likewise.
5339
5340 * call.c (standard_conversion): Replace calls to
5341 cp_build_type_variant with cp_build_qualified_type. Use
5342 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
5343 compare them. Use CP_TYPE_* macros to check qualifiers.
5344 (reference_binding): Likewise.
5345 (implicit_conversion): Likewise.
5346 (add_builtin_candidates): Likewise.
5347 (build_over_call): Likewise.
5348 * class.c (overrides): Compare all qualifiers, not just `const',
5349 on method declarations.
5350 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
5351 (convert_pointer_to_real): Likewise.
5352 (type_promotes_to): Likewise.
5353 * decl.c (check_for_uninitialized_const_var): New function.
5354 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
5355 (cp_finish_decl): Use check_for_uninitialized_const_var.
5356 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
5357 handle `restrict'.
5358 (grok_ctor_properties): Likewise.
5359 (grok_op_properties): Likewise.
5360 (start_function): Likewise.
5361 (rever_static_member_fn): Likewise.
5362 * decl2.c (grok_method_quals): Likewise.
5363 (grokfield): Likewise.
5364 * error.c (dump_readonly_or_volatile): Rename to ...
5365 (dump_qualifiers): New function. Handle `restrict'.
5366 (dump_type_real): Use it.
5367 (dump_aggr_type): Likewise.
5368 (dump_type_prefix): Likewise.
5369 (dump_type_suffix): Likewise.
5370 (dump_function_decl): Likewise.
5371 (cv_as_string): Likewise.
5372 * gxx.gperf: Add __restrict and __restrict__.
5373 * gxxint.texi: Document `u' as used for `__restrict', and a few
5374 other previously undocumented codes.
5375 * hash.h: Regenerated.
5376 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
5377 (build_member_call): Likewise.
5378 (build_new_1): Likewise.
5379 * lex.c (init_parse): Add entry for RID_RESTRICT.
5380 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
5381 (cp_type_qual_from_rid): Define.
5382 * lex.h (enum rid): Add RID_RESTRICT.
5383 * method.c (process_modifiers): Deal with `restrict'.
5384 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
5385 * parse.c: Regenerated.
5386 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
5387 (tsubst_aggr_type): Likewise.
5388 (tsubst): Likewise.
5389 (check_cv_quals_for_unify): Likewise.
5390 (unify): Likewise.
5391 * rtti.c (init_rtti_processing): Likewise.
5392 (build_headof): Likewise.
5393 (get_tinfo_var): Likewise.
5394 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
5395 (expand_class_desc): Likewise.
5396 (expand_attr_desc): Likewise.
5397 (synthesize_tinfo_fn): Likewise.
5398 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
5399 (get_matching_virtual): Likewise.
5400 (expand_upcast_fixups): Likewise.
5401 * sig.c (build_signature_pointer_or_reference_name): Take
5402 type_quals, not constp and volatilep.
5403 (build_signature_pointer_or_reference_type): Likewise.
5404 (match_method_types): More CP_TYPE_QUALS conversion, etc.
5405 (build_signature_pointer_constructor): Likewise.
5406 (build_signature_method_call): Likewise.
5407 * tree.c (build_cplus_array_type): Likewise.
5408 (cp_build_type_variant): Rename to ...
5409 (cp_build_qualified_type): New function. Deal with `__restrict'.
5410 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5411 (build_exception_variant): Likewise.
5412 (mapcar): Likewise.
5413 * typeck.c (qualif_type): Likewise.
5414 (common_type): Likewise.
5415 (comptypes): Likewise.
5416 (comp_cv_target_types): Likewise.
5417 (at_least_as_qualified_p): Define.
5418 (more_qualified_p): Likewise.
5419 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5420 (compparms): Likewise.
5421 (inline_conversion): Likewise.
5422 (string_conv_p): Likewise.
5423 (build_component_ref): Likewise.
5424 (build_indirect_ref): Likewise.
5425 (build_array_ref): Likewise.
5426 (build_unary_op): Likewise.
5427 (build_conditional_expr): Likewise.
5428 (build_static_cast): Likewise.
5429 (build_c_cast): Likewise.
5430 (build_modify_expr): Likewise.
5431 (convert_For_assignment): Likewise.
5432 (comp_ptr_ttypes_real): Likewise.
5433 (cp_type_quals): New function.
5434
5435 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
5436
5437 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5438 (CP_TYPE_VOLATILE): Likewise.
5439 * decl.c (grokdeclarator): Use them.
5440 * tree.c (canonical_type_variant): Likewise.
5441
5442 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
5443
5444 * parse.y (named_class_head): Push into class while parsing the
5445 base class list.
5446 * decl2.c (push_scope, pop_scope): New functions.
5447 * cp-tree.h: Declare them.
5448 * init.c (build_new_1): Delay cleanup until end of full expression.
5449
5450 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
5451
5452 * typeck.c (build_component_ref): Use of a type here is an error.
5453
5454 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
5455
5456 Revamp references to member functions.
5457 * method.c (hack_identifier): Call build_component_ref for a
5458 reference to a member function.
5459 * typeck.c (build_component_ref): Only return a single function
5460 if it's static. Otherwise, return a COMPONENT_REF.
5461 (build_x_function_call): Handle a COMPONENT_REF.
5462 (build_unary_op): Handle all unknown-type things.
5463 * decl2.c (arg_assoc): Handle COMPONENT_REF.
5464 * class.c (instantiate_type): Complain if the function we get is a
5465 nonstatic member function. Remove code for finding "compatible"
5466 functions.
5467 * pt.c (tsubst_copy): Handle NOP_EXPR.
5468 * tree.c (build_dummy_object): New fn.
5469 (maybe_dummy_object): New fn.
5470 (is_dummy_object): New fn.
5471 * cp-tree.h: Declare them.
5472 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5473 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5474 * init.c (build_member_call): Use maybe_dummy_object and
5475 is_dummy_object.
5476 (build_offset_ref): Use maybe_dummy_object.
5477 (resolve_offset_ref): Use is_dummy_object.
5478 * typeck.c (build_x_function_call): Call build_dummy_object.
5479 (unary_complex_lvalue): Call is_dummy_object.
5480
5481 * typeck.c (build_component_addr): Make sure field is a field.
5482
5483 * call.c (build_new_op): Delete obsolete code.
5484
5485 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5486
5487 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
5488
5489 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5490 std if std is ignored.
5491
5492 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5493
5494 * decl.c (grokvardecl): Fix thinko.
5495
5496 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5497 not the left.
5498
5499 * parse.y (fn.def2): Fix 'attrs' format.
5500
5501 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5502
5503 * Makefile.in (CONFLICTS): Update.
5504 * parse.y (expr_or_declarator_intern): New rule.
5505 (expr_or_declarator, direct_notype_declarator, primary,
5506 functional_cast): Use it.
5507 (notype_declarator_intern): New rule.
5508 (notype_declarator, complex_notype_declarator): Use it.
5509
5510 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
5511
5512 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5513 (grokvardecl): Likewise.
5514
5515 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5516
5517 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5518 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5519
5520 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5521
5522 * pt.c (process_partial_specialization): Cast 1st argument of
5523 `bzero' to (PTR).
5524
5525 * tree.c (build_base_fields): Cast `base_align' to (int) when
5526 comparing against one.
5527
5528 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5529
5530 * decl.c (lookup_name_real): Handle template parameters for member
5531 templates where said parameters have the same name as the
5532 surrounding class.
5533
5534 * decl.c (expand_static_init): Build cleanups before entering the
5535 anonymous function used to do them to avoid access-checking
5536 confusion.
5537
5538 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5539 accidentally removed by previous change, and make DECL_RTL here.
5540 * class.c (add_method): Don't make DECL_RTL here.
5541
5542 * pt.c (for_each_template_parm): Don't examine uninstantiated
5543 default arguments.
5544
5545 1998-10-16 Dave Brolley <brolley@cygnus.com>
5546
5547 * lex.c (real_yylex): Fix unaligned access of wchar_t.
5548
5549 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5550
5551 * class.c (add_method): Fix documentation to reflect previous
5552 changes. Check for duplicate method declarations here.
5553 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5554 correctly; such things never match.
5555 (grokfndecl): Don't look for duplicate methods here.
5556 * decl2.c (check_classfn): Don't assume names are mangled.
5557 Don't add bogus member function declarations to a class before the
5558 class type is complete.
5559 (grokfield): Reformat error message.
5560 * method.c (set_mangled_name_for_decl): Don't mangle names while
5561 processing_template_decl.
5562
5563 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
5564
5565 * typeck.c (build_indirect_ref): Complain about a pointer to data
5566 member, too.
5567 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5568 data member.
5569 * init.c (resolve_offset_ref): Don't undo the above.
5570
5571 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5572 (struct lang_decl_flags): Add `bitfield'.
5573 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5574 DECL_BIT_FIELD.
5575 * decl2.c (grokbitfield, grok_alignof): Likewise.
5576 * init.c (build_offset_ref): Likewise.
5577 * typeck.c (build_component_addr, expr_sizeof): Likewise.
5578 * cvt.c (build_up_reference): Don't crash if taking the address
5579 returns error_mark_node.
5580
5581 * decl.c (grokfndecl): Also check ctype when checking for ::main().
5582
5583 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
5584
5585 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5586 Do mangling here.
5587 (grokdeclarator): Instead of here.
5588 * friend.c (do_friend): Lose special handling of ::main and
5589 __builtin_*.
5590 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5591
5592 * spew.c (yylex): Clear looking_for_typename if we got
5593 'enum { ... };'.
5594
5595 1998-10-15 Mark Mitchell <mark@markmitchell.com>
5596
5597 * class.c (maybe_warn_about_overly_private_class): Improve error
5598 messages for class with only private constructors.
5599
5600 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5601 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5602 (build_typename_type): New function.
5603 * decl.c (build_typename_type): Broken out from ...
5604 (make_typename_type): Use it.
5605 * search.c (lookup_field): Likewise.
5606
5607 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5608
5609 * pt.c (convert_nontype_argument): Check against type_referred_to.
5610 * decl.c (grokvardecl): Check for declarator name before building
5611 DECL_ASSEMBLER_NAME.
5612
5613 1998-10-14 Mark Mitchell <mark@markmitchell.com>
5614
5615 * pt.c (lookup_template_class): Add comment.
5616 (instantiate_class_template): Don't mark the _TYPE node for
5617 member class templates as an instantiation.
5618
5619 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
5620
5621 * decl.c (grokfndecl): Fix my thinko.
5622
5623 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
5624
5625 * tinfo2.cc (fast_compare): Remove.
5626 (before): Just use strcmp.
5627 * tinfo.cc (operator==): Just use strcmp.
5628
5629 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5630
5631 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5632 declarations.
5633
5634 1998-10-13 Mark Mitchell <mark@markmitchell.com>
5635
5636 * cp-tree.h (specializations_of_same_template_p): Remove.
5637 * search.c (get_template_base): Don't use it.
5638 (get_template_base_recursive): Likewise.
5639 * pt.c (specializations_of_same_template_p): Remove.
5640 (unify): Don't use it.
5641 (lookup_template_class): Find the correct parent when setting
5642 CLASSTYPE_TI_TEMPLATE.
5643
5644 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5645
5646 * tinfo.cc (operator==): Always compare names.
5647
5648 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5649
5650 * decl.c (start_function): Fix cut-and-paste error.
5651
5652 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5653
5654 * inc/typeinfo: Add #pragma interface.
5655 (operator!=): Just call operator==.
5656 * tinfo.cc: Add #pragma implementation.
5657 (operator==): Move from inc/typeinfo and tinfo2.cc.
5658 Check __COMMON_UNRELIABLE instead of _WIN32.
5659
5660 * typeck2.c (my_friendly_abort): Add URL.
5661
5662 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5663
5664 * decl.c (start_method): Added extra parameter for attributes.
5665 * cp-tree.h (start_method): Update prototype.
5666 * parse.y (fn.def2): Update start_method parameter list.
5667
5668 1998-10-11 Mark Mitchell <mark@markmitchell.com>
5669
5670 * cp-tree.h (specializations_of_same_template_p): Declare.
5671 * pt.c (specializations_of_same_template_p): New function.
5672 (unify): Use it.
5673 * search.c (get_template_base): Use it.
5674 (get_template_base_recursive): Likewise.
5675
5676 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
5677
5678 * decl2.c (start_objects): Add new variable `joiner' and
5679 initialize it properly.
5680
5681 1998-10-09 Mark Mitchell <mark@markmitchell.com>
5682
5683 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5684 change to vtable types.
5685
5686 * cvt.c (ocp_convert): Avoid infinite recursion caused by
5687 1998-10-03 change.
5688
5689 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
5690
5691 * pt.c (resolve_overloaded_unification): New fn.
5692 (try_one_overload): Likewise.
5693 (unify): Don't fail on unknown type.
5694 (type_unification_real): Likewise. Use resolve_overloaded_unification
5695 to handle an overloaded argument.
5696 (template_args_equal): Split out...
5697 (comp_template_args): From here.
5698 (determine_specialization): Also allow a template with more
5699 parms than were explicitly specified.
5700 * cp-tree.h: Add template_args_equal.
5701 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5702
5703 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
5704
5705 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5706 change.
5707
5708 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
5709
5710 * typeck.c (unsigned_type): Only return TItype nodes when
5711 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5712 (signed_type): Likewise.
5713 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5714 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5715 (init_decl_processing): Only create TItype nodes when
5716 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5717 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5718 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5719
5720 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5721
5722 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5723 (gxx.gperf): Update comments describing invocation flags.
5724 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5725
5726 1998-10-07 Mark Mitchell <mark@markmitchell.com>
5727
5728 * class.c (finish_struct_1): Add commentary on previous change.
5729
5730 * cp-tree.h (vtbl_ptr_type_node): New variable.
5731 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5732 already of the right type.
5733 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5734 Simplify code to grow vtable.
5735 * decl.c (vtbl_ptr_type_node): Define.
5736 (init_decl_processing): Initialize it.
5737
5738 1998-10-06 Mark Mitchell <mark@markmitchell.com>
5739
5740 * cp-tree.def (PTRMEM_CST): New tree node.
5741 * cp-tree.h (ptrmem_cst): New type.
5742 (lang_type): Remove local_typedecls.
5743 (dummy): Increase to 12 bits from 11.
5744 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5745 (PTRMEM_CST_CLASS): New macro.
5746 (PTRMEM_CST_MEMBER): Likewise.
5747 (current_access_specifier): New variable.
5748 (current_class_type): Remove duplicate declaration.
5749 (finish_struct): Change prototype.
5750 (unreverse_member_declarations): New function.
5751 (pushdecl_class_level): Change prototype.
5752 (grok_enum_decls): Remove.
5753 (fixup_anonymous_union): New function.
5754 (grok_x_components): Change prototype.
5755 (tsubst_chain): Remove.
5756 (finish_member_template_decl): Likewise.
5757 (check_explicit_specialization): Fix indentation.
5758 (finish_class_definition): Change prototype.
5759 (finish_member_class_template): Likewise.
5760 (finish_member_declaration): New function.
5761 (check_multiple_declarators): Likewise.
5762 * class.c (class_stack_node_t): New type.
5763 (current_class_base): Remove.
5764 (current_class_stack): Change type.
5765 (current_access_specifier): New variable.
5766 (grow_method): Remove.
5767 (check_member_decl_is_same_in_complete_scope): Break out from
5768 finish_struct.
5769 (make_method_vec): New function.
5770 (free_method_vec): Likewise.
5771 (add_implicitly_declared_members): Break out from finish_struct_1.
5772 (free_method_vecs): New variable.
5773 (add_method): Rework for direct use from parser.
5774 (handle_using_decl): Watch for NULL_TREE while iterating through
5775 CLASSTYPE_METHOD_VEC.
5776 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
5777 just do some error-checking.
5778 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
5779 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
5780 (finish_struct): Change prototype. Simplify; fields and methods
5781 are already set up at this point.
5782 (init_class_processing): Set up current_class_stack.
5783 (pushclass): Save current_access_specifier.
5784 (popclass): Restore it.
5785 (currently_open_class): Simplify.
5786 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
5787 * decl.c (saved_scope): Add access_specifier.
5788 (maybe_push_to_top_level): Save it.
5789 (pop_from_top_level): Restore it.
5790 (maybe_process_template_type_declaration): Use
5791 finish_member_declaration.
5792 (pushtag): Likewise.
5793 (pushdecl_class_level): Don't return a value.
5794 (fixup_anonymous_union): Break out from grok_x_components.
5795 (shadow_tag): Use it.
5796 (xref_tag): Complain about using an elaborated type specifier to
5797 reference a template type parameter or typedef name.
5798 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5799 (current_local_enum): Remove.
5800 (build_enumerator): Call finish_member_declaration.
5801 (grok_enum_decls): Remove.
5802 * decl2.c (grok_x_components): Simplify.
5803 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
5804 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5805 (merge_functions): Add to comment.
5806 (arg_assoc_type): Prototype.
5807 (arg_assoc): Pass as many arguments as there are parameters.
5808 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
5809 OFFSET_REF.
5810 * expr.c (cpls_expand_expr): Remove dead code. Handle
5811 PTRMEM_CST.
5812 * friend.c (do_friend): Lookup friends when in nested classes.
5813 Change comments.
5814 * init.c (build_offset_ref): Do lookup even for classes that are
5815 only partially defined.
5816 (decl_constant_value): Remove dead code.
5817 * method.c (build_overload_value): Remove hack where by TYPE was
5818 not a TYPE. Handle PTRMEM_CST.
5819 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
5820 should go.
5821 * parse.y (components, notype_components, component_decl,
5822 component_decl_1, component_declarator, component_declarator0):
5823 Now all are itype rather than ttype. Rework to add members to
5824 classes on the fly.
5825 (typesqpecqual_reserved): Use check_multiple_declarators.
5826 (structsp): Update class to finish_class_definition.
5827 (do_xref_defn): Unsplit into named_class_head.
5828 (access_specifier): Set current_access_specifier.
5829 * pt.c (set_current_access_from_decl): New function.
5830 (finish_member_template_decl): Don't take the parameters.
5831 (comp_template_args): Make more robust.
5832 (lookup_template_class): Don't use current_local_enum.
5833 (for_each_template_parm): Handle PTRMEM_CST.
5834 (instantiate_class_template): Use set_current_access_from_decl,
5835 finish_member_declaration and unreverse_member_declarations. Set
5836 lineno/input_filename before generating implicit member functions.
5837 (type_unification_real): Don't assume back-unification happens
5838 only for the last argument.
5839 (regenerate_decl_from_template): Call pushclass a bit earlier.
5840 (tsubst_chain): Remove.
5841 (tsubst_enum): Use set_current_access_from_decl.
5842 (set_mangled_name_for_template_decl): Fix indentation.
5843 * search.c (lookup_fnfields_1): Change iteration through
5844 CLASSTYPE_METHOD_VEC.
5845 (dfs_pushdecls): Likewise.
5846 (dfs_compress_decls): Likewise.
5847 (add_conversions): Likewise.
5848 * semantics.c (finish_class_definition): Don't take components.
5849 Change call to finish_struct.
5850 (finish_member_declaration): New function.
5851 (finish_member_class_template): Don't take template parameters.
5852 Change call to grok_x_components. Call finish_member_template_decl.
5853 (check_multiple_declarators): New function.
5854 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
5855 a passed in fieldlist.
5856 * tree.c (search_tree): Handle PTRMEM_CST.
5857 (mapcar): Likewise.
5858 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
5859 INTEGER_CSTs, for pointer-to-data members.
5860
5861 * call.c (resolve_args): Resolve template specializations, if
5862 possible.
5863
5864 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5865
5866 * Makefile.in (spew.o): Depend on toplev.h.
5867
5868 * call.c (compare_ics): Initialize variables `deref_from_type2',
5869 `deref_to_type1' and `deref_to_type2'.
5870
5871 * except.c (get_eh_type): Hide prototype and definition.
5872 (process_start_catch_block_old): Remove unused static prototype.
5873
5874 * pt.c (tsubst_decl): Initialize variable `argvec'.
5875
5876 * spew.c: Include toplev.h.
5877
5878 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
5879
5880 * pt.c (instantiate_decl): Do save and restore file position.
5881
5882 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
5883
5884 * method.c (build_decl_overload_real): Clear
5885 numeric_output_need_bar after __.
5886
5887 1998-10-05 Nathan Sidwell <nathan@acm.org>
5888
5889 * call.c (build_new_method_call): Issue 'incomplete type' error,
5890 if class is not defined.
5891
5892 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5893
5894 * call.c (build_object_call): Move declaration of variable
5895 `fn' into the scope where it is used. Don't access variable
5896 `fn' when it is uninitialized, instead use `fns'.
5897
5898 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5899
5900 * errfn.c (cp_thing): Print buf as a string not as a printf format
5901 to avoid problems with the operator%. Consequently, `%%' sequences
5902 in format are copied as `%' in buf.
5903
5904 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
5905
5906 * pt.c (pop_tinst_level): Call extract_interface_info.
5907 (instantiate_decl): Don't save and restore file position.
5908
5909 * decl.c (cp_finish_decl): Make statics in extern inlines and
5910 templates common, if possible and the target doesn't support weak
5911 symbols.
5912
5913 * decl.c (grokdeclarator): Remove redundant calls to
5914 build_type_variant and some duplicated code.
5915 * sig.c (build_signature_reference_type): Only take the type parm.
5916 (build_signature_pointer_type): Likewise.
5917 * tree.c (build_cplus_method_type): Adjust.
5918 * cp-tree.h: Update.
5919
5920 1998-10-04 Mark Mitchell <mark@markmitchell.com>
5921
5922 * call.c (build_over_call): Make pedwarns about dropped qualifiers
5923 into full-fledged errors.
5924 * cvt.c (convert_to_reference): Likewise.
5925 * typeck.c (convert_for_assignment): Likewise.
5926
5927 * search.c (expand_upcast_vtables): In addition to unsetting
5928 TREE_READONLY, remove top-level const type qualifier.
5929
5930 1998-10-03 Mark Mitchell <mark@markmitchell.com>
5931
5932 * class.c (current_class_ptr, current_class_ref): Clarify
5933 documentation.
5934 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
5935 NOP type conversions.
5936 * decl.c (decls_match): Use comptypes directly; ignore
5937 qualifiers on the DECL.
5938 (duplicate_decls): Remove qualifier checks on DECL.
5939 (grokdeclarator): Make the type built up include top-level
5940 qualifiers.
5941 * decl2.c (do_dtors): Fix spelling error.
5942 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
5943 when printing type information.
5944 * init.c (build_new_1): Add documentation. Deal with the fact
5945 that type of allocated memory now contains qualifiers.
5946 * lex.c (is_global): Improve error-recovery.
5947 * sig.c (build_member_function_pointer): Don't cast away const
5948 on fields of sigtable_entry_type.
5949 * tree.c (lvalue_type): Don't look at top-level qualifiers on
5950 expressions.
5951 * typeck.c (decay_conversion): Likewise.
5952 (build_component_ref): Make sure the type of the COMPONENT_REF
5953 contains top-level qualifiers, as appropriate. Improve
5954 error-handling.
5955 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
5956 (build_array_ref): Likewise.
5957 (build_unary_op): Improve error-recovery.
5958 (unary_complex_lvalue): Make taking the address a bound member
5959 function an error, not a sorry.
5960 (build_conditional_expr): Look at the type qualifiers, not the
5961 qualifiers on the expression itself.
5962
5963 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
5964
5965 * decl2.c (merge_functions): Remove duplicates.
5966
5967 * decl2.c: Add -f{no-,}implicit-inline-templates.
5968 (import_export_decl): Check it.
5969
5970 * decl.c (lookup_name_real): Template parms also take precedence
5971 over implicit typename. Only warn if yylex.
5972
5973 * typeck.c (build_conditional_expr): Only fold if ifexp is an
5974 INTEGER_CST.
5975
5976 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
5977 instead of linkage.
5978
5979 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
5980
5981 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
5982 * class.c (build_vbase_pointer): Use it.
5983 * rtti.c (expand_class_desc): Likewise.
5984 * tree.c (build_vbase_pointer_fields): Likewise.
5985
5986 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
5987
5988 * decl.c (start_decl): Add invocation of
5989 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5990 (start_function): Add invocation of
5991 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
5992
5993 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
5994 HANDLE_GENERIC_PRAGMAS.
5995
5996 1998-09-28 Anthony Green <green@cygnus.com>
5997
5998 * semantics.c (finish_asm_stmt): Always permit volatile asms.
5999
6000 1998-09-28 Mark Mitchell <mark@markmitchell.com>
6001
6002 * decl.c (grokdeclarator): Tighten checks for invalid
6003 destructors. Improve error-messages and error-recovery.
6004 * decl2.c (check_classfn): Don't assume that mangled destructor
6005 names contain type information.
6006
6007 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
6008
6009 * search.c (get_base_distance): Remove assert.
6010
6011 * decl2.c (build_anon_union_vars): Don't process a field with no
6012 name.
6013 (finish_anon_union): Also complain about local anon unions with no
6014 members.
6015
6016 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6017
6018 * decl.c (lookup_namespace_name): If the name is a namespace,
6019 return it immediately.
6020
6021 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6022
6023 * cp-tree.h (define_case_label): Remove unused parameter.
6024 (check_java_method): Likewise.
6025 (grokclassfn): Likewise.
6026 (expand_aggr_init): Likewise.
6027 (build_x_delete): Likewise.
6028 (maybe_end_member_template_processing): Likewise.
6029 (unshare_base_binfos): Add prototype.
6030 (string_conv_p): Likewise.
6031 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6032
6033 * cvt.c (build_up_reference): Remove unused parameter
6034 `checkconst', all callers changed.
6035 (build_type_conversion): Mark parameter `code' with
6036 ATTRIBUTE_UNUSED.
6037 (build_expr_type_conversion): Initialize variable `conv'.
6038
6039 * decl.c (push_namespace): Initialize variable `d'.
6040 (define_case_label): Remove unused parameter `decl', all callers
6041 changed.
6042
6043 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6044 `argc' with ATTRIBUTE_UNUSED.
6045 (grokclassfn): Remove unused parameter `cname', all callers
6046 changed.
6047 (check_java_method): Likewise for parameter `ctype'.
6048 (copy_assignment_arg_p): Mark parameter `virtualp' with
6049 ATTRIBUTE_UNUSED.
6050 (finish_prevtable_vardecl): Likewise for parameter `prev'.
6051
6052 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6053
6054 * init.c (expand_aggr_init_1): Remove unused parameter
6055 `alias_this', all callers changed.
6056 (expand_aggr_init): Likewise.
6057 (expand_default_init): Likewise.
6058 (build_new_1): Initialize variable `susp'.
6059 (build_x_delete): Remove unused parameter `type', all callers
6060 changed.
6061
6062 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6063 ATTRIBUTE_UNUSED.
6064 (readescape): Use (unsigned) value in shift.
6065 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
6066 comparing to a signed quantity.
6067
6068 * pt.c (maybe_end_member_template_processing): Remove unused
6069 parameter `decl', all callers changed.
6070 (check_explicit_specialization): Add braces around empty body in
6071 an else-statement.
6072 (current_template_args): Initialize variable `args'.
6073 (lookup_template_class): Likewise for variable `prev_local_enum'.
6074 (tsubst_decl): Likewise for variable `r'.
6075 (set_mangled_name_for_template_decl): Initialize variable
6076 `context'.
6077
6078 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6079 Likewise for variable `i'.
6080 (yylex): Initialize variable `trrr'.
6081
6082 * typeck.c (compparms): Mark variable `strict' with
6083 ATTRIBUTE_UNUSED.
6084
6085 * xref.c (simplify_type): Cast argument of ctype function to
6086 `unsigned char'.
6087
6088 1998-09-24 Mark Mitchell <mark@markmitchell.com>
6089
6090 * cp-tree.h (language_lvalue_valid): Remove.
6091 * decl.c (grokdeclarator): Don't disallow references to functions.
6092 * tree.c (lvalue_p_1): New function, combining duplicated
6093 code from ...
6094 (lvalue_p): Use it.
6095 (real_lvalue_p): Likewise.
6096 * typeck.c (language_lvalue_valid): Remove.
6097 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6098 they don't have TREE_READONLY set.
6099 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6100
6101 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
6102
6103 * spew.c (yylex): Give diagnostic.
6104 * hash.h (is_reserved_word): Add export.
6105 * gxx.gperf: Likewise.
6106 * lex.h (rid): Add RID_EXPORT.
6107 * lex.c (init_parse): Likewise.
6108
6109 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6110
6111 * friend.c (do_friend): Make warning a full sentence.
6112
6113 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6114
6115 * parse.y (component_decl_list): Improve error-recovery.
6116
6117 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
6118
6119 * decl.c (make_typename_type): Move error to point where name
6120 variable can be used by dump_type.
6121
6122 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6123
6124 * decl.c (grokfndecl): Improve error-recovery.
6125 * decl2.c (grokfield): Likewise.
6126 * pt.c (finish_member_template_decl): Likewise.
6127
6128 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
6129
6130 * method.c (hack_identifier): Finding multiple members is always
6131 an error.
6132
6133 1998-09-21 Per Bothner <bothner@cygnus.com>
6134
6135 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
6136
6137 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
6138
6139 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6140
6141 1998-09-20 Mark Mitchell <mark@markmitchell.com>
6142
6143 * class.c (maybe_warn_about_overly_private_class): Reformat.
6144
6145 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
6146
6147 * exception.cc (__cplus_type_matcher): Realign some code.
6148
6149 1998-09-16 Mark Mitchell <mark@markmitchell.com>
6150
6151 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6152 (tinfo2.o): Likewise.
6153 (exception.o): Likewise.
6154 (new.o): Likewise.
6155 (opnew.o): Likewise.
6156 (opnewnt.o): Likewise.
6157 (opvnew.o): Likewise.
6158 (opvnewnt.o): Likewise.
6159 (opdel.o): Likewise.
6160 (opdelnt.o): Likewise.
6161 (opvdel.o): Likewise.
6162 (opvdelnt.o): Likewise.
6163
6164 1998-09-16 Richard Henderson <rth@cygnus.com>
6165
6166 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6167
6168 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
6169
6170 * call.c (build_field_call): Handle static data members too.
6171
6172 * typeck.c (comptypes): When comparing pointer types, check
6173 whether referred types match even in strictest modes.
6174
6175 1998-09-15 Mark Mitchell <mark@markmitchell.com>
6176
6177 * cp-tree.h: Revert previous change.
6178 (finish_struct_methods): Remove declaration.
6179 * class.c: Revert previous change.
6180 (maybe_warn_about_overly_private_class): New function.
6181 (finish_struct_methods): Declare here, and make static. Remove
6182 unnecessary parameters. Tidy slightly. Use
6183 maybe_warn_about_overly_private_class.
6184 (finish_struct_1): Adjust. Remove check for private constructors,
6185 now done elsewhere.
6186 (finish_struct): Adjust.
6187
6188 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6189
6190 * except.c (expand_start_catch_block): No need to check for new
6191 exception model.
6192 (process_start_catch_block_old): Deleted.
6193 (process_start_catch_block): Add call to start_decl_1().
6194 (expand_end_catch_block): Add call to end_catch_handler().
6195 * exception.cc (__cplus_type_matcher): Only check the exception
6196 language if there is an exception table.
6197
6198 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6199
6200 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
6201 as used to prevent conflicts with virtual function tables.
6202
6203 1998-09-14 Mark Mitchell <mark@markmitchell.com>
6204
6205 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
6206 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
6207 * class.c (maybe_class_too_private_p): New function.
6208 (finish_struct_methods): Use it.
6209 (finish_struct_1): Likewise.
6210 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
6211 appropriate.
6212
6213 * pt.c (check_specialization_scope): Fix spelling error.
6214 (check_explicit_specialization): Remove code to handle explicit
6215 specializations in class scope; they are now correctly diagnosed
6216 as errors.
6217
6218 1998-09-10 Mark Mitchell <mark@markmitchell.com>
6219
6220 * decl.c (pushdecl): Don't copy types if the
6221 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
6222 type.
6223
6224 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6225
6226 * class.c (get_enclosing_class): New function.
6227 (is_base_of_enclosing_class): Likewise.
6228 * cp-tree.h (get_enclosing_class): Declare.
6229 (is_base_of_enclosing_class): Likewise.
6230 * pt.c (coerce_template_parms): Use them.
6231
6232 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
6233
6234 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
6235 null to decide whether to use it.
6236
6237 * error.c (dump_type_real): Handle NAMESPACE_DECL.
6238 * parse.y (base_class.1): Avoid crash on error.
6239
6240 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
6241
6242 * decl.c (make_typename_type): If context is a namespace, the code
6243 is in error.
6244
6245 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
6246
6247 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
6248
6249 1998-09-08 Mark Mitchell <mark@markmitchell.com>
6250
6251 * cp-tree.h (anonymous_namespace_name): Declare.
6252 * decl.c: Define it.
6253 (push_namespace): Use anonymous_namespace_name, rather than local
6254 static anon_name.
6255 * error.c (dump_decl): If a namespace is named
6256 anonymous_namespace_name, call it {anonymous}.
6257
6258 * decl.c (grokparms): Distinguish between references and pointers
6259 in error message.
6260
6261 1998-09-08 Richard Henderson <rth@cygnus.com>
6262 Mark Mitchell <mark@markmitchell.com>
6263
6264 * pt.c (process_partial_specialization): Consistently allocate
6265 and zero tpd.parms based on ntparms. Use tpd2.parms, not
6266 tpd.parms, where appropriate.
6267
6268 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
6269
6270 * Makefile.in (INCLUDES): Update after recent toplevel gcc
6271 reorganizations.
6272
6273 1998-09-05 Mark Mitchell <mark@markmitchell.com>
6274
6275 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
6276 * class.c (finish_struct): Remove hackery to deal with explicit
6277 specializations in class scope.
6278 * decl.c (grokfndecl): Improve error-recovery.
6279 * decl2.c (grokfield): Likewise.
6280 * pt.c (check_specialization_scope): New function.
6281 (begin_specialization): Call it.
6282 (process_partial_specialization): New function, split out from
6283 push_template_decl. Check partial specializations more
6284 stringently.
6285 (push_template_decl): Call it.
6286 (check_explicit_specialization): Don't attempt to handle explicit
6287 specializations in class scope.
6288 (template_parm_data): Document. Add current_arg and
6289 arg_uses_template_parms.
6290 (mark_template_parm): Set it.
6291 (tsubst_arg_types): Remove unused variable.
6292 * semantics.c (begin_class_definition): Tweak.
6293
6294 1998-09-04 Mark Mitchell <mark@markmitchell.com>
6295
6296 * inc/typeinfo (type_info::type_info(const char*)): Make
6297 `explicit'.
6298
6299 * cp-tree.h (hash_tree_cons_simple): New macro.
6300 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
6301 (coerce_template_parms): Use make_temp_vec, instead of
6302 make_tree_vec. Document this behavior.
6303 (lookup_template_class): Likewise.
6304 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
6305 Remove dead code (and add assertion to check its deadness). Fix
6306 bug w.r.t. exception specifications.
6307
6308 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
6309
6310 * decl2.c (import_export_vtable): Always make artificials comdat.
6311 (import_export_decl): Likewise.
6312 * pt.c (mark_decl_instantiated): Likewise.
6313
6314 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6315
6316 * cp-tree.h (finish_globally_qualified_member_call_expr):
6317 Rename to ...
6318 (finish_qualified_call_expr).
6319 * semantics.c: Likewise.
6320 * parse.y (primary): Use it.
6321 * method.c (hack_identifier): Remove redundant code.
6322
6323 * init.c (resolve_offset_ref): Call convert_from_reference to
6324 handle members of reference type. Improve error recovery.
6325
6326 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
6327
6328 * cp-tree.h: Declare warn_nontemplate_friend.
6329 * decl2.c (lang_decode_option): Set.
6330 * lang-options.h: Add -Wnon-template-friend.
6331 * friend.c (do_friend): Use to toggle non-template function warning.
6332
6333 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6334
6335 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
6336 corresponding INTEGER_CSTs when processing_template_decl.
6337 * pt.c (tsubst_enum): Tweak accordingly.
6338
6339 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6340
6341 * decl.c (pushdecl_class_level): Add warning here.
6342 (pushdecl): Tweak.
6343
6344 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
6345
6346 * cvt.c (convert_pointer_to_real): Tidy.
6347 * search.c (get_base_distance_recursive): Simplify.
6348 (get_base_distance): Likewise.
6349
6350 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
6351 parms.
6352
6353 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
6354
6355 * lex.c (check_newline): Call HANDLE_PRAGMA before
6356 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
6357 if unknown pragmas are encountered.
6358 (handle_sysv_pragma): Interpret return code from
6359 handle_pragma_token (). Return success/failure indication rather
6360 than next unprocessed character.
6361 (pragma_getc): New function: retrieves characters from the
6362 input stream. Defined when HANDLE_PRAGMA is defined.
6363 (pragma_ungetc): New function: replaces characters back into the
6364 input stream. Defined when HANDLE_PRAGMA is defined.
6365
6366 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6367
6368 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
6369 * class.c (build_vtable_entry_ref): Likewise.
6370
6371 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6372
6373 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
6374 * decl2.c (import_export_decl): Likewise.
6375 * pt.c (instantiate_decl): Use it.
6376
6377 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6378
6379 * decl.c (lookup_name_real): Also do implicit typename thing for
6380 artificial TYPE_DECLs.
6381 * search.c (lookup_field): Likewise.
6382 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
6383 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
6384 (enter_scope_of): Extract type from implicit typename.
6385 (begin_class_definition): Likewise.
6386 * lex.c (identifier_type): Handle implicit typename when checking
6387 for SELFNAME.
6388
6389 * cp-tree.h: Declare flag_strict_prototype.
6390 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6391 -fstrict-prototype.
6392 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6393 specified, set it to the value of pedantic.
6394
6395 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6396
6397 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6398
6399 1998-08-31 Mark Mitchell <mark@markmitchell.com>
6400
6401 * decl.c (finish_enum): Handle member enums of classes declared in
6402 template functions.
6403
6404 * decl2.c (grok_x_components): Strip attributes before calling
6405 groktypename.
6406
6407 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
6408
6409 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6410 -fenum-int-equivalence and -fno-nonnull-objects.
6411 * class.c (check_for_override): Remove support for -fall-virtual.
6412 (finish_struct_1): Likewise.
6413 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6414 * typeck.c (build_binary_op_nodefault): Likewise.
6415 * cvt.c (ocp_convert): Likewise.
6416 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6417 * class.c (build_vbase_path): Likewise.
6418
6419 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
6420
6421 * Makefile.in (INTERFACE): New, set to 1.
6422
6423 1998-08-30 Mark Mitchell <mark@markmitchell.com>
6424
6425 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6426 comparing with global_namespace.
6427 (dump_aggr_type): Likewise.
6428
6429 * decl.c (grokfndecl): Issue error on declaration of friend
6430 templates with explicit template arguments.
6431
6432 * pt.c (convert_template_argument): New function, split out
6433 from...
6434 (coerce_template_parms): Here.
6435 (tsubst): Attempt better error-recovery.
6436
6437 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
6438
6439 * pt.c (decl_template_parm_p): Add checks for
6440 TEMPLATE_TEMPLATE_PARM.
6441
6442 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6443
6444 * lex.c (do_identifier): Fix thinko in previous change.
6445
6446 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
6447
6448 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6449 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6450
6451 1998-08-28 Richard Henderson <rth@cygnus.com>
6452
6453 Add support for discarding unused virtual functions.
6454 * lang-options.h: Add -fvtable-gc.
6455 * cp-tree.h: Add flag_vtable_gc.
6456 * decl2.c (output_vtable_inherit): New fn.
6457 (finish_vtable_vardecl): Call it.
6458 * class.c (build_vtable_entry_ref): New fn.
6459 (build_vtbl_ref): Call it.
6460
6461 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6462
6463 * cp-tree.h (build_enumerator): Take the enumeration type as a
6464 parameter.
6465 * decl.c (finish_enum): Don't set the TREE_TYPE for the
6466 enumeration constant values if we're processing_template_decls.
6467 Don't set the type for the CONST_DECLs either; that's done in
6468 build_enumerator.
6469 (build_enumerator): Take the enumeration type as a
6470 parameter.
6471 * lex.c (do_identifier): Don't resolve enumeration constants while
6472 processing template declarations, even if they happen to be
6473 TEMPLATE_PARM_INDEXs.
6474
6475 * parse.y (current_enum_type): New variable.
6476 (primary): Don't allow statement-expression in local classes just
6477 as we don't in global classes.
6478 (structsp): Use current_enum_type.
6479 (enum_list): Likewise.
6480 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6481 finish_enum; they no longer occur.
6482
6483 * cp-tree.h (finish_base_specifier): New function.
6484 * parse.y (base_class): Use it.
6485 * semantics.c (finish_base_specifier): Define it.
6486
6487 * parse.y (structsp): Warn on use of typename outside of template
6488 declarations.
6489
6490 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6491
6492 * lex.c (handle_cp_pragma): Remove #pragma vtable.
6493 * lang-options.h: Remove +e options.
6494 * decl2.c (lang_decode_option): Likewise.
6495 (import_export_vtable): Don't check write_virtuals.
6496 (finish_vtable_vardecl, finish_file): Likewise.
6497 * search.c (dfs_debug_mark): Likewise.
6498 * semantics.c (begin_class_definition): Likewise.
6499 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6500
6501 * call.c (build_over_call): Check flag_elide_constructors.
6502 * decl2.c: flag_elide_constructors defaults to 1.
6503 * typeck.c (convert_arguments): Remove return_loc parm.
6504 (build_function_call_real): Adjust.
6505
6506 * search.c: Tear out all mi_matrix and memoize code.
6507 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6508 * lang-options.h: Remove documentation for -fhandle-exceptions,
6509 -fmemoize-lookups and -fsave-memoized.
6510 * cp-tree.h: Lose mi_matrix and memoize support.
6511 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6512 * class.c: Lose struct class_level.
6513 (pushclass, popclass): Lose memoize support.
6514 * init.c (build_offset_ref): Likewise.
6515
6516 Never change BINFO_INHERITANCE_CHAIN.
6517 * init.c (emit_base_init): Change modification of
6518 BINFO_INHERITANCE_CHAIN to an assert.
6519 * search.c (get_base_distance_recursive): Likewise.
6520 (get_base_distance): Likewise.
6521 (lookup_member): Likewise.
6522 (convert_pointer_to_single_level): Likewise.
6523 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
6524 (lookup_fnfields): Likewise.
6525 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6526 (unshare_base_binfos): Don't call propagate_binfo_offsets.
6527 (layout_basetypes): Call propagate_binfo_offsets instead of
6528 unshare_base_binfos.
6529 * decl.c (xref_basetypes): Call unshare_base_binfos.
6530 * pt.c (instantiate_class_template): Likewise.
6531 * tree.c (reverse_path): Remove 'copy' parm; always make a
6532 temporary copy.
6533 * class.c (build_vbase_path): Just call it.
6534 * search.c (compute_access): Likewise. Don't re-reverse.
6535
6536 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6537
6538 * class.c (build_vbase_path): Use reverse_path.
6539 (finish_base_struct): Move warnings for inaccessible bases to
6540 layout_basetypes.
6541 (modify_one_vtable): Remove check of TREE_USED (binfo).
6542 (fixup_vtable_deltas1): Likewise.
6543 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6544 (xref_tag): Remove binfos parameter.
6545 (make_binfo): Remove chain parameter.
6546 (reverse_path): Add copy parameter.
6547 * decl.c (init_decl_processing): Change calls to xref_tag.
6548 (xref_tag): Remove binfos parameter.
6549 (xref_basetypes): Change calls to make_binfo.
6550 * decl2.c (grok_x_components): Change calls to xref_tag.
6551 (handle_class_head): Likewise.
6552 * friend.c (do_friend): Likewise.
6553 * lex.c (make_lang_type): Change calls to make_binfo.
6554 * parse.y (structsp): Change calls to xref_tag.
6555 (named_complex_class_head_sans_basetype): Likewise.
6556 (named_class_head): Likewise.
6557 * rtti.c (init_rtti_processing): Likewise.
6558 * search.c (compute_access): Change calls to reverse_path.
6559 (dfs_get_vbase_types): Change calls to make_binfo.
6560 (get_vbase_types): Remove dead code.
6561 * tree.c (unshare_base_binfos): Change calls to make_binfo.
6562 (layout_basetypes): Warn here about inaccessible bases.
6563 (make_binfo): Remove chain parameter.
6564 (reverse_path): Add copy parameter.
6565
6566 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6567
6568 * class.c: #if 0 complete_type_p.
6569 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6570 * method.c (process_overload_item): Likewise.
6571 * typeck.c (comp_target_types): Likewise.
6572
6573 Stop sharing binfos for indirect virtual bases.
6574 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6575 (layout_basetypes): Likewise.
6576 (unshare_base_binfos): Copy vbases, too.
6577 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6578 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6579 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6580 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6581 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6582 reference to BINFO_VIA_PUBLIC.
6583 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6584 (push_class_decls): Use them.
6585 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6586 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6587
6588 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6589
6590 * decl.c (build_enumerator): Set DECL_CONTEXT for the
6591 CONST_DECLs.
6592
6593 1998-08-26 Mark Mitchell <mark@markmitchell.com>
6594
6595 * cp-tree.h (finish_enum): Change prototype.
6596 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6597 VALUES parameter. Don't try to compute mins/maxs if
6598 processing_template_decl.
6599 * parse.y (structsp): Use new calling sequence for finish_enum.
6600 * pt.c (tsubst_enum): Likewise. Take the new type as input.
6601 (lookup_template_class): Remove unused variables. Tweak.
6602 Register enums on instantiation list before substituting
6603 enumeration constants.
6604 (tsubst_decl): Remove unused variables.
6605 (regenerate_decl_from_template): Likewise.
6606
6607 * decl.c (duplicate_decls): Don't obliterate the
6608 DECL_TEMPLATE_INFO for a template if we're not replacing it with
6609 anything.
6610
6611 * lex.c (do_identifier): Fix typo in comment.
6612
6613 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6614
6615 * errfn.c: Remove stdarg.h/varargs.h.
6616 * tree.c: Likewise.
6617
6618 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
6619
6620 * pt.c (tsubst_copy): Only do typename overloading on an
6621 IDENTIFIER_NODE that happens to look like a typename if it actually
6622 has a type for us to use.
6623
6624 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6625
6626 * typeck.c (comp_cv_target_types): Split out...
6627 (comp_target_types): From here. Don't allow cv-qual changes under
6628 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
6629 (build_ptrmemfunc): Pass 1 to nptrs.
6630 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6631
6632 1998-08-25 Mark Mitchell <mark@markmitchell.com>
6633
6634 * search.c (dependent_base_p): Don't compare a binfo to
6635 current_class_type; use the TREE_TYPE of the binfo instead.
6636
6637 * cp-tree.h (CLASS_TYPE_P): Revise definition.
6638
6639 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6640
6641 * decl.c (duplicate_decls): Don't complain about different
6642 exceptions from an internal decl even if pedantic.
6643
6644 * typeck.c (convert_for_assignment): Converting from pm of vbase
6645 to derived is an error, not a sorry.
6646
6647 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6648 * class.c (fixed_type_or_null): Rename from
6649 resolves_to_fixed_type_p. Return the dynamic type of the
6650 expression, if fixed, or null.
6651 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
6652 does not match the static type.
6653 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
6654 resolves_to_fixed_type_p again.
6655
6656 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6657
6658 * pt.c (tsubst_decl): Move special case code for dealing with
6659 tricky friend templates here from ...
6660 (regenerate_decl_from_template): Here.
6661
6662 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6663
6664 * decl.c (start_decl): Remove redundant linkage check.
6665
6666 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
6667
6668 * typeck.c (c_expand_return): Handle the case that valtype
6669 is wider than the functions return type.
6670
6671 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6672
6673 * cp-tree.h (CLASS_TYPE_P): New macro.
6674 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6675 * pt.c (process_template_parm): Undo previous change.
6676
6677 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
6678
6679 * cp-tree.h: Declare.
6680 * pt.c (decl_template_parm_p): New function.
6681 * decl.c (pushdecl): Check decls for redeclaring template parms.
6682 (xref_tag): Make redeclaration an error, print decl.
6683 * decl2.c (grokfield): Check field_decls for redeclaration as well.
6684
6685 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6686
6687 * parse.y (primary): Fix up the type of string constants.
6688
6689 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6690
6691 * typeck.c (convert_for_initialization): Move check for odd uses
6692 of NULL to avoid duplicate warnings.
6693
6694 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6695
6696 * tree.c (lvalue_type): Fix for arrays.
6697 * typeck.c (string_conv_p): New fn.
6698 (convert_for_assignment): Use it.
6699 (build_unary_op): Use lvalue_type.
6700 * call.c (standard_conversion, convert_like): Use string_conv_p.
6701 (add_function_candidate): Use lvalue_type.
6702 * cvt.c (convert_to_reference): Likewise.
6703 * decl2.c (lang_decode_option): Ignore -traditional.
6704 * decl.c (init_decl_processing): flag_writable_strings inhibits
6705 flag_const_strings.
6706
6707 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
6708
6709 * lang-options.h (lang_options): Add fconst-strings to the list
6710 of valid options.
6711 * decl2.c (lang_f_options, lang_decode_option): Likewise.
6712
6713 1998-08-24 Nathan Sidwell <nathan@acm.org>
6714
6715 * lex.c (real_yylex): Don't warn about long long constants if
6716 we're allowing long long.
6717
6718 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6719
6720 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6721 accessing bindings directly.
6722
6723 * search.c (my_tree_cons): Reimplement.
6724
6725 * lang-specs.h: Remove __HONOR_STD.
6726 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6727
6728 1998-08-23 Mark Mitchell <mark@markmitchell.com>
6729
6730 * decl.c (grokdeclarator): Complain about in-class initialization
6731 of aggregates and/or references.
6732 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6733 TEMPLATE_TYPE_PARMs.
6734
6735 * decl2.c (grok_array_decl): Add comment.
6736 (mark_used): Don't instantiate an explicit instantiation.
6737 * friend.c (make_friend_class): Remove bogus comment. Fix check
6738 for partial specializations.
6739 * pt.c (check_explicit_specialization): Don't
6740 SET_DECL_EXPLICIT_INSTANTIATION here.
6741 (mark_decl_instantiated): Or here.
6742 (do_decl_instantiation): Do it here, instead. Add checks for
6743 duplicate explicit instantiations, etc. Tidy.
6744 (do_type_instantiation): Likewise.
6745 (instantiate_decl): Improve comments. Complain about explicit
6746 instantiations where no definition is available.
6747
6748 * cp-tree.h (ansi_null_node): Remove.
6749 * call.c (build_over_call): Warn about converting NULL to an
6750 arithmetic type.
6751 * cvt.c (build_expr_type_conversion): Likewise. Use
6752 null_ptr_cst_p instead of expanding it inline.
6753 * decl.c (ansi_null_node): Remove.
6754 (init_decl_processing): Make null_node always have integral type.
6755 * except.c (build_throw): Warn about converting NULL to an
6756 arithmetic type.
6757 * lex.c (init_parse): Remove handling of ansi_null_node.
6758 * pt.c (type_unification_real): Don't convert NULL to void* type.
6759 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
6760 (convert_for_assignment): Warn about converting NULL to an
6761 arithmetic type.
6762 (convert_for_initialization): Likewise.
6763
6764 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6765
6766 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
6767 * pt.c (coerce_template_parms): Use no_linkage_check.
6768 * decl.c (grokvardecl): Likewise.
6769 (grokfndecl): Likewise. Members of anonymous types have no linkage.
6770
6771 * method.c (process_overload_item): Remove useless code.
6772
6773 1998-08-20 Per Bothner <bothner@cygnus.com>
6774
6775 Handle new'ing of Java classes.
6776 * init.c (build_class_classref): New function.
6777 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
6778 constructor does not return this; don't need to exception-protect.
6779
6780 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
6781 * decl2.c (acceptable_java_type): Handle template-derived types.
6782
6783 1998-08-20 Per Bothner <bothner@cygnus.com>
6784
6785 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
6786
6787 1998-08-20 Mark Mitchell <mark@markmitchell.com>
6788
6789 * decl.c (duplicate_decls): Always merge the old and new patterns
6790 for templates, regardless of whether or not the new one has
6791 DECL_INITIAL. Don't throw away specializations. Merge
6792 DECL_SAVED_TREE.
6793 * pt.c (tsubst_decl): Use the right pattern when calculating the
6794 complete args for a new template instance.
6795 (do_decl_instantiation): Fix typo in comment.
6796 (regenerate_decl_from_template): Deal with tricky friend template
6797 case.
6798 (instantiate_decl): Likewise.
6799
6800 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
6801
6802 * init.c (build_builtin_delete_call): Add missing assemble_external
6803 call.
6804
6805 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6806
6807 * parse.y (notype_unqualified_id): Also accept ~A<int>.
6808
6809 1998-08-19 Mark Mitchell <mark@markmitchell.com>
6810
6811 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
6812 arithmetic.
6813 * except.c (build_throw): Warn when NULL is thrown, even with
6814 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
6815 thrown expression.
6816
6817 * cp-tree.h (ansi_null_node): New variable.
6818 * decl.c (ansi_null_node): New variable.
6819 (init_decl_processing): Initialize its type.
6820 * lex.c (init_parse): Initialize its value. Use ansi_null_node
6821 for null_node in non-ANSI mode.
6822 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
6823 place of null_node to avoid spurious errors.
6824
6825 1998-08-17 Mark Mitchell <mark@markmitchell.com>
6826
6827 * cp-tree.h (enter_scope_of): New function.
6828 * parse.y (complex_direct_notype_declarator): Use it.
6829 * semantics.c (enter_scope_of): New function.
6830
6831 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
6832
6833 * decl.c (grokparms): No, here.
6834
6835 * decl.c (grokdeclarator): Catch parm with pointer to array of
6836 unknown bound here...
6837 * method.c (process_overload_item): ...not here.
6838
6839 * gxxint.texi: Remove obsolete documentation of overloading code.
6840
6841 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
6842 * class.c (finish_struct_bits): Likewise.
6843
6844 * tree.c (lvalue_type): Fix for arrays.
6845 * typeck.c (build_unary_op): Use lvalue_type.
6846 * call.c (add_function_candidate): Likewise.
6847 * cvt.c (convert_to_reference): Likewise.
6848
6849 * decl2.c (lang_decode_option): Ignore -traditional.
6850
6851 * init.c (build_offset_ref): Don't mess with error_mark_node.
6852 * lex.c (do_scoped_id): Use cp_error.
6853
6854 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
6855
6856 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
6857
6858 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
6859
6860 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
6861
6862 * cp-tree.h (set_identifier_local_value): Provide prototype.
6863
6864 * decl2.c (do_namespace_alias): Remove unused variables `binding'
6865 and `old'.
6866
6867 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
6868
6869 * Makefile.in: Rename BBISON to BISON so that it can be properly
6870 inherited from the parent makefile.
6871
6872 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6873
6874 * lang-options.h: Add -finit-priority.
6875 * decl2.c: Likewise. Check flag_init_priority instead of
6876 USE_INIT_PRIORITY.
6877
6878 * decl2.c (setup_initp): New fn.
6879 (start_objects, finish_objects, do_ctors): Handle init_priority.
6880 (do_dtors, finish_file): Likewise.
6881
6882 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
6883
6884 * pt.c (tsubst_copy): Hush warning.
6885
6886 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
6887
6888 1998-08-12 Mark Mitchell <mark@markmitchell.com>
6889
6890 * pt.c (print_template_context): Don't abort when instantiating a
6891 synthesized method.
6892
6893 * decl.c (grokdeclarator): Issue errors on namespace qualified
6894 declarators in parameter lists or in class scope.
6895
6896 1998-08-09 Mark Mitchell <mark@markmitchell.com>
6897
6898 * pt.c (check_explicit_specialization): Don't abort on bogus
6899 explicit instantiations.
6900
6901 1998-08-07 Mark Mitchell <mark@markmitchell.com>
6902
6903 * typeck.c (require_complete_type): Use complete_type_or_else.
6904 (complete_type_or_else): Always return NULL_TREE on failure, as
6905 documented.
6906
6907 * pt.c (tsubst_aggr_type): Prototype.
6908 (tsubst_decl): New function, split out from tsubst. Set
6909 input_filename and lineno as appropriate.
6910 (pop_tinst_level): Restore the file and line number saved in
6911 push_tinst_level.
6912 (instantiate_class_template): Set input_filename and lineno as
6913 appropriate.
6914 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
6915 context for a TYPENAME_TYPE is complete.
6916
6917 * decl2.c (grokbitfield): Issue errors on bitfields declared with
6918 function type.
6919 (do_dtors): As in do_ctors, pretend to be a member of the same
6920 class as a static data member while generating a call to its
6921 destructor.
6922
6923 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
6924 conversions, even in complex virtual base class hierarchies.
6925
6926 1998-08-06 Mark Mitchell <mark@markmitchell.com>
6927
6928 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
6929 (TYPE_TEMPLATE_INFO): Likewise.
6930 (SET_TYPE_TEMPLATE_INFO): Likewise.
6931 (ENUM_TI_TEMPLATE): Likewise.
6932 (ENUM_TI_ARGS): Likewise.
6933 (lookup_nested_type_by_name): Remove.
6934 * decl.c (maybe_process_template_type_declaration): Handle enums.
6935 (start_enum): Don't check for primary-template enum declarations
6936 here.
6937 (finish_enum): Clean up, document. Make sure template enum
6938 constants get the correct type.
6939 (build_enumerator): Copy initializers for template enumerations,
6940 too.
6941 (grok_enum_decls): Document.
6942 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
6943 better. Build LOOKUP_EXPRs for local variables, even if they are
6944 TREE_PERMANENT.
6945 * pt.c (tsubst_enum): Remove field_chain parameter.
6946 (template_class_depth): Include the depth of surrounding function
6947 contexts.
6948 (push_template_decl): Check for primary-template enum declarations
6949 here. Deal with enumeration templates.
6950 (lookup_template_class): Likewise.
6951 (for_each_template_parm): Likewise.
6952 (instantiate_class_template): Don't call tsubst_enum directly,
6953 call tsubst instead, to instantiate enums. Deal with all
6954 field_chain issues here, not in tsubst_enum.
6955 (lookup_nested_type_by_name): Remove.
6956 (tsubst_aggr_type): Revise handling of enumeration types.
6957 (tsubst): Likewise.
6958 (tsubst_copy): Likewise.
6959 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
6960
6961 1998-08-04 Mark Mitchell <mark@markmitchell.com>
6962
6963 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
6964 uses template parameters.
6965 * method.c (build_template_parm_names): Use the full set of
6966 template arguments for tsubst'ing.
6967 (build_overload_identifier): Pass the full set of template
6968 arguments to build_template_parm_names, not just the
6969 innermost_args.
6970 * pt.c (TMPL_ARGS_DEPTH): Define using
6971 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
6972 (NUM_TMPL_ARGS): New macro.
6973 (add_outermost_template_args): Deal with the case where the outer
6974 args will be completely discarded.
6975 (coerce_template_parms): Use the full set of template arguments
6976 for tsubst'ing. Simplify. Add some asserts. Improve
6977 error messages.
6978 (lookup_template_class): Pass the full set of template arguments
6979 to coerce_template_parms.
6980 (tsubst): Add assertion.
6981 (do_type_instantiation): Don't instantiate member template
6982 classes.
6983
6984 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
6985 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
6986
6987 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
6988
6989 * method.c (set_mangled_name_for_decl): Change return type to void.
6990
6991 * decl.c (lookup_name_real): A namespace-level decl takes priority
6992 over implicit typename. Avoid doing the same lookup twice.
6993
6994 * search.c (dependent_base_p): New fn.
6995 (dfs_pushdecls, dfs_compress_decls): Use it.
6996
6997 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
6998 virtual functions if the type doesn't have any.
6999
7000 1998-08-03 Mark Mitchell <mark@markmitchell.com>
7001
7002 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7003 uses template parameters.
7004
7005 1998-08-02 Mark Mitchell <mark@markmitchell.com>
7006
7007 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
7008 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7009 * lex.c (do_identifier): Don't use a second argument, or a type,
7010 when building LOOKUP_EXPRs.
7011 (do_identifier): Likewise.
7012 (do_scoped_id): Likewise.
7013 * method.c (hack_identifier): Improve error message.
7014 * pt.c (lookup_template_function): Don't needlessly call
7015 copy_to_permanent or build_min.
7016 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
7017 necessary.
7018 (do_decl_instantiation): Improve error message.
7019 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7020 (build_min): Copy the type to the permanent obstack, too.
7021
7022 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
7023
7024 * init.c (init_init_processing): Remove BI* handling.
7025 (build_builtin_call): Remove.
7026 (build_builtin_delete_call): New fn.
7027 (build_delete): Use it.
7028
7029 1998-07-31 Mark Mitchell <mark@markmitchell.com>
7030
7031 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7032 (maybe_check_template_type): New function.
7033 * decl.c (maybe_process_template_type_declaration): New function,
7034 split out from pushtag Call maybe_check_template_type.
7035 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
7036 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7037 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7038 * pt.c (template_class_depth_real): Generalization of ...
7039 (template_class_depth): Use it.
7040 (register_specialization): Use duplicate_decls for duplicate
7041 declarations of specializations.
7042 (maybe_check_template_type): New function.
7043 (push_template_decl_real): Fix comment.
7044 (convert_nontype_argument): Likewise.
7045 (lookup_template_class): Likewise. Avoid an infinite loop on
7046 erroneous code.
7047 (tsubst_friend_function): Fix comment.
7048 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7049 an IDENTIFIER_NODE.
7050 * semantics.c (begin_function_definition): Use
7051 reset_specialization to note that template headers don't apply
7052 directly to declarations after the opening curly for a function.
7053
7054 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
7055
7056 * decl.c (push_overloaded_decl): Use current_namespace instead of
7057 DECL_CONTEXT (decl) to determine where we go.
7058
7059 * decl.c (lookup_name_real): Fix typo.
7060
7061 1998-07-28 Mark Mitchell <mark@markmitchell.com>
7062
7063 * friend.c (is_friend): Be lenient with member functions to deal
7064 with nested friends.
7065
7066 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
7067
7068 * class.c (finish_struct_1): Convert integer_zero_node to
7069 ssizetype before passing it to set_rtti_entry.
7070 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7071 of any size to a pointer.
7072
7073 1998-07-27 Mark Mitchell <mark@markmitchell.com>
7074
7075 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7076 (build_template_decl_overload): Remove.
7077 (set_mangled_name_for_decl): New function.
7078 (innermost_args): Remove is_spec parameter.
7079 (most_specialized, most_specialized_class): Remove declarations.
7080 (lookup_template_class): Add entering_scope parameter.
7081 (maybe_process_partial_specialization): New function.
7082 (finish_template_decl): Likewise.
7083 (finish_template_type): Likewise.
7084 * class.c (finish_struct): Clean up processing of member template
7085 specializations.
7086 * decl.c (pushtag): Fix formatting.
7087 (lookup_tag): Improve handling of pseudo-global levels.
7088 (make_typename_type): Adjust call to lookup_template_class.
7089 (shadow_tag): Use maybe_process_partial_specialization.
7090 (xref_tag): Improve handling of member friends.
7091 (start_function): Call push_nested_class before
7092 push_template_decl. Don't call push_template_decl for
7093 specializations.
7094 * decl2.c (grok_x_components): Don't call xref_tag for
7095 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
7096 (grokclassfn): Use set_mangled_name_for_decl.
7097 (arg_assoc_class): Adjust call to innermost_args.
7098 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7099 * error.c (dump_function_name): Improve printing of template
7100 function names.
7101 * friend.c (is_friend): Don't compare types of decls to determine
7102 friendship, unless flag_guiding_decls.
7103 (make_friend_class): Partial specializations cannot be friends.
7104 (do_friend): Use set_mangled_name_for_decl. Call
7105 push_template_decl_real instead of push_template_decl.
7106 * method.c (build_decl_overload_real): Remove prototype. Give it
7107 external linkage.
7108 (build_overload_identififer): Adjust call to innermost_args.
7109 (build_template_decl_overload): Remove.
7110 (set_mangled_name_for_decl): New function.
7111 * parse.y (.finish_template_type): New non-terminal.
7112 (template_def): Use finish_template_decl. Use template_extdef
7113 instead of extdef.
7114 (template_extdef, template_datadef): New non-terminals, containing
7115 only those rules for things which can be templates.
7116 (datadef): Tidy.
7117 (template_type, self_template_type): Use .finish_template_type.
7118 (named_class_head): Use maybe_process_partial_specialization.
7119 * pt.c (mangle_class_name_for_template): Remove context parameter.
7120 (get_class_bindings): Remove outer_args parameter.
7121 (complete_template_args): Remove.
7122 (add_outermost_template_args): New function.
7123 (register_specialization): Return the specialization.
7124 (unregister_specialization): New function.
7125 (tsubst_template_parms): Likewise.
7126 (most_specialized, most_specialized_class): Prototype here as
7127 static.
7128 (original_template): Rename to most_general_template.
7129 (tsubst_template_parms): New function.
7130 (set_mangled_name_for_template_decl): Likewise.
7131 (TMPL_ARGS_DEPTH): New macro.
7132 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7133 (TMPL_ARGS_LEVEL): New macro.
7134 (SET_TMPL_ARGS_LEVEL): Likewise.
7135 (TMPL_ARG): Likewise.
7136 (SET_TMPL_ARG): Likewise.
7137 (TMPL_ARGS_DEPTH): Likewise.
7138 (finish_member_template_decl): Use finish_template_decl.
7139 (maybe_process_partial_specialization): New function, split out
7140 from tsubst.
7141 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7142 (maybe_begin_member_template_processing): Use new macros.
7143 (is_member_template): Likewise.
7144 (is_member_template_class): Likewise.
7145 (add_to_template_args): Likewise. Deal with multiple levels of
7146 args.
7147 (maybe_process_partial_specialization): New function.
7148 (retrieve_specialization): Add consistency check.
7149 (determine_specialization): Return full argument list.
7150 (check_explicit_specialization): Tweak friend handling. Use full
7151 argument lists. Simplify.
7152 (current_template_args): Use new macros.
7153 (push_template_decl_real): Change ill-named mainargs to specargs.
7154 Check that a partial specialization actually specializes at least
7155 one parameter. Improve friend handling. Modify for full
7156 template arguments.
7157 (classtype_mangled_name): Don't mangle the names of
7158 specializations.
7159 (lookup_template_class): Add entering_scope parameter. Use it to
7160 avoid finding a template type when an instantiation is required.
7161 Simplify. Use full template arguments.
7162 (tsubst_friend_function): Use unregister_specialization. Use new
7163 macros. Use full template arguments.
7164 (tsubst_friend_class): Substitute, using tsubst_template_parms,
7165 into the template parameters before passing them to
7166 redeclare_class_template.
7167 (instantiate_class_template): Simplify. Use full template
7168 arguments. Adjust calls to get_class_bindings. Use
7169 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
7170 (innermost_args): Use new macros.
7171 (tsubst_aggr_type): New function, split out from tsubst.
7172 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7173 conventions for lookup_template_class. Refine handling of partial
7174 instantiations. Remove calls to complete_template_args.
7175 Simplify. Add consistency checks. Use set_mangled_name_for_decl
7176 and set_mangled_name_for_template_decl.
7177 (tsubst_copy): Use tsubst_aggr_type.
7178 (instantiate_template): Use full template arguments.
7179 (more_specialized): Improve formatting.
7180 (more_specialized_class): Adjust calls to get_class_bindings.
7181 (get_bindings_real): Don't call complete_template_args.
7182 (most_specialized): Don't overwrite input; create a new list.
7183 (most_specialized_class): Use most_general_template.
7184 (regenerate_decl_from_template): Use unregister_specialization.
7185 Use full template arguments.
7186 (instantiate_decl): Use full template arguments.
7187 (set_mangled_name_for_template_decl): New function.
7188 * semantics.c (begin_class_definition): Use
7189 maybe_process_partial_specialization.
7190 (finish_member_class_template): New function.
7191 (finish_template_decl): Likewise.
7192 (finish_template_type): Likewise.
7193 (typeck.c): Don't crash after issuing a compiler_error.
7194 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7195
7196 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
7197
7198 * typeck2.c (build_functional_cast): Handle default-initialization.
7199
7200 * call.c (build_over_call): Pass 1 to popclass.
7201
7202 * parse.y (direct_notype_declarator): Add precedence declaration
7203 to notype_unqualified_id case.
7204 * Makefile.in (EXPECT): Adjust.
7205
7206 * tree.c (ovl_member): Fix for single function in OVL.
7207
7208 1998-07-27 Dave Brolley <brolley@cygnus.com>
7209
7210 * c-lex.c (yylex): Fix boundary conditions in character literal and
7211 string literal loops.
7212
7213 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
7214
7215 * decl.c (lookup_name_real): OK, do return the from_obj value
7216 unless got_object depends on template parms.
7217
7218 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
7219
7220 * pt.c (coerce_template_parms): Also complain about local enums.
7221
7222 * cp-tree.h: Add prototype for set_identifier_local_value.
7223 * decl.c (set_identifier_local_value_with_scope): Make static,
7224 prototype.
7225 * search.c (covariant_return_p): Likewise.
7226 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
7227
7228 * call.c (build_method_call): Only pull out the type of a destructor
7229 if it's a template type parm.
7230 * decl.c (lookup_name_real): Never return the from_obj value.
7231
7232 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7233
7234 * except.c (process_start_catch_block_old): Call start_decl_1 for
7235 catch parm.
7236 * decl.c (start_decl_1): Avoid duplicate error.
7237
7238 * init.c (expand_default_init): Only perform the initialization if
7239 it will do something.
7240
7241 1998-07-23 H.J. Lu (hjl@gnu.org)
7242
7243 * parse.y (base_class): Check for invalid base class.
7244
7245 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7246
7247 * decl2.c (import_export_template): Fold in...
7248 (import_export_class): ...to here. Handle dllimport/export.
7249
7250 * class.c (build_vtable): Pass at_eof to import_export_vtable.
7251 (prepare_fresh_vtable): Likewise.
7252 * decl2.c (import_export_class): Split out...
7253 (finish_prevtable_vardecl): From here.
7254 * class.c (finish_struct_1): Call import_export_class if at_eof.
7255
7256 * decl.c (start_function): #if 0 mysterious code I wrote and have
7257 forgotten why.
7258 * rtti.c (get_tinfo_fn): If this is for a class type, set
7259 DECL_CONTEXT.
7260
7261 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
7262
7263 * inc/exception: Change terminate and unexpected to ().
7264
7265 * parse.y (named_class_head_sans_basetype_defn): A
7266 named_class_head_sans_basetype followed by '{' or ':' is a defn.
7267
7268 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
7269
7270 * tree.c (canonical_type_variant): New fn to handle arrays.
7271 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
7272 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
7273 * method.c (process_overload_item): Use build_overload_value for
7274 arrays.
7275
7276 1998-07-20 Dave Brolley <brolley@cygnus.com>
7277
7278 * lex.c (mbchar.h): #include it.
7279 (GET_ENVIRONMENT): New macro.
7280 (init_parse): Set character set based on LANG environment variable.
7281 (real_yylex): Handle multibyte characters in character literals.
7282 (real_yylex): Handle multibyte characters in string literals.
7283
7284 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
7285
7286 * lex.c (do_identifier): Look for class value even if we don't
7287 have a global value. Do implicit declaration if parsing is 2.
7288 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
7289 lookup.
7290
7291 1998-07-19 Mark Mitchell <mark@markmitchell.com>
7292
7293 * decl.c (pushtag): Revert previous change.
7294 * pt.c (lookup_template_class): Don't put out debugging
7295 information for types that use template parameters.
7296
7297 * decl.c (pushtag): Don't put out debugging information for
7298 compiler-generated typedefs.
7299
7300 * error.c (dump_type_real): Don't crash when presented with
7301 intQI_type_node or the like.
7302
7303 * semantics.c (finish_translation_unit): Fix spelling error in
7304 comment.
7305
7306 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
7307
7308 * decl.c (lookup_name_real): Pull out single function here.
7309 (select_decl): Not here.
7310 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
7311
7312 * decl.c (qualify_lookup): Tweak again.
7313
7314 * pt.c (lookup_template_class): Don't mess with the context of the
7315 instantiation.
7316 * decl2.c (current_decl_namespace): Remove special handling for
7317 templates.
7318
7319 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
7320 a member template specialization.
7321
7322 * tree.c (ovl_member): Use decls_match to compare functions.
7323 * decl.c (decls_match): Check the context of a function.
7324
7325 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
7326 in Koenig lookup support rules.
7327 * semantics.c (finish_call_expr): Handle the new cases.
7328
7329 * typeck.c (build_x_function_call): Handle overloaded methods.
7330
7331 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
7332
7333 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7334
7335 * semantics.c (finish_object_call_expr): Revert previous change.
7336 * call.c (build_new_method_call): Likewise. Instead, convert
7337 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
7338
7339 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7340
7341 * decl.c (qualify_lookup): Handle templates.
7342
7343 * decl2.c (do_using_directive): Don't pass ancestor.
7344 * decl.c (push_using_directive): Calculate ancestor.
7345
7346 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
7347 * decl.c (pushdecl): Move type shadowing handling from here...
7348 (duplicate_decls): ...to here.
7349 * decl.c (set_identifier_local_value_with_scope): New fn.
7350 (pushdecl): Use it.
7351 (set_identifier_local_value, lookup_type_current_level): New fns.
7352 * decl2.c (do_local_using_decl): Handle types and binding level
7353 stuff properly.
7354
7355 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
7356 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
7357 (lookup_namespace_name): Likewise.
7358 * typeck.c (build_unary_op): Not here anymore.
7359
7360 * decl2.c (do_class_using_decl): Make sure we get an identifier.
7361 * class.c (handle_using_decl): Ignore TYPE_DECLs.
7362
7363 * decl.c (qualify_lookup): New fn.
7364 (lookup_name_real): Use it.
7365
7366 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
7367
7368 * decl2.c (add_using_namespace): When directly using a namespace
7369 that was indirect before, promote it.
7370
7371 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
7372 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
7373 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
7374 * decl.c (select_decl): Replace two flag parameters by one.
7375 (unqualified_namespace_lookup): Likewise, pass flag.
7376 (lookup_flags): New function.
7377 (lookup_name_real): Compute flags, pass them.
7378 (lookup_namespace_name): Call with zero-flag.
7379 * decl2.c (ambiguous_decl): Add flag parameter, complain only
7380 according to flags.
7381 (lookup_using_namespace, qualified_lookup_using_namespace):
7382 Add flag parameter, pass them through.
7383 * lex.c (do_scoped_id): Call with zero-flag.
7384
7385 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7386
7387 * typeck.c (convert_for_assignment): Use comptypes.
7388
7389 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7390
7391 * semantics.c (finish_object_call_expr): Move test for the
7392 function called being a TYPE_DECL to ...
7393 * call.c (build_new_method_call): Here.
7394
7395 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7396
7397 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7398 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7399
7400 * lex.c (looking_for_typename): Don't initialize.
7401
7402 * decl2.c (ambiguous_decl): Clarify error message.
7403
7404 * decl.c (push_using_directive): Iterate over namespaces used
7405 indirectly.
7406
7407 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7408
7409 * decl2.c (add_using_namespace): Iterate over namespaces used
7410 indirectly.
7411
7412 * decl.c (lookup_name_real): Accept namespace aliases as locals.
7413 (cat_namespace_levels): Ignore aliases.
7414 (duplicate_decls): Ignore duplicate aliases.
7415 * decl2.c (do_namespace_alias): Process block level namespace
7416 aliases. Store alias with pushdecl. Remove odr errors.
7417 * parse.y (namespace_alias): New non-terminal.
7418 (extdef): Use it.
7419
7420 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7421
7422 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7423 Handle TEMPLATE_TYPE_PARM.
7424 (arg_assoc): Rewrite.
7425
7426 * pt.c (complete_template_args): Don't look at the context unless
7427 we have to.
7428
7429 * method.c (build_decl_overload_real): Fix namespace handling.
7430
7431 * typeck.c (build_unary_op): Extract a lone function from an
7432 OVERLOAD.
7433
7434 * call.c (build_scoped_method_call): Handle getting a namespace
7435 for basetype in a destructor call.
7436 (check_dtor_name): Handle enums.
7437
7438 * parse.y (using_directive): New nonterminal.
7439 (extdef, simple_stmt): Use it.
7440
7441 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7442
7443 * decl2.c (add_function): Move error message ...
7444 (arg_assoc_namespace): ... from here.
7445
7446 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7447
7448 * parse.y (namespace_qualifier): Fix multiple level handling.
7449 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7450 (arg_assoc): Don't skip the first argument of a function.
7451
7452 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
7453
7454 * search.c (my_tree_cons): Clean up.
7455
7456 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7457
7458 * call.c (joust): Don't warn about "confusing" conversions to the
7459 same type.
7460
7461 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7462
7463 * class.c (push_nested_class): Complain about namespaces.
7464 * decl.c (start_decl): Enter the object's namespace.
7465 (cp_finish_decl): Leave it.
7466 (grokdeclarator): Likewise.
7467 * decl2.c (check_decl_namespace): New function.
7468 (finish_file): Call it.
7469 * parse.y (complex_direct_notype_declarator): Set complexity
7470 of namespace-qualified ids to -1, enter the namespace.
7471
7472 * method.c (build_template_decl_overload): Expect _DECL as first
7473 parameter. Put context temporarily into current_namespace.
7474 * pt.c (check_explicit_specialization): Change caller.
7475 (tsubst): Likewise.
7476
7477 * init.c (build_offset_ref): Call mark_used and
7478 convert_from_reference for namespace members.
7479
7480 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
7481
7482 * search.c (my_tree_cons): The bitfield is at index 2.
7483
7484 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
7485
7486 * lang-options.h: Format changed to work with new --help support
7487 in gcc/toplev.c
7488
7489 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7490
7491 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7492 Do Koenig lookup in CALL_EXPR.
7493 (arg_assoc): Handle error_mark.
7494 * lex.c (is_global): New function.
7495 (do_identifier): Expect arguments for Koenig lookup.
7496 * parse.y (primary): Add rules for calls of unqualified function calls.
7497 (do_id): Change call of do_identifier.
7498 * pt.c (finish_stmt_expr): Likewise.
7499 * semantics.c (finish_id_expr): Likewise.
7500 (finish_call_expr): Add integer parameter to indicate
7501 argument-dependent lookup.
7502
7503 * decl.c (struct binding_level): New field using_directives.
7504 (push_using_decl): Not sorry anymore.
7505 (push_using_directive): New function.
7506 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7507 (unqualified_namespace_lookup): New function, code from ...
7508 (lookup_name_real): ... here.
7509 * decl2.c (lookup_using_namespace): Pass using list instead of
7510 initial scope.
7511 (validate_nonmember_using_decl): New function.
7512 (do_nonmember_using_decl): New function.
7513 (do_toplevel_using_decl): Use them.
7514 (do_local_using_decl): New function.
7515 (do_using_directive): Support block-level directives.
7516 * parse.y (simple_stmt): Support using declarations and
7517 directives.
7518 (namespace_qualifier, namespace_using_decl): New non-terminals.
7519
7520 * xref.c (classname): New function.
7521 (GNU_xref_hier): Change class and base parameters to tree.
7522 * decl.c (xref_baseypes): Change caller.
7523 * friend.c (make_friend_class): Likewise.
7524
7525 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7526
7527 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7528 comparison.
7529
7530 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7531 template template parameter, record its use.
7532 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7533 its template arguments if exists.
7534
7535 * pt.c (coerce_template_template_parms): New function equivalent
7536 to coerce_template_parms when IS_TMPL_PARM is true.
7537 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
7538 all callers changed.
7539
7540 (coerce_template_parms): Access ARGLIST properly when creating a
7541 new vector. Only accept implicit TYPE_DECL as valid argument for
7542 a template template parameter when it is a base class of
7543 current_class_type. Don't display error message when COMPLAIN is
7544 false.
7545
7546 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
7547
7548 * repo.c (get_base_filename): Use file_name_nondirectory.
7549 (open_repo_file): Likewise.
7550 * cp-tree.h (file_name_nondirectory): Add prototype.
7551
7552 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
7553
7554 * friend.c (do_friend): Pull the identifier out of declarator.
7555 Use cp_error and friends.
7556 * decl2.c (qualified_lookup_using_namespace): Fix call to
7557 purpose_member.
7558 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7559 (grokvardecl): Use DECL_CLASS_SCOPE_P.
7560 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7561 * class.c (warn_hidden): Fix for OVERLOAD.
7562 From grahams@rcp.co.uk:
7563 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7564 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7565
7566 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
7567
7568 * g++.1 (-traditional): Remove duplicated documentation.
7569
7570 1998-07-11 Mark Mitchell <mark@markmitchell.com>
7571
7572 * method.c (flush_repeats): Add nrepeats parameter.
7573 (issue_nrepeats): Likewise.
7574 (is_back_referenceable_type): New function. Don't back-reference
7575 TEMPLATE_TYPE_PARMs as well as simple types like integers.
7576 (build_mangled_name_for_type): Likewise.
7577 (build_mangled_name_for_type_with_Gcode): Likewise.
7578 (lasttype): Remove.
7579 (nrepeats): Likewise.
7580 (Nrepeats): Likewise.
7581 (start_squangling): Don't clear the variables removed above.
7582 (end_squangling): Likewise.
7583 (flush_repeats): Tidy. Use nrepeats parameter rather than
7584 Nrepeats global.
7585 (issue_nrepeats): Likewise, but with nrepeats global. Use
7586 is_backreferenceable_type.
7587 (build_overload_nested_name): Tidy. Add comment. Use
7588 build_mangled_name_for_type.
7589 (build_underscore_int): Comment.
7590 (build_overload_scope_ref): Use build_mangled_name_for_type.
7591 (build_overload_int): Likewise.
7592 (build_template_template_parm_names): Tidy.
7593 (build_template_parm_names): Use build_mangled_name_for_type.
7594 (build_overload_identifier): Add comments.
7595 (build_mangled_name_for_type_with_Gcode): Split out from
7596 build_mangled_name.
7597 (build_mangled_name_for_type): Use it.
7598 (build_mangled_name): Rework to use build_mangled_name_for_type
7599 and to not use global nrepeats/Nrepeats. Tidy.
7600 (process_modifiers): Tidy.
7601 (check_btype): Use is_backreferenceable_type. Add comment.
7602 Rename `node' to `type'.
7603 (process_overload_item): Set numeric_output_need_bar here.
7604 Use build_mangled_name_for_type. Tidy.
7605 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
7606 build_mangled_name_for_type.
7607
7608 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7609 for TYPE_DECLs.
7610
7611 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
7612
7613 * cp-tree.h (warn_long_long): Define.
7614 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7615 warning "ANSI C++ does not support `long long'".
7616 * decl2.c (warn_long_long): Define.
7617 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7618
7619 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
7620
7621 * decl.c (xref_tag): Handle attributes between 'class' and name.
7622 * parse.y (aggr): Likewise.
7623 * semantics.c (finish_class_definition): Likewise.
7624 * Makefile.in (EXPECTED): Adjust.
7625
7626 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7627 * decl2.c: Define them.
7628 (lang_decode_option): Handle them.
7629 * lang-options.h: Add -foptional-diags.
7630 * class.c (finish_struct): Don't complain about multiple meanings of
7631 name if -fno-optional-diags.
7632 * decl.c (pushdecl_class_level): Likewise.
7633 * lex.c (real_yylex): Check warn_multichar.
7634
7635 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
7636
7637 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7638
7639 * tree.c (make_binfo): Fix length.
7640
7641 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
7642
7643 * decl2.c (lang_decode_option): Remove warn_template_debugging.
7644 * lang-options.h: Likewise.
7645
7646 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7647
7648 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7649 (process_start_catch_block): Likewise for variables
7650 `false_label_rtx', `call_rtx' and `return_value_rtx'.
7651
7652 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
7653
7654 * tree.c (build_srcloc): Make sure we allocate this node on the
7655 permanent obstack.
7656
7657 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
7658
7659 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7660 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7661 (lang_specific_driver): Only add -lm automatically if need_math is
7662 nonzero.
7663
7664 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
7665
7666 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
7667
7668 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7669
7670 * Makefile.in (EXPR_H): New dependency variable.
7671 (decl2.o): Depend on $(EXPR_H).
7672 (typeck.o): Likewise.
7673 (init.o): Likewise.
7674 (expr.o): Likewise.
7675
7676 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7677
7678 * decl.c (start_enum): Put local enums on permanent_obstack.
7679
7680 1998-06-25 Mark Mitchell <mark@markmitchell.com>
7681
7682 * cp-tree.h (c_get_alias_set): Declare.
7683 * decl.c (init_decl_processing): Set lang_get_alias_set.
7684
7685 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
7686
7687 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7688 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7689 flag for all function decls which are in the exception table.
7690 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7691 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7692 code is emitted for any referenced rtti function.
7693
7694 1998-06-25 Dave Brolley <brolley@cygnus.com>
7695
7696 * lang-specs.h: Use new | syntax to eliminate
7697 string concatenation.
7698
7699 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
7700
7701 * cp-tree.h (CP_DECL_CONTEXT): New macro.
7702 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7703 * method.c (build_overload_nested_name): Likewise.
7704 * sig.c (build_signature_pointer_or_reference_type): Don't set
7705 DECL_CONTEXT.
7706
7707 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7708
7709 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7710 * cp-tree.h (FROB_CONTEXT): New macro.
7711 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7712 * decl.c (namespace_binding): Replace NULL_TREE with
7713 global_namespace.
7714 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7715 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7716 Likewise.
7717 * decl.c (pushtag): Use FROB_CONTEXT.
7718 (pushdecl, make_typename_type, define_function, grokdeclarator):
7719 Likewise.
7720 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7721 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7722 Likewise.
7723 * decl2.c (decl_namespace): Return global_namespace if no context.
7724 * method.c (build_overload_nested_name): Expect null as context.
7725 * pt.c (mangle_class_name_for_template): Do nothing for null
7726 contexts.
7727 (lookup_template_class): Allow for null id_context.
7728
7729 1998-06-25 Richard Henderson <rth@cygnus.com>
7730
7731 * method.c (emit_thunk): Set current_function_is_thunk for the
7732 ASM_OUTPUT_MI_THUNK case as well.
7733
7734 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7735
7736 * exception.cc (__cplus_type_matcher): Get a match_info pointer
7737 instead of an exception table entry as a parameter.
7738
7739 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7740
7741 * parse.y (function_try_block): Don't call start_catch_handler.
7742 * except.c (call_eh_info): Remove coerced field from declaration.
7743 (build_eh_type_type_ref): New function to create an address of a
7744 rtti function for the new style exception tables.
7745 (expand_start_catch_block): Split function, this contains the
7746 common part.
7747 (process_start_catch_block_old): New function to perform the rest
7748 of expand_start_catch_block under old style exceptions.
7749 (process_start_catch_block_old): New function to perform the rest
7750 of expand_start_catch_block under new style exceptions.
7751 (expand_end_catch_block): Only pop the false label off the stack under
7752 the old style of exceptions.
7753 * semantics.c (finish_try_block): Don't call start_catch_handler.
7754 * exception.cc (struct cp_eh_info): Add original_value field.
7755 (__cplus_type_matcher): Perform type matching on the original exception
7756 value, and if we have a match, set the current value.
7757 (__cp_push_exception): Set the original exception value.
7758
7759 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
7760
7761 * call.c (joust): Fix confusing conversion warning.
7762
7763 * call.c (build_op_delete_call): Add placement parm. Check
7764 LOOKUP_SPECULATIVELY.
7765 * cp-tree.h, decl2.c, init.c: Adjust.
7766 * decl.c (finish_function): Use it.
7767
7768 * pt.c (tsubst): Diagnose creating void fields or variables.
7769
7770 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7771
7772 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
7773
7774 * cp-tree.h (check_dtor_name): Add prototype.
7775
7776 * init.c (expand_member_init): Remove unused variables
7777 `ptr_type_node', `parm' and `rval'.
7778
7779 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
7780 in call to fprintf.
7781 (lang_print_xnode): Likewise.
7782
7783 * typeck2.c (enum_name_string): Cast argument to sprintf to long
7784 and use %ld specifier.
7785
7786 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
7787 specifier in call to fprintf.
7788 (GNU_xref_member): Cast argument to sprintf to int.
7789
7790 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7791
7792 * typeck2.c (pop_init_level): Warn about implicit zero initialization
7793 of struct members.
7794
7795 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7796
7797 * cp-tree.h: Prototype function `check_java_method'.
7798
7799 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7800
7801 * class.c (finish_struct): Make conflicting use of id a pedwarn.
7802 * decl.c (pushdecl_class_level): Likewise.
7803
7804 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7805
7806 * pt.c (convert_nontype_argument): Issue an error when presented
7807 with an integer (real) constant that cannot be simplified to an
7808 INT_CST (REAL_CST).
7809
7810 * cp-tree.h (c_get_alias_set): Remove declaration added in
7811 1998-06-13 change that should never have been checked in.
7812
7813 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7814
7815 * typeck.c (build_binary_op_nodefault): Change % in format strings
7816 to %%.
7817
7818 * decl.c (grokvardecl): Don't build_static_name for decls that
7819 aren't at namespace scope.
7820
7821 * init.c (perform_member_init): Catch default-initialization of
7822 references.
7823
7824 1998-06-17 Mark Mitchell <mark@markmitchell.com>
7825
7826 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
7827
7828 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7829
7830 * method.c (hack_identifier): Complain about getting a namespace
7831 or class template.
7832 * typeck.c (decay_conversion): Remove check for namespaces.
7833 * typeck2.c (incomplete_type_error): Likewise.
7834 * parse.y (template_arg): Add PTYPENAME expansion.
7835
7836 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
7837
7838 * decl.c (grokvardecl): Don't build external assembler names for
7839 TYPENAMEs in other namespaces as there is no declarator.
7840 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
7841 info from DECL_CONTEXT if it is NULL.
7842
7843 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
7844
7845 * call.c (check_dtor_name): Split out.
7846 (build_scoped_method_call): Use it.
7847 (build_method_call): Use it.
7848 * init.c (build_offset_ref): Use it.
7849
7850 * typeck.c (build_static_cast): Fix handling of pointers to members.
7851
7852 * decl.c (finish_function): Just return nothing from a constructor.
7853 * typeck.c (c_expand_return): Complain about returning a void
7854 expression from a destructor.
7855
7856 1998-06-13 Mark Mitchell <mark@markmitchell.com>
7857
7858 * class.c (alter_access): Accept a BINFO explaining how to get
7859 from the entity whose accessed is being altered to the type doing
7860 the altering.
7861 (handle_using_decl): New function containing code split out from ...
7862 (finish_struct_1): Here.
7863
7864 * cp-tree.h (complete_type_or_else): Declare.
7865 * init.c (build_new_1, build_delete): Use it.
7866 * typeck.c (require_complete_type): Use complete_type, rather than
7867 expanding it inline.
7868 (complete_type_or_else): New function.
7869 (build_component_ref): Use it.
7870 (pointer_int_sum): Make sure the type pointed to is complete.
7871 (pointer_diff): Likewise.
7872
7873 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
7874 types.
7875
7876 * search.c (get_matching_virtual): Note that member templates
7877 cannot override virtual functions.
7878
7879 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
7880
7881 * pt.c (check_explicit_specialization): If DECLARATOR turned into
7882 an error_mark_node from lookup_template_function, return the same.
7883 (determine_specialization): Also make sure TEMPLATE_ID isn't an
7884 error_mark_node, before we try to read its operands.
7885 * decl.c (grokdeclarator): If we got an error_mark_node from
7886 check_explicit_specialization, just return it right back.
7887
7888 1998-06-12 Mark Mitchell <mark@markmitchell.com>
7889
7890 * class.c (instantiate_type): Don't treat template-ids that don't
7891 specify any template arguments as equivalent to ordinary
7892 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
7893 pointer-to-members for member templates. Tidy slightly.
7894 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
7895 * init.c (build_offset_ref): Handle template-ids like ordinary
7896 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
7897 offset part of the OFFSET_REF.
7898 * typeck.c (build_unary_op): Change check for unknown types to
7899 look for OFFSET_REFs, not SCOPE_REFs.
7900
7901 1998-06-11 Mark Mitchell <mark@markmitchell.com>
7902
7903 * pt.c (is_member_template_class): New function.
7904 (push_template_decl_real): Use it.
7905
7906 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
7907
7908 * friend.c (do_friend): Add support for nested classes using
7909 member functions of the enclosing class as friends.
7910
7911 1998-06-10 Mark Mitchell <mark@markmitchell.com>
7912
7913 * call.c (convert_default_arg): Make global, not static.
7914 (convert_arg_for_ellipsis): Split out from ...
7915 (build_over_call): Here.
7916 * cp-tree.h (convert_default_arg); Declare.
7917 (convert_arg_to_ellipsis): Likewise.
7918 (do_member_init): Remove.
7919 * init.c (do_member_init): Remove; this code is dead.
7920 (expand_member_init): Remove much of this code; it is dead.
7921 * typeck.c (convert_arguments): Use convert_default_arg and
7922 convert_arg_for_ellipsis, rather than duplicating here.
7923
7924 * call.c (convert_like): Don't fail silently if
7925 build_user_type_conversion fails. Always return error_mark_node
7926 for failure.
7927
7928 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7929
7930 * search.c (covariant_return_p): Complain about ambiguous base.
7931
7932 * typeck.c (build_component_ref): Diagnose ref to nested type.
7933
7934 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7935
7936 * decl.c (grokparms): Check that INIT isn't an error_mark_node
7937 before giving error about invalid type for default arg.
7938
7939 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7940
7941 * call.c (build_method_call): Fix thinko.
7942
7943 1998-06-10 Dave Brolley <brolley@cygnus.com>
7944
7945 * decl2.c (lang_decode_option): New argc/argv interface.
7946 * cp-tree.h (lang_decode_option): New argc/argv interface.
7947 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
7948 specified for cpplib-enabled compilers.
7949 * lex.c (lang_init): Don't check_newline for cpplib.
7950 (init_parse): Don't initialize cpplib here.
7951
7952 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
7953
7954 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
7955 piece before checking DECL_MUTABLE_P.
7956
7957 1998-06-10 John Carr <jfc@mit.edu>
7958
7959 * tree.c (debug_binfo): Make printf format match arguments.
7960
7961 * error.c (OB_PUTI): Make printf format match arguments.
7962
7963 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
7964
7965 * init.c (perform_member_init): Handle default-initialization.
7966
7967 * except.c (build_throw): Handle throwing NULL.
7968
7969 * typeck.c (build_x_function_call): Use resolve_offset_ref.
7970
7971 * search.c (compute_access): Only strip an anonymous union
7972 for a FIELD_DECL.
7973
7974 * call.c (add_builtin_candidates): Tweak.
7975
7976 * cvt.c (build_expr_type_conversion): Restore code for conversion
7977 from class types.
7978 * decl2.c (delete_sanity): Use it. Clean up.
7979
7980 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
7981
7982 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
7983
7984 * typeck.c (c_expand_return): Don't warn about void expressions on
7985 return statements in functions returning void.
7986
7987 1998-06-09 Mark Mitchell <mark@markmitchell.com>
7988
7989 * pt.c (fn_type_unification): Revise documentation. Tidy.
7990 (type_unification): Likewise.
7991
7992 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
7993
7994 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
7995 expand_end_catch.
7996 * parse.y (function_try_block): Rename expand_start_catch, and delete
7997 expand_end_catch.
7998 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
7999 expand_end_catch.
8000
8001 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
8002
8003 * search.c (lookup_member): New fn.
8004 * class.c (finish_struct_1): Use it.
8005 * decl.c (lookup_name_real): Use it.
8006
8007 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8008
8009 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8010
8011 * cp-tree.h: Add prototype for `maybe_print_template_context' and
8012 `maybe_make_one_only'.
8013
8014 * decl.c (auto_function): Remove unused variable `decl'.
8015
8016 * decl2.c: Include dwarf2out.h and dwarfout.h.
8017
8018 * lex.c: Remove redundant declarations of `set_float_handler' and
8019 `asm_out_file'.
8020
8021 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
8022
8023 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8024 time flag. Call __cp_eh_info instead of __cp_exception_info.
8025 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8026 (__cp_exception_info): Return offset into cp_eh_info structure to
8027 match what use to be the start of this structure.
8028 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8029 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8030 compile time flag.
8031 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8032 __cp_eh_info instead of __cp_exception_info.
8033
8034 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
8035
8036 * decl.c (cp_finish_decl): Disable inlining of extern inlines
8037 with static variables.
8038
8039 1998-06-08 Mark Mitchell <mark@markmitchell.com>
8040
8041 * init.c (build_offset_ref): Correct previous change to use build,
8042 not build_min.
8043
8044 1998-06-07 Mark Mitchell <mark@markmitchell.com>
8045
8046 * class.c (instantiate_type): Handle pointer-to-members where the
8047 member is a template.
8048 * init.c (build_offset_ref): Likewise.
8049 * typeck.c (build_unary_op): Likewise.
8050
8051 1998-06-07 Richard Henderson <rth@cygnus.com>
8052
8053 * lex.c (lang_init_options): New function.
8054 (lang_init): Remove flag_exceptions == 2 hack.
8055
8056 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8057
8058 * search.c (envelope_add_decl): Tweak for implicit typename.
8059
8060 * call.c (joust): Also warn about confusing conversion op/constructor
8061 overload resolution.
8062
8063 * spew.c (yylex): Also return the TYPE_DECL if got_object.
8064 Don't clear got_object after '~'.
8065 * call.c (build_scoped_method_call): Tweak destructor handling.
8066 (build_method_call): Likewise.
8067 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8068 TYPE_MAIN_VARIANT for destructors.
8069 * semantics.c (finish_object_call_expr): Complain about calling a
8070 TYPE_DECL.
8071
8072 1998-06-05 Per Bothner <bothner@cygnus.com>
8073
8074 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8075 Define - update needed by gcc.c change.
8076
8077 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8078
8079 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8080
8081 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8082
8083 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8084 * decl.c (lookup_name_real): Add namespaces_only parameter.
8085 If set, return only NAMESPACE_DECLs.
8086 (select_decl): Likewise.
8087 (identifier_type_value): Give additional parameter.
8088 (lookup_name_nonclass): Likewise.
8089 (lookup_name): Likewise.
8090 (find_binding): Skip namespace aliases.
8091 (binding_for_name): Likewise.
8092 (push_namespace): Check for namespace aliases.
8093 (lookup_name_namespace_only): New function.
8094 (begin_only_namespace_names, end_only_namespace_names): New functions.
8095 * decl2.c (set_decl_namespace): Skip namespace aliases.
8096 (do_using_directive): Likewise.
8097 (do_namespace_alias): Produce namespace aliases, fix alias
8098 redeclaration.
8099 * error.c (dump_decl): Support SCOPE_REF.
8100 * parse.y (extdef): Wrap lookup with namespace_only for namespace
8101 aliases and using declarations.
8102
8103 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
8104
8105 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8106
8107 * error.c (dump_expr): Clean up NEW_EXPR case.
8108
8109 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8110
8111 Suggested by Brendan Kehoe
8112 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8113 treat it as using ::decl.
8114
8115 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8116
8117 * tree.c (mapcar): Support NEW_EXPR.
8118
8119 * error.c (dump_expr): Support NEW_EXPR.
8120
8121 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
8122
8123 * method.c (make_thunk): Use overload machinery to make name.
8124 * search.c (covariant_return_p): New fn.
8125 (get_matching_virtual): Use it.
8126
8127 * init.c (build_new_1): Fix check for void.
8128
8129 1998-06-01 Per Bothner <bothner@cygnus.com>
8130
8131 * cp-tree.h (TYPE_FOR_JAVA): New macro.
8132 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8133 java_int_type_node, java_long_type_node, java_float_type_node,
8134 java_double_type_node, java_char_type_node, java_boolean_type_node):
8135 New "primitive" types, with predefined names __java_byte etc.
8136 (record_builtin_java_type): New function.
8137 (init_decl_processing): Make Java types with record_builtin_java_type.
8138 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
8139 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
8140 (grokfndecl): Call check_java_method for Java classes.
8141 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
8142 (process_overload_item): Match types against specific
8143 java_XX_type_node types, rather than using is_java_type.
8144 * class.c (finish_struct_1): Don't add default copy constructor
8145 or operator= if TYPE_FOR_JAVA.
8146 (pop_lang_conext): Restore strict_prototyp proper if Java.
8147 * decl2.c (acceptable_java_type, check_java_method): New functions.
8148 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
8149 (tsubst): Move common statement after if statement.
8150 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
8151
8152 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
8153
8154 * pt.c (for_each_template_parm): Use first_rtl_op.
8155
8156 * tree.c (build_cplus_array_type_1): Also check index_type for
8157 template parms.
8158
8159 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
8160
8161 * pt.c (tsubst): Always copy BINFO_BASETYPES.
8162
8163 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
8164
8165 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8166 TYPE_SIZE_UNIT too.
8167
8168 1998-05-29 Mark Mitchell <mark@markmitchell.com>
8169
8170 * decl.c (grokdeclarator): Don't complain about in-class
8171 initialization of static consts if we don't really know the type
8172 of the variable.
8173
8174 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
8175
8176 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8177 * method.c (build_destructor_name): New fn.
8178 * decl2.c (maybe_retrofit_in_chrg): Split out...
8179 (grokclassfn): From here. Reorganize.
8180 * decl.c (grok_ctor_properties): Make sure ctors for types with
8181 vbases have the in_chrg parm.
8182 * pt.c (instantiate_class_template): Update
8183 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
8184 grok_*_properties.
8185 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8186
8187 1998-05-28 Mark Mitchell <mark@markmitchell.com>
8188
8189 * pt.c (instantiate_decl): Make test for whether or not static
8190 variables should be instantiated early match its comment.
8191
8192 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
8193
8194 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8195 a member.
8196 (start_function): Call check_default_args.
8197 * decl2.c (grokfield): Don't call check_default_args.
8198 (check_default_args): Use cp_error_at.
8199 * lex.c (do_pending_defargs): Call check_default_args.
8200
8201 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
8202
8203 * call.c (build_method_call): Make sure get_type_value returns
8204 something before we try to use its TYPE_MAIN_VARIANT.
8205 (build_scoped_method_call): Likewise.
8206
8207 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
8208
8209 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
8210 initialize an array.
8211
8212 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
8213 DECL_VIRTUAL_P.
8214
8215 * friend.c (do_friend): Clarify template warning.
8216
8217 1998-05-27 Mark Mitchell <mark@markmitchell.com>
8218
8219 * decl.c (shadow_label): Don't treat decls as identifiers.
8220 (maybe_push_to_top_level): Clear shadowed_labels.
8221
8222 * pt.c (instantiate_decl): Reset lineno and filename after calling
8223 regenerate_decl_from_template.
8224
8225 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
8226 error_mark_node.
8227
8228 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
8229
8230 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
8231
8232 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8233
8234 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
8235 (convert_nontype_argument): Handle cases when nontype template
8236 parameters become classes after substitution.
8237
8238 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8239
8240 * friend.c (is_friend): Use comptypes, rather than == to compare
8241 types. Modify for new representation of template friends.
8242 (make_friend_class): Likewise.
8243 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
8244 (instantiate_class_template): Deal with template friends.
8245
8246 * decl.c (store_parm_decls): Remove redundant call to
8247 expand_main_function.
8248
8249 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
8250
8251 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
8252 DECL_USE_TEMPLATE.
8253
8254 1998-05-26 Per Bothner <bothner@cygnus.com>
8255
8256 * language_as_string: Handle lang_java.
8257
8258 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
8259
8260 * decl.c (pushdecl): Don't copy the type_decl.
8261
8262 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8263
8264 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
8265 current_class_type.
8266 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
8267
8268 * parse.y (complex_direct_notype_declarator): Use $1 to access
8269 scope of notype_qualified_id.
8270
8271 1998-05-26 Dave Brolley <brolley@cygnus.com>
8272
8273 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
8274 (init_parse): Initialize cpplib interface.
8275
8276 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
8277 empty continuation.
8278
8279 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8280
8281 * decl.c (pushtag): Avoid crashing on erroneous input.
8282
8283 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8284
8285 * decl.c (push_namespace): Only produce one unique name for
8286 anonymous namespaces.
8287 (get_unique_name): Remove.
8288
8289 1998-05-25 Mark Mitchell <mark@markmitchell.com>
8290
8291 * call.c (tourney): Don't do any extra comparisons.
8292
8293 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
8294
8295 * cp-tree.h (processing_template_parmlist): Declare.
8296 * decl.c (pushtag): Don't call push_template_decl when we
8297 shouldn't.
8298 * pt.c (processing_template_parmlist): New variable.
8299 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
8300 (complete_template_args): Use it.
8301 (add_to_template_args): Likewise.
8302 (innermost_args): Likewise.
8303 (tsubst): Likewise.
8304 (begin_template_parm_list): Use processing_template_parmlist.
8305 (end_template_parm_list): Likewise.
8306
8307 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
8308 * decl.c (grokdeclarator): Use it.
8309 * decl2.c (grok_x_components): Likewise.
8310 * init.c (initializing_context): Likewise.
8311 * method.c (do_build_copy_constructor): Likewise.
8312 (do_build_assign_ref): Likewise.
8313 * search.c (compute_access): Likewise.
8314 * typeck.c (build_component_ref): Likewise.
8315
8316 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
8317 unnamed type a typedef name "for linkage purposes".
8318
8319 * pt.c (lookup_template_class): Don't look at
8320 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
8321
8322 * method.c (build_overload_int): Handle error cases gracefully.
8323
8324 * pt.c (instantiate_decl): Handle static member variables
8325 correctly.
8326
8327 * pt.c (tsubst): Use the tsubst'd type when producing new
8328 TEMPLATE_PARM_INDEX nodes.
8329
8330 1998-05-24 Mark Mitchell <mark@markmitchell.com>
8331
8332 * tree.c (cp_tree_equal): Handle pointers to member functions.
8333
8334 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
8335 sure the type of the REF_BIND is a reference type.
8336 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
8337 target_type for clarity.
8338
8339 * parse.y (xcond): Move call to condition_conversion ...
8340 * semantics.c (finish_for_cond): Here.
8341 * parse.c: Regenerated.
8342
8343 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
8344
8345 * decl.c (push_namespace): Namespaces have type void.
8346 * typeck2.c (incomplete_type_error): Complain about namespace
8347 used as expression.
8348 * typeck.c (decay_conversion): Likewise.
8349
8350 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8351
8352 * error.c (dump_expr): Support namespaces.
8353
8354 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
8355
8356 * cp-tree.def: Add SRCLOC.
8357 * cp-tree.h: Add struct tree_srcloc and accessor macros.
8358 * tree.c (build_srcloc, build_srcloc_here): New fns.
8359 * pt.c (add_pending_template): Use build_srcloc_here.
8360 (push_tinst_level): Update last_template_error_tick before erroring.
8361 (instantiate_decl): Restore lineno and input_filename before
8362 calling add_pending_template.
8363 * decl2.c (finish_file): Set up lineno and input_filename for
8364 pending templates.
8365
8366 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8367
8368 * decl.c (lang_print_error_function): New fn.
8369 (init_decl_processing): Set print_error_function to use it.
8370 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
8371
8372 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
8373 ICS_BAD_FLAG.
8374
8375 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
8376 copy-initialization.
8377
8378 * class.c (build_vtable_entry): Use int_fits_type_p.
8379 (build_vtable): Pass a signed offset to build_vtable_entry.
8380 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
8381 set_rtti_entry): Likewise.
8382
8383 1998-05-22 Per Bothner <bothner@cygnus.com>
8384
8385 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
8386 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
8387
8388 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8389
8390 * pt.c (print_template_context): Use fprintf instead of cp_error.
8391
8392 * pt.c (determine_specialization): Just return an error_mark_node.
8393 Also print the decl we want in error messages. If we complain,
8394 return error_mark_node.
8395 (tsubst_friend_function): Set lineno and input_filename so
8396 error messages will be useful.
8397 (instantiate_template): Just return an error_mark_node.
8398 (check_explicit_specialization): Don't mess with a returned
8399 error_mark_node.
8400
8401 * pt.c (print_template_context): Add new argument.
8402 (maybe_print_template_context): New fn.
8403 (push_tinst_level): Increment tinst_level_tick.
8404 (pop_tinst_level): Likewise.
8405 * errfn.c (cp_thing): Call maybe_print_template_context. Use
8406 xrealloc instead of xmalloc.
8407
8408 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8409
8410 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8411
8412 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8413 if the template we looked up is the same as the one we already
8414 have.
8415
8416 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
8417
8418 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8419 (cpp_reader,parse_in): Add for cpplib.
8420 (check_newline): Call handle_sysv_pragma with new interface.
8421 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8422
8423 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8424 (sub_getch): Call GETC for cpplib.
8425
8426 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8427 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8428
8429 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8430
8431 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8432
8433 * decl2.c (maybe_make_one_only): New fn.
8434 (import_export_vtable): Use it.
8435 (import_export_decl): Likewise.
8436 * pt.c (mark_decl_instantiated): Likewise.
8437
8438 1998-05-21 Mark Mitchell <mmitchell@usa.net>
8439
8440 * decl2.c (find_representative_member): Rename to ...
8441 (build_anon_union_vars): New function.
8442 (finish_anon_union): Fix stupidity of previous change.
8443
8444 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
8445
8446 * decl.c (grokfndecl): Handle definition of specialization in
8447 friend declaration.
8448
8449 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8450
8451 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8452
8453 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8454 to look for type declarations.
8455 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8456 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8457 (finish_member_class_template): Declare.
8458 * decl.c (pushtag): Put member class templates on the
8459 CLASSTYPE_TAGS list, just as for ordinary member classes.
8460 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8461 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8462 IDENTIFIER_NAMESPACE_VALUEs.
8463 * parse.y (component_decl): Move code to ...
8464 * semantics.c (finish_member_class_template): New function.
8465 Don't put member class templates on the list of components for a
8466 class.
8467 * parse.c: Regenerated.
8468 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8469 In fact, don't use DECL_CONTEXT at all here.
8470
8471 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
8472
8473 * decl.c (record_unknown_type): New function.
8474 (init_decl_processing): Call it for the unknown and global type
8475 nodes.
8476
8477 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8478
8479 * decl2.c (find_representative_member): New function.
8480 (finish_anon_union): Use it.
8481
8482 * cp-tree.h (MAIN_NAME_P): New macro.
8483 (DECL_MAIN_P): Likwise.
8484 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8485 (grokfndecl): Use the new macros.
8486 (grokdeclarator): Likewise.
8487 (start_function): Likewise.
8488 (store_parm_decls): Likewise.
8489 (finsh_function): Likewise.
8490 * friend.c (do_friend): Likewise.
8491 * typeck.c (build_function_call_real): Likewise.
8492 (build_unary_op): Likewise.
8493
8494 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
8495
8496 * decl2.c (start_objects, finish_objects, do_dtors,
8497 do_ctors): Split out from...
8498 (finish_file): ...here.
8499
8500 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
8501
8502 * tree.c (is_overloaded_fn): Don't abort on placeholders from
8503 push_class_decls.
8504
8505 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
8506
8507 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8508
8509 * error.c (dump_expr): Handle an ARROW_EXPR.
8510
8511 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
8512
8513 * decl.c (saveable_obstack): Declare.
8514 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8515 declare, if necessary.
8516
8517 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
8518
8519 * call.c (compare_qual): Remove.
8520 (is_subseq): Tweak.
8521 (is_properly_derived_from): New function.
8522 (maybe_handle_ref_bind): Likewise.
8523 (maybe_handle_implicit_object): Likewise.
8524 (compare_ics): Modify substantially to bring into conformance with
8525 the standard.
8526 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8527 (comp_cv_qualification): Declare.
8528 (comp_cv_qual_signature): Likewise.
8529 * typeck.c (comp_cv_qualification): Likewise.
8530 (comp_cv_qual_signature): Likewise.
8531
8532 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8533
8534 * Makefile.in (parse.o): Depend on toplev.h.
8535
8536 * class.c (typecode_p): Remove prototype and definition.
8537
8538 * cp-tree.h (currently_open_class, is_empty_class, member_p):
8539 Add prototype.
8540
8541 * decl.c (push_overloaded_decl_top_level): Remove prototype and
8542 definition.
8543
8544 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8545 in call to `cp_thing'.
8546 (cp_warning): Likewise for function pointer `warning'.
8547
8548 * except.c (do_function_call): Remove prototype and definition.
8549 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8550
8551 * method.c (is_java_type): Add prototype and make it static.
8552
8553 * parse.y: Include toplev.h.
8554
8555 * pt.c (type_unification): Remove unused variable `arg'.
8556 (instantiate_decl): Likewise for `save_ti'.
8557
8558 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8559
8560 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
8561
8562 * init.c (build_member_call): Handle template_ids.
8563 * parse.y (primary): Add global_scope template_id.
8564
8565 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8566
8567 * decl2.c (get_sentry): Use end_temporary_allocation.
8568 Don't declare permanent_obstack.
8569
8570 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
8571
8572 * parse.y (.finish_new_placement): New non-terminal.
8573 (unary_expr, new_type_id): Use it.
8574 * parse.c: Regenerated.
8575
8576 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
8577
8578 * pt.c (redeclare_class_template): Say where the original definition
8579 of the template-parameter's default argument appeared.
8580
8581 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
8582
8583 * call.c (build_over_call): Tweak empty class handling.
8584
8585 * decl.c (make_typename_type): Use currently_open_class.
8586
8587 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8588
8589 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8590
8591 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8592 for a type unless it is one.
8593
8594 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8595
8596 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
8597
8598 * Makefile.in (program_transform_name, objdir): Define.
8599
8600 * Makefile.in (BISON): Use bison from the build tree if it exists.
8601 (FLEX): Likewise.
8602
8603 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8604
8605 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8606
8607 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8608
8609 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
8610
8611 * call.c (build_scoped_method_call): Likewise.
8612
8613 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
8614
8615 * init.c (build_new_1): Call suspend_momentary around the creation
8616 of values that must be saved for exception handling.
8617 * parse.y (.build_new_placement): New non-terminal.
8618 (unary_expr, new_placement): Use it.
8619 * parse.c: Regenerated.
8620
8621 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
8622
8623 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8624 old and new types.
8625
8626 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8627 canonical type.
8628
8629 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8630
8631 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8632
8633 * decl.c (start_decl): Revert problem change.
8634
8635 * Makefile.in (CONFLICTS): Fix.
8636
8637 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8638
8639 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8640
8641 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
8642
8643 * class.c (finish_struct_1): Use BINFO_SIZE.
8644
8645 * decl.c (start_decl): Use 'tem'.
8646
8647 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
8648
8649 * exception.cc: Include eh-common.h.
8650 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8651 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8652 (__cp_push_exception): Initialize eh_info struct as well.
8653 * except.c: Remove local structs and include eh-common.h.
8654 (init_exception_processing): Set language and version codes.
8655 (call_eh_info): Add presence of eh_info to runtime description of
8656 struct cp_eh_info.
8657 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8658 * semantics.c (finish_try_block): Call start_catch_block() and
8659 end_catch_block().
8660 * parse.y (function_try_block): Call start_catch_block() and
8661 end_catch_block().
8662
8663 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
8664
8665 * typeck.c (original_type): New function.
8666 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8667 to see if they're actually the same.
8668 * cp-tree.h (original_type): Declare.
8669
8670 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8671
8672 * Makefile.in (lex.o): Depend on output.h.
8673
8674 * call.c (add_function_candidate): Remove unused variable `cand'.
8675 (add_conv_candidate): Likewise.
8676 (build_builtin_candidate): Likewise.
8677
8678 * cp-tree.h: Add prototype for `types_overlap_p'.
8679
8680 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8681
8682 * decl2.c (merge_functions): Remove unused variables `tmp' and
8683 `tempn'.
8684
8685 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8686 (code_as_string): Likewise.
8687 (language_as_string): Likewise.
8688 (parm_as_string): Likewise.
8689 (op_as_string): Likewise.
8690 (assop_as_string): Likewise.
8691 (cv_as_string): Likewise.
8692
8693 * lex.c: Include output.h.
8694
8695 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8696
8697 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8698 ATTRIBUTE_UNUSED.
8699
8700 * tinfo.cc (__class_type_info::dcast): Change the type of variable
8701 `i' from int to size_t.
8702
8703 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8704 ATTRIBUTE_UNUSED.
8705
8706 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8707
8708 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8709 DECL_NAMESPACE_SCOPE_P.
8710 (lang_decl_name): Likewise.
8711 * pt.c (tsubst_friend_function, tsubst): Likewise.
8712 * decl.c (pushdecl, redeclaration_error_message, start_decl,
8713 cp_finish_decl, start_function): Likewise.
8714 * class.c (finish_struct_1): Likewise.
8715 * call.c (build_over_call): Likewise.
8716 (compare_ics): Use DERIVED_FROM_P.
8717
8718 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
8719
8720 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8721 * method.c (build_mangled_name): Use it.
8722 (build_decl_overload_real): Likewise.
8723
8724 * error.c (dump_simple_decl): New function, broken out from ...
8725 (dump_decl): Use it.
8726
8727 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
8728
8729 * ptree.c (lang_print_xnode): Add missing `break'.
8730
8731 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8732
8733 * call.c (add_template_candidate): Adjust for changes to
8734 fn_type_unification.
8735 (add_template_candidate_real): Likewise.
8736 (add_template_conv_candidate): Likewise.
8737 (build_user_type_conversion_1): Likewise.
8738 (build_new_function_call): Likewise.
8739 (build_object_call): Likewise.
8740 (build_new_op): Likewise.
8741 (build_new_method_call): Likewise.
8742 * class.c (instantiate_type): Likewise.
8743 * cp-tree.h (unification_kind_t): New type.
8744 (fn_type_unification): Adjust prototype.
8745 (type_unificaiton): Likewise.
8746 * pt.c (UNIFY_ALLOW_NONE): New macro.
8747 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8748 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8749 (UNIFY_ALLOW_DERIVED): Likewise.
8750 (unify): Change prototype.
8751 (maybe_adjust_types_for_deduction): New function.
8752 (check_cv_quals_for_unify): Likewise.
8753 (determine_specialization): Adjust.
8754 (fn_type_unification): Likewise.
8755 (type_unification): Likewise.
8756 (type_unification_real): Likewise. Use
8757 maybe_adjust_types_for_deduction. Fix mishandling of
8758 back-unification of template functions passed as arguments. Pass
8759 appropriate combination of UNIFY_ALLOW_* to unify.
8760 (unify): Remove unused NTPARMS parameter. Use
8761 check_cv_quals_for_unify. Remove bogus code that allowed
8762 too-generous unification in order to adhere more closely to standard.
8763 (get_bindings_real): Adjust.
8764 (get_class_bindings): Likewise.
8765
8766 * method.c (build_overload_identifier): Only use the innermost
8767 template arguments when mangling.
8768 * pt.c (tsubst_template_argument_vector): New function.
8769 (complete_template_args): Deal with the situation where the
8770 extra_args contain more than one level of arguments.
8771 (lookup_template_class): Deal with member template classes, which
8772 may have more than one level of arguments.
8773 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
8774 Improve handling of member template classes. Use
8775 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
8776 tsubst_template_argument_vector where appropriate.
8777 (regenerate_decl_from_template): Break out from ...
8778 (instantiate_decl): Here.
8779
8780 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
8781 * parse.h: Regenerated.
8782 * parse.c: Really regenerated.
8783
8784 * cp-tree.h (finish_unary_op_expr): New function.
8785 (finish_id_expr): Likewise.
8786 (begin_new_placement): Likewise.
8787 (finish_new_placement): Likewise.
8788 (finish_declarator): Likewise.
8789 (finish_translation_unit): Likewise.
8790 (finish_parmlist): Likewise.
8791 (begin_class_definition): Likewise.
8792 (finish_class_definition): Likewise.
8793 (finish_default_args): Likewise.
8794 (finish_inline_definitions): Likewise.
8795 * parse.y (GCC_ASM_KEYWORD): Remove.
8796 (TYPENAME_ELLIPSIS): Likewise.
8797 * parse.c: Regenerated.
8798 Use new functions in semantics.c in the actions for many rules.
8799 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
8800 * hash.h: Regenerated.
8801 * semantics.c (finish_expr_stmt): Allow NULL expr.
8802 (finish_unary_op_expr): New function, containing
8803 code previously in parse.y.
8804 (finish_id_expr): Likewise.
8805 (begin_new_placement): Likewise.
8806 (finish_new_placement): Likewise.
8807 (finish_declarator): Likewise.
8808 (finish_translation_unit): Likewise.
8809 (finish_parmlist): Likewise.
8810 (begin_class_definition): Likewise.
8811 (finish_class_definition): Likewise.
8812 (finish_default_args): Likewise.
8813 (finish_inline_definitions): Likewise.
8814
8815 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
8816
8817 * typeck.c (build_c_cast): Don't decay arrays and functions to
8818 pointer type when converting to a class type.
8819
8820 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
8821
8822 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
8823 (DECL_CLASS_SCOPE_P): Likewise.
8824
8825 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
8826
8827 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
8828 * decl2.c (constructor_name_full): Likewise.
8829
8830 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
8831
8832 * tree.c (mapcar): Add OVERLOAD support.
8833
8834 * init.c (resolve_offset_ref): We must use basetype_path before we
8835 destroy it with a call to convert_pointer_to.
8836
8837 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
8838
8839 * class.c (currently_open_class): New fn.
8840 * decl.c (lookup_name_real): Use it.
8841 * search.c (lookup_field): Likewise.
8842
8843 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
8844
8845 * cp-tree.def (OVERLOAD): New node.
8846 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
8847 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
8848 (NAMESPACE_BINDING): Remove.
8849 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
8850 namespace_binding.
8851 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
8852 Define.
8853 (tree_overload): New struct.
8854 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
8855 (REAL_IDENTIFIER_TYPE_VALUE): Define.
8856 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
8857 (lang_decl_flags): Remove in_namespace.
8858 (lang_decl): Remove chain.
8859 (DECL_CHAIN, DECL_NAMESPACE): Remove.
8860 (flag_honor_std): Declare extern.
8861 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
8862 namespace_binding, set_namespace_binding,
8863 lookup_function_nonclass, cat_namespace_levels,
8864 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
8865 scratch_ovl_cons, ovl_member, build_overload): Declare.
8866 (decl_list_length, get_namespace_id, current_namespace_id,
8867 overloaded_globals_p): Remove.
8868 (lookup_using_namespace, qualified_lookup_using_namespace): Change
8869 return type.
8870 (push_scratch_obstack): New macro.
8871 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
8872 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
8873 convs, fns.
8874 (build_new_function_call): Iterate using OVL_CHAIN.
8875 Print DECL_NAME in when reporting ambiguities.
8876 (build_object_call): Iterate using OVL_NEXT for fns, convs.
8877 (build_new_op): Call lookup_function_nonclass.
8878 Iterate using OVL_NEXT.
8879 (build_op_delete_call): Change detection of members.
8880 Do not wrap TREE_LIST around fields and single global functions.
8881 (build_over_call): Don't push a class level if the context is a
8882 namespace.
8883 (build_new_method_call): Iterate using OVL_NEXT.
8884 * class.c (add_method): Chain overloaded members using
8885 build_overload. Remove copying of method.
8886 (grow_method): When iterating through the obstack, expect OVERLOAD
8887 nodes. Chain overload members.
8888 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
8889 nodes in call to get_baselinks.
8890 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
8891 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
8892 fdecls that are OVERLOAD nodes.
8893 (validate_lhs): New function.
8894 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
8895 code. Use DECL_NAME in error messages. Split code between global
8896 and member function processing.
8897 * decl.c (global_type_node): New static variable.
8898 (in_std): New global.
8899 (struct binding_level): New field usings.
8900 (resume_binding_level): Assert that we are not in a class.
8901 (toplevel_bindings_p): Just check for namespace_p or
8902 pseudo_global.
8903 (resume_level): Remove.
8904 (find_binding): New function.
8905 (binding_for_name): Call it.
8906 (namespace_binding, set_namespace_binding): New functions.
8907 (push_namespace): Associate binding level with new namespace,
8908 resume_binding_level for existing namespace. Remove old code.
8909 Fake std by counting.
8910 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
8911 (maybe_push_to_top_level): Save current namespace.
8912 (pop_from_top_level): Restore saved namespace.
8913 (pop_namespace): Call suspend_binding_level. Remove old code.
8914 (cat_namespace_levels): New function.
8915 (set_identifier_type_value_with_scope): For namespace bindings,
8916 set BINDING_TYPE, and use global_type_node.
8917 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
8918 (identifier_type_value): New function.
8919 (pushtag): If no context, use current_namespace.
8920 (duplicate_decls): Don't process DECL_CHAIN.
8921 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
8922 already set. Never reset it to NULL_TREE. Lookup global variables
8923 in their namespace. Push overloaded templates if they are on
8924 namespace level.
8925 (pushdecl_namespace_level): New function.
8926 (pushdecl_top_level): Implement using pushdecl_namespace_level.
8927 (pushdecl_using_decl): New function.
8928 (overloaded_globals_p): Remove.
8929 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
8930 them. Use namespace_binding and set_namespace_value.
8931 (redeclaration_error_message): Complain if the declarations come
8932 from different namespaces.
8933 (lookup_tag): On namespace level, look in the BINDING_TYPE.
8934 (lookup_namespace_name): Pass tree_bindings from stack. Remove
8935 old code.
8936 (select_decl): New function.
8937 (lookup_name_real): Call it for qualified and unqualified lookup.
8938 Pass tree_bindings from the stack.
8939 If prefer_type is 1, also accept namespaces.
8940 (lookup_function_nonclass): New function.
8941 (init_decl_processing): Set the binding level of the global
8942 namespace to global_binding_level.
8943 Build a proper type list for __builtin_apply.
8944 Initialize std_node to "fake std" if flag_honor_std is set.
8945 Initialize global_type_node.
8946 Allocated bad_alloc in namespace std if flag_honor_std.
8947 (define_function): Set the DECL_CONTEXT to the current_namespace.
8948 (start_decl): A namespace is not considered as a context here. If
8949 the DECL_CONTEXT is a namespace, push the decl.
8950 (cp_finish_decl): Check for namespaces used as initializers.
8951 (grokfndecl): Add namespace parameter. Remove processing of
8952 DECL_CHAIN.
8953 (grokvardecl): Add namespace parameter.
8954 (grokdeclarator): Process SCOPEs that are namespaces. For
8955 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
8956 (start_function): Check for contexts that are namespaces.
8957 Set context for declarations that have not been pushed.
8958 (store_parm_decls): Check for ::main only.
8959 (finish_function): Likewise.
8960 (start_method): Check for contexts that are namespaces.
8961 (start_method): Remove DECL_CHAIN processing.
8962 * decl2.c (flag_honor_std): Declare.
8963 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
8964 (decl_namespace_list): New static global.
8965 (grok_x_components): Ignore namespaces as type contexts.
8966 (check_classfn): Expect OVERLOAD nodes.
8967 (grokfield): Remove DECL_CHAIN processing.
8968 (finish_file): Call cat_namespace_levels.
8969 (merge_functions): New function.
8970 (ambiguous_decl): Rewrite.
8971 (lookup_using_namespace): Produce tree_bindings.
8972 (qualified_lookup_using_namespace): Likewise.
8973 (set_decl_namespace, decl_namespace, current_decl_namespace,
8974 push_decl_namespace, pop_decl_namespace): New functions.
8975 (arg_lookup): New struct.
8976 (add_function, arg_assoc_namespace, arg_assoc_class,
8977 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
8978 New functions.
8979 (get_namespace_id, current_namespace_id): Remove.
8980 (do_toplevel_using_decl): Rewrite.
8981 (do_class_using_decl): Complain about namespace qualifiers.
8982 (do_using_directive): Sorry if not on namespace level. Complain
8983 about unknown namespaces.
8984 * error.c (dump_aggr_type): Check for namespace contexts.
8985 * except.c (init_exception_processing): Push terminate into std.
8986 * friend.c (is_friend): A namespace is not a context, here.
8987 * init.c (expand_member_init): Remove DECL_CHAIN processing.
8988 (build_offset_ref): Process OVERLOAD nodes.
8989 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
8990 * lex.c (identifier_type): Loop using OVL_CHAIN.
8991 (see_typename): Set looking_for_typename to 2.
8992 (real_yylex): Likewise.
8993 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
8994 (do_scoped_id): Expect OVERLOAD nodes.
8995 Change calling convention for qualified_lookup_using_namespace.
8996 (build_lang_decl): Don't set in_namespace anymore.
8997 * method.c (typevec_size): New global.
8998 (build_overload_nested_name): Return if global_namespace.
8999 Otherwise, always expect a declaration context.
9000 (build_qualified_name): Likewise.
9001 Make sure we don't write beyond typevec_size.
9002 (build_decl_overload_real): Likewise.
9003 Allocate one extra slot for the namespace.
9004 (hack_identifier): Mark code dead.
9005 Process OVERLOAD and NAMESPACE_DECL nodes.
9006 * parse.y (program): Pop namespaces until in global namespace.
9007 (extdef): In a using-declaration, don't discard the identifier if
9008 there is no declaration.
9009 (left_curly): Ignore type contexts which are namespaces.
9010 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9011 used as scope.
9012 * pt.c (template_class_depth): Expect types to be namespaces.
9013 (determine_specialization): Simplify by expecting OVERLOAD nodes.
9014 (push_template_decl): Push into namespace level.
9015 Reset ctx if it is a namespace.
9016 Set DECL_CONTEXT to current_namespace if not set already.
9017 Ignore real contexts that are namespaces.
9018 (mangle_class_name_for_template): Skip global_namespace.
9019 Mangle other namespaces as declarations.
9020 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9021 (lookup_template_class): Push into namespace of context.
9022 If the context is a namespace, set it to global_namespace.
9023 Use id_context for mangling.
9024 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9025 (tsubst_friend_function): Ignore namespace contexts.
9026 Push into namespace level.
9027 (tsubst): Handle NAMESPACE_DECL nodes.
9028 Remove DECL_CHAIN processing.
9029 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9030 * ptree.c (print_lang_identifier): Print bindings.
9031 (lang_print_xnode): Print OVERLOAD nodes.
9032 * rtti.c (init_rtti_processing): Push type_info into std.
9033 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9034 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9035 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9036 lookup_fnfields_here): Likewise.
9037 Process all nodes, instead of going through TREE_CHAIN.
9038 * sig.c (build_signature_pointer_or_reference_type): Set context
9039 to global_namespace.
9040 (build_signature_table_constructor): Expect OVERLOAD nodes.
9041 * spew.c (yylex): Save old setting of looking_for_typename.
9042 * tree.c (decl_list_length): Remove.
9043 (binding_init): New function.
9044 (count_functions): Rewrite.
9045 (is_overloaded_fn): Expect OVERLOAD nodes.
9046 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9047 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9048 ovl_member): New functions.
9049 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9050 (type_unknown_p): Likewise.
9051 (require_instantiated_type): Likewise.
9052 (build_component_ref): Declare code dead.
9053 (build_x_function_call): Create and expect OVERLOAD nodes.
9054 (build_function_call_real): Check for ::main only.
9055 (build_unary_op): Likewise. Expect OVERLOAD nodes.
9056 (convert_for_assignment): Check for TREE_LIST before accessing
9057 TREE_VALUE.
9058 * decl.c (duplicate_decls): Check for namespace bindings instead
9059 of global bindings.
9060 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9061 lookup_name_current_level, start_decl, xref_tag,
9062 finish_enum): Likewise.
9063 * init.c (build_offset_ref): Likewise.
9064 * search.c (lookup_field): Likewise.
9065 (lookup_fnfields): Likewise.
9066 (dfs_debug_mark): Likewise.
9067 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9068 (poplevel_class, pop_from_top_level): Likewise.
9069 * decl2.c (finish_method): Likewise.
9070 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9071 * decl.c (record_builtin_type): Likewise.
9072 (init_decl_processing, grokfndecl): Likewise.
9073 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9074 (make_lang_type): Likewise.
9075 * parse.y (make_thunk): Likewise.
9076 * pt.c (tsubst): Likewise.
9077 * tree.c (debug_binfo): Likewise.
9078 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9079 tinfo2.cc, inc/new.h: Add std qualifications.
9080 * inc/new: Wrap with namespace std if __HONOR_STD.
9081 * inc/typeinfo: Likewise.
9082
9083 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9084
9085 * call.c (build_user_type_conversion_1): Handle second_conv
9086 properly for templates.
9087
9088 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
9089
9090 * method.c (build_decl_overload_real): Set TREE_USED flag to
9091 zero for build_type_variants nodes as well.
9092
9093 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
9094
9095 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9096
9097 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
9098
9099 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9100 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9101 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9102 xref.o): Add toplev.h dependencies.
9103
9104 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
9105
9106 * errfn.c (cp_error, cp_warning): Remove declarations for
9107 error and warning respectively.
9108
9109 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9110
9111 * error.c: Convert to using ctype macros defined in system.h.
9112 * method.c: Likewise.
9113 * xref.c: Likewise.
9114 * lex.c: Likewise. Also remove redundant system header stuff.
9115
9116 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
9117
9118 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9119 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9120 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9121 xref.c: Add include of toplev.h.
9122
9123 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9124
9125 * tree.c (perm_manip): Also regenerate the RTL of an extern.
9126 (copy_to_permanent): Use end_temporary_allocation.
9127
9128 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
9129
9130 * init.c (expand_vec_init): The initialization of each array
9131 element is a full-expression.
9132
9133 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
9134
9135 * method.c (build_mangled_name): Add a call to build_type_variant
9136 to get the right type.
9137
9138 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
9139
9140 * Makefile.in: Add .SUFFIXES.
9141
9142 * cp-tree.def: Remove NAMESPACE_DECL.
9143
9144 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
9145
9146 * call.c (build_over_call): Do evaluate arg even if it has empty
9147 class type.
9148 * decl.c (start_function): Don't push a member function.
9149
9150 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
9151
9152 * Makefile.in (g++FAQ.info): Put -o option before input file.
9153
9154 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
9155
9156 * gxxint.texi: Add info for squangling codes K and B.
9157
9158 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
9159
9160 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9161 the expression in templates.
9162 (finish_stmt_expr): Likewise.
9163
9164 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
9165
9166 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9167
9168 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
9169
9170 * decl.c (maybe_push_to_top_level): Always clear
9171 current_template_parms and processing_template_decl.
9172 (pushtag): Remove check of current_class_type and some comments,
9173 since maybe_push_to_top_level no longer creates confusion.
9174
9175 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
9176
9177 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9178 (DECL_CLASS_TEMPLATE_P): Likewise.
9179 (DECL_PRIMARY_TEMPLATE): Likewise.
9180 (PRIMARY_TEMPLATE_P): Use it.
9181 (push_template_decl_real): New function.
9182 (redeclare_class_template): Take new template parameters as
9183 input.
9184 (is_specialization_of): New function.
9185 (comp_template_args): Declare.
9186 * decl.c (pushtag): Handle friend template classes.
9187 (xref_tag): Likewise. Use new calling convention for
9188 redeclare_class_template.
9189 * decl2.c (grok_x_components): Handle friend templates.
9190 * friend.c (is_friend): Use is_specialization_of where
9191 appropriate. Deal with friend class templates.
9192 (make_friend_class): Let a class template be friends with itself.
9193 * pt.c (comp_template_args): Remove declaration.
9194 (tsubst_friend_class): New function.
9195 (push_template_decl_real): New function.
9196 (push_template_decl): Use it.
9197 (redeclare_class_template): Adjust for new calling convention.
9198 (comp_template_args): Give it external linkage.
9199 (instantiate_class_type): Use tsubst_friend_class to deal
9200 with friend templates.
9201 * typeck.c (comptypes): Use comp_template_args, rather than
9202 expanding it inline.
9203 * parse.y (component_decl): Handle a nested template type
9204 like other component type declarations.
9205
9206 * pt.c (check_explicit_specialization): Handle overloaded
9207 constructors correctly.
9208
9209 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
9210 (lookup_template_class): Use it.
9211
9212 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
9213
9214 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
9215 * cp-tree.h: Add WRAPPER support.
9216 * call.c (add_candidate): Split out from add_*_candidate fns.
9217 (build_over_call): Take the candidate instead of function and args.
9218 Enforce access control here. Emit overload warnings here.
9219 (add_warning): New fn.
9220 (joust): Add WARN parm. If not set, call add_warning instead of
9221 printing a warning. Re-enable some warnings.
9222 (tourney): Pass it.
9223 (convert_like): Adjust.
9224 (build_new_op): Adjust.
9225 (build_new_function_call): Adjust.
9226 (build_user_type_conversion_1): Adjust.
9227 (USER_CONV_FN): Adjust.
9228 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
9229 build_int_wrapper): New fns.
9230
9231 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
9232
9233 * pt.c (unify): Fix typo in previous change.
9234
9235 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9236
9237 * error.c (dump_type_real): Declare canonical_name.
9238
9239 * typeck.c (comp_target_types): Fix PMFs.
9240
9241 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
9242
9243 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
9244 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
9245 TEMPLATE_DECL.
9246
9247 * pt.c (tsubst): Decrease the template-level of
9248 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
9249 TEMPLATE_PARM_INDEX.
9250 (template_decl_level): New function.
9251 (unify): Make sure to record unifications for template
9252 parameters, even when the parameters exactly match the arguments.
9253 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
9254 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
9255 aren't from the level we're currently working on.
9256
9257 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
9258
9259 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
9260
9261 * decl2.c (check_member_template): Set DECL_IGNORED for member
9262 class templates, too.
9263
9264 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
9265
9266 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9267
9268 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
9269
9270 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
9271
9272 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
9273 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
9274 (init_decl_processing): Handle TI types.
9275 * typeck.c (unsigned_type, signed_type): Handle TI types.
9276
9277 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
9278
9279 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
9280 New local added_libraries. Increment count when add library to
9281 arglist.
9282
9283 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
9284
9285 * cp-tree.h (type_as_string_real): New function.
9286 * pt.c (mangle_class_name_for_template): Use it.
9287 * error.c (dump_aggr_type): Change prototype.
9288 (dump_type_prefix): Likewise.
9289 (dump_type_suffix): Likewise.
9290 (dump_type_real): Convert from dump_type. If desired, the
9291 "canonica" name of a typedef, i.e., the name of the underlying
9292 type, can be printed.
9293 (dump_type): Call dump_type_real.
9294
9295 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
9296
9297 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
9298
9299 * typeck.c (comp_target_types): Tweak pedantic case.
9300 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
9301 Return -1 or 1 instead of 1 or 2.
9302 (compparms): Remove STRICT handling.
9303 (convert_for_assignment): Fix handling of pmfs.
9304
9305 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
9306
9307 * typeck.c (comp_target_types): Handle references like pointers.
9308 (comp_target_parms): Note that return code from comp_target_types
9309 can be negative to indicate failure.
9310
9311 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9312
9313 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
9314 which requires a working target compiler to build.
9315
9316 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
9317
9318 * tree.c (avoid_overlap): Add prototype.
9319
9320 * spew.c (num_tokens): Add prototype.
9321 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
9322
9323 * search.c (dfs_check_overlap): Add prototype.
9324 (dfs_no_overlap_yet): Likewise.
9325
9326 * pt.c (original_template): Add prototype.
9327 (inline_needs_template_parms): Likewise.
9328 (push_inline_template_parms_recursive): Likewise.
9329 (retrieve_specialization, register_specialization): Likewise.
9330 (print_candidates, reduce_template_parm_level): Likewise.
9331 (build_template_decl, mark_template_parm): Likewise.
9332 (tsubst_friend_function, get_bindings_real): Likewise.
9333
9334 * method.c (start_squangling): Add prototype.
9335 (end_squangling, check_ktype, issue_ktype): Likewise.
9336 (build_overloaded_scope_ref, check_btype): Likewise.
9337 (build_mangled_template_parm_index): Likewise.
9338
9339 * lex.c (init_cpp_parse): Add prototype.
9340 (handle_cp_pragma, handle_sysv_pragma): Likewise.
9341 (reduce_cmp, token_cmp): Likewise.
9342
9343 * except.c (call_eh_info): Add prototype.
9344 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
9345 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
9346
9347 * decl2.c (is_namespace_ancestor): Add prototype.
9348 (namespace_ancestor, add_using_namespace): Likewise.
9349 (ambiguous_decl): Likewise.
9350
9351 * decl.c (indent): Add prototype.
9352
9353 * call.c (add_template_candidate_real): Add prototype.
9354
9355 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
9356
9357 * decl2.c (build_expr_from_tree): Just return a PMF.
9358
9359 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
9360
9361 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
9362 when doing initializations.
9363
9364 * pt.c (unify): Use comptypes to compare type args.
9365
9366 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
9367
9368 * decl.c (duplicate_decls): Fix check for when it's safe to free
9369 the new decl.
9370
9371 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
9372 to type_as_string.
9373
9374 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
9375
9376 * pt.c (build_template_parm_index): Add prototype.
9377
9378 * search.c (my_tree_cons): Don't clear words outside the
9379 newly allocated node.
9380
9381 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
9382
9383 * lex.c (init_parse): Now returns char* containing the filename.
9384
9385 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
9386 Jeff Law <law@cygnus.com>
9387
9388 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9389 than a pointer.
9390
9391 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9392
9393 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9394
9395 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9396
9397 * decl.c (duplicate_decls): Don't warn for redundant decls if
9398 friend: let add_friend take care of it.
9399
9400 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9401
9402 * sig.c (build_signature_pointer_constructor): Don't set
9403 TREE_HAS_CONSTRUCTOR for a signature pointer.
9404 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9405 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9406 here, too.
9407 * typeck.c (build_unary_op): Only allow taking the address of a
9408 real constructor.
9409 * typeck2.c (digest_init): Simplify.
9410 (store_init_value): Don't pedwarn about using { } for pmfs.
9411
9412 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
9413
9414 * cp-tree.h (start_decl): Update prototype.
9415 * decl.c (start_decl): Like the C version, new parameters
9416 for the attributes. Call cplus_decl_attributes here,
9417 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
9418 (grokdeclarator): Pass NULL for new start_decl arguments.
9419 * pt.c (tsubst_expr): Likewise.
9420 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
9421 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9422 * lex.c (build_lang_decl): Add lang_name_java.
9423 * class.c (push_lang_context): Add lang_name_java.
9424 * method.c (build_mangled_name): Check for is_java_type.
9425
9426 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9427
9428 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9429 * call.c (build_scoped_method_call): Check for TREE_CODE for
9430 VOID_TYPE instead of type == void_type_node.
9431 (build_method_call): Likewise.
9432 * decl.c (lookup_name_real): Likewise.
9433 (grokdeclarator): Likewise.
9434 (start_decl): Likewise.
9435 (grokparms): Likewise.
9436 (start_function): Likewise.
9437 (finish_function): Likewise.
9438 (start_method): Likewise.
9439
9440 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
9441
9442 * lex.c (finput): New variable.
9443 (init_cpp_parse): Renamed from init_parse.
9444 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
9445 (finish_parse): New function.
9446 * cp-tree.h (init_lex, init_parse): Remove declarations.
9447
9448 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9449
9450 * call.c (build_call): Still evaluate the actual argument.
9451 * class.c (is_empty_class): Update for -fnew-abi.
9452
9453 * decl2.c: -fnew-abi implies -fsquangle.
9454
9455 * method.c (do_build_assign_ref): Don't do anything to copy
9456 an empty class.
9457 (do_build_copy_constructor): Likewise.
9458 * call.c (build_over_call): Likewise.
9459
9460 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9461
9462 * tree.c (avoid_overlap): Return a value.
9463
9464 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
9465
9466 * method.c (check_btype): Add missing argument to xrealloc.
9467 (check_ktype): Likewise.
9468
9469 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9470
9471 Implement empty base optimization.
9472 * class.c (finish_struct_1): Add vbase fields earlier. Set
9473 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
9474 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9475 (types_overlap_p): New fn.
9476 * tree.c (avoid_overlap): New fn.
9477 (build_base_fields): Use it to avoid overlapping empty bases.
9478 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9479
9480 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9481
9482 Re-implement allocation of base class subobjects.
9483 * tree.c (unshare_base_binfos): New fn.
9484 (layout_basetypes): Use it. Now handles offsets of both virtual and
9485 non-virtual bases, after layout_type.
9486 (layout_vbasetypes): Remove.
9487 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9488 (build_vbase_pointer_fields): Split out from old layout_basetypes.
9489 * class.c (finish_base_struct): Lose offset handling code.
9490 Move nonvdtor warning here. Don't mess with t_binfo anymore.
9491 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
9492 * cp-tree.h: Adjust.
9493
9494 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9495
9496 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9497 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9498 * class.c (duplicate_tag_error): Likewise.
9499 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9500 * tree.c (layout_vbasetypes): Update from layout_record, remove
9501 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9502 (layout_basetypes): Likewise.
9503
9504 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
9505
9506 * class.c, Make sure system.h is included just after config.h.
9507 Delete lingering stdio and errno references too.
9508 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9509
9510 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
9511
9512 * friend.c (is_friend): Fix access control for local classes.
9513
9514 * class.c (is_empty_class): New fn.
9515 * call.c (build_call): Don't pass empty class objects to a function.
9516
9517 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
9518
9519 * call.c (build_over_call): Do name resolution for default
9520 arguments of function templates in the scope of the templates.
9521
9522 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
9523
9524 * call.c: Include system.h. Remove includes, declarations and
9525 defines provided by system.h.
9526 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9527 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9528 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9529 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9530 * typeck2.c, xref.c: Likewise.
9531 * Makefile.in: Dependencies updated as appropriate.
9532 * Make-lang.in: Likewise.
9533
9534 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
9535
9536 * pt.c (fn_type_unification): Allow incomplete unification without
9537 an immediate error message.
9538
9539 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9540
9541 * tree.c (member_p): New fn.
9542 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9543 initializing class members.
9544
9545 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9546 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9547
9548 * call.c (build_method_call): Handle non-scoped destructors, too.
9549 * pt.c (tsubst_copy): Likewise.
9550
9551 * pt.c (print_template_context): Split out...
9552 (push_tinst_level): ...from here.
9553
9554 * friend.c (is_friend): Don't pass a type to decl_function_context.
9555
9556 * typeck.c (convert_for_initialization): Always hand off
9557 conversions to class type.
9558
9559 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9560
9561 * friend.c (is_friend): Local classes have the same access as the
9562 enclosing function.
9563
9564 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
9565
9566 * typeck.c (expand_target_expr): Delete dead function.
9567
9568 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9569
9570 * repo.c (save_string): Delete dead function.
9571
9572 * method.c (thunk_printable_name): Delete dead function.
9573
9574 * lex.c (yynextch): Delete dead function.
9575
9576 * expr.c (tree_extract_aggr_init): #if 0 out.
9577
9578 * except.c (do_unwind): Delete dead function.
9579 (easy_expand_asm): Likewise.
9580
9581 * cvt.c (build_conversion_type_1): Delete dead function.
9582
9583 * cp-tree.h (push_expression_obstack): Declare.
9584
9585 * call.c (source_type): #if 0 out.
9586
9587 * class.c (alter_access): Remove unused label. Add braces
9588 around empty else clause.
9589
9590 * lex.c (yyprint): Fix argument to printf.
9591
9592 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
9593
9594 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9595
9596 * pt.c (instantiate_class_template): Make sure template
9597 arguments are permanent.
9598 * init.c (resolve_offset_ref): Don't go looking around in
9599 template types.
9600
9601 * semantics.c: Add routines to handle expressions, and some
9602 declaration processing.
9603 * parse.y: Use them.
9604 (current_class_depth): Move declaration to cp-tree.h.
9605 * parse.c: Regenerated.
9606 * cp-tree.h: Use them.
9607 (current_class_depth): Declare.
9608 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9609
9610 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
9611
9612 * error.c (dump_decl): Be a bit more explicit with template
9613 type arguments, when verbose.
9614
9615 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
9616
9617 * inc/exception: Reorder closing braces.
9618
9619 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
9620
9621 * pt.c (redeclare_class_template): New function.
9622 * cp_tree.h (redeclare_class_template): Declare it.
9623 * decl.c (xref_tag): Use it.
9624
9625 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
9626
9627 * call.c (build_over_call): Check IS_AGGR_TYPE, not
9628 TYPE_LANG_SPECIFIC.
9629 * typeck.c (convert_arguments): Likewise.
9630
9631 * decl.c (grokdeclarator): Remove const and volatile from type after
9632 setting constp and volatilep.
9633
9634 * class.c (finish_struct_1): Don't warn about bool bitfield larger
9635 than one bit.
9636
9637 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
9638
9639 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9640
9641 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
9642
9643 * call.c (build_object_call): Complain about ambiguous operator(),
9644 rather that crashing.
9645 (build_new_op): Likewise.
9646 (build_op_delete_call): Likewise.
9647
9648 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
9649
9650 * cvt.c (perform_qualification_conversions): Use comp_target_types
9651 instead of comp_ptr_ttypes.
9652
9653 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
9654
9655 * cp-tree.h (enforce_access): Declare.
9656 * call.c (enforce_access): Make it extern, not static.
9657 * class.c (alter_access): Use enforce_access; modify code for ISO
9658 compliance, rather than ARM rules.
9659
9660 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9661
9662 * cp-tree.h: Fix typo.
9663
9664 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
9665
9666 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9667 if (aggregate_value_p (type)).
9668
9669 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9670
9671 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
9672
9673 * tree.c (mapcar): When dealing with a DECL, use it's constant
9674 value, if any.
9675 * pt.c (lookup_template_class): Don't mangle the names of template
9676 classes whose arguments are unknown.
9677
9678 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9679
9680 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9681
9682 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9683
9684 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
9685
9686 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9687 boolean_type_node to 1.
9688
9689 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
9690
9691 * error.c (dump_expr): Remove unused variable `l'.
9692
9693 * pt.c (for_each_template_parm): New function, created by
9694 converting uses_template_parms.
9695 (tree_fn_t): New typedef.
9696 (uses_template_parms): Use it.
9697 (mark_template_parm): New function.
9698 (push_template_decl): Check that the argument list of a partial
9699 specialization uses all the template parameters.
9700
9701 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9702 with it; we might want it for debugging.
9703 * cp-tree.h (type_unification): Change interface.
9704 * class.c (finish_struct_1): Skip nested template types, just like
9705 ordinary nested types.
9706 (instantiate_type): Use new interface to type_unification.
9707 * lex.c (init_lex): Add __sz as opname for sizeof.
9708 * method.c (build_overload_scope_ref): New function.
9709 (build_overload_int): Handle complex expressions. Set
9710 numeric_output_need_bar if necessary.
9711 (build_overload_value): Handle non-PARM_DECL nodes; this
9712 routine is now used by build_overload_int. Remove some
9713 assignments to numeric_output_need_bar. Use
9714 build_overload_scope_ref.
9715 (build_qualified_name): Note that some template mangled names end
9716 with digits, and set numeric_output_need_bar appropriately. Use
9717 build_underscore_int.
9718 * pt.c (unify): Change interface.
9719 (type_unification_real): Likewise.
9720 (determine_specialization): Use new interfaces.
9721 (tsubst): Deal gracefully with situations in which the argument
9722 vector is not fully filled.
9723 (fn_type_unification): Use new interfaces.
9724 (type_unification): Likewise. Remove NOP_EXPR hack.
9725 (type_unification_real): Likewise.
9726 (unify): Likewise. Deal with unification of complex expressions.
9727
9728 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9729
9730 * pt.c (complete_template_args): Initialize skip properly.
9731
9732 * decl.c (make_typename_type): Revert.
9733 (make_implicit_typename): Remove.
9734 (lookup_name_real): Don't call it. Call lookup_field if we see a
9735 TYPE_DECL from a template base.
9736 * search.c (lookup_field): Do implicit typename stuff.
9737
9738 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
9739 Geoff Noer <noer@cygnus.com>
9740
9741 * Makefile.in: Various fixes for building cygwin32 native toolchains.
9742 * Make-lang.in: Likewise.
9743
9744 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9745
9746 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9747
9748 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
9749
9750 * decl.c (make_implicit_typename): Rewrite removed code.
9751 (make_typename_type): Call it if the type we look up comes from
9752 a base that uses template parms.
9753
9754 * pt.c (complete_template_args): Rewrite.
9755 (tsubst, FUNCTION_DECL): Use it.
9756
9757 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
9758
9759 * semantics.c (finish_asm_stmt): Fix combine strings. Call
9760 c_expand_asm_operands () if output_operands, input_operands or
9761 clobbers is not NULL_TREE.
9762
9763 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9764
9765 * pt.c (complete_template_args): New function.
9766 (get_bindings): Deal with specializations of function templates
9767 with return type containing parameters from outer class
9768 templates.
9769 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
9770 substitute arguments and compose a new type.
9771
9772 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
9773
9774 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
9775 FUNCTION_DECLs.
9776
9777 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9778
9779 * decl.c (make_implicit_typename): Lose useless code.
9780
9781 * call.c (standard_conversion): Handle A* -> const A* properly.
9782
9783 * pt.c (get_bindings_real): Rename from get_bindings. Add
9784 check_rettype parm.
9785 (get_bindings): Pass 1.
9786 (get_bindings_overload): Pass 0.
9787
9788 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
9789
9790 * pt.c (check_explicit_specialization): When reverting a static
9791 member function, also remove the `this' parameter from
9792 last_function_parms.
9793
9794 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9795
9796 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
9797 a function context.
9798
9799 * decl.c (store_bindings): Use free_binding_vecs.
9800 (pop_from_top_level): Likewise.
9801
9802 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
9803
9804 * decl.c (make_implicit_typename): Only change the type of a
9805 TYPENAME_TYPE.
9806
9807 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
9808
9809 * semantics.c: New file, containing routines to perform the
9810 semantic phase of parsing.
9811 * parse.y: Use it.
9812 * pt.c (tsubst_expr): Likewise.
9813 * cp-tree.h: Declare the various functions in semantics.c.
9814 Provide macros to access _STMT tree nodes.
9815 * cp-tree.def: Add ASM_STMT tree node.
9816 * Makefile.in, Make-lang.in: Add dependencies on and for
9817 semantics.c.
9818
9819 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
9820
9821 * pt.c (push_template_decl): Only check primary templates.
9822
9823 * pt.c (check_explicit_specialization): Complain about default args
9824 in explicit specialization.
9825
9826 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
9827 constructor_declarator.
9828
9829 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
9830
9831 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
9832 has no overloaded operator ->.
9833
9834 * call.c (build_field_call): Don't crash when presented with a
9835 field that is actually a nested type.
9836
9837 * decl.c (pushtag): Deal with friend class injection in local
9838 classes.
9839
9840 * call.c (build_object_call): Don't crash if OBJ is a
9841 pointer-to-member-function.
9842
9843 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9844
9845 * pt.c (push_template_decl): Complain about template with C linkage,
9846 anonymous template class.
9847
9848 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9849
9850 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
9851 * search.c: Likewise.
9852
9853 * lex.c (do_pending_defargs): Only call
9854 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
9855
9856 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
9857
9858 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
9859
9860 * parse.y: Deal with CONSTRUCTORS in new_initializers.
9861
9862 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
9863
9864 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
9865 closely mimics the behavior in parse.y.
9866 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
9867 into a compound statement.
9868
9869 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
9870
9871 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
9872 * pt.c (inline_needs_template_parms): New fn.
9873 (original_template): New fn.
9874 (push_inline_template_parms_recursive): New fn.
9875 (maybe_begin_member_template_processing): Use them.
9876 (maybe_end_member_template_processing): Likewise.
9877 (is_member_or_friend_template): Rename to is_member_template.
9878 Member functions of local classes are never member templates.
9879
9880 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9881
9882 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
9883 added in the class scope to catch redefinition error.
9884
9885 * pt.c (reduce_template_parm_level): Also copy
9886 the DECL_TEMPLATE_PARMS field.
9887
9888 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
9889
9890 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
9891 reduced-level template type parameter.
9892
9893 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
9894
9895 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
9896 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
9897 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
9898 * decl.c (duplicate_decls): Propagate it.
9899 * typeck2.c (abstract_virtuals_error): Use two loops to emit
9900 abstract virtual functions and virtual functions which need a
9901 final overrider separately.
9902
9903 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
9904
9905 * lang-specs.h: Properly put brackets around array elements in
9906 initializer.
9907
9908 * typeck.c (build_binary_op_nodefault): Correctly place parens around
9909 && and || in expression.
9910
9911 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
9912
9913 * call.c (default_parm_conversions): Remove prototype definition.
9914 (build_method_call): Remove unused variable result.
9915
9916 * cvt.c (ocp_convert): Remove unused variable conversion.
9917
9918 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
9919
9920 * except.c (do_unwind): #if 0 definition of unused variables fcall
9921 and next_pc.
9922
9923 * expr.c (extract_scalar_init): #if 0 prototype and function
9924 definition.
9925
9926 * init.c (expand_aggr_init_1): Remove unused variable init_type.
9927 (build_new_1): Remove unused variable t.
9928
9929 * pt.c (instantiate_class_template): Remove unused variable newtag;
9930 cast called function return value to void.
9931 (do_decl_instantiation): Remove unused variables name and fn.
9932
9933 * tree.c (get_type_decl): Add default return to shut up compiler from
9934 complaining control reaches end of non-void function.
9935
9936 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
9937
9938 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
9939
9940 * call.c (default_parm_conversions): Remove prototype definition.
9941 (build_method_call): Remove unused variable result.
9942 (build_over_call): Add default case in enumeration switch.
9943
9944 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
9945
9946 * decl2.c (lang_decode_option): Change j's type to size_t.
9947
9948 * tree.c (layout_vbasetypes): record_align and desired_align are of
9949 type unsigned int; const_size and nonvirtual_const_size likewise.
9950
9951 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
9952
9953 * parse.y (new_initializer): Make sure all initializers are
9954 lists.
9955
9956 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
9957
9958 * decl2.c (import_export_decl): Mark tinfo functions for
9959 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
9960
9961 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
9962
9963 * method.c: Fix typo.
9964
9965 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9966
9967 * method.c: Include "system.h" to get stdlib.h, stdio.h,
9968 ctype.h, string.h, etc.
9969 (issue_nrepeats): Add default case in enumeration switch.
9970 (check_btype): Likewise.
9971 (process_overload_item): Likewise.
9972
9973 * Makefile.in (method.o): Depend on system.h.
9974
9975 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9976
9977 * lex.c (do_scoped_id): Fix parenthesizing.
9978
9979 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
9980
9981 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
9982 FLAG_RTTI is unset, initialize type info machinery and continue
9983 with FLAG_RTTI enabled.
9984 (get_typeid): Likewise.
9985
9986 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
9987
9988 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
9989 from B.
9990
9991 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
9992
9993 * pt.c (finish_member_template_decl): Deal more gracefully with
9994 invalid declarations.
9995
9996 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
9997
9998 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
9999 cp-tree.h: Clean up more old overloading code, old RTTI code, and
10000 some formatting quirks.
10001
10002 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10003 method.c, pt.c, ptree.c, typeck.c: Remove support for
10004 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10005 * class.h: Remove.
10006 * Makefile.in: Adjust.
10007
10008 * pt.c (unify): Don't allow reduced cv-quals when strict.
10009
10010 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10011 *type_unification* and unify.
10012
10013 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10014
10015 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10016 (nested_name_specifier): And add it before this use.
10017 (typename_sub0): And this use. Also add use without the keyword.
10018 (typename_sub1): Likewise.
10019 * pt.c (instantiate_class_template): Don't actually instantiate
10020 anything if our type uses template parms.
10021
10022 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
10023
10024 * decl.c (start_function): Don't call temporary_allocation for a
10025 nested function.
10026
10027 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10028
10029 * pt.c (instantiate_class_template): Don't mess with friends if
10030 our type uses template parms.
10031
10032 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10033
10034 * parse.y (nested_name_specifier): Use explicit_template_type.
10035 (typename_sub): Allow a template_type, an explicit_template_type,
10036 or an implicit template type at the end.
10037 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10038 * decl.c (make_typename_type): Handle template-id where the name
10039 is a TEMPLATE_DECL.
10040 * call.c (build_scoped_method_call): Handle member template
10041 destructor call.
10042 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10043 destructor is represented by the type.
10044
10045 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10046 * parse.y (nested_name_specifier): Add 'template' case.
10047 (explicit_template_type): New rule.
10048 (typename_sub): Use it.
10049 * decl.c (make_typename_type): Handle getting a template-id for NAME.
10050 * pt.c (tsubst): Likewise.
10051
10052 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10053
10054 * pt.c (add_to_template_args): Fix thinko.
10055 (instantiate_class_template): Call it later.
10056
10057 * pt.c (get_class_bindings): Add outer_args parm.
10058 (most_specialized_class): Likewise.
10059 (instantiate_class_template): Pass it.
10060 (more_specialized_class): Likewise.
10061 (lookup_template_class): Get context from template if none
10062 was specified.
10063 (finish_member_template_decl): Don't do anything with a
10064 partial specialization.
10065 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10066 AGGREGATE_TYPE_P.
10067 * class.c (finish_struct): Member class templates have already been
10068 checked for name clashes.
10069 * decl.c (pushdecl_with_scope): Handle pushing at class level.
10070
10071 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10072
10073 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10074 (tsubst, *_PARM): Support multiple levels of template classes.
10075 (instantiate_class_template): Look up the pattern from the
10076 original template.
10077 (lookup_template_class): Handle getting a template for d1.
10078 (push_template_decl): Correct setting of 'primary'.
10079 (reduce_template_parm_level): Add 'levels' parm.
10080 (finish_member_template_decl): Support member class templates.
10081 (template_class_depth): Handle multiple levels.
10082 * parse.y (component_decl_1, fn.def2): Remove member template case.
10083 (component_decl): Add member template cases.
10084 * decl2.c (check_member_template): We now handle member template
10085 classes.
10086 * decl.c (pushtag): Handle member templates.
10087 * method.c (do_inline_function_hair): Don't touch
10088 IDENTIFIER_GLOBAL_VALUE.
10089 * init.c (build_offset_ref): If name isn't an identifier, just
10090 return it.
10091 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10092
10093 * typeck.c (get_delta_difference): Do adjust for conversions to
10094 and from virtual base.
10095
10096 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
10097
10098 * typeck.c (get_delta_difference): Give hard error for conversion
10099 from virtual base.
10100
10101 * cp-tree.h: Tweak formatting.
10102
10103 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
10104
10105 * decl.c (push_namespace): Handle redeclaration error.
10106
10107 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10108 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10109 (NAMESPACE_BINDING): New macro.
10110 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10111 * *.c: Use them.
10112
10113 * pt.c (push_template_decl): Use innermost_args.
10114
10115 * decl.c (get_unique_name): Tweak from earlier in the name.
10116
10117 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10118
10119 * cp-tree.def: Add CPLUS_BINDING node.
10120 * cp-tree.h (tree_binding): New struct.
10121 (BINDING_SCOPE, BINDING_VALUE): New macros.
10122 (current_namespace, global_namespace): Declare extern.
10123 (struct lang_decl_flags): New field in_namespace.
10124 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10125 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10126 (TREE_INDIRECT_USING): New macro.
10127 * decl2.c (current_namespace, global_namespace): Declare. The
10128 value is a NAMESPACE_DECL now, not a TREE_LIST.
10129 (is_namespace_ancestor, namespace_ancestor): New static functions.
10130 (add_using_namespace, ambiguous_decl): Likewise.
10131 (lookup_using_namespace): New support function for lookup_name.
10132 (qualified_lookup_using_namespace): New support function for
10133 do_scoped_id and lookup_namespace_name.
10134 (get_namespace_id): Mark as obsolete.
10135 (current_namespace_id): Likewise.
10136 (do_namespace_alias): Implement.
10137 (do_using_directive): Implement as call to add_using_namespace.
10138 * decl.c (binding_for_name): New function.
10139 (push_namespace, pop_namespace): Implement.
10140 (push_decl): Don't install a FUNCTION_DECL in the global branch.
10141 (lookup_namespace_name): Implement using qualified lookup.
10142 (lookup_name_real): For global scoping, lookup in
10143 global_namespace. For namespace scoping, lookup in given
10144 namespace. For unscoped lookup, iterate over namespace,
10145 considering using directives.
10146 (init_decl_processing): Initialize global_namespace.
10147 (grokvardecl): Build assembler name as static name for globals.
10148 (grokdeclarator): Remove old namespace mangling.
10149 (xref_tag): When installing a global binding for the
10150 tag, make sure we have an identifier.
10151 * method.c (build_overload_nested_name): Mangle namespaces.
10152 (build_qualified_name): Likewise.
10153 (build_decl_overload_real): Likewise.
10154 * lex.c (build_lang_decl): Set namespace for new declaration to
10155 current_namespace.
10156 (do_scoped_id): Find global names in global or current
10157 namespace, or using qualified namespace lookup, depending on
10158 context.
10159 * init.c (build_member_call): When scope is namespace, use
10160 build_x_function_call instead.
10161 (build_offset_ref): When scope is namespace, collapse processing
10162 to lookup_namespace_name instead.
10163 * error.c (dump_decl): Support NAMESPACE_DECL.
10164 * decl.c (pushdecl): Bind globals to current namespace.
10165 (push_overloaded_decl): Likewise.
10166 (lookup_tag): Likewise.
10167 (lookup_name_current_level): Likewise.
10168 (xref_tag): Likewise.
10169 (start_function): Likewise.
10170 * lex.c (do_identifier): Likewise.
10171 (identifier_typedecl_value): Likewise.
10172 (real_yylex): Likewise.
10173 * method.c (do_inline_function_hair): Likewise.
10174 * parse.y (unscoped): Likewise.
10175 * pt.c (check_explicit_specialization): Likewise.
10176 (lookup_template_class): Likewise.
10177 * rtti.c (call_void_fn): Likewise.
10178 * sig.c (build_sigtable): Likewise.
10179 * ptree.c (lang_print_xnode): New function.
10180
10181 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
10182
10183 * pt.c (instantiate_class_template): Don't instantiate if pedantic
10184 and the args use template parms.
10185
10186 * pt.c (push_tinst_level): If the instantiation uses template parms,
10187 fail silently.
10188 * decl.c (xref_basetypes): Do call complete_type for basetypes
10189 that involve template parameters.
10190
10191 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10192
10193 * typeck2.c (process_init_constructor): Fix labeled init check.
10194
10195 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10196
10197 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10198 argument to tsubst and friends.
10199
10200 * pt.c (tsubst, FUNCTION_DECL): Tidy.
10201
10202 * typeck.c (build_x_function_call): Handle static member function
10203 templates like non-templates. Handle friend templates like normal
10204 function templates.
10205 * pt.c (tsubst, *_PARM): Don't use orig_level.
10206 (get_bindings): Don't call add_to_template_args.
10207 (instantiate_template): Likewise.
10208 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
10209 * ptree.c (print_lang_type): Print index/level for template parms.
10210
10211 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
10212
10213 * Make-lang.in (cc1plus): Note that cc1plus depends on
10214 cp/cp-tree.h and cp/cp-tree.def.
10215
10216 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
10217 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
10218 position in a template parameter list.
10219 * cp-tree.h (template_parm_index): New structure, used as the tree
10220 structure for a TEMPLATE_PARM_INDEX.
10221 (TEMPLATE_PARM_IDX): New macro.
10222 (TEMPLATE_PARM_LEVEL): Likewise.
10223 (TEMPLATE_PARM_DESCENDANTS): Likewise.
10224 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
10225 (TEMPLATE_PARM_DECL): Likewise.
10226 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10227 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
10228 (TEMPLATE_TYPE_DECL): Likewise.
10229 (TEMPLATE_CONST_IDX): Remove.
10230 (TEMPLATE_CONST_LEVEL): Likewise.
10231 (TEMPLATE_CONST_SET_INFO): Likewise.
10232 (TEMPLATE_TYPE_SET_INFO): Likewise.
10233 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
10234 node.
10235 (TEMPLATE_TYPE_LEVEL): Likewise.
10236 * decl.c (decls_match): Call comp_template_parms, rather than
10237 expanding it inline.
10238 (duplicate_decls): If two template declarations are being merged,
10239 then their TEMPLATE_INFOs should be merged as well.
10240 (grokfndecl): Save template-id information when declaring a friend
10241 with explicit template arguments. Pass arguments to
10242 check_explicit_specialization via correct convention; at some
10243 point check_explicit_specialization changed, but these call-sites
10244 did not.
10245 (grokdeclarator): Tidy up slightly.
10246 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
10247 two template functions with the same DECL_ASSEMBLER_NAME the same,
10248 since the names are not yet mangled.
10249 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
10250 TEMPLATE_CONST_PARM.
10251 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
10252 decl for a non-type parameter, rather than printing `<tparm ...>'.
10253 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
10254 (do_friend): Deal with template friends.
10255 * lex.c (do_pending_inlines): Call
10256 maybe_begin_member_template_processing, rather than
10257 conditionally calling begin_member_template_processing.
10258 (process_next_inline): Likewise. Call
10259 maybe_end_member_template_processing, rather than
10260 conditionally calling end_member_template_processing.
10261 (do_pending_defargs): Likewise.
10262 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
10263 TEMPLATE_CONST_PARM.
10264 * method.c (build_mangled_template_parm_index): New function.
10265 (build_overload_value): Use it.
10266 (build_overload_name): Likewise.
10267 * pt.c (finish_member_template_decl): Allow friend declarations.
10268 (template_class_depth): New function.
10269 (is_member_template): Rename, and modify, to become...
10270 (is_member_or_friend_template): New function.
10271 (end_member_template_processing): Rename, and modify, to become...
10272 (maybe_end_member_template_processing).
10273 (build_template_parm_index): New function.
10274 (reduce_template_parm_level): New function.
10275 (process_template_parm): Modify to use build_template_parm_index.
10276 (push_template_decl): Deal with friend templates.
10277 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
10278 TEMPLATE_CONST_PARM.
10279 (tsubst_friend_function): New function.
10280 (instantiate_class_template): Generate the DECL_FRIENDLIST
10281 for a new instantiation by using tsubst_friend_function rather
10282 than just tsubst.
10283 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
10284 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
10285 appropriate new macros. Use reduce_template_parm_level to
10286 generate lower-level template parameters. Handle tsubst'ing into
10287 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
10288 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
10289 templates. Similarly for the template parameters for a new
10290 template.
10291 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
10292 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
10293 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
10294 (get_bindings): Call add_to_template_args if necessary.
10295 (instantiate_decl): Handle instantiations of friend templates.
10296 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
10297 TEMPLATE_TYPE_PARM as a list of fields; it's not!
10298 * spew.c (yylex): Do a little manual constant propagation to
10299 clarify the code.
10300
10301 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
10302
10303 * error.c: Include sys/types.h.
10304
10305 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
10306
10307 * method.c (build_mangled_name): Start CPP directives in column zero.
10308
10309 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10310
10311 * typeck2.c (process_init_constructor): Sorry about non-trivial
10312 labeled initializers.
10313 * parse.y (initlist): Re-enable labeled initializers.
10314
10315 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10316
10317 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
10318 all callers changed. Rely on the new parameter instead of arg
10319 being a TREE_LIST when determine whether we are working inside
10320 template template parameter. Clean up is_type test.
10321
10322 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10323
10324 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
10325 * typeck2.c (initializer_constant_valid_p): Allow conversions
10326 between pointers and references.
10327
10328 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
10329
10330 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
10331 if pedantic || warn_pointer_arith.
10332
10333 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10334
10335 * pt.c (unify): Handle TEMPLATE_DECL.
10336
10337 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
10338
10339 * cp-tree.h (strip_attrs): Remove decl.
10340
10341 1998-02-18 Doug Evans <devans@cygnus.com>
10342
10343 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
10344 Update olddecl's attributes too.
10345 (strip_attrs): Remove function.
10346 * typeck.c (common_type): Call merge_machine_type_attributes.
10347
10348 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
10349
10350 * parse.y (initdcl0_innards): New grammar symbol.
10351 (nomods_initdecls, nomods_initdcl0): Change type from itype to
10352 none, since the resulting value is never used.
10353 (parse_decl): New function.
10354 (datadef): Remove redundant actions.
10355 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
10356 * parse.c: Regenerated.
10357
10358 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10359
10360 * parse.y (simple_stmt): Use getdecls() to check for decl.
10361
10362 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
10363
10364 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
10365 macros.
10366 (c++.install-common): Install c++filt properly as native or as cross
10367 variant.
10368 (c++.uninstall): Add c++filt.
10369
10370 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10371
10372 * call.c (standard_conversion): Fix multi-level ptr conversions.
10373
10374 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
10375
10376 * init.c (build_new): Propagate error_mark_node up.
10377
10378 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
10379
10380 * parse.y (simple_stmt): If the condition isn't a declaration,
10381 start the controlled block after the test.
10382
10383 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10384
10385 * call.c (build_over_call): Convert builtin abs, labs and fabs to
10386 tree-codes.
10387 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10388 builtins.
10389
10390 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10391
10392 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10393
10394 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10395
10396 * cp-tree.h: Add access_protected_virtual_node.
10397 * class.c (init_class_processing): Initialize it.
10398 * decl.c (xref_basetypes): Use it.
10399 * parse.y (base_class_access_list): Likewise.
10400
10401 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10402 (c++.install-common): Install c++filt.
10403
10404 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10405
10406 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10407
10408 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
10409
10410 * call.c (reference_binding): Use comptypes when comparing
10411 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10412
10413 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
10414
10415 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10416 (really_overloaded_fn): Move check here from is_overloaded_fn.
10417 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10418
10419 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
10420
10421 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10422 conversions.
10423
10424 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
10425
10426 * cp-tree.h (push_template_decl): Return the decl passed in, or an
10427 equivalent duplicate.
10428 * decl.c (pushtag): Use the return value from push_template_decl.
10429 (duplicate_decls): When duplicating a template declaration, merge
10430 the DECL_TEMPLATE_RESULTs as well.
10431 (make_implicit_typename): Don't try to dive into typename types to
10432 find a context for making a new implicit typename.
10433 (start_decl): Use the return value from push_template_decl.
10434 (grokdeclarator): Complain about declarations list `const operator
10435 int'. Since we don't correctly handle in-class initializations of
10436 non-static data members, complain about this (now illegal)
10437 practice. Issue an error for initializations of non-const statics
10438 since that is illegal as well, and since we don't handle that case
10439 correctly either.
10440 (start_function): Use the return value from push_template_decl.
10441 (start_method): Likewise.
10442 * decl2.c (grokfield): Likewise. Since the change to
10443 grokdeclarator ensures that all initialized fields are in fact
10444 static, remove a redundant test for TREE_PUBLIC.
10445 * parse.y (initlist): Disable labeled initializers since they do
10446 not work as per the documentation, and since they do not use the
10447 same syntax as the C front end.
10448 * pt.c (push_template_decl): Return the decl passed in, or an
10449 equivalent duplicate.
10450 (lookup_template_class): When searching in a nested context,
10451 use the right arguments.
10452 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10453 * typeck.c (build_component_ref): Assign the correct type to the
10454 result of build_vfn_ref.
10455
10456 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
10457
10458 * pt.c (convert_nontype_argument): Fix typo.
10459 (check_explicit_specialization): Allow old-style specialization
10460 of class template members.
10461
10462 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10463 Manfred Hollstein <manfred@s-direktnet.de>
10464
10465 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10466 when deciding to override DECL_ASSEMBLER_NAME.
10467
10468 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
10469
10470 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10471 * cp-tree.h (flag_do_squangling): Add declaration.
10472 * lang-options.h: Add -fsquangle and -fno-squangle.
10473 * method.c: Add macros and static variables for squangling.
10474 (build_overload_name): Rename to build_mangled_name, add logic for B
10475 compression, and split into process_modifiers and
10476 process_overload_item.
10477 (process_modifiers): New function, to handle constant, reference,
10478 and pointer types.
10479 (process_overload_item): New function, handles issue of type codes.
10480 (build_overload_name): New function, start squangling and call
10481 build_mangled_name.
10482 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10483 (start_squangling): New function to initialize squangling structs.
10484 (end_squangling): New function to destroy squangling structs.
10485 (nrepeats): Rename variable to Nrepeats.
10486 (issue_nrepeats): New function for issuing 'n' type repeats.
10487 (check_ktype): New function to check for type K name compression.
10488 (build_overload_nested_name): Add a check for K name compression.
10489 (build_qualified_name): Add a check for K name compression and don't
10490 use DECL_ASSEMBLER_NAME when squangling is on.
10491 (check_btype): New function, checks for B type compression.
10492 (build_static_name, build_decl_overload_real): Initiate squangling.
10493 (build_typename_overload, build_overload_with_type): Initiate
10494 squangling
10495
10496 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
10497
10498 * method.c (make_thunk): Avoid name buffer overflow.
10499
10500 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10501
10502 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10503 don't define them yet.
10504
10505 * parse.y (nomods_initdcl0): Add constructor_declarator case.
10506
10507 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10508
10509 * config-lang.in (diff_excludes): Use basename only.
10510
10511 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10512
10513 * tinfo2.cc: Add tinfo for signed char.
10514
10515 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
10516
10517 * search.c (compute_access): Handle protected constructors in derived
10518 classes as accessible.
10519
10520 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10521
10522 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10523 Call convert_from_reference sooner.
10524
10525 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
10526
10527 * cvt.c (ocp_convert): Obtain the constant values from constant
10528 decls even if the destination type is the same as the type of the
10529 decl.
10530
10531 * decl2.c (finish_file): Make sure that static inlines with
10532 definitions are not marked DECL_EXTERNAL before returning.
10533
10534 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10535
10536 * decl.c: Lose arg_looking_for_template.
10537 (lookup_name_real): Likewise.
10538 * parse.y: Lose processing_template_arg, template_arg1.
10539 (primary): Likewise.
10540 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10541
10542 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10543
10544 * error.c (dump_decl): Fix type of default arguments for template
10545 template parameters and nontype template parameters.
10546 * parse.y (template_parm): Handle invalid default template
10547 template arguments here.
10548
10549 * parse.y (template_parm): Use template_arg instead of PTYPENAME
10550 for default template template argument.
10551 * pt.c (coerce_template_parms): Merge default template argument
10552 codes. Can treat RECORD_TYPE as template name if it is implicitly
10553 created. Fix argument index in error message.
10554 * typeck.c (comptypes): Merge template argument comparison codes in
10555 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10556
10557 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
10558
10559 * lex.c (file_name_nondirectory): Also check for '/'.
10560
10561 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
10562
10563 * parse.y (primary): Deal with statement-expressions in
10564 templates.
10565 * pt.c (tsubst_copy): Handle BIND_EXPR.
10566 * tree.c (mapcar): Likewise.
10567
10568 * call.c (add_template_candidate_real): Pass extra parameter to
10569 fn_type_unification.
10570 * cp-tree.h (fn_type_unification): Add parameter.
10571 * pt.c (fn_type_unification): Add additional parameter to deal with
10572 static member functions.
10573 (get_bindings): Deal with static member functions.
10574
10575 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10576 (revert_static_member_fn): Declare.
10577 * decl.c (revert_static_member_fn): Remove declaration. Change
10578 linkage from internal to external.
10579 (cp_finish_decl): Deal with virtual functions in classes local to
10580 template functions.
10581 * decl2.c (finish_file): Don't forget to emit increment/decrement
10582 expressions in initializers for file-scope variables.
10583 * parse.y (typename_sub2): If the typename doesn't names a
10584 template, rather than a type, issue an error message.
10585 * pt.c (check_explicit_specialization): Handle specializations of
10586 static member functions.
10587 (coerce_template_parms): Handle offset references to lists of
10588 member functions.
10589 * search.c (note_debug_info_needed): Don't crash when handed a
10590 type which is being defined.
10591 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10592 that can happen with some illegal code.
10593
10594 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10595
10596 * call.c (user_harshness): Initialize `code' to 0.
10597 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10598 (null_ptr_cst_p): Add parentheses around && within ||.
10599 (standard_conversion): Likewise.
10600 (z_candidate): Likewise.
10601 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10602 (build_object_call): Likewise for `mem_args'.
10603 (build_new_op): Likewise for `mem_arglist'. Add `return' from
10604 default case in enumeration switch.
10605
10606 * class.c (build_vtable_entry): Add explicit braces to avoid
10607 ambiguous `else'.
10608 (build_class_init_list): Likewise.
10609 (finish_struct_1): Initialize `width' to 0.
10610 (instantiate_type): Initialize `name' to NULL_TREE. Add
10611 explicit braces to avoid ambiguous `else'.
10612
10613 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10614 `else'.
10615
10616 * decl.c (grok_reference_init): Eliminate unused parameter, all
10617 callers changed.
10618 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10619 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10620 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10621 (grokdeclarator): Add parentheses around && within ||. Add
10622 explicit braces to avoid ambiguous `else'.
10623 (grokparms): Initialize `type' to NULL_TREE.
10624 (xref_tag): Remove unused label `just_return'.
10625 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10626 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10627 (hack_incomplete_structures): Add parentheses around assignment
10628 used as truth value.
10629
10630 * decl2.c (coerce_delete_type): Hide definition of `e3'.
10631
10632 * error.c: Include <stdlib.h>.
10633 (dump_expr): Change the type of `i' to size_t. Remove unused
10634 label `error'.
10635
10636 * except.c (init_exception_processing): Remove unused variable `d'.
10637 (expand_throw): Likewise for `label'.
10638
10639 * friend.c (add_friends): Add explicit braces to avoid ambiguous
10640 `else'.
10641
10642 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10643 (sort_base_init): Likewise for `binfo'.
10644 (expand_member_init): Likewise for `rval'.
10645 (build_member_call): Add parentheses around assignment used as
10646 truth value.
10647 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10648 (build_new): Initialize `nelts' to NULL_TREE. Initialize
10649 `old_immediate_size_expand' to 0.
10650 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10651 (build_vec_delete_1): Remove unused variable `block'.
10652 (expand_vec_init): Initialize `itype' to NULL_TREE.
10653
10654 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
10655 declaration of `index' and `rindex' with autoconf macros.
10656 (reinit_parse_for_expr): Remove unused variables
10657 `look_for_semicolon' and `look_for_lbrac'.
10658 (cons_up_default_function): Initialize `args' to NULL_TREE.
10659 (readescape): Initialize `firstdig' to 0.
10660 (real_yylex): Add parentheses around assignment used as truth value.
10661
10662 * method.c: Include <strings.h> if we don't have <string.h>.
10663 Protect declaration of `index' with autoconf macro.
10664
10665 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10666 Initialize `type' to NULL_TREE.
10667 (structsp): Remove unused variable `id'.
10668
10669 * pt.c (coerce_template_parms): Add explicit braces to avoid
10670 ambiguous `else'.
10671 (lookup_template_class): Initialize `template' to NULL_TREE.
10672 (instantiate_class_template): Remove unused variable `name' and `e'.
10673 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
10674 (do_poplevel): Initialize `saved_warn_unused' to 0.
10675 (type_unification): Remove unused varable `parm'.
10676 (unify): Likewise for `j'.
10677
10678 * repo.c (init_repo): Add parentheses around assignment used as
10679 truth value.
10680 (finish_repo): Remove unused varable `p'.
10681
10682 * search.c (get_binfo): Initialize `type' to NULL_TREE.
10683 (get_base_distance): Likewise.
10684 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10685 and `new_v' to NULL_TREE.
10686 (lookup_fnfields): Likewise for `rval_binfo_h'.
10687 (breadth_first_search): Add parentheses around assignment used as
10688 truth value.
10689 (get_template_base): Initialize `type' to NULL_TREE.
10690
10691 * sig.c (append_signature_fields): Initialize `last_mfptr' to
10692 NULL_TREE.
10693 (build_signature_table_constructor): Likewise for
10694 `last_rhs_field', `pfn' and `vt_off'.
10695 (build_sigtable): Likewise for `init'.
10696
10697 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10698 (propagate_binfo_offsets): Likewise for `delta'.
10699 (hash_tree_cons): Initialize hashcode to 0.
10700 (can_free): Likewise for `size'.
10701 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10702
10703 * typeck.c (convert_sequence): Hide prototype.
10704 (common_type): Add explicit braces to avoid ambiguous `else'.
10705 (comp_target_types): Likewise.
10706 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10707 (build_function_call_real): Add explicit braces to avoid ambiguous
10708 `else'.
10709 (convert_arguments): Initialize `called_thing' to 0.
10710 (convert_for_initialization): Initialize `savew' and `savee' to 0.
10711
10712 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10713 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10714 (build_x_arrow): Likewise for `last_rval'.
10715
10716 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10717
10718 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
10719
10720 * decl.c (init_decl_processing): Use set_sizetype.
10721 * decl2.c (sizetype): Don't declare.
10722 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10723 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10724 (build_component_addr, unary_complex_lvalue): Likewise.
10725 * rtti.c (expand_class_desc): Likewise.
10726 * class.c (get_vfield_offset): Likewise.
10727
10728 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
10729
10730 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10731 early to avoid bogus error. Handle overloaded function
10732 names provided as template arguments correctly.
10733 (coerce_template_parms): Don't mishandle overloaded functions when
10734 dealing with template template parameters.
10735 (lookup_template_class): Issue an error message, rather than
10736 crashing, when the TYPE_DECL provided is not a template type.
10737
10738 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10739
10740 * class.c (instantiate_type): Don't just return a known type if
10741 it's wrong.
10742
10743 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
10744
10745 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10746 since that code could never be reached.
10747
10748 * error.c (dump_decl): Avoid aborting in the midst of printing an
10749 error message about an illegal template declaration.
10750
10751 * parse.y (structsp): Print an error message, rather than crashing,
10752 when a class-head does not name a class.
10753
10754 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
10755 template arguments as a g++ extension.
10756
10757 * cp-tree.def (ALIGNOF_EXPR): New tree code.
10758 * decl2.c (grok_alignof): If processing_template_decl, just store
10759 the expression.
10760 * typeck.c (c_alignof): Likewise.
10761 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
10762 * error.c (dump_expr): Likewise.
10763 * pt.c (tsubst_copy): Likewise.
10764 * tree.c (cp_tree_equal): Likewise.
10765 * pt.c (uses_template_parms): Correctly determine whether or not a
10766 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
10767 folding can be done.
10768
10769 * cp-tree.h (grok_enum_decls): Remove type parameter.
10770 * decl.c (grok_enum_decls): Likewise.
10771 * decl2.c (grok_x_components): Call grok_enum_decls
10772 unconditionally, since it will do nothing if there is no
10773 current_local_enum. Use the new calling sequence.
10774 * pt.c (tsubst_enum): Use the new calling sequence for
10775 grok_enum_decls.
10776
10777 * decl.c (start_function): Make member functions of local classes
10778 in extern inline functions have comdat linkage here...
10779 (grokdeclarator): Rather than here.
10780
10781 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
10782
10783 * pt.c (convert_nontype_argument): Use decl_constant_value.
10784
10785 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
10786
10787 * call.c (add_template_candidate_real): New function.
10788 (add_template_candidate): Use it.
10789 (add_template_conv_candidate): Likewise.
10790 (joust): Pass extra argument to more_specialized.
10791 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
10792 (is_local_class): Remove.
10793 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
10794 * cp-tree.h (is_local_class): Remove.
10795 (perform_array_to_pointer_conversion): Likewise.
10796 (finish_member_template_decl): Add.
10797 (check_explicit_specialization): Return a tree, not an int.
10798 (more_specialized): Take additional argument.
10799 (get_bindings): Likewise.
10800 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
10801 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10802 (perform_array_to_pointer_conversion): Remove.
10803 * decl.c (saved_scope): Add processing_specialization,
10804 processing_explicit_instantiation fields.
10805 (maybe_push_to_top_level): Save them.
10806 (pop_from_top_level): Restore them.
10807 (grokfndecl): Use new return value from
10808 check_explicit_specialization.
10809 (start_decl): Don't check flag_guiding_decls before pushing
10810 decls.
10811 (cp_finish_decl): Remove previous (bogus) change.
10812 (grok_declarator): Use decl_function_context rather than
10813 is_local_class.
10814 * decl2.c (finish_file): Pass extra argument to get_bindings.
10815 (build_expr_from_tree): Let build_x_component_ref check
10816 validity of arguments rather than doing it here.
10817 * lex.c (cons_up_default_function): Remove code fooling with
10818 processing_specialization, processing_explicit_instantiation
10819 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
10820 * method.c (build_overload_identifier): Mangle local classes in
10821 template functions correctly.
10822 * parse.y (finish_member_template_decl): Move to pt.c.
10823 * pt.c (finish_member_template_decl): Moved here from parse.y.
10824 (print_candidates): New function.
10825 (determine_specialization): Change interface. Properly look for
10826 most specialized versions of template candidates.
10827 (check_explicit_specialization): Fully process explicit
10828 instantiations.
10829 (push_template_decl): Avoid looking at CLASSTYPE fields in
10830 FUNCTION_DECLS.
10831 (determine_overloaded_function): Remove.
10832 (convert_nontype_argument): Change name from
10833 convert_nontype_parameter. Use determine_overloaded_function
10834 instead of instantiate_type.
10835 (mangle_class_name_for_template): Handle type contexts as well as
10836 function contexts.
10837 (classtype_mangled_name): Likewise.
10838 (lookup_template_class): Likewise.
10839 (tsubst): Likewise.
10840 (more_specialized): Take explict template arguments as a
10841 parameter.
10842 (most_specialized): Likewise.
10843 (get_bindings): Likewise. Check that return types match before
10844 proclaiming a function a match.
10845 (do_decl_instantiation): Remove code searching for function to
10846 instantiate; that is now done in check_explicit_specialization.
10847 (add_maybe_template): Pass extra argument to get_bindings.
10848 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
10849 implementation.
10850 * typeck.c (build_component_ref): Check for invalid arguments.
10851
10852 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
10853
10854 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
10855 return_target and call_target are equivalent.
10856
10857 * pt.c (type_unification_real): Just accept function parms that
10858 don't use any template parms.
10859
10860 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
10861
10862 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
10863 unset DECL_NOT_REALLY_EXTERN.
10864
10865 * parse.y (typename_sub*): Fix std::.
10866
10867 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10868
10869 * error.c (dump_decl): Fix type default template args.
10870 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
10871
10872 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
10873
10874 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
10875 (file_name_nondirectory): Use.
10876
10877 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10878
10879 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
10880 that are not really present. Substitute default arguments in
10881 template template arguments. Correctly convert TEMPLATE_DECL to
10882 TEMPLATE_TEMPLATE_PARM.
10883 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
10884 are no longer treated specially here.
10885 * parse.y (template_template_parm): Fix copy error.
10886 * decl.c (grokdeclarator): Warn about missing `typename' for nested
10887 type created from template template parameters.
10888 * parse.y (bad_parm): Likewise
10889
10890 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
10891 (push_nested_class): Likewise.
10892 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
10893 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
10894 (copy_template_template_parm): Declare.
10895 * decl.c (arg_looking_for_template): New variable.
10896 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
10897 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
10898 node if arg_looking_for_template is nonzero.
10899 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
10900 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
10901 (grokdeclarator): Handle TEMPLATE_DECL.
10902 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
10903 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
10904 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
10905 (dump_decl): Handle unnamed template type parameters.
10906 Handle template template parameters.
10907 (dump_function_name): Handle template template parameters.
10908 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
10909 Handle TEMPLATE_TEMPLATE_PARM.
10910 * method.c (build_template_template_parm_names): New function.
10911 (build_template_parm_names): Handle TEMPLATE_DECL.
10912 (build_overload_nested_name, build_overload_name):
10913 Handle TEMPLATE_TEMPLATE_PARM.
10914 * parse.y (maybe_identifier): New nonterminal.
10915 (template_type_parm): Use it.
10916 (template_template_parm, template_arg1): New nonterminal.
10917 (template_parm): Add template_template_parm rules.
10918 (template_arg): Set processing_template_arg.
10919 (template_arg1): Rules moved from template_arg.
10920 (primary, nonnested_type): Set arg_looking_for_template if we are
10921 processing template arguments.
10922 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
10923 (process_template_parm): Handle template template parameters.
10924 (coerce_template_parms, comp_template_args): Likewise.
10925 (mangle_class_name_for_template, lookup_template_class): Likewise.
10926 (uses_template_parms): Handle TEMPLATE_DECL and
10927 TEMPLATE_TEMPLATE_PARM.
10928 (current_template_args): Handle TEMPLATE_DECL.
10929 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
10930 * search.c (dfs_walk, dfs_record_inheritance):
10931 Handle TEMPLATE_TEMPLATE_PARM.
10932 * tree.c (copy_template_template_parm): New function.
10933 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
10934 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
10935
10936 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
10937
10938 * decl.c (start_decl): Don't allow duplicate definitions of static
10939 data members.
10940
10941 * call.c (build_user_type_conversion_1): Handle user-defined
10942 template conversion operators correctly.
10943
10944 * decl2.c (build_expr_from_tree): Issue an error message if the
10945 object in a COMPONENT_REF is a TEMPLATE_DECL.
10946
10947 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
10948
10949 * class.c (is_local_class): New function.
10950 * cp-tree.h (is_local_class): Declare it.
10951 (last_tree): Likewise.
10952 (begin_tree): Likewise.
10953 (end_tree): Likewise.
10954 (lookup_template_class): Change prototype.
10955 * decl.c (cp_finish_decl): Check for NULL where necessary.
10956 Consider FUNCTION_DECLS to declare objects with top-level binding,
10957 when calling make_decl_rtl.
10958 (grokdeclarator): Give members of local classes internal linkage.
10959 (start_function): Remove declaration of last_tree.
10960 (finish_function): Set flag_keep_inline_functions around call to
10961 rest_of_compilation if we are processing a member function in a
10962 local class.
10963 (start_method): Call push_template_decl for member functions of
10964 local classes in template functions.
10965 * decl2.c (import_export_decl): Don't give external linkage to
10966 instantiations of templates with internal linkage.
10967 * parse.y (last_tree): Remove declaration.
10968 (template_type): Pass extra parameter to lookup_template_class.
10969 (self_template_type): Likewise.
10970 (structsp): Move call to reset_specialization into left_curly.
10971 (left_curly): Call reset_specialization, and begin_tree.
10972 * pt.c (saved_trees): New variable.
10973 (mangle_class_name_for_template): Change prototype. Use
10974 additional function context to name local classes in templates
10975 correctly.
10976 (classtype_mangled_name): Pass the context.
10977 (push_template_decl): Handle local classes and templates, and
10978 member functions for such classes.
10979 (convert_nontype_parameter): Fix handling of pointer-to-member
10980 constants.
10981 (lookup_template_class): Handle local classes in templates.
10982 (tsubst): Likewise. Don't assume that template instantiations
10983 have external linkage; pay attention to the template declaration.
10984 (mark_decl_instantiated): Likewise.
10985 (begin_tree): New function.
10986 (end_tree): Likewise.
10987
10988 * decl.c (xref_basetypes): Don't call complete_type for basetypes
10989 that involve template parameters; that can lead to infinite
10990 recursion unnecessarily.
10991
10992 * pt.c (register_specialization): Do not register specializations
10993 that aren't ready to be registered yet.
10994 (check_explicit_specialization): Handle explicit specialization of
10995 constructors and destructors.
10996 (build_template_decl): New function.
10997 (push_template_delc): Handle out-of-class specializations of
10998 member templates.
10999
11000 * pt.c (check_explicit_specialization): Set up the template
11001 information before registering the specialization.
11002 (coerce_template_parms): Fix thinko.
11003 (tsubst): Handle specializations of member templates correctly.
11004
11005 * class.c (finish_struct_methods): Remove calls to
11006 check_explicit_specialization from here.
11007 (finish_struct): And insert them here.
11008 * cp-tree.h (perform_qualification_conversions): New function.
11009 (perform_array_to_pointer_conversion): Likewise.
11010 (begin_explicit_instantiation): Likewise.
11011 (end_explicit_instantiation): Likewise.
11012 (determine_specialization): Renamed from
11013 determine_explicit_specialization.
11014 (comp_template_parms): New function.
11015 (processing_explicit_instantiation): New variable.
11016 * cvt.c (perform_qualification_conversions): New function.
11017 (perform_array_to_pointer_conversion): Likewise.
11018 * decl.c (duplicate_decls): Don't consider template functions
11019 alike unless they have the same parameters. Refine handling of
11020 instantiation/specialization mismatches.
11021 (start_decl): Don't call pushdecl for template specializations,
11022 since they don't affect overloading.
11023 (start_function): Likewise.
11024 (grokfndecl): Call check_explicit_specialization a little later.
11025 Don't call duplicate_decls for memberm template specializations.
11026 (grokdeclarator): Don't update template_count for classes that are
11027 themselves specializations. Remove use of `2' as parameter to
11028 grokfndecl since that value isn't used.
11029 * lex.c (cons_up_default_function): Save and restore
11030 processing_explicit_instantiation around calls to grokfield.
11031 * parse.y (finish_member_template_decl): New function.
11032 (component_decl_1): Use it.
11033 (fn.def2): Likewise.
11034 (template_arg_list_opt): New nonterminal.
11035 (template_type): Use it.
11036 (self_template_type): Likewise.
11037 (template_id): Likewise.
11038 (object_template_id): Likewise.
11039 (notype_template_declarator): Likwise.
11040 (begin_explicit_instantiation): Likewise.
11041 (end_explicit_instantiation): Likewise.
11042 (explicit_instantiation): Use them.
11043 * pt.c (coerce_template_parms): Add parameters.
11044 (processing_explicit_instantiation): New variable.
11045 (convert_nontype_parameter): New function.
11046 (determine_overloaded_function): Likewise.
11047 (begin_explicit_instantiation): Likewise.
11048 (end_explicit_instantiation): Likewise.
11049 (retrieve_specialization): Likewise.
11050 (register_specialization): Likewise.
11051 (processing_explicit_specialization): Removed.
11052 (determine_specialization): Handle specializations of member
11053 functions of template class instantiations.
11054 (check_explicit_specialization): Refine to conform to standard.
11055 (comp_template_parms): New function.
11056 (coerce_template_parms): Call convert_nontype_parameter.
11057 (tsubst): Refine handling of member templates. Use
11058 register_specialization.
11059 (instantiate_template): Use retrieve_specialization.
11060 (do_decl_instantiation): Likewise.
11061 (instantiate_decl): Likewise.
11062 (type_unification): Improve handling of explict template
11063 arguments.
11064 * tree.c (mapcar): Return error_mark_node, rather than aborting,
11065 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11066 * typeck.c (build_unary_op): Call determine_specialization, rather
11067 than determine_explicit_specialization.
11068
11069 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
11070
11071 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11072
11073 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11074
11075 * error.c (dump_decl): For enum tags, output the tag, not its value.
11076
11077 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
11078
11079 * decl.c (init_decl_processing): Only call init_rtti_processing
11080 FLAG_RTTI is set.
11081
11082 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
11083
11084 * init.c (build_new_1): Split out from build_new.
11085 (build_new): Just return a NEW_EXPR.
11086 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11087
11088 * decl2.c (get_temp_regvar): Tweak.
11089
11090 * cp-tree.h (TREE_CALLS_NEW): Comment out.
11091 * class.c (resolves_to_fixed_type_p): Remove use.
11092 * method.c (build_opfncall): Likewise.
11093 * call.c (build_new_op): Likewise.
11094
11095 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11096
11097 * exception.cc (__eh_alloc, __eh_free): New fns.
11098 (__cp_push_exception, __cp_pop_exception): Use them.
11099 (__uncatch_exception): Call terminate here if no exception.
11100 * except.c (build_terminate_handler): New fn.
11101 (expand_start_catch_block): Use it.
11102 (expand_exception_blocks): Likewise.
11103 (alloc_eh_object): New fn.
11104 (expand_throw): Use it. Protect exception init with terminate.
11105 * typeck.c (build_modify_expr): Remove code that ignores trivial
11106 methods.
11107
11108 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11109
11110 * call.c (add_builtin_candidate): Add default case in enumeration
11111 switch.
11112 (build_new_op): Likewise.
11113 (convert_like): Likewise.
11114 * cvt.c (build_expr_type_conversion): Likewise.
11115 * tree.c (real_lvalue_p): Likewise.
11116 (lvalue_p): Likewise.
11117 (cp_tree_equal): Likewise.
11118 * typeck.c (comptypes): Likewise.
11119 (build_component_ref): Likewise.
11120 (build_function_call_real): Likewise.
11121 (build_binary_op_nodefault): Likewise.
11122 (build_unary_op): Likewise.
11123 (build_modify_expr): Likewise.
11124 * typeck2.c (initializer_constant_valid_p): Likewise.
11125
11126 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
11127
11128 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11129
11130 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
11131
11132 * pt.c (coerce_template_parms): Make sure to digest_init if
11133 possible.
11134
11135 * decl.c (duplicate_decls): Make the newdecl virtual if the
11136 olddecl was, just as is done with other attributes of olddecl.
11137
11138 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11139
11140 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11141 address of an OFFSET_REF.
11142
11143 * cp-tree.def: Add AGGR_INIT_EXPR.
11144 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11145 AGGR_INIT_EXPR where appropriate.
11146 * expr.c (cplus_expand_expr): Likewise. Simplify.
11147
11148 * decl2.c (finish_file): Remove call to register_exception_table.
11149
11150 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11151
11152 * pt.c (instantiate_class_template): Don't do injection when
11153 processing_template_decl is true, as pollutes current_binding_level
11154 for base classes.
11155
11156 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
11157
11158 * pt.c (maybe_fold_nontype_arg): Add prototype.
11159
11160 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11161
11162 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11163 * error.c (dump_expr): Likewise.
11164
11165 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
11166
11167 * typeck.c (build_function_call_real): Remove "inline called before
11168 definition" pedwarn.
11169
11170 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11171
11172 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11173
11174 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11175
11176 * pt.c (type_unification_real): Change __null to type void* with
11177 a warning.
11178
11179 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
11180
11181 * call.c (implicit_conversion): Don't call
11182 build_user_type_conversion_1 with a NULL expr, since it will
11183 crash.
11184
11185 * pt.c (unify): Don't try to unify array bounds if either array is
11186 unbounded.
11187
11188 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11189
11190 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11191 Replace extern decls with casts.
11192
11193 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11194 Update last_parm_cleanup_insn.
11195 (store_after_parms): Remove.
11196 * cp-tree.h: Adjust.
11197
11198 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11199
11200 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
11201 (finish_file): Check DECL_COMDAT instead of weak|one_only.
11202 (import_export_vtable): Use make_decl_one_only instead of
11203 comdat_linkage for win32 tweak.
11204 (import_export_decl): Likewise.
11205 * pt.c (mark_decl_instantiated): Likewise.
11206
11207 * decl2.c (finish_file): Lose handling of templates in pending_statics.
11208
11209 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
11210
11211 * decl2.c (finish_file): Lose call to expand_builtin_throw.
11212 * except.c (expand_builtin_throw): Remove.
11213 * cp-tree.h: Remove ptr_ptr_type_node.
11214 * decl.c: Likewise.
11215
11216 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
11217
11218 * decl.c (ptr_ptr_type_node): Define.
11219 (init_decl_processing): Initialize it.
11220 * cp-tree.h: Declare it.
11221 * exception.cc (__cp_exception_info): Use __get_eh_info.
11222 (__cp_push_exception): Likewise.
11223 (__cp_pop_exception): Likewise.
11224
11225 From Scott Snyder <snyder@d0sgif.fnal.gov>:
11226 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
11227 saved_pc.
11228 (init_exception_processing): Removed saved_pc initialization.
11229
11230 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
11231
11232 * pt.c (instantiate_decl): Defer all templates but inline functions.
11233
11234 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11235
11236 * init.c (expand_vec_init): Don't fold a list of parameters.
11237
11238 * decl.c (copy_args_p): Handle copy elision for types with virtual
11239 bases.
11240 * call.c (build_over_call): Likewise.
11241
11242 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
11243
11244 * pt.c (lookup_template_function): Copy the template arguments,
11245 not just the list containing them, to the permanent obstack.
11246
11247 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11248
11249 * except.c (expand_start_catch_block): suspend_momentary for the
11250 terminate handler.
11251
11252 * error.c (dump_decl): Handle LOOKUP_EXPR.
11253
11254 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
11255
11256 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
11257 permanent obstack if we are processing a template decl.
11258 * typeck.c (build_static_cast): Likewise.
11259 (build_const_cast): Likewise.
11260 (build_reinterpret_cast): Likewise.
11261
11262 * pt.c (coerce_template_parms): Coerce some expressions, even
11263 when processing_template_decl.
11264
11265 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11266
11267 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
11268 handling of pointer difference expressions.
11269
11270 * typeck.c (comp_target_types): Comparison of function/method types
11271 is independent of nptrs.
11272
11273 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
11274
11275 * pt.c (tsubst): Avoid creating pointer to reference and
11276 reference to reference types.
11277
11278 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11279
11280 * parse.y (do_id): New nonterminal.
11281 (template_id): Use it.
11282
11283 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11284
11285 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
11286 * spew.c (yylex): Don't do_identifier here.
11287 * decl2.c (build_expr_from_tree): Revert last change.
11288
11289 * decl2.c (build_expr_from_tree): Expand the name for a method call.
11290 * parse.y (object_template_id): Don't try to take the DECL_NAME.
11291
11292 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
11293
11294 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
11295 alloc_expr.
11296 * call.c (build_op_delete_call): Adjust.
11297
11298 * except.c (expand_end_catch_block): Lose rethrow region.
11299 (expand_start_catch_block): Likewise.
11300 (expand_end_catch_block): Don't expand_leftover_cleanups.
11301
11302 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11303
11304 * pt.c (tsubst): Remove tree_cons call (places redundant info into
11305 DECL_TEMPLATE_INSTANTIATION).
11306
11307 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
11308
11309 * tree.c (is_overloaded_fn): Handle getting a fn template.
11310 (really_overloaded_fn): Likewise.
11311 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
11312 * pt.c (check_explicit_specialization): Tweak.
11313 (determine_explicit_specialization): Tweak.
11314
11315 * tree.c, cp-tree.h (get_target_expr): New fn.
11316
11317 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
11318
11319 * pt.c (check_explicit_specialization): Fix misspelling in
11320 diagnostic: `preceeded'.
11321 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
11322 `conversiona'.
11323
11324 1997-12-02 Mark Mitchell <mmitchell@usa.net>
11325
11326 * pt.c (determine_explicit_specialization): Avoid an internal
11327 error for bad specializations.
11328
11329 * method.c (build_overload_value): Handle SCOPE_REF.
11330
11331 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
11332
11333 * class.c (prepare_fresh_vtable): Enable even more complex MI
11334 vtable names.
11335
11336 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11337
11338 * exception.cc (__check_eh_spec): Optimize a bit.
11339
11340 * exception.cc (__cp_pop_exception): Lose handler arg.
11341 * except.c (do_pop_exception): Likewise.
11342 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
11343 (expand_end_catch_block): Likewise.
11344
11345 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11346
11347 * pt.c (check_explicit_specialization): Complain about using a
11348 template-id for a non-specialization.
11349
11350 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
11351
11352 * repo.c: Prototype rindex only if needed.
11353 * xref.c: Likewise.
11354
11355 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11356
11357 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
11358
11359 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
11360
11361 * typeck.c (build_const_cast): Handle references here instead of
11362 handing off to convert_to_reference.
11363
11364 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
11365 TerminateFunctionCall.
11366 (init_exception_processing): Likewise. Terminate et al are now
11367 the fns, not ADDR_EXPRs.
11368 (various): Lose redundant assemble_external calls.
11369 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
11370
11371 * cp-tree.h (struct lang_decl_flags): Add comdat.
11372 (DECL_COMDAT): New macro.
11373 * decl.c (duplicate_decls): Propagate it.
11374 (cp_finish_decl): Handle it.
11375 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
11376
11377 * class.c: Remove static pending_hard_virtuals.
11378 (add_virtual_function): Take pointers to pending_virtuals
11379 and pending_hard_virtuals.
11380 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
11381
11382 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11383
11384 * decl2.c (import_export_vtable): If we support one_only but not
11385 weak symbols, mark instantiated template vtables one_only.
11386 (import_export_decl): Likewise for tinfo functions.
11387 (finish_vtable_vardecl): Also write out vtables from explicitly
11388 instantiated template classes.
11389 * pt.c (mark_class_instantiated): Revert last change.
11390
11391 * except.c (expand_throw): Call mark_used on the destructor.
11392
11393 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
11394
11395 * lex.c (lang_init): Enable flag_exceptions by default if no
11396 command line switch was specified.
11397
11398 1997-11-26 Mark Mitchell <mmitchell@usa.net>
11399
11400 * pt.c (unify): Handle `void' template parameters in
11401 specializations.
11402
11403 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11404
11405 * rtti.c (build_dynamic_cast): Handle template case here.
11406 (build_dynamic_cast_1): Not here.
11407
11408 * typeck2.c (digest_init): Make copies where appropriate.
11409
11410 * decl2.c (delete_sanity): resolve_offset_ref.
11411
11412 * except.c: Call terminate without caching so many bits.
11413
11414 * except.c (expand_start_catch_block): Fix catching a reference
11415 to pointer.
11416
11417 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11418
11419 * init.c (build_new): Copy size to the saveable obstack.
11420
11421 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11422 TRY_CATCH_EXPR for now.
11423
11424 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11425
11426 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11427 has DECL_LANG_SPECIFIC.
11428
11429 * exception.cc (struct cp_eh_info): Add handlers field.
11430 (__cp_push_exception): Initialize it.
11431 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
11432 (__throw_bad_exception): Remove.
11433 * except.c (call_eh_info): Add handlers field.
11434 (get_eh_handlers): New fn.
11435 (push_eh_cleanup): Increment handlers.
11436
11437 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
11438
11439 * except.c (expand_start_eh_spec): Use the try/catch code.
11440 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
11441 doing everything inline.
11442 (init_exception_processing): throw_type_match now takes
11443 const void pointers.
11444 * exception.cc (__check_eh_spec): New fn.
11445 * inc/exception: Neither terminate nor unexpected return.
11446 * decl.c: Make const_ptr_type_node public.
11447 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11448
11449 * except.c (expand_start_catch_block): We only need the rethrow
11450 region for non-sjlj exceptions.
11451 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
11452
11453 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11454
11455 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11456 (various.o): Likewise.
11457 * inc/new: Add placement deletes. Add throw specs for default new.
11458 * new.cc (set_new_handler): Move here from libgcc2.
11459 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11460 (new): Move from libgcc2. Throw bad_alloc.
11461 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11462 * decl.c (init_decl_processing): Update exception specs on new and
11463 delete.
11464
11465 * method.c (build_decl_overload_real): Don't mess with global
11466 placement delete.
11467
11468 * init.c (build_new): Check for null throw spec, not nothrow_t.
11469
11470 * decl.c (duplicate_decls): Don't complain about different exceptions
11471 from an internal declaration.
11472
11473 * call.c (build_op_delete_call): Fix check for member fns again.
11474
11475 * decl2.c (import_export_decl): Interface hackery affects
11476 virtual synthesized methods.
11477
11478 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11479
11480 * decl.c (start_decl): Don't just complain about a mismatched
11481 scope, fix it.
11482
11483 * decl.c (make_implicit_typename): Handle case where t is not
11484 actually from context.
11485 * tree.c (get_type_decl): Lose identifier case.
11486 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11487 * parse.y (nonnested_type): Just use lookup_name.
11488 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11489
11490 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
11491
11492 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11493 T was built in C language context (for example, by
11494 output_func_start_profiler).
11495
11496 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11497
11498 * decl.c (make_implicit_typename): New fn.
11499 (lookup_name_real): Use it. Use current_class_type as the context.
11500
11501 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
11502
11503 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11504
11505 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11506
11507 * friend.c (do_friend): Warn about non-template friends in templates.
11508
11509 * call.c (build_op_delete_call): Fix handling of inherited delete.
11510
11511 * search.c (dfs_record_inheritance): Ignore template type parms.
11512
11513 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11514
11515 * call.c (build_new_op): Fix copy error.
11516 (build_op_new_call): New fn.
11517 (build_op_delete_call): New fn.
11518 * cp-tree.h: Declare them.
11519 * init.c (build_new): Use them. Support placement delete.
11520 (build_x_delete): Use build_op_delete_call.
11521 (build_delete): Likewise.
11522 * decl2.c (delete_sanity): Likewise.
11523 (coerce_delete_type): Don't complain about placement delete.
11524
11525 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11526
11527 * call.c (build_new_function_call): Remove unused 'obj' parm.
11528 * cp-tree.h, typeck.c: Adjust.
11529
11530 * init.c (build_new): Make the cleanup last longer.
11531 (expand_vec_init): Call do_pending_stack_adjust.
11532
11533 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11534
11535 * pt.c (do_type_instantiation): Fix typo.
11536 (mark_class_instantiated): If we support one_only but not weak
11537 symbols, don't mark this as known.
11538
11539 * init.c (build_new): Handle vec delete in EH cleanup.
11540
11541 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11542
11543 * call.c (build_method_call): Call complete_type before checking
11544 for destructor.
11545
11546 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
11547
11548 * decl.c (add_block_current_level): Delete.
11549 * init.c (build_vec_delete_1): Delete build_block and
11550 add_block_current_level calls.
11551
11552 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
11553
11554 * init.c (build_new): Handle freeing allocated memory when the
11555 constructor throws.
11556
11557 * call.c (build_new_method_call): Fix flags arg.
11558
11559 * pt.c (do_type_instantiation): Don't try to instantiate
11560 member templates.
11561 (mark_decl_instantiated): If we support one_only but not
11562 weak symbols, mark this one_only.
11563 * decl2.c (import_export_vtable): Don't defer handling of vtables
11564 if MULTIPLE_SYMBOL_SPACES.
11565
11566 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11567
11568 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11569
11570 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
11571
11572 * except.c (do_pop_exception): Return a value.
11573
11574 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11575
11576 * call.c (build_new_method_call): Handle getting a
11577 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
11578 if we got template parms.
11579 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11580 not just the args.
11581 * decl2.c (build_expr_from_tree): Tweak last change.
11582 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11583 (maybe_fold_nontype_arg): Split out from tsubst_copy.
11584 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11585
11586 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11587
11588 * pt.c (tsubst_copy): Handle explicit template arguments in
11589 function calls.
11590 * typeck.c (build_x_function_call): Likewise.
11591 * decl2.c (build_expr_from_tree): Lookup function name if it
11592 hasn't been done.
11593
11594 * pt.c (tsubst): Instantiate template functions properly when
11595 template parameter does not appear in function arguments and return
11596 type.
11597 (comp_template_args): Handle member templates required by tsubst.
11598
11599 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11600
11601 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11602 previous change.
11603
11604 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11605
11606 * pt.c (coerce_template_parms): Tweak error message.
11607
11608 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11609 return type defaults to `int', even if there are storage-class
11610 specifiers.
11611
11612 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11613
11614 Complete nested exception support.
11615 * except.c (do_pop_exception): Split out...
11616 (push_eh_cleanup): From here. Handle the EH region by hand.
11617 (expand_start_catch_block): Add a new level for the catch parm.
11618 Move the rethrow region outside the two cleanup regions.
11619 Protect the initializer for the catch parm with terminate.
11620 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
11621 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
11622 popping off the middle of the stack.
11623 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11624 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11625 (build_cplus_new): Only wrap CALL_EXPRs.
11626 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11627 the constructor call.
11628
11629 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11630
11631 * Make-lang.in (c++.distdir): Make inc subdirectory.
11632
11633 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11634
11635 * decl2.c (finish_file): Put back some code.
11636
11637 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11638
11639 * decl2.c (finish_file): Remove redundant code.
11640 * method.c (emit_thunk): Don't let the backend defer generic thunks.
11641
11642 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
11643
11644 * except.c (call_eh_info): Split out...
11645 (push_eh_info): From here.
11646 (expand_builtin_throw): Use it.
11647 (expand_start_catch_block): Move region start back.
11648
11649 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
11650
11651 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11652 (real_yylex): Record wide strings using target endianness, not host.
11653
11654 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
11655
11656 * repo.c (rindex): Add decl unconditionally.
11657 (get_base_filename, open_repo_file): Don't cast rindex.
11658 * xref.c (rindex): Add decl unconditionally.
11659 (index): Remove unused decl.
11660 (open_xref_file): Don't cast rindex.
11661
11662 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11663
11664 * class.c (build_vbase_path): Propagate the result type properly.
11665
11666 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
11667
11668 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11669 remaining use of saved_throw_type with a call to get_eh_type.
11670
11671 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
11672
11673 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11674 (file_name_nondirectory): New function, doing the same as the macro.
11675 (set_typedecl_interface_info): Use it instead of the macro.
11676 (check_newline): Likewise.
11677 (handle_cp_pragma): Likewise.
11678
11679 * repo.c (get_base_filename): Cast result of rindex to char*.
11680 (open_repo_file): Likewise.
11681 * xref.c (open_xref_file): Likewise.
11682 * error.c (dump_char): Make its arg int, not char.
11683
11684 * except.c (push_eh_info): Pass the number of fields - 1 down, not
11685 the exact number of fields.
11686
11687 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11688
11689 Support for nested exceptions.
11690 * tinfo2.cc (__is_pointer): New fn.
11691 * exception.cc (struct cp_eh_info): Define.
11692 (__cp_exception_info, __uncatch_exception): New fns.
11693 (__cp_push_exception, __cp_pop_exception): New fns.
11694 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11695 Lose empty_fndecl.
11696 (init_exception_processing): Likewise. __eh_pc is now external.
11697 (push_eh_info): New fn.
11698 (get_eh_{info,value,type,caught}): New fns.
11699 (push_eh_cleanup): Just call __cp_pop_exception.
11700 (expand_start_catch_block): Use push_eh_info. Start the eh region
11701 sooner.
11702 (expand_end_eh_spec): Use push_eh_info.
11703 (expand_throw): Call __cp_push_exception to set up the exception info.
11704 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
11705 when we rethrow.
11706 (expand_builtin_throw): Don't refer to empty_fndecl.
11707
11708 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
11709
11710 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11711
11712 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
11713
11714 * method.c (build_template_parm_names, build_decl_overload_real):
11715 Add static to definitions.
11716 * pt.c (add_to_template_args, note_template_header,
11717 processing_explicit_specialization, type_unification_real): Likewise.
11718 ({determine,check}_explicit_specialization): Use a single string for
11719 error messages.
11720
11721 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11722
11723 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11724 (expand_end_catch_block): Likewise.
11725 (expand_end_eh_spec): Likewise.
11726
11727 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
11728
11729 * decl.c (duplicate_decls): Handle template specializations
11730 correctly.
11731 * error.c (dump_function_name): Fix printing of specializations of
11732 member functions that are not member templates.
11733 * cp-tree.h (processing_specialization): Make global.
11734 * pt.c (processing_specialization): Likewise.
11735 * lex.c (cons_up_default_function): Save and restore
11736 processing_specialization to avoid confusion.
11737
11738 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11739
11740 * decl.c (init_decl_processing): Give null_node unknown* type.
11741 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11742 (common_type): Likewise.
11743 * error.c (args_as_string): Recognize null_node.
11744
11745 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11746
11747 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11748 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11749
11750 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11751
11752 * Make-lang.in (g++): Include prefix.o.
11753
11754 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
11755
11756 * pt.c (determine_explicit_specialization): Initialize "dummy"
11757 to keep Purify quiet.
11758
11759 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11760
11761 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
11762 (build_overload_int): Not here.
11763
11764 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
11765
11766 * class.c (build_type_pathname): Remove.
11767 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
11768
11769 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
11770
11771 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
11772 &&label GNU extension.
11773
11774 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
11775
11776 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
11777 so as to avoid incorrect manglings.
11778 * method.c (build_decl_overload_real): Don't mangle return types
11779 for constructors.
11780
11781 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11782
11783 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
11784 scratch_tree_cons): Define as macros for now.
11785 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
11786 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
11787 typeck2.c: Use them and the expression_obstack variants.
11788
11789 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11790
11791 * decl.c (store_return_init): Allow classes with explicit ctors to
11792 be used with the named return values extension.
11793
11794 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
11795
11796 * pt.c (instantiate_decl): Fix previous change.
11797
11798 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11799
11800 * pt.c (tsubst): Fix thinko.
11801 (instantiate_decl): Really use the original template.
11802
11803 * call.c (build_new_method_call): Use simple constructor_name for
11804 error messages.
11805
11806 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
11807
11808 * method.c (build_underscore_int): Don't use ANSI specific
11809 features.
11810
11811 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11812
11813 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
11814 for our key method; it might have been inlined by -O3.
11815
11816 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
11817
11818 * decl.c (make_typename_type): Do not try to call lookup_field for
11819 non-aggregate types.
11820
11821 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
11822
11823 * typeck.c (build_reinterpret_cast): Tweak.
11824
11825 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11826
11827 * typeck.c (build_reinterpret_cast): Converting a void pointer
11828 to function pointer with a reinterpret_cast produces a warning
11829 if -pedantic is issued.
11830
11831 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11832
11833 * typeck.c (c_expand_return): Don't warn about returning a
11834 reference-type variable as a reference.
11835
11836 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11837
11838 * method.c (build_static_name): Fix typo.
11839
11840 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
11841
11842 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
11843 OLDDECL before we try to do DECL_USE_TEMPLATE.
11844
11845 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11846
11847 * decl.c (duplicate_decls): Don't warn about template instances.
11848
11849 * typeck.c (mark_addressable): Lose ancient code that unsets
11850 DECL_EXTERNAL.
11851
11852 * pt.c (do_decl_instantiation): Lose support for instantiating
11853 non-templates.
11854
11855 * call.c (build_new_function_call): Fix handling of null explicit
11856 template args.
11857 (build_new_method_call): Likewise.
11858
11859 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
11860
11861 * method.c (build_underscore_int): Fix typo.
11862
11863 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
11864
11865 * tree.c (print_lang_statistics): #if 0 call to
11866 print_inline_obstack_statistics until its definition is checked in.
11867
11868 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
11869
11870 * decl2.c (finish_file): Move dump_tree_statistics to end.
11871
11872 * pt.c (instantiate_decl): Look for the original template.
11873 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
11874 of member templates.
11875
11876 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11877
11878 * Makefile.in (g++FAQ.*): New rules.
11879 (CONFLICTS): Update.
11880 * g++FAQ.texi: Moved from libg++.
11881
11882 * parse.y (PFUNCNAME): Only specify the type once.
11883
11884 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
11885
11886 * lex.c (real_yylex): Clean up the code to fully behave the way
11887 the c-lex.c parser does for complex and real numbers.
11888
11889 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11890
11891 * method.c (build_decl_overload_real): Reformat.
11892
11893 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
11894
11895 * method.c (synthesize_method): If at_eof, determine our linkage.
11896
11897 1997-09-29 Paul Eggert <eggert@twinsun.com>
11898
11899 * lex.c (real_yylex): Treat `$' just like `_', except issue a
11900 diagnostic if !dollars_in_ident or if pedantic.
11901
11902 * lang-specs.h (@c++): -ansi no longer implies -$.
11903
11904 * decl2.c (lang_decode_option):
11905 -traditional and -ansi now do not mess with
11906 dollars_in_ident.
11907
11908 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
11909
11910 * Makefile.in (parse.o, decl.o): Also depend on
11911 $(srcdir)/../except.h $(srcdir)/../output.h.
11912 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
11913 $(srcdir)/../except.h $(srcdir)/../output.h.
11914 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
11915 ../insn-codes.h.
11916
11917 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
11918
11919 * expr.c (cplus_expand_expr): Make it static.
11920
11921 * decl2.c, init.c, typeck.c: Include "expr.h".
11922 (expand_expr): Use proper values when calling the function.
11923
11924 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
11925
11926 * lang-options.h: New -Wold-style-cast flag.
11927 * cp-tree.h (warn_old_style_cast): New variable.
11928 * decl2.c (warn_old_style_cast): Likewise.
11929 (lang_decode_option): Support -Wold-style-cast.
11930 (reparse_absdcl_as_casts): Produce old-style-cast warning.
11931
11932 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11933
11934 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
11935 TREE_USED, reset value based on already_used.
11936
11937 * init.c (expand_member_init): Revert change.
11938
11939 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
11940
11941 * cp-tree.h, decl.c, decl2.c, pt.c:
11942 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
11943
11944 * decl2.c (lang_decode_option): Add missing ;.
11945
11946 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11947
11948 * friend.c (do_friend): Disable injection for all template-derived
11949 decls.
11950 * decl2.c (lang_decode_option): Handle -fguiding-decls.
11951 * parse.y (notype_template_declarator): New nonterminal.
11952 (direct_notype_declarator): Use it.
11953 (complex_direct_notype_declarator): Likewise.
11954 (object_template_id): Accept any kind of identifier after TEMPLATE.
11955 (notype_qualified_id): Don't add template declarators here.
11956
11957 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
11958
11959 * call.c (add_template_candidate): Add explicit_targs parameter.
11960 (build_scoped_method_call): Use it.
11961 (build_overload_call_real): Likewise.
11962 (build_user_type_conversion_1): Likewise.
11963 (build_new_function_call): Likewise.
11964 (build_object_call): Likewise.
11965 (build_new_op): Likewise.
11966 (build_new_method_call): Likewise.
11967 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
11968 (build_new_method_call): Likewise.
11969
11970 * class.c (finish_struct_methods): Add specialization pass to
11971 determine which methods were specializing which other methods.
11972 (instantiate_type): Handle TEMPLATE_ID_EXPR.
11973
11974 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
11975
11976 * cp-tree.h (name_mangling_version): New variable.
11977 (flag_guiding_decls): Likewise.
11978 (build_template_decl_overload): New function.
11979 (begin_specialization): Likewise.
11980 (reset_specialization): Likewise.
11981 (end_specialization): Likewise.
11982 (determine_explicit_specialization): Likewise.
11983 (check_explicit_specialization): Likewise.
11984 (lookup_template_function): Likewise.
11985 (fn_type_unification): Add explicit_targs parameter.
11986 (type_unification): Likewise.
11987
11988 * decl.c (duplicate_decls): Add smarts for explicit
11989 specializations.
11990 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
11991 specializations.
11992 (grokfndecl): Call check_explicit_specialization.
11993
11994 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
11995 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
11996 (check_classfn): Handle specializations.
11997
11998 * error.c (dump_function_name): Print specialization arguments.
11999
12000 * friend.c (do_friend): Don't call pushdecl for template
12001 instantiations.
12002
12003 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12004
12005 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12006 and -fno-guiding-decls.
12007
12008 * lex.c (identifier_type): Return PFUNCNAME for template function
12009 names.
12010
12011 * method.c (build_decl_overload_real): New function.
12012 (build_template_parm_names): New function.
12013 (build_overload_identifier): Use it.
12014 (build_underscore_int): New function.
12015 (build_overload_int): Use it. Add levels for template
12016 parameters.
12017 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
12018 (build_overload_nested_names): Handle template type parameters.
12019 (build_template_decl_overload): New function.
12020
12021 * parse.y (YYSTYPE): New ntype member.
12022 (nested_name_specifier): Use it.
12023 (nested_name_specifier_1): Likewise.
12024 (PFUNCNAME): New token.
12025 (template_id, object_template_id): New non-terminals.
12026 (template_parm_list): Note specializations.
12027 (template_def): Likewise.
12028 (structsp): Likewise.
12029 (fn.def2): Handle member template specializations.
12030 (component_decl_1): Likewise.
12031 (direct_notype_declarator): Handle template-ids.
12032 (component_decl_1): Likewise.
12033 (direct_notype_declarator): Handle template-ids.
12034 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12035
12036 * pt.c (processing_specializations): New variable.
12037 (template_header_count): Likewise.
12038 (type_unification_real): New function.
12039 (processing_explicit_specialization): Likewise.
12040 (note_template_header): Likewise.
12041 (is_member_template): Handle specializations.
12042 (end_template_decl): Call reset_specialization.
12043 (push_template_decl): Handle member template specializations.
12044 (tsubst): Likewise.
12045 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12046 (instantiate_template): Handle specializations.
12047 (instantiate_decl): Likewise.
12048 (fn_type_unification): Handle explicit_targs.
12049 (type_unification): Likewise. Allow incomplete unification
12050 without an error message, if allow_incomplete.
12051 (get_bindings): Use new calling sequence for fn_type_unification.
12052
12053 * spew.c (yylex): Handle PFUNCNAME.
12054
12055 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12056 (really_overloaded_fn): Likewise.
12057 (get_first_fn): Handle function templates.
12058
12059 * typeck.c (build_x_function_call): Use really_overloaded_fn.
12060 Handle TEMPLATE_ID_EXPR.
12061 (build_x_unary_op): Likewise.
12062 (build_unary_op): Likewise.
12063 (mark_addressable): Templates whose address is taken are marked
12064 as used.
12065
12066 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12067
12068 * decl.c (init_decl_processing): Declare __builtin_constant_p as
12069 accepting any kind of type, not only int.
12070
12071 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12072
12073 * search.c (get_matching_virtual): Notice virtual bases when sorrying
12074 about covariant returns.
12075
12076 * parse.y (member_init): Also imply typename here. Remove ancient
12077 extension for initializing base members.
12078
12079 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12080
12081 Handle multi-level typenames and implicit typename in base list.
12082 * parse.y (typename_sub{,[0-2]}): New rules.
12083 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12084 (nonnested_type): New rule.
12085 (complete_type_name): Use it.
12086 (base_class.1): Use typename_sub and nonnested_type.
12087 (nested_name_specifier): Don't elide std:: here.
12088 * decl.c (make_typename_type): Handle getting a type for NAME.
12089 (lookup_name_real): Turn std:: into :: here.
12090
12091 Rvalue conversions were removed in London.
12092 * call.c (is_subseq): Don't consider lvalue transformations.
12093 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12094 (joust): Re-enable ?: kludge.
12095
12096 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
12097
12098 * decl.c (start_function): Up warning of no return type to be a
12099 pedwarn.
12100
12101 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12102
12103 * init.c (expand_member_init): Don't set TREE_USED.
12104 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12105 set,don't clear TREE_USED wholesale.
12106
12107 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
12108
12109 * call.c (build_over_call): Do require_complete_type before
12110 build_cplus_new.
12111
12112 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12113
12114 * search.c (lookup_field): Call complete_type in all cases.
12115
12116 * decl.c (finish_function): Just warn about flowing off the end.
12117
12118 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12119
12120 * decl.c (grokparms): Don't bash a permanent list node if we're
12121 in a function.
12122
12123 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
12124
12125 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12126
12127 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12128
12129 * call.c (build_new_op): Give better error for syntactically
12130 correct, but semantically invalid, use of undeclared template.
12131
12132 * call.c (compare_qual): Handle pmfs.
12133
12134 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12135 after the exception spec.
12136
12137 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12138
12139 * call.c (null_ptr_cst_p): Integer type, not integral type.
12140
12141 * call.c (joust): Disable warnings until they can be moved to the
12142 right place.
12143
12144 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
12145
12146 * Makefile.in, config-lang.in: Convert to autoconf.
12147
12148 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12149
12150 * decl.c (lookup_name_real): Add implicit 'typename' to types from
12151 base classes.
12152
12153 * pt.c (most_specialized_class): Fix typo.
12154 (tsubst): Move constant folding to TREE_VEC case.
12155
12156 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
12157
12158 * pt.c (do_poplevel): Don't warn about unused local variables
12159 while processing_template_decl since we don't always know whether
12160 or not they will need constructing/destructing.
12161
12162 * pt.c (uses_template_parms): Check the values of an enumeration
12163 type to make sure they don't depend on template parms.
12164
12165 * decl.c (make_typename_type): Don't lookup the field if the
12166 context uses template parms, even if we're not
12167 processing_template_decl at the moment.
12168
12169 * pt.c (coerce_template_parms): Avoid looking at the
12170 TYPE_LANG_DECL portion of a typename type, since there won't be
12171 one.
12172 (tsubst): Do constant folding as necessary to make sure that
12173 arguments passed to lookup_template_class really are constants.
12174
12175 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12176
12177 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12178 * decl2.c (finish_file): Only register exception tables if we
12179 need to.
12180
12181 * decl.c (init_decl_processing): Add __builtin_[fs]p.
12182
12183 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12184
12185 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12186
12187 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
12188
12189 * error.c (dump_decl): Avoid crashing when presented with a
12190 uninitialized constant, as can occur with a template parameter.
12191 (dump_expr): Make sure that there are enough levels of
12192 current_template_parms before we start diving through them.
12193
12194 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
12195
12196 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12197 c-typeck.c.
12198
12199 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12200
12201 * except.c (expand_throw): Call build_delete for all
12202 exception types, not just objects with destructors.
12203
12204 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
12205
12206 * decl.c (current_local_enum): Remove static.
12207 * pt.c (tsubst_enum): Save and restore value of current_local_enum
12208 in case template is expanded in enum decl.
12209 (instantiate_class_template): Use new tsubst_enum signature.
12210 (tsubst_expr): Likewise.
12211
12212 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
12213
12214 * pt.c (begin_member_template_processing): Take a function as
12215 argument, not a set of template arguments. Use the template
12216 parameters, rather than the arguments. Handle non-type parameters
12217 correctly. Push a binding level for the parameters so that multiple
12218 member templates using the same parameter names can be declared.
12219 (end_member_template_processing): Pop the binding level.
12220 (push_template_decl): Mark member templates as static when
12221 appropriate.
12222
12223 * lex.c (do_pending_inlines): Pass the function, not its template
12224 arguments, to begin_member_template_processing.
12225 (process_next_inline): Likewise.
12226 (do_pending_defargs): Likewise.
12227
12228 * error.c (dump_expr): Obtain the correct declaration for a
12229 TEMPLATE_CONST_PARM.
12230
12231 * call.c (add_template_conv_candidate): New function.
12232 (build_object_call): Handle member templates, as done in the other
12233 build_ functions.
12234
12235 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
12236
12237 * decl.c (replace_defag): Undo previous change.
12238 * lex.c (do_pending_defargs): Deal with member templates.
12239
12240 * pt.c (is_member_template): Avoid crashing when passed a
12241 non-function argument.
12242
12243 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12244
12245 * class.c (grow_method): Remove check for redeclaration.
12246
12247 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
12248
12249 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
12250 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
12251 (PRIMARY_TEMPLATE_P): Use it.
12252 * call.c (build_overload_call_real): Use it.
12253 * class.c (instantiate_type): Likewise.
12254 * decl.c (decls_match): Likewise.
12255 * method.c (build_overload_identifier): Likewise.
12256 * pt.c (push_template_decl): Likewise.
12257 (classtype_mangled_name): Likewise.
12258 (lookup_template_class): Likewise.
12259
12260 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
12261 DECL_NTPARMS to conform to usage elsewhere.
12262 * call.c (add_template_candidate): Likewise.
12263 * class.c (instantiate_type): Likewise.
12264 * pt.c (instantiate_template): Likewise.
12265 (get_bindings): Likewise.
12266
12267 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
12268 is_member_template.
12269
12270 * pt.c (unify): Undo changes to allow multiple levels of template
12271 parameters.
12272 (type_unification): Likewise.
12273 (fn_type_unification): Likewise.
12274 (get_class_bindings): Likewise.
12275 * cp-tree.h (Likewise).
12276
12277 * decl.c (replace_defarg): Check that the type of the default
12278 parameter does not invlove a template type before complaining
12279 about the initialization.
12280
12281 * error.c (dump_expr): Deal with template constant parameters in
12282 member templates correctly.
12283
12284 * pt.c (is_member_template): Deal with class specializations
12285 correctly.
12286 (tsubst): Handle "partial instantiation" of member templates
12287 correctly.
12288
12289 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
12290
12291 * pt.c (type_unification): Change calling sequence to allow for
12292 multiple levels of template parameters.
12293 (tsubst_expr): Likewise.
12294 (tsubst): Likewise.
12295 (tsubst_copy): Likewise.
12296 (instantiate_template): Likewise.
12297 (unify): Likewise.
12298 * call.c (build_overload_call_real): Use it.
12299 (add_builtin_candidate): Use it.
12300 (build_new_method_call): Use it.
12301 * class.c (instantiate_type): Use it.
12302 * decl.c (grokdeclarator): Use it.
12303 * decl2.c (finish_file): Use it.
12304 * method.c (build_overload_identifier): Use it.
12305
12306 * call.c (add_template_candidate): Add additional parameter for
12307 the function return type. Call fn_type_unification istead of
12308 type_unification.
12309 (build_user_type_conversion_1): Handle member templates.
12310 (build_new_function_call): Likewise.
12311 (build_new_op): Likewise.
12312 (build_new_method_call): Likewise.
12313
12314 * class.c (grow_method): Don't give an error message indicating
12315 that two member templates with the same name are ambiguous.
12316 (finish_struct): Treat member template functions just like member
12317 functions.
12318
12319 * cp-tree.h (check_member_template): Add declaration.
12320 (begin_member_template_processing): Likewise.
12321 (end_member_template_processing): Likewise.
12322 (fn_type_unification): Likewise.
12323 (is_member_template): Likewise.
12324 (tsubst): Change prototype.
12325 (tsubst_expr): Likewise.
12326 (tsubst_copy): Likewise.
12327 (instantiate_template): Likewise.
12328 (get_bindings): Likewise.
12329
12330 * decl.c (decls_match): Handle multiple levels of template
12331 parameters.
12332 (pushdecl): Handle template type params just like other type
12333 declarations.
12334 (push_class_level_binding): Return immediately if the
12335 class_binding_level is NULL.
12336 (grokfndecl): If check_classfn() returns a member_template, use
12337 the result of the template, not the template itself.
12338
12339 * decl2.c (check_member_template): New function. Check to see
12340 that the entity declared to be a member template can be one.
12341 (check_classfn): Allow redeclaration of member template functions
12342 with different types; the new functions can be specializations or
12343 explicit instantiations.
12344
12345 * error.c (dump_decl): Handle multiple levels of template
12346 parameters.
12347 (dump_function_decl): Update to handle function templates.
12348
12349 * lex.c (do_pending_inlines): Set up template parameter context
12350 for member templates.
12351 (process_next_inline): Likewise.
12352
12353 * method.c (build_overload_identifier): Adjust for multiple levels
12354 of template parameters.
12355
12356 * parse.y (fn.def2): Add member templates.
12357 (component_decl_1): Likewise.
12358
12359 * pt.c (begin_member_template_processing): New function.
12360 (end_member_template_processing): Likewise.
12361 (is_member_template): Likewise.
12362 (fn_type_unification): Likewise.
12363 (current_template_parms): Return a vector of all the template
12364 parms, not just the innermost level of parms.
12365 (push_template_decl): Deal with the possibility of member
12366 templates.
12367 (lookup_template_class): Likewise.
12368 (uses_template_parms): Likewise.
12369 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
12370 TEMPLATE_CONST_PARM to deal with multiple levels of template
12371 arguments. Add processing of TEMPLATE_DECL to produce new
12372 TEMPLATE_DECLs from old ones.
12373 (do_decl_instantiation): Handle member templates.
12374
12375 * search.c (lookup_fnfields_1): Handle member template conversion
12376 operators.
12377
12378 * tree.c (cp_tree_equal): Check the levels, as well as the
12379 indices, of TEMPLATE_CONST_PARMs.
12380
12381 * typeck.c (comptypes): Check the levels, as well as the indices,
12382 fo TEMPLATE_TYPE_PARMs.
12383 (build_x_function_call): Treat member templates like member
12384 functions.
12385
12386 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12387
12388 * typeck.c (c_expand_return): Always convert_for_initialization
12389 before checking for returning a pointer to local.
12390
12391 * pt.c (type_unification): If strict and the function parm doesn't
12392 use template parms, just compare types.
12393
12394 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
12395
12396 * method.c (build_overloaded_value): Replace direct call
12397 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12398
12399 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12400
12401 * typeck.c (convert_arguments): Don't arbitrarily choose the first
12402 of a set of overloaded functions.
12403
12404 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12405
12406 * lex.c (real_yylex): Don't elide __FUNCTION__.
12407
12408 * method.c (build_overload_value): Add in_template parm.
12409 (build_overload_int): Likewise.
12410 (build_overload_identifier): Pass it.
12411
12412 * decl.c (duplicate_decls): Don't bash a previous template
12413 definition with a redeclaration.
12414
12415 * pt.c (unify): float doesn't match double.
12416
12417 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12418 TYPE_DECL. Handle getting non-template types.
12419 * parse.y (explicit_instantiation): Use typespec instead of
12420 aggr template_type.
12421
12422 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
12423
12424 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12425
12426 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
12427
12428 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12429 (compare_ics): Likewise.
12430
12431 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12432
12433 * call.c (joust): Warn about choosing one conversion op over
12434 another because of 'this' argument when the other return type is
12435 better.
12436 (source_type): New fn.
12437
12438 * call.c (build_new_op): Strip leading REF_BIND from first operand
12439 to builtin operator.
12440
12441 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12442 use its RTL.
12443
12444 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12445
12446 * call.c (null_ptr_cst_p): Remove support for (void*)0.
12447
12448 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
12449
12450 * typeck.c (expand_target_expr): Make definition match declaration.
12451
12452 * class.c (get_basefndecls): Make definition match declaration.
12453
12454 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
12455
12456 * input.c (sub_getch): Eventually give up and release the input file.
12457
12458 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12459 right place.
12460
12461 * call.c (joust): Tweak message.
12462
12463 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
12464
12465 * error.c (type_as_string): Put const/volatile on template type
12466 parameters where appropriate.
12467
12468 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
12469
12470 * call.c (strictly_better): Make arguments unsigned ints.
12471
12472 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
12473
12474 * lex.c (real_yylex): Refer to __complex instead of complex.
12475
12476 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
12477
12478 * lex.c (real_yylex): Don't use getc directly.
12479
12480 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12481
12482 * call.c (is_subseq): Don't try to be clever.
12483
12484 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12485
12486 * parse.y, pt.c: Include "except.h".
12487 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12488 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12489 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12490 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12491 prototyping.
12492
12493 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12494
12495 * decl2.c (mark_vtable_entries): Instead of replacing pure
12496 virtuals with a reference to __pure_virtual, copy the decl and
12497 change the RTL.
12498
12499 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12500
12501 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12502
12503 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12504
12505 * pt.c (instantiate_class_template): Call repo_template_used
12506 before finish_prevtable_vardecl.
12507
12508 * call.c (is_subseq): New fn.
12509 (compare_ics): Use it.
12510
12511 * repo.c (finish_repo): Don't crash on no args.
12512
12513 * parse.y (named_complex_class_head_sans_basetype): Handle
12514 explicit global scope.
12515 * decl2.c (handle_class_head): New fn.
12516
12517 * pt.c (unify): Add CONST_DECL case.
12518
12519 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12520
12521 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12522
12523 * cp-tree.h (report_type_mismatch): Add prototype.
12524 * call.c (build_overload_call_real): Remove erroneous fourth
12525 argument to report_type_mismatch.
12526 (build_user_type_conversion_1): Remove erroneous second arg to
12527 tourney.
12528 (build_new_function_call): Likewise.
12529 (build_object_call): Likewise.
12530 (build_new_op): Likewise.
12531 (build_new_method_call): Likewise.
12532
12533 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12534
12535 * error.c (dump_decl): Don't bother processing a function with no
12536 DECL_LANG_SPECIFIC.
12537
12538 * method.c (emit_thunk): Call init_function_start in the macro case.
12539
12540 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12541
12542 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12543 defined and used to set flag_vtable_thunks.
12544
12545 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12546
12547 * parse.y: Don't clear the inlines from their obstack until they've
12548 all been processed.
12549
12550 * decl.c (duplicate_decls): Don't complain about exception
12551 specification mismatch if flag_exceptions is off.
12552
12553 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
12554
12555 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12556
12557 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
12558
12559 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12560 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12561 Include <stdio.h> before include files that formerly used STDIO_PROTO.
12562
12563 * decl.c, g++spec.c, lex.c, method.c, repo.c:
12564 Include "config.h" first, as per autoconf manual.
12565
12566 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12567
12568 * decl.c (duplicate_decls): Tweak wording.
12569 * lex.c (do_pending_defargs): Don't die if we see a default arg
12570 that isn't a DEFAULT_ARG.
12571 * error.c (dump_expr): Handle DEFAULT_ARG.
12572
12573 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12574 * lang-options.h: Add -fhandle-exceptions.
12575
12576 * class.c (build_vtable): Vtables are artificial.
12577 (prepare_fresh_vtable): Likewise.
12578
12579 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12580
12581 * cvt.c (ocp_convert): After converting to the target type, set
12582 LOOKUP_NO_CONVERSION.
12583
12584 * call.c (joust): Warn about potentially confusing promotion rules
12585 with -Wsign-promo.
12586 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12587
12588 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
12589
12590 * exception.cc: Declare __terminate_func with noreturn attribute.
12591
12592 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
12593
12594 * parse.y: Break out eat_saved_input, handle errors.
12595 (function_try_block): Use compstmt instead of compstmt_or_error.
12596
12597 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12598
12599 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12600
12601 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12602
12603 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12604 existence of cc1plus check whether $(LANGUAGES) contains C++.
12605
12606 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12607
12608 * method.c (do_build_copy_constructor): When copying an anonymous
12609 union member loop around to handle nested anonymous unions. Use
12610 the offset of the member relative to the outer structure, not the
12611 union.
12612
12613 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12614
12615 * call.c (resolve_args): New fn.
12616 (build_new_function_call): Use it.
12617 (build_object_call): Likewise.
12618 (build_new_method_call): Likewise.
12619
12620 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12621
12622 * call.c (build_over_call): tsubst all default parms from templates.
12623
12624 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12625
12626 * decl.c (struct cp_function): Add static_labelno.
12627 (push_cp_function_context): Save it.
12628 (pop_cp_function_context): Restore it.
12629
12630 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12631
12632 * typeck.c (build_component_ref_1): Convert from reference.
12633
12634 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12635
12636 * parse.y (current_declspecs, prefix_attributes): Initialize to
12637 NULL_TREE.
12638
12639 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12640 before we try to force it to be a TREE_LIST.
12641 (decl): Make sure $1.t is non-nil.
12642
12643 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12644
12645 * pt.c (uses_template_parms): Handle template first-parse codes.
12646
12647 * decl.c (cp_finish_decl): Only warn about user-defined statics.
12648
12649 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12650
12651 * pt.c (unify): Handle BOOLEAN_TYPE.
12652
12653 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12654 * pt.c (tsubst): Don't set it.
12655 * call.c (build_over_call): Use uses_template_parms.
12656
12657 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12658
12659 * method.c (build_overload_nested_name): Use static_labelno
12660 instead of var_labelno.
12661 (build_qualified_name): New fn.
12662 (build_overload_name): Split out from here.
12663 (build_static_name): Use build_qualified_name.
12664 * decl.c (cp_finish_decl): Statics in extern inline functions
12665 have comdat linkage.
12666 (start_function): Initialize static_labelno.
12667
12668 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12669
12670 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12671 before "all member functions in class [] are private".
12672
12673 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12674
12675 * lex.c (do_scoped_id): convert_from_reference.
12676 * init.c (build_offset_ref): Likewise.
12677
12678 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12679
12680 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12681
12682 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12683
12684 * typeck.c (get_member_function_from_ptrfunc): Promote index
12685 before saving it.
12686
12687 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12688
12689 * tree.c (layout_basetypes): Move non-virtual destructor warning.
12690 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12691
12692 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12693
12694 * decl.c (grokdeclarator): Call add_defarg_fn for the function
12695 type, too.
12696 * lex.c (add_defarg_fn): Adjust.
12697 (do_pending_defargs): Adjust. Don't skip the first parm.
12698
12699 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12700
12701 * decl.c (build_enumerator): Global enumerators are also readonly.
12702
12703 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12704 (build_dynamic_cast): Call it and convert_from_reference.
12705
12706 * lex.c (add_defarg_fn): New fn.
12707 (snarf_defarg): Don't add to defarg_types.
12708 (do_pending_defargs): Lose defarg_types. All fns we process now
12709 have defargs.
12710 * decl.c (grokfndecl): Call add_defarg_fn.
12711
12712 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12713 * cp-tree.def: Add DEFAULT_ARG.
12714 * spew.c (yylex): Call snarf_defarg as appropriate.
12715 * parse.y: New tokens DEFARG and DEFARG_MARKER.
12716 (defarg_again, pending_defargs, defarg, defarg1): New rules.
12717 (structsp): Use pending_defargs.
12718 (parms, full_parm): Use defarg.
12719 * lex.c (init_lex): Initialize inline_text_firstobj.
12720 (do_pending_inlines): Never pass the obstack to feed_input.
12721 (process_next_inline): Call end_input instead of restore_pending_input.
12722 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12723 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12724 * input.c (end_input): New fn.
12725 (sub_getch): At the end of some fed input, just keep returning EOF
12726 until someone calls end_input.
12727 Remove 'obstack' field from struct input_source.
12728 * decl.c (grokparms): Handle DEFAULT_ARG.
12729 (replace_defarg): New fn.
12730 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12731
12732 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12733
12734 * call.c (implicit_conversion): If nothing else works, try binding
12735 an rvalue to a reference.
12736
12737 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
12738
12739 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12740 ifndef for Cygwin32 to include SIGSEGV.
12741
12742 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12743
12744 * class.c (finish_struct_1): Only complain about pointers without
12745 copy stuff if there are any constructors.
12746
12747 * rtti.c (build_dynamic_cast): Call complete_type on the types.
12748
12749 * decl.c (grokfndecl): If the function we chose doesn't actually
12750 match, die.
12751
12752 * decl2.c (grokclassfn): Don't specify 'const int' for the
12753 artificial destructor parm.
12754
12755 * pt.c (type_unification): If we are called recursively, nothing
12756 decays.
12757
12758 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
12759
12760 * decl.c (init_decl_processing): Stop trying to catch signals
12761 other than SIGABRT since the Cygwin32 library doesn't support
12762 them correctly yet. This fixes a situation in which g++ causes
12763 a hang on SIGSEGVs and other such signals in our Win32-hosted
12764 tools.
12765
12766 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
12767
12768 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
12769
12770 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12771
12772 * typeck2.c (store_init_value): Always return the value if our
12773 type needs constructing.
12774
12775 * method.c (hack_identifier): Convert class statics from
12776 reference, too.
12777
12778 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12779
12780 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
12781
12782 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
12783
12784 * typeck.c (c_expand_return): Make sure we clean up temporaries at
12785 the end of return x;
12786
12787 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12788
12789 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
12790
12791 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
12792
12793 * except.c (expand_builtin_throw): Add support
12794 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
12795
12796 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12797
12798 * repo.c (extract_string): Null-terminate.
12799
12800 * cp-tree.h (TI_SPEC_INFO): New macro.
12801 (CLASSTYPE_TI_SPEC_INFO): New macro.
12802 * pt.c (push_template_decl): Correctly determine # of template parms
12803 for partial specs.
12804
12805 * call.c (compare_ics): Really fix 'this' conversions.
12806
12807 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
12808 non-template fn.
12809
12810 * pt.c (push_template_decl): Complain about mismatch in # of
12811 template parms between a class template and a member template.
12812
12813 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
12814
12815 * method.c (synthesize_method): You can't call
12816 function_cannot_inline_p after finish_function.
12817 * decl.c (finish_function): Turn on flag_inline_functions and turn
12818 off DECL_INLINE before handing a synthesized method to the
12819 backend.
12820
12821 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12822
12823 * method.c (synthesize_method): Remove July 30 change to never set
12824 DECL_INLINE if at_eof.
12825
12826 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
12827
12828 * xref.c (GNU_xref_member): Ensure that the node has a
12829 decl_lang_specific part before checking DECL_FRIEND_P.
12830
12831 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12832
12833 * pt.c (instantiate_class_template): Diagnose non-class types used
12834 as bases.
12835
12836 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12837
12838 * typeck.c (build_conditional_expr): Use convert_for_initialization
12839 instead of convert_and_check.
12840
12841 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12842
12843 * parse.y (typespec): Don't pedwarn for typeof.
12844
12845 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
12846
12847 * repo.c (finish_repo): Only check changes if we would write a
12848 repo file.
12849
12850 * call.c (compare_ics): Fix handling of 'this' conversions.
12851
12852 * pt.c (do_decl_instantiation): Support static data too. Rename
12853 from do_function_instantiation.
12854 * cp-tree.h: Adjust.
12855 * parse.y: Adjust.
12856
12857 * repo.c (extract_string): New fn.
12858 (get_base_filename): Use it.
12859 (init_repo): Compare old args with current args.
12860
12861 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
12862
12863 * Makefile.in, Make-lang.in: Protect C-ls with a comment
12864 character, idea from Paul Eggert <eggert@twinsun.com>.
12865
12866 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
12867
12868 * typeck.c (c_expand_return): Be more persistent in looking for
12869 returned temps.
12870
12871 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
12872 pointer to reference.
12873
12874 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
12875
12876 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12877
12878 * init.c (build_member_call, build_offset_ref):
12879 Use do_scoped_id instead of do_identifier.
12880
12881 * cvt.c (convert): Remove bogosity.
12882
12883 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12884
12885 * cvt.c (build_up_reference): Do checks of ARGTYPE and
12886 TARGET_TYPE before trying to use get_binfo.
12887
12888 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
12889
12890 * cvt.c (build_up_reference): Call get_binfo to get access control.
12891
12892 * decl2.c (import_export_decl): If we don't support weaks, leave
12893 statics undefined.
12894
12895 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
12896
12897 * except.c (expand_builtin_throw): Add support for machines that
12898 cannot access globals after throw's epilogue when
12899 -fno-sjlj-exceptions is used.
12900
12901 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
12902
12903 * parse.y: 'std::' becomes '::'.
12904 * lex.c (real_yylex): Remove 'namespace' warning.
12905 * init.c (build_member_call): Ignore 'std::'.
12906 (build_offset_ref): Likewise.
12907 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
12908 (do_toplevel_using_decl): Ignore 'using std::whatever'.
12909 * decl.c (push_namespace): Just sorry.
12910 (pop_namespace): Nop.
12911 (init_decl_processing): Declare std namespace.
12912
12913 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12914
12915 * search.c (push_class_decls): A name which ambiguously refers to
12916 several instantiations of the same template just refers to the
12917 template.
12918
12919 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
12920
12921 * decl.c (build_enumerator): Fix problem with unsigned long
12922 enumerated values being smashed to ints, causing overflow
12923 when computing next enumerated value (for enum values around
12924 MAX_VAL).
12925
12926 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12927
12928 * typeck.c (build_component_ref): Only call mark_used on a decl.
12929
12930 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12931
12932 * typeck.c (build_c_cast): Make the check for a ptr to function
12933 more specific before possible default_conversion call.
12934
12935 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
12936
12937 * except.c (expand_exception_blocks): Simplify and fix and make
12938 sure we don't end a region in a sequence, as expand_end_bindings
12939 doesn't like it.
12940
12941 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
12942
12943 * except.c (init_exception_processing): Mark terminate as not
12944 returning so that the optimizer can optimize better.
12945
12946 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
12947
12948 * cvt.c (convert): Don't do any extra work, if we can avoid it
12949 easily.
12950
12951 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
12952
12953 * *.[chy]: Change cp_convert to ocp_convert, change convert to
12954 cp_convert. convert is now reserved for the backend, and doesn't
12955 have the semantics a frontend person should ever want.
12956
12957 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
12958
12959 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
12960 Lose -traditional support.
12961
12962 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
12963
12964 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
12965
12966 * parse.y (self_reference): Do it for templates, too.
12967 * class.c (pushclass): Don't overload_template_name; the alias
12968 generated by build_self_reference serves the same purpose.
12969
12970 * tree.c (list_hash): Make static, take more args.
12971 (list_hash_lookup): Likewise.
12972 (list_hash_add): Make static.
12973 (list_hash_canon): Lose.
12974 (hash_tree_cons): Only build a new node if one isn't already in the
12975 hashtable.
12976 (hash_tree_chain): Use hash_tree_cons.
12977 * cp-tree.h: Adjust.
12978 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
12979 of calling lookup_name.
12980
12981 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
12982
12983 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
12984 doesn't refer to the CONST_DECLs.
12985
12986 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
12987
12988 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
12989 is bigger.
12990 (expand_class_desc): Convert the last argument to a sizetype.
12991
12992 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12993
12994 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
12995 __real__): Add reswords.
12996 * hash.h: Regenerate.
12997 * lex.h (rid): Add RID_COMPLEX.
12998 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
12999 * lex.c (init_lex): Add building of RID_COMPLEX.
13000 (real_yylex): General cleanup in line with what c-lex.c also has,
13001 sans the cruft for traditional; add handling of SPEC_IMAG, complex
13002 types, and imaginary numeric constants.
13003 * parse.y (REALPART, IMAGPART): Add tokens.
13004 (unary_expr): Add REALPART and IMAGPART rules.
13005 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13006 * decl.c (complex_{integer,float,double,long}_type_node): Define
13007 types.
13008 (init_decl_processing): Set up the types.
13009 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
13010 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13011 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13012 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13013 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13014 COMPLEX_TYPE case.
13015 * method.c (build_overload_name): Add handling of the different
13016 COMPLEX_TYPEs, prefixing them with `J'.
13017 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13018 as a template parm.
13019 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13020 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13021 (mapcar): Handle COMPLEX_CST.
13022 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13023 (common_type): Add code for complex types.
13024 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13025 (convert_for_assignment): Likewise.
13026 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13027
13028 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13029
13030 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13031 tsubst_expr, as it might try to do overload resolution.
13032
13033 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13034
13035 * pt.c (instantiate_class_template): Oops.
13036
13037 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13038
13039 * cp-tree.def: Add TAG_DEFN.
13040 * pt.c (tsubst_enum): New fn.
13041 (instantiate_class_template): Use it.
13042 (tsubst_expr): Support TAG_DEFN.
13043 (tsubst): Support local enums.
13044 (tsubst_copy): Likewise.
13045 * decl.c (finish_enum): Likewise.
13046 (start_enum): If this is a local enum, switch to permanent_obstack.
13047
13048 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
13049
13050 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13051 (finish_function): Put the base init code for constructors just
13052 after the parm cleanup insns.
13053 (struct cp_function): Add last_parm_cleanup_insn.
13054 (push_cp_function_context): Likewise.
13055 (pop_cp_function_context): Likewise.
13056
13057 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13058
13059 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13060
13061 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13062
13063 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13064 for THUNK_FNDECL before we switch to temporary allocation.
13065
13066 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13067
13068 * call.c (build_new_op): Handle null arg2 for ?:.
13069
13070 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
13071
13072 * except.c (expand_exception_blocks): Ensure that we flow through
13073 the end of the exception region for the exception specification.
13074 Move exception region for the exception specification in, so that
13075 it doesn't protect the parm cleanup. Remove some obsolete code.
13076 * decl.c (store_parm_decls): Likewise.
13077 (finish_function): Likewise.
13078
13079 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13080
13081 * init.c (build_new): Fix nothrow handling.
13082
13083 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13084
13085 * init.c (emit_base_init): Don't warn about the initialization
13086 list for an artificial member.
13087
13088 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13089
13090 * expr.c (do_case): Handle !START case for the error msg.
13091
13092 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13093
13094 * decl2.c, lang-options.h: New option -Weffc++.
13095 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13096 to -Weffc++.
13097
13098 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13099 to MULTIPLE_SYMBOL_SPACES.
13100
13101 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13102
13103 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13104
13105 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13106
13107 * typeck.c (c_expand_return): Don't complain about returning void
13108 to void in an artificial function.
13109 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13110 don't set DECL_RESULT, set DECL_ARTIFICIAL.
13111 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13112
13113 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
13114
13115 * init.c (init_decl_processing): Add support for setjmp/longjmp based
13116 exception handling.
13117 * except.c (init_exception_processing): Likewise.
13118 (expand_end_catch_block): Likewise.
13119 (expand_exception_blocks): Likewise.
13120 (expand_throw): Likewise.
13121 * exception.cc (__default_terminate): Likewise.
13122
13123 * init.c (perform_member_init): Use new method of expr level
13124 cleanups, instead of cleanups_this_call and friends.
13125 (emit_base_init): Likewise.
13126 (expand_aggr_vbase_init_1): Likewise.
13127 (expand_vec_init): Likewise.
13128 * decl.c (cp_finish_decl): Likewise.
13129 (expand_static_init): Likewise.
13130 (store_parm_decls): Likewise.
13131 (cplus_expand_expr_stmt): Likewise.
13132 * decl2.c (finish_file): Likewise.
13133
13134 * Make-lang.in (exception.o): Ok to compile with -O now.
13135
13136 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13137 we know it will be done later by the backend.
13138
13139 * decl2.c (lang_f_options): Remove support for short temps.
13140 * lang-options.h: Likewise.
13141
13142 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13143
13144 * tree.c (varargs_function_p): New fn.
13145 * method.c (emit_thunk): Replace broken generic code with code to
13146 generate a heavyweight thunk function.
13147
13148 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
13149
13150 * pt.c (process_template_parm): pedwarn about floating-point parms.
13151
13152 * decl.c (grokdeclarator): inline no longer implies static.
13153
13154 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13155
13156 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13157
13158 * class.c (check_for_override): The signature of an overriding
13159 function is not changed.
13160
13161 * call.c (build_over_call): Move setting of conv into the loop.
13162 Note: this change, along with the related changes of the 18th thru
13163 the 20th of April, fix an infinite loop problem in conversions.
13164
13165 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13166
13167 * call.c (build_user_type_conversion_1): Really ignore rvalue
13168 conversions when looking for a REFERENCE_TYPE.
13169
13170 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13171 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13172 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13173 (build_unary_op): Likewise.
13174 * call.c (build_over_call): See through a CONVERT_EXPR around the
13175 ADDR_EXPR for on a temporary.
13176 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13177 the ADDR_EXPR for a local variable.
13178
13179 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
13180
13181 * call.c (build_user_type_conversion_1): If we're trying to
13182 convert to a REFERENCE_TYPE, only consider lvalue conversions.
13183 (build_new_function_call): Print candidates.
13184 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13185 (reference_binding): Binding a temporary of a reference-related type
13186 is BAD.
13187
13188 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13189
13190 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13191 * tinfo2.cc (type_info::before): Likewise.
13192
13193 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
13194
13195 * call.c (implicit_conversion): Oops.
13196
13197 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13198
13199 * call.c (implicit_conversion): Try to find a reference conversion
13200 before binding a const reference to a temporary.
13201
13202 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
13203
13204 * exception.cc (__default_unexpected): Call terminate by default,
13205 so that if the user overrides terminate, the correct function will
13206 be called.
13207
13208 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
13209
13210 * parse.y (left_curly): Avoid trying to use any fields of
13211 error_mark_node, as there aren't any.
13212
13213 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13214
13215 * lex.c (do_identifier): Avoid breaking on overloaded methods
13216 as default arguments.
13217
13218 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
13219
13220 * call.c (add_template_candidate): Initialize the variable "dummy".
13221
13222 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
13223
13224 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
13225 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
13226
13227 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13228
13229 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
13230 (debug_binfo): Delete decl, not needed.
13231
13232 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
13233 promotes_to_aggr_type): Delete fns.
13234 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
13235 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
13236 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
13237
13238 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
13239
13240 * friend.c (is_friend_type): Delete fn.
13241 * cp-tree.h (is_friend_type): Delete decl.
13242
13243 * decl.c (original_result_rtx, double_ftype_double,
13244 double_ftype_double_double, int_ftype_int, long_ftype_long,
13245 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
13246 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
13247
13248 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
13249 fwd decls.
13250 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
13251
13252 * decl.c (pushdecl_nonclass_level): #if 0, unused.
13253 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
13254
13255 * lex.c (reinit_lang_specific): #if 0, unused.
13256 * cp-tree.h (reinit_lang_specific): #if 0 decl.
13257
13258 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
13259 * cp-tree.h (revert_static_member_fn): Delete decl.
13260
13261 * class.c (root_lang_context_p): Delete fn.
13262 * cp-tree.h (root_lang_context_p): Delete decl.
13263
13264 * decl.c (set_current_level_tags_transparency): #if 0, unused.
13265 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
13266
13267 * lex.c (set_vardecl_interface_info): Make static.
13268 * cp-tree.h (set_vardecl_interface_info): Delete decl.
13269
13270 * call.c (find_scoped_type): Make static.
13271 * cp-tree.h (find_scoped_type): Delete decl.
13272
13273 * search.c (convert_pointer_to_vbase): Make static.
13274 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
13275
13276 * decl.c (const_ptr_type_node): Likewise.
13277 * cp-tree.h (const_ptr_type_node): Delete decl.
13278
13279 * typeck.c (common_base_type): Make static.
13280 * cp-tree.h (common_base_types): Delete erroneous decl.
13281
13282 * pt.c (classtype_mangled_name): Make static.
13283 * cp-tree.h (classtype_mangled_name): Delete decl.
13284
13285 * lex.c (check_newline): Make static.
13286 * cp-tree.h (check_newline): Delete decl.
13287
13288 * typeck.c (build_x_array_ref): Delete fn, same idea as
13289 grok_array_decl.
13290 * cp-tree.h (build_x_array_ref): Delete decl.
13291
13292 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
13293 copy_lang_decl.
13294 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
13295
13296 * class.c (build_vtable_entry): Make static.
13297 * cp-tree.h (build_vtable_entry): Delete decl.
13298
13299 * class.c (build_vbase_pointer): Make static.
13300 * cp-tree.h (build_vbase_pointer): Delete decl.
13301
13302 * sig.c (build_sptr_ref): Add forward decl and make static.
13303 * cp-tree.h (build_sptr_ref): Delete decl.
13304
13305 * call.c (build_new_method_call): Add forward decl and make static.
13306 * cp-tree.h (build_new_method_call): Delete decl.
13307
13308 * call.c (build_object_call): Make static.
13309 * class.c (check_for_override, complete_type_p, mark_overriders):
13310 Likewise.
13311 * decl.c (cp_function_chain): Likewise.
13312 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
13313 Likewise.
13314 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
13315 Likewise.
13316 * tree.c (build_cplus_array_type_1): Likewise.
13317 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
13318 (comp_target_parms): Likewise.
13319
13320 * init.c (build_builtin_call): Make static.
13321 * cp-tree.h (build_builtin_call): Delete decl.
13322
13323 * typeck.c (binary_op_error): Delete decl.
13324 * cp-tree.h (binary_op_error): Likewise.
13325
13326 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13327
13328 * call.c (build_method_call): Compare against error_mark_node
13329 directly, rather than the ERROR_MARK tree code.
13330 * cvt.c (cp_convert): Likewise.
13331 * decl.c (print_binding_level): Likewise.
13332 (duplicate_decls): Likewise.
13333 (grokdeclarator): Likewise.
13334 (grokdeclarator): Likewise.
13335 * init.c (expand_aggr_init_1): Likewise.
13336 (decl_constant_value): Likewise.
13337 * method.c (build_opfncall): Likewise.
13338 (hack_identifier): Likewise.
13339 * typeck.c (build_modify_expr): Likewise.
13340
13341 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
13342
13343 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13344
13345 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
13346
13347 * pt.c (coerce_template_parms): Add new error message.
13348
13349 * method.c (build_overload_value): Implement name mangling for
13350 floating-point template arguments.
13351
13352 * method.c (build_overload_int, icat, dicat): Fix mangling of template
13353 arguments whose absolute value doesn't fit in a signed word.
13354
13355 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13356
13357 * friend.c: New file; put all of the friend stuff in here.
13358 * init.c: Instead of here.
13359 * Makefile.in (CXX_OBJS): Add friend.o.
13360 (friend.o): Add dependencies.
13361 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
13362
13363 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13364
13365 * call.c (build_scoped_method_call): Complain if the scope isn't a
13366 base.
13367
13368 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13369
13370 * parse.y (left_curly): Don't crash on erroneous type.
13371
13372 * init.c (build_delete): Fix type of ref.
13373
13374 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13375
13376 * search.c (get_vbase_1): Renamed from get_vbase.
13377 (get_vbase): Wrapper, now non-static.
13378 (convert_pointer_to_vbase): Now static.
13379
13380 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
13381 * init.c (build_delete): Pass one.
13382 (build_partial_cleanup_for): Use build_scoped_method_call.
13383 * decl.c (finish_function): Pass a binfo.
13384
13385 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13386
13387 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13388
13389 * typeck.c (build_c_cast): Lose other reference to flag.
13390
13391 * call.c (build_field_call): Don't look for [cd]tor_identifier.
13392 * decl2.c (delete_sanity): Remove meaningless use of
13393 LOOKUP_HAS_IN_CHARGE.
13394 * decl.c (finish_function): Use build_scoped_method_call instead
13395 of build_delete for running vbase dtors.
13396 * init.c (build_delete): Call overload resolution code instead of
13397 duplicating it badly.
13398
13399 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13400
13401 * call.c (build_over_call): Call mark_used before trying to elide
13402 the call.
13403
13404 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13405
13406 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13407
13408 * typeck.c (build_modify_expr): Always pedwarn for a cast to
13409 non-reference used as an lvalue.
13410
13411 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13412
13413 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13414
13415 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13416
13417 * parse.y (handler): Fix template typo.
13418
13419 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13420
13421 * error.c (lang_decl_name): New fn.
13422 * tree.c (lang_printable_name): Use it.
13423
13424 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
13425
13426 * g++spec.c: Include config.h so that we can catch bzero #defines
13427 from the config file.
13428
13429 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
13430
13431 * new1.cc: Include a declaration for malloc, to avoid warning, and
13432 avoid lossing on systems that require one (ones that define malloc
13433 in xm.h).
13434
13435 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13436
13437 * decl2.c (max_tinst_depth): New variable.
13438 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13439 option.
13440 * pt.c (max_tinst_depth): Variable moved.
13441 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13442 as legal.
13443
13444 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13445
13446 * decl.c (xref_basetypes): Allow a base class that depends on
13447 template parms to be incomplete.
13448
13449 * decl2.c (build_expr_from_tree): Support typeid(type).
13450 * rtti.c (get_typeid): Support templates.
13451 (expand_si_desc, expand_class_desc): Fix string length.
13452 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13453
13454 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13455
13456 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13457
13458 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13459
13460 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13461
13462 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13463 smashes together template and non-template decls of the same
13464 signature.
13465
13466 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13467
13468 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13469
13470 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13471
13472 * decl.c (duplicate_decls): Next route, pedwarn about different
13473 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13474
13475 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13476
13477 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13478 (struct lang_type): Delete has_default_implementation member.
13479 Increase dummy to 21.
13480 * decl.c (start_method): Delete usage.
13481
13482 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13483 store_after_parms, start_decl_1, auto_function): Add decls.
13484 (get_arglist_len_in_bytes, declare_implicit_exception,
13485 have_exceptions_p, make_type_decl, typedecl_for_tag,
13486 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13487 build_component_type_expr, cplus_exception_name,
13488 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13489 * call.c (build_this): Make static.
13490 (is_complete): Likewise.
13491 (implicit_conversion): Likewise.
13492 (reference_binding): Likewise.
13493 (standard_conversion): Likewise.
13494 (strip_top_quals): Likewise.
13495 (non_reference): Likewise.
13496 (build_conv): Likewise.
13497 (user_harshness): Likewise.
13498 (rank_for_ideal): Likewise.
13499 * decl.c (start_decl_1): Delete forward decl.
13500 (push_decl_level): Make static.
13501 (resume_binding_level): Make static.
13502 (namespace_bindings_p): Make static.
13503 (declare_namespace_level): Make static.
13504 (lookup_name_real): Make static.
13505 (duplicate_decls): Make static. Take register off NEWDECL and
13506 OLDDECL parm decls.
13507 * decl2.c (get_sentry): Make static.
13508 (temp_name_p): Delete fn.
13509 * except.c (auto_function): Delete decl.
13510 * lex.c (handle_{cp,sysv}_pragma): Make static.
13511 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13512 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13513 * pt.c (tsubst_expr_values): Make static.
13514 * rtti.c (combine_strings): Delete decl.
13515
13516 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13517
13518 * pt.c (push_template_decl): Handle getting a typedef.
13519
13520 * call.c (build_new_function_call): Complain about void arg.
13521
13522 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13523
13524 * decl.c (duplicate_decls): Give pedwarn of different exceptions
13525 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13526
13527 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
13528
13529 * except.c (expand_throw): Don't expand the cleanup tree here,
13530 since we are not going to write the rtl out. Fixes problem with
13531 -g -O on SPARC.
13532
13533 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
13534
13535 * Make-lang.in: Add $(exeext) as necessary.
13536
13537 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
13538
13539 * parse.y (handler_seq): Must have at least one catch clause.
13540
13541 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13542
13543 * call.c (add_builtin_candidate): Restore ?: hack.
13544
13545 * decl.c (grok_op_properties): More warnings.
13546
13547 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13548
13549 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13550 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13551
13552 * decl.c (duplicate_decls): Scale back to a warning, and only do
13553 'em if -pedantic.
13554
13555 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
13556
13557 * decl.c (duplicate_decls): pedwarn mismatched exception
13558 specifications.
13559
13560 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
13561
13562 * call.c (build_new_method_call): Don't display the invisible
13563 argument for controlling virtual bases.
13564
13565 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
13566
13567 * new: Add nothrow new and delete, bad_alloc and throw specifications
13568 for delete.
13569 * decl.c (init_decl_processing): Add throw specification for delete.
13570 * new.cc (nothrow): Define.
13571 * lex.c (real_yylex): Removing warning that throw and friends are
13572 keywords.
13573 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13574 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13575 * Make-lang.in: Add new{1,2}.{cc,o}.
13576
13577 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13578
13579 * lex.c (cons_up_default_function): Fix return type of synth op=.
13580
13581 * init.c (emit_base_init): Add warnings for uninitialized members
13582 and bases.
13583
13584 * decl.c (xref_basetypes): Add warning for non-polymorphic type
13585 with destructor used as base type.
13586
13587 * decl.c (grok_op_properties): Add warning for op= returning void.
13588 * typeck.c (c_expand_return): Add warning for op= returning anything
13589 other than *this.
13590
13591 * class.c (finish_struct_1): Add warning for class with pointers
13592 but not copy ctor or copy op=.
13593
13594 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13595 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13596 (instantiate_template): If -fexternal-templates, add this
13597 instantiation to pending_templates.
13598
13599 * decl2.c (copy_assignment_arg_p): Disable old hack to support
13600 Booch components.
13601
13602 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
13603
13604 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13605
13606 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
13607
13608 * call.c (standard_conversion): Handle getting references. Tack
13609 on RVALUE_CONV here. Do it for non-class types, too.
13610 (reference_binding): Pass references to standard_conversion.
13611 (implicit_conversion): Likewise.
13612 (add_builtin_candidate): Disable one ?: kludge.
13613 (convert_like): Handle RVALUE_CONVs for non-class types.
13614 (joust): Disable the other ?: kludge.
13615
13616 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13617
13618 * decl.c (init_decl_processing): Add code to build up common
13619 function types beforehand, to avoid creation then removal of
13620 things already in the hash table.
13621
13622 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13623
13624 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13625 the arguments.
13626
13627 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13628 current_template_parms.
13629
13630 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
13631
13632 * search.c (lookup_field): Don't return a function, check want_type.
13633
13634 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13635
13636 * init.c (build_new): Make sure PLACEMENT has a type.
13637
13638 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13639
13640 * init.c (build_new): Support new (nothrow).
13641
13642 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13643
13644 * pt.c (instantiate_decl): Also do push_to_top_level before setting
13645 up DECL_INITIAL.
13646
13647 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13648 * pt.c (tsubst): Defer instantiation of default args.
13649 * call.c (build_over_call): Until here.
13650
13651 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13652
13653 * search.c (lookup_field): Make sure we have an
13654 IDENTIFIER_CLASS_VALUE before we try to return it.
13655
13656 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13657
13658 * call.c (build_method_call): Delete unused var PARM.
13659 (build_overload_call_real): Likewise.
13660 (build_object_call): Delete unused var P.
13661 (build_new_op): Likewise.
13662 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13663 var definitions, which are never used.
13664 (shadow_tag): Delete unused var FN.
13665 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13666 * init.c (build_new): Delete unused var ALLOC_TEMP.
13667 * method.c (hack_identifier): Delete unused var CONTEXT.
13668 (do_build_copy_constructor): Delete unused var NAME.
13669 (synthesize_method): Delete unused var BASE.
13670 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13671 * rtti.c (build_headof): Delete unused var VPTR.
13672 (get_typeid): Delete unused var T.
13673 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13674 and ORIG_OP2.
13675 (build_ptrmemfunc): Delete unused vars U and NINDEX.
13676 * typeck2.c (build_functional_cast): Delete unused var BINFO.
13677
13678 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13679
13680 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13681 things in a type being defined.
13682 * decl.c (finish_enum): Reverse the values so that they are in
13683 the correct order.
13684
13685 * pt.c (instantiate_class_template): Don't initialize
13686 BINFO_BASETYPES until the vector is filled out.
13687 (unify): Don't abort on conflicting bindings, just fail.
13688 (instantiate_decl): Do push_tinst_level before any tsubsting.
13689
13690 * method.c (build_overload_value): Handle getting a
13691 TEMPLATE_CONST_PARM for a pointer.
13692
13693 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
13694
13695 * init.c (expand_member_init): Don't give 'not a base' error for
13696 templates.
13697
13698 * pt.c (instantiate_decl): Call import_export_decl later.
13699
13700 * pt.c (instantiate_class_template): Return a value.
13701
13702 * parse.y (extension): New rule for __extension__.
13703 (extdef, unary_expr, decl, component_decl): Use it.
13704
13705 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
13706
13707 * class.c (base_binfo): Remove unused base_has_virtual member.
13708 (finish_base_struct): Likewise.
13709 (finish_struct_1): Likewise.
13710
13711 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
13712
13713 * search.c (expand_upcast_fixups): Fix bogus code generation
13714 problem where the generated code uses the wrong index into the
13715 runtime built vtable on the stack. Old code could clobber random
13716 stack values.
13717
13718 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
13719
13720 * init.c (perform_member_init): Make sure the partial EH cleanups
13721 live on the function_obstack.
13722
13723 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
13724
13725 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13726 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13727
13728 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
13729
13730 * decl.c (grokvardecl): Avoid ANSI style initialization.
13731
13732 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
13733
13734 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13735
13736 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13737
13738 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13739
13740 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13741
13742 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13743 arguments we compare against. Start the count of I at 1, not 0,
13744 since argv[0] is still the command.
13745
13746 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
13747
13748 * lang-specs.h: Accept .cp as an C++ extension.
13749
13750 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13751
13752 * cp-tree.h (ptr_reasonably_similar): Add decl.
13753
13754 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13755
13756 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
13757 pointer. New local SPECBITS with the parm's value.
13758 (grokdeclarator): Pass &specbits down.
13759
13760 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
13761 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
13762
13763 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
13764 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
13765
13766 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
13767 not an error_mark_node.
13768
13769 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13770
13771 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
13772 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
13773
13774 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13775
13776 * decl.c (grokdeclarator): When giving an anonymous struct a name,
13777 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
13778 not affected).
13779
13780 * typeck2.c (build_m_component_ref): If component is a pointer
13781 to data member, resolve the OFFSET_REF now.
13782
13783 * call.c (convert_like): Don't go into infinite recursion.
13784
13785 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
13786
13787 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
13788 * tree.c (layout_basetypes): And on the vbase ptr.
13789
13790 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13791
13792 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
13793 CHAR_TYPE_SIZE so bool is always the same size as another type.
13794
13795 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
13796
13797 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13798
13799 * decl2.c (grok_x_components): Remove synthesized methods from
13800 TYPE_METHODS of an anonymous union, complain about member
13801 functions.
13802 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
13803 anonymous unions.
13804 (finish_function): Just clear the DECL_RTL of our arguments.
13805
13806 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13807
13808 * decl2.c (finish_file): Emit DWARF debugging info for static data
13809 members.
13810
13811 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
13812
13813 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
13814
13815 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
13816 IDENTIFIER_NODE.
13817
13818 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13819
13820 * Make-lang.in (g++-cross$(exeext)): Fix typo.
13821
13822 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13823
13824 Make the g++ driver now be a standalone program, rather than one
13825 that tries to run the gcc driver after munging up the options.
13826 * Make-lang.in (g++.c, g++spec.o): New rules.
13827 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
13828 added.
13829 (g++$(exeext)): New rule, based on xgcc rule.
13830 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
13831 * g++spec.c: New file.
13832 * g++.c: Removed file.
13833
13834 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
13835
13836 * cvt.c (build_up_reference): Arrange for any temporary values
13837 that have been keep in registers until now to be put into memory.
13838
13839 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13840
13841 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
13842 that make -j3 bootstrap works better.
13843
13844 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
13845
13846 * decl.c (pushtag): Do pushdecl for anon tags.
13847
13848 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
13849
13850 * typeck.c (c_expand_return): Fix logic.
13851 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
13852
13853 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
13854
13855 * g++.c (main): Make sure arglist has a final NULL entry. Add
13856 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
13857 stdin/stdout of the invoked program are redirected to
13858 nowheresville.
13859
13860 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
13861
13862 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
13863
13864 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
13865
13866 * init.c (resolve_offset_ref): Handle obj.vfn better.
13867 * typeck.c (build_component_ref): Set TREE_TYPE on result from
13868 build_vfn_ref.
13869
13870 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
13871
13872 * typeck.c (convert_for_assignment): Also handle anachronistic
13873 implicit conversions from (::*)() to cv void*.
13874 * cvt.c (cp_convert_to_pointer): Likewise.
13875
13876 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13877
13878 * lex.c (handle_cp_pragma): Fix bogus warning.
13879
13880 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
13881
13882 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
13883 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
13884
13885 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13886
13887 * class.c (finish_struct_1): Support DWARF2_DEBUG.
13888 * search.c (dfs_debug_mark): Likewise.
13889 * decl2.c (finish_vtable_vardecl): Likewise.
13890 * decl.c (pushtag, finish_enum): Likewise.
13891 * lex.c (check_newline): Use debug_* instead of calling *out
13892 functions directly.
13893
13894 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13895
13896 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
13897 on some picky hosts.
13898
13899 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13900
13901 * class.c (finish_struct_1): A class has a non-trivial copy
13902 constructor if it has virtual functions.
13903
13904 * cvt.c (cp_convert): Always call a constructor.
13905
13906 * call.c (reference_binding): Still tack on a REF_BIND
13907 for bad conversions.
13908 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
13909
13910 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
13911 (c_expand_return): Likewise.
13912 * typeck2.c (digest_init): Likewise for { }.
13913 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
13914 * cvt.c (cp_convert): Handle failure better.
13915
13916 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13917
13918 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
13919 of GCC be path-relative.
13920
13921 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
13922
13923 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
13924 it does need choose-temp.o and pexecute.o.
13925
13926 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13927
13928 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
13929 that we still use it.
13930 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
13931
13932 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
13933
13934 * init.c (expand_default_init): Avoid calling constructors to
13935 initialize reference temps.
13936
13937 * cvt.c (convert_to_reference): Fix.
13938
13939 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
13940
13941 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
13942 (convert_to_reference): Likewise.
13943 * typeck.c (convert_for_initialization): Likewise.
13944 * init.c (expand_default_init): Likewise.
13945 (expand_aggr_init_1): Likewise.
13946 * cp-tree.h (CONV_NONCONVERTING): Lose.
13947 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
13948 * *.c: Adjust.
13949 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
13950
13951 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
13952
13953 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
13954
13955 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
13956
13957 * init.c (expand_aggr_init_1): Don't crash on non-constructor
13958 TARGET_EXPR.
13959
13960 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13961
13962 * g++.c: Include gansidecl.h.
13963 (VPROTO, PVPROTO, VA_START): Delete.
13964 (choose_temp_base_try, choose_temp_base, perror_exec,
13965 run_dos) [__MSDOS__]: Delete fns.
13966 (pfatal_with_name): Delete fn.
13967 (temp_filename): Declare like in gcc.c.
13968 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
13969 (error_count, signal_count): Define.
13970 (error): Delete both definitions.
13971 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
13972 (pfatal_pexecute): Add fn from gcc.c.
13973 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
13974 code to use the pexecute stuff also used by gcc.c.
13975 (MIN_FATAL_STATUS): Define.
13976 * Make-lang.in (g++): Add dependency on and linking with
13977 choose-temp.o and pexecute.o.
13978
13979 * cp-tree.h: Include gansidecl.h.
13980 (STDIO_PROTO): Delete #undef/#define.
13981 * cvt.c (NULL): Delete #undef/#define.
13982 * expr.c (NULL): Likewise.
13983 * init.c (NULL): Likewise.
13984 * rtti.c (NULL): Likewise.
13985 * xref.c (NULL): Likewise.
13986
13987 * cp-tree.h (build_user_type_conversion): Add prototype.
13988 * call.c (build_user_type_conversion): Delete prototype. Correct
13989 decl of FLAGS arg to be an int.
13990 * cvt.c (build_user_type_conversion): Likewise.
13991
13992 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
13993
13994 * cp-tree.def: Add TRY_BLOCK and HANDLER.
13995 * except.c (expand_start_catch_block): Support templates.
13996 * parse.y (try_block, handler_seq): Likewise.
13997 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
13998
13999 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14000
14001 * pt.c (current_template_args): New fn.
14002 (push_template_decl): Use it.
14003 * decl.c (grokdeclarator): Use it.
14004
14005 * decl2.c (build_expr_from_tree): Dereference ref vars.
14006
14007 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14008 the decl-specifier-seq.
14009
14010 * decl.c (grok_op_properties): Don't force the type of a conversion
14011 op to be complete. Don't warn about converting to the same type
14012 for template instantiations.
14013
14014 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14015 methods.
14016
14017 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
14018
14019 * typeck.c (get_delta_difference): Remove previous bogusness.
14020 Don't give errors if force is set.
14021
14022 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14023
14024 * decl2.c (finish_file): Don't emit debug info.
14025 * decl.c (pushdecl): Lose obsolete code.
14026 (grokdeclarator): Still do the long long thing after complaining.
14027 * search.c (note_debug_info_needed): Don't do anything if we're in a
14028 template.
14029 * method.c (synthesize_method): For non-local classes,
14030 push_to_top_level first.
14031
14032 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
14033
14034 * typeck.c (get_delta_difference): Add no_error parameter.
14035 (build_ptrmemfunc): Call get_delta_difference with no_error set;
14036 we don't want error messages when converting unrelated
14037 pointer-to-member functions.
14038
14039 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
14040
14041 * error.c (dump_expr): Improve the wording on error messages that
14042 involve pointer to member functions.
14043
14044 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
14045
14046 * cvt.c (cp_convert_to_pointer): Move code for conversions from
14047 (::*)() to void* or (*)() up a bit, so that we can convert from
14048 METHOD_TYPEs as well.
14049
14050 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14051
14052 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14053 There are no 'member' types.
14054 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14055 (build_x_typeid): Handle errors.
14056
14057 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
14058
14059 * typeck.c (convert_for_assignment): Handle anachronistic implicit
14060 conversions from (::*)() to void* or (*)().
14061 * cvt.c (cp_convert_to_pointer): Likewise.
14062 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14063 conversions from here.
14064 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14065 * lang-options.h: Likewise.
14066 * decl2.c (warn_pmf2ptr): Define.
14067 * cp-tree.h: Declare it.
14068 * typeck2.c (digest_init): Allow pmfs down into
14069 convert_for_initialization.
14070
14071 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14072
14073 * typeck.c (c_expand_return): Fix for returning overloaded fn.
14074
14075 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14076
14077 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14078 * decl.c (grok_reference_init): Pass DIRECT_BIND.
14079 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
14080 DIRECT_BIND.
14081 * call.c (convert_like): Don't pass INDIRECT_BIND.
14082 * typeck.c (convert_arguments): Likewise.
14083 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14084
14085 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14086
14087 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14088 similar code in build_up_ref.
14089 * cvt.c (build_up_reference): Drastically simplify.
14090
14091 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
14092
14093 * typeck.c (signed_or_unsigned_type): If the given type already
14094 as the correct signedness, then just return it.
14095
14096 * typeck.c ({un,}signed_type): If can't do anything, call
14097 signed_or_unsigned_type.
14098
14099 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
14100
14101 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14102 current_class_type is NULL.
14103
14104 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
14105
14106 * class.c (finish_struct_1): Avoid empty structs by adding a field
14107 so layout_type gets the mode right.
14108
14109 * typeck.c (c_expand_return): Drastically simplify.
14110
14111 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14112
14113 * typeck.c (decay_conversion): Handle overloaded methods.
14114
14115 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14116
14117 * call.c (build_over_call): A TARGET_EXPR has side-effects.
14118
14119 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
14120
14121 * cvt.c (convert_to_pointer_force): Add code to support pointer to
14122 member function to pointer to function conversions.
14123 * init.c (resolve_offset_ref): Add code to allow faked up objects,
14124 ignoring them if they are not used, and giving an error, if they
14125 are needed.
14126 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14127 code, and so that we can give an error, if we needed an object,
14128 and one was not provided.
14129 (build_c_cast): Don't call default_conversion when we want to
14130 convert to pointer to function from a METHOD_TYPE.
14131
14132 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14133
14134 * Make-lang.in (cplib2.ready): Fix logic.
14135
14136 * decl.c (shadow_tag): Only complain about non-artificial function
14137 members.
14138
14139 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14140
14141 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14142
14143 * expr.c (cplus_expand_expr): Pre-tweak call_target like
14144 expand_inline_function would.
14145
14146 * pt.c (mark_decl_instantiated): If extern_p, call
14147 mark_inline_for_output.
14148
14149 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
14150
14151 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14152 pmd conversions.
14153
14154 * typeck.c (get_delta_difference): Fix wording, as we can be used
14155 for pointer to data members.
14156
14157 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
14158
14159 * pt.c (tsubst): If the function decl isn't a member of this
14160 template, return a copy of the decl (including copying the
14161 lang-specific part) so we don't hose ourselves later.
14162
14163 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14164
14165 * class.c (finish_struct): Remove DWARF-specific tag handling.
14166 * decl.c (pushtag): Likewise.
14167 (finish_function): Always clear DECL_ARGUMENTS on function decls with
14168 no saved RTX.
14169 * decl2.c (finish_file): Emit DWARF debugging info for static data
14170 members.
14171
14172 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
14173
14174 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14175 isn't the same as the new one before we whack it.
14176
14177 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14178
14179 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14180 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14181 warn_traditional and warn_strict_prototypes; remove ancient
14182 'overload' code; remove references to flag_traditional.
14183
14184 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
14185
14186 * input.c (sub_getch): Handle 8-bit characters in string literals.
14187
14188 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
14189
14190 * tree.c (mapcar): Handle CONSTRUCTORs.
14191 (copy_to_permanent): Handle expression_obstack properly.
14192
14193 * Make-lang.in (cplib2.txt): Also depend on the headers.
14194
14195 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14196 INT_TYPE_SIZE.
14197 (expand_class_desc): Use USItype for offset field.
14198 * tinfo.h (struct __class_type_info): Likewise.
14199
14200 * method.c (build_overload_int): TYPE_PRECISION should be applied
14201 to types.
14202
14203 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14204
14205 * call.c (build_new_op): A COND_EXPR involving void must be a
14206 builtin.
14207
14208 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14209
14210 * typeck.c (build_x_component_ref): New fn.
14211 (build_object_ref): Use it.
14212 * parse.y (primary): Use it.
14213 * decl2.c (build_expr_from_tree): Use it.
14214 * cp-tree.h: Declare it.
14215
14216 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
14217 * error.c (dump_type_suffix): Handle variable arrays.
14218
14219 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14220
14221 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
14222
14223 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14224
14225 * decl.c (lookup_name_real): Don't try to look up anything in a
14226 TYPENAME_TYPE.
14227
14228 * tinfo2.cc (__throw_type_match_rtti): Oops.
14229
14230 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14231
14232 * Make-lang.in (exception.o): Use -fno-PIC for now.
14233
14234 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14235
14236 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
14237 calling them.
14238 (get_tinfo_fn_dynamic): Extracted from build_typeid.
14239 * tinfo2.cc (__dynamic_cast): Adjust.
14240
14241 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
14242 (build_x_typeid): Likewise.
14243
14244 * parse.y: Call build_x_typeid instead of build_typeid.
14245 * cp-tree.def: Add TYPEID_EXPR.
14246 * pt.c (tsubst_copy): Handle typeid.
14247 * decl2.c (build_expr_from_tree): Likewise.
14248 * rtti.c (build_x_typeid): Throw bad_typeid from here.
14249 (build_typeid): Not here.
14250 * cp-tree.h: Declare build_x_typeid.
14251
14252 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
14253
14254 * call.c (convert_like): Pull out constant values.
14255
14256 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
14257
14258 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14259
14260 * decl.c (init_decl_processing): Create short int types before
14261 creating size_t in case a machine description needs to use
14262 unsigned short for size_t.
14263
14264 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14265
14266 * Make-lang.in (exception.o): Turn off pic.
14267
14268 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
14269 type, multi-level ptr conversions.
14270
14271 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
14272 (throw_bad_cast): Use it.
14273 (throw_bad_typeid): New fn.
14274 (build_typeid): Throw bad_typeid as needed.
14275 Use build_call.
14276 (synthesize_tinfo_fn): Handle functions and arrays before checking
14277 for cv-quals.
14278
14279 * Remove .h from standard C++ headers, add new.h, move into inc
14280 subdirectory.
14281
14282 * exception*: Remove pointer from object, constructors. Add
14283 default exception::what that uses type_info::name. Add
14284 __throw_bad_typeid.
14285
14286 * init.c (build_new): Don't add a cookie to new (void *) T[2].
14287
14288 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
14289
14290 * Make-lang.in: Building C++ code depends on cc1plus.
14291
14292 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14293
14294 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
14295 a HOST_WIDE_INT, not a tree.
14296
14297 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14298
14299 * exception.cc: Don't include <stdlib.h>.
14300
14301 * Make-lang.in (c++.clean): Remove cplib2.*.
14302
14303 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
14304
14305 * parse.y (component_decl_1, component_costructor_declarator case):
14306 Pass attributes/prefix_attributes in tree list.
14307
14308 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14309
14310 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
14311
14312 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14313
14314 * lex.c (do_identifier): Don't do deferred lookup in a template
14315 header.
14316
14317 * typeck2.c (store_init_value): Oops.
14318
14319 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
14320 New files for C++ lang-support library.
14321 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
14322 (CXX_LIB2FUNCS): Define.
14323 And rules for building the C++ lang-support code.
14324 * config-lang.in (headers): Define.
14325 (lib2funcs): Define.
14326
14327 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14328
14329 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
14330 digest_init.
14331 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
14332 * typeck2.c (store_init_value): Check for initializing pmf with { }
14333 here.
14334 (process_init_constructor): Not here.
14335
14336 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14337
14338 * pt.c (begin_template_parm_list): Increment
14339 processing_template_decl here.
14340 (end_template_parm_list): Not here.
14341 (process_template_parm): No need to add 1 to it now.
14342 * *.c: Use processing_template_decl instead of current_template_parms
14343 to check for being in a template.
14344
14345 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
14346 (tsubst_copy): Handle CONSTRUCTOR.
14347 (instantiate_decl): Set up context properly for variables.
14348 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
14349 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
14350
14351 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14352
14353 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
14354
14355 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14356
14357 * method.c (make_thunk): Call comdat_linkage before setting the
14358 TREE_CODE.
14359
14360 * decl2.c (comdat_linkage): Use make_decl_one_only.
14361 (import_export_decl): Likewise.
14362 * decl.c (init_decl_processing): Check supports_one_only instead of
14363 SUPPORTS_WEAK.
14364
14365 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14366
14367 * decl2.c (grokfield): Tighten checking for access decls.
14368
14369 * decl.c (make_typename_type): Resolve references to
14370 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
14371 (lookup_name_real): Types that depend on a template parameter get
14372 an implicit 'typename' unless they're in the current scope.
14373 (start_decl_1): We don't care about incomplete types that depend
14374 on a template parm.
14375 (grokdeclarator): Resolve 'typename's in the type specifier that
14376 refer to members of the current scope.
14377
14378 * call.c (build_over_call): Remove 'inline called before
14379 definition' diagnostic.
14380 (build_method_call): Likewise.
14381 * decl.c (duplicate_decls): Downgrade 'used before declared
14382 inline' to a warning, only with -Winline.
14383
14384 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
14385
14386 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
14387
14388 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14389
14390 * call.c (build_method_call): When calling a signature
14391 default implementation, as in other cases, let instance_ptr simply
14392 be instance.
14393
14394 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
14395
14396 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14397
14398 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
14399
14400 * except.c (expand_start_catch_block): Add a pushlevel so that -g
14401 works on hppa and SPARC.
14402
14403 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14404
14405 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14406
14407 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14408
14409 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14410 before testing whether it's a signature.
14411
14412 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14413
14414 * call.c (build_new_method_call): Don't complain about signature
14415 pointers and references not being an aggr type.
14416 (build_this): If a signature pointer or reference was passed in,
14417 just return it.
14418 (build_new_method_call): If instance is a signature pointer, set
14419 basetype to the signature type of instance.
14420 * sig.c (build_signature_method_call): Deleted basetype and
14421 instance parameters, they can be found as the DECL_CONTEXT of
14422 function and as the first argument passed in.
14423 * cp-tree.h: Changed declaration of build_signature_method_call.
14424 * call.c (build_method_call): Deleted first two arguments in call
14425 of build_signature_method_call.
14426 (build_over_call): Added call to build_signature_method_call.
14427
14428 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14429
14430 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14431 target_expr.
14432
14433 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14434
14435 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14436
14437 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
14438
14439 * except.c (expand_start_try_stmts): Move to except.c in the backend.
14440 (expand_end_try_stmts): Remove.
14441
14442 * init.c (perform_member_init): Use add_partial_entry () instead
14443 of directly manipulating lists.
14444 (emit_base_init): Likewise.
14445
14446 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
14447
14448 * except.c (expand_exception_blocks): Always make sure USE and
14449 CLOBBER insns that came at the end still do, the backend relies
14450 upon this.
14451
14452 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14453
14454 * call.c (build_over_call): We can only use a TARGET_EXPR of the
14455 right type.
14456
14457 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14458
14459 * cvt.c (convert_to_reference): Revert last change, don't complain
14460 about temp without target decl.
14461
14462 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
14463
14464 * decl.c (grokdeclarator): Don't core dump when void() is given.
14465
14466 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14467
14468 * decl.c (copy_args_p): Don't crash.
14469
14470 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
14471
14472 * pt.c (tsubst): And support template args inside the exception
14473 specification.
14474
14475 * pt.c (tsubst): Add support for exception specifications in
14476 template functions.
14477
14478 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
14479
14480 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14481 fields now.
14482 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14483 (start_function): Likewise.
14484 (start_method): Likewise.
14485 (grokfield): Likewise.
14486 (make_call_declarator): Add throw spec parameter.
14487 (set_quals_and_spec): Add routine.
14488 * lex.c (set_quals_and_spec): Likewise.
14489 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14490 * decl.c (shadow_tag): Eliminate the throw spec parameter to
14491 grokdeclarator.
14492 (groktypename): Likewise.
14493 (start_decl): Eliminate the throw spec parameter. Eliminate the
14494 throw spec parameter to grokdeclarator. Eliminate the throw spec
14495 field in DECL_STMT.
14496 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14497 (grokfndecl): Remove useless set of raises.
14498 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
14499 the throw spec parameter to start_decl. Pull the throw spec out
14500 of the call declarator.
14501 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14502 (start_function): Eliminate the throw spec parameter. Eliminate
14503 the throw spec parameter to grokdeclarator.
14504 (start_method): Likewise.
14505 * decl2.c (grokfield): Likewise.
14506 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14507 (grokoptypename): Likewise.
14508 (finish_file): Eliminate the throw spec parameter to
14509 start_function. Add throw spec to make_call_declarator.
14510 * except.c (init_exception_processing): Add throw spec to
14511 make_call_declarator. Eliminate the throw spec parameter to
14512 start_decl.
14513 (expand_start_catch_block): Eliminate the throw spec parameter to
14514 grokdeclarator.
14515 (expand_builtin_throw): Add throw spec to make_call_declarator.
14516 Eliminate the throw spec parameter to start_function.
14517 (start_anon_func): Likewise.
14518 * lex.c (make_call_declarator): Add throw spec parameter.
14519 (set_quals_and_spec): New routine.
14520 (cons_up_default_function): Add throw spec to make_call_declarator.
14521 Eliminate the throw spec parameter to grokfield.
14522 * method.c (synthesize_method): Eliminate the throw spec parameter
14523 to start_function.
14524 * pt.c (process_template_parm): Eliminate the throw spec parameter
14525 to grokdeclarator.
14526 (tsubst): Add throw spec to make_call_declarator.
14527 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14528 (do_function_instantiation): Eliminate the throw spec parameter to
14529 grokdeclarator. Eliminate the throw spec parameter to
14530 start_function.
14531 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14532 to start_function.
14533 * parse.y (datadef): Remove non-winning optimization.
14534 (decl): Likewise.
14535 (fndef): Remove ambiguous error productions uncovered by grammar
14536 fixing.
14537 (constructor_declarator): Add exception_specification_opt here.
14538 (component_constructor_declarator): Likewise.
14539 (direct_after_type_declarator): Likewise.
14540 (complex_direct_notype_declarator): Likewise.
14541 (direct_abstract_declarator): Likewise.
14542 (fn.def1): Remove exception_specification_opt.
14543 (fn.def2): Likewise.
14544 (condition): Likewise.
14545 (initdcl0): Likewise.
14546 (initdcl): Likewise.
14547 (notype_initdcl0): Likewise.
14548 (nomods_initdcl0): Likewise.
14549 (component_decl_1): Likewise.
14550 (component_declarator): Likewise.
14551 (after_type_component_declarator0): Likewise.
14552 (after_type_component_declarator): Likewise.
14553 (notype_component_declarator): Likewise.
14554
14555 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14556
14557 * call.c (build_over_call): Also use an INIT_EXPR when
14558 initializing anything from an rvalue.
14559
14560 * call.c (build_over_call): Call stabilize_reference when building
14561 an INIT_EXPR instead of calling the copy ctor.
14562
14563 * call.c (joust): Extend the previous change to all comparisons.
14564
14565 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14566 NO_LINKAGE_HEURISTICS.
14567
14568 * decl2.c (finish_file): Emit any statics that weren't already.
14569
14570 * typeck.c (build_static_cast): Implement.
14571 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14572 * decl.c (grokparms): Use can_convert_arg instead of
14573 implicit_conversion directly.
14574 (copy_args_p): New fn.
14575 * cvt.c (convert_to_reference): Don't complain about temp with
14576 static_cast.
14577 (build_up_reference): Handle TARGET_EXPRs.
14578 * call.c (build_over_call): Elide unnecessary temps.
14579 (can_convert*): Use new overloading code.
14580
14581 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14582
14583 * call.c: Move TYPE_PTR*_MACROS ...
14584 * cp-tree.h: To here.
14585 * typeck.c (build_reinterpret_cast): Implement.
14586
14587 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14588 ptr_complete_ob.
14589 (joust): If we're comparing a function to a builtin and the worst
14590 conversion for the builtin is worse than the worst conversion for the
14591 function, take the function.
14592
14593 * typeck.c (build_const_cast): Implement.
14594 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14595 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14596
14597 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
14598
14599 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14600 too early. Make sure we explode if exprtype turns out to be a
14601 NULL_TREE when it shouldn't be.
14602
14603 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
14604
14605 * cp-tree.h: New routine make_call_declarator.
14606 * lex.c (make_call_declarator): Define it.
14607 * except.c (init_exception_processing): Use it.
14608 (expand_builtin_throw): Likewise.
14609 (start_anon_func): Likewise.
14610 * decl2.c (finish_file): Likewise.
14611 * lex.c (cons_up_default_function): Likewise.
14612 * parse.y: Likewise.
14613 * pt.c (tsubst): Likewise.
14614
14615 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
14616
14617 * decl2.c (groktypefield): Remove unused code.
14618
14619 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
14620
14621 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14622 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
14623 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
14624 nonempty_cv_qualifiers.
14625 * hash.h: Rebuild.
14626
14627 * lex.c (make_pointer_declarator): Change type_quals into
14628 cv_qualifiers.
14629 (make_reference_declarator): Likewise.
14630
14631 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14632
14633 * decl.c (start_function): Only check interface_* for templates
14634 with flag_alt_external_templates.
14635
14636 * call.c (build_new_op): Check for comparison of different enum types.
14637 (build_over_call): Fix arg # output.
14638
14639 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14640
14641 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14642
14643 * call.c (build_new_op): Check for erroneous args.
14644
14645 * call.c (build_new_method_call): Add missing args to cp_error.
14646
14647 * tree.c (error_type): Don't print reference-to-array.
14648
14649 * typeck.c (convert_for_assignment): Don't say contravariance for
14650 removing const.
14651
14652 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14653
14654 * call.c (build_over_call): Diagnose bad convs for `this'.
14655
14656 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14657 on _ctor_arg.
14658
14659 * call.c (convert_like): Handle bad convs.
14660 (build_over_call): Handle bad convs better.
14661
14662 * decl2.c: -fansi-overloading is now the default.
14663
14664 * call.c (build_new_method_call): Check for erroneous args.
14665
14666 * pt.c (instantiate_class_template): Propagate
14667 TYPE_USES_MULTIPLE_INHERITANCE.
14668
14669 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
14670
14671 * call.c (enforce_access): Add static to routine.
14672
14673 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14674
14675 * call.c (build_user_type_conversion_1): Fix bad handling.
14676 (compare_ics): Likewise.
14677
14678 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14679
14680 * call.c (standard_conversion): Oops.
14681
14682 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
14683
14684 * g++.c: Update test for win32 (&& ! cygwin32).
14685
14686 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14687
14688 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14689 (ptr_reasonably_similar): New fn.
14690 * call.c (BAD_RANK): New rank.
14691 (ICS_BAD_FLAG): New macro.
14692 (standard_conversion): Handle almost-right pointer conversions.
14693 (reference_binding): Handle bad rvalue bindings.
14694 (add_*_candidate): Stuff.
14695 (build_over_call): Pass bad conversions to convert_for_initialization.
14696 (compare_ics): Handle bad convs.
14697 (joust): Likewise.
14698
14699 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
14700
14701 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14702 integer_type_node when computing pointer offsets.
14703
14704 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14705
14706 * tree.c (lvalue_type): New fn.
14707 (error_type): New fn.
14708 * call.c (op_error): Use error_type.
14709 (add_conv_candidate): Use lvalue_type.
14710 (add_builtin_candidates): Likewise.
14711 * error.c (args_as_string): Use error_type.
14712
14713 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14714
14715 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14716 (tsubst): Not here.
14717
14718 * decl.c (init_decl_processing): With -ansi, __null's type is the
14719 signed integral type with the same number of bits as a pointer.
14720 Introduce a new variable null_node for it.
14721 * cp-tree.h: Adjust.
14722 * call.c (null_ptr_cst_p): Adjust.
14723
14724 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
14725
14726 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14727 optimize.
14728
14729 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14730
14731 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14732 fns of classes without virtual functions.
14733
14734 * call.c (add_function_candidate): Handle `this' specially.
14735 (compare_ics): Likewise.
14736
14737 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
14738
14739 * typeck.c (build_conditional_expr): Fix handling of __null.
14740
14741 * decl2.c (comdat_linkage): New fn.
14742 (import_export_vtable): Use it.
14743 (import_export_decl): Use it.
14744 * method.c (make_thunk): Use it.
14745
14746 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14747
14748 * pt.c (end_template_decl): If we don't actually have parms, return.
14749 * parse.y (template_header): Accept 'template <>'.
14750
14751 * errfn.c: Allow 5 args.
14752
14753 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14754
14755 * tree.c (make_temp_vec): New fn.
14756 * pt.c (push_template_decl): Handle partial specs.
14757 (instantiate_class_template): Likewise.
14758 (more_specialized): Use get_bindings.
14759 (more_specialized_class): New fn.
14760 (get_class_bindings): New fn.
14761 (most_specialized_class): New fn.
14762 (do_function_instantiation): List candidates for ambiguous case.
14763 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
14764 (shadow_tag): Call push_template_decl for partial specializations.
14765 * parse.y: Likewise.
14766 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
14767 DECL_TEMPLATE_MEMBERS.
14768 * call.c (print_z_candidates): Reduce duplication.
14769
14770 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14771
14772 * decl2.c (lang_decode_option): Allow -fansi-overloading.
14773
14774 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14775
14776 * pt.c (get_bindings): New fn.
14777 (most_specialized): Likewise.
14778 (do_function_instantiation): Use them.
14779 (add_maybe_template): New fn.
14780 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
14781 * call.c (build_new_op): Handle guiding decls.
14782 (build_new_function_call): Likewise.
14783 * decl2.c (finish_file): Likewise.
14784
14785 * decl2.c (mark_used): Do synthesis here.
14786 * call.c (build_method_call): Not here.
14787 (build_over_call): Or here.
14788 * typeck.c (build_function_call_real): Or here.
14789 * tree.c (bot_manip): Call mark_used on functions used in default
14790 args.
14791
14792 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14793
14794 * decl2.c (import_export_vtable): Delete code that disabled vtable
14795 heuristic on systems with ASM_OUTPUT_EXTERNAL.
14796
14797 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14798
14799 * typeck.c (build_x_function_call): Handle static call context
14800 better.
14801
14802 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
14803 the function, not its outer block.
14804
14805 * call.c (build_field_call): Pass fields on to build_opfncall
14806 regardless of TYPE_OVERLOADS_CALL_EXPR.
14807 (build_method_call): Pass on to build_new_method_call sooner.
14808
14809 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
14810 gives us.
14811 * class.c (instantiate_type): Don't put a POINTER_TYPE to
14812 METHOD_TYPE on an expression. Also make a copy of rhs instead of
14813 modifying it.
14814
14815 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
14816
14817 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
14818 (add_builtin_candidate): Don't take enums for ++.
14819 (build_new_method_call): Handle non-aggregates and field calls.
14820 Move new overloading code from...
14821 * cvt.c: Here.
14822
14823 * decl.c (grokparms): Don't check default args in templates.
14824
14825 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
14826
14827 * cvt.c (build_new_op): Fix args to build_unary_op.
14828 (add_builtin_candidates): Don't call type_promotes_to on float.
14829
14830 * decl.c (grokparms): Check the type of the default arg.
14831
14832 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
14833 returning NULL_TREE.
14834
14835 * typeck.c (build_x_binary_op): Avoid doing extra work.
14836 (build_x_unary_op): Likewise.
14837 (build_x_conditional_expr): Likewise.
14838 * cvt.c (build_over_call): Return.
14839 (add_builtin_candidate): Fix MEMBER_REF.
14840 (build_new_op): Likewise.
14841
14842 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
14843
14844 * method.c (build_overload_name): Put bug fix into code but leave
14845 disabled for now so we can be bug compatible with older releases
14846 that do repeats incorrectly. In the future, we can enable it.
14847
14848 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14849
14850 * cvt.c (convert_like): Don't call build_cplus_new twice.
14851
14852 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
14853 Control new overloading code with -fansi-overloading.
14854
14855 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14856
14857 * cvt.c (build_over_call): Call build_cplus_new.
14858 * call.c (build_method_call): Likewise.
14859 * typeck.c (build_function_call_real): Likewise.
14860 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
14861 the COND_EXPR in a TARGET_EXPR so they use the same slot.
14862
14863 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
14864 recursive calls.
14865 * typeck.c (complete_type): Propagate
14866 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
14867
14868 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14869
14870 * cvt.c (joust): More ?: kludging. Sigh.
14871 (build_over_call): Don't try to synthesize global fns.
14872
14873 * search.c (lookup_conversions): Use binfo marking.
14874
14875 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
14876
14877 * search.c (build_mi_matrix): Use the correct value of cid
14878 when determining the new mi_size.
14879
14880 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14881
14882 * cvt.c (add_builtin_candidates): Do consider type conversion ops
14883 for the first parms of += et al.
14884 (strip_top_quals): New fn.
14885 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
14886 (implicit_conversion): Likewise.
14887 (add_builtin_candidates): Be careful about arrays.
14888 (build_new_method_call): Handle vtable optimization.
14889
14890 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
14891
14892 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
14893 * cvt.c (reference_binding): Use it.
14894 (implicit_conversion): Use it.
14895 (add_builtin_candidate, COND_EXPR): Use it.
14896
14897 * cvt.c (build_new_function_call): Check for error args.
14898
14899 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
14900
14901 * gxx.gperf: Add __null.
14902 * hash.h: Regenerate.
14903 * lex.h: Add RID_NULL.
14904 * lex.c (init_lex): Create null_pointer_node here, stick it in
14905 RID_NULL.
14906 * decl.c (init_decl_processing): Still set its type here.
14907 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
14908 (convert_to_pointer_force): Likewise.
14909 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
14910 if (! pedantic).
14911 * call.c (convert_harshness): Use null_ptr_cst_p.
14912 * typeck.c (convert_for_assignment): Likewise. Don't produce
14913 null_pointer_node.
14914
14915 * error.c (args_as_string): Handle lists of actual args, too.
14916 * cvt.c (null_ptr_cst): Support (void*)0 for now.
14917 (build_user_type_conversion_1): Improve diagnostics.
14918 (build_new_function_call): Likewise.
14919 (build_object_call): Likewise.
14920 (build_new_method_call): Likewise. Move call before def diagnostic...
14921 (build_over_call): Here.
14922
14923 * cvt.c (build_new_method_call): Don't complain about no match if
14924 LOOKUP_SPECULATIVELY.
14925 (build_over_call): Fix 'this' for virtual fn.
14926 (build_new_method_call): Add diagnostic.
14927
14928 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14929
14930 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
14931 constructors to be passed in.
14932 (build_over_call): Likewise.
14933 (build_user_type_conversion_1): Pass them in.
14934 (convert_like): Likewise.
14935 (build_object_call): Handle overloaded conversions.
14936 (build_over_call): Pass the right args to build_vfn_ref.
14937 (standard_conversion): Fix pmf convs.
14938 (joust): Handle comparing statics and non-statics.
14939 (build_new_method_call): New fn.
14940 * call.c (build_method_call): Call it if NEW_OVER.
14941
14942 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
14943
14944 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
14945 %D instead.
14946
14947 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
14948
14949 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
14950 instead of just maybe_build_cleanup so that we deallocate the
14951 thrown object.
14952
14953 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14954
14955 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
14956 * cp-tree.h (finish_prevtable_vardecl): Add decl.
14957
14958 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
14959
14960 * pt.c (instantiate_class_template): Call complete_type. Also, if
14961 we're at the end of the file and we just instantiated a template
14962 class with a vtable, call finish_prevtable_vardecl.
14963
14964 * error.c (dump_decl): Don't explode (or explode more gracefully
14965 as appropriate) if the object being dumped has a null type.
14966 (dump_expr): Likewise.
14967
14968 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
14969 by counting the number of nodes that we'll need before allocating
14970 the array.
14971 (lookup_fnfields): Fix comment.
14972 (breadth_first_search): Fix comment.
14973
14974 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14975
14976 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
14977 TYPE_ALIGN.
14978 * class.c (finish_struct): Call cplus_decl_attributes here.
14979 (finish_struct_1): Not here.
14980 * cp-tree.h: Adjust.
14981
14982 * pt.c (type_unification): New parameter STRICT.
14983 (unify): If STRICT, don't allow cv addition or base deduction.
14984 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
14985
14986 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14987
14988 * search.c (get_template_base{_recursive}): New fns.
14989 * pt.c (more_specialized): New fn.
14990 (do_function_instantiation): Use it.
14991 (unify): Handle base deduction.
14992 * cvt.c (joust): Use more_specialized.
14993 Don't arbitrarily choose between non-builtin candidates.
14994 (build_over_call): Call require_complete_type.
14995
14996 * decl.c (start_function): Statics are static even in a #pragma
14997 interface file.
14998
14999 * decl2.c (import_export_vtable): Disable vtable heuristic on
15000 systems with ASM_OUTPUT_EXTERNAL.
15001
15002 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15003 (standard_conversion): No std conv to enum type.
15004
15005 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15006 for ptm's.
15007
15008 * cvt.c (reference_binding): Bind directly to a base subobject of
15009 a class rvalue.
15010
15011 * cvt.c (build_new_op): Enforce access control.
15012
15013 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
15014
15015 * typeck2.c (process_init_constructor): When scanning the
15016 union for a named field, skip things that aren't FIELD_DECLs.
15017
15018 * method.c (synthesize_method): Don't scan fndecl's rtl if
15019 we're at the end of the file; just assume the function can't
15020 be inlined.
15021
15022 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15023
15024 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15025 it failed.
15026
15027 * cvt.c (build_user_type_conversion_1): Handle overloaded
15028 conversion ops.
15029
15030 * cvt.c (add_builtin_candidates): Don't consider type conversion
15031 operators for the first parameter of operator=.
15032
15033 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
15034
15035 * typeck.c (complete_type): Only call layout_type if we're not
15036 expanding a template.
15037
15038 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15039
15040 * cvt.c (compare_ics): Oops.
15041
15042 * cvt.c (op_error): Oops.
15043
15044 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15045 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
15046 (build_conv): Use them.
15047 (implicit_conversion): Use them.
15048 (convert_like): Handle them.
15049 (build_new_op): Handle builtin COND_EXPR again.
15050 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
15051 in lists of types for COND_EXPR.
15052 (add_builtin_candidate): Add enum candidates for COND_EXPR.
15053
15054 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
15055
15056 * typeck.c (build_modify_expr): Always attempt to build a call to
15057 the assignment operator, even if we're using a default one.
15058 (convert_for_initialization): Call complete_type.
15059
15060 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15061
15062 * cvt.c (reference_binding): A REF_BIND gets the reference type.
15063 (implicit_conversion): Likewise.
15064 (convert_like): Likewise.
15065 (compare_ics): Likewise.
15066 (compare_qual): Likewise.
15067 (print_z_candidates): Handle no candidates.
15068 (build_new_op): Don't handle builtin COND_EXPR for now.
15069
15070 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
15071
15072 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15073
15074 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15075
15076 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15077
15078 * cvt.c (build_builtin_candidate): Oops.
15079 (build_new_op): Oops.
15080
15081 * method.c (build_opfncall): Pass COND_EXPR on.
15082 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15083 (add_builtin_candidate{,s}): Likewise.
15084 (add_builtin_candidates): Likewise.
15085 (print_z_candidates, op_error, build_new_op): Likewise.
15086 (type_decays_to): New fn.
15087 * lex.c (init_lex): Just say ?: for COND_EXPR.
15088
15089 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15090
15091 * typeck.c (complete_type): Call layout_type rather than building
15092 a new array type.
15093
15094 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15095 only use ptrdiff_t.
15096
15097 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15098
15099 * cvt.c: Always compile the new overloading code (but don't use it).
15100 (implicit_conversion): Add a BASE_CONV when converting to
15101 the same class type.
15102 (convert_like): Handle BASE_CONV.
15103
15104 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15105
15106 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15107 (add_builtin_candidate): Likewise.
15108
15109 NEW_OVER changes:
15110 * typeck.c (build_x_function_call): Try an operator function
15111 whenever we call an object of class type.
15112 * method.c (build_opfncall): Pass CALL_EXPRs through.
15113 * cvt.c (implicit_conversion): Do const-ref case first.
15114 (add_conv_candidate, build_object_call, op_error): New fns.
15115 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15116 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15117 builtin candidates.
15118 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
15119 Fall back on preincrement handling. Use op_error.
15120 Handle warn_synth.
15121 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
15122 an error_mark_node.
15123 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15124 properly.
15125
15126 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
15127
15128 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15129
15130 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
15131
15132 * typeck.c (build_component_ref_1): Use build_component_ref
15133 instead of open coding it here.
15134
15135 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15136
15137 * g++.c (main): Don't link with -lg++.
15138
15139 NEW_OVER changes:
15140 * cvt.c (convert_to_reference): Don't use convert_from_reference on
15141 result of build_type_conversion.
15142 (cp_convert): Only call build_method_call for ctors if
15143 build_type_conversion failed.
15144 (ptr_complete_ob): New function.
15145 (TYPE_PTR{,OB,MEM}_P): New macros.
15146 ({add,build}_builtin_candidate{,s}): New functions.
15147 (print_z_candidates): Handle builtins.
15148 (build_user_type_conversion_1): Don't use conversion fns for
15149 converting to a base type.
15150 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15151 (build_user_type_conversion): Use convert_from_reference.
15152 (build_new_op): New function.
15153 (build_over_call): Fix handling of methods.
15154 (compare_ics): Handle AMBIG_CONV properly.
15155 * typeck2.c: Increment abort count.
15156 * method.c (build_opfncall): Forward most requests to build_new_op.
15157 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15158
15159 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15160
15161 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15162 invalid second argument to dump_expr_list.
15163
15164 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
15165
15166 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15167
15168 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
15169
15170 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15171 ASSEMBLE_EXTERNAL.
15172
15173 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
15174
15175 * typeck2.c (process_init_constructor): New pedwarn for using { }
15176 to initialize a pointer to member function.
15177 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15178 we can avoid the new error.
15179
15180 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
15181
15182 * typeck.c (build_ptrmemfunc1): New function to hide details of
15183 pointer to member functions better.
15184
15185 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
15186
15187 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15188 methods into the actual method, as we know the implied object is
15189 not used.
15190
15191 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15192
15193 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15194 inside a system header.
15195
15196 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
15197
15198 * call.c (build_method_call): Call complete_type on the
15199 instance type.
15200
15201 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
15202
15203 * typeck.c (build_component_ref): Always build up an OFFSET_REF
15204 for obj_ptr->func so that we can know which object to use in a
15205 method call.
15206
15207 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
15208
15209 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
15210 around things. Also improve maintainability.
15211
15212 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
15213
15214 * decl.c (grokdeclarator): Check for overflow when evaluating an
15215 array dimension.
15216
15217 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15218
15219 * cvt.c (cp_convert): Don't check for ambiguity with constructor
15220 if NEW_OVER.
15221
15222 * typeck.c (build_x_function_call): Pass function overload
15223 questions to new overloading code if NEW_OVER.
15224 * init.c (expand_aggr_init_1): Only check for type conversion ops
15225 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
15226 Don't check for ambiguity with constructor if NEW_OVER.
15227 * cvt.c (convert_to_reference): Dereference the result of a type
15228 conversion operator.
15229 (build_conv): Propagate ICS_USER_FLAG.
15230 (implicit_conversion): Call instantiate_type.
15231 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
15232 (add_function_candidate): Fix cv-quals on argtype.
15233 (print_z_candidates): New function.
15234 (build_new_function_call): Call it.
15235 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
15236 consider non-converting constructors.
15237 Call print_z_candidates.
15238 Return an AMBIG_CONV for an ambiguous conversion.
15239 (build_user_type_conversion): Handle AMBIG_CONV.
15240 (convert_like): Fix test for building TARGET_EXPR.
15241 Call instantiate_type.
15242 Handle AMBIG_CONV and LVALUE_CONV.
15243 (build_over_call): Handle 0 args and ellipsis.
15244 * cp-tree.def: Add AMBIG_CONV.
15245
15246 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
15247
15248 * decl.c (lookup_name_real): If we find mem in obj when parsing
15249 `obj->mem', make sure we return the right value.
15250
15251 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
15252
15253 * search.c (get_base_distance): Call complete_type.
15254
15255 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
15256
15257 * decl.c (store_bindings): Make static.
15258
15259 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15260
15261 * init.c (expand_aggr_init_1): Don't check type conversions if
15262 NEW_OVER.
15263
15264 * cvt.c (z_candidate): Put back template field.
15265 (add_function_candidate): Set it.
15266 (add_template_candidate): Likewise.
15267 (joust): Use it.
15268 (compare_qual): Handle references and pointers to members.
15269 (compare_ics): Handle reference bindings.
15270
15271 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
15272
15273 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
15274
15275 * call.c (compute_conversion_costs): Call complete_type.
15276
15277 * tree.c (vec_binfo_member): Use comptypes instead of comparing
15278 pointers, so we can handle template parameters.
15279
15280 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
15281
15282 * cvt.c (cp_convert_to_pointer): We have to call complete_type
15283 here; let's make it explicit instead of a side effect of an
15284 error check.
15285
15286 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15287
15288 * cvt.c (z_candidate): Remove template field.
15289 (reference_binding): Handle binding to temporary.
15290 (implicit_conversion): Likewise.
15291 (add_function_candidate): Handle artificial constructor parms.
15292 Handle functions with too few parms.
15293 (add_template_candidate): New function.
15294 (build_user_type_conversion_1): Handle constructors.
15295 (convert_like): Likewise.
15296 (build_over_call): Likewise.
15297 (build_new_function_call): Support templates.
15298 (compare_ics): Fix reference, inheritance handling.
15299
15300 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
15301
15302 * decl.c: Add signed_size_zero_node.
15303 (init_decl_processing): Build it.
15304 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
15305 when we're trying to make a negative delta.
15306
15307 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15308
15309 Stop doing this damn index==strchr variable name confusion.
15310 * class.c (add_virtual_function): Change local var INDEX to be
15311 named IDX.
15312 (add_method): Likewise.
15313 * lex.c (print_parse_statistics): Likewise.
15314 * search.c (make_memoized_table_entry): Likewise.
15315 (lookup_fnfields_here): Likewise.
15316 (lookup_field): Likewise.
15317 (lookup_fnfields): Likewise.
15318 (get_baselinks): Likewise.
15319 * sig.c (build_signature_table_constructor): Likewise.
15320 (build_signature_method_call): Likewise.
15321 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
15322 (get_member_function_from_ptrfunc): Likewise.
15323 (build_ptrmemfunc): Change local var INDEX to be IDX.
15324 (c_expand_start_case): Likewise.
15325
15326 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15327
15328 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
15329 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
15330 (convert_to_reference): Use build_type_conversion to convert to
15331 the reference type directly.
15332 (standard_conversion): Fix void* case, non-conversions.
15333 (reference_binding): Fix expr == 0 case, non-conversions.
15334 (convert_like): Support REF_BIND.
15335 (compare_qual): Split out from compare_ics.
15336 (compare_ics): Use it, handle icses with only a qual_conv.
15337
15338 * init.c (expand_vec_init): Don't crash if decl is NULL.
15339
15340 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
15341
15342 * mpw-config.in: New file, configury for Mac MPW.
15343 * mpw-make.sed: New file, makefile editing for MPW.
15344
15345 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15346
15347 * pt.c (instantiate_class_template): Call repo_template_used.
15348
15349 * search.c (lookup_conversions): Only lookup conversions in
15350 complete types.
15351
15352 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15353
15354 * cp-tree.def: Renamed from tree.def, to avoid confusion with
15355 gcc's tree.def.
15356 * cp-tree.h, lex.c: Include cp-tree.def.
15357 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
15358
15359 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
15360
15361 * init.c (build_vec_delete_1): Call complete_type.
15362
15363 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
15364
15365 * except.c (start_anon_func): Make sure anonymous functions are
15366 never external.
15367
15368 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15369
15370 * decl.c (finish_function): If function_depth > 1, set nested.
15371
15372 * decl2.c (grokbitfield): Revert Bob's change.
15373 * class.c (finish_struct_1): Fix handling of named bitfield widths.
15374
15375 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15376
15377 * pt.c (add_pending_template): Handle types.
15378 (lookup_template_class): With -fexternal-templates, just add the class
15379 to pending_templates instead of instantiating it now.
15380 * decl2.c (finish_file): Handle types in pending_templates.
15381
15382 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
15383
15384 * decl2.c (grokbitfield): Handle constant decls appropriately.
15385 Give an appropriate error message now instead of spewing core
15386 later.
15387
15388 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15389
15390 * decl2.c: Don't turn on thunks by default for now.
15391
15392 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
15393
15394 * typeck.c (complete_type): Handle error_mark_node.
15395 (common_type, OFFSET_TYPE): Handle template_type_parms.
15396
15397 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15398
15399 * pt.c (instantiate_decl): If at_eof, call import_export_decl
15400 regardless of DECL_INLINE.
15401
15402 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15403
15404 * class.c (finish_struct_bits): Copy TYPE_SIZE.
15405
15406 * rtti.c (build_dynamic_cast): Support templates.
15407 * tree.def: Support DYNAMIC_CAST_EXPR.
15408 * pt.c (tsubst_copy): Likewise.
15409 * decl2.c (build_expr_from_tree): Likewise.
15410
15411 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15412
15413 * typeck.c (build_static_cast): Support templates.
15414 (build_const_cast): Likewise.
15415 * tree.def: Support CONST/STATIC_CAST_EXPR.
15416 * pt.c (tsubst_copy): Likewise.
15417 * decl2.c (build_expr_from_tree): Likewise.
15418
15419 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15420
15421 * decl2.c (finish_vtable_vardecl): Don't trust
15422 TREE_SYMBOL_REFERENCED for vtables of local classes.
15423
15424 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15425
15426 * pt.c (tsubst_copy): Handle operator T.
15427
15428 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15429
15430 * init.c (build_delete): Move creation of PARMS inside test of
15431 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15432
15433 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
15434
15435 * typeck.c (build_conditional_expr): Don't assume that
15436 the arguments to ?: are always pointers or records.
15437
15438 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15439
15440 * decl2.c (import_export_decl): Still emit static/weak/comdat
15441 copies of inline template functions with -fno-implicit-templates.
15442
15443 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
15444
15445 * init.c (build_delete): Determine the complete basetype
15446 path to the destructor we're calling.
15447
15448 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
15449
15450 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15451 initialize the enum, because we really and truly don't know where
15452 it came from.
15453 (start_enum): Don't copy integer_zero_node because
15454 build_enumerator will do it.
15455
15456 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15457
15458 * decl.c (finish_function): Do access control on base destructors.
15459
15460 * pt.c (tsubst, case FUNCTION_DECL): Set up
15461 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15462 hose us.
15463
15464 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
15465
15466 * cvt.c (build_up_reference): If we have already extended the
15467 lifetime of the temporary, don't try it again.
15468 * typeck.c (c_expand_return): Don't try and convert the return
15469 value twice when we want a reference, once is enough.
15470
15471 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15472
15473 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15474 LOOKUP_ONLYCONVERTING at all for now.
15475
15476 * search.c (add_conversions): Put the conversion function in
15477 TREE_VALUE, the basetype in TREE_PURPOSE.
15478 * cvt.c (build_type_conversion): Adjust.
15479 * cvt.c (build_expr_type_conversion): Adjust.
15480 * call.c (user_harshness): Adjust.
15481
15482 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15483
15484 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15485 backend's benefit.
15486
15487 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
15488
15489 * except.c (expand_start_catch_block): Add a dummy region, if we
15490 get an error, so that we can avoid core dumping later.
15491
15492 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
15493
15494 * cp-tree.h (OFFSET_REF): Remove.
15495 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15496 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15497 * init.c (expand_aggr_init_1): Likewise.
15498 (build_new): Likewise.
15499 * typeck.c (expand_target_expr): Likewise.
15500
15501 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15502
15503 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15504 TARGET_EXPR.
15505
15506 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
15507
15508 * cvt.c (build_up_reference): Redo how and when temporaries are
15509 created.
15510 * decl.c (grok_reference_init): Don't try and be smart about
15511 running cleanups.
15512
15513 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
15514
15515 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15516 (TARGET_EXPR...), now that it has 4 arguments.
15517 * tree.c (build_cplus_new): Likewise.
15518
15519 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15520
15521 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15522
15523 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15524 * decl.c (struct saved_scope): Remove named_labels,
15525 {base,member}_init_list.
15526 (maybe_push_to_top_level): Don't set them. Call
15527 push_cp_function_context if appropriate.
15528 (pop_from_top_level): Likewise.
15529
15530 * method.c (do_build_assign_ref): Remove obsolete check of
15531 TYPE_HAS_ASSIGN_REF (basetype).
15532
15533 * decl.c (grokfndecl): Diagnose user definition of
15534 implicitly-declared methods.
15535
15536 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
15537
15538 * method.c (do_build_copy_constructor): Add code to give
15539 meaningful error messages instead of crashing.
15540 (do_build_assign_ref): Don't synthesize assignment operators for
15541 classes containing reference or const members.
15542
15543 * class.c (struct base_info): Remove cant_synth_copy_ctor
15544 and cant_synth_asn_ref.
15545 (finish_base_struct): Remove the code that tries to conditionalize
15546 synthesis of copy constructors & assignment operators based on
15547 access permissions. Instead, let it fail when it tries to
15548 synthesize the copy constructor. This will give meaningful error
15549 messages instead of silently generating code to perform a bitcopy.
15550
15551 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
15552
15553 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15554 determining types for constant values.
15555
15556 * decl.c (struct named_label_list): Use instead of stuffing
15557 random items into a TREE_LIST node.
15558 (named_label_uses): Use the new struct.
15559 (poplevel): Likewise.
15560 (lookup_label): Likewise.
15561 (define_label): Add an error message to tell the user the line
15562 where the goto is located in addition to the destination of the
15563 goto.
15564 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15565 named_label_uses.
15566 (finish_function): Likewise.
15567
15568 (start_decl): Complain about defining a static data member
15569 in a different type from which it was declared.
15570
15571 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15572
15573 * cvt.c (build_expr_type_conversion): Adjust.
15574
15575 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15576
15577 * call.c (build_method_call): Always convert 'this' to the
15578 appropriate type.
15579
15580 * search.c (add_conversions): Put the conversion function in
15581 TREE_VALUE, the type in TREE_PURPOSE.
15582 * cvt.c (build_type_conversion): Adjust.
15583 * call.c (user_harshness): Adjust.
15584
15585 * method.c (emit_thunk): Call temporary_allocation and
15586 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15587
15588 * tree.c (build_cplus_array_type): Handle tweaking of
15589 TYPE_MAIN_VARIANT here.
15590 * typeck.c (common_type): Not here.
15591
15592 * typeck.c (complete_type): Only try to complete an array type if
15593 it has a domain.
15594
15595 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15596
15597 * decl.c (grokvardecl): Call complete_type.
15598 (grokdeclarator): Call complete_type for PARM_DECLs.
15599
15600 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15601
15602 * pt.c (instantiate_class_template): Re-set
15603 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15604
15605 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
15606
15607 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15608 smart enough to do it right.
15609 * tree.c (cp_expand_decl_cleanup): Likewise.
15610 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15611 cp_expand_decl_cleanup.
15612 (store_parm_decls): Likewise.
15613 (hack_incomplete_structures): Likewise.
15614 * except.c (push_eh_cleanup): Likewise.
15615
15616 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
15617
15618 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15619 frontend to the backend where it belongs.
15620 * tree.c (unsave_expr): Likewise.
15621 (unsave_expr_now): Likewise.
15622 * tree.def (UNSAVE_EXPR): Likewise.
15623 * cp-tree.h (unsave_expr): Likewise.
15624 (unsave_expr_now): Likewise.
15625
15626 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
15627
15628 * init.c (emit_base_init): Make sure the partial EH cleanups live
15629 on the function_obstack.
15630
15631 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
15632
15633 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15634 when checking for pointer types.
15635
15636 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15637
15638 * pt.c (instantiate_class_template): Remove obsolete check for
15639 access declarations.
15640
15641 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
15642
15643 * call.c (build_overload_call): Simplify calls to
15644 build_overload_call by removing last parameter.
15645 (build_method_call): Likewise.
15646 * cp-tree.h: Likewise.
15647 * method.c (build_opfncall): Likewise.
15648 * typeck.c (build_x_function_call): Likewise.
15649
15650 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
15651
15652 * call.c (default_parm_conversions): Factor out common code.
15653 (build_method_call): Use it.
15654 (build_overload_call_real): Use it.
15655
15656 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
15657
15658 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15659 but pedwarn as the code is bogus.
15660 * typeck.c (decay_conversion): Likewise.
15661 (build_function_call_real): Use build_addr_func instead of
15662 default_conversion. Don't allow pointer-to-method functions down
15663 here.
15664 (build_unary_op): Use real pointer-to-member functions instead of
15665 fake ones.
15666 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15667 (convert_for_assignment): Removed some obsolete code.
15668 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15669 build_x_function_call instead of current_class_ptr. Only call
15670 digest_init once on an initializer, we do this just checking
15671 TREE_TYPE.
15672 (build_expr_from_tree): Pass current_class_ref to
15673 build_x_function_call instead of current_class_ptr.
15674 * init.c (build_member_call): Likewise.
15675 * pase.y: Likewise.
15676 * error.c (dump_expr): Handle OFFSET_REFs better.
15677 * pt.c (unify): Handle pointer-to-member functions better.
15678 * decl.c (finish_function): Clear out current_class_ref just like
15679 we do for current_class_ptr.
15680
15681 * typeck.c (get_delta_difference): Handle virtual bases better.
15682
15683 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
15684
15685 * sig.c (build_signature_table_constructor): Use the delta for
15686 the original basetype for this virtual function with thunks.
15687 (build_signature_method_call): We still need to adjust 'this'
15688 with thunks.
15689
15690 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
15691
15692 * call.c (build_addr_func): New routine. Used to get the `real'
15693 address of a function or a method. Needed to avoid getting a
15694 pointer-to-member function.
15695 (build_call): New routine to build CALL_EXPRs.
15696 (build_method_call): Use it.
15697 * cvt.c (convert_to_aggr): Likewise.
15698 * typeck.c (build_function_call_real): Likewise.
15699 * sig.c (build_signature_table_constructor): Use build_addr_func.
15700 * cp-tree.h (build_call, build_addr_func): Declare them.
15701
15702 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
15703
15704 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15705 * parse.y: Remove uses of LOOKUP_AGGR.
15706
15707 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
15708
15709 * *.[chy]: Rename current_class_decl to current_class_ptr, and
15710 C_C_D to current_class_ref.
15711
15712 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15713
15714 * call.c (convert_harshness): Tighten up pointer conversions.
15715
15716 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
15717
15718 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15719 (finish_file): Likewise.
15720
15721 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15722
15723 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15724
15725 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15726 code.
15727
15728 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15729
15730 * decl2.c: Turn on thunks by default where supported.
15731
15732 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
15733
15734 * cp-tree.h (build_overload_call_maybe): Removed.
15735 * call.c (build_overload_call_real): Invert meaning of last arg to
15736 be require_complete.
15737 (build_overload_call): Likewise.
15738 * typeck.c (build_x_function_call): Use build_overload_call_real
15739 instead of build_overload_call_maybe.
15740
15741 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15742
15743 * decl2.c (finish_file): Don't try to emit functions that haven't
15744 been compiled.
15745
15746 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15747
15748 * decl2.c (finish_vtable_vardecl): Oops.
15749
15750 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15751 Also store the bindings from previous_class_values.
15752 (pop_from_top_level): Restore them.
15753
15754 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15755
15756 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
15757 symbol has been referenced.
15758 (finish_file): Re-join synthesis/vtable loop with inline emission
15759 loop, disable inlining when an inline is output.
15760
15761 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
15762
15763 * except.c (init_exception_processing): Setup saved_in_catch.
15764 (push_eh_cleanup): Reset __eh_in_catch.
15765 (expand_start_catch_block): Set __eh_in_catch.
15766
15767 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
15768
15769 * except.c (push_eh_cleanup): Add tracking for whether or not we
15770 have an active exception object.
15771 (expand_builtin_throw): Use it to make sure a rethrow without an
15772 exception object is caught.
15773
15774 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15775
15776 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
15777 cache.
15778
15779 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15780
15781 * decl2.c (finish_file): Also use sentries for vars with
15782 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
15783 created).
15784
15785 * lex.c (handle_cp_pragma): Disable #pragma
15786 interface/implementation if SUPPORTS_ONE_ONLY > 1.
15787
15788 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15789
15790 * method.c (emit_thunk): Wrap default case in
15791 temporary/permanent_allocation.
15792
15793 * method.c (make_thunk): Use DECL_ONE_ONLY.
15794 (emit_thunk): Call assemble_end_function.
15795
15796 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15797
15798 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
15799 (import_export_decl): Likewise.
15800 (finish_prevtable_vardecl): Disable vtable hack if
15801 SUPPORTS_ONE_ONLY > 1.
15802
15803 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
15804
15805 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
15806 PREDECREMENT_EXPRs take two arguments, not one.
15807
15808 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
15809
15810 * class.c (build_vtable_entry): Don't build thunks for abstract
15811 virtuals.
15812
15813 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
15814 frontend.
15815
15816 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
15817
15818 * class.c (set_rtti_entry): Use size_zero_node.
15819 (build_vtable): Likewise.
15820
15821 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
15822
15823 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
15824 (prepare_fresh_vtable): Likewise.
15825
15826 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
15827
15828 * method.c (emit_thunk): Call mark_used on the target function.
15829
15830 * call.c (build_method_call): Don't warn about pending templates.
15831
15832 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
15833
15834 * decl2.c (finish_file): Fix list walking logic.
15835
15836 * typeck2.c (check_for_new_type): Only warn if -pedantic.
15837
15838 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
15839
15840 * class.c (finish_struct_1): Remove old code for
15841 dont_allow_type_definitions.
15842 * cp-tree.h: Likewise.
15843 * spew.c: Make sure cp-tree.h is included before parse.h, so the
15844 definition of flagged_type_tree is found before it is used.
15845 * lex.c: Likewise.
15846 * parse.y: Added the ftype member to the type union, and changed a
15847 number of rules to use it instead of ttype. Added calls to
15848 check_for_new_type() as appropriate.
15849 * typeck2.c (check_for_new_type): New function for checking
15850 if a newly defined type appears in the specified tree.
15851 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
15852 for check_for_new_type().
15853
15854 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
15855
15856 * decl2.c (finish_file): Only use a sentry if the decl is public.
15857
15858 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
15859 don't pass LOOKUP_ONLYCONVERTING.
15860
15861 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
15862
15863 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
15864 properly keeps track of const and volatile type modifiers.
15865
15866 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15867
15868 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
15869 * pt.c (comp_template_args): Use it.
15870
15871 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
15872 assemble_external for artificial function decls.
15873
15874 * decl.c (cp_finish_decl): Oops.
15875
15876 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
15877
15878 * decl2.c (import_export_decl): Put static data member templates
15879 into common storage, or make them weak, depending on whether they
15880 are dynamically or statically initialized.
15881 (get_sentry): New function.
15882 (finish_file): Do import_export_decl for static data members before
15883 building the init/fini functions. Don't init/fini a variable that's
15884 EXTERNAL. Use a sentry for variables in common. Fix mismatching
15885 push/pop_temp_slots.
15886 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
15887 expand_static_init thang.
15888 * method.c (get_id_2): New function.
15889
15890 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
15891
15892 * parse.y (empty_parms): Make sure we use C++-style prototypes
15893 when we're declaring member functions.
15894
15895 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15896
15897 * Makefile.in (CONFLICTS): 16 s/r conflicts.
15898 * parse.y (self_template_type): New nonterminal.
15899
15900 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15901
15902 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
15903 name.
15904 * parse.y (base_class.1): Allow 'typename foo::bar'.
15905
15906 * lex.c (check_newline): Remove #pragma code that plays with the
15907 input stream, since we now deal with tokens. Clear nextchar when
15908 we're done.
15909 (handle_cp_pragma): Use real_yylex.
15910 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
15911 in one place.
15912
15913 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
15914
15915 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
15916
15917 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15918
15919 * parse.y: New token SELFNAME for potential constructor.
15920 * spew.c (yylex): Handle it.
15921 * lex.c (identifier_type): Produce it.
15922
15923 * parse.y (complete_type_name): In :: case, don't push class binding.
15924 (complex_type_name): Likewise.
15925
15926 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
15927
15928 * typeck.c (build_reinterpret_cast): Handle pointer to member
15929 functions.
15930
15931 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15932
15933 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
15934 pragmas.
15935 (check_newline): Put the vtable/unit/implementation/interface pragma
15936 code into handle_cp_pragma, replacing it with a call.
15937 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
15938 args. Get the next token after handling the pragma token.
15939
15940 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
15941
15942 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
15943 (convert_to_pointer_force): Likewise.
15944
15945 * init.c (build_new): Fix array new without -fcheck-new.
15946
15947 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15948
15949 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
15950 tree.c: Lose TYPE_NESTED_NAME.
15951
15952 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
15953 as identifiers.
15954
15955 * tree.def: Add VEC_INIT_EXPR.
15956 * expr.c (cplus_expand_expr): Handle it.
15957 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
15958 the extra file-scope symbol nastiness.
15959
15960 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15961
15962 * method.c (make_thunk): Thunks are static.
15963 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
15964
15965 * decl2.c (mark_vtable_entries): Emit thunks as needed.
15966 (finish_file): Don't emit them here.
15967
15968 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
15969
15970 * rtti.c (build_dynamic_cast): Handle null pointers.
15971 (ifnonnull): New function.
15972
15973 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
15974
15975 * call.c (build_method_call): Remember the original basetype we
15976 were called with. Give an error message instead of trying
15977 (incorrectly) to call a non-static member function through a
15978 non-inherited class.
15979
15980 * search.c (expand_upcast_fixups): Mark the new fixup as
15981 DECL_ARTIFICIAL.
15982
15983 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15984
15985 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
15986
15987 * class.c (set_rtti_entry): Fix for thunks.
15988
15989 * decl2.c (import_export_decl): Still emit typeinfo fns for
15990 cv-variants of builtin types.
15991
15992 * rtti.c (expand_class_desc): Set up base_info_type_node here.
15993 (init_rtti_processing): Instead of here.
15994
15995 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15996
15997 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
15998 (build_typeid): Only complain about taking dynamic typeid without
15999 -frtti.
16000
16001 * decl2.c: flag_rtti defaults to 1.
16002
16003 * rtti.c (get_tinfo_var): The general class case is now smaller.
16004 (init_rtti_processing): Pack the latter three fields of base_info
16005 into 32 bits.
16006
16007 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
16008
16009 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16010
16011 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
16012
16013 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16014 (push_memoized_context): Split out code to undefer pop_type_level to
16015 (clear_memoized_cache): here.
16016 (pop_memoized_context): We can only handle one layer of deferral of
16017 pop_type_level so clear the cache, if there was a previous level.
16018
16019 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16020
16021 * rtti.c (init_rtti_processing): Build up base_info_type_node.
16022 (expand_class_desc): Use one pointer to an array of base_info
16023 structs, passed using a CONSTRUCTOR.
16024
16025 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
16026
16027 * class.c (build_vbase_path): Remove block extern for
16028 flag_assume_nonnull_objects here.
16029 (build_vfn_ref): Split out functionality into build_vtbl_ref.
16030 (build_vtbl_ref): New routine.
16031 (build_vtable): Set up rtti info here.
16032 (add_virtual_function): Note in CLASSTYPE_RTTI the best
16033 place where we can get the rtti pointers from to avoid having to
16034 search around for a place.
16035 (finish_base_struct): Likewise.
16036 (finish_struct_1): Likewise. Never create totally new vtables
16037 with totally new vtable pointers for rtti. Disable code to layout
16038 vtable pointers better until we want to break binary
16039 compatibility.
16040 * rtti.c (build_headof_sub): New routine to convert down to a
16041 sub-object that has an rtti pointer in the vtable.
16042 (build_headof): Use it. Also, use build_vtbl_ref now to be more
16043 maintainable.
16044 (build_dynamic_cast): Make sure we have saved it, if we need to.
16045 * search.c (dfs_init_vbase_pointers): Disable code that deals with
16046 a more efficient vtable layout, enable later.
16047 * call.c (flag_assume_nonnull_objects): Moved declaration to
16048 * cp-tree.h: here. Declare build_vtbl_ref.
16049 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16050 function calls that want a tree.
16051
16052 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16053
16054 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16055 other X subobjects in the most derived type. Ack.
16056
16057 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16058 get_typeid will do it for us.
16059 (get_typeid_1): Break out call-building for expand_*_desc to use.
16060 (get_typeid): Call it.
16061 (expand_*_desc): Likewise.
16062 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16063 and void *.
16064 (init_decl_processing): Lose builtin_type_tdescs lossage.
16065 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16066
16067 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
16068
16069 * pt.c (tsubst): When calling set_nested_typename, use
16070 TYPE_NESTED_NAME (current_class_type) instead of
16071 current_class_name.
16072
16073 * decl.c (pushdecl): Likewise.
16074 (pushdecl_class_level): Likewise.
16075 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16076 set_nested_typename.
16077
16078 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16079
16080 * rtti.c (synthesize_tinfo_fn): Handle arrays.
16081
16082 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16083
16084 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16085
16086 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16087 (init_rtti_processing): Lose bad_cast_type.
16088 (build_dynamic_cast): Use throw_bad_cast.
16089
16090 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16091
16092 * decl2.c (finish_file): Don't synthesize artificial functions
16093 that are external and not inline.
16094
16095 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16096
16097 * decl2.c (finish_file): Handle having new inlines added to
16098 saved_inlines by synthesis.
16099
16100 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16101
16102 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16103
16104 RTTI rewrite to initialize nodes as needed, not require that
16105 users #include <typeinfo>, complete functionality and reduce wasted
16106 space.
16107 * rtti.c (init_rtti_processing): New fn.
16108 (build_typeid): The vtable entry is now a function.
16109 (get_tinfo_var): New fn.
16110 (get_tinfo_fn): Likewise.
16111 (get_typeid): Use it.
16112 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16113 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16114 points __rtti_*.
16115 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16116 (synthesize_tinfo_fn): New fn.
16117 * method.c (build_t_desc_overload): Lose.
16118 (build_overload_with_type): More generic.
16119 * decl.c (init_decl_processing): Call init_rtti_processing.
16120 * class.c (set_rtti_entry): Use get_tinfo_fn.
16121 * decl2.c (mark_vtable_entries): Mark the rtti function.
16122 (finish_prevtable_vardecl): Don't build_t_desc.
16123 (import_export_decl): Handle tinfo functions.
16124 (finish_file): Likewise.
16125 * typeck.c (inline_conversion): New fn.
16126 (build_function_call_real): Use it.
16127 * cp-tree.h: Add decls.
16128
16129 * method.c (hack_identifier): Also convert component_refs from
16130 references.
16131
16132 * lex.c (cons_up_default_function): Use the type, not the name, in
16133 declspecs.
16134
16135 * decl2.c (import_export_vtable): Fix weak vtables.
16136
16137 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
16138
16139 * search.c (get_base_distance_recursive): Fix access checks for
16140 protected bases.
16141
16142 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16143
16144 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16145 cp-tree.h.
16146 (convert_harshness): Add prototypes wrapped by PROTO.
16147 * decl2.c (grok_function_init): Likewise.
16148 (do_toplevel_using_decl): Change to void return type.
16149 * class.c (build_vtable_entry): Remove decl of make_thunk.
16150 (merge_overrides): Fix order of arg definitions.
16151 (finish_vtbls): Likewise.
16152 (fixup_vtable_deltas): Likewise.
16153 (modify_all_direct_vtables): Likewise.
16154 (modify_all_indirect_vtables): Likewise.
16155 * search.c (get_base_distance_recursive): Likewise.
16156 (get_abstract_virtuals_1): Likewise.
16157 (fixup_virtual_upcast_offsets): Likewise.
16158 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16159 * init.c (perform_member_init): Fix order of arg definitions.
16160 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16161 * cp-tree.h (make_thunk): Add decl.
16162 (overload_template_name, push_template_decl): Add decls.
16163 (do_toplevel_using_decl): Change to void return type.
16164 (vec_binfo_member): Add decl.
16165
16166 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16167
16168 * typeck.c (mark_addressable, convert_for_assignment,
16169 convert_for_initialization, pointer_int_sum, pointer_diff,
16170 unary_complex_lvalue): Add prototypes wrapped by PROTO.
16171 (convert_sequence): #if 0 fn decl, since definition also is.
16172
16173 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
16174
16175 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16176 cast to pointer types for type searching.
16177
16178 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16179
16180 * typeck.c (get_delta_difference): Use cp_error, not error, in the
16181 case where BINFO == 0.
16182
16183 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
16184
16185 * call.c (build_method_call): Fix wording of error messages so
16186 constructors come out right.
16187
16188 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
16189
16190 * decl.c (push_overloaded_decl): Don't warn about hidden
16191 constructors when both the type and the function are declared
16192 in a system header file.
16193
16194 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
16195
16196 * class.c (finish_struct_1): Propagate the TYPE_PACKED
16197 flag for the type to the type's fields.
16198
16199 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16200
16201 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
16202
16203 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
16204
16205 * class.c (base_info, finish_base_struct): Replace
16206 needs_virtual_dtor with base_has_virtual.
16207
16208 (finish_struct_1): Remove the old code that tried to make default
16209 destructors virtual. Use base_has_virtual when checking if we need
16210 to add a vtable entry for the rtti code.
16211
16212 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16213
16214 * pt.c (push_template_decl): Complain about template decl with
16215 inappropriate declaration.
16216
16217 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
16218
16219 * typeck.c (build_x_unary_op): Remove bogus check for taking
16220 the address of a member function.
16221
16222 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16223
16224 * parse.y (constructor_declarator): Only push the class if
16225 we are not already in the class.
16226
16227 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
16228
16229 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
16230 Add additional argument to INIT_CUMULATIVE_ARGS.
16231
16232 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16233
16234 * decl.c (shadow_tag): Fix error about anon union with methods.
16235
16236 * parse.y (self_reference): Only generate a self-reference if this
16237 is a non-template class.
16238 (opt.component_decl_list): Only use it if it was generated.
16239
16240 * parse.y (component_decl_1): Use constructor_declarator.
16241 (fn.def2): Likewise.
16242 (notype_component_declarator0): Likewise.
16243
16244 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
16245
16246 * typeck.c (build_x_unary_op): Add checks for taking the address
16247 of a TARGET_EXPR or of a member function, and give appropriate
16248 warnings.
16249
16250 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16251
16252 * pt.c (process_template_parm): Allow template type parms to be
16253 used as types for template const parms.
16254
16255 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
16256
16257 * init.c (expand_vec_init): Ensure the eh cleanups are on the
16258 function_obstack.
16259
16260 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16261
16262 * decl.c (lookup_name_real): Be even more picky about the
16263 ambiguous lookup warning.
16264 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
16265 * parse.y (constructor_declarator): Rather than here.
16266
16267 * parse.y (constructor_declarator): New nonterminal.
16268 (fn.def1): Use it.
16269 (explicit_instantiation): Likewise.
16270
16271 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16272
16273 Add implicit declaration of class name at class scope.
16274 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
16275 * parse.y (self_reference): New nonterminal.
16276 (opt.component_decl_list): Use it.
16277 (fn.def1): Add nested_name_specifier type_name cases.
16278 * class.c (build_self_reference): New function.
16279 (finish_struct): Handle access_default later, move self-reference
16280 decl to the end.
16281 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
16282 * cp-tree.h: Adjust.
16283
16284 * pt.c (do_function_instantiation): Separate handling of member
16285 functions and non-member functions properly.
16286
16287 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16288
16289 * pt.c (process_template_parm): Improve error for 'volatile class K'.
16290
16291 * class.c (finish_struct_1): Check the right slot for destructors.
16292
16293 * decl.c (start_enum): Complain about enum templates.
16294
16295 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
16296
16297 * init.c (resolve_offset_ref): Offset pointers to member data by one.
16298 * typeck.c (unary_complex_lvalue): Likewise.
16299
16300 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
16301
16302 * typeck.c (c_expand_return): Check for a returned local
16303 array name, similar to the check for an ADDR_EXPR.
16304
16305 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16306
16307 * decl.c (cp_finish_decl): Don't build cleanups for static
16308 variables here.
16309
16310 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
16311
16312 * typeck.c (build_modify_expr): Fix error messages to be more
16313 accurate.
16314 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
16315 assignment operators.
16316 * error.c (assop_as_string): Likewise. Add support for `%Q' for
16317 assignment operators.
16318
16319 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16320
16321 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
16322 give an error if initialized. pedwarn about nested type with the
16323 same name as its enclosing class.
16324
16325 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
16326
16327 * typeck.c (require_complete_type): Be sure to instantiate the
16328 MAIN_VARIANT of the type.
16329
16330 * decl2.c (finish_file): Instantiate pending templates before
16331 processing static constructors and destructors.
16332
16333 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
16334 unless at_eof.
16335
16336 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
16337
16338 * decl2.c (delete_sanity): If error_mark_node is passed
16339 in as an expression, quit while we're ahead.
16340
16341 * decl.c (grokdeclarator): Give an error message if `friend'
16342 is combined with any storage class specifiers.
16343
16344 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
16345
16346 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
16347 definition of nonexistent nested type.
16348
16349 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
16350 not to say 'typedef'.
16351
16352 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16353
16354 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
16355 * search.c (dfs_walk, dfs_init_vbase_pointers,
16356 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
16357 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
16358
16359 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16360
16361 * except.c (build_throw): Support minimal parse.
16362 * pt.c (tsubst_copy): Support THROW_EXPR.
16363 * decl2.c (build_expr_from_tree): Likewise.
16364
16365 * pt.c (mangle_class_name_for_template): Always allocate
16366 scratch_firstobj.
16367
16368 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
16369
16370 * cvt.c (cp_convert_to_pointer): Give an appropriate error
16371 when trying to cast from an incomplete type.
16372
16373 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16374
16375 * pt.c (instantiate_class_template): Don't bother setting up
16376 CLASSTYPE_TAGS explicitly, as the nested types will add
16377 themselves.
16378
16379 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
16380
16381 * decl.c (shadow_tag): Remove old error check for usage of
16382 an enum without a previous declaration.
16383 (xref_tag): Add error message about usage of enums without a
16384 previous declaration.
16385
16386 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16387
16388 * lex.c (do_identifier): Only do name consistency check if we're
16389 parsing.
16390
16391 * pt.c (push_template_decl): Don't crash if we get a member defn
16392 that doesn't match.
16393
16394 * decl.c (xref_tag_from_type): New function to do an xref without
16395 always having to figure out code_type_node.
16396 * cp-tree.h: Declare it.
16397 * pt.c (instantiate_class_template): Use it for friend classes.
16398 (lookup_template_class): Use it.
16399
16400 * typeck2.c (build_functional_cast): Pull out a single parm before
16401 passing it to build_c_cast.
16402
16403 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
16404
16405 * expr.c (do_case): Give an error message if a pointer is
16406 given as a case value.
16407
16408 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16409
16410 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16411 an overload list.
16412
16413 * lex.c (cons_up_default_function): Really, now, interface hackery
16414 does not apply to synthesized methods.
16415
16416 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
16417
16418 * call.c (build_method_call): Ctors and dtors now have special names
16419 with respect to lookups.
16420 * class.c (add_method): Likewise.
16421 (grow_method): Likewise.
16422 (finish_struct_methods): Likewise.
16423 (warn_hidden): Likewise.
16424 (finish_struct_1): Likewise.
16425 * cvt.c (convert_to_reference): Likewise.
16426 (convert_to_aggr): Likewise.
16427 (cp_convert): Likewise.
16428 * decl2.c (check_classfn): Likewise.
16429 * init.c (expand_member_init): Likewise.
16430 (expand_default_init): Likewise.
16431 (expand_aggr_init_1): Likewise.
16432 (build_offset_ref): Likewise.
16433 (build_new): Likewise.
16434 (build_delete): Likewise.
16435 * lex.c (do_inline_function_hair): Likewise.
16436 * search.c (lookup_field_1): Likewise.
16437 (lookup_fnfields_here): Likewise.
16438 (lookup_field): Likewise.
16439 (lookup_fnfields): Likewise.
16440 (get_virtual_destructor): Likewise.
16441 (dfs_debug_mark): Likewise.
16442 (dfs_pushdecls): Likewise.
16443 (dfs_compress_decls): Likewise.
16444 * tree.c (layout_basetypes): Likewise.
16445 * typeck.c (build_component_ref): Likewise.
16446 (build_x_function_call): Likewise.
16447 (build_modify_expr): Likewise.
16448 (convert_for_initialization): Likewise.
16449 (build_functional_cast): Likewise.
16450 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16451 (CTOR_NAME): New.
16452 (DTOR_NAME): New.
16453 * decl.c (ctor_identifier): New.
16454 (dtor_identifier): New.
16455 (init_decl_processing): Set them.
16456
16457 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
16458
16459 * typeck.c (build_component_ref): Don't get confused by fields whose
16460 context has no type name, like pointer to member functions.
16461
16462 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16463
16464 * decl.c (grokdeclarator): Handle typedef without declarator.
16465
16466 * pt.c (tsubst): Handle SCOPE_REF in declarator.
16467
16468 * parse.y (bad_parm): Catch another case of missing `typename'.
16469
16470 * lex.c (yyprint): Handle TYPE_DECLs.
16471
16472 * decl.c (start_function): Don't try to be clever.
16473
16474 * lex.c: Lose compiler_error_with_decl.
16475 * typeck2.c: Lose error_with_aggr_type.
16476 (incomplete_type_error): Use cp_* instead of old functions.
16477 (readonly_error): Likewise.
16478 * typeck.c (convert_arguments): Likewise.
16479 * search.c (lookup_nested_field): Likewise.
16480 * method.c (make_thunk): Likewise.
16481 * decl.c (grokparms): Likewise.
16482 * cp-tree.h: Update.
16483
16484 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16485 and value.
16486
16487 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
16488
16489 * method.c (build_opfncall): When deleting a pointer to an
16490 array, build a new pointer to the tree past any ARRAY_TYPE
16491 nodes.
16492
16493 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16494
16495 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16496
16497 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16498
16499 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16500 and ! DECL_INLINE.
16501
16502 * decl.c (finish_function): Don't set nested based on
16503 hack_decl_function_context.
16504 * parse.y (function_try_block): Check for nested function.
16505 (pending_inlines): Likewise.
16506
16507 * decl2.c (build_expr_from_tree): If a unary op already has a
16508 type, just return it.
16509
16510 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16511
16512 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16513 (finish_file): Check the return value of walk_vtables.
16514 (finish_prevtable_vardecl): Return int.
16515 (finish_vtable_vardecl): Likewise.
16516 (prune_vtable_vardecl): Likewise.
16517 * lex.c (set_vardecl_interface_info): Likewise.
16518 * cp-tree.h: Adjust return types.
16519
16520 * class.c (delete_duplicate_fields_1): Don't complain about
16521 duplicate nested types if they're the same type.
16522 (finish_struct): Remove check for duplicate.
16523 * decl2.c (grokfield): Don't check for typedef of anonymous type.
16524
16525 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16526
16527 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16528
16529 * decl.c (grokdeclarator): Lose special handling of class-level
16530 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
16531 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16532
16533 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16534
16535 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16536
16537 * search.c (compute_access): Fix handling of anonymous union
16538 members.
16539 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16540 from anonymous unions to their members.
16541
16542 * typeck.c (build_x_function_call): For static member functions,
16543 hand off to build_member_call.
16544
16545 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16546
16547 * typeck.c (build_component_ref): Handle OFFSET_REFs.
16548
16549 * init.c (expand_vec_init): Fix init == 0 case.
16550
16551 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16552
16553 * init.c (build_new): pedwarn about init and array new.
16554 (expand_vec_init): Handle lists, use convert_for_initialization.
16555
16556 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16557 when converting to an aggregate type.
16558 * cvt.c (cp_convert): Pass it through.
16559
16560 * typeck.c (build_conditional_expr): Handle user-defined
16561 conversions to slightly different types.
16562
16563 * decl.c (grokdeclarator): Force an array type in a parm to be
16564 permanent.
16565
16566 * decl2.c (do_using_directive): Sorry.
16567 (do_namespace_alias): Likewise.
16568 * lex.c (real_yylex): Warn about using the `namespace' keyword.
16569
16570 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16571
16572 * parse.y (datadef): Move call to note_list_got_semicolon up.
16573
16574 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
16575
16576 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16577
16578 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
16579
16580 * decl.c (cp_finish_decl): The exception regions have to be
16581 nested, not overlapping. We start the exception region for a
16582 decl, after it has been fully built, and all temporaries for it
16583 have been cleaned up.
16584
16585 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
16586
16587 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16588
16589 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16590
16591 * tree.def: Add RETURN_INIT.
16592 * pt.c (instantiate_decl): Handle RETURN_INIT.
16593 * decl.c (store_return_init): Handle minimal_parse_mode.
16594
16595 * tree.c (cp_build_type_variant): Just return an error_mark_node.
16596 * decl.c (make_typename_type): Don't try to get the file and line
16597 of an identifier.
16598 * typeck.c (comptypes): Handle TYPENAME_TYPE.
16599
16600 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
16601
16602 * decl.c (poplevel): Make sure we clear out and restore old local
16603 non-VAR_DECL values by default when they go out of scope.
16604
16605 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16606
16607 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16608 referring to addresses of variables and functions.
16609
16610 * error.c (dump_expr): Support SIZEOF_EXPR.
16611
16612 * init.c (do_friend): Use the return value of check_classfn.
16613
16614 * typeck.c (convert_arguments): Call complete_type.
16615
16616 * method.c (hack_identifier): After giving an error, set value to
16617 error_mark_node.
16618
16619 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16620
16621 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16622 lossage for local classes.
16623 * cp-tree.h: Declare it.
16624 * decl.c (lookup_name_real): Evil, painful hack for local classes.
16625 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16626 Use hack_decl_function_context.
16627 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16628 (start_function): Use hack_decl_function_context.
16629 (finish_function): Likewise.
16630 * method.c (synthesize_method): Likewise.
16631 * lex.c (process_next_inline): Likewise.
16632 (do_pending_inlines): Likewise.
16633 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16634 done with it.
16635
16636 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
16637
16638 * sig.c (build_signature_pointer_or_reference_type): Align
16639 signature pointers/references on 8-byte boundaries so they can be
16640 grabbed 2 words at a time on a Sparc.
16641
16642 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
16643
16644 * method.c (hack_identifier): Requiring a static chain is now a
16645 hard error.
16646 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16647 functions.
16648
16649 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16650
16651 * init.c (build_offset_ref): Call complete_type.
16652
16653 * decl.c (pop_from_top_level): Always pop previous_class_type.
16654
16655 * parse.y: Handle multiple decls in a for-init-statement.
16656 * pt.c (tsubst_expr): Likewise.
16657
16658 * pt.c (tsubst): Use tsubst_expr for the second operand of an
16659 ARRAY_REF.
16660
16661 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16662 (poplevel_class): Set it here.
16663 (pop_from_top_level): Pop it here if we're returning to class scope.
16664 * class.c (pushclass): Don't set it here.
16665
16666 * decl.c (maybe_push_to_top_level): Save current_template_parms,
16667 and clear it if !pseudo.
16668 (pop_from_top_level): Restore it.
16669
16670 * decl2.c (finish_file): Push the dummy each time we walk the list
16671 of vtables.
16672
16673 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16674 something for CAST_EXPR.
16675
16676 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16677
16678 * cvt.c (cp_convert): Warn about implicit conversion of the
16679 address of a function to bool, as it is always true.
16680
16681 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16682
16683 * typeck.c (c_expand_return): Fix warning for local externs returned.
16684
16685 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
16686
16687 * tree.c (mapcar): Propagate const and volatile properly.
16688
16689 * typeck.c (complete_type): Be sure to instantiate the
16690 MAIN_VARIANT of the type.
16691
16692 * method.c (synthesize_method): Class interface hackery does not
16693 apply to synthesized methods.
16694
16695 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16696
16697 * pt.c (comp_template_args): Use comptypes rather than just
16698 checking for TEMPLATE_TYPE_PARM equivalence.
16699
16700 * typeck.c (build_x_function_call): Call complete_type before
16701 checking TYPE_OVERLOADS_CALL_EXPR.
16702
16703 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
16704
16705 * g++.c (main): Check also for new define ALT_LIBM.
16706
16707 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16708
16709 * pt.c (instantiate_class_template): If we don't have a pattern
16710 yet, that's OK.
16711 (coerce_template_parms): If we see a local class, bail.
16712
16713 * decl.c (grok_reference_init): Make sure there's a type before
16714 checking its code.
16715
16716 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16717 (push_template_decl): Likewise.
16718
16719 * parse.y (named_class_head): Set
16720 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16721
16722 * decl.c (xref_tag): Diagnose redeclaration of template
16723 type-parameter name.
16724
16725 * error.c (dump_type): Handle anonymous template type parms.
16726
16727 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16728 TYPE_STUB_DECL.
16729 (coerce_template_parms): Likewise.
16730
16731 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
16732
16733 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16734 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16735
16736 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16737
16738 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16739 before trying to get its STUB_DECL.
16740 (coerce_template_parms): Likewise.
16741
16742 * parse.y (template_type_parm): If they didn't use 'class',
16743 pretend they did after giving an error.
16744
16745 * pt.c (coerce_template_parms): Diagnose use of local class.
16746
16747 * decl.c (grok_reference_init): Use instantiate_type.
16748
16749 * error.c (dump_expr): Handle TEMPLATE_DECLs.
16750
16751 * parse.y (named_class_head): Diagnose mismatching types and tags.
16752
16753 * decl.c (pushdecl): Type decls and class templates clash with
16754 artificial type decls, not hide them.
16755
16756 * decl.c (redeclaration_error_message): Diagnose redefinition of
16757 templates properly.
16758 (duplicate_decls): Diagnose disallowed overloads for template
16759 functions, too.
16760
16761 * decl.c (start_decl): Call complete_type before checking for a
16762 destructor.
16763
16764 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
16765
16766 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
16767
16768 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16769
16770 * decl.c (grok_op_properties): Don't check for operator++(int) in
16771 a template.
16772
16773 * tree.c (perm_manip): Return a copy of variable and function
16774 decls with external linkage.
16775
16776 * tree.def: Change some of the min tree codes to type "1".
16777 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
16778 * method.c (build_overload_int): Emit something arbitrary for
16779 anything but an INTEGER_CST if we're in a template.
16780
16781 * decl.c (cp_finish_decl): Call complete_type before deciding
16782 whether or not to lay out the decl.
16783
16784 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
16785
16786 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16787
16788 * typeck2.c (build_x_arrow): Call complete_type.
16789
16790 * pt.c (add_pending_template): Broken out.
16791 (lookup_template_class): If -fexternal-templates, call it for all
16792 the methods of implemented types.
16793 (instantiate_class_template): Instead of instantiating them here.
16794 (instantiate_decl): Handle -fexternal-templates earlier.
16795
16796 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16797
16798 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
16799 memoized lookup stuff inside GATHER_STATISTICS.
16800
16801 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
16802
16803 * decl.c (start_decl): Complain about array of incomplete type
16804 here.
16805 (grokdeclarator): Not here.
16806
16807 * parse.y (template_parm): Expand full_parm inline so we can set
16808 the rule's precedence.
16809
16810 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
16811 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
16812 * decl2.c (grokbitfield): Don't check for integer constant here.
16813 * class.c (finish_struct_1): Check here.
16814
16815 * decl.c (define_label): Make the min decl go on permanent_obstack.
16816
16817 * pt.c (unify): Don't handle CONST_DECLs.
16818 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
16819 (tsubst_copy): Likewise.
16820
16821 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
16822 CONST_DECL for a template parm.
16823
16824 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
16825
16826 * decl.c (grokdeclarator): Complain about array of incomplete type
16827 here.
16828 (start_decl_1): Not here.
16829
16830 * pt.c (tsubst): Handle pointer-to-function declarators.
16831
16832 * method.c (hack_identifier): If pedantic, diagnose local class
16833 methods that require a static chain.
16834
16835 * decl.c (grok_op_properties): No longer static.
16836 * cp-tree.h: Declare it.
16837 * pt.c (tsubst): Call it for operators.
16838 Use tsubst_copy for TREE_VECs.
16839
16840 * parse.y (template_arg): The expr has precedence like '>'.
16841
16842 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
16843
16844 * pt.c (coerce_template_parms): Don't coerce an expression using
16845 template parms.
16846 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
16847 (tsubst): Don't use build_index_2_type if the max_value uses template
16848 parms.
16849 * method.c (build_overload_int): Emit something arbitrary for an
16850 expression using template parms.
16851
16852 * parse.y (template_close_bracket): New non-terminal to catch use
16853 of '>>' instead of '> >' in template class names.
16854 (template_type): Use it.
16855 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
16856
16857 * tree.def: Add CAST_EXPR.
16858 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
16859 CONVERT_EXPR for minimal_parse_mode.
16860 * typeck.c (build_c_cast): Likewise.
16861 * pt.c (tsubst_copy): Likewise.
16862 * decl2.c (build_expr_from_tree): Likewise.
16863 * error.c (dump_expr): Likewise.
16864
16865 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16866
16867 * except.c (SetTerminate, SetUnexpected): Put back global vars.
16868 (init_exception_processing): Put back decl/init of
16869 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
16870 fns from libstdc++.
16871
16872 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
16873 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
16874 Delete unused fns.
16875 * cp-tree.h (declare_uninstantiated_type_level,
16876 uninstantiated_type_level_p): Delete prototypes.
16877
16878 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16879
16880 * pt.c (tsubst_expr): Add default return.
16881
16882 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16883
16884 * error.c (fndecl_as_string): Delete unused arg CNAME.
16885 * sig.c (build_signature_table_constructor,
16886 build_signature_method_call): Fix calls.
16887
16888 * class.c (the_null_vtable_entry): Delete var definition.
16889 (init_class_processing): Delete tree the_null_vtable_entry init.
16890 * decl.c (no_print_{functions, builtins}): Declare as static.
16891 (__tp_desc_type_node): #if 0 var definition.
16892 (init_type_desc): #if 0 init of __tp_desc_type_node.
16893 (vb_off_identifier): Move var decl into init_decl_processing.
16894 (current_function_assigns_this): Declare as static.
16895 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
16896 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
16897 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
16898 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
16899 * init.c (BI_header_type, BI_header_size): Declare as static.
16900 * pt.c (template_classes): Delete unused var.
16901 (add_pending_template): Delete decl for non-existent fn.
16902 (lookup_template_class): Delete vars CODE and TAG_CODE.
16903 (instantiate_template): Delete unused var TARGS.
16904 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
16905 Delete decls.
16906 (__tp_desc_type_node): #if 0 var decl.
16907 (fndecl_as_string): Fix prototype.
16908
16909 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16910
16911 * tree.def: Add GOTO_STMT.
16912 * pt.c (tsubst_expr): Support goto and labels.
16913 * decl.c (define_label): Support minimal parsing.
16914 * parse.y (simple_stmt): Likewise.
16915
16916 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16917
16918 * xref.c (GNU_xref_member): Only define/set var I if
16919 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
16920 used.
16921 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
16922 (GNU_xref_end): Fix call.
16923 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
16924 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
16925
16926 * tree.c (build_exception_variant): Delete unused vars I, A, T,
16927 T2, and CNAME.
16928 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
16929 (mapcar): Delete unused var CODE.
16930 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
16931 (break_out_cleanups): Fix call.
16932 (bot_manip): Likewise.
16933 * call.c (build_method_call): Likewise.
16934 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
16935 Likewise.
16936 * typeck.c (unary_complex_lvalue, build_modify_expr,
16937 convert_for_initialization): Likewise.
16938 * typeck2.c (build_functional_cast): Likewise.
16939 * cp-tree.h (build_cplus_new): Fix prototype.
16940
16941 * repo.c (open_repo_file): Delete unused var Q.
16942 (repo_compile_flags, repo_template_declared,
16943 repo_template_defined, repo_class_defined, repo_inline_used,
16944 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
16945 (repo_get_id, repo_vtable_used): Declare as static.
16946 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
16947 prototypes.
16948
16949 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16950
16951 * parse.y (pending_inlines): Add function_try_block case.
16952
16953 * pt.c (unify): Fix for template const parms.
16954
16955 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16956
16957 * lex.c (extract_interface_info): Delete forward decl.
16958 (default_copy_constructor_body, default_assign_ref_body): Delete
16959 decls for non-existent functions.
16960 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
16961 (init_lex): Delete setting them.
16962 (cons_up_default_function): Delete unused vars FUNC_BUF,
16963 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
16964 #if 0'd synth code.
16965 (toplevel, expression_obstack): Delete unused extern decls.
16966 (tree_node_kind): Delete unused enum.
16967 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
16968 GATHER_STATISTICS.
16969 (tree_node_kind_names): Delete unused extern decl.
16970 (synth_obstack): Delete unused var.
16971 (init_lex): Don't set it.
16972 (init_parse): Add decl before use.
16973 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
16974 (current_unit_{name, language}): Delete unused vars.
16975 (check_newline): Don't bother setting them, just accept the #pragma.
16976 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
16977 (current_unit_{name, language}): Delete decls.
16978
16979 * search.c: Wrap all of the memoized functions, macros, and
16980 variables inside #ifdef GATHER_STATISTICS.
16981 (lookup_field, lookup_fnfields): Likewise.
16982 (init_search_processing): Likewise.
16983 (reinit_search_statistics): Wrap whole function.
16984 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
16985
16986 * decl.c (finish_function): Only call pop_memoized_context if
16987 GATHER_STATISTICS is defined.
16988 (start_function): Likewise for push_memoized_context.
16989 * class.c (pushclass, popclass): Likewise.
16990
16991 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
16992 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
16993
16994 * cvt.c (cp_convert): Delete unused local var FORM.
16995 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
16996 prototypes.
16997
16998 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16999
17000 * pt.c (do_poplevel): Oops; really return what we get from
17001 poplevel this time.
17002
17003 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17004
17005 * cp-tree.h (is_aggr_type): Add prototype.
17006
17007 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17008 * method.c ({push,pop}_cp_function_context): Delete decls.
17009 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17010 (SetUnexpected, SetTerminate): Delete unused vars.
17011 (init_exception_processing): Don't set SetUnexpected or
17012 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17013 (output_exception_table_entry): Delete unused array LABEL.
17014 (expand_internal_throw): Delete unused var PARAMS.
17015 (expand_start_catch_block): Delete unused var CLEANUP.
17016 (emit_exception_table): Delete unused var EH_NODE_DECL.
17017 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17018 GOTO_UNWIND_AND_THROW. Don't set them.
17019 (end_eh_unwinder): Add top decl.
17020 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17021 (exception_section, push_rtl_perm, do_function_call,
17022 lang_interim_eh, push_eh_cleanup, eh_outer_context,
17023 expand_end_eh_spec, end_eh_unwinder): Declare as static.
17024 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17025 throw_used): Likewise.
17026 * cp-tree.h (expand_end_eh_spec): Delete prototype.
17027
17028 * search.c (dfs_mark, dfs_mark_vtable_path,
17029 dfs_unmark_vtable_path, dfs_mark_new_vtable,
17030 dfs_unmark_new_vtable, dfs_clear_search_slot,
17031 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17032 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17033 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17034 functions.
17035 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17036 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17037 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17038 Only define #ifdef GATHER_STATISTICS.
17039 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17040 is defined.
17041 (vbase_decl): Delete var definition.
17042 (init_search): Delete old decl.
17043 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17044 never actually used.
17045 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17046 (get_base_distance_recursive): Delete unused fourth arg
17047 BASETYPE_PATH. Fix call .
17048 (get_base_distance): Fix call.
17049 (push_class_decls): Delete unused var ID.
17050 (make_memoized_table_entry): Declare as static.
17051 (breadth_first_search): Declare as static.
17052 (tree_has_any_destructor_p): Declare as static.
17053 (pop_class_decls): Delete unused arg pop_class_decls.
17054 * class.c (popclass): Fix call to pop_class_decls.
17055 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17056 tree_has_any_destructor_p): Delete prototypes.
17057
17058 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17059 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
17060 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17061 (build_user_desc): Delete unused var T.
17062 (build_class_desc): Delete unused vars T and OFF.
17063 (build_t_desc): Delete unused var NAME_STRING.
17064 (build_headof): Make static.
17065 (get_bad_cast_node): Likewise.
17066 (get_def_to_follow): Likewise.
17067 * cp-tree.h (init_type_desc): Add prototype.
17068 (build_headof): Remove prototype.
17069
17070 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17071
17072 * pt.c (tsubst): Only look for matching decls at file scope for
17073 non-member functions.
17074
17075 * call.c (build_scoped_method_call): Handle scoped destructor
17076 calls in templates.
17077
17078 * decl.c (*_top_level): Also save previous_class_values.
17079
17080 * pt.c (tsubst_expr): Support do {} while loops.
17081 * parse.y (simple_stmt): Likewise.
17082 * tree.def: Likewise.
17083
17084 * method.c (build_overload_identifier): For a class nested in a
17085 template class, don't mangle in the template parms from our
17086 context.
17087
17088 * lex.c, cp-tree.h: Remove support for template instantiations in
17089 the pending_inlines code.
17090 * pt.c: Remove dead functions and unused arguments.
17091 (uses_template_parms): TYPENAME_TYPEs always use template parms.
17092 * parse.y: Stop passing anything to end_template_decl.
17093 * tree.c (print_lang_statistics): Only print tinst info #ifdef
17094 GATHER_STATISTICS.
17095
17096 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17097
17098 * init.c (expand_recursive_init{,_1}): Delete decls.
17099 (sort_member_init): Delete unused var INIT.
17100 (emit_base_init): Delete unused var X.
17101 (build_offset_ref): Delete unused var CNAME.
17102 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17103 (emit_base_init): Delete unused local var BASE. Delete extern
17104 decl of IN_CHARGE_IDENTIFIER.
17105 (build_delete): Delete unused local var VIRTUAL_SIZE.
17106
17107 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17108 (build_delete): Fix call.
17109 * decl2.c (delete_sanity): Likewise.
17110 * cp-tree.h (build_vec_delete): Update prototype.
17111
17112 * typeck.c (common_base_type): Delete unused var TMP.
17113 (build_binary_op): Delete local var ARGS_SAVE.
17114 (build_array_ref): Delete unused var ITYPE.
17115 (c_expand_return): Delete unused var USE_TEMP.
17116
17117 * typeck.c (compexcepttypes): Delete unused arg STRICT.
17118 (comptypes): Fix calls.
17119 * decl.c (duplicate_decls): Likewise.
17120 * cp-tree.h (compexcepttypes): Delete extra arg.
17121
17122 * decl2.c (check_classfn): Delete unused second arg CNAME.
17123 * decl.c (start_decl, grokfndecl): Fix calls.
17124 * init.c (do_friend): Likewise.
17125 * cp-tree.h (check_classfn): Update prototype.
17126
17127 * cp-tree.h (signature_error, import_export_vtable,
17128 append_signature_fields, id_in_current_class, mark_used,
17129 copy_assignment_arg_p): Add decls.
17130 * decl2.c (mark_used): Delete decl.
17131
17132 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17133
17134 * class.c (get_vtable_entry): Disable unused function.
17135 (doing_hard_virtuals): Delete unused static global var.
17136 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17137 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17138 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17139 (modify_one_vtable): Delete unused var OLD_RTTI.
17140 (finish_struct_anon): Delete unused vars OFFSET and X.
17141 (finish_struct_bits): Delete unused var METHOD_VEC.
17142 (get_basefndecls): Delete unused var PURPOSE. Delete unused
17143 for-scope local variable METHODS.
17144
17145 * call.c (user_harshness): Delete unused/unneeded arg PARM.
17146 (ideal_candidate): Delete unused args BASETYPE and PARMS.
17147 (build_method_call): Delete unused args passed into ideal_candidate.
17148 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
17149 * cp-tree.h (synthesize_method): Add decl.
17150
17151 * decl.c (note_level_for_for): Give void return type.
17152 (pushdecl_nonclass_level): Likewise.
17153 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17154 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17155 (suspend_binding_level): Delete unused var LEVEL.
17156 (duplicate_decls): Delete unused var CTYPE.
17157 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17158 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17159 PTR_ENDLINK.
17160 (grokdeclarator): Delete unused var C.
17161 (grokdeclarator): Delete unused var SIZE_VARIES.
17162 (grokparms): Delete unused var SAW_VOID.
17163 (start_function): Delete unused var OLDDECL.
17164 (cplus_expand_expr_stmt): Delete unused var
17165 REMOVE_IMPLICIT_IMMEDIATELY.
17166
17167 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17168
17169 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17170
17171 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17172
17173 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17174 (build_min_nt): Likewise.
17175 * pt.c (do_pushlevel): Emit line note.
17176 (do_poplevel): Return what we get from poplevel.
17177 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17178 * parse.y: Use do_pushlevel and do_poplevel.
17179 * cp-tree.h: Declare do_poplevel.
17180
17181 * cp-tree.h: Declare at_eof.
17182 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17183 * decl2.c (import_export_decl): Renamed from import_export_inline.
17184 (finish_file): Call it to do interface handling for statics.
17185 * pt.c (tsubst_copy): Call mark_used on variables and functions
17186 used here.
17187
17188 * decl2.c (finish_file): Don't emit statics we can't generate.
17189 * pt.c (instantiate_decl): Don't set interface on instantiations
17190 we can't generate.
17191
17192 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17193 * tree.c (print_lang_statistics): Print max template depth.
17194 * pt.c (push_tinst_level): Dump entire instantiation context.
17195 (instantiate_class_template): Use it and pop_tinst_level.
17196 (instantiate_decl): Likewise.
17197
17198 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
17199 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
17200
17201 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
17202
17203 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
17204 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
17205 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
17206 the new template implementation.
17207
17208 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17209
17210 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
17211
17212 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
17213
17214 * decl.c (cp_finish_decl): Delay emitting the debug information for
17215 a typedef that has been installed as the canonical typedef, if the
17216 type has not yet been defined.
17217
17218 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17219
17220 * decl2.c (grokfield): Still call pop_nested_class for access decls.
17221
17222 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17223
17224 * decl.c (lookup_label): Call label_rtx.
17225
17226 * decl.c (make_binding_level): New function.
17227 (pushlevel, pushlevel_class): Call it instead of explicit
17228 duplicate calls to xmalloc.
17229
17230 * decl.c (init_decl_processing): Delete useless build_pointer_type
17231 call.
17232
17233 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
17234 (sizet_ftype_string): Delete variable.
17235 (init_decl_processing): Add built-in functions fabsf, fabsl,
17236 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
17237 variable strlen_ftype, used for strlen.
17238
17239 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17240
17241 * decl.c (push_to_top_level): Start from current_binding_level
17242 again for now; the stl hacks depend on g++ being broken in this
17243 way, and it'll be fixed in the template rewrite.
17244
17245 * tree.def: Add USING_DECL.
17246 * decl2.c (do_class_using_decl): Implement.
17247 (grokfield): Pass access decls off to do_class_using_decl instead of
17248 grokdeclarator.
17249 * error.c (dump_decl): Handle USING_DECLs.
17250 * decl.c (grokdeclarator): Remove code for handling access decls.
17251 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
17252 as access decls for now.
17253 (finish_struct): Don't check USING_DECLs for other uses of the name.
17254
17255 * search.c (get_matching_virtual): Use cp_error_at.
17256
17257 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17258
17259 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
17260 match c-typeck.c.
17261 (self_promoting_args_p): Move the check that TYPE is non-nil
17262 before trying to look at its main variant.
17263 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
17264
17265 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
17266 Delete macros.
17267 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
17268 (do_friend): Delete call to xref_friend.
17269 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
17270
17271 * typeck.c (convert_sequence): #if 0 unused function.
17272
17273 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
17274 be in decl_in_memory_p.
17275 (decl_in_memory_p): Delete decl.
17276 * expr.c (decl_in_memory_p): Delete fn.
17277 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
17278
17279 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
17280
17281 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
17282
17283 * class.c (finish_struct_1): Check for a pure-specifier on a
17284 non-virtual function here.
17285
17286 * decl2.c (grok_function_init): Don't check whether the function
17287 is virtual here.
17288 (grokfield): Don't call check_for_override here.
17289
17290 * decl.c (push_to_top_level): Start from inner_binding_level,
17291 check class_shadowed in class levels.
17292
17293 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
17294
17295 * decl.c (resume_level): Ignore things that don't have names, instead
17296 of core dumping.
17297
17298 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17299
17300 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
17301
17302 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
17303
17304 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
17305 synthesized dtor.
17306
17307 * parse.y (complete_type_name): Bind global_scope earlier.
17308 (complex_type_name): Likewise.
17309 (qualified_type_name): Remove.
17310
17311 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
17312
17313 * decl.c (grokfndecl): Move code that looks for virtuals in base
17314 classes...
17315 * class.c (check_for_override): ... to a new function.
17316 (finish_struct_1): Call it.
17317
17318 * cp-tree.h: Declare warn_sign_compare.
17319
17320 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
17321 rather than extra_warnings to decide whether to warn about
17322 comparison of signed and unsigned.
17323
17324 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
17325 implies -Wsign-compare. -Wall doesn't imply -W.
17326
17327 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
17328
17329 * typeck.c (build_component_ref): Fix to handle anon unions in base
17330 classes as well.
17331
17332 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17333
17334 * class.c (resolves_to_fixed_type_p): Delete code dealing with
17335 a WITH_CLEANUP_EXPR, since we don't generate them any more.
17336 * cvt.c (build_up_reference): Likewise.
17337 * decl.c (grok_reference_init): Likewise.
17338 (cp_finish_decl): Likewise.
17339 * error.c (dump_expr): Likewise.
17340 * tree.c (real_lvalue_p): Likewise.
17341 (lvalue_p): Likewise.
17342 (build_cplus_new): Likewise.
17343 (unsave_expr_now): Likewise.
17344 * typeck.c (unary_complex_lvalue, build_modify_expr,
17345 c_expand_return): Likewise.
17346
17347 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17348
17349 Make the C++ front-end pay attention to attributes for structures.
17350 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
17351 finish_struct_1.
17352 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
17353 Take out old round_up_size use and setting the DECL_ALIGN possibly
17354 using it. Take out setting of TYPE_ALIGN to round_up_size, which
17355 can override what the attribute set.
17356 * cp-tree.h (finish_struct): Update prototype.
17357 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
17358 attributes to finish_struct.
17359 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
17360 value down into finish_struct.
17361 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
17362
17363 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
17364
17365 * decl.c (poplevel): Re-word dead for local handling.
17366 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
17367 (cp_finish_decl): If is_for_scope, check for duplicates so
17368 we can disable is_for_scope. Otherwise, preserve_temp_slots.
17369
17370 * lex.c (do_identifier): Use global binding in preference of
17371 dead for local variable.
17372
17373 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
17374
17375 * init.c (initializing_context): Handle anon union changes, the
17376 context where fields of anon unions can be initialized now has to be
17377 found by walking up the TYPE_CONTEXT chain.
17378
17379 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
17380
17381 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
17382 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
17383 (obscure_complex_init): If bss is supported, always set
17384 DECL_INITIAL to error_mark_node.
17385
17386 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17387
17388 * init.c (is_friend): Make sure there's a context before we see if
17389 it's an aggr type.
17390
17391 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
17392
17393 * init.c (is_friend): Classes are not friendly with nested classes.
17394
17395 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
17396
17397 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17398 and record its result.
17399
17400 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
17401
17402 * class.c (finish_struct_anon): Switch around code to not move anon
17403 union elements around, nor mess up their contexts, nor offsets,
17404 instead we now build up the right number of COMPONENT_REFs for all
17405 the anon unions that may be present at build_component_ref time.
17406 * typeck.c (lookup_anon_field): New routine to handle field lookup
17407 on fields without names. We find them, based upon their unique type
17408 instead.
17409 * typeck.c (build_component_ref): Allow FIELD_DECL components.
17410 Handle finding components in anonymous unions, and ensure that a
17411 COMPONENT_REF is built for each level as necessary.
17412
17413 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
17414
17415 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17416 code that ensures that copy ctors are used if appropriate.
17417
17418 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17419
17420 * init.c (build_vec_delete): Only give an error if base isn't an
17421 error_mark_node.
17422
17423 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
17424
17425 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17426 (yylex): If we see `new', keep slurping.
17427
17428 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
17429
17430 * class.c (finish_struct_1): Move code for handling anon unions...
17431 (finish_struct_anon): to here. Fixup so that we do the offset
17432 calculations right, and so that the fields are physically moved to
17433 the containers's chain.
17434
17435 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17436
17437 * decl.c (grokdeclarator): Avoid trying to get an operand off an
17438 identifier node.
17439
17440 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
17441
17442 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17443 POINTER_SIZE to agree with expr.c.
17444
17445 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
17446
17447 * search.c (lookup_field): Don't report ambiguities if protect is 0,
17448 instead return NULL_TREE.
17449
17450 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
17451
17452 * class.c (finish_struct_1): Call warn_hidden if we want warnings
17453 about overloaded virtual functions.
17454 (warn_hidden): New routine to warn of virtual functions that are
17455 hidden by other virtual functions, that are not overridden.
17456 (get_basefndecls): New routine, used by warn_hidden.
17457 (mark_overriders): New routine, used by warn_hidden.
17458 * search.c (get_matching_virtual): Remove old warning that just
17459 isn't very useful.
17460
17461 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17462
17463 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17464
17465 * typeck.c (null_ptr_cst_p): Delete unused fn.
17466 (build_function_call_maybe): Delete unused fn.
17467
17468 * expr.c (extract_init): #if 0 the code after unconditional return 0
17469 for now.
17470
17471 Delete old cadillac code.
17472 * edsel.c: Remove file.
17473 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17474 * Makefile.in (CXX_OBJS): Delete edsel.o.
17475 (edsel.o): Delete rule.
17476 * cp-tree.h (flag_cadillac): Delete var decl.
17477 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17478 * decl2.c (flag_cadillac): Delete var definition.
17479 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17480 (grokfield): Delete code depending on flag_cadillac.
17481 (finish_anon_union): Likewise.
17482 * class.c (finish_struct_1): Likewise.
17483 (pushclass): Likewise.
17484 (popclass): Likewise.
17485 (push_lang_context): Likewise.
17486 (pop_lang_context): Likewise.
17487 * decl.c (init_decl_processing): Likewise.
17488 (start_decl): Likewise.
17489 (cp_finish_decl): Likewise.
17490 (xref_tag): Likewise.
17491 (finish_enum): Likewise.
17492 (start_function): Likewise.
17493 (finish_function): Likewise.
17494 (finish_stmt): Likewise.
17495 * lex.c (lang_init): Likewise.
17496 (check_newline): Likewise.
17497
17498 * lex.c (do_pending_inlines): Delete synthesized method kludge.
17499
17500 Delete defunct, ancient garbage collection implementation.
17501 * rtti.c: New file with the RTTI stuff from gc.c.
17502 * gc.c: Removed file (moved the remaining stuff into rtti.c).
17503 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17504 (rtti.o): New rule, replacing gc.o.
17505 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17506 * cp-tree.h: Delete gc-related fn decls.
17507 (DECL_GC_OFFSET): Delete macro.
17508 (flag_gc): Delete extern decl.
17509 * decl.c (current_function_obstack_index): Delete var decl.
17510 (current_function_obstack_usage): Delete var decl.
17511 (start_function): Delete clearing of current_function_obstack_index
17512 and current_function_obstack_usage.
17513 (init_decl_processing): Delete code relying on -fgc.
17514 Delete call to init_gc_processing.
17515 (cp_finish_decl): Delete calls to build_static_gc_entry and
17516 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
17517 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17518 and to expand_expr of a __gc_main call.
17519 (maybe_gc_cleanup): Delete var decl.
17520 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17521 * decl2.c (flag_gc): Delete var decl.
17522 (lang_f_options): Delete offering of -fgc.
17523 (lang_decode_option): Delete -fgc and -fno-gc handling.
17524 (get_temp_regvar): Delete gc code.
17525 * init.c (build_new): Delete gc code.
17526 * lex.c (init_lex): Delete checking of flag_gc.
17527
17528 * typeck.c (convert_arguments): Delete gc code.
17529 (build_component_addr): Delete -fgc warning.
17530 (build_modify_expr): Delete gc code.
17531
17532 * decl2.c (build_push_scope): Delete fn.
17533 * cp-tree.h (build_push_scope): Delete decl.
17534
17535 * search.c (clear_search_slots): Delete fn.
17536 * cp-tree.h (clear_search_slots): Delete decl.
17537
17538 * search.c (tree_needs_constructor_p): Delete fn.
17539 * cp-tree.h (tree_needs_constructor_p): Delete decl.
17540
17541 * tree.c (id_cmp): Delete fn.
17542
17543 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17544 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17545
17546 * tree.c (decl_value_member): Delete fn.
17547 * cp-tree.h (decl_value_member): Delete decl.
17548
17549 * tree.c (list_hash_lookup_or_cons): Delete fn.
17550 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17551
17552 * method.c (cplus_exception_name): Delete fn.
17553 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17554
17555 * spew.c (shift_tokens): Delete fn.
17556
17557 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17558
17559 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17560 to cp_finish_decl.
17561 * parse.y: Likewise.
17562
17563 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17564
17565 * tree.c (build_cplus_staticfn_type): Delete function definition;
17566 never used.
17567 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17568
17569 * tree.c (virtual_member): Delete function definition; never used.
17570 * cp-tree.h (virtual_member): Delete decl.
17571
17572 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
17573
17574 * typeck.c (build_component_ref): Handle getting vbase pointers
17575 out of complex multiple inheritance better.
17576
17577 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
17578
17579 * typeck.c (build_object_ref): Make sure we use the real type, not
17580 any reference type.
17581
17582 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
17583
17584 * tree.c (build_exception_variant): Don't create new types if we
17585 don't have to, also build new types on the right obstack.
17586
17587 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17588
17589 * decl.c (store_bindings): Split out from push_to_top_level.
17590 (push_to_top_level): Call it for b->type_shadowed on class binding
17591 levels.
17592
17593 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
17594
17595 * search.c (expand_upcast_fixups): Fix so that offsets stored in
17596 vbase_offsets are always right. Fixes a problem where virtual base
17597 upcasting and downcasting could be wrong during conversions on this
17598 during virtual function dispatch at ctor/dtor time when dynamic
17599 vtable fixups for deltas are needed. This only sounds easier than
17600 it is. :-)
17601 (fixup_virtual_upcast_offsets): Change to reflect new calling
17602 convention for expand_upcast_fixups.
17603
17604 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17605
17606 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17607 check that it's usable as the bitfield width.
17608
17609 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17610
17611 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17612 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17613 only ever used for functions in it.
17614
17615 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17616
17617 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17618 (nested_type): Likewise.
17619 (nested_name_specifier): Use lastiddecl.
17620
17621 * decl.c (grokdeclarator): Adjust accordingly.
17622 * init.c (expand_member_init): Likewise.
17623 * parse.y (base_class): Likewise.
17624 * typeck2.c (build_functional_cast): Likewise.
17625
17626 * typeck2.c (build_functional_cast): Fill in name after we've
17627 checked for non-aggr type.
17628
17629 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
17630
17631 * decl2.c (warn_pointer_arith): Default to on.
17632
17633 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17634
17635 * lex.c (is_rid): New function.
17636 * decl.c (grokdeclarator): Diagnose reserved words used as
17637 declarator-ids.
17638
17639 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
17640
17641 * tree.c (get_decl_list): Don't lose cv-quals.
17642
17643 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17644 typespecs used as declarator-ids.
17645
17646 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
17647
17648 * decl.c (poplevel): When poping a level, don't give a warning for
17649 any subblocks that already exist.
17650
17651 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17652
17653 * typeck.c (build_object_ref): Finish what I started.
17654
17655 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17656
17657 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17658
17659 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17660 scope.
17661
17662 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17663
17664 * decl.c (xref_tag): Handle passing a type in directly.
17665
17666 * parse.y (qualified_type_name): Pull out the type.
17667 (nested_type): Likewise.
17668 Take types directly instead of as identifiers.
17669 * call.c (build_scoped_method_call): Take types directly instead of
17670 as identifiers.
17671 * decl.c (xref_basetypes): Likewise.
17672 * init.c (expand_member_init): Likewise.
17673 (build_member_call): Likewise.
17674 (build_offset_ref): Likewise.
17675 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17676 * method.c (do_build_assign_ref): Likewise.
17677 * decl.c (grokdeclarator): Handle a type appearing as the
17678 declarator-id for constructors.
17679 * method.c (do_build_copy_constructor): current_base_init_list now
17680 uses the types directly, not their names.
17681 * init.c (sort_base_init): Likewise.
17682 (expand_member_init): Likewise.
17683 * init.c (is_aggr_type): New function, like is_aggr_typedef.
17684
17685 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
17686
17687 * tree.c (layout_basetypes): Call build_lang_field_decl instead
17688 of build_lang_decl if first arg is a FIELD_DECL.
17689
17690 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17691
17692 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17693 non-empty.
17694 * except.c (expand_start_catch_block): Set TREE_USED to avoid
17695 warnings about the catch handler.
17696
17697 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
17698
17699 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17700 expand_target_expr.
17701
17702 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17703
17704 Fix access control to use trees rather than integers.
17705 * class.c (access_{default, public, protected, private,
17706 default_virtual, public_virtual, private_virtual}_node): Add
17707 definitions.
17708 (init_class_processing): Do creation of those nodes.
17709 * cp-tree.h (access_type): Delete enum decl.
17710 (access_{default, public, protected, private, default_virtual,
17711 public_virtual, private_virtual}_node): Add decls.
17712 (compute_access): Change return type.
17713 * search.c (compute_access): Have tree return type, instead of enum.
17714 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17715 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17716 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17717 * parse.y (VISSPEC): Make ttype rather than itype.
17718 (base_class_access_list): Likewise.
17719 * *.[cy]: Change all refs of `access_public' to `access_public_node',
17720 etc.
17721 * call.c (build_method_call): Make ACCESS be a tree.
17722 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17723 * cvt.c (convert_to_aggr): Likewise.
17724 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17725 Likewise.
17726 * method.c (hack_identifier): Likewise.
17727 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17728
17729 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
17730
17731 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17732 frontend, and make it more consistent with respect to
17733 warn_pointer_arith.
17734
17735 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17736
17737 * decl.c (pushdecl): Check for duplicate parameter names.
17738
17739 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
17740
17741 * decl.c (expand_static_init): Call assemble_external for atexit.
17742
17743 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
17744
17745 * except.c (do_unwind): Remove some generated dead code.
17746 (eh_outer_context): New routine, factor out some common code from
17747 expand_builtin_throw and end_eh_unwinder. Add code to do return
17748 address masking for the PA.
17749 (expand_builtin_throw): Use eh_outer_context instead of open coding
17750 it here.
17751 (end_eh_unwinder): Likewise.
17752
17753 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
17754
17755 * except.c (expand_throw): Call assemble_external for __empty, if we
17756 use it.
17757
17758 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
17759
17760 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
17761 NORMAL_RETURN_ADDR_OFFSET.
17762 (end_eh_unwinder): Likewise.
17763
17764 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
17765
17766 * gc.c (build_dynamic_cast): Make sure we don't cast away const
17767 when dealing with references, and make sure we handle dynamic
17768 casting to a cv qualified reference.
17769
17770 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
17771
17772 * except.c (struct eh_context): New structure top hold eh context
17773 information.
17774 (push_eh_context): New routine.
17775 (pop_eh_context): Likewise.
17776 * decl.c (push_cp_function_context): Use them.
17777 (pop_cp_function_context): Likewise.
17778
17779 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
17780
17781 * decl2.c (finish_file): Also prune uninteresting functions in the
17782 inline emission loop.
17783
17784 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
17785
17786 * sig.c (build_signature_table_constructor): Mark functions
17787 in the signature as referenced.
17788
17789 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
17790
17791 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
17792 the inline emission stuff.
17793
17794 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
17795
17796 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
17797 weak symbols.
17798 * lang-options.h: Add -f{no-,}weak.
17799 * decl.c (init_decl_processing): If the target does not support weak
17800 symbols, don't use them.
17801 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
17802
17803 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17804
17805 * init.c (expand_member_init): warning for base init after members.
17806
17807 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
17808
17809 * cvt.c (build_expr_type_conversion): Don't convert to a reference
17810 type.
17811
17812 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
17813
17814 * method.c (report_type_mismatch): Improve wording for volatile
17815 mismatches.
17816
17817 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
17818
17819 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
17820 expand_assignment, as the later doesn't handle things that have
17821 copy constructors well. The compiler would do bitwise copying,
17822 instead of ctor calling in some cases.
17823
17824 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
17825
17826 * g++.c (my_strerror): Return "cannot access" if errno is 0.
17827 (pfatal_with_name, perror_exec): Don't assume that
17828 the returned value from my_strerror contains no '%'s.
17829 (concat): Remove.
17830 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
17831
17832 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
17833
17834 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
17835 TYPE_METHODS/TREE_CHAIN mean what they used to.
17836 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
17837 instead of TYPE_METHODS.
17838 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
17839 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
17840 * cp-tree.h (CLASSTYPE_METHODS): Lose.
17841 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
17842 TYPE_METHODS.
17843 (struct lang_decl): Lose next_method field.
17844 (DECL_NEXT_METHOD): Lose.
17845 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
17846 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
17847 anymore.
17848 (finish_struct_methods): Don't mess with the TREE_CHAINs in
17849 fn_fields.
17850
17851 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
17852 vector.
17853
17854 * call.c (build_method_call): Synthesize here even when not inlining.
17855 * typeck.c (build_function_call_real): Likewise.
17856
17857 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
17858
17859 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
17860 == DBX_DEBUG, call dbxout_start_new_source_file and
17861 dbxout_resume_previous_source_file when appropriate.
17862
17863 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
17864
17865 * except.c (start_anon_func): Push to the top level.
17866 (end_anon_func): Pop from the top level.
17867
17868 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
17869
17870 * cp-tree.h (build_cleanup): New routine to build cleanups.
17871 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
17872 call at ctor time and use atexit to run it later.
17873 * decl2.c (build_cleanup): New routine, taken from finish_file.
17874 (finish_file): Use build_cleanup instead, and don't put function
17875 local statics in global dtor list.
17876
17877 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
17878
17879 * except.c (expand_throw): Ensure that we have cleanups, if we try
17880 and expand cleanups.
17881
17882 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
17883
17884 * except.c (expand_throw): Add logic to manage dynamic cleanups for
17885 the EH object.
17886 (expand_end_catch_block): Use the magic of expand_goto, instead of
17887 emit_jump so that we get the cleanup for any catch clause parameter
17888 and the cleanup for the exception object. Update to reflect label
17889 changes.
17890 (push_eh_cleanup): New routine to register a cleanup for an
17891 exception object.
17892 (empty_fndecl): Used to default cleanup actions to
17893 nothing.
17894 (init_exception_processing): Setup empty_fndecl. Setup
17895 saved_cleanup.
17896 (expand_start_catch_block): Update to reflect label changes. Call
17897 push_eh_object to register the cleanup for the EH object.
17898 (start_anon_func): New routine to start building lambda expressions
17899 from trees.
17900 (end_anon_func): New routine to end them.
17901 (struct labelNode): Change so that we can use tree labels, or rtx
17902 labels.
17903 (saved_cleanup): Object to check for dynamic cleanups for the
17904 exception handling object.
17905 (push_label_entry): Change so that we can use tree labels, or rtx
17906 labels.
17907 (pop_label_entry): Likewise.
17908 (top_label_entry): Likewise.
17909 (expand_start_all_catch): Use tree label instead of rtx label, so
17910 that we can get the magic of expand_goto.
17911 (expand_end_all_catch): Update to reflect label changes.
17912
17913 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
17914 use UNSAVE_EXPRs.
17915 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
17916 building_cleanup logic, as we now use UNSAVE_EXPRs.
17917 * cp-tree.h (unsave_expr): Declare it.
17918 * decl.c (building_cleanup): Remove.
17919 (maybe_build_cleanup): Remove building_cleanup logic, and use
17920 UNSAVE_EXPR instead.
17921
17922 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
17923
17924 * gc.c (build_t_desc): Update error message to say <typeinfo>.
17925
17926 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17927
17928 * decl.c (pushdecl): Only warn about shadowing a local variable if
17929 warn_shadow is true.
17930
17931 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
17932
17933 * typeck.c (build_binary_op_nodefault): Added warning about
17934 comparisons between different enum types with -Wall, unless
17935 -fenum-int-equiv set.
17936
17937 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
17938
17939 * class.c (finish_struct_1): Skip down to the inner type in
17940 multidimensional arrays. Ensures ctors will be made for types that
17941 need constructing.
17942
17943 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
17944
17945 * decl.c (last_dtor_insn): New to track the last compiler generated
17946 insn in a dtor.
17947 (store_parm_decls): Set it.
17948 (finish_function): Use it to see if the dtor is empty. Avoid doing
17949 vtable setup all the time, if we can.
17950 (struct cp_function): Add last_dtor_insn.
17951 (push_cp_function_context): Save it.
17952 (pop_cp_function_context): Restore it.
17953
17954 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
17955
17956 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
17957 warnings.
17958
17959 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
17960
17961 * typeck.c (expand_target_expr): Make sure targets get put into the
17962 current temp_slot_level, so that the free_temp_slots call will reuse
17963 them.
17964
17965 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
17966
17967 * class.c (finish_struct_1): Delay delta fixups for virtual bases
17968 until after we have done the hard virtuals, to avoid a bogus `every
17969 virtual function must have a unique final overrider' for virtual
17970 functions that are only overridden by hard virtuals.
17971
17972 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
17973
17974 * pt.c (do_function_instantiation): Don't try to find a file-scope
17975 template for a member function.
17976
17977 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
17978
17979 * g++.c (main): Add handling of -nodefaultlibs.
17980
17981 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
17982
17983 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
17984 distinguish between direct bindings of reference variables, and
17985 indirect bindings of reference variables.
17986 * cvt.c (build_up_reference): Use it.
17987 * typeck.c (convert_arguments): Use it to indicate this is an
17988 indirect binding.
17989 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
17990 as they are unused.
17991 (expand_static_init): Likewise.
17992 (cplus_expand_expr_stmt): Likewise.
17993 * decl2.c (finish_file): Likewise.
17994 * init.c (perform_member_init): Likewise.
17995 (emit_base_init): Likewise.
17996 (expand_aggr_vbase_init_1): Likewise.
17997
17998 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
17999
18000 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18001 get a DECL_LANG_SPECIFIC node.
18002 * cp-tree.h (lang_decl_flags): Add new member `level'.
18003 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18004 decl_flags level member.
18005
18006 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18007
18008 * call.c (build_method_call): Make sure instance has a
18009 TYPE_LANG_SPECIFIC node before we dive into it.
18010
18011 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
18012
18013 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18014
18015 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
18016
18017 * decl.c (duplicate_decls): When smashing decls, smash staticness in
18018 the usual way.
18019
18020 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
18021
18022 * decl.c (poplevel): Handle the merging of subblocks of cleanups
18023 when finishing blocks that have already been created (usually due to
18024 the fixup goto code). Fixes bad debugging information.
18025
18026 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
18027
18028 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18029 that's not a list of overloaded functions.
18030
18031 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18032
18033 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18034 before trying to use DECL_ABSTRACT_VIRTUAL_P.
18035
18036 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
18037
18038 * decl2.c (mark_used): New function for hooking into setting of
18039 TREE_USED on decls.
18040 * call.c (build_method_call): Use it.
18041 * class.c (instantiate_type): Likewise.
18042 * init.c (build_offset_ref): Likewise. Don't call assemble_external
18043 for all like-named functions.
18044 * method.c (hack_identifier): Likewise.
18045 (emit_thunk): Don't call assemble_external.
18046 (make_thunk): Create thunk as a FUNCTION_DECL so that it
18047 gets the right mode and ENCODE_SECTION_INFO works.
18048
18049 * parse.y: Use mark_used. Pass operator names to do_identifier.
18050 * lex.c (do_identifier): Handle operator names.
18051
18052 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18053
18054 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18055
18056 * errfn.c: Include stdio.h.
18057 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18058
18059 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
18060
18061 * typeck2.c (digest_init): Always convert initializers to the
18062 right type.
18063
18064 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
18065
18066 * init.c (member_init_ok_or_else): Don't allow member initializers
18067 for indirect members, as it is invalid.
18068
18069 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18070
18071 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18072
18073 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
18074
18075 * parse.y (for.init.statement): Catch compound statements inside for
18076 initializations, if we're being pedantic.
18077
18078 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
18079
18080 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18081 looking for.
18082
18083 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
18084
18085 * error.c (dump_expr): Don't core dump when a boolean expression is
18086 used as a default argument.
18087
18088 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18089
18090 * class.c (finish_struct_bits): Check aggregate_value_p instead of
18091 RETURN_IN_MEMORY.
18092
18093 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
18094
18095 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18096 BLKmode type that would otherwise be returned in registers.
18097
18098 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18099
18100 * g++.c (WITHLIBC): New macro.
18101 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
18102 saw_libc and pass it at the end if it was set.
18103
18104 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18105
18106 * parse.y (fn.def1): Call split_specs_attrs in
18107 declmods notype_declarator case.
This page took 5.097692 seconds and 5 git commands to generate.