1 1999-09-09 Mark Mitchell <mark@codesourcery.com>
3 * cp-tree.h (begin_switch_stmt): Adjust prototype.
4 (finish_switch_cond): Likewise.
5 * parse.y (simple_stmt): Adjust accordingly.
6 * parse.c: Regenerated.
7 * pt.c (tsubst_expr): Adjust accordingly.
8 * semantics.c (expand_cond): New function.
9 (FINISH_COND): New macro.
10 (begin_switch_stmt): Build the SWITCH_STMT here.
11 (finish_switch_stmt_cond): Not here.
12 (expand_stmt): Adjust calls to begin_switch_stmt and
13 finish_switch_cond. Use expand_cond throughout.
15 * dump.c (dequeue_and_dump): Dump types for constants.
16 Describe DECL_ARG_TYPE more intuitively.
19 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
20 (lang_cleanup_tree): Remove.
21 * lex.c (make_lang_type): Use ggc_alloc to allocate
24 Reorganize per-function data.
25 * cp-tree.h (saved_scope): Add function_decl, bindings.
26 (language_function): Rename binding_level to bindings.
27 (cp_function_chain): Use the current_function, not the
29 (current_class_ptr): Make it work, even when there's no
31 (current_class_ref): Likewise.
32 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
34 (clear_temp_name): Remove.
35 * decl.c (check_function_type): New function, broken out from
37 (current_binding_level): Adjust definition.
38 (pushlevel): Simplify.
39 (poplevel): Don't use named_label_uses when we're outside
41 (mark_saved_scope): Mark function_decl and bindings.
42 (maybe_push_to_top_level): Don't unconditionally push a new
43 function context. Save bindings and the current_function_decl.
44 Don't clear named_labels.
45 (pop_from_top_level): Pop function context if appropriate.
46 (init_decl_processing): Set init_lang_status and free_lang_status,
47 rather than save_lang_status and restore_lang_status.
48 (start_function): Take SF_* flags. Don't clear per-function data.
49 Reorder and simplify to use new per-function data code. Add
51 (store_parm_decls): Don't call init_function_start here.
52 (finish_function): Adjust for new handling of per-function data.
53 (push_cp_function_context): Simplify.
54 (mark_cp_function_context): Change binding_level to bindings.
55 * decl2.c (clear_temp_name): Remove.
56 (start_objects): Use SF flags to start_function.
57 (start_static_storage_duration_function): Likewise.
58 * except.c (start_anon_func): Remove redundant calls to
59 push_function_context_to. Use SF flags to start function.
60 (end_anon_func): Remove redundant call to pop_function_context
62 * lex.c (reinit_parse_for_function): Don't initialize per-function
64 * method.c (emit_thunk): Clear current_function after calling
65 assemble_end_function. Use SF flags for start_function.
66 (synthesize_method): Use SF flags for start_function.
67 * parse.c: Regenerated.
68 * parse.y (fn.defpen): Likewise.
69 (pending_inline): Clear current_function, even if something goes
71 * pt.c (instantiate_decl): Use SF flags to start_function.
72 Don't save and restore expanding_p.
73 (add_tree): Handle the case where we are outside any function.
75 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
76 * semantics.c (begin_function_definition): Likewise.
77 (expand_body): Likewise.
79 1999-09-09 Nathan Sidwell <nathan@acm.org>
81 * cp-tree.h (convert_to_void): Prototype new function.
82 (require_complete_type_in_void): Remove prototype.
83 * cvt.c (convert_to_void): New function.
84 (ocp_convert): Use convert_to_void.
85 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
87 * typeck.c (require_complete_type_in_void): Remove function.
88 (build_compound_expr): Use convert_to_void.
89 (build_static_cast): Likewise.
90 (build_c_cast): Likewise.
91 * semantics.c (finish_expr_stmt): Do not decay full expressions.
93 * typeck.c (build_x_compound_expr): Add FIXME.
95 1999-09-08 Mark Mitchell <mark@codesourcery.com>
97 * cp-tree.h (scratch_tree_cons): Remove.
98 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
99 and perm_tree_cons with plain tree_cons.
103 * except.c: Likewise.
107 * method.c: Likewise.
112 * search.c: Likewise.
113 * typeck.c: Likewise.
114 * parse.c: Regenerated.
115 * tree.c (build_srcloc): Simplify.
117 1999-09-08 Mark Mitchell <mark@codesourcery.com>
119 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
121 (LANG_DECL_PERMANENT): Remove.
122 * decl.c (duplicate_decls): Don't mess about with obstacks trying
124 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
125 * lex.c (free_lang_decl_chain): Remove.
126 (build_lang_decl): Don't use obstacks.
127 (retrofit_lang_decl): Likewise.
128 (copy_lang_decl): Likewise.
130 * cp-tree.h (saved_scope): Remove old_binding_level and
131 function_decl. Tidy up.
132 * decl.c (mark_saved_scope): Don't set them.
133 (maybe_push_to_top_level): Clear memory.
135 * decl.c (layout_var_decl): Change prototype. Don't complete
136 types for external objects.
137 (check_initializer): Likewise. Tidy.
138 (initialize_local_var): Complete types here.
139 (cp_finish_decl): Not here. Reorganize a little.
140 (grokvardecl): Don't complete types here.
142 * decl.c (start_function): Clear last_dtor_insn and
143 last_parm_cleanup_insn.
144 (push_cp_function_context): Just copy over a little of
145 the old context, not all of it.
147 * cp-tree.h (copy_to_permanent): Remove.
148 (permanent_p): Likewise.
149 * decl.c (building_typename_type): Don't use copy_to_permanent.
150 (start_decl): Likewise.
151 (grok_reference_init): Likewise.
152 (cp_finish_decl): Likewise.
153 * init.c (build_new_1): Don't use mapcar.
154 (build_vec_delete_1): Don't use copy_to_permanent.
155 (build_vec_init): Likewise.
156 * parse.y (primary): Likewise.
157 * parse.c: Regenerated.
158 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
159 (lookup_template_class): Likewise.
160 (tsubst_friend_function): Likewise.
161 (instantiate_class_template): Likewise.
162 (tsubst_decl): Likewise.
164 (instantiate_template): Likewise.
166 * rtti.c (get_tinfo_fn): Likewise.
167 (build_dynamic_cast): Likewise.
168 * semantics.c (finish_if_stmt_cond): Likewise.
169 (finish_while_stmt_cond): Likewise.
170 (finish_do_stmt): Likewise.
171 (finish_for_cond): Likewise.
172 (finish_for_expr): Likewise.
173 (finish_cleanup): Likewise.
174 (add_decl_stmt): Likewise.
175 (finish_named_return_value): Likewise.
176 (finish_qualified_call_expr): Likewise.
177 * tree.c (perm_manip): Remove.
178 (build_exception_variant): Don't use copy_to_permanent.
179 (permanent_p): Remove.
180 (copy_to_permament): Remove.
181 (build_min_nt): Don't use copy_to_permanent.
182 (build_min): Likewise.
183 (min_tree_cons): Likewise.
184 * typeckc.c (build_static_cast): Likewise.
185 (build_reinterpret_cast): Likewise.
186 (build_const_cast): Likewise.
188 1999-09-07 Mark Mitchell <mark@codesourcery.com>
190 * decl.c (ggc_p): Set it to 1.
191 (mark_saved_scope): Add prototype.
193 1999-09-07 Richard Henderson <rth@cygnus.com>
195 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
196 * typeck.c (self_promoting_args_p): Delete.
198 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
200 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
201 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
203 1999-09-07 Mark Mitchell <mark@codesourcery.com>
205 * Makefile.in (tree.o): Depend on ggc.h.
206 * class.c (make_method_vec): Remove.
207 (free_method_vec): Likewise.
208 (free_method_vecs): Remove.
209 (add_method): Don't use them.
210 * cp-tree.def (PTRMEM_CST): Make it longer.
211 (TEMPLATE_PARM_INDEX): Make it shorter.
212 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
213 (template_parm_index): Remove RTL field.
214 (ptrmem_cst): Add RTL field.
215 (finish_function): Removed parameter.
216 (process_next_inline): Change prototype.
217 (init_cplus_unsave): Rename to init_tree.
218 (binding_init): Remove.
219 * decl.c (free_binding_nodes): Remove.
220 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
221 (pop_binding): Don't use free_binding_nodes.
222 (free_binding_vecs): Remove.
223 (store_bindings): Don't use them.
224 (pop_from_top_level): Likewise.
225 (lookup_namespace_name): Simplify.
226 (build_typename_type): Don't use obstack_free.
227 (unqualified_namespace_lookup): Simplify.
228 (lookup_name_real): Simplify.
229 (start_function): Remove comment about leaks.
230 (finish_function): Removed nested parameter. Call
231 expand_end_bindings even when building_stmt_tree.
232 Call ggc_push_context and ggc_pop_context around
233 rest_of_compilation, if necessary.
234 (mark_cp_function_context): Handle a NULL language-context.
235 (lang_mark_false_label_stack): Fix typo.
236 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
237 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
238 pointer to method types.
239 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
240 * decl2.c (finish_objects): Adjust call to finish_function.
241 (finish_static_store_duration_function): Likewise.
242 (do_nonmember_using_decl): Remove call to binding_init.
243 * except.c (end_anon_func): Adjust call to finish_function.
244 * lex.c (mark_impl_file_chain): New function.
245 (init_parse): Call init_tree, not init_cplus_unsave.
247 (cp_pramga_interface): Use xmalloc, not permalloc.
248 (cp_pragma_implementation): Likewise.
249 (begin_definition_of_inclass_inline): Simplify.
250 (process_next_inline): Adjust prototype.
251 (do_scoped_id): Don't call binding_init.
252 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
253 * method.c (emit_thunk): Adjust call to finish_function.
254 (synthesize_method): Likewise.
255 * parse.y (%union): Add a new `pi' variant.
256 (PRE_PARSED_FUNCTION_DECL): Use it.
257 (fn.defpen): Likewise.
258 (fndef): Adjust call to finish_function.
259 * pt.c (instantiate_decl): Likewise.
260 * rtti.c (syntheisze_tinfo_fn): Likewise.
261 * semantics.c (expand_body): Likewise.
262 * tree.c: Include ggc.h.
263 (mark_list_hash): New function.
264 (binding_init): Remove.
265 (init_cplus_unsave): Rename to ...
266 (init_tree): This. Add GC roots.
268 1999-09-05 Mark Mitchell <mark@codesourcery.com>
270 Get ready for garbage collection.
271 * Makefile.in (CXX_TREE_H): Add varray.h
272 (lex.o): Depend on ggc.h.
275 (method.o): Likewise.
276 (search.o): Likewise.
279 * class.c: Include ggc.h.
280 (current_class_name): Remove.
281 (current_class_type): Likewise.
282 (current_access_specifier): Likewise.
283 (previous_class_type): Likewise.
284 (previous_class_values): Likewise.
285 (class_cache_firstobj): Likewise.
286 (current_lang_base): Likewise.
287 (current_lang_stack): Likewise.
288 (current_lang_stacksize): Likewise.
289 (lang_name_c): Likewise.
290 (lang_name_cplusplus): Likewise.
291 (lang_name_java): Likewise.
292 (current_lang_name): Likewise.
293 (base_layout_decl): Likewise.
294 (access_default_node): Likewise.
295 (access_public_node): Likewise.
296 (access_protected_node): Likewise.
297 (access_private_node): Likewise.
298 (access_default_virtual_node): Likewise.
299 (access_public_virtual_node): Likewise.
300 (access_protected_virtual_node): Likewise.
301 (access_private_virtual_node): Likewise.
302 (signed_zero_node): Likewise.
303 (init_class_processing): Don't build base_layout_decl.
304 (push_lang_context): Adjust now that current_lang_base is a varray.
305 (pop_lang_context): Likewise.
306 * cp-tree.h: Include varray.h.
307 (cp_global_trees): Add access_default, access_public,
308 access_protected, access_private, access_default_virtual,
309 access_public_virtual, access_protected_virtual,
310 access_private_virtual, ctor_identifier, delta2_identifier,
311 delta_identifier, dtor_identifier, in_charge_identifier,
312 index_identifier, nelts_identifier, this_identifier,
313 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
314 lang_name_c, lang_name_cplusplus, lang_name_java,
315 empty_except_spec, null, jclass, minus_one, terminate.
316 (saved_scope): Move here from decl.c. Define globals in terms of
317 saved_scope: current_namespace, current_class_name,
318 current_class_type, current_access_specifier, current_lang_stack,
319 current_lang_base, current_lang_name, current_function_parms,
320 current_template_parms, processing_template_decl,
321 processing_specialization, processing_explicit_instantiation,
322 previous_class_type, previous_class_values, class_cache_firstobj.
323 (scope_chain): New variable.
324 (init_pt): New function.
325 * decl.c (current_namespace): Remove.
326 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
327 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
328 (delta_identifier, delta2_identifier): Likewise.
329 (pfn_or_delta2_identifier, tag_identifier): Likewise
330 (vt_off_identifier, empty_except_spec, null_node): Likewise.
331 (current_function_parms, current_lang_base): Remove.
332 (current_lang_stack, previous_class_values): Remove.
333 (class_binding_level): Macroize.
334 (saved_scope): Remove.
335 (current_saved_scope): Rename to scope_chain.
336 (mark_saved_scope): Adjust for new scope structure.
337 (maybe_push_to_top_level): Likewise.
338 (pop_from_top_level): Likewise.
339 (duplicate_decls): Adjust now that current_lang_base is a varray.
340 (build_typename_type): Call ggc_add_tree_hash_table_root.
341 (init_decl_processing): Call init_pt. Call push_to_top_level to
342 set up globals. Add GC roots.
343 (xref_basetypes): Adjust now that current_lang_base is a varray.
344 * decl.h (this_identifier): Remove.
345 (in_charge_identifier): Likewise.
346 * decl2.c: Don't include varray.h.
347 (current_namespace): Remove.
348 (init_decl2): Add GC roots.
349 * except.c (Terminate): Remove.
350 (init_exception_processing): Use terminate_node instead.
351 (build_terminate_handler): Likewise.
352 * init.c (nc_nelts_field_id): Remove.
353 (minus_one): Likewise.
354 (init_init_processing): Use minus_one_node and nelts_identifier
355 instead. Add GC roots.
356 (jclass_node): Remove.
357 (build_new_1): Use nelts_identifier.
358 (build_vec_init): Likewise.
359 (build_vec_delete): Likewise.
360 * lex.c: Include ggc.h.
361 (defarg_fn): Move declaration early.
362 (defarg_parms): Likewise.
363 (init_parse): Add GC roots.
364 (handle_cp_pragma): Remove redundant declaration of
366 * method.c: Include ggc.h.
367 (btypelist): Make it a varray. All uses changed.
368 (ktypelist): Likewise.
369 (init_method): Add GC roots.
370 * pt.c: Don't include varray.h. Include ggc.h.
371 (current_template_parms): Remove.
372 (processing_template_decl): Likewise.
373 (processing_specialization): Likewise.
374 (processing_explicit_instantiation): Likewise.
375 (init_pt): New function.
376 * repo.c: Include ggc.h.
377 (init_repo): Add GC roots.
378 * search.c: Don't include varray.h.
379 (_vptr_name): Remove.
380 (lookup_field_1): Use vtpr_identifier instead.
381 (expand_indirect_vtbls_init): Remove redundant declaration of
382 in_charge_identifier.
383 (init_search_processing): Use vptr_identifier.
385 1999-09-05 Richard Henderson <rth@cygnus.com>
386 Bernd Schmidt <bernds@cygnus.co.uk>
387 Mark Mitchell <mark@codesourcery.com>
389 * Makefile.in (parse.o): Depend on ggc.h.
390 (decl2.o): Depend on ggc.h.
391 (init.o): Depend on ggc.h.
392 * cp-tree.h (init_decl2): Declare.
393 (cp_parse_init): Likewise.
394 * decl.c (ggc_p): Define to zero.
395 (mark_saved_scope): New function.
396 (init_decl_processing): Call cp_parse_init, and cp_decl2.
398 (expand_static_init): Add GC roots.
399 * decl2.c: Include ggc.h.
400 (init_decl2): New function.
401 * init.c: Include ggc.h.
402 (init_init_processing): Add GC roots.
403 * parse.y: Include ggc.h.
404 (cp_parse_init): New function.
406 1999-09-04 Mark Mitchell <mark@codesourcery.com>
408 * decl.c (init_decl_processing): Set mark_lang_status.
409 (lang_mark_false_label_stack): Adjust prototype.
410 * decl2.c (grok_function_init): Remove extraneous declaration of
413 * Make-lang.in (cc1plus): Remove dependency on GGC.
414 * Makefile.in (OBJS): Don't mention ggc-simple.o.
415 (OBJDEPS): Don't mention ggc-simple.o.
417 * Make-lang.in (cc1plus): Depend on $(GGC).
418 * Makefile.in (OBJS): Add ggc-simple.o.
420 * cp-tree.h (language_function): Rename members to `x_' versions;
421 we now have x_named_labels, x_ctor_label, x_dtor_label,
422 x_base_init_list, x_member_init_list, x_base_init_expr,
423 x_current_class_ptr, x_current_class_ref, x_last_tree,
424 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
426 (dtor_label, ctor_label, current_base_init_list,
427 current_member_init_list, base_init_expr, current_class_ptr,
428 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
429 * decl.c: Include ggc.h.
430 (last_dtor_insn): Adjust to use x_ names.
431 (last_parm_cleanup_insn): Likewise.
432 (original_result_rtx): Likewise.
433 (named_labels): Likewise.
434 (mark_binding_level): New function.
435 (mark_cp_function_context): Likewise.
436 (mark_false_label_stack): Likewise.
437 (lang_mark_tree): Likewise.
438 (lang_cleanup_tree): Likewise.
440 1999-09-03 Mark Mitchell <mark@codesourcery.com>
442 * Makefile.in (CXX_TREE_H): Include function.h.
443 (decl.o): Don't depend on function.h.
445 (typeck.o): Likewise.
447 (method.o): Likewise.
448 * cp-tree.h: Include function.h.
449 (cp_function): Rename to language_function. Remove next.
450 (cp_function_chain): Make it a macro, not a variable.
451 (push_cp_function_context): Don't declare.
452 (pop_cp_function_context): Likewise.
453 * decl.c: Don't include function.h.
454 (push_cp_function_context): Make it static. Make it suitable for
455 a save_lang_status callback.
456 (pop_cp_function_context): Likewise.
457 (maybe_push_to_top_level): Call push_function_context_to, not
458 push_cp_function_context.
459 (pop_from_top_level): Call pop_function_context_from, not
460 pop_cp_function_context.
461 (init_decl_processing): Set save_lang_status and
462 restore_lang_status. Call push_function_context_to, not
463 push_cp_function_context.
464 (cp_function_chain): Remove.
465 * decl2.c: Don't include function.h.
466 * except.c: Don't include function.h.
467 (start_anon_func): Call push_function_context_to, not
468 push_cp_function_context.
469 (end_anon_func): Call pop_function_context_from, not
470 pop_cp_function_context.
471 * init.c: Don't include function.h.
472 * lex.c (begin_definition_of_inclass_inline): Call
473 push_function_context_to, not push_cp_function_context.
474 (process_next_inline): Call pop_function_context_from, not
475 pop_cp_function_context.
476 * method.c: Don't include function.h.
477 (synthesize_method): Call push_function_context_to, not
478 push_cp_function_context. Call pop_function_context_from, not
479 pop_cp_function_context.
480 * typeck.c: Don't include function.h.
482 * decl.c (expand_static_init): Tweak handling of static
483 initializations for objects without constructors.
485 1999-09-03 Nathan Sidwell <nathan@acm.org>
487 * typeck.c (build_indirect_ref): Reject dereference of pointer to
490 1999-09-02 Mark Mitchell <mark@codesourcery.com>
492 * cp-tree.h (cp_function): Move here, from decl.c.
493 (cp_function_chain): Declare.
494 (dtor_label): New macro, instead of variable.
495 (ctor_label): Likewise.
496 (current_base_init_list): Likewise.
497 (current_member_init_list): Likewise.
498 (base_init_expr): Likewise.
499 (current_class_ptr): Likewise.
500 (current_class_ref): Likewise.
501 (last_tree): Likewise.
502 (last_expr_type): Likewise.
503 (current_function_returns_value): Likewise.
504 (current_function_returns_null): Likewise.
505 (current_function_just_assigned_this): Likewise.
506 (current_function_parms_stored): Likewise.
507 (temp_name_counter): Likewise.
508 (static_labelno): Likewise.
509 (expanding_p): Likewise.
510 (stmts_are_full_exprs_p): Likewise.
511 (in_function_try_handler): Likewise.
512 (lang_type): Remove nested type_flags. All uses changed.
513 * call.c (ctor_label): Remove.
514 (dtor_label): Likewise.
515 * class.c (current_class_ptr): Remove.
516 (current_class_ref): Likewise.
517 * decl.c (static_labelno): Remove.
518 (dtor_label): Likewise.
519 (last_dtor_insn): New macro, instead of variable.
520 (last_parm_cleanup_insn): Likewise.
521 (original_result_rtx): Likewise.
522 (in_function_try_handler): Remove.
523 (named_label_uses): New macro, instead of variable.
524 (named_labels): Likewise.
525 (current_function_returns_value): Remove.
526 (current_function_returns_null): Likewise.
527 (current_function_assigns_this): New macro, instead of variable.
528 (current_function_just_assigned_this): Likewise.
529 (current_binding_level): Likewise.
530 (init_decl_processing): Call push_cp_function_context.
531 (cp_function): Move to cp-tree.h
532 (cp_function_chain): Make it global.
533 (temp_name_counter): Remove.
534 (push_cp_function_context): Simplify.
535 (pop_cp_function_context): Likewise.
536 * decl2.c (temp_name_counter): Remove.
537 * init_c (current_base_init_list): Likewise.
538 (current_member_init_list): Likewise.
539 (base_init_expr): Likewise.
540 * method.c (static_labelno): Likewise.
541 * pt.c (last_tree): Likewise.
542 * semantics.c (expanding_p): Likewise.
543 (stmts_are_full_exprs_p): Likewise.
544 (last_expr_type): Likewise.
545 * typeck.c (dtor_label): Likewise.
546 (ctor_label): Likewise.
548 1999-09-01 Alex Samuel <samuel@codesourcery.com>
550 * decl2.c (arg_assoc_template_arg): New prototype. New function.
551 (arg_assoc_class): Use arg_assoc_template_arg for template
553 (arg_assoc): Likewise.
554 * pt.c (mangle_class_name_for_template): Allow member template
557 1999-09-02 Nathan Sidwell <nathan@acm.org>
559 * call.c (build_conditional_expr): Warn on enum mismatches.
560 (convert_arg_to_ellipsis): Move non-pod check to after
563 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
565 * gxx.gperf (hash, is_reserved_word): Add prototypes.
567 * init.c (build_vec_init): Initialize variable `try_block'.
569 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
570 Likewise for bzero/memset.
571 (token_getch, token_put_back): Add static prototypes. Remove
572 `inline' from the definitions.
573 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
575 1999-09-01 Mark Mitchell <mark@codesourcery.com>
577 * cp-tree.h (lang_type): Move align into type_flags.
578 (CLASSTYPE_ALIGN): Adjust accordingly.
579 * call.c (direct_reference_binding): Remove misleading comment.
581 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
583 * parse.y (language_string): Constify.
585 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
587 * repo.c (getpwd): Don't prototype.
588 * xref.c (getpwd): Likewise
590 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
592 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
593 Remove hacks for stuff which now comes from libiberty.
595 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
597 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
599 1999-08-30 Mark Mitchell <mark@codesourcery.com>
601 * cp-tree.h (begin_init_stmts): Declare.
602 (finish_init_stmts): Likewise.
603 * cvt.c (build_up_reference): Wrap the declaration of a temporary
604 in a statement-expression so that we will see it when expanding
605 tree structure later.
606 * init.c (begin_init_stmts): Don't make it static.
607 (finish_init_stmts): Likewise.
609 * cp-tree.h (start_handler_parms): New function.
610 (expand_start_catch_block): Take only one parameter.
611 (start_handler_parms): New function.
612 * decl.c (start_handler_parms): Define it.
613 * except.c (process_start_catch_block): Take only one parameter.
614 Don't call grokdeclarator here.
615 (expand_start_catch_block): Don't call grokdeclarator here,
617 * parse.y (handler_args): Adjust call to
618 expand_start_catch_block. Use start_handler_parms.
619 * pt.c (push_template_decl_real): Make permanent lists have
621 (tsubst_expr): Adjust calls to expand_start_catch_block
623 * semantics.c (expand_stmt): Likewise.
625 1999-08-29 Alex Samuel <samuel@codesourcery.com>
627 * pt.c (push_template_decl_real): Use template declaration from
628 class type if it exists.
630 1999-08-29 Mark Mitchell <mark@codesourcery.com>
632 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
633 (maybe_inject_for_scope_var): Declare it.
634 (initialize_local_var): Likewise.
635 * decl.c (maybe_inject_for_scope_var): Make it global.
636 (initialize_local_var): Likewise. Move cleanup handling here,
638 (make_rtl_for_nonlocal_decl): Use
639 push_obstacks_nochange/pop_obstacks, rather than
640 end_temporary_allocation/resume_temporary_allocation.
641 (cp_finish_decl): Try to complete the type of a variable when it
642 is declared. Move cleanup-handling to initialize_local_var.
643 (expand_static_init): Use tree-building code, rather than
645 * decl2.c (get_temp_name): Assert non-initializedness of
647 * init.c (create_temporary_var): Move RTL-assigning code to ...
648 (get_temp_regvar): Here.
649 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
650 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
651 call initialize_local_var to generate initialization code.
653 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
655 * cp-tree.h (fndecl_as_string, type_as_string,
656 type_as_string_real, args_as_string, decl_as_string,
657 expr_as_string, code_as_string, language_as_string,
658 parm_as_string, op_as_string, assop_as_string, cv_as_string,
659 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
661 * errfn.c (cp_printer): Likewise.
663 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
664 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
665 cp_file_of, code_as_string, language_as_string, parm_as_string,
666 op_as_string, assop_as_string, args_as_string, cv_as_string):
669 * tree.c (lang_printable_name): Likewise.
671 1999-08-28 Richard Henderson <rth@cygnus.com>
673 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
675 1999-08-28 Mark Mitchell <mark@codesourcery.com>
677 * cp-tree.h (strip_array_types): New function.
678 * decl.c (maybe_deduce_size_from_array_init): New function, split
679 out from cp_finish_decl.
680 (layout_var_decl): Likewise.
681 (maybe_commonize_var): Likewise.
682 (maybe_inject_for_scope_var): Likewise.
683 (initialize_local_var): Likewise.
684 (build_cleanup_on_safe_obstack): Likewise.
685 (check_initializer): Likewise.
686 (make_rtl_for_nonlocal_decl): Likewise.
687 (cp_finish_decl): Use them.
688 * typeck.c (strip_array_types): New function.
690 * cp-tree.def (LABEL_STMT): New tree node.
691 * cp-tree.h (LABEL_STMT_LABEL): New macro.
692 (shadow_label): Remove.
693 (declare_local_label): New function.
694 (finish_label_decl): Likewise.
695 * decl.c (make_label_decl): New function, split out from
697 (shadowed_labels): Remove.
698 (binding_level): Add shadowed_labels.
699 (clear_binding_level): Remove.
700 (push_binding_level): Just bzero the new binding level.
701 (pushlevel): Fix indentation.
702 (pop_label): New function.
703 (pop_labels): Likewise, split out from poplevel.
704 (poplevel): Pop local labels. Use pop_labels.
705 (maybe_push_to_top_level): Don't clear shadowed_labels.
706 (lookup_label): Use make_label_decl.
707 (shadow_label): Remove.
708 (declare_local_label): New function.
709 (define_label): Simplify.
710 (start_function): Don't clear shadowed_labels.
711 (cp_function): Remove shadowed_labels.
712 (push_cp_function_context): Don't save shadowed_labels.
713 (pop_cp_function_context): Don't restore it.
714 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
715 * parse.y (label_decl): Use finish_label_decl.
716 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
718 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
720 (finish_label_decl): New function.
721 (expand_stmt): Handle LABEL_STMTs and local label declarations.
723 1999-08-26 Mark Mitchell <mark@codesourcery.com>
725 * decl.c (lookup_label): Build labels on the permanent obstack
726 when building statement trees. Don't build RTL for labels when
727 building statement trees.
728 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
729 building statement trees.
730 (finish_label_stmt): Likewise.
731 (expand_stmt): Adjust accordingly.
732 * pt.c (tsubst_expr); Likewise.
733 (do_decl_instantiation): Robustify.
735 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
736 * tree.c (build_cplus_new): Set it.
737 * expr.c (cplus_expand_expr): Use it.
738 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
740 * decl.c (store_parm_decls): Reset immediate_size_expand.
741 (finish_function): Likewise.
743 * tree.c (cplus_unsave_expr_now): Don't return a value.
745 * semantics.c (do_poplevel): Always initialize the return value.
747 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
749 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
750 * tree.h (cplus_unsave_expr_now) : Same.
752 1999-08-25 Mark Mitchell <mark@codesourcery.com>
754 * decl.c (grokdeclarator): Amend comment.
755 * except.c (expand_start_catch_block): Call push_template_decl for
756 catch-block parameters.
757 * method.c (synthesize_method): Build an empty compound statement
758 for the body of a constructor.
760 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
762 * tree.c (cp_build_qualified_type_real): If we're asking for the
763 same quals we already have, just return.
765 1999-08-25 Mark Mitchell <mark@codesourcery.com>
767 * cp-tree.def (SUBOBJECT): New tree node.
768 * cp-tree.h (CLEANUP_P): New macro.
769 (SUBOBJECT_CLEANUP): Likewise.
770 (keep_next_level): Add parameter.
771 (get_temp_regvar): Don't declare.
772 (emit_base_init): Remove parameter.
773 (expand_aggr_init): Rename to build_aggr_init.
774 (expand_vec_init): Rename to build_vec_init.
775 (do_pushlevel): Remove.
776 (do_poplevel): Likewise.
777 (finish_cleanup): New function.
778 (finish_subobject): Likewise.
779 (stmts_are_full_exprs_p): New variable.
780 * decl.c (keep_next_level): Add parameter.
781 (cp_finish_decl): Use build_aggr_init, not
782 expand_aggr_init. Use finish_expr_stmt to expand the code.
783 (expand_static_init): Use tree-generating, not RTL-generating,
784 functions to handle the initialization.
785 (start_function): Remove dead code. Always have a momentary
786 obstack inside the function, even before hitting the first curly
788 (cplus_expand_expr_stmt): Move calls to
789 expand_{start,end}_target_temps into semantics.c.
790 (cp_function): Add stmts_are_full_exprs_p.
791 (push_cp_function_context): Save it.
792 (pop_cp_function_context): Restore it.
793 * decl2.c (get_temp_regvar): Move to init.c.
794 (do_static_initialization): Use build_{aggr,vec}_init.
795 (do_static_destruction): Fix typo in comment.
796 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
797 * except.c (expand_throw): Use create_temporary_var.
798 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
799 * init.c (expand_vec_init_try_block): Remove.
800 (expand_vec_init_catch_clause): Likewise.
801 (get_temp_regvar): New function.
802 (begin_init_stmts): Likewise.
803 (finish_init_stmts): Likewise.
804 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
806 (emit_base_init): Likewise. Remove unused parameter.
807 (expand_virtual_init): Likewise.
808 (expand_cleanup_for_base): Use finish_subobject.
809 (expand_aggr_vbase_init_1): Simplify.
810 (construct_virtual_bases): Use tree-generating functions to build
812 (expand_aggr_init): Likewise. Rename to build_aggr_init.
813 (expand_default_init): Likewise.
814 (expand_aggr_init_1): Likewise.
815 (expand_vec_init): Rename to build_vec_init.
816 * method.c (do_build_copy_constructor): Use tree-generating
817 functions. Don't call clear_last_expr.
818 (do_build_assign_ref): Likewise.
819 (synthesize_method): Call clear_last_expr here.
820 * parse.y (base_init): Don't call clear_last_expr here.
822 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
823 * semantics.c (do_pushlevel): Move to here.
824 (do_poplevel): Likewise.
825 (stmts_are_full_exprs_p): New variable.
826 (finish_expr_stmt): Handle logic for temoprary cleanup here.
827 (finish_for_stmt): Use finish_expr_stmt.
828 (finish_cleanup): New function.
829 (finish_function_try_block): Fix indentation.
830 (finish_subobject): New function.
831 (setup_vtbl_ptr): Call keep_next_level here.
832 (finish_stmt_expr): Handle a block with no scope inside the
833 statement-expression.
834 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
836 * tree.c (search_tree): Handle INIT_EXPR.
838 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
839 * typeck2.c (store_init_value): Change expand_aggr_init to
840 build_aggr_init in comment.
842 1999-08-25 Mark Mitchell <mark@codesourcery.com>
844 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
846 1999-08-25 Nathan Sidwell <nathan@acm.org>
848 * decl2.c (handle_class_head): Be graceful about additional
849 scope qualifiers. Adjust comments to reflect reality.
851 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
853 * call.c (build_conditional_expr): Fix typo.
854 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
855 lvalue before trying to mess with the sides.
857 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
859 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
861 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
863 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
865 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
866 Return arbitrary pointer or NULL.
867 (check_eh_spec): Call __throw_type_match_rtti_2.
868 * tinfo.h (*::dcast): Return int. Add valp parm.
869 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
870 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
871 (__throw_type_match_rtti): Now just a wrapper.
873 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
874 (init_exception_processing): Don't initialize them.
876 1999-08-23 Paul Burchard <burchard@pobox.com>
878 * decl.c (check_default_argument): Fix typo.
880 1999-08-22 Mark Mitchell <mark@codesourcery.com>
882 * cp-tree.def (STMT_EXPR): Fix typo in node name.
884 * dump.c (dump_next_stmt): New function.
885 (dequeue_and_dump): Use it.
887 * pt.c (tsubst_copy): Make sure to initialize return value for a
888 STMT_EXPR, even when processing_template_decl.
889 * semantics.c (finish_stmt_expr): A statement-expression whose
890 last statement is not an expression-statement has type `void'.
892 1999-08-20 Mark Mitchell <mark@codesourcery.com>
894 * semantics.c (finish_stmt_expr): Fix typo in comment.
895 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
897 * init.c (build_vec_delete_1): Make the children of a permanent
899 * pt.c (register_specialization): Don't register a specialization
902 1999-08-18 Andrew Haley <aph@cygnus.com>
904 * method.c (process_overload_item): Call build_mangled_C9x_name ()
905 for all integer parameter types larger than long long.
907 1999-08-19 Mark Mitchell <mark@codesourcery.com>
909 * pt.c (redeclare_class_template): Merge default template
910 arguments in both directions.
912 * typeck.c (common_type): Undo 1999-08-18 change. Remove
913 compiler_error message.
915 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
917 * cp-tree.h: Declare flag_use_repository.
918 * pt.c (do_decl_instantiation): Don't complain about duplicate
919 instantiation with -frepo.
920 (do_type_instantiation): Likewise.
922 * pt.c (push_template_decl_real): Complain about everything
923 that isn't a valid template.
925 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
928 1999-08-19 Mark Mitchell <mark@codesourcery.com>
930 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
931 * decl2.c (build_expr_from_tree): Handle it.
932 * error.c (dump_expr): Likewise.
933 * pt.c (for_each_template_parm): Likewise.
934 (tsubst_copy): Likewise.
935 * tree.c (search_tree): Likewise.
936 * semantics.c (finish_pseudo_destructor_call): Create it.
938 1999-08-18 Mark Mitchell <mark@codesourcery.com>
940 * search.c (setup_class_bindings): Robustify.
941 * typeck.c (common_type): Use same_type_p, not pointer equality,
944 * cp-tree.h (build_lang_field_decl): Remove.
945 * class.c (build_vtable): Replace calls to build_lang_field_decl
946 with build_lang_decl.
947 (prepare_fresh_vtable): Likewise.
948 (finish_struct_1): Likewise.
949 (init_class_processing): Likewise.
950 * decl.c (push_using_decl): Likewise.
951 (init_decl_processsing): Likewise.
952 (grokvardecl): Likewise.
953 (build_ptrmemfunc_type): Likewise.
954 (grokdeclarator): Likewise.
955 (build_enumerator): Likewise.
956 * decl2.c (grok_x_components): Likewise.
957 (do_class_using_decl): Likewise.
958 * except.c (call_eh_info): Likewise.
959 * init.c (init_init_processing): Likewise.
960 * rtti.c (expand_class_decl): Likewise.
961 * tree.c (build_base_fields): Likewise.
962 (build_vbase_pointer_fields): Likewise.
963 * lex.c (build_lang_decl): Build declarations on the permanent
964 obstack if we're building statmeent trees.
965 (retrofit_lang_decl): Handle both the full lang_decl and also the
966 smaller lang_decl_flags here.
967 (build_lang_field_decl): Remove.
968 * pt.c (push_template_decl_real): Issue errors for variable
969 declarations that are not static members.
971 1999-08-18 Richard Henderson <rth@cygnus.com>
973 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
976 1999-08-17 Mark Mitchell <mark@codesourcery.com>
978 * cp-tree.h (back_end_hook): New variable.
979 * decl2.c (back_end_hook): Define it.
980 (finish_file): If it's non-NULL, call it.
982 * decl.c (add_decl_to_level): New function.
983 (push_local_binding): Use it.
984 (find_binding): Fix typo in comment.
985 (pushdecl): Use add_decl_to_level. Put templates on the
986 corresponding namespace-scope binding levels.
987 * dump.c (dequeue_and_dump): Print the specializations of a
989 * pt.c (push_template_decl_real): Don't push a template multiple
992 1999-08-17 Mark Mitchell <mark@codesourcery.com>
994 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
995 (CALL_DECLARATOR_QUALS): Likewise.
996 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
997 * decl.c (grokdeclarator): Adjust to use them.
998 * decl2.c (grokfield): Likewise.
999 (reparse_absdcl_as_casts): Likewise.
1000 * lex.c (make_call_declarator): Likewise.
1001 (set_quals_and_spec): Likewise.
1002 * pt.c (tsubst): Likewise.
1003 * tree.c (mapcar): Remove special hack to handle third operand of
1006 1999-08-16 Mark Mitchell <mark@codesourcery.com>
1008 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
1009 * class.c (build_vtable): Use build_lang_field_decl to build the
1010 VAR_DECLs for vtables.
1011 (prepare_fresh_vtable): Likewise.
1012 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
1013 CAN_HAVE_FULL_LANG_DECL_P.
1014 (push_using_decl): Use build_lang_decl to build USING_DECLs.
1015 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
1016 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
1017 (build_lang_field_decl): Likewise.
1018 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
1021 * cp-tree.def (STMT_EXPR): New tree node.
1022 * cp-tree.h (STMT_EXPR_STMT): New macro.
1023 (store_return_init): Change prototype.
1024 (finish_named_return_value): New function.
1025 (expand_stmt): Likewise.
1026 (expand_body): Likewise.
1027 (begin_stmt_tree): Likewise.
1028 (finish_stmt_tree): Likewise.
1029 (expanding_p): New variable.
1030 (last_expr_type): Likewise.
1031 (building_stmt_tree): New macro.
1032 * decl.c (start_function): Use building_stmt_tree, not
1033 processing_template_decl, where appropriate.
1034 (store_parm_decls): Likewise.
1035 (store_return_init): Move most of the body to semantics.c.
1036 (finish_function): Use building_stmt_tree.
1037 (finish_stmt): Clear last_expr_type here.
1038 (cp_function): Add expanding_p, last_tree, last_expr_type.
1039 (push_cp_function_context): Save them.
1040 (pop_cp_function_context): Restore them.
1041 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
1042 * error.c (dump_expr): Handle STMT_EXPR.
1043 * except.c (expand_start_catch_block): Use building_stmt_tree.
1045 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
1046 (do_case): Move add_tree call to semantics.c.
1047 * parse.y (return_init): Use finish_named_return_value.
1048 (for.init.statement): Use finish_expr_stmt.
1049 * parse.c: Regenerated.
1050 * pt.c (do_pushlevel): Move to semantics.c.
1051 (do_poplevel): Likewise.
1052 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
1053 (tsubst_expr): Don't expand all the way to RTL here. Handle
1054 RETURN_INIT and CTOR_INITIALIZER.
1055 (instantiate_decl): Call expand_body after tsubst'ing into
1057 * semantics.c (expand_stmts): New function.
1058 (expanding_p): New variable.
1059 (last_expr_type): Likewise.
1060 (finish_expr_stmt): Use building_stmt_tree.
1061 (begin_if_stmt): Likewise.
1062 (finish_if_stmt_cond): Likewise.
1063 (finish_then_clause): Likewise.
1064 (begin_else_clause): Likewise.
1065 (finish_else_clause): Likewise.
1066 (begin_while_stmt): Likewise.
1067 (finish_while_stmt_cond): Likewise.
1068 (finish_while_stmt): Likewise.
1069 (finish_do_body): Likewise.
1070 (finish_do_stmt): Likewise.
1071 (finish_return_stmt): Likewise.
1072 (begin_for_stmt): Likewise.
1073 (fnish_for_init_stmt): Likewise.
1074 (finish_for_cond): Likewise.
1075 (finish_for_expr): Likewise.
1076 (finish_for_stmt): Likewise.
1077 (finish_break_stmt): Likewise.
1078 (finish_continue_stmt): Likewise.
1079 (finish_switch_cond): Likewise.
1080 (finish_switch_stmt): Likewise.
1081 (finish_case_label): Call add_tree here if necessary.
1082 (finish_goto_statement): Use building_stmt_tree.
1083 (begin_try_block): Likewise.
1084 (begin_function_try_block): Likewise.
1085 (finish_try_block): Likewise.
1086 (finish_function_try_block): Likewise.
1087 (finish_handler_sequence): Likewise.
1088 (finish_function_handler_sequence): Likewise.
1089 (begin_handler): Likewise.
1090 (finish_handler_parms): Likewise.
1091 (finish_handler): Likewise.
1092 (begin_compound_stmt): Likewise.
1093 (finish_compound_stmt): Likewise.
1094 (finish_asm_stmt): Likewise.
1095 (finish_label_stmt): Likewise.
1096 (finish_named_return_value): New function.
1097 (setup_vtbl_ptr): Moved here from decl2.c.
1098 (do_pushlevel): Moved here from pt.c.
1099 (do_poplevel): Likewise.
1100 (begin_stmt_expr): Use building_stmt_tree.
1101 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
1102 when building_stmt_tree.
1103 (begin_stmt_tree): New function.
1104 (finish_stmt_tree): Likewise.
1105 (expand_stmt): Likewise.
1106 (expand_body): Likewise.
1107 * tree.c (build_cplus_method_type): Make sure the argument types
1108 end up on the same obstack as the METHOD_TYPE.
1109 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
1110 THROW_EXPR, STMT_EXPR.
1111 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
1112 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
1113 sorry, if an unsupported node is encountered.
1114 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
1115 (c_expand_return): Don't call add_tree here.
1117 1999-08-15 Mark Mitchell <mark@codesourcery.com>
1119 * pt.c (check_default_tmpl_args): Don't check in local scopes.
1120 (tsubst_decl): Make sure the declaration is on a saveable
1121 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
1123 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
1125 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
1127 Speed up Koenig lookup.
1128 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
1129 to return namespaces we've looked at.
1130 * decl2.c (lookup_using_namespace): Likewise.
1131 (add_function): Don't call ovl_member.
1132 (lookup_arg_dependent): Initialize k.namespaces to the list of
1133 namespaces seen in unqualified lookup.
1134 * call.c (equal_functions): Move here from tree.c.
1135 (joust): Use it to handle duplicate candidates.
1136 * tree.c (ovl_member): Use ==.
1138 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1140 * cp-tree.def (DECL_STMT): Make it smaller.
1141 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
1142 (lang_decl): ... here. Add next.
1143 (DECL_SAVED_TREE): Adjust accordingly.
1144 (DECL_IMPLICIT_TYPEDEF_P): New macro.
1145 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1146 (DECL_STMT_DECL): Likewise.
1147 (create_implicit_typedef): New function.
1148 (maybe_push_decl): Likewise.
1149 (tsubst_default_argument): New function.
1150 (at_function_scope_p): Likewise.
1151 (add_decl_stmt): Likewise.
1152 (push_permanent_obstack): Likewise.
1153 * call.c (convert_default_arg): Use tsubst_default_argument.
1154 * class.c (add_method): Use push_permanent_obstack.
1155 (build_self_reference): Create a TEMPLATE_DECL for the
1156 self-reference, if necessary.
1157 * decl.c (pseudo_global_level_p): Only look at the current binding
1159 (push_binding): Use push_permanent_obstack.
1160 (create_implicit_typedef): New function.
1162 (duplicate_decls): Use push_permanent_obstack.
1163 (maybe_push_decl): New function.
1164 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
1165 (start_decl_1): Remove dead code.
1166 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
1167 pseudo_global_level_p.
1168 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
1170 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
1171 pseudo_global_level_p.
1172 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
1174 (get_sentry): Use push_permanent_obstack.
1175 * dump.c (dequeue_and_dump): Enable DECL_STMT.
1176 * except.c (call_eh_info): Use push_permanent_obstack.
1177 (build_eh_type_ref): Likewise.
1178 (do_pop_exception): Likewise.
1179 (expand_eh_spec): Likewise.
1180 (alloc_eh_object): Likewise.
1181 (expand_throw): Likewise.
1182 * init.c (build_java_class_ref): Likewise.
1183 * lex.c (get_time_identifier): Likewise.
1184 (free_lang_decl_chain): Correct type.
1185 (retrofit_lang_decl): Adjust accordingly.
1186 (build_lang_field_decl): Likewise.
1187 * lex.h (free_lang_decl_chain): Likewise.
1188 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
1189 * parse.c: Regenerated.
1190 * pt.c (tsubst_default_arguments): New function.
1191 (retrieve_local_specialization): Likewise.
1192 (register_local_specialization): Likewise.
1193 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
1194 pseudo_global_level_p to determine whether or not a template is
1196 (lookup_template_class): Likewise. Use create_implicit_typedef.
1197 (instantiate_class_template): Call tsubst_default_arguments for
1198 member functions, if appropriate.
1199 (tsubst_default_argument): New function.
1200 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
1201 * search.c (at_function_scope_p): New function.
1202 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
1203 (finish_label_stmt): Likewise.
1204 (add_decl_stmt): New function.
1205 (begin_class_definition): Likewise.
1206 (finish_typeof): Likewise.
1207 * tree.c (copy_template_template_parm): Likewise.
1208 (copy_to_permanent): Likewise.
1209 (push_permanent_obstack): Define.
1210 (mark_addressable): Use it.
1211 * typeck.c (mark_addressable): Likewise.
1213 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
1215 * cp-tree.h (init_cplus_unsave): New.
1216 (cplus_unsave_expr_now): New.
1217 * lex.c (init_parse): Call init_cplus_unsave.
1218 * tree.c (init_cplus_unsave): New.
1219 (cplus_unsave_expr_now): New.
1221 1999-08-13 Mark Mitchell <mark@codesourcery.com>
1223 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
1224 decl_constant_value to simplify array bounds.
1226 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
1228 * lang-options.h: Add -fms-extensions.
1229 * cp-tree.h: Declare flag_ms_extensions.
1230 * decl2.c: Define it.
1231 * class.c (instantiate_type): Don't complain about taking the address
1232 of a bound member function if -fms-extensions.
1233 * typeck.c (build_unary_op): Likewise.
1234 * decl.c (grokdeclarator): Or about implicit int.
1235 * init.c (resolve_offset_ref): Or about implicit '&'.
1237 1999-08-11 Mark Mitchell <mark@codesourcery.com>
1239 * cp-tree.h (minimal_parse_mode): Remove.
1240 (finish_label_stmt): New function.
1241 * decl.c (saved_scope): Remove minimal parse mode.
1242 (maybe_push_to_top_level): Don't save it.
1243 (pop_from_top_level): Don't restore it.
1244 (define_label): Split out template-handling code to semantics.c.
1245 (start_decl): Don't use minimal_parse_mode.
1246 (cp_finish_decl): Likewise.
1247 (start_function): Don't increment it.
1248 (store_return_init): Don't use it.
1249 (finish_function): Don't decrement it.
1250 * parse.y (label_colon): Use finish_label_stmt throughout.
1251 * parse.c: Regenerated.
1252 * pt.c (minimal_parse_mode): Don't define it.
1253 (tsubst_expr): Use finish_label_stmt.
1254 * semantics.c (finish_label_stmt): New function.
1256 * dump.c (queue): Be careful when computing bitmasks.
1257 (dequeue_and_dump): Describe binfos as binfos, not as
1260 * parse.y (pedantic): Give it itype. Adjust usage accordingly
1262 * parse.c: Regenerated.
1264 * Make-lang.in (CXX_SRCS): Remove sig.c.
1265 * Makefile.in (CXX_OBJS): Remove sig.o.
1267 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
1268 (CPTI_SIGNATURE_TYPE): Likewise.
1269 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
1270 (opaque_type_node): Likewise.
1271 (signature_type_node): Likewise.
1272 (sigtable_entry_type): Likewise.
1273 (flag_handle_signatures): Likewise.
1274 (lang_type): Remove is_signature, is_signature_pointer,
1275 is_signature_reference, has_opaque_typedecls,
1276 sigtables_has_been_generated. Adjust dummy. Remove signature,
1277 signature_pointer_to, signature_reference_to.
1278 (IS_SIGNATURE): Remove.
1279 (SET_SIGNATURE): Remove.
1280 (CLEAR_SIGNATURE): Remove.
1281 (IS_SIGNATURE_POINTER): Remove.
1282 (IS_SIGNATURE_REFERENCE): Remove.
1283 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
1284 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
1285 (CLASSTYPE_SIGNATURE): Remove.
1286 (SIGNATURE_TYPE): Remove.
1287 (SIGNATURE_METHOD_VEC): Remove.
1288 (SIGNATURE_POINTER_TO): Remove.
1289 (SIGNATURE_REFERENCE_TO): Remove.
1290 (lang_decl_flags): Remove is_default_implementation. Rename
1291 memfunc_pointer_to to saved_tree.
1292 (IS_DEFAULT_IMPLEMENTATION): Remove.
1293 (DECL_MEMFUNC_POINTER_TO): Remove.
1294 (DECL_MEMFUNC_POINTING_TO): Remove.
1295 (DECL_SAVED_TREE): Adjust definition.
1296 (tag_types): Remove signature_type_node.
1297 (SIGNATURE_FIELD_NAME): Remove.
1298 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
1299 (SIGNATURE_OPTR_NAME): Likewise.
1300 (SIGNATURE_SPTR_NAME): Likewise.
1301 (SIGNATURE_POINTER_NAME): Likewise.
1302 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
1303 (SIGNATURE_REFERENCE_NAME): Likewise.
1304 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
1305 (SIGTABLE_PTR_TYPE): Likewise.
1306 (SIGTABLE_NAME_FORMAT): Likewise.
1307 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
1308 (SIGTABLE_TAG_NAME): Likewise.
1309 (SIGTABLE_VB_OFF_NAME): Likewise.
1310 (SIGTABLE_VT_OFF_NAME): Likewise.
1311 (finish_base_specifiers): Change prototype.
1312 (build_signature_pointer_type): Remove.
1313 (build_signature_reference_type): Remove.
1314 (build_signature_pointer_constructor): Remove.
1315 (build_signature_method_call): Remove.
1316 (build_optr_ref): Likewise.
1317 (append_signature_fields): Likewise.
1318 (signature_error): Likewise.
1319 * call.c (build_this): Remove signature support.
1320 (build_over_call): Likewise.
1321 (build_new_method_call): Likewise.
1322 * class.c (add_implicitly_declared_members): Likewise.
1323 (finish_struct_1): Likewise.
1324 (finish_struct): Likewise.
1325 * cvt.c (cp_convert_to_pointer): Likewise.
1326 (convert_to_pointer_force): Likewise.
1327 (ocp_convert): Likewise.
1328 * decl.c (sigtable_decl_p): Remove.
1329 (init_decl_processing): Remove support for signatures.
1330 (cp_finish_decl): Likewise.
1331 (grokdeclarator): Likewise.
1332 (grokparms): Likewise.
1333 (xref_tag): Likewise.
1334 (start_function): Likewise.
1335 (start_method): Likewise.
1336 * decl2.c (finish_sigtable_vardecl): Remove.
1337 (flag_handle_signatures): Remove.
1338 (lang_f_options): Remove handle-signatures.
1339 (grokfield): Remove support for signatures.
1340 (grokbitfield): Likewise.
1341 (finish_file): Likewise.
1342 (reparse_absdcl_as_casts): Likewise.
1343 * error.c (dump_type_real): Likewise.
1344 (dump_function_decl): Likewise.
1345 * friend.c (make_friend_class): Likewise.
1346 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
1347 * hash.h: Regenerated.
1348 * init.c (build_new_1): Remove support for signatures.
1349 * lang-options.h: Remove -fhandle-signatures,
1350 -fno-handle-signatures.
1351 * lex.c (init_parse): Remove support for signatures.
1352 (yyprint): Likewise.
1353 * lex.h (rid): Remove RID_SIGNATURE.
1354 * method.c (build_decl_overload_real): Remove support for
1356 (hack_identifier): Likewise.
1357 * parse.y (base_class): Likewise.
1358 (base_class.1): Likewise.
1359 (access_specifier): Likewise.
1360 * search.c (lookup_member): Likewise.
1361 * semantics.c (finish_qualified_object_call_expr): Likewise.
1362 (finish_template_type_parm): Likewise.
1363 (begin_class_definition): Likewise.
1364 (finish_base_specifier): Likewise.
1366 * tree.c (build_cplus_method_type): Remove support for signatures.
1367 * typeck.c (require_complete_type): Likewise.
1368 (c_sizeof): Likewise.
1369 (c_alignof): Likewise.
1370 (build_object_ref): Likewise.
1371 (build_component_ref): Likewise.
1372 (build_indirect_ref): Likewise.
1373 (build_c_cast): Likewise.
1374 (build_modify_expr): Likewise.
1375 (convert_for_initialization): Likewise.
1376 * typeck2.c (signature_error): Remove.
1377 (store_init_value): Remove support for signatures.
1378 (digest_init): Likewise.
1379 (build_x_arrow): Likewise.
1380 (build_functional_cast): Likewise.
1381 * xref.c (GNU_xref_decl): Likewise.
1383 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1385 * lex.c (do_identifier): Remove unnecessary lookup of class field.
1387 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
1389 * decl2.c (set_decl_namespace): Do not complain about non-matching
1390 decls if processing a template.
1392 1999-08-09 Mark Mitchell <mark@codesourcery.com>
1394 * decl.c (build_ptrmemfunc_type): Handle qualified
1395 pointer-to-member types here.
1396 * tree.c (cp_build_qualified_type_real): Simplify handling here.
1398 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1400 * lex.c (lang_identify): Likewise.
1402 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
1404 * Makefile.in: Update dependencies.
1405 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
1407 * decl.c: Include "function.h"
1408 (cleanup_label, return_label): Delete declarations.
1409 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
1410 (finish_function): Rename last_parm_insn variable to
1411 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
1412 * decl2.c: Include "function.h".
1413 (rtl_expr_chain): Delete declaration.
1414 * method.c: Include "function.h"
1415 * tree.c (build_vbase_pointer_fields): Don't initialize
1416 DECL_SAVED_INSNS with NULL_RTX.
1417 * typeck.c: Include "function.h"
1419 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
1421 * semantics.c (begin_function_try_block, finish_function_try_block,
1422 finish_function_handler_sequence): New fns.
1423 * parse.y (function_try_block): Use them.
1424 * pt.c (instantiate_decl): Likewise.
1426 * cp-tree.h: Declare in_function_try_handler.
1427 * decl.c: Define it.
1428 (start_function): Clear it.
1429 (struct cp_function, push_cp_function_context): Save it.
1430 (pop_cp_function_context): Restore it.
1431 * parse.y (function_try_block): Set and clear it.
1432 * except.c (expand_end_catch_block): Rethrow if we reach the end
1433 of a function-try-block handler in a ctor or dtor.
1434 * typeck.c (c_expand_return): Complain about returning from a
1435 function-try-block handler of a ctor.
1437 * parse.y (function_try_block): Call end_protect_partials
1438 before expand_start_all_catch.
1440 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
1442 * decl.c (struct binding_level): Add eh_region field.
1443 (push_binding_level): Set it.
1444 (define_label): Complain about jumping into an EH block.
1446 * ptree.c (print_lang_type): Print the real type of a PMF.
1447 Print what exceptions a fn type throws.
1449 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1451 * class.c (count_fields, add_fields_to_vec): Add static prototype.
1453 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
1454 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
1457 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
1460 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
1463 * dump.c (queue_and_dump_index, dump_int, dump_string,
1464 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
1466 (dump_stmt): Add static prototype.
1468 * errfn.c (cp_thing): Constify a char*.
1470 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
1471 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
1472 dump_expr): Constify a char*.
1474 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
1475 read_line_number): Add static prototype.
1476 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
1477 (real_yylex): Move label `letter' into the scope where it is used.
1479 * method.c (build_mangled_template_parm_index, build_overload_int,
1480 build_decl_overload_real, get_id_2): Constify a char*.
1482 * search.c (check_final_overrider): Make static.
1484 * typeck.c (composite_pointer_type): Constify a char*.
1486 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1488 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
1489 we're looking at a class.
1491 * decl.c (lookup_name_real): Set the complain flag if we're
1492 looking for a namespace member.
1494 * lex.c (real_yylex): We can have a number with no digits.
1496 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
1498 * search.c (binfo_from_vbase): New fn.
1499 * cp-tree.h: Declare it.
1500 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
1501 from pointer to member of virtual base.
1502 * typeck.c (get_delta_difference): Likewise.
1504 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
1506 * pt.c (tsubst): Use build_index_type to build in-template array
1507 index type. Fixes g++.oliva/dwarf1.C.
1508 * decl.c (grokdeclarator): Likewise, just for consistency, as it
1509 doesn't seem to trigger the bug without it.
1511 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
1513 * typeck2.c (add_exception_specifier): Use complete_type.
1515 1999-08-06 Mark Mitchell <mark@codesourcery.com>
1517 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
1518 (dump_binary_op): Bulletproof.
1519 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
1520 * tree.c (search_tree): Don't enumerate all the nodes of classes
1521 `1', `2', and `<'; handle them generically. Don't be sorry about
1522 "unrecognized tree codes"; just abort.
1523 (no_linkage_check): Don't do linkage checks for templates.
1525 * tree.c (cp_build_qualified_type_real): Handle
1526 pointer-to-member-function types correctly.
1528 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
1530 * decl.c (pushdecl): Only give an error for shadowing a parm
1531 from *this* function.
1533 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
1535 * typeck2.c: Update URLs and mail addresses.
1537 1999-08-04 Nathan Sidwell <nathan@acm.org>
1539 * cp-tree.h (empty_except_spec): New global var.
1540 (compexcepttypes): Remove prototype.
1541 (comp_except_specs): Prototype new global function.
1542 (add_exception_specifier): Prototype new global function.
1543 * decl.c (empty_except_spec): Define new global var.
1544 (duplicate_decls): Use comp_except_specs, reword error message.
1545 (init_decl_processing): Initialize empty_except_spec.
1546 Adjust build_exception_variant calls.
1547 * parse.y (exception_specification_opt): Use empty_except_spec.
1548 (ansi_raise_identifier): Call check_for_new_type.
1549 (ansi_raise_identifiers): Use add_exception_specifier.
1550 * pt.c (tsubst): Use add_exception_specifier to build exception
1552 * search.c (check_final_overrider): New static function, broken
1553 out of get_matching_virtual. Check throw specifiers, reword
1555 (get_matching_virtual): Use check_final_overrider.
1556 * tree.c (build_exception_variant): Use comp_except_specs.
1557 * typeck.c (compexcepttypes): Remove.
1558 (comp_except_types): New static function, helper for
1559 comp_except_specs. Compare two types as exception specifiers.
1560 (comp_except_specs): New global function, compare two exception
1562 (comptypes): Adjust for comp_except_specs.
1563 * typeck2.c (add_exception_specifier): New global function.
1565 * class.c (check_for_override): Reword error message.
1567 1999-08-03 Nathan Sidwell <nathan@acm.org>
1569 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
1570 * cp-tree.h (struct lang_type): Added non_pod_class flag.
1571 (CLASSTYPE_NON_POD_P): New macro to access it.
1572 * class.c (finish_struct_1): Determine non-PODness.
1573 Check for arrays of pointers (-Weffc++).
1574 Remove array inspection duplicated code.
1575 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
1576 Use CLASSTYPE_NON_POD_P.
1578 1999-08-03 Nathan Sidwell <nathan@acm.org>
1580 * class.c (duplicate_tag_error): Preserve template information.
1582 1999-08-03 Nathan Sidwell <nathan@acm.org>
1584 * decl.c (start_enum): Show location of previous definition.
1585 * parse.y (enumlist_opt): New reduction.
1586 (structsp): Simplify enum rules to use enumlist_opt.
1588 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
1590 * lex.c (yyprint): Handle PFUNCNAME.
1592 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
1593 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
1595 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
1597 * decl.c (start_decl): Set attributes before duplicate_decls call.
1599 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1601 * Make-lang.in (CXX_SRCS): Add dump.c.
1602 * Makefile.in (CXX_OBJS): Add dump.o.
1603 (dump.o): New target.
1604 * cp-tree.h (DECL_CONV_FN_P): Document.
1605 (DECL_OVERLOADED_OPERATOR_P): New function.
1606 (TYPE_PTRMEM_CLASS_TYPE): New macro.
1607 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1608 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
1609 (ASM_VOLATILE_P): New macro.
1610 (STMT_LINENO): Likewise.
1611 (cp_namespace_decls): New function.
1612 (dump_node_to_file): New function.
1613 * decl.c (cp_namespace_decls): New function.
1614 (walk_namespaces_r): Use it.
1615 (wrapup_globals_for_namespace): Likewise.
1616 * decl2.c (flag_dump_translation_unit): New variable.
1617 (lang_decode_option): Handle -fdump-translation-unit.
1618 (finish_file): If flag_dump_translation_unit is set, dump the
1621 * lang-options.h: Add -fdump-translation-unit.
1622 * pt.c (tsubst_template_parms): Robustify.
1623 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
1624 (tsubst_expr): Use STMT_LINENO.
1625 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
1626 for invalid cv-qualifiers even while building templates.
1628 1999-08-02 Richard Henderson <rth@cygnus.com>
1630 * call.c: Include defaults.h instead of expr.h.
1633 * typeck.c: Include defaults.h.
1635 1999-08-02 Mark Mitchell <mark@codesourcery.com>
1637 * lex.c (errorcount, sorrycount): Don't declare.
1638 * repo.c (errorcount, sorrycount): Likewise.
1639 * typeck2.c (errorcount, sorrycount): Likewise.
1641 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
1643 * call.c (convert_default_arg, build_over_call): Change all uses of
1644 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
1645 Ensure expr.h is included.
1646 * decl.c (grokparams): Ditto.
1647 * pt.c (tsubst_decl): Ditto.
1648 * typeck.c (convert_arguments): Ditto.
1650 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
1652 * class.c (mark_overriders): Fix order of args to overrides.
1653 (warn_hidden): Likewise. Fix for having virtual and non-virtual
1654 functions with the same name.
1656 1999-08-02 Richard Henderson <rth@cygnus.com>
1658 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
1660 1999-08-01 Mark Mitchell <mark@codesourcery.com>
1662 * call.c (build_conditional_expr): Fix typo in comment.
1664 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
1666 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
1667 case_stack; use in_control_zone_p.
1668 * typeck.c (c_expand_return): Likewise.
1670 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
1672 * except.c (catch_clauses): Delete declaration.
1674 1999-07-30 Mark Mitchell <mark@codesourcery.com>
1676 * call.c (build_conditional_expr): Call convert_from_reference to
1677 avoid reference/non-reference type confusion. Fix typo.
1679 1999-07-30 Richard Henderson <rth@cygnus.com>
1681 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
1682 * cp-tree.h (initializer_constant_valid_p): Remove.
1684 1999-07-28 Mark Mitchell <mark@codesourcery.com>
1686 * call.c (conditional_conversion): Don't build BASE_CONVs for
1687 conversions between things that have the same type.
1688 (build_conditional_expr): Tweak.
1689 (convert_like): Some BASE_CONVs really do require the generation
1692 * init.c (perform_member_init): Don't go through build_modify_expr
1693 for simple initializations.
1695 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
1697 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
1698 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
1699 virtual functions and MI. Simplify.
1701 * method.c: Remove prototype for largest_union_member.
1702 * pt.c (determine_specialization): Fix uninitialized warning.
1703 * lex.c (real_yylex): Likewise.
1705 1999-07-27 Mark Mitchell <mark@codesourcery.com>
1707 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
1710 * cp-tree.h (BINFO_VIRTUALS): Document new format.
1711 * class.c (modify_one_vtable): Change prototype accordingly.
1712 (modify_all_vtables): Likewise.
1713 (modify_all_direct_vtables): Likewise.
1714 (modify_all_indirect_vtables): Likewise.
1715 (build_vtable_entry_for_fn): New function.
1716 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
1717 (modify_vtable_entry): Likewise.
1718 (add_virtual_function): Likewise.
1719 (build_vtbl_initializer): New function.
1720 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
1721 (fixup_vtable_deltas1): Likewise.
1722 (fixup_vtable_deltas): Likewise.
1723 (override_one_vtable): Likewise.
1724 (finish_struct_1): Likewise.
1726 * error.c (dump_expr): Likewise.
1727 * search.c (get_abstract_virtuals_1): Likewise.
1728 (get_abstract_virtuals): Likewise.
1729 (expand_upcast_fixups): Likewise.
1730 * tree.c (debug_binfo): Likewise.
1731 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
1732 __pure_virtual here.
1734 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1736 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
1737 as per 1999-07-26 change.
1739 * typeck.c (c_sizeof): Don't allow non-static data members.
1740 (expr_sizeof): Likewise.
1742 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
1744 * input.c (feed_input): Only touch lineno and input_filename
1745 if !USE_CPPLIB. Save the old values before setting the new ones.
1747 * input.c (feed_input): Add file, line parms.
1748 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
1749 (real_yylex): Check linemode before input_redirected().
1751 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
1752 from op new to warning.
1754 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1756 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
1757 * call.c: All uses changed.
1758 * typeck.c: Likewise.
1760 1999-07-26 Nathan Sidwell <nathan@acm.org>
1762 * exception.cc (__cplus_type_matcher): Match __eh_matcher
1765 1999-07-26 Mark Mitchell <mark@codesourcery.com>
1767 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
1768 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
1769 (strip_top_quals): Declare.
1770 (ncp_convert): Likewise.
1771 (type_after_usual_arithmetic_converions): Likewise.
1772 (composite_pointer_type): Likewise.
1773 * call.c (strip_top_quals): Don't make it static.
1774 (promoted_arithmetic_type_p): New function.
1775 (conditional_conversion): Likewise.
1776 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
1777 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
1778 for converting a type to itself.
1779 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
1780 (implicit_conversion): Make sure the from and to types are
1782 (add_builtin_candidate): Correct handling of ?: operator.
1783 (add_builtin_candidates): Improve documentation.
1784 (build_conditional_expr): New function.
1785 (can_convert): Implement in terms of can_convert_arg.
1786 (ncp_convert): New function.
1787 * typeck.c (type_after_usual_arithmetic_conversions): New
1788 function, split out from common_type.
1789 (composite_pointer_type): New function, split out from
1790 build_conditional_expr.
1791 (common_type): Use type_after_usual_arithmetic_conversions.
1792 Remove redundant attribute merging.
1793 (comptypes): Tidy. Handle COMPLEX_TYPE.
1794 (build_binary_op_nodefault): Use null_ptr_cst_p.
1795 (build_conditional_expr): Remove.
1796 (convert_for_assignment): Use new conversion functions.
1798 * cp-tree.h (abstract_virtuals_error): Change declaration.
1799 * typeck2.c (abstract_virtuals_error): Check to see if an error
1800 ocurred, and return a boolean value accordingly.
1801 (build_functional_cast): Adjust accordingly.
1802 * class.c (finish_struct_1): Likewise.
1803 * cvt.c (ocp_convert): Likewise.
1804 * decl.c (cp_finish_decl): Likewise.
1805 (grokparams): Likewise.
1806 (grok_op_properties): Likewise.
1807 (start_function): Likewise.
1808 * init.c (build_new_1): Likewise.
1810 * pt.c (unify): Don't get confused by pointers-to-member functions.
1812 * search.c (build_cplus_new): Robustify.
1814 1999-07-24 Richard Henderson <rth@cygnus.com>
1816 * gxx.gperf (__builtin_va_arg): New.
1817 * parse.y (VA_ARG): New token.
1818 (unary_expr): Recognize it.
1820 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
1822 * g++FAQ.texi: Deleted per Joe Buck's request.
1823 * Makefile.in: Corresponding changes.
1825 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
1827 * lex.c: Sync with C frontend.
1828 (whitespace_cr): New fn.
1829 (skip_white_space): Use it.
1830 (init_parse): Reorder.
1831 (yyprint): Support CONSTANT.
1832 (pragma_getc, pragma_ungetc): Bring back.
1833 (read_line_number): Change in_system_header directly.
1834 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
1835 (parse_float): Update to C version.
1836 (yylex): Handle '$' under the letter case.
1837 Remove looking_for_typename handling.
1838 Support hex floating point constants.
1839 Follow C's lead for choosing type of integer constants.
1840 Rearrange stuff to match C frontend.
1841 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
1842 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
1844 1999-07-23 Mark Mitchell <mark@codesourcery.com>
1846 * call.c (reference_binding): Tweak.
1847 (mayble_handle_implicit_object): Use direct_reference_binding to
1848 create the right implicit conversion sequence.
1850 1999-07-22 Mark Mitchell <mark@codesourcery.com>
1852 * pt.c (convert_nontype_argument): Don't call decl_constant_value
1853 if we're converting to a reference type.
1855 * call.c (NEED_TEMPORARY_P): New macro.
1856 (standard_conversion): Set it, for derived-to-base conversions.
1857 (reference_related_p): New function.
1858 (reference_compatible_p): Likewise.
1859 (convert_class_to_reference): Likewise.
1860 (direct_reference_binding): Likewise.
1861 (reference_binding): Rework for standards-compliance.
1862 (convert_like): Adjust accordingly.
1863 (maybe_handle_ref_bind): Simplify; the right conversion sequences
1864 are now built up in reference_binding.
1865 (initialize_reference): New function.
1866 * cp-tree.h (ICS_USER_FLAG): Document.
1867 (ICS_THIS_FLAG): Likewise.
1868 (ICS_BAD_FLAG): Likewise.
1869 (NEED_TEMPORARY_P): Likewise.
1870 (cp_lvalue_kind): New type.
1871 (real_lvalue_p): Return it.
1872 * error.c (dump_expr): Provide more accurate representation for
1874 * init.c (expand_default_init): Do not try to perform implicit
1875 conversions for a brace-enclosed initializer.
1876 * search.c (lookup_conversions): Document.
1877 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
1879 (real_lvalue_p): Adjust accordingly.
1880 (lvalue_p): Likewise.
1881 (build_cplus_new): Don't allow the creation of an abstract class.
1882 * typeck.c (convert_for_initialization): Use initialize_reference.
1884 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
1886 * lex.c (real_yylex) : Correct the test for overflow when lexing
1889 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
1891 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
1892 not DECL_BUILT_IN, to determine if a function is internally declared.
1893 (duplicate_decls): Likewise. Improve handling of builtins.
1894 (push_overloaded_decl): Remove special handling of builtins.
1896 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
1898 * decl.c (grokdeclarator): Pull out decl_constant_value in
1901 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
1902 * cp-tree.h, pt.c, semantics.c: Adjust.
1903 * method.c (largest_union_member): Remove.
1905 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
1907 * lex.c (token_getch, token_put_back): New fns.
1908 (real_yylex): Use them.
1910 * lex.c (lang_init): Generalize.
1911 (lang_init_options): Tell cpplib this is C++.
1912 (nextchar): Remove. Replace uses with put_back.
1913 (skip_white_space): Handle linemode here. Optimize for cpplib.
1914 (extend_token_buffer_to): New fn.
1915 (extend_token_buffer): Use it.
1916 (read_line_number, check_newline): Just deal with tokens.
1917 (real_yylex): More cpplib optimizations. Simplify. Don't produce
1918 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
1919 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
1920 * parse.y (PAREN_STAR_PAREN): Remove.
1921 * input.c: Don't use the putback machinery with cpplib.
1922 (sub_getch): Fold back into getch.
1923 (getch): Don't handle linemode here.
1924 (feed_input): Unget any text in the token buffer.
1926 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
1927 nextyychar, nextyylval): Remove.
1929 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
1930 Jason Merrill <jason@yorick.cygnus.com>
1932 * lex.c (indent_level): New variable.
1933 (init_parse): Set cpp_token to CPP_DIRECTIVE.
1934 (consume_string): Make this smart about USE_CPPLIB.
1935 (yyungetc): Use put_back function.
1936 (pragma_getc, pragma_ungetc): Functions deleted.
1937 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
1938 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
1940 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
1941 Also, clean up cases where we redundantly set token_buffer[0].
1942 (read_line_number): New fn.
1943 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
1944 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
1945 (sub_getch): Conditionalize out code that's not appropriate if
1947 (put_back): Rewrite in case USE_CPPLIB is defined.
1948 (input_redirected): Ditto.
1950 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
1952 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
1953 c_global_trees and accessor macros defined in c-common.h.
1954 (cp_tree_index): New enumeration.
1955 (cp_global_trees): Declare new array. Add accessor macros for it, and
1956 delete declarations of tree nodes replaced by it.
1957 (builtin_function): Delete macro, add declaration for new function.
1959 * decl.c: Delete definitions for tree nodes that were replaced by
1960 cp_global_trees and c_global_trees.
1961 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
1962 to generate the common builtins here.
1963 (builtin_function): New function.
1964 * decl2.c (abort_fndecl): Delete declaration.
1965 * except.c (expand_builtin_return_address): Delete declaration.
1966 (builtin_return_address_fndecl): Delete variable.
1967 (const_ptr_type_node): Delete declaration.
1968 * lex.c (cons_up_default_function): Delete declaration of
1970 * parse.y (void_list_node): Delete declaration.
1971 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
1973 (const_string_type_node): Delete declaration.
1974 * search.c (abort_fndecl): Delete declaration.
1975 * Makefile.in: Update dependencies.
1977 1999-07-19 Mark Mitchell <mark@codesourcery.com>
1979 * pt.c (check_default_tmpl_args): Move test for missing default
1980 arguments here, from ...
1981 (end_template_parm_list): Here.
1983 1999-07-18 Mark Mitchell <mark@codesourcery.com>
1985 * decl.c (lookup_nested_type): Remove.
1986 (pushtag): Don't call it.
1988 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
1990 * Makefile.in (INTERFACE): Bump to 2.
1992 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
1994 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
1995 instructions to gcc.gnu.org. Removed e-mail address.
1997 1999-07-17 Mark Mitchell <mark@codesourcery.com>
1999 * pt.c (determine_specialization): Tighten error-checking.
2000 (end_template_parm_list): Likewise.
2002 1999-07-14 Mark Mitchell <mark@codesourcery.com>
2004 * pt.c (check_default_tmpl_args): Handle friends defined in the
2005 class just like member functions defined in the class.
2007 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2008 Jason Merrill <jason@yorick.cygnus.com>
2010 * cp-tree.h (struct lang_decl): Added field for storing sorted
2011 FIELD_DECLs (used in TYPE_DECLs).
2012 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
2013 (DECL_SORTED_FIELDS): New macro.
2014 * class.c (method_name_cmp): New function.
2015 (finish_struct_methods): Modified to support sorting and searching
2017 (finish_struct_anon): Changed code in inner loop to use ELT rather
2018 than UELT (which required an extra indirection for every reference).
2019 (field_decl_cmp): New function to support sorting FIELD_DECLs.
2020 (finish_struct_1): Sort fields.
2021 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
2022 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
2023 Also, switch to using array indexing rather than a changing pointer.
2024 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
2027 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
2029 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
2030 casts in system headers or extern "C" blocks.
2032 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
2035 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
2037 * decl2.c (write_virtuals): Deleted declaration.
2038 * cp-tree.h (write_virtuals): Deleted extern declaration.
2039 * class.c (finish_struct_1): Removed #if 0'd code that mentions
2041 * semantics.c (begin_class_definition): Rewrite code to not depend
2044 * lex.c (cp_pragma_interface): New function.
2045 (cp_pragma_implementation): Likewise.
2046 (handle_cp_pragma): Call them.
2048 * typeck.c (comptypes): Simplify C code in look_hard.
2050 * xref.c (PALLOC): Use xcalloc, not calloc.
2051 (SALLOC): Use xmalloc, not malloc.
2053 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
2055 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
2058 * decl.c (duplicate_decls): If a redeclaration doesn't match the
2059 initial declaration, then don't save the inline info and by all
2060 means don't mark the function as a builtin function.
2062 * decl.c (lookup_name_real): Set NONCLASS to 1 if
2063 CURRENT_CLASS_TYPE is 0.
2065 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
2068 * ptree.c (print_lang_type): Added vtable-needs-writing.
2070 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
2072 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
2074 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
2076 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2077 Merged into c-common.
2079 1999-07-05 Dave Brolley <brolley@cygnus.com>
2081 * lex.c (errorcount): Declare it.
2082 (finish_parse): Update errorcount for when using CPPLIB.
2084 1999-07-05 Mark Mitchell <mark@codesourcery.com>
2086 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
2088 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
2089 * decl.c (push_class_binding): Use it.
2090 (lookup_name_real): Likewise.
2092 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
2094 * cp-tree.h (widest_integer_literal_type_node,
2095 widest_unsigned_literal_type) : New.
2096 * decl.c (widest_integer_literal_type_node,
2097 widest_unsigned_literal_type) : New.
2098 (init_decl_processing): Handle/use the two new types.
2099 * lex.c (real_yylex): Same.
2100 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
2103 1999-07-01 Mark Mitchell <mark@codesourcery.com>
2105 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
2106 to anonymous cv-qualified types.
2108 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
2110 * lex.c (real_yylex) : Change integer literal overflow handling to
2113 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
2115 1999-06-28 Richard Henderson <rth@cygnus.com>
2117 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
2119 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
2121 * error.c (dump_type_real): Handle TREE_LIST again.
2123 * typeck.c (comp_target_parms): Don't complain about
2124 converting from () to (...) if !flag_strict_prototype.
2126 * decl.c (grokdeclarator): Update the names of all variants when
2129 1999-06-21 Mark Mitchell <mark@codesourcery.com>
2131 * init.c (expand_aggr_vbase_init): Rename to
2132 construct_virtual_bases. Conditionalize construction here,
2134 (emit_base_init): Here.
2136 1999-06-19 Mark Mitchell <mark@codesourcery.com>
2138 * semantics.c (finish_asm_statement): Apply decay conversions to
2141 * decl.c (expand_static_init): When building an anonymous function
2142 for use with atexit, compute its body before and after entering
2145 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
2148 1999-06-18 Mark Mitchell <mark@codesourcery.com>
2150 * init.c (expand_aggr_vbase_init): Add flag parameter.
2151 (build_partial_cleanup_for): Remove, inlining into ..
2152 (expand_cleanup_for_base): ... here. Take flag parameter.
2153 (emit_base_init): Pass the in_chrg parameter to
2154 emit_aggr_vbase_init.
2155 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
2157 1999-06-16 Mark Mitchell <mark@codesourcery.com>
2159 * decl2.c (import_export_decl): Use same_type_p, rather than
2160 relying on pointer-equality for types.
2162 * method.c (do_build_copy_constructor): Simplify.
2164 * call.c (build_method_call): Remove bogus code for two-argument
2166 * init.c (build_new_1): Expand on comment, and remove dead code.
2168 * init.c (expand_cleanup_for_base): New function, split out
2170 (emit_base_init): Here.
2171 (expand_aggr_vbase_init): Use it.
2173 1999-06-15 Mark Mitchell <mark@codesourcery.com>
2175 * cp-tree.h (class_cache_firstobj): Declare.
2176 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2177 * class.c (permanent_obstack): Remove declaration.
2178 (class_cache_firstobj): Make it global.
2179 (add_method): Don't use permanent_obstack directly.
2180 (pushclass): Only free the class_cache_obstack if we know how far
2182 (maybe_push_cache_obstack): Rename to push_cache_obstack.
2183 * decl.c: Remove dead comment.
2184 (saved_scope): Add class_cache_firstobj.
2185 (push_to_top_level): Save it.
2186 (pop_from_top_level): Restore it.
2187 (push_class_level_binding): Use push_cache_obstack, not
2188 maybe_push_cache_obstack.
2189 * search.c (push_class_decls): Likewise.
2191 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
2193 * pt.c (tsubst_friend_function): Push into namespace of friend
2194 function before pushdecl'ing it.
2196 1999-06-14 Nathan Sidwell <nathan@acm.org>
2198 * call.c (build_new_op): Remove REF_BIND from all operands.
2200 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
2202 * init.c (build_new_1): Look up operator delete even if there was
2203 no explicit new placement.
2205 1999-06-08 Nathan Sidwell <nathan@acm.org>
2207 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
2209 (build_throw): ... here. Call it.
2210 (process_start_catch_block): Call it.
2212 1999-06-07 Mark Mitchell <mark@codesourcery.com>
2214 * search.c (convert_pointer_to_single_level): Reimplement without
2217 1999-06-06 Mark Mitchell <mark@codesourcery.com>
2219 * method.c (is_back_referenceable_type): Back-reference bools when
2222 1999-06-07 Dave Brolley <brolley@cygnus.com>
2224 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
2225 * input.c (putback_buffer): New structure type.
2226 (putback): Replaces putback_char member.
2227 (putback): Replaces putback_char static variable.
2228 (feed_input): Use putback.
2229 (end_input): Use putback.
2230 (sub_getch): Use putback.
2231 (put_back): Use putback.
2233 1999-06-05 Mark Mitchell <mark@codesourcery.com>
2235 * decl.c (grokdeclarator): Fix typo in last change.
2237 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
2239 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
2240 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
2242 1999-06-04 Nathan Sidwell <nathan@acm.org>
2244 * except.c (build_throw): Check throw expression validity.
2246 1999-06-03 Mark Mitchell <mark@codesourcery.com>
2248 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
2249 just because flag_signed_bitfields is false.
2251 1999-06-03 Nathan Sidwell <nathan@acm.org>
2253 * semantics.c (begin_class_definition): Update the struct's
2255 * class.c (finish_struct): ... rather than here.
2257 * decl.c (make_typename_type): Don't rely on uninitialized
2260 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2262 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
2264 1999-05-31 Mark Mitchell <mark@codesourcery.com>
2266 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
2267 and friends rather than messing with current_obstack directly.
2268 (cp_build_qualified_type_real): Rework ARRAY_TYPE
2269 allocation to match practice throughout the rest of the
2272 1999-05-30 Mark Mitchell <mark@codesourcery.com>
2274 * lex.c (make_lang_type): Create TYPE_BINFO for
2275 TEMPLATE_TYPE_PARMs just like for non-template types.
2277 * decl.c (start_decl): Move checks on initialization to ...
2278 (cp_finish_decl): Here. Tidy formatting slightly.
2280 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2282 * decl.c (add_binding): Don't complain about a redeclaration of a
2283 semantically identical typedef in a local scope.
2285 1999-05-28 Nathan Sidwell <nathan@acm.org>
2287 * decl.c (complete_array_type): Allocate off same obstack. Fix
2288 DO_DEFAULT comment to match reality.
2290 * friend.c (make_friend_class): Fix diagnostic typo.
2292 1999-05-28 Mark Mitchell <mark@codesourcery.com>
2294 * decl.c (lookup_namespace_name): Handle getting a
2296 (expand_static_init): Don't call pushdecl for implicitly declared
2297 `atexit' used to register destructors.
2299 1999-05-25 Mark Mitchell <mark@codesourcery.com>
2301 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
2304 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
2305 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
2306 by combining TEMPLATE_INFO and LEVEL into a single union.
2307 (DECL_TEMPLATE_INFO): Reformat.
2308 (DECL_SAVED_TREE): Document.
2309 (DECL_TEMPLATE_INJECT): Remove.
2310 * class.c (finish_struct): Remove code to deal with
2311 DECL_TEMPLATE_INJECT.
2313 * decl.c (maybe_process_template_type_declaration): Handle all new
2314 types in templates uniformly.
2315 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
2317 * pt.c (lookup_template_class): Inject template instantiations of
2318 forward-declarations.
2319 (instantiate_class_template): Remove code processing
2320 DECL_TEMPLATE_INJECT.
2322 * pt.c (lookup_template_class): Tweak lookup to find member
2325 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
2327 * semantics.c (finish_asm_stmt): Make strings permanent if they're
2330 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
2332 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
2333 parts of pointer to data member types.
2335 1999-05-24 Mark Mitchell <mark@codesourcery.com>
2337 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
2338 and then make it look like `abort'. Just use `abort' instead.
2340 * typeck.c (build_static_cast): Don't allow static_casts that cast
2342 (casts_away_constness_r): New function.
2343 (casts_away_constness): Likewise.
2345 * decl.c (lookup_tag): Remove code no longer needed after
2346 name-lookup improvements.
2347 * decl2.c (handle_class_head): Make error-recovery more robust.
2348 * friend.c (make_friend_class): Reject templated typename types.
2349 * lex.c (is_global): A template parameter isn't global.
2350 * parse.y (class_head): Robustify.
2351 * parse.c: Regenerated.
2353 1999-05-22 Mark Mitchell <mark@codesourcery.com>
2355 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
2356 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
2358 * cp-tree.h (push_nested_namespace): Declare.
2359 (pop_nested_namespace): Likewise.
2360 * decl.c (push_nested_namespace): New function.
2361 (pop_nested_namespace): Likewise.
2362 * pt.c (instantiate_class_template): Use them.
2364 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
2366 * cp-tree.h (cplus_expand_constant): Declare.
2367 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
2368 converted from one pointer-to-object type to another.
2369 * expr.c (cplus_expand_constant): Don't make it static.
2370 * typeck.c (build_component_ref): Don't crash when presented with
2371 a component which is a TEMPLATE_DECL.
2372 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
2373 cast from a pointer-to-member constant to its own type does not
2374 result in a valid non-type template argument.
2376 1999-05-21 Mark Mitchell <mark@codesourcery.com>
2377 Nathan Sidwell <nathan@acm.org>
2379 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
2380 * cp-tree.h: Fix typo in documentation on pointers-to-members.
2381 (cp_build_qualified_type): Make it a macro.
2382 (cp_build_qualified_type_real): Declare.
2383 * decl.c (grokdeclarator): Remove misleading comment. Avoid
2384 problem with template parameters and restrict-qualification.
2385 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
2386 * hash.h: Regenerated.
2387 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
2389 (NORID): Remove definition.
2390 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
2391 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
2392 (fn_type_unification): Check that the function type resulting from
2393 the deduction is legal.
2394 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
2395 (unify): Use cp_build_qualified_type_real.
2396 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
2397 (cp_build_qualified_type): Rename to ...
2398 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
2399 and modify appropriately.
2401 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
2402 reveal optimization opportunities.
2404 * pt.c (tsubst): Don't issue error messages when we're not
2405 complaining, even if we see a qualified function type.
2406 (check_cv_quals_for_unify): Don't allow a qualified function
2409 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2411 * class.c (instantiate_type): Downgrade errors for object-dependent
2412 memfn refs to pedwarn.
2414 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2416 * decl.c (grokdeclarator): Don't treat [] as indicating a
2417 zero-sized array in a typedef.
2419 * call.c (build_object_call): Don't look at DECL_NAME for a type.
2420 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
2421 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
2423 * pt.c (for_each_template_parm): Rework to match documentation.
2424 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
2426 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
2428 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
2430 * class.c (finish_base_struct): Allow non-COM bases for COM classes
2431 except at the leftmost position.
2432 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
2433 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
2434 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
2436 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
2437 (build_cplus_new): Make sure that what we return is of the right type.
2439 1999-05-20 Mark Mitchell <mark@codesourcery.com>
2441 * cp-tree.h (make_ptrmem_cst): New function.
2442 * expr.c (cplus_expand_constant): Split out from ...
2443 (cplus_expand_expr): Here. Use cplus_expand_constant.
2444 (init_cplus_expand): Set lang_expand_constant.
2445 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
2447 * tree.c (make_ptrmem_cst): Define.
2448 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
2449 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
2451 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2453 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
2455 * decl2.c (start_static_storage_duration_function): Fix comment.
2456 (finish_file): Create static storage duration functions lazily.
2458 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2460 Implement anonymous structs.
2461 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
2462 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
2463 * class.c (finish_struct_1): Remove redundant check for anon struct.
2464 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
2465 (check_tag_decl): Check for anonymous struct here.
2466 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
2467 * init.c (sort_member_init, emit_base_init): Handle getting fields
2468 as well as names in current_member_init_list.
2469 (perform_member_init): Handle getting an anon aggr.
2470 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
2471 (do_build_copy_constructor): Likewise.
2473 1999-05-19 Mark Mitchell <mark@codesourcery.com>
2475 * tree.c (cp_build_qualified_type): Don't allow qualified function
2478 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
2480 * gxxint.texi: Fix typo.
2482 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
2484 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
2485 * class.c (finish_struct_1): Use CLASS_TYPE_P.
2486 * ptree.c (print_lang_type): Likewise.
2487 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
2489 * typeck2.c (digest_init): Likewise.
2491 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
2493 * call.c (joust): Compare the types of the conv ops, not the
2494 target types of the conversions.
2496 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
2498 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
2501 1999-05-17 Mark Mitchell <mark@codesourcery.com>
2503 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
2504 * decl.c (grokfndecl): Don't allow inline declarations of friend
2505 template specializations, or friend template specializations with
2507 * pt.c (tsubst): Handle substitution into array types that does
2508 not yield a fixed upper bound, even when not processing a
2510 (tsubst_copy): Deal with the fact that the second operand to a
2511 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
2512 * search.c (marked_pushdecls_p): Don't descend into
2513 TEMPLATE_TYPE_PARMs and the like.
2514 (unmarked_pushdecls_p): Likewise.
2516 * call.c (build_over_call): Don't throw away
2517 initializations/copies of empty classes; use MODIFY_EXPR and
2518 INIT_EXPR as for non-empty classes.
2519 * class.c (finish_struct_1): Put the padding byte for an empty
2520 class on the TYPE_NONCOPIED_PARTS list for the class.
2522 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2524 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
2525 indicate a reference to a field that is a qualified name.
2527 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
2529 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
2530 ASM_OUTPUT_CONSTRUCTOR.
2532 * friend.c (do_friend): Add attrlist arg. Remove support for
2533 getting a non-decl as 'decl'.
2534 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
2536 (grokdeclarator): Adjust.
2537 * cp-tree.h: Adjust.
2539 1999-05-16 Mark Mitchell <mark@codesourcery.com>
2541 * cp-tree.h (permanent_p): New function.
2542 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
2543 possibly complex tree node.
2544 * tree.c (mapcar): Adjust comments, and follow coding standards in
2546 (permanent_p): New function.
2548 1999-05-13 Per Bothner <bothner@cygnus.com>
2550 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
2551 primitive Java types, if we actually see `extern "Java"'.
2553 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
2555 * lang-specs.h: Pass -$ to the preprocessor.
2557 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
2559 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
2560 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
2561 (resolve_offset_ref): Don't handle a raw baselink.
2562 * cvt.c (build_expr_type_conversion): Likewise.
2563 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
2564 convert_for_initialization): Likewise.
2565 * class.c (instantiate_type): Handle seeing a baselink under an
2567 * error.c (dump_expr): Likewise.
2568 * pt.c (for_each_template_parm): Likewise.
2569 (resolve_overloaded_unification): Likewise.
2570 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
2571 * typeck.c (expr_sizeof): Also complain about other permutations
2572 of overloaded functions.
2574 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
2576 * init.c (resolve_offset_ref): Don't return a raw method.
2578 * typeck.c (decay_conversion): Don't handle a raw method.
2579 Resolve all OFFSET_REFs.
2580 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
2581 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
2582 same_type_p for pmf bits. Don't use build_binary_op to compare
2583 raw pointers to methods.
2584 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
2585 to decide when to call resolve_offset_ref.
2586 (build_c_cast, convert_for_initialization): Likewise.
2587 * cvt.c (build_expr_type_conversion): Likewise.
2589 1999-05-06 Nathan Sidwell <nathan@acm.org>
2591 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
2593 1999-05-05 Mark Mitchell <mark@codesourcery.com>
2595 * decl2.c (start_objects): Don't let static constructors and
2596 destructors get inlined.
2598 * parse.y (nested_name_specifier): Make sure ordinary types are
2599 complete, just like template types.
2600 * parse.c: Regenerated.
2602 * pt.c (check_explicit_specialization): Improve error messages.
2604 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
2606 * typeck.c (string_conv_p): Use same_type_p to check whether we
2607 try to convert between char and wchar_t.
2609 1999-05-03 Mark Mitchell <mark@codesourcery.com>
2611 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
2612 lookup to error_mark_node here.
2613 (lookup_member): Revise documentation. Add comments. Don't set
2614 the TREE_TYPE to error_mark_node here, and don't build up an extra
2615 TREE_LIST for ambiguous lookups.
2616 (setup_class_bindings): Adjust accordingly.
2617 (push_class_decls): Revise out-of-date comments.
2619 * typeck.c (build_const_cast): Tighten checks for legality.
2621 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2623 * init.c (build_member_call): Lookup names coming from
2624 namespace-scoped LOOKUP_EXPR.
2626 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
2628 * gxxint.texi: Add documentation for 'I'.
2630 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
2632 * tinfo.cc (operator==): Qualify type_info with std::.
2634 1999-05-02 Mark Mitchell <mark@codesourcery.com>
2636 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
2637 (DECL_COMDAT): Remove definition.
2639 1999-05-01 Mark Mitchell <mark@codesourcery.com>
2641 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
2644 1999-04-30 Mark Mitchell <mark@codesourcery.com>
2646 * class.c (build_vtable): Use build_lang_decl when building
2647 vtables, not just build_decl.
2648 (prepare_fresh_vtable): Likewise.
2649 * decl.c (wrapup_globals_for_namespace): Mark vtables as
2650 DECL_EXTERNAL when calling wrapup_global_declarations.
2651 * decl2.c (priority_info_s): Add initializations_p and
2652 destructions_p members.
2653 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
2654 when deciding what vtables to write out.
2655 (ssdf_decls): New variable.
2656 (ssdf_decls_used): Likewise.
2657 (start_static_storage_duration_function): Deal with being called
2658 multiple times. Avoid inlining this function.
2659 (generate_inits_for_priority): Deal with reuse of priority map.
2660 (get_priority_info): Clear initializations_p and destructions_p.
2661 (do_static_initialization): Tweak comment.
2662 (do_static_destruction): Likewise. Fix condition on sentries for
2664 (generate_ctor_or_dtor_function): Call all of the static storage
2666 (generate_ctor_or_dtor_function_for_priority): Check
2667 initializations_p and destructions_p to see what priorities need
2668 initialization functions.
2669 (finish_file): Rework to generate multiple static storage duration
2670 functions, rather than just one.
2672 * typeck.c (build_const_cast): Tweak last change to handle
2673 templates correctly.
2675 * typeck.c (build_const_cast): Disallow use of const_cast to
2676 anything but a pointer or reference type.
2678 1999-04-30 Nathan Sidwell <nathan@acm.org>
2680 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
2683 1999-04-29 Mark Mitchell <mark@codesourcery.com>
2685 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
2686 (finish_file): Indent comments properly.
2688 1999-04-29 Richard Henderson <rth@cygnus.com>
2690 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
2691 (do_static_destruction): Likewise.
2693 1999-04-29 Nathan Sidwell <nathan@acm.org>
2695 * cp-tree.h (TYPE_NOTHROW_P): New macro.
2696 * decl2.c (delete_sanity): Warn on deleting void *.
2697 * init.c (build_new_1): Use TYPE_NOTHROW_P.
2698 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
2699 throwing operator new.
2701 1999-04-28 Nathan Sidwell <nathan@acm.org>
2703 * cp-tree.h (build_component_addr): Remove prototype.
2704 * typeck.c (build_component_addr): Make static. Remove MSG
2706 (build_component_addr): Remove MSG parameter, clean up
2708 (build_x_function_call): Use cp_error.
2709 (build_unary_op): Adjust call of build_component_addr.
2711 1999-04-28 Mark Mitchell <mark@codesourcery.com>
2713 * pt.c (tsubst_friend_class): Check for NULL.
2715 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
2717 * search.c (binfo_for_vtable): Initialize bfvi.var.
2719 1999-04-27 Nathan Sidwell <nathan@acm.org>
2721 * rtti.c (build_x_typeid): Check rtti is enabled.
2723 1999-04-26 Mark Mitchell <mark@codesourcery.com>
2725 * search.c (is_subobject_of_p): Make sure we're looking at the
2728 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
2730 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
2732 1999-04-23 Mark Mitchell <mark@codesourcery.com>
2734 * decl2.c (finish_file): Tweak handling of extern inlines so that
2735 they are not unnecessarily put out.
2737 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
2738 such as base classes.
2740 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
2742 * tree.c (build_exception_variant): Fix typo: use the chain of U,
2743 not trying V, while cycling through U.
2745 1999-04-22 Mark Mitchell <mark@codesourcery.com>
2747 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
2748 preserves_first_arg. Enlarge dummy accordingly.
2749 (DECL_TINFO_FN_P): New macro.
2750 (SET_DECL_TINFO_FN_P): Likeiwse.
2751 (DECL_RETURNS_FIRST_ARG): Remove.
2752 (DECL_PRESERVES_THIS): Likewise.
2753 (DECL_INIT_PRIORITY): New macro.
2754 (finish_struct_1): Change prototype.
2755 (cat_namespace_levels): Remove prototype.
2756 (vtable_decl_p): New prototype.
2757 (vtype_decl_p): Likewise.
2758 (sigtable_decl_p): Likewise.
2759 (walk_globals_pred): New typedef.
2760 (walk_globals_fn): Likewise.
2761 (walk_globals): New prototype.
2762 (walk_namespaces_fn): New typedef.
2763 (walk_namespaces): New prototype.
2764 (wrapup_globals_for_namespace): Likewise.
2765 (walk_vtables): Remove prototype.
2766 (walk_sigtables): Likewise.
2767 (instantiate_pending_templates): New prototype.
2768 * class.c (finish_struct_1): Don't return a value.
2769 * decl.h (pending_statics): Remove declaration.
2770 * decl.c (walk_namespaces_r): New function.
2771 (walk_globals_r): Likewise.
2772 (vtable_decl_p): Likewise.
2773 (vtype_decl_p): Likewise.
2774 (sigtable_decl_p): Likewise.
2775 (walk_namespaces): Likewise.
2776 (walk_globals_data): New type.
2777 (walk_globals): New function.
2778 (wrapup_globals_for_namespace): Likewise.
2779 (expand_static_init): Remove assertion. Remove redundancy in
2780 conditional. Don't put static data members in static_aggregates
2782 (finish_function): Remove redundancy in conditional. Don't set
2783 DECL_RETURNS_FIRST_ARG.
2784 (cat_namespace_levels): Remove.
2785 * decl2.c: Include splay-tree.h and varray.h.
2786 (priority_info_s): New structure.
2787 (finish_vtable_vardecl): Change prototype. Adjust for new calling
2789 (prune_vtable_vardecl): Likewise.
2790 (finish_sigtable_vardecl): Likewise.
2791 (setup_initp): Remove.
2794 (start_static_storage_duration_function): New function.
2795 (generate_inits_for_priority): Likewise.
2796 (finish_static_storage_duration_function): Likewise.
2797 (get_priority_info): Likewise.
2798 (do_static_initialization): Likewise.
2799 (do_static_destruction): Likewise.
2800 (do_static_initialization_and_destruction): Likewise.
2801 (generate_ctor_or_dtor_function): Likewise.
2802 (generate_ctor_and_dtor_functions_for_priority): Likewise.
2803 (pending_statics): Make it a varray.
2804 (pending_statics_used): New variable.
2805 (saved_inlines): Make it a varray.
2806 (saved_inlines_used): New variable.
2807 (finish_static_data_member): Change method of updating
2809 (mark_inline_for_output): Remove #if 0'd code. Change method of
2810 updating saved_inlines.
2811 (walk_vtables): Remove.
2812 (walk_sigtables): Likewise.
2813 (import_export_decl): Use DECL_TINFO_FN_P.
2814 (pending_templates): Remove declaration.
2815 (maybe_templates): Likewise.
2816 (static_aggregates_initp): Likewise.
2817 (setup_initp): Likewise.
2818 (finish_objects): Simplify.
2819 (INITIALIZE_P_IDENTIFIER): New macro.
2820 (PRIORITY_IDENTIFIER): New macro.
2821 (SSDF_IDENTIFIER): New macro.
2822 (initialize_p_decl): New variable.
2823 (priority_decl): Likewise.
2824 (ssdf_decl): Likewise.
2825 (priority_info_map): Likewise.
2826 (finish_file): Recode output of static intializers and other
2827 file-scope finalization tasks.
2828 * error.c (OB_END_TEMPLATE_ID): New macro.
2829 (dump_type_real): Use it.
2830 (dump_decl): Likewise.
2831 (dump_function_name): Likewise.
2832 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
2834 (check_newline): Use walk_globals, not walk_vtables.
2835 * pt.c (pending_tempalte_expansions): Remove.
2836 (set_vardecl_interface_info): Likewise.
2837 (pending_templates): Make static.
2838 (maybe_templates): Likewise.
2839 (instantiate_class_template): Adjust call to finish_struct_1.
2840 (instantiate_pending_templates): New function.
2841 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
2842 * tree.c (static_aggregates_initp): Remove.
2843 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
2845 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
2847 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
2848 with the RTL code RETURN.
2849 * hash.h: Regenerated.
2850 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
2851 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
2852 * parse.c: Regenerated.
2853 * pt.c: Include varray.h. Include rtl.h since varray.h requires
2855 (inline_parm_levels): New variable.
2856 (inline_parm_levels_used): Likewise.
2857 (maybe_begin_member_template_processing): Update them.
2858 (maybe_end_member_template_processing): Use them, rather than
2859 guessing how many levels to pop.
2861 * decl.c (make_typename_type): Tighten error-checking.
2863 1999-04-20 Mark Mitchell <mark@codesourcery.com>
2865 * cp-tree.h (build_binary_op): Remove unneeded parameter.
2866 * class.c (build_vrable_entry_ref): Adjust call to
2868 * decl.c (expand_static_init): Likewise.
2869 (grokdeclarator): Likewise.
2870 (finish_function): Likewise.
2871 * decl2.c (delete_sanity): Likewise.
2872 (do_dtors): Likewise.
2873 (do_ctors): Likewise.
2874 * error.c (dump_type_suffix): Likewise.
2875 * expr.c (cplus_expand_expr): Likewise.
2876 * init.c (resolve_offset_ref): Likewise.
2877 (build_new): Likewise.
2878 (build_new_1): Likewise.
2879 (build_vec_delete_1): Likewise.
2880 (expand_vec_init_catch_clause): Likewise.
2881 (build_delete): Likewise.
2882 * pt.c (tsubst): Likewise.
2883 * rtti.c (synthesize_tinfo_fn): Likewise.
2884 * search.c (expand_upcast_fixups): Likewise.
2885 (expand_direct_vtbls_init): Likewise.
2886 * typeck.c (get_member_function_from_ptrfunc): Likewise.
2887 (build_binary_op_nodefault): Likewise.
2888 (point_int_sum): Likewise.
2889 (pointer_diff): Likewise.
2890 (build_unary_op): Likewise.
2891 (build_modify_expr): Likewise.
2892 (get_delta_difference): Likewise.
2893 (build_ptrmemfunc): Likewise.
2894 (expand_ptrmemfunc_cst): Likewise.
2896 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
2898 * decl.c (grokfndecl): Always call cplus_decl_attributes.
2899 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
2901 1999-04-19 Mark Mitchell <mark@codesourcery.com>
2903 * cp-tree.h (finish_static_data_member_decl): New function.
2904 * decl2.c (finish_static_data_member_decl): Split out from ...
2906 * pt.c (instantiate_class_template): Use it here instead of
2908 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
2909 finish_static_data_member_decl will do that. Explicit set
2910 DECL_EXTERNAL to match non-template processing.
2912 1999-04-18 Mark Mitchell <mark@codesourcery.com>
2914 * cp-tree.h (finish_class_definition): Add parameter.
2915 * parse.y (structsp): Use it. Don't call pop_scope here.
2916 * parse.c: Regenerated.
2917 * semantics.c (finish_class_definition): Pop it here.
2919 1999-04-17 Mark Mitchell <mark@codesourcery.com>
2921 * decl.c (xref_tag): Revise handling of nested template
2923 * pt.c (check_explicit_specialization): Tweak handling of friend
2924 templates in template classes.
2925 (tsubst_friend_class): Handle friend declarations for nested
2926 member template classes.
2928 1999-04-16 Mark Mitchell <mark@codesourcery.com>
2930 * class.c (finish_struct): Remove unused variable.
2931 (pushclass): Likewise.
2932 (invalidate_class_lookup_cache): Likewise.
2933 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
2934 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
2935 doesn't get obliterated.
2936 (make_typename_type): Handle template classes correctly.
2938 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
2939 (storetags): Declare.
2940 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
2941 (pushclass): Likewise. Use storetags to install tag declarations,
2943 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
2944 * decl.c (storetags): Make it global.
2945 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
2946 implicit typename declaration.
2947 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
2948 * method.c (hack_identifier): Likewise.
2949 * search.c (lookup_member): Likewise.
2951 * decl.c (warn_about_implicit_typename_lookup): New function.
2952 (lookup_name_real): Use it. Rework handling of implicit typename
2955 1999-04-15 Mark Mitchell <mark@codesourcery.com>
2957 * cp-tree.h (lookup_nested_field): Remove.
2958 * class.c (push_nested_class): Handle UNION_TYPEs.
2959 (pop_nested_class): Likewise.
2960 * decl.c (lookup_name_real): Don't call lookup_nested_field.
2961 (start_decl): Use push_nested_class, not just pushclass.
2962 (cp_finish_decl): Use pop_nested_class, not just popclass.
2963 * search.c (lookup_nested_field): Remove.
2965 * cp-tree.h (lang_type): Add documentation.
2966 * decl2.c (handle_class_head): Create template declarations here,
2968 * parse.y (class_head): Return whether or not we entered a new
2969 scope, as well as the type named.
2970 (named_class_head): Likewise.
2971 (named_complex_class_head_sans_basetype): Likewise.
2972 (structsp): Adjust accordingly. Pop scope when required.
2973 * parse.c: Regenerated.
2974 * pt.c (check_default_tmpl_args): Robustify.
2975 (redeclare_class_template): Likewise.
2976 (instantiate_class_template): An instantiation of an
2977 anonymous union is itself an anonymous union.
2978 * semantics.c (begin_class_definition): Don't create template
2981 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
2983 * parse.y (after_type_declarator_intern): New nonterminal.
2984 (after_type_declarator): Use it.
2985 (direct_after_type_declarator): Likewise. Move above
2986 nonnested_type to fix reduce/reduce conflict resolution.
2987 (declmods): Reducing from just 'attributes' has EMPTY precedence.
2988 * Makefile.in (CONFLICTS): Update.
2990 * decl.c (define_label): Downgrade error for jumping over a
2991 non-POD decl to pedwarn.
2993 1999-04-14 Mark Mitchell <mark@codesourcery.com>
2995 * cp-tree.h (popclass): Change declaration.
2996 (pop_nested_class): Likewise.
2997 (poplevel_class): Remove declaration.
2998 * call.c (convert_default_argument): Pass no arguments to
3000 * class.c (finish_struct_1): Likewise.
3001 (finish_struct): Likewise.
3002 (popclass): Remove argument. Simplify code accordingly.
3003 (pop_nested_class): Likewise.
3004 * decl.c (poplevel_class): Declare it here, and make it static.
3005 (poplevel): Handle class scopes.
3006 (poplevel_class): Don't take an rgument. Simplify.
3007 (pop_everything): Pass no arguments to pop_nested_class.
3008 (cp_finish_decl): Pass no arguments to popclass.
3009 (grokdeclarator): Pass no arguments to pop_nested_class.
3010 (finish_function): Likewise.
3011 * decl2.c (grokfield): Likewise.
3012 (pop_scope): Pass no arguments to popclass.
3013 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
3014 * pt.c (instantiate_class_template): Move call to pushclass, and
3015 document. Pass no arguments to popclass.
3016 (regenerate_decl_from_template): Likewise.
3018 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
3020 * typeck.c (build_unary_op): Handle taking the address of a unique
3021 bound non-static member function.
3023 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
3025 * lang-options.h (-Wdeprecated): New flag.
3026 * decl2.c (warn_deprecated): New flag.
3027 (lang_decode_option): Deprecated this-is-variable,
3028 external-templates, alt-external-templates.
3029 Support -Wdeprecated.
3030 * errfn.c (cp_deprecated): New function.
3032 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
3034 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
3035 of the decls themselves.
3037 * pt.c (tsubst_function_type): Copy attributes over.
3039 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
3041 * cp-tree.h: Add prototype.
3042 * decl.c (init_decl_processing): Set valid_lang_attribute.
3044 1999-04-13 Mark Mitchell <mark@codesourcery.com>
3046 * class.c (finish_struct_1): Look at the const-ness of the field's
3047 type, not the TREE_READONLY-ness of the declaration.
3048 * method.c (synthesize_method): Likewise.
3049 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
3050 creating new declarations.
3052 1999-04-13 Mike Stump <mrs@wrs.com>
3054 * decl2.c (import_export_decl): Because vtables always reference
3055 virtual functions, even if they are inlined, don't allow
3056 -fno-implement-inlines to not emit them, instead, emit them with
3058 * decl.c (start_function): Likewise.
3060 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
3062 * cp-tree.h (struct lang_type): Add com_interface.
3063 (CLASSTYPE_COM_INTERFACE): New macro.
3064 * class.c (set_rtti_entry): COM interface classes have no RTTI
3065 entries in their vtables; adjust.
3066 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
3067 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
3068 finish_struct_1): Likewise.
3069 * decl2.c (mark_vtable_entries): Likewise.
3070 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
3071 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
3072 expand_upcast_fixups): Likewise.
3073 * tree.c (debug_binfo): Likewise.
3075 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
3076 * typeck.c (comptypes): If we get it, ignore attributes.
3077 * class.c (instantiate_type): Use BASELINK_P. Change complain
3078 parameter to flags; 2 means ignore attributes.
3079 * call.c (build_op_delete_call): Pass it.
3081 * decl.c (xref_tag): Only complain once about using a typedef-name
3082 with 'struct'. Downgrade to pedwarn.
3084 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
3086 * parse.y (absdcl_intern): New nonterminal.
3087 (absdcl, direct_abstract_declarator): Use it.
3089 * pt.c (lookup_template_class): Look through implict typename.
3091 1999-04-11 Mark Mitchell <mark@codesourcery.com>
3093 * friend.c (add_friend): Deal gracefully with error_mark_node.
3094 * method.c (build_overload_value): Handle pointers-to-members as
3095 template parameters.
3097 * decl.c (push_binding): Fix typo in comment.
3099 1999-04-10 Mark Mitchell <mark@codesourcery.com>
3101 * error.c (dump_type_real): If a typename is a template-id, put
3102 out the template arguments.
3103 (dump_expr): Handle TEMPLATE_ID_EXPR.
3104 * pt.c (lookup_template_class): Now that full arguments are
3105 available everywhere, remove code that tried to guess them.
3107 1999-04-09 Mark Mitchell <mark@codesourcery.com>
3109 * decl.c (make_typename_type): Complain if we don't find a type
3110 when trying to make a typename type for a non-template type.
3112 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
3114 * decl.c (start_decl): Pass attributes to grokdeclarator.
3115 (grokdeclarator): Handle attributes on constructor-syntax
3118 1999-04-08 Mark Mitchell <mark@codesourcery.com>
3120 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
3123 * search.c (template_self_reference_p): Tweak.
3125 1999-04-07 Mark Mitchell <mark@codesourcery.com>
3127 * init.c (build_offset_ref): Don't build yet another weird data
3128 structure to describe overloaded functions.
3130 1999-04-06 Mark Mitchell <mark@codesourcery.com>
3132 * cp-tree.h (BASELINK_P): New macro.
3133 (SET_BASELINK_P): Likewise.
3134 * init.c (build_member_call): Remove needless assignment in if
3136 * search.c (lookup_field_r): Fix handling when we are looking
3137 specifically for a type; these are not hidden by functions and
3139 (lookup_member): Use SET_BASELINK_P.
3140 * tree.c (is_overloaded_fn): Use BASELINK_P.
3141 (really_overloaed_fn): Likewise.
3142 (get_first_fn): Likewise.
3144 1999-04-05 Mark Mitchell <mark@codesourcery.com>
3146 * decl.c (lookup_name_current_level): Tweak, and improve
3149 * class.c (maybe_fixup_vptrs): Remove declaration.
3150 (build_class_init_list): Likewise.
3151 * decl.c (pushdecl_class_level): Call check_template_shadow here
3153 (push_class_level_binding): ... not here.
3154 * search.c (dfs_push_type_decls): Only avoid
3155 template-self-reference TYPE_DECLs if they are from base classes.
3157 1999-04-04 Mark Mitchell <mark@codesourcery.com>
3159 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
3162 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
3164 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
3165 (finish_struct_1): Don't call build_class_init_list.
3167 1999-04-02 Mark Mitchell <mark@codesourcery.com>
3169 * tinfo.h (__class_type_info): Fix illegal declaration.
3171 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
3172 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
3173 (IDENTIFIER_CLASS_VALUE): Improve documentation.
3174 (is_properly_derived_from): Declare.
3175 (invalidate_class_lookup_cache): Likewise.
3176 (maybe_maybe_note_name_used_in_class): Likewise.
3177 (note_name_declared_in_class): Likewise.
3178 (push_using_decl): Remove duplicate declaration.
3179 (id_in_current_class): Remove declaration.
3180 (push_class_binding): Change prototype.
3181 (clear_identitifer_class_values): Declare.
3182 * call.c (is_properly_derived_from): Make it global.
3183 (build_new_function_call): Be careful about updating candidates.
3184 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
3185 asked to make illegal calls.
3186 * class.c: Include splay-tree.h.
3187 (class_stack_node): Add names_used slot.
3188 (check_member_decl_is_same_in_complete_scope): Remove.
3189 (add_method): Fix comment. Push the declaration into class
3191 (finish_struct_1): When popping the class, pop the bindings too.
3192 Remove check for data member/function member conflict.
3193 (finish_struct): Remove calls to
3194 check_member_decl_is_same_in_complete_scope. Change calls to
3196 (pushclass): Clear names_used in the class stack entry.
3197 Use invalidate_class_lookup_cache to remove cached entries, rather
3198 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
3199 before entering a new class. Remove dead code. Don't mess with
3200 current_function_decl when pushing declarations.
3201 (invalidate_class_lookup_cache): New function, split out from ...
3202 (popclass): Here. Clean up names_used on our way out.
3203 (instantiate_type): Adjust.
3204 (build_self_reference): Don't push the declaration here.
3205 (maybe_note_name_used_in_class): New function.
3206 (note_name_declared_in_class): Likewise.
3207 * decl.c (add_binding): Change prototype.
3208 (find_class_binding_level): New function.
3209 (innermost_nonclass_level): Likewise.
3210 (current_binding_level): Update documentation.
3211 (inner_binding_level): Remove. Replace with current_binding_level
3213 (push_binding_level): Remove special handling of
3214 class_binding_level.
3215 (pop_binding_level): Likewise. Use find_class_binding_level.
3216 (suspend_binding_level): Likewise.
3217 (global_bindings_p): Use innermost_nonclass_level.
3218 (toplevel_bindings_p): Likewise.
3219 (namespace_bindings_p): Likewise.
3220 (pseudo_global_level_p): Likewise.
3221 (push_binding): Clear INHERITED_VALUE_BINDING_P.
3222 (add_binding): Check for illegal multiple declarations. Return a
3223 value indicating whether or not the new binding was legal.
3224 (push_local_binding): Skip over class binding levels. Check
3225 return value from add_binding.
3226 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
3227 note_name_declared_in_class.
3228 (pushlevel_class): Remove "fake out the rest of the compiler"
3230 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
3231 (clear_identifier_class_values): New function.
3232 (pop_from_top_level): Use it.
3233 (pop_everything): Tweak.
3234 (maybe_process_template_type_declaration): Don't push the
3235 declaration for the template here.
3236 (pushtag): Don't push tag declarations into class scope here.
3237 (pushdecl): Apply DeMorgan's law for readability.
3238 (pushdecl_class_level): Remove special-case code for
3239 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
3240 (push_class_level_bindng): Deal with inherited bindings.
3241 (lookup_name_real): Remove special-case code for
3242 TYPE_BEING_DEFINED, and some implicit typename magic.
3243 (grokdeclarator): Handle COMPONENT_REF for a template function.
3244 (build_enumerator): Don't call pushdecl_class_level here.
3245 (id_in_current_class): Remove.
3246 * decl2.c (grokfield): Don't call pushdecl_class_level or
3247 check_template_shadow.
3248 * errfn.c (cp_file_of): Don't declare.
3249 (cp_line_of): Likewise.
3250 * error.c (dump_decl): Handle an OVERLOAD.
3251 (cp_file_of): Likewise.
3252 (cp_line_of): Likewise.
3253 * init.c (build_member_call): Handle a COMPONENT_REF.
3254 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
3255 pushdecl_class_level.
3256 * method.c (hack_identifier): Build COMPONENT_REFs for references
3257 to member templates as well as member functions. Remove dead
3259 * parse.y (left_curly): Remove.
3260 (nonnested_type): Call maybe_note_name_used_in_class, not
3261 pushdecl_class_level.
3262 * parse.c: Regenerated.
3263 (nested_name_specifier_1): Likewise.
3264 * pt.c (check_explicit_specialization): Adjust, for robustness.
3265 (check_template_shadow): Handle OVERLOADs.
3266 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
3267 TEMPLATE_DECL, if appropriate.
3268 * search.c (envelope_add_decl): Remove.
3269 (dfs_pushdecls): Likewise.
3270 (dfs_compress_decls): Likewise.
3271 (dfs_push_decls): New function.
3272 (dfs_push_type_decls): Likewise.
3273 (setup_class_bindings): Likewise.
3274 (template_self_reference_p): Likewise.
3275 (lookup_field_r): Use it.
3276 (looup_member): Remove old comment. Deal with ambiguity.
3277 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
3278 and remove envelope processing.
3279 * semantics.c (begin_class_definition): Let pushclass push
3280 declarations for base classes.
3281 (finish_member_declaration): Push declarations into class scope.
3282 * typeck.c (build_component_ref): Just put an OVERLOAD into the
3283 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
3284 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
3285 * Makefile.in (class.o): Depend on splay-tree.h.
3287 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
3289 * cvt.c (convert_pointer_to_real): Use same_type_p.
3290 * typeck.c (comp_target_types): Use same_type_p.
3292 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
3294 * semantics.c (begin_inline_definitions,
3295 finish_inline_definitions): Rename from finish_default_args and
3296 begin_inline_definitions, respectively, to something that isn't a
3298 * parse.y (structsp): Adjust.
3300 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
3301 (list_hash_lookup): Likewise.
3302 (hash_tree_chain): Adjust.
3303 * pt.c (tsubst): Adjust.
3304 (tsubst_arg_types): Use plain hash_tree_cons.
3305 * cp-tree.h (hash_tree_cons_simple): Lose.
3306 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
3308 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3310 * Makefile.in (hash.h): Generate using gperf language 'C', not
3311 'KR-C', so gperf uses the `const' keyword on strings.
3313 * gxx.gperf (resword): Const-ify a char*.
3315 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
3317 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
3318 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
3319 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
3320 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
3321 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
3322 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
3325 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
3327 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
3329 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
3331 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
3333 1999-03-27 Mark Mitchell <mark@codesourcery.com>
3335 * cp-tree.h (add_friend): Declare.
3336 (add_friends): Likewise.
3337 * friend.c (add_friend): Make it global. Don't add to
3338 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
3339 (add_friends): Make it global.
3340 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
3341 befriending class is a template.
3342 * parse.y (component_decl_1): Fix typo in comment.
3343 * parse.c: Regenerated.
3344 * pt.c (instantiate_class_template): Use add_friend and
3345 add_friends rather that duplicating some of their functionality
3348 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
3350 * call.c (build_field_call): Unify 'this' and non-'this' cases.
3352 * typeck.c (build_indirect_ref): Check for 'this' sooner.
3354 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3356 * call.c (op_error): Const-ify a char*.
3357 (add_candidate, source_type, add_warning): Add static prototype.
3358 (print_z_candidates): Const-ify a char*.
3360 * class.c (resolve_address_of_overloaded_function,
3361 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
3362 (get_vtable_name, finish_struct_1): Const-ify a char*.
3364 * cvt.c (convert_to_reference): Likewise.
3366 * decl.c (redeclaration_error_message, record_builtin_type,
3367 record_unknown_type, member_function_or_else, bad_specifiers):
3369 (find_binding, select_decl, unqualified_namespace_lookup,
3370 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
3371 Add static prototype.
3372 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
3373 implicitly_declare, record_builtin_java_type, define_function,
3374 grok_op_properties, tag_name): Const-ify a char*.
3376 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
3377 (define_function, finish_builtin_type): Const-ify a char*.
3378 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
3379 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
3380 (file_name_nondirectory): Const-ify a char*.
3381 (init_filename_times): Don't prototype.
3382 (compiler_error): Prototype.
3383 (yyerror, init_repo): Const-ify a char*.
3384 (build_srcloc): Don't prototype.
3385 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
3387 (warn_for_assignment): Don't prototype.
3388 (convert_for_initialization, readonly_error, check_for_new_type,
3389 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
3392 * decl2.c (acceptable_java_type, output_vtable_inherit,
3393 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
3394 merge_functions, decl_namespace, validate_nonmember_using_decl,
3395 do_nonmember_using_decl): Add static prototype.
3396 (lang_f_options): Const-ify a char*.
3397 (finish_builtin_type): Likewise.
3398 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
3401 * errfn.c: Include cp-tree.h.
3402 (cp_thing): Add static prototype.
3403 (compiler_error): Don't protoptype.
3404 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
3405 passing it to `cp_thing'.
3407 * error.c (interesting_scope_p): Add static prototype.
3409 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
3412 * init.c (compiler_error): Don't prototype.
3413 (member_init_ok_or_else): Const-ify a char*.
3414 (build_java_class_ref): Add static prototype.
3416 * lex.c (compiler_error): Don't prototype.
3417 (get_time_identifier, interface_strcmp, extend_token_buffer,
3418 handle_cp_pragma): Const-ify a char*.
3419 (is_global, init_filename_times): Add static prototype.
3420 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
3421 (compiler_error): Change from fixed args to variable args.
3422 (yyerror): Const-ify a char*.
3424 * parse.y (cond_stmt_keyword): Const-ify a char*.
3425 (parse_decl): Add static prototype.
3427 * pt.c (template_args_equal, print_template_context): Likewise.
3428 (print_candidates, check_default_tmpl_args): Const-ify a char*.
3429 (instantiate_class_template): Likewise.
3431 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
3433 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
3434 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
3436 * search.c (lookup_field_info, lookup_member): Likewise.
3437 (lookup_member): Cast the first argument of `bzero' to a PTR.
3439 * sig.c (compiler_error): Don't prototype.
3440 (build_signature_pointer_or_reference_nam): Const-ify a char*.
3441 (get_sigtable_name, build_member_function_pointer): Likewise.
3443 * tree.c (compiler_error): Don't prototype.
3444 (no_linkage_helper, build_srcloc): Add static prototype.
3445 (build_vbase_pointer_fields): Const-ify a char*.
3446 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
3448 * typeck.c (compiler_error): Don't prototype.
3449 (convert_for_assignment): Const-ify a char*.
3450 (comp_cv_target_types): Add static prototype.
3451 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
3452 build_component_addr, build_unary_op, convert_for_initialization):
3455 * typeck2.c (ack): Add static prototype and change from fixed args
3457 (readonly_error, check_for_new_type): Const-ify a char*.
3459 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
3460 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
3461 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
3462 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
3463 gen_assign, GNU_xref_member): Const-ify a char*.
3465 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
3467 * gxxint.texi: Remove old discussion on copying virtual bases.
3469 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
3471 * Make-lang.in: Remove all references to g++.o/g++.c.
3472 Link g++ from gcc.o.
3474 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3476 * decl2.c (comdat_linkage): Treat vtables like functions.
3478 1999-03-25 Mark Mitchell <mark@codesourcery.com>
3480 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
3482 1999-03-25 Nathan Sidwell <nathan@acm.org>
3484 * decl.c (init_decl_processing): Add `signed' type as a synonym
3487 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
3489 * typeck.c (common_type): Handle cv-qual unification for pointers
3492 * decl.c (unqualified_namespace_lookup): Return error_mark_node
3494 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
3495 * lex.c (do_identifier): If we got error_mark_node, call
3498 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
3500 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
3503 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
3505 * decl.c (lookup_name_real): Do nested field lookup regardless of
3508 1999-03-24 Mark Mitchell <mark@codesourcery.com>
3510 * cp-tree.h (lang_type): Remove has_assignment and
3511 has_real_assignment. Add befriending_classes.
3512 (TYPE_HAS_ASSIGNMENT): Remove.
3513 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
3514 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
3515 (lang_decl): Document.
3516 (DECL_BEFRIENDING_CLASSES): New macro.
3517 (FRIEND_NAME): Move declaration to more obvious location.
3518 (FRIEND_DECLS): Likewise.
3519 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
3520 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
3521 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
3522 (grok_op_properties): Likewise.
3523 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
3524 (add_friend): Likewise. Don't do weird things with assignment
3525 operators. Update DECL_BEFRIENDING_CLASSES.
3526 (add_friends): Don't do weird things with assignment operators.
3527 (make_friend_class): Likewise. Update
3528 CLASSTYPE_BEFRIENDING_CLASSES.
3529 * pt.c (instantiate_class_template): Don't set
3530 TYPE_HAS_ASSIGNMENT.
3531 (tsubst_copy): Substitute the TREE_TYPE for more unary
3533 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
3534 * search.c (protected_accessible_p): New function.
3535 (friend_accessible_p): Likewise.
3536 (accessible_p): Use them.
3538 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3540 * pt.c (convert_nontype_argument): Don't create things that aren't
3541 PTRMEM_CSTs when applying a qualification conversion to a
3544 1999-03-23 Mark Mitchell <mark@codesourcery.com>
3546 * Makefile.in (OBJS): Don't mention hash.o.
3547 (OBJDEPS): Likewise.
3549 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
3551 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
3552 * decl.c (expand_static_init): Make sure we don't add any after
3555 * decl.c (cp_finish_decl): Move intelligence about handling
3556 DECL_COMDAT for variables from here...
3557 * decl2.c (comdat_linkage): ...to here.
3558 (maybe_make_one_only): Tweak.
3559 (import_export_decl): Call comdat_linkage for variables, too.
3560 (finish_file): Handle template statics properly.
3562 1999-03-22 Mark Mitchell <mark@codesourcery.com>
3564 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
3565 Document internals of pointer-to-member-functions.
3566 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
3567 (PFN_FROM_PTRMEMFUNC): Likewise.
3568 (build_type_conversion): Remove unused parameter.
3569 (build_ptrmemfunc1): Declare.
3570 (expand_ptrmemfunc_cst): New function.
3571 (delta2_from_ptrmemfunc): Likewise.
3572 (pfn_from_ptrmemfunc): Likewise.
3573 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
3574 build_type_conversion. Use TYPE_PTRMEM_P for readability.
3575 (convert_to_reference): Remove unused parameter to
3576 build_type_conversion.
3577 (ocp_convert): Likewise.
3578 (build_user_type_conversion): Likewise.
3579 * error.c (dump_expr): Handle NULL pointer-to-member functions.
3580 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
3581 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
3582 open when handling pointer-to-member functions.
3583 * pt.c (convert_nontype_argument): Clean up error messages. Be
3584 more stringent with pointers-to-members.
3585 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
3586 (build_unary_op): Tidy ever-so-slightly.
3587 (build_conditional_expr): Remove extra parameter to
3588 build_type_conversion.
3589 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
3591 (expand_ptrmemfunc_cst): Define.
3592 (delta2_from_ptrmemfunc): Likewise.
3593 (pfn_from_ptrmemfunc): Likewise.
3595 1999-03-19 Mark Mitchell <mark@codesourcery.com>
3597 * init.c (build_member_call): Handle template-id expressions
3599 * typeck.c (build_x_function_call): Likewise.
3601 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
3603 * friend.c (make_friend_class): Avoid core dump when
3604 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
3606 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
3608 * decl.c (start_function): Suppress normal linkage heuristics
3609 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
3611 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
3613 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
3614 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
3616 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
3618 * parse.y (named_complex_class_head_sans_basetype):
3619 Do not push a scope for error_mark_node.
3620 (maybe_base_class_list): Likewise.
3622 * decl.c (start_decl): Check for error_mark_node as a type.
3623 Detected by g++.brendan/array-refs.C.
3624 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
3625 (maybe_build_cleanup_1): Likewise. Detected by
3626 g++.jason/incomplete1.C.
3628 * tree.c (build_dummy_object): Use void_zero_node instead of the
3630 (is_dummy_object): Check for such a node.
3631 Detected by g++.bob/inherit1.C
3633 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
3635 * method.c (old_backref_index): Split out...
3636 (flush_repeats): From here. Rename back from try_old_backref.
3637 (build_mangled_name): Put back some old-style repeat handling.
3639 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3641 * lex.c: Don't include setjmp.h.
3642 (parse_float): New static function.
3643 (pf_args): New struct.
3644 (real_yylex): Use them in call to `do_float_handler'.
3646 1999-03-15 Mark Mitchell <mark@markmitchell.com>
3648 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
3649 * tree.c (layout_basetypes): Not here.
3650 * search.c (dfs_search): Remove; no longer used.
3652 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3654 * decl2.c (validate_nonmember_using_decl): Issue sensible
3655 error-messages on bogus qualifiers.
3657 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
3659 * call.c (add_function_candidate): Fix uninitialized variable.
3661 * Makefile.in (search.o): Add dependency on varray.h.
3663 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
3665 * decl.c (duplicate_decls): Use same_type_p.
3666 * method.c (try_old_backref): Renamed from flush_repeats. Use
3667 same_type_p. Don't try to handle repeats. Return success.
3668 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
3669 calls from old-style code, too.
3670 (check_ktype): Use same_type_p.
3671 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
3672 (build_qualified_name): Simplify logic.
3673 (process_overload_item): Strip typedefs and quals at the top.
3674 (build_mangled_name_for_type_with_Gcode): Remove call to
3675 type_canonical_variant.
3676 (build_mangled_name): Likewise. Remove support for old-style
3677 repeats, which have been disabled since 2.7.2. Don't mess with
3679 (build_decl_overload_real): Don't mess with TREE_USED.
3681 1999-03-13 Nathan Sidwell <nathan@acm.org>
3683 * error.c (cp_printers): Add 'F' escape character.
3684 (dump_type_real): Remove TREE_LIST (fnargs) printing.
3685 Functionality moved to dump_parameters.
3686 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
3687 (dump_function_decl): Extend meaning of V parameter. Use
3688 dump_parameters and dump_exception_spec.
3689 (dump_parameters): New static function.
3690 (dump_exception_spec): New static function.
3691 (fndecl_as_string): Change argument semantics. Use
3692 dump_function_decl directly.
3694 * sig.c (build_signature_table_constructor): Use cp_error.
3696 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
3698 * semantics.c (finish_switch_cond): Handle error cases gracefully.
3699 Detected by g++.law/enum5.C.
3701 * typeck.c (build_modify_expr): Check for errors after resolving
3702 offsets. Detected by g++.brendan/static1.C.
3704 * decl.c (complete_array_type): Ignore initial_value if it is an
3705 error. Detected by g++.benjamin/17930.C.
3707 * typeck2.c (process_init_constructor): Return error if one argument
3708 is in error. Detected by g++.benjamin/13478.C.
3710 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
3712 * decl.c (select_decl): Allow class templates when we need types.
3713 * decl2.c (ambiguous_decl): Likewise.
3715 1999-03-12 Mark Mitchell <mark@markmitchell.com>
3717 * lex.c (do_identifier): Correct call to enforce_access.
3718 * search.c (accessible_p): Tweak comment.
3720 1999-03-10 Mark Mitchell <mark@markmitchell.com>
3722 * semantics.c (begin_class_definition): Call build_self_reference.
3723 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
3725 * search.c (assert_canonical_unmarked): Fix typo in prototype.
3727 * search.c (dfs_canonical_queue): New function.
3728 (dfs_assert_unmarked_p): Likewise.
3729 (assert_canonical_unmarked): Likewise.
3730 (access_in_type): Use it.
3731 (accessible_p): Likewise. Walk the whole tree when umarking.
3733 * sig.c (build_signature_table_constructor): Use accessible_p
3734 instead of compute_access.
3736 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3738 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
3740 1999-03-09 Mark Mitchell <mark@markmitchell.com>
3742 * cp-tree.h (flag_access_control): Declare.
3743 (TREE_VIA_PPUBLIC): Document.
3744 (DECL_NONSTATIC_MEMBER_P): New macro.
3745 (enforce_access): Return an indication of whether or not access
3747 (build_self_reference): Change prototype.
3748 (compute_access): Replace with ...
3749 (accessible_p): New function.
3750 (dfs_walk): Change prototype.
3751 (dfs_unmark): Likewise.
3752 (markedp): Likewise.
3753 * call.c (enforce_access): Use accessible_p.
3754 * class.c (build_self_reference): Insert the declaration into the
3755 list of members for this type, and make it public.
3756 * decl.c (xref_basetypes): Avoid ill-timed recursion.
3757 * init.c (build_offset_ref): Use lookup_member, not three separate
3758 name-lookups. Call enforce_access rather than checking for
3759 illegal accesses here.
3760 (resolve_offset_ref): Likewise.
3761 * lex.c (do_identifier): Likewise.
3762 * method.c (hack_identifier): Likewise.
3763 * parse.y (self_reference): Remove.
3764 (opt_component_decl_list): Don't use it.
3765 * parse.c: Regenerated.
3766 * pt.c (print_candidates): Generalize to handle lists of
3767 overloaded functions.
3768 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
3770 (get_template_base): Use new calling convention for dfs_walk.
3771 * search.c: Include varray.h. Add prototypes.
3772 (dfs_walk): Accept a data pointer to pass to the work functions.
3773 All callers changed. All work functions changed.
3774 (breadth_first_search): Rename to bfs_walk, and make consistent
3776 (dfs_walk_real): New function.
3777 (canonical_binfo): New function.
3778 (context_for_name_lookup): Likewise.
3779 (shared_marked_p): Likewise.
3780 (shared_unmarked_p): Likewise.
3781 (lokup_field_queue_p): Likewise.
3782 (lookup_field_r): Generalize to handle both functions and fields.
3783 (lookup_field): Just call lookup_member.
3784 (lookup_fnfields): Likewise.
3785 (lookup_member): Move body of lookup_field here and generalize.
3786 (dfs_accessible_queue_p): Likewise.
3787 (dfs_accessible_p): Likewise.
3788 (dfs_access_in_type): Likewise.
3789 (access_in_type): Likewise.
3790 (compute_access): Remove, and replace with ...
3791 (accessible_p): New function.
3792 (vbase_types): Remove.
3793 (vbase_decl_ptr_intermediate): Likewise.
3794 (vbase_decl_ptr): Likewise.
3795 (vbase_init_result): Likewise.
3796 (closed_envelopes): Likewise.
3797 (bvtable): Likewise.
3799 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
3801 * call.c (add_function_candidate): Check for proper number of args
3802 before checking the validity of those args.
3804 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
3806 * cp-tree.h (struct lang_type): Add anon_union field.
3807 (ANON_UNION_TYPE_P): Use it instead of examining type.
3808 (SET_ANON_UNION_TYPE_P): New macro.
3809 * decl.c (check_tag_decl): Use it.
3811 * search.c (compute_access): Handle non-type contexts earlier, and
3814 * tree.c (build_exception_variant): Use copy_to_permanent.
3816 * decl2.c (setup_initp): Give statics with no priority the default
3818 (do_dtors, do_ctors, finish_file): Remove special handling of
3819 non-prioritized statics.
3821 1999-03-05 Mark Mitchell <mark@markmitchell.com>
3823 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
3824 * decl.c (make_typename_type): Don't issue an error if an
3825 immediate lookup fails; it migt be resolved later.
3826 * friend.c (is_friend): Add comment.
3827 * search.c (breadth_first_search): Add POSTFN and DATA
3828 parameters. Tidy. All callers changed.
3829 (lookup_field_queue_p): New function.
3830 (lookup_field_r): Likewise.
3831 (lookup_field_post): Likewise.
3832 (lookup_field): Use them, via breadth_first_search, instead of
3834 (compute_access): Robustify.
3835 (lookup_fnfield_info): New structure.
3837 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
3839 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
3841 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
3843 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
3846 * decl2.c (import_export_class): Also return if
3847 CLASSTYPE_INTERFACE_ONLY is set.
3849 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
3851 * decl.c (push_overloaded_decl): Only overwrite the old binding if
3853 * decl2.c (do_local_using_decl): Fix loop termination.
3855 1999-03-02 Mark Mitchell <mark@markmitchell.com>
3857 * cp-tree.h (determine_specialization): Don't declare.
3858 * pt.c (determine_specialization): Make it static. Eliminate
3859 complain parameter. Note that decl is always non-NULL now, and
3860 simplify accordingly.
3862 * decl.c (maybe_push_to_top_level): Always call
3863 push_cp_function_context.
3864 (pop_from_top_level): Always call pop_cp_function_context.
3866 1999-02-26 Nathan Sidwell <nathan@acm.org>
3868 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
3870 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
3871 * init.c (build_new_1): Extra arg to complete_type_or_else.
3872 (build_delete): Likewise.
3873 * typeck.c (require_complete_type): Likewise.
3874 (pointer_int_sum): Likewise.
3875 (pointer_diff): Likewise.
3876 (build_component_ref): Likewise.
3878 * typeck2.c (incomplete_type_error): Always use cp_error.
3879 Show declaration of undefined type, if appropriate.
3880 Deal with UNKNOWN_TYPE nodes.
3882 * typeck.c (require_complete_type): Use TYPE_SIZE as
3883 size_zero_node to mean incomplete type.
3884 (require_complete_type_in_void): New function.
3885 (build_compound_expr): Call complete_type_in_void for LHS.
3886 (build_c_cast): Call complete_type_in_void for void cast.
3887 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
3888 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
3889 require_complete_type_in_void. Call it.
3890 * cp-tree.h (require_complete_type_in_void): Prototype new function.
3892 * typeck.c (convert_arguments): Use alternative format for
3893 function decls. Don't require_complete_type here. Simplify
3894 diagnostic printing.
3895 (convert_for_initialization): Don't require_complete_type on RHS yet.
3896 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
3898 * call.c (build_over_call): Cope with qualified void return type.
3899 * semantics.c (finish_call_expr): Likewise.
3900 * typeck.c (build_function_call_real): Likewise.
3901 (c_expand_return): Likewise.
3902 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
3904 * call.c (print_z_candidates): Use alternate print format, to be
3905 consistent with (pt.c) print_candidates.
3906 * method.c (hack_identifier): List candidate members.
3907 * search.c (lookup_field): Build ambiguous list, and show it, if
3910 1999-02-26 Mark Mitchell <mark@markmitchell.com>
3912 * typeck.c (decay_conversion): Don't confuse constant array
3913 variables with their initializers.
3915 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
3917 * pt.c (regenerate_decl_from_template): Tweak for clarity.
3918 (instantiate_decl): Mark a decl instantiated before regenerating
3919 it to avoid recursion.
3920 * tree.c (mapcar): Don't call decl_constant_value unless we know
3921 something is TREE_READONLY_DECL_P.
3923 * class.c (check_for_override): Don't stop checking when we find
3924 the first overridden function. Delete #if 0'd code.
3925 * search.c (get_matching_virtual): Likewise.
3927 1999-02-25 Richard Henderson <rth@cygnus.com>
3929 * lang-specs.h: Define __FAST_MATH__ when appropriate.
3931 1999-02-24 Mike Stump <mrs@wrs.com>
3933 * typeck.c (convert_for_assignment): Allow boolean integral constant
3934 expressions to convert to null pointer.
3936 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
3938 * decl.c (lookup_namespace_name): Resolve namespace aliases.
3940 * class.c (push_nested_class): Allow namespaces.
3942 * decl2.c (set_decl_namespace): Add friendp parameter.
3943 * decl.c (grokfndecl): Pass it.
3944 (grokvardecl): Likewise.
3945 * cp-tree.h: Change declaration.
3947 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
3949 * pt.c (tsubst): Allow an array of explicit size zero.
3951 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
3953 * errfn.c: Change varargs code to look like toplev.c.
3955 * method.c (process_modifiers): Don't prepend 'U' for char or
3958 1999-02-20 Craig Burley <craig@jcb-sc.com>
3960 * Make-lang.in (cplib2.ready): Don't consider updating
3961 cplib2 stuff if the current directory isn't writable, as
3962 it won't work (such as during a `make install').
3964 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
3966 * decl2.c (start_objects): Make file scope constructors and
3967 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
3968 ASM_OUTPUT_DESTRUCTOR are defined.
3970 1999-02-19 Mark Mitchell <mark@markmitchell.com>
3972 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
3973 (fn_type_unification): Adjust prototype.
3974 (lookup_fnfields_1): Declare.
3975 * call.c (add_template_candidate_real): Adjust call to
3976 fn_type_unification.
3977 * class.c (add_method): Don't allow duplicate declarations of
3978 constructors or destructors.
3979 (resolve_address_of_overloaded_function): Remove unused variable.
3980 Adjust call to fn_type_unification.
3981 * decl.c (grokfndecl): Be more robust in the face of illegal
3983 * decl2.c (check_classfn): Remove hokey handling of member
3985 * pt.c (determine_specialization): Improve comments. Adjust to
3986 handle template argument deduction as per the standard.
3987 (check_explicit_specialization): Fix comment spacing. Handle
3988 type-conversion operators correctly. Improve error-recovery.
3989 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
3990 (get_bindings_real): Simplify handling of static members.
3991 * search.c (lookup_fnfields_1): Make it have external linkage.
3992 * typeck.c (compparms): Fix comment.
3993 (build_unary_op): Don't try to figure out which template
3994 specialization is being referred to when when the address-of
3995 operator is used with a template function.
3997 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3999 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
4000 keyword to match an analogous change at the top level.
4002 * tree.c (lvalue_or_else): Likewise.
4004 1999-02-17 Mark Mitchell <mark@markmitchell.com>
4006 * decl.c (xref_basetypes): Comment.
4007 * pt.c (instantiate_class_template): Use xref_basetypes.
4009 1999-02-16 Mark Mitchell <mark@markmitchell.com>
4011 * cp-tree.h (tsubst): Change prototype.
4012 (tsubst_expr): Likewise.
4013 (tsubst_copy): Likewise.
4014 (type_unification): Remove prototype.
4015 * call.c (convert_default_arg): Adjust call to tsubst_expr.
4016 * class.c (resolve_address_of_overloaded_function): Just use
4017 fn_type_unification.
4018 * decl.c (grokdeclarator): Adjust call to tsubst.
4019 * method.c (build_template_parm_names): Likewise.
4020 * pt.c (GTB_VIA_VIRTUAL): New macro.
4021 (GTB_IGNORE_TYPE): Likewise.
4022 (resolve_overloaded_unification): Add `complain' parameter.
4023 (try_one_overload): Likewise.
4024 (tsubst_template_arg_vector): Likewise.
4025 (tsubst_template_parms): Likewise.
4026 (tsubst_aggr_type): Likewise.
4027 (tsubst_arg_types): Likewise.
4028 (tsubst_call_declarator_parms): Likewise.
4029 (unify): Remove explicit_mask.
4030 (type_unification_real): Likewise.
4031 (get_template_base_recursive): Likewise.
4032 (coerce_template_template_parms): Provide prototype.
4033 (tsubst_function_type): Likewise.
4034 (try_class_unification): New function.
4035 All callers changed to use new complain parameter.
4036 (get_template_base): Use try_class_unification.
4037 (unify): Adjust handling of classes derived from template types.
4038 (fn_type_unification): Substitute explicit arguments before
4041 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4043 * decl.c (pushdecl): Remove dead code.
4045 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
4047 * decl2.c (finish_objects): Fix code I missed in previous change.
4049 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
4051 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
4052 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
4054 * pt.c (maybe_process_partial_specialization): Complain about
4055 'template <>' on non-specialization.
4057 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
4059 * decl.c (grokdeclarator): Catch wierd declarators.
4060 * decl2.c (finish_file): Don't abort because of namespace parsing
4062 (check_decl_namespace): Remove.
4064 1999-02-09 Mark Mitchell <mark@markmitchell.com>
4066 * cp-tree.h (get_template_base): Don't declare.
4067 (dfs_walk): Declare.
4068 (dfs_unmark): Likewise.
4069 (markedp): Likewise.
4070 * pt.c (unify): Remove duplicate declaration. Pass tparms and
4071 targs to get_template_base.
4072 (get_template_base_recursive): Move here from search.c. Check to
4073 see that the base found can be instantiated to form the desired
4075 (get_template_base): Likewise.
4076 (get_class_bindings): Simplify.
4077 * search.c (get_template_base_recursive): Move to pt.c.
4078 (get_template_base): Likewise.
4079 (markedp): Make it global.
4080 (dfs_walk): Likewise.
4081 (dfs_unmark): Likewise.
4083 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
4085 * pt.c (maybe_process_partial_specialization): Complain about
4086 specialization in wrong namespace.
4087 * tree.c (decl_namespace_context): New fn.
4089 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4091 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
4092 * pt.c (coerce_template_template_parms): Handle nested
4093 template template parameters.
4095 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
4097 * typeck2.c: Update email addresses.
4099 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4101 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
4104 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
4106 * lex.c (retrofit_lang_decl): Split out...
4107 (build_lang_decl): From here.
4108 * decl.c (pushdecl): Call it for functions generated by the middle
4109 end that don't have DECL_LANG_SPECIFIC.
4110 * cp-tree.h: Declare it.
4112 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
4113 (start_objects, finish_objects): Only use special
4114 init_priority code if the user specified a priority.
4115 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
4118 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
4120 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
4121 mkstemp.o. Get them from libiberty now.
4122 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
4124 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4126 * decl2.c (lang_decode_option): Use read_integral_parameter.
4128 1999-02-01 Mark Mitchell <mark@markmitchell.com>
4130 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
4131 before calling complete_type_or_else.
4133 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4135 * input.c (inline): Don't define, its handled by system.h.
4137 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
4139 * decl2.c: Don't define flag_no_ident here. Don't process
4141 * cp-tree.h: Don't declare flag_no_ident here.
4142 * lang-specs.h: Map -Qn to -fno-ident.
4144 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
4146 * cp-tree.h (struct tree_binding): Replace scope field with a union.
4147 (BINDING_SCOPE): Adjust.
4148 * decl.c (BINDING_LEVEL): Adjust.
4150 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
4152 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
4155 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
4158 * tree.c (equal_functions): Fix name in prototype.
4160 * decl.c (push_local_binding): Add FLAGS argument.
4161 (pushdecl, push_overloaded_decl): Pass it.
4162 * decl2.c (do_local_using_decl): Likewise.
4163 * cp-tree.h: Adjust prototype.
4164 * decl.c (poplevel): Fix logic.
4166 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
4167 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
4168 (cat_namespace_levels): Don't loop forever.
4170 1999-01-25 Richard Henderson <rth@cygnus.com>
4172 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
4174 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
4176 * class.c (resolve_address_of_overloaded_function): Mark the
4177 chosen function used.
4179 * call.c (build_call): Make sure that a function coming in has
4180 been marked used already.
4181 * decl.c (expand_static_init): Call mark_used instead of
4183 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
4184 alloc_eh_object, expand_throw): Likewise.
4185 * init.c (build_builtin_delete_call): Likewise.
4186 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
4187 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4188 expand_generic_desc): Likewise.
4190 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
4192 * tree.c (equal_functions): New function.
4193 (ovl_member): Call it.
4195 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4197 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
4199 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
4201 * decl.c (decls_match): Return 1 if old and new are identical.
4202 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
4204 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
4206 * decl.c (start_function): Make member functions one_only on windows.
4207 * decl2.c (import_export_decl): Likewise.
4209 * decl.c (grokdeclarator): Don't complain about implicit int in
4210 a system header. Change same-name field check to not complain in
4211 a system header instead of within extern "C".
4213 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4215 * cp-tree.h (PUSH_GLOBAL): New macro.
4216 (PUSH_LOCAL): Likewise.
4217 (PUSH_USING): Likewise.
4218 (namespace_bindings_p): Declare.
4219 (push_overloaded_decl): Likewise.
4220 * decl.c (push_overloaded_decl): Don't make it static. Check for
4221 illegal declarations after using declarations here.
4222 (namespace_bindings_p): Likewise.
4223 (duplicate_decls): Don't consider declarations from different
4224 namespaces to be the same.
4225 (pushdecl): Use symbolic PUSH_ constants in calls to
4226 push_overloaded_decl.
4227 (push_overloaded_decl_1): Likewise.
4228 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
4229 (do_nonmember_using_decl): Check for illegal using declarations
4230 after ordinary declarations here.
4231 (do_local_using_decl): Call pushdecl to insert declarations.
4233 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
4235 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
4237 1999-01-21 Mark Mitchell <mark@markmitchell.com>
4239 * tree.c (build_cplus_array_type_1): Don't call build_array_type
4240 for types involving template parameters.
4242 * cp-tree.h (PARM_DECL_EXPR): Delete.
4243 (convert_default_arg): Change prototype.
4244 (check_default_argument): Declare.
4245 (search_tree): Likewise.
4246 * call.c (convert_default_arg): Take the function to which the
4247 default argument belongs as a parameter, and do any necessary
4248 instantiation here, instead of ...
4249 (build_over_call): Here.
4250 * decl.c (local_variable_p): New function.
4251 (check_default_argument): Likewise, split out and tidied from ...
4253 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
4254 * pt.c (tsubst_call_declarator_parms): New function.
4255 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
4256 with CALL_EXPRs, rather than trying to be clever.
4257 (tsubst): Use tsubst_call_declarator_parms.
4258 * tree.c (search_tree): Don't make it static.
4259 * typeck.c (convert_arguments): Use new interface to
4260 convert_default_arg.
4262 1999-01-20 Mark Mitchell <mark@markmitchell.com>
4264 * error.c (dump_function_decl): Don't print the argument types for
4265 a function when the verbosity level is negative.
4267 * call.c (build_over_call): Check format attributes at call-time.
4269 * pt.c (tsubst_copy): Fix comment.
4270 (unify): Don't allow unification with variable-sized arrays.
4272 * semantics.c (finish_stmt_expr): When processing a template make
4273 the BIND_EXPR long-lived.
4275 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
4277 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
4278 (import_export_vtable): Not here.
4280 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4282 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
4283 non-static member function.
4285 1999-01-18 Nathan Sidwell <nathan@acm.org>
4287 * class.c (instantiate_type): Only diagnose illegal address of member
4288 function if complaining.
4290 * decl.c (lookup_name_real): Remove duplicate code.
4292 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
4294 * tree.c (copy_template_template_parm): Use permanent_obstack.
4296 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4298 * pt.c (unify): Remove restrictions on deduction of argument
4299 of template template parameters.
4301 1999-01-18 Nathan Sidwell <nathan@acm.org>
4303 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
4305 * class.c (resolve_address_of_overloaded_function): Show list of
4306 all candidates, when none of them match.
4308 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
4310 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
4311 definition of 'casting away const' in reinterpret_cast<>.
4313 1999-01-18 Graham <grahams@rcp.co.uk>
4315 * cvt.c: Add include for decl.h, remove extern for
4316 static_aggregates which is now provided by decl.h.
4318 * Makefile.in (cvt.o): Add dependency for decl.h and missing
4319 dependencies for convert.h and flags.h.
4321 1999-01-18 Nathan Sidwell <nathan@acm.org>
4323 * decl2.c (do_dtors): Set current location to that of the
4324 decl, for sensible diagnostics and debugging.
4325 (check_classfn): Issue `incomplete type' error, if
4326 class is not defined.
4328 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4330 * cp-tree.h: Add prototype for bound_pmf_p.
4332 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
4333 Manfred Hollstein <manfred@s-direktnet.de>
4335 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
4338 1999-01-16 Nathan Sidwell <nathan@acm.org>
4340 * cp-tree.h (struct lang_type): Added has_mutable flag.
4341 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
4342 (TYPE_HAS_MUTABLE_P): New macro to read it.
4343 (cp_has_mutable_p): Prototype for new function.
4344 * class.c (finish_struct_1): Set has_mutable from members.
4345 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
4346 it contains a mutable.
4347 * typeck.c (cp_has_mutable_p): New function.
4349 1999-01-15 Mark Mitchell <mark@markmitchell.com>
4351 * pt.c (process_template_parm): Ignore top-level qualifiers on
4352 non-type parameters.
4354 * decl.c (start_function): Use current_function_parms in the call
4355 to require_complete_type_for_parms, not the probably empty
4358 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
4360 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
4362 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
4363 that we don't suppress the other copies.
4364 * lex.c (handle_cp_pragma): Likewise.
4366 1999-01-13 Mark Mitchell <mark@markmitchell.com>
4368 * decl.c (grokdeclarator): Undo 1998-12-14 change.
4369 * tree.c (build_cplus_array_type_1): Likewise.
4370 * pt.c (instantiate_class_template): Remove misleading comment.
4371 (tsubst_aggr_type): Substitute if there are template parameters,
4372 regardless of whether or not they use template arguments.
4373 (unify): Likewise, but for unification.
4375 1999-01-12 Richard Henderson <rth@cygnus.com>
4377 * cp-tree.h (flag_permissive): Declare extern.
4379 1999-01-06 Mark Mitchell <mark@markmitchell.com>
4381 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
4383 (lang_type): Add is_partial_instantiation. Decrease width of
4385 (PARTIAL_INSTANTIATION_P): New macro.
4386 (OPERATOR_TYPENAME_P): Remove.
4387 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
4388 OPERATOR_TYPENAME_P.
4389 (grok_op_properties): Likewise.
4390 * friend.c (do_friend): Handle friends that are member functions
4392 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
4393 * pt.c (instantiate_class_template): Rework for clarity. Avoid
4394 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
4395 any more partial instantiation than is absolutely necessary for
4396 implicit typename. Set PARTIAL_INSTANTIATION_P.
4397 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
4398 * semantics.c (begin_class_definition): Handle partial
4399 specializations of a type that was previously partially
4402 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
4404 * g++spec.c (LIBSTDCXX): Provide default definition.
4405 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
4407 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4409 * Make-lang.in (g++.o): Depend on prefix.h.
4411 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
4413 * tree.c (bound_pmf_p): New fn.
4414 * typeck.c (build_c_cast): Use it.
4416 * decl.c (grok_op_properties): Use same_type_p.
4418 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4420 * Makefile.in (cvt.o): Depend on toplev.h.
4422 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
4424 * cvt.c: Include toplev.h.
4426 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
4429 * init.c (expand_vec_init): Initialize variable `itype'.
4431 * lex.c (yyerror): Cast the argument passed to a ctype function to
4434 * method.c (build_mangled_C9x_name): Wrap prototype and definition
4435 in "HOST_BITS_PER_WIDE_INT >= 64".
4437 * typeck.c (build_binary_op): Mark parameter `convert_p' with
4440 1998-12-22 Mark Mitchell <mark@markmitchell.com>
4442 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
4443 * tree.c (build_exception_variant): Don't crash on empty throw
4446 1998-12-18 DJ Delorie <dj@cygnus.com>
4448 * cvt.c (convert_to_reference): Check for both error_mark_node
4449 and NULL_NODE after call to convert_for_initialization.
4451 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
4453 * error.c (interesting_scope_p): New fn.
4454 (dump_simple_decl): Use it.
4455 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
4456 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
4458 1998-12-16 Mark Mitchell <mark@markmitchell.com>
4460 * class.c (resolve_address_of_overloaded_function): Do conversion
4461 to correct type here, rather than ...
4462 (instantiate_type): Here.
4464 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
4465 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
4466 (decl_template_parm_p): Remove.
4467 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
4469 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
4470 * pt.c (push_inline_template_parms_recursive): Set it.
4471 (decl_template_parm_p): Remove.
4472 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
4473 (process_template_parm): Set it.
4475 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
4477 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
4478 if configured with cpplib.
4480 1998-12-15 Mark Mitchell <mark@markmitchell.com>
4482 * decl.c (poplevel): Make sure ns_binding is initialized.
4484 * decl.c (finish_function): Undo inadvertent change in previous
4487 1998-12-14 Mark Mitchell <mark@markmitchell.com>
4489 * class.c (pushclass): Tweak handling of class-level bindings.
4490 (resolve_address_of_overloaded_function): Update pointer-to-member
4492 (instantiate_type): Likewise.
4493 * cvt.c (cp_convert_to_pointer): Likewise.
4494 * decl.c (pop_binding): Take the DECL to pop, not just the name.
4495 Deal with `struct stat' hack.
4496 (binding_level): Add to documentation.
4497 (push_binding): Clear BINDING_TYPE.
4498 (add_binding): New function.
4499 (push_local_binding): Use it.
4500 (push_class_binding): Likewise.
4501 (poplevel): Adjust calls to pop_binding.
4502 (poplevel_class): Likewise.
4503 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
4504 declarations to current binding level.
4505 (push_class_level_binding): Likewise.
4506 (push_overloaded_decl): Adjust handling of OVERLOADs in local
4508 (lookup_namespace_name): Don't crash when confronted with a
4510 (lookup_name_real): Do `struct stat' hack in local binding
4512 (build_ptrmemfunc_type): Adjust documentation.
4513 (grokdeclarator): Don't avoid building real array types when
4514 processing templates unless really necessary.
4515 (finish_method): Adjust calls to pop_binding.
4516 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
4517 not reparse_decl_as_expr.
4518 (build_expr_from_tree): Deal with a template-id as the function to
4519 call in a METHOD_CALL_EXPR.
4520 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
4521 (maybe_adjust_types_For_deduction): Don't do peculiar things with
4523 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
4524 pointer-to-member types where necessary.
4525 * tree.c (build_cplus_array_type_1): Don't avoid building real
4526 array types when processing templates unless really necessary.
4527 (build_exception_variant): Compare the exception lists correctly.
4529 1998-12-13 Mark Mitchell <mark@markmitchell.com>
4531 * cp-tree.def (CPLUS_BINDING): Update documentation.
4532 * cp-tree.h (LOCAL_BINDING_P): New macro.
4533 (lang_identifier): Rename local_value to bindings.
4534 (tree_binding): Make `scope' of type `void*', not `tree'.
4535 (BINDING_SCOPE): Update documentation.
4536 (IDENTIFIER_LOCAL_VALUE): Remove.
4537 (IDENTIFIER_CLASS_VALUE): Document.
4538 (IDENTIFIER_BINDING): New macro.
4539 (IDENTIFIER_VALUE): Likewise.
4540 (TIME_IDENTIFIER_TIME): Likewise.
4541 (TIME_IDENTIFIER_FILEINFO): Likewise.
4542 (IMPLICIT_TYPENAME_P): Likewise.
4543 (set_identifier_local_value): Remove.
4544 (push_local_binding): New function.
4545 (push_class_binding): Likewise.
4546 * class.c (pushclass): Update comments; use push_class_binding.
4547 * decl.c (set_identifier_local_value_with_scope): Remove.
4548 (set_identifier_local_value): Likewise.
4549 (push_binding): New function.
4550 (pop_binding): Likewise.
4551 (binding_level): Update documentation. Remove shadowed.
4552 (BINDING_LEVEL): New macro.
4553 (free_binding_nodes): New variable.
4554 (poplevel): Adjust for new name-lookup scheme. Don't mess up
4555 BLOCK_VARs when doing for-scope extension. Remove effectively
4557 (pushlevel_class): Tweak formatting.
4558 (poplevel_class): Adjust for new name-lookup scheme.
4559 (print_binding_level): Likewise.
4560 (store_bindings): Likewise.
4561 (pushdecl): Likewise.
4562 (pushdecl_class_level): Likewise.
4563 (push_class_level_binding): Likewise.
4564 (push_overloaded_decl): Update comments. Adjust for new
4566 (lookup_name_real): Likewise.
4567 (lookup_name_current_level): Likewise.
4568 (cp_finish_decl): Likewise.
4569 (require_complete_types_for_parms): Likewise. Remove misleading
4571 (grok_parms): Likewise. Don't call
4572 require_complete_types_for_parms here.
4573 (grok_ctor_properties): Don't treat templates as copy
4575 (grop_op_properties): Or as assignment operators.
4576 (start_function): Document. Adjust for new name-lookup scheme.
4577 (finish_function): Likewise.
4578 * decl2.c (do_local_using_decl): Use push_local_binding.
4579 * lex.c (begin_definition_of_inclass_inline): New function, split
4581 (do_pending_inlines): Here, and ...
4582 (process_next_inline): Here.
4583 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
4584 (init_filename_times): Likewise.
4585 (extract_interface_info): Likewise.
4586 (ste_typedecl_interface_info): Likewise.
4587 (check_newline): Likewise.
4588 (dump_time_statistics): Likewise.
4589 (handle_cp_pragma): Likewise.
4590 (do_identifier): Adjust for new name-lookup scheme.
4591 * parse.y (function_try_block): Return ctor_initializer_opt value.
4593 (fn.defpen): Pass appropriate values to start_function.
4594 (pending_inline): Use functor_try_block value, and pass
4595 appropriate values to finish_function.
4596 * pt.c (is_member_template): Update documentation; remove handling
4597 of FUNCTION_DECLs. As per name, this function should deal only in
4599 (decl_template_parm_p): Change name of olddecl parameter to decl.
4600 (check_template_shadow): Adjust for new name-lookup scheme.
4601 (lookup_template_class): Likewise.
4602 (tsubst_decl): Tweak so as not to confuse member templates with
4603 copy constructors and assignment operators.
4604 (unify): Handle UNION_TYPEs.
4605 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
4606 (lang_print_xnode): Adjust for new name-lookup scheme.
4607 * typeck.c (mark_addressable): Likewise.
4608 (c_expand_return): Likewise.
4610 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
4612 * decl.c (grokdeclarator): Allow field with same name as class
4615 * decl.c (lookup_name_real): Don't limit field lookup to types.
4616 * class.c (check_member_decl_is_same_in_complete_scope): No error
4617 if icv and x are the same.
4618 * lex.c (do_identifier): Tweak error message.
4620 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4622 * decl.c (start_enum): Use push_obstacks, not
4623 end_temporary_allocation.
4624 (finish_enum): Call pop_obstacks.
4626 1998-12-10 Mark Mitchell <mark@markmitchell.com>
4628 * class.c (instantiate_type): Return error_mark_node rather than
4631 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4633 * cp-tree.h (most_specialized_instantiation): New function.
4634 (print_candidates): Likewise.
4635 * class.c (validate_lhs): Remove.
4636 (resolve_address_of_overloaded_function): New function, split out
4637 and then substantially reworked, from ...
4638 (instantiate_type): Use it. Simplify.
4639 * cvt.c (convert_to_reference): Complain when caller has indicated
4640 that's the right thing to do. Don't crash if instantiate_type
4642 * pt.c: Substitute `parameters' for `paramters' throughout.
4643 (print_candidates): Don't make it static.
4644 (most_specialized_instantiation): Split out from ...
4645 (most_specialized): Here.
4647 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
4649 * lex.c (lang_init_options): Initialize cpplib.
4650 * decl2.c (parse_options,cpp_initialized): Removed.
4651 (lang_decode_option): Move initialization of cpplib to
4654 1998-12-09 Mark Mitchell <mark@markmitchell.com>
4656 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
4657 well as the TYPE_DECL, when a typedef name is assigned to a
4658 previously anonymous type.
4660 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
4662 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
4663 __cp_eh_info for getting the eh info pointer. Add table_index to
4665 (push_eh_cleanup): Don't increment 'handlers' data field.
4666 (process_start_catch_block): Don't set the 'caught' field.
4668 * cp/exception.cc (CP_EH_INFO): New macro for getting the
4669 exception info pointer within library routines.
4670 (__cp_eh_info): Use CP_EH_INFO.
4671 (__start_cp_handler): Get exception info pointer, set caught field,
4672 and increment the handlers field. Avoids this being done by handlers.
4673 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
4674 (uncaught_exception): Use CP_EH_INFO macro.
4676 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
4678 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
4680 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
4682 * lex.c (check_newline): Add support for \ as `natural'
4683 characters in file names in #line to be consistent with #include
4684 handling. We support escape processing in the # 1 "..." version of
4685 the command. See also support in cp/lex.c.
4687 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
4689 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
4692 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
4694 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
4696 * error.c (dump_simple_decl): Also print namespace context.
4697 (dump_function_decl): Likewise.
4699 * decl2.c (ambiguous_decl): Don't print old value if it's
4702 * decl.c (lookup_name_real): Fix handling of local types shadowed
4703 by a non-type decl. Remove obsolete code.
4704 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
4706 * lang-options.h: Add -fpermissive.
4707 * decl2.c: Likewise.
4708 * cp-tree.h: Add flag_permissive.
4709 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
4710 were specified, set flag_pedantic_errors.
4711 * call.c (build_over_call): Turn dropped qualifier messages
4713 * cvt.c (convert_to_reference): Likewise.
4714 * typeck.c (convert_for_assignment): Likewise.
4716 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
4718 * decl2.c (coerce_new_type): Use same_type_p.
4719 (coerce_delete_type): Likewise.
4721 * call.c (check_dtor_name): Return 1, not error_mark_node.
4723 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
4725 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
4726 if MULTIPLE_SYMBOL_SPACES.
4728 * pt.c (check_template_shadow): New fn.
4729 * decl2.c (grokfield): Use it.
4730 * decl.c (pushdecl): Likewise.
4731 (pushdecl_class_level): Likewise.
4732 (start_method): Likewise.
4733 (xref_tag): Don't try to use 't' if we're defining.
4735 * call.c (check_dtor_name): Just return an error_mark_node.
4736 * pt.c (lookup_template_class): Complain about using non-template here.
4737 * parse.y (apparent_template_type): Not here.
4739 * pt.c (check_explicit_specialization): Complain about specialization
4742 * lang-options.h: Add -f{no-,}implicit-inline-templates.
4744 * pt.c (convert_nontype_argument): Don't assume that any integer
4745 argument is intended to be a constant-expression.
4747 1998-12-03 Mark Mitchell <mark@markmitchell.com>
4749 * class.c (handle_using_decl): Fix comment. Don't lookup
4750 constructors in base classes.
4751 (validate_lhs): Fix typo in comment.
4752 * search.c (lookup_field_1): Don't return a USING_DECL.
4754 * cp-tree.h (DECL_ACCESS): Improve documentation.
4756 * decl.c (expand_static_init): Don't set the initialization-done
4757 flag until the initialization is done.
4759 1998-12-02 Mark Mitchell <mark@markmitchell.com>
4761 * decl2.c (validate_nonmember_using_decl): Complain about using
4762 declarations for class members.
4764 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
4766 * typeck2.c (process_init_constructor): Use same_type_p.
4768 * decl.c (check_tag_decl): Don't warn about null decl inside a
4771 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
4773 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
4774 (resolve_overloaded_unification): Strip baselinks.
4776 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4778 * g++spec.c: Don't prototype xmalloc.
4780 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
4782 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
4784 * decl.c (check_tag_decl): Do complain about null friend decl at
4787 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
4789 * lex.c (make_lang_type): Clear the whole struct lang_type, not
4790 only the first multiple of sizeof (int).
4792 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4794 * decl.c (start_decl): An explicit specialization of a static data
4795 member is only a definition if it has an initializer.
4797 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
4798 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
4800 * init.c (expand_default_init): Check for DIRECT_BIND instead of
4803 * call.c (build_over_call): Use build_decl.
4805 * except.c (expand_throw): Just use convert, not
4806 build_reinterpret_cast.
4808 * lex.c (handle_generic_pragma): Use token_buffer.
4810 * decl.c (check_tag_decl): Don't complain about null friend decl.
4812 1998-11-24 Dave Pitts <dpitts@cozx.com>
4814 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
4816 * lex.c (check_newline): Use ISALPHA.
4817 (readescape): Use ISGRAPH.
4818 (yyerror): Use ISGRAPH.
4820 1998-11-24 Nathan Sidwell <nathan@acm.org>
4822 * search.c (get_abstract_virtuals): Do not use initial
4823 CLASSTYPE_ABSTRACT_VIRTUALS.
4824 * typeck2.c (abstract_virtuals_error): Show location of abstract
4826 * call.c (build_new_method_call): Use
4827 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
4828 * class.c (finish_struct_bits): Don't bother working out whether
4829 get_abstract_virtuals will do anything, just do it.
4831 1998-11-24 Graham <grahams@rcp.co.uk>
4833 * typeck.c (build_component_ref): Remove unused statement.
4835 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
4837 * class.c (add_method): Catch invalid overloads.
4839 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
4840 * search.c (lookup_conversions): Handle getting real OVERLOADs.
4841 (add_conversions): Likewise. Revert last change.
4842 * call.c (add_conv_candidate): Pass totype to add_candidate instead
4843 of fn. Don't add a new candidate if the last one was for the same
4845 (print_z_candidates): Handle getting a type as a function.
4846 (joust): If we got two conversion candidates to the same type,
4848 (build_object_call): Lose 'templates'.
4849 (build_user_type_conversion_1): Handle getting real OVERLOADs.
4851 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4853 * typeck2.c (process_init_constructor): If there are elements
4854 that don't have initializers and they need to have constructors
4855 run, supply them with initializers.
4857 * class.c (finish_struct_1): A class with a 0-width bitfield is
4860 1998-11-23 Mark Mitchell <mark@markmitchell.com>
4862 * pt.c (instantiate_class_template): Don't try to figure out what
4863 specialization to use for a partial instantiation. Correct
4864 typos in a couple of comments. Avoid calling uses_template_parms
4867 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
4869 * method.c (process_overload_item): Add call to
4870 build_mangled_C9x_name for intTI_type_nodes.
4871 (build_mangled_C9x_name): Add prototype, define.
4872 * decl.c (init_decl_processing): Add names for
4875 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
4877 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
4879 * class.c (finish_struct_1): Set things up for 0-width bitfields
4880 like we do for others.
4882 * decl.c (check_tag_decl): New fn.
4883 (shadow_tag): Split out from here.
4884 * decl2.c (grok_x_components): Call it.
4886 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
4888 * decl.c: Lose warn_about_return_type.
4889 (grokdeclarator): Always complain about implicit int, except for
4892 * decl.c (tag_name): New fn.
4893 (xref_tag): Complain about using typedef-name after class-key.
4895 * init.c (expand_vec_init): Also keep going if from_array.
4897 * tree.c (is_overloaded_fn): Also handle the output of
4900 * decl.c (grokdeclarator): Use constructor_name when comparing
4901 field name against enclosing class.
4902 * class.c (finish_struct_anon): Likewise.
4904 1998-11-22 Mark Mitchell <mark@markmitchell.com>
4906 * decl.c (poplevel): Remove code to handle KEEP == 2.
4907 (finish_function): Don't confuse BLOCK-order when
4908 processing a destructor.
4910 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4912 * decl.c (require_complete_types_for_parms): Call layout_decl
4913 after we've completed the type.
4915 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
4917 * decl2.c (validate_nonmember_using_decl): Allow using templates
4918 from the global namespace.
4920 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
4922 Handle specifying template args to member function templates.
4923 * tree.c (build_overload): Always create an OVERLOAD for a template.
4924 * search.c (add_conversions): Handle finding an OVERLOAD.
4925 * decl2.c (check_classfn): Likewise.
4926 * lex.c (identifier_type): See through a baselink.
4927 * parse.y (do_id): Don't call do_identifier if we got a baselink.
4928 * class.c (instantiate_type, case TREE_LIST): Recurse.
4930 * decl.c (grokdeclarator): Allow a boolean constant for array
4931 bounds, odd as that sounds.
4933 * pt.c (unify): Be more strict about non-type parms, except for
4935 (UNIFY_ALLOW_INTEGER): New macro.
4937 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
4939 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
4941 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
4943 * semantics.c (begin_class_definition): Call
4944 maybe_process_partial_specialization before push_template_decl.
4945 Don't call push_template_decl for a specialization.
4946 * search.c (lookup_field): Do return a member template class.
4947 * decl2.c (handle_class_head): Handle member template classes.
4949 * decl.c (grokdeclarator): A parm type need not be complete.
4951 * pt.c (convert_nontype_argument): Fix thinko.
4953 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4955 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
4956 (global_delete_fndecl): New variable.
4957 * decl.c (global_delete_fndecl): Define it.
4958 (init_decl_processing): Set it.
4959 * init.c (build_builtin_delete_call): Use it.
4960 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
4963 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4965 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
4968 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
4969 * call.c (build_object_call): Also support references to functions.
4970 * typeck.c (convert_for_initialization): Don't decay a function
4971 if the target is a reference to function.
4973 * search.c (add_conversions): Get all the overloads from a class.
4975 * decl.c (grok_ctor_properties): Complain about any constructor
4976 that will take a single arg of the class type by value.
4978 * typeck2.c (build_functional_cast): Can't create objects of
4979 abstract classes this way.
4980 * cvt.c (ocp_convert): Likewise.
4982 * decl.c (grokfndecl): Member functions of local classes are not
4985 1998-11-18 Mark Mitchell <mark@markmitchell.com>
4987 * Make-lang.in (cc1plus): Add dependency on hash.o.
4989 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
4991 * search.c (get_abstract_virtuals): Complain about virtuals with
4993 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
4994 with no final overrider.
4995 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
4996 on virtuals with no final overrider.
4998 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
5000 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
5003 * friend.c (do_friend): Don't set_mangled_name_for_decl.
5005 * class.c (finish_struct_anon): Complain about non-fields.
5006 * decl2.c (build_anon_union_vars): Likewise.
5008 * decl.c (grokdeclarator): Normal data members can't have the same
5009 name as the class, either.
5010 * class.c (finish_struct_anon): Neither can members of an
5013 1998-11-17 Mark Mitchell <mark@markmitchell.com>
5015 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
5016 (TYPE_BINFO): Likewise.
5017 (IS_AGGR_TYPE): Tweak.
5018 (SET_IS_AGGR_TYPE): New macro.
5019 (CLASS_TYPE_P): Tweak.
5020 (lang_type): Group mark bitfields together. Remove linenum.
5021 (CLASSTYPE_SOURCE_LINE): Remove macro.
5022 (CLASSTYPE_MARKED_N): New macro.
5023 (SET_CLASSTYPE_MARKED_N): Likewise.
5024 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
5025 (CLASS_TYPE_MARKED_*): Use them.
5026 (SET_CLASSTYPE_MARKED_*): Likewise.
5027 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
5028 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5029 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
5030 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
5031 * class.c (class_cache_obstack): New variable.
5032 (class_cache_firstobj): Likewise.
5033 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
5034 (pushclass): Free the cache, when appropriate.
5036 (maybe_push_cache_obstack): Use class_cache_obstack.
5037 * decl.c (include hash.h).
5038 (typename_hash): New function.
5039 (typename_compare): Likewise.
5040 (build_typename_type): Check the hash table to avoid creating
5042 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
5043 (grokdeclarator): Use CLASS_TYPE_P.
5044 (xref_basetypes): Likewise.
5045 (start_function): Likewise. Don't put current_class_ref on the
5047 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
5049 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
5050 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
5051 fields for types other than class types. Do clear TYPE_ALIAS_SET
5052 for types other than class types, though.
5053 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
5054 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5055 * pt.c (process_template_parm): Don't set
5056 CLASSTYPE_GOT_SEMICOLON.
5057 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5058 Coerce arguments on the momentary obstack.
5059 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5060 (instantiate_class_template): Calculate template arguments on the
5061 momentary obstack. Tidy.
5062 (tsubst_template_arg_vector): Use make_temp_vec.
5063 (tsubst_aggr_type): Put template arguments on the momentary
5065 (tsubst_decl): Likewise.
5066 (tsubst): Copy the array bounds index to the permanent obstack
5067 before building index types. Use new macros.
5068 (unify): Use new macros.
5069 (do_type_instantiation): Likewise.
5070 * search.c (lookup_fnfields_1): Use new macros.
5071 (dfs_pushdecls): Build envelopes on the cache obstack.
5072 (dfs_compress_decls): Use new macros.
5073 (push_class_decls): Build on the cache obstack.
5074 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
5075 * sign.c (build_signature_pointer_or_reference_type): Use
5077 * tree.c (make_binfo): Check CLASS_TYPE_P.
5078 (copy_template_template_parm): Adjust.
5079 (make_temp_vec): Use push_expression_obstack.
5080 * typeck.c (complete_type): Use new macros.
5081 (comptypes): Likewise.
5083 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
5085 * pt.c (tsubst): Add diagnostics for invalid array, reference
5086 and pointer to member types.
5088 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5090 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
5092 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
5095 * parse.y (structsp): Fix cut-and-paste error.
5097 * init.c (build_new): Complain about non-integral size.
5099 * parse.y (unary_expr): Complain about defining types in sizeof.
5101 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
5103 * rtti.c (build_x_typeid): Complain about typeid without
5104 including <typeinfo>.
5105 (get_typeid): Likewise. Complain about typeid of incomplete type.
5106 (get_tinfo_fn_dynamic): Likewise.
5107 (get_typeid_1): Not static anymore.
5108 * except.c (build_eh_type_type): Use get_typeid_1.
5110 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
5111 ambiguous or private bases. Fix warning for reference cast.
5113 1998-11-16 Mark Mitchell <mark@markmitchell.com>
5115 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
5116 * decl.c (duplicate_decls): Remove special-case code to deal with
5117 template friends, and just do the obvious thing.
5118 * pt.c (register_specialization): Tweak for clarity, and also to
5119 clear DECL_INITIAL for an instantiation before it is merged with a
5121 (check_explicit_specialization): Fix indentation.
5122 (tsubst_friend_function): Handle both definitions in friend
5123 declaration and outside friend declarations.
5124 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
5125 (regenerate_decl_from_template): Tweak accordingly.
5126 (instantiate_decl): Likewise.
5128 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
5130 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
5131 member function reference to error.
5132 * cvt.c (ocp_convert): Complain about converting an overloaded
5135 * init.c (build_offset_ref): Just return a lone static member
5138 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
5141 * typeck.c (build_binary_op_nodefault): Improve error handling.
5143 * decl.c (grokfndecl): Complain about making 'main' a template.
5145 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
5147 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
5148 TYPE_DECL in a template.
5150 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
5152 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
5154 * decl.c (struct cp_function): Add named_label_uses.
5155 (push_cp_function_context): Save it.
5156 (pop_cp_function_context): Restore it.
5157 (define_label): Also complain about jumping into the scope of
5158 non-POD objects that don't have constructors.
5159 * tree.c (pod_type_p): New fn.
5161 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
5162 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
5163 (get_tinfo_fn): Not here.
5164 * repo.c (repo_get_id): Abort if we get called for an incomplete
5167 1998-11-13 Mark Mitchell <mark@markmitchell.com>
5169 * except.c (expand_throw): Make sure first argument to
5170 __cp_push_exception is of type `void*' to avoid spurious error
5173 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
5175 * pt.c (try_one_overload): Take orig_targs again. Only check for
5176 mismatches against them; we don't care what a previous call found.
5177 (resolve_overloaded_unification): Adjust.
5179 * search.c (lookup_field): Don't return anything for a non-type
5180 field from a dependent type.
5181 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
5182 in an array declarator.
5183 (start_decl): Push into the class before looking for the field.
5185 1998-11-08 Mark Mitchell <mark@markmitchell.com>
5187 * method.c (build_overload_value): Handle REFERENCE_TYPE.
5189 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
5191 * decl.c (grokdeclarator): Allow namespace-scoped members if they
5194 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
5196 * pt.c (tsubst_decl): Don't mess with the global value of an
5197 un-mangled DECL_ASSEMBLER_NAME.
5199 1998-11-03 Christopher Faylor <cgf@cygnus.com>
5201 * decl.c (init_decl_processing): Remove CYGWIN conditional
5202 since CYGWIN is now able to deal with trapping signals.
5204 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5206 * cp-tree.h: Don't include gansidecl.h.
5207 * exception.cc: Include gansidecl.h (since we don't include config.h)
5208 * g++spec.c: Don't include gansidecl.h.
5210 1998-11-06 Mark Mitchell <mark@markmitchell.com>
5212 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
5214 (DECL_DEFINED_IN_CLASS_P): New macro.
5215 (TEMPLATE_PARMS_FOR_INLINE): Document.
5216 (check_static_variable_definition): New function.
5217 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
5219 (check_static_variable_definition): Split out from ...
5220 (grokdeclarator): Here.
5221 * pt.c (check_default_tmpl_args): New function, split out from ...
5222 (push_template_decl_real): Here.
5223 (instantiate_template): Fix comment.
5225 1998-11-04 Mark Mitchell <mark@markmitchell.com>
5227 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
5228 (CP_TYPE_VOLATILE_P): Likewise.
5229 (CP_TYPE_RESTRICT_P): Likewise.
5231 1998-11-03 Mark Mitchell <mark@markmitchell.com>
5233 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
5235 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
5237 * class.c (instantiate_type): Be more helpful.
5239 * decl2.c (import_export_decl): Call import_export_class.
5241 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
5242 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
5243 * pt.c (tsubst_copy): Likewise.
5245 1998-11-02 Mark Mitchell <mark@markmitchell.com>
5247 * init.c (expand_vec_init): Fix off-by-one error.
5249 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
5251 * parse.y (apparent_template_type): New type.
5252 (named_complex_class_head_sans_basetype): Use it.
5253 * Makefile.in (CONFLICTS): One new conflict.
5254 * parse.c: Regenerated.
5256 1998-11-01 Mark Mitchell <mark@markmitchell.com>
5258 * cp-tree.h (COMPARE_STRICT): New macro.
5259 (COMPARE_BASE): Likewise.
5260 (COMPARE_RELAXED): Likewise.
5261 (COMPARE_REDECLARATION): Likewise.
5262 (same_type_p): Likewise.
5263 (same_or_base_type_p): Likewise.
5264 * call.c (standard_conversion): Use them, in place of comptypes
5265 with numeric arguments.
5266 (reference_binding): Likewise.
5267 (convert_like): Likewise.
5268 (build_over_call): Likewise.
5269 (is_subseq): Likewise.
5270 (is_properly_derived_from): Likewise.
5271 (compare_ics): Likewise.
5273 * class.c (delete_duplicate_fields_1): Likewise.
5274 (resolves_to_fixed_type_p): Likewise.
5275 (instantiate_type): Likewise. Remove #if 0'd code.
5276 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
5277 (pushdecl): Likewise.
5278 (lookup_name_real): Likewise.
5279 (grokdeclarator): Likewise. Check for illegal array declarations.
5280 (grokparms): Likewise.
5281 (grok_op_properties): Likewise.
5282 * decl2.c (check_classfn): Likewise.
5283 * friend.c (is_friend): Likewise.
5284 (make_friend_class): Likewise.
5285 * init.c (expand_aggr_init): Likewise.
5286 (expand_vec_init): Likewise.
5287 * pt.c (is_member_template_class): Remove declaration.
5288 (is_specialization_of): Use COMPARE_* and new macros.
5289 (comp_template_parms): Likewise.
5290 (convert_nontype_argument): Likewise.
5291 (coerce_template_template_parms): Likewise.
5292 (template_args_equal): Likewise.
5293 (lookup_template_class): Likewise.
5294 (type_unification_real): Likewise.
5296 (get_bindings_real): Likewise.
5297 * search.c (covariant_return_p): Likewise.
5298 (get_matching_virtual): Likewise.
5299 * sig.c (match_method_types): Likewise.
5300 * tree.c (vec_binfo_member): Likewise.
5301 (cp_tree_equal): Likewise.
5302 * typeck.c (common_type): Likewise.
5303 (comp_array_types): Likewise. Get issues involving unknown array
5305 (comptypes): Update comments. Use new flags.
5306 (comp_target_types): Use new macros.
5307 (compparms): Likewise.
5308 (comp_target_parms): Likewise.
5309 (string_conv_p): Likewise.
5310 (build_component_ref): Likewise.
5311 (build_indirect_ref): Likewise.
5312 (build_conditional_expr): Likewise.
5313 (build_static_cast): Likewise.
5314 (build_reinterpret_cast): Likewise.
5315 (build_const_cast): Likewise.
5316 (build_modify_expr): Likewise.
5317 (convert_for_assignment): Likewise.
5318 (comp_ptr_ttypes_real): Likewise.
5319 (ptr_reasonably_similar): Likewise.
5320 (comp_ptr_ttypes_const): Likewise.
5322 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
5324 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
5326 1998-10-30 Mark Mitchell <mark@markmitchell.com>
5328 * decl2.c (delete_sanity): Pass integer_zero_node, not
5329 integer_two_node, to build_vec_delete.
5330 * init.c (build_array_eh_cleanup): Remove.
5331 (expand_vec_init_try_block): New function.
5332 (expand_vec_init_catch_clause): Likewise.
5333 (build_vec_delete_1): Don't deal with case that auto_delete_vec
5334 might be integer_two_node anymore.
5335 (expand_vec_init): Rework for initialization-correctness and
5336 exception-correctness.
5337 * typeck2.c (process_init_constructor): Make mutual exclusivity
5338 of cases more obvious.
5340 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
5342 * decl.c (lookup_name_real): OK, only warn if not lexing.
5343 Simplify suggested fix.
5345 * cp-tree.h (IDENTIFIER_MARKED): New macro.
5346 * search.c (lookup_conversions): Use breadth_first_search.
5347 (add_conversions): Avoid adding two conversions to the same type.
5348 (breadth_first_search): Work with base binfos, rather
5349 than binfos and base indices.
5350 (get_virtual_destructor): Adjust.
5351 (tree_has_any_destructor_p): Adjust.
5352 (get_matching_virtual): Adjust.
5354 * pt.c (push_template_decl_real): Generalize check for incorrect
5355 number of template parms.
5356 (is_member_template_class): #if 0.
5358 1998-10-29 Richard Henderson <rth@cygnus.com>
5360 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
5363 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
5365 * lex.c: Call check_newline from lang_init always. After
5366 calling cpp_start_read, set yy_cur and yy_lim to read from the
5367 cpplib token buffer.
5369 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
5371 * class.c (instantiate_type): Don't consider templates for a normal
5374 * class.c (finish_struct_1): Don't complain about non-copy
5375 assignment ops in union members.
5377 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
5378 (prepare_fresh_vtable): Likewise.
5379 (finish_struct_1): Don't call import_export_class.
5380 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
5381 (finish_prevtable_vardecl): Lose.
5382 (finish_file): Don't call it.
5383 * pt.c (instantiate_class_template): Likewise.
5384 * cp-tree.h: Remove it.
5386 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
5387 * decl.c (finish_function): Not here.
5388 (start_function): Do set DECL_INITIAL.
5390 * pt.c (push_template_decl_real): Complain about default template
5391 args for enclosing classes.
5393 * call.c (add_function_candidate): Treat conversion functions
5394 as coming from the argument's class.
5395 * cp-tree.h (DECL_CONV_FN_P): New fn.
5396 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
5397 * class.c (add_method): Use DECL_CONV_FN_P.
5398 * decl2.c (check_classfn): Likewise.
5399 * error.c (dump_function_name): Likewise.
5400 (dump_function_decl): Likewise.
5401 * pt.c (fn_type_unification): Likewise.
5402 * search.c (add_conversions): Likewise.
5404 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5406 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
5407 * method.c (hack_identifier): Also check for using RESULT_DECL
5410 1998-10-27 Mark Mitchell <mark@markmitchell.com>
5412 * decl.c (grokdeclarator): Use type_quals, rather than constp,
5415 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
5417 * call.c (standard_conversion): instantiate_type here.
5418 (reference_binding): And here.
5419 (implicit_conversion): Not here.
5420 (build_op_delete_call): No need to cons up an OVERLOAD.
5421 * cvt.c (cp_convert_to_pointer): instantiate_type here.
5422 (convert_to_reference): And here.
5423 * decl.c (grok_reference_init): Not here.
5424 (grokparms): Or here.
5425 * typeck2.c (digest_init): Or here.
5426 * typeck.c (decay_conversion): Take the address of overloaded
5428 (require_instantiated_type): Lose.
5429 (convert_arguments): Don't handle unknown types here.
5430 (build_c_cast): Likewise.
5431 (build_binary_op): Gut.
5432 (build_conditional_expr): Don't require_instantiated_type.
5433 (build_modify_expr): Likewise.
5434 (build_static_cast): Don't instantiate_type.
5435 (build_reinterpret_cast): Likewise.
5436 (build_const_cast): Likewise.
5437 (convert_for_initialization): Likewise.
5438 (build_ptrmemfunc): Use type_unknown_p.
5439 (convert_for_assignment): Also do default_conversion on overloaded
5440 functions. Hand them off to ocp_convert.
5442 1998-10-26 Mark Mitchell <mark@markmitchell.com>
5444 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
5445 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
5447 * class.c (finish_struct_1): Use build_cplus_array_type to build
5449 * decl.c (init_decl_processing): Likewise.
5450 * except.c (expand_end_eh_spec): Likewise.
5451 * search.c (expand_upcast_fixups): Simplify very slightly.
5453 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5455 * decl.c (grokdeclarator): Complain about a variable using
5456 constructor syntax coming back null from start_decl.
5458 * friend.c (make_friend_class): Complain about trying to make
5459 a non-class type a friend.
5461 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
5462 (start_function): Not here.
5464 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
5466 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
5468 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5470 * typeck2.c (process_init_constructor): Only skip anonymous fields
5471 if they are bitfields.
5473 * cp-tree.def (TYPEOF_TYPE): New code.
5474 * error.c (dump_type_real): Handle it.
5475 * pt.c (tsubst): Likewise.
5476 * tree.c (search_tree): Likewise.
5477 * semantics.c (finish_typeof): New fn.
5478 * parse.y (typespec): Use it.
5479 * cp-tree.h: Declare it.
5481 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
5483 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
5485 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
5487 * typeck.c (convert_arguments): Don't handle pmf references
5490 * init.c (build_member_call): Don't try to convert to the base type
5491 if it's ambiguous or pedantic.
5493 * typeck2.c (check_for_new_type): Only depend on pedantic for
5496 1998-10-25 Mark Mitchell <mark@markmitchell.com>
5498 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
5499 non-converting constructors.
5501 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
5503 * gxxint.texi: Correct documentation for n, N, Q, and B.
5505 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
5507 * parse.y (condition): Convert VAR_DECL from reference to indirect
5510 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
5512 * exception.cc (__cp_pop_exception): Free the original exception
5513 value, not the potentially coerced one.
5515 1998-10-23 Mark Mitchell <mark@markmitchell.com>
5517 * Makefile.in (hash.h): Run gperf when necessary.
5519 * cp-tree.h (CP_TYPE_READONLY): Remove.
5520 (CP_TYPE_VOLATILE): Likewise.
5521 (CP_TYPE_QUALS): New macro.
5522 (CP_TYPE_CONST_P): Likewise.
5523 (CP_TYPE_VOLATILE_P): Likewise.
5524 (CP_TYPE_RESTRICT_P): Likewise.
5525 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
5526 (cp_build_type_variant): Rename to ...
5527 (cp_build_qualified_type): New function.
5528 (c_apply_type_quals_to_decl): Declare.
5529 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
5530 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
5531 (cp_type_qual_from_rid): New function.
5532 (compparms): Remove unused parameter. All callers changed.
5533 (cp_type_quals): New function.
5534 (at_least_as_qualified_p): Likewise.
5535 (more_qualified_p): Likewise.
5537 * call.c (standard_conversion): Replace calls to
5538 cp_build_type_variant with cp_build_qualified_type. Use
5539 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
5540 compare them. Use CP_TYPE_* macros to check qualifiers.
5541 (reference_binding): Likewise.
5542 (implicit_conversion): Likewise.
5543 (add_builtin_candidates): Likewise.
5544 (build_over_call): Likewise.
5545 * class.c (overrides): Compare all qualifiers, not just `const',
5546 on method declarations.
5547 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
5548 (convert_pointer_to_real): Likewise.
5549 (type_promotes_to): Likewise.
5550 * decl.c (check_for_uninitialized_const_var): New function.
5551 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
5552 (cp_finish_decl): Use check_for_uninitialized_const_var.
5553 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
5555 (grok_ctor_properties): Likewise.
5556 (grok_op_properties): Likewise.
5557 (start_function): Likewise.
5558 (rever_static_member_fn): Likewise.
5559 * decl2.c (grok_method_quals): Likewise.
5560 (grokfield): Likewise.
5561 * error.c (dump_readonly_or_volatile): Rename to ...
5562 (dump_qualifiers): New function. Handle `restrict'.
5563 (dump_type_real): Use it.
5564 (dump_aggr_type): Likewise.
5565 (dump_type_prefix): Likewise.
5566 (dump_type_suffix): Likewise.
5567 (dump_function_decl): Likewise.
5568 (cv_as_string): Likewise.
5569 * gxx.gperf: Add __restrict and __restrict__.
5570 * gxxint.texi: Document `u' as used for `__restrict', and a few
5571 other previously undocumented codes.
5572 * hash.h: Regenerated.
5573 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
5574 (build_member_call): Likewise.
5575 (build_new_1): Likewise.
5576 * lex.c (init_parse): Add entry for RID_RESTRICT.
5577 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
5578 (cp_type_qual_from_rid): Define.
5579 * lex.h (enum rid): Add RID_RESTRICT.
5580 * method.c (process_modifiers): Deal with `restrict'.
5581 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
5582 * parse.c: Regenerated.
5583 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
5584 (tsubst_aggr_type): Likewise.
5586 (check_cv_quals_for_unify): Likewise.
5588 * rtti.c (init_rtti_processing): Likewise.
5589 (build_headof): Likewise.
5590 (get_tinfo_var): Likewise.
5591 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
5592 (expand_class_desc): Likewise.
5593 (expand_attr_desc): Likewise.
5594 (synthesize_tinfo_fn): Likewise.
5595 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
5596 (get_matching_virtual): Likewise.
5597 (expand_upcast_fixups): Likewise.
5598 * sig.c (build_signature_pointer_or_reference_name): Take
5599 type_quals, not constp and volatilep.
5600 (build_signature_pointer_or_reference_type): Likewise.
5601 (match_method_types): More CP_TYPE_QUALS conversion, etc.
5602 (build_signature_pointer_constructor): Likewise.
5603 (build_signature_method_call): Likewise.
5604 * tree.c (build_cplus_array_type): Likewise.
5605 (cp_build_type_variant): Rename to ...
5606 (cp_build_qualified_type): New function. Deal with `__restrict'.
5607 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
5608 (build_exception_variant): Likewise.
5610 * typeck.c (qualif_type): Likewise.
5611 (common_type): Likewise.
5612 (comptypes): Likewise.
5613 (comp_cv_target_types): Likewise.
5614 (at_least_as_qualified_p): Define.
5615 (more_qualified_p): Likewise.
5616 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
5617 (compparms): Likewise.
5618 (inline_conversion): Likewise.
5619 (string_conv_p): Likewise.
5620 (build_component_ref): Likewise.
5621 (build_indirect_ref): Likewise.
5622 (build_array_ref): Likewise.
5623 (build_unary_op): Likewise.
5624 (build_conditional_expr): Likewise.
5625 (build_static_cast): Likewise.
5626 (build_c_cast): Likewise.
5627 (build_modify_expr): Likewise.
5628 (convert_For_assignment): Likewise.
5629 (comp_ptr_ttypes_real): Likewise.
5630 (cp_type_quals): New function.
5632 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
5634 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
5635 (CP_TYPE_VOLATILE): Likewise.
5636 * decl.c (grokdeclarator): Use them.
5637 * tree.c (canonical_type_variant): Likewise.
5639 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
5641 * parse.y (named_class_head): Push into class while parsing the
5643 * decl2.c (push_scope, pop_scope): New functions.
5644 * cp-tree.h: Declare them.
5645 * init.c (build_new_1): Delay cleanup until end of full expression.
5647 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
5649 * typeck.c (build_component_ref): Use of a type here is an error.
5651 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
5653 Revamp references to member functions.
5654 * method.c (hack_identifier): Call build_component_ref for a
5655 reference to a member function.
5656 * typeck.c (build_component_ref): Only return a single function
5657 if it's static. Otherwise, return a COMPONENT_REF.
5658 (build_x_function_call): Handle a COMPONENT_REF.
5659 (build_unary_op): Handle all unknown-type things.
5660 * decl2.c (arg_assoc): Handle COMPONENT_REF.
5661 * class.c (instantiate_type): Complain if the function we get is a
5662 nonstatic member function. Remove code for finding "compatible"
5664 * pt.c (tsubst_copy): Handle NOP_EXPR.
5665 * tree.c (build_dummy_object): New fn.
5666 (maybe_dummy_object): New fn.
5667 (is_dummy_object): New fn.
5668 * cp-tree.h: Declare them.
5669 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
5670 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
5671 * init.c (build_member_call): Use maybe_dummy_object and
5673 (build_offset_ref): Use maybe_dummy_object.
5674 (resolve_offset_ref): Use is_dummy_object.
5675 * typeck.c (build_x_function_call): Call build_dummy_object.
5676 (unary_complex_lvalue): Call is_dummy_object.
5678 * typeck.c (build_component_addr): Make sure field is a field.
5680 * call.c (build_new_op): Delete obsolete code.
5682 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
5684 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
5686 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
5687 std if std is ignored.
5689 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
5691 * decl.c (grokvardecl): Fix thinko.
5693 * decl.c (grokdeclarator): Embedded attrs bind to the right,
5696 * parse.y (fn.def2): Fix 'attrs' format.
5698 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5700 * Makefile.in (CONFLICTS): Update.
5701 * parse.y (expr_or_declarator_intern): New rule.
5702 (expr_or_declarator, direct_notype_declarator, primary,
5703 functional_cast): Use it.
5704 (notype_declarator_intern): New rule.
5705 (notype_declarator, complex_notype_declarator): Use it.
5707 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
5709 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
5710 (grokvardecl): Likewise.
5712 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5714 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
5715 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
5717 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
5719 * pt.c (process_partial_specialization): Cast 1st argument of
5722 * tree.c (build_base_fields): Cast `base_align' to (int) when
5723 comparing against one.
5725 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5727 * decl.c (lookup_name_real): Handle template parameters for member
5728 templates where said parameters have the same name as the
5731 * decl.c (expand_static_init): Build cleanups before entering the
5732 anonymous function used to do them to avoid access-checking
5735 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
5736 accidentally removed by previous change, and make DECL_RTL here.
5737 * class.c (add_method): Don't make DECL_RTL here.
5739 * pt.c (for_each_template_parm): Don't examine uninstantiated
5742 1998-10-16 Dave Brolley <brolley@cygnus.com>
5744 * lex.c (real_yylex): Fix unaligned access of wchar_t.
5746 1998-10-16 Mark Mitchell <mark@markmitchell.com>
5748 * class.c (add_method): Fix documentation to reflect previous
5749 changes. Check for duplicate method declarations here.
5750 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
5751 correctly; such things never match.
5752 (grokfndecl): Don't look for duplicate methods here.
5753 * decl2.c (check_classfn): Don't assume names are mangled.
5754 Don't add bogus member function declarations to a class before the
5755 class type is complete.
5756 (grokfield): Reformat error message.
5757 * method.c (set_mangled_name_for_decl): Don't mangle names while
5758 processing_template_decl.
5760 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
5762 * typeck.c (build_indirect_ref): Complain about a pointer to data
5764 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
5766 * init.c (resolve_offset_ref): Don't undo the above.
5768 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
5769 (struct lang_decl_flags): Add `bitfield'.
5770 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
5772 * decl2.c (grokbitfield, grok_alignof): Likewise.
5773 * init.c (build_offset_ref): Likewise.
5774 * typeck.c (build_component_addr, expr_sizeof): Likewise.
5775 * cvt.c (build_up_reference): Don't crash if taking the address
5776 returns error_mark_node.
5778 * decl.c (grokfndecl): Also check ctype when checking for ::main().
5780 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
5782 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
5784 (grokdeclarator): Instead of here.
5785 * friend.c (do_friend): Lose special handling of ::main and
5787 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
5789 * spew.c (yylex): Clear looking_for_typename if we got
5792 1998-10-15 Mark Mitchell <mark@markmitchell.com>
5794 * class.c (maybe_warn_about_overly_private_class): Improve error
5795 messages for class with only private constructors.
5797 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
5798 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
5799 (build_typename_type): New function.
5800 * decl.c (build_typename_type): Broken out from ...
5801 (make_typename_type): Use it.
5802 * search.c (lookup_field): Likewise.
5804 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
5806 * pt.c (convert_nontype_argument): Check against type_referred_to.
5807 * decl.c (grokvardecl): Check for declarator name before building
5808 DECL_ASSEMBLER_NAME.
5810 1998-10-14 Mark Mitchell <mark@markmitchell.com>
5812 * pt.c (lookup_template_class): Add comment.
5813 (instantiate_class_template): Don't mark the _TYPE node for
5814 member class templates as an instantiation.
5816 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
5818 * decl.c (grokfndecl): Fix my thinko.
5820 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
5822 * tinfo2.cc (fast_compare): Remove.
5823 (before): Just use strcmp.
5824 * tinfo.cc (operator==): Just use strcmp.
5826 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
5828 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
5831 1998-10-13 Mark Mitchell <mark@markmitchell.com>
5833 * cp-tree.h (specializations_of_same_template_p): Remove.
5834 * search.c (get_template_base): Don't use it.
5835 (get_template_base_recursive): Likewise.
5836 * pt.c (specializations_of_same_template_p): Remove.
5837 (unify): Don't use it.
5838 (lookup_template_class): Find the correct parent when setting
5839 CLASSTYPE_TI_TEMPLATE.
5841 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5843 * tinfo.cc (operator==): Always compare names.
5845 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5847 * decl.c (start_function): Fix cut-and-paste error.
5849 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
5851 * inc/typeinfo: Add #pragma interface.
5852 (operator!=): Just call operator==.
5853 * tinfo.cc: Add #pragma implementation.
5854 (operator==): Move from inc/typeinfo and tinfo2.cc.
5855 Check __COMMON_UNRELIABLE instead of _WIN32.
5857 * typeck2.c (my_friendly_abort): Add URL.
5859 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
5861 * decl.c (start_method): Added extra parameter for attributes.
5862 * cp-tree.h (start_method): Update prototype.
5863 * parse.y (fn.def2): Update start_method parameter list.
5865 1998-10-11 Mark Mitchell <mark@markmitchell.com>
5867 * cp-tree.h (specializations_of_same_template_p): Declare.
5868 * pt.c (specializations_of_same_template_p): New function.
5870 * search.c (get_template_base): Use it.
5871 (get_template_base_recursive): Likewise.
5873 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
5875 * decl2.c (start_objects): Add new variable `joiner' and
5876 initialize it properly.
5878 1998-10-09 Mark Mitchell <mark@markmitchell.com>
5880 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
5881 change to vtable types.
5883 * cvt.c (ocp_convert): Avoid infinite recursion caused by
5886 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
5888 * pt.c (resolve_overloaded_unification): New fn.
5889 (try_one_overload): Likewise.
5890 (unify): Don't fail on unknown type.
5891 (type_unification_real): Likewise. Use resolve_overloaded_unification
5892 to handle an overloaded argument.
5893 (template_args_equal): Split out...
5894 (comp_template_args): From here.
5895 (determine_specialization): Also allow a template with more
5896 parms than were explicitly specified.
5897 * cp-tree.h: Add template_args_equal.
5898 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
5900 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
5902 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
5905 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
5907 * typeck.c (unsigned_type): Only return TItype nodes when
5908 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5909 (signed_type): Likewise.
5910 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
5911 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5912 (init_decl_processing): Only create TItype nodes when
5913 HOST_BITS_PER_WIDE_INT is >= 64 bits.
5914 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
5915 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
5917 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5919 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
5920 (gxx.gperf): Update comments describing invocation flags.
5921 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
5923 1998-10-07 Mark Mitchell <mark@markmitchell.com>
5925 * class.c (finish_struct_1): Add commentary on previous change.
5927 * cp-tree.h (vtbl_ptr_type_node): New variable.
5928 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
5929 already of the right type.
5930 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
5931 Simplify code to grow vtable.
5932 * decl.c (vtbl_ptr_type_node): Define.
5933 (init_decl_processing): Initialize it.
5935 1998-10-06 Mark Mitchell <mark@markmitchell.com>
5937 * cp-tree.def (PTRMEM_CST): New tree node.
5938 * cp-tree.h (ptrmem_cst): New type.
5939 (lang_type): Remove local_typedecls.
5940 (dummy): Increase to 12 bits from 11.
5941 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
5942 (PTRMEM_CST_CLASS): New macro.
5943 (PTRMEM_CST_MEMBER): Likewise.
5944 (current_access_specifier): New variable.
5945 (current_class_type): Remove duplicate declaration.
5946 (finish_struct): Change prototype.
5947 (unreverse_member_declarations): New function.
5948 (pushdecl_class_level): Change prototype.
5949 (grok_enum_decls): Remove.
5950 (fixup_anonymous_union): New function.
5951 (grok_x_components): Change prototype.
5952 (tsubst_chain): Remove.
5953 (finish_member_template_decl): Likewise.
5954 (check_explicit_specialization): Fix indentation.
5955 (finish_class_definition): Change prototype.
5956 (finish_member_class_template): Likewise.
5957 (finish_member_declaration): New function.
5958 (check_multiple_declarators): Likewise.
5959 * class.c (class_stack_node_t): New type.
5960 (current_class_base): Remove.
5961 (current_class_stack): Change type.
5962 (current_access_specifier): New variable.
5963 (grow_method): Remove.
5964 (check_member_decl_is_same_in_complete_scope): Break out from
5966 (make_method_vec): New function.
5967 (free_method_vec): Likewise.
5968 (add_implicitly_declared_members): Break out from finish_struct_1.
5969 (free_method_vecs): New variable.
5970 (add_method): Rework for direct use from parser.
5971 (handle_using_decl): Watch for NULL_TREE while iterating through
5972 CLASSTYPE_METHOD_VEC.
5973 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
5974 just do some error-checking.
5975 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
5976 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
5977 (finish_struct): Change prototype. Simplify; fields and methods
5978 are already set up at this point.
5979 (init_class_processing): Set up current_class_stack.
5980 (pushclass): Save current_access_specifier.
5981 (popclass): Restore it.
5982 (currently_open_class): Simplify.
5983 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
5984 * decl.c (saved_scope): Add access_specifier.
5985 (maybe_push_to_top_level): Save it.
5986 (pop_from_top_level): Restore it.
5987 (maybe_process_template_type_declaration): Use
5988 finish_member_declaration.
5989 (pushtag): Likewise.
5990 (pushdecl_class_level): Don't return a value.
5991 (fixup_anonymous_union): Break out from grok_x_components.
5992 (shadow_tag): Use it.
5993 (xref_tag): Complain about using an elaborated type specifier to
5994 reference a template type parameter or typedef name.
5995 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
5996 (current_local_enum): Remove.
5997 (build_enumerator): Call finish_member_declaration.
5998 (grok_enum_decls): Remove.
5999 * decl2.c (grok_x_components): Simplify.
6000 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
6001 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
6002 (merge_functions): Add to comment.
6003 (arg_assoc_type): Prototype.
6004 (arg_assoc): Pass as many arguments as there are parameters.
6005 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
6007 * expr.c (cpls_expand_expr): Remove dead code. Handle
6009 * friend.c (do_friend): Lookup friends when in nested classes.
6011 * init.c (build_offset_ref): Do lookup even for classes that are
6012 only partially defined.
6013 (decl_constant_value): Remove dead code.
6014 * method.c (build_overload_value): Remove hack where by TYPE was
6015 not a TYPE. Handle PTRMEM_CST.
6016 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
6018 * parse.y (components, notype_components, component_decl,
6019 component_decl_1, component_declarator, component_declarator0):
6020 Now all are itype rather than ttype. Rework to add members to
6022 (typesqpecqual_reserved): Use check_multiple_declarators.
6023 (structsp): Update class to finish_class_definition.
6024 (do_xref_defn): Unsplit into named_class_head.
6025 (access_specifier): Set current_access_specifier.
6026 * pt.c (set_current_access_from_decl): New function.
6027 (finish_member_template_decl): Don't take the parameters.
6028 (comp_template_args): Make more robust.
6029 (lookup_template_class): Don't use current_local_enum.
6030 (for_each_template_parm): Handle PTRMEM_CST.
6031 (instantiate_class_template): Use set_current_access_from_decl,
6032 finish_member_declaration and unreverse_member_declarations. Set
6033 lineno/input_filename before generating implicit member functions.
6034 (type_unification_real): Don't assume back-unification happens
6035 only for the last argument.
6036 (regenerate_decl_from_template): Call pushclass a bit earlier.
6037 (tsubst_chain): Remove.
6038 (tsubst_enum): Use set_current_access_from_decl.
6039 (set_mangled_name_for_template_decl): Fix indentation.
6040 * search.c (lookup_fnfields_1): Change iteration through
6041 CLASSTYPE_METHOD_VEC.
6042 (dfs_pushdecls): Likewise.
6043 (dfs_compress_decls): Likewise.
6044 (add_conversions): Likewise.
6045 * semantics.c (finish_class_definition): Don't take components.
6046 Change call to finish_struct.
6047 (finish_member_declaration): New function.
6048 (finish_member_class_template): Don't take template parameters.
6049 Change call to grok_x_components. Call finish_member_template_decl.
6050 (check_multiple_declarators): New function.
6051 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
6052 a passed in fieldlist.
6053 * tree.c (search_tree): Handle PTRMEM_CST.
6055 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
6056 INTEGER_CSTs, for pointer-to-data members.
6058 * call.c (resolve_args): Resolve template specializations, if
6061 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6063 * Makefile.in (spew.o): Depend on toplev.h.
6065 * call.c (compare_ics): Initialize variables `deref_from_type2',
6066 `deref_to_type1' and `deref_to_type2'.
6068 * except.c (get_eh_type): Hide prototype and definition.
6069 (process_start_catch_block_old): Remove unused static prototype.
6071 * pt.c (tsubst_decl): Initialize variable `argvec'.
6073 * spew.c: Include toplev.h.
6075 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
6077 * pt.c (instantiate_decl): Do save and restore file position.
6079 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
6081 * method.c (build_decl_overload_real): Clear
6082 numeric_output_need_bar after __.
6084 1998-10-05 Nathan Sidwell <nathan@acm.org>
6086 * call.c (build_new_method_call): Issue 'incomplete type' error,
6087 if class is not defined.
6089 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6091 * call.c (build_object_call): Move declaration of variable
6092 `fn' into the scope where it is used. Don't access variable
6093 `fn' when it is uninitialized, instead use `fns'.
6095 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6097 * errfn.c (cp_thing): Print buf as a string not as a printf format
6098 to avoid problems with the operator%. Consequently, `%%' sequences
6099 in format are copied as `%' in buf.
6101 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
6103 * pt.c (pop_tinst_level): Call extract_interface_info.
6104 (instantiate_decl): Don't save and restore file position.
6106 * decl.c (cp_finish_decl): Make statics in extern inlines and
6107 templates common, if possible and the target doesn't support weak
6110 * decl.c (grokdeclarator): Remove redundant calls to
6111 build_type_variant and some duplicated code.
6112 * sig.c (build_signature_reference_type): Only take the type parm.
6113 (build_signature_pointer_type): Likewise.
6114 * tree.c (build_cplus_method_type): Adjust.
6115 * cp-tree.h: Update.
6117 1998-10-04 Mark Mitchell <mark@markmitchell.com>
6119 * call.c (build_over_call): Make pedwarns about dropped qualifiers
6120 into full-fledged errors.
6121 * cvt.c (convert_to_reference): Likewise.
6122 * typeck.c (convert_for_assignment): Likewise.
6124 * search.c (expand_upcast_vtables): In addition to unsetting
6125 TREE_READONLY, remove top-level const type qualifier.
6127 1998-10-03 Mark Mitchell <mark@markmitchell.com>
6129 * class.c (current_class_ptr, current_class_ref): Clarify
6131 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
6132 NOP type conversions.
6133 * decl.c (decls_match): Use comptypes directly; ignore
6134 qualifiers on the DECL.
6135 (duplicate_decls): Remove qualifier checks on DECL.
6136 (grokdeclarator): Make the type built up include top-level
6138 * decl2.c (do_dtors): Fix spelling error.
6139 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
6140 when printing type information.
6141 * init.c (build_new_1): Add documentation. Deal with the fact
6142 that type of allocated memory now contains qualifiers.
6143 * lex.c (is_global): Improve error-recovery.
6144 * sig.c (build_member_function_pointer): Don't cast away const
6145 on fields of sigtable_entry_type.
6146 * tree.c (lvalue_type): Don't look at top-level qualifiers on
6148 * typeck.c (decay_conversion): Likewise.
6149 (build_component_ref): Make sure the type of the COMPONENT_REF
6150 contains top-level qualifiers, as appropriate. Improve
6152 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
6153 (build_array_ref): Likewise.
6154 (build_unary_op): Improve error-recovery.
6155 (unary_complex_lvalue): Make taking the address a bound member
6156 function an error, not a sorry.
6157 (build_conditional_expr): Look at the type qualifiers, not the
6158 qualifiers on the expression itself.
6160 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
6162 * decl2.c (merge_functions): Remove duplicates.
6164 * decl2.c: Add -f{no-,}implicit-inline-templates.
6165 (import_export_decl): Check it.
6167 * decl.c (lookup_name_real): Template parms also take precedence
6168 over implicit typename. Only warn if yylex.
6170 * typeck.c (build_conditional_expr): Only fold if ifexp is an
6173 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
6176 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
6178 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
6179 * class.c (build_vbase_pointer): Use it.
6180 * rtti.c (expand_class_desc): Likewise.
6181 * tree.c (build_vbase_pointer_fields): Likewise.
6183 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
6185 * decl.c (start_decl): Add invocation of
6186 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6187 (start_function): Add invocation of
6188 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
6190 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
6191 HANDLE_GENERIC_PRAGMAS.
6193 1998-09-28 Anthony Green <green@cygnus.com>
6195 * semantics.c (finish_asm_stmt): Always permit volatile asms.
6197 1998-09-28 Mark Mitchell <mark@markmitchell.com>
6199 * decl.c (grokdeclarator): Tighten checks for invalid
6200 destructors. Improve error-messages and error-recovery.
6201 * decl2.c (check_classfn): Don't assume that mangled destructor
6202 names contain type information.
6204 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
6206 * search.c (get_base_distance): Remove assert.
6208 * decl2.c (build_anon_union_vars): Don't process a field with no
6210 (finish_anon_union): Also complain about local anon unions with no
6213 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
6215 * decl.c (lookup_namespace_name): If the name is a namespace,
6216 return it immediately.
6218 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6220 * cp-tree.h (define_case_label): Remove unused parameter.
6221 (check_java_method): Likewise.
6222 (grokclassfn): Likewise.
6223 (expand_aggr_init): Likewise.
6224 (build_x_delete): Likewise.
6225 (maybe_end_member_template_processing): Likewise.
6226 (unshare_base_binfos): Add prototype.
6227 (string_conv_p): Likewise.
6228 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
6230 * cvt.c (build_up_reference): Remove unused parameter
6231 `checkconst', all callers changed.
6232 (build_type_conversion): Mark parameter `code' with
6234 (build_expr_type_conversion): Initialize variable `conv'.
6236 * decl.c (push_namespace): Initialize variable `d'.
6237 (define_case_label): Remove unused parameter `decl', all callers
6240 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
6241 `argc' with ATTRIBUTE_UNUSED.
6242 (grokclassfn): Remove unused parameter `cname', all callers
6244 (check_java_method): Likewise for parameter `ctype'.
6245 (copy_assignment_arg_p): Mark parameter `virtualp' with
6247 (finish_prevtable_vardecl): Likewise for parameter `prev'.
6249 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
6251 * init.c (expand_aggr_init_1): Remove unused parameter
6252 `alias_this', all callers changed.
6253 (expand_aggr_init): Likewise.
6254 (expand_default_init): Likewise.
6255 (build_new_1): Initialize variable `susp'.
6256 (build_x_delete): Remove unused parameter `type', all callers
6259 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
6261 (readescape): Use (unsigned) value in shift.
6262 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
6263 comparing to a signed quantity.
6265 * pt.c (maybe_end_member_template_processing): Remove unused
6266 parameter `decl', all callers changed.
6267 (check_explicit_specialization): Add braces around empty body in
6269 (current_template_args): Initialize variable `args'.
6270 (lookup_template_class): Likewise for variable `prev_local_enum'.
6271 (tsubst_decl): Likewise for variable `r'.
6272 (set_mangled_name_for_template_decl): Initialize variable
6275 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
6276 Likewise for variable `i'.
6277 (yylex): Initialize variable `trrr'.
6279 * typeck.c (compparms): Mark variable `strict' with
6282 * xref.c (simplify_type): Cast argument of ctype function to
6285 1998-09-24 Mark Mitchell <mark@markmitchell.com>
6287 * cp-tree.h (language_lvalue_valid): Remove.
6288 * decl.c (grokdeclarator): Don't disallow references to functions.
6289 * tree.c (lvalue_p_1): New function, combining duplicated
6292 (real_lvalue_p): Likewise.
6293 * typeck.c (language_lvalue_valid): Remove.
6294 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
6295 they don't have TREE_READONLY set.
6296 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
6298 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
6300 * spew.c (yylex): Give diagnostic.
6301 * hash.h (is_reserved_word): Add export.
6302 * gxx.gperf: Likewise.
6303 * lex.h (rid): Add RID_EXPORT.
6304 * lex.c (init_parse): Likewise.
6306 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
6308 * friend.c (do_friend): Make warning a full sentence.
6310 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6312 * parse.y (component_decl_list): Improve error-recovery.
6314 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
6316 * decl.c (make_typename_type): Move error to point where name
6317 variable can be used by dump_type.
6319 1998-09-22 Mark Mitchell <mark@markmitchell.com>
6321 * decl.c (grokfndecl): Improve error-recovery.
6322 * decl2.c (grokfield): Likewise.
6323 * pt.c (finish_member_template_decl): Likewise.
6325 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
6327 * method.c (hack_identifier): Finding multiple members is always
6330 1998-09-21 Per Bothner <bothner@cygnus.com>
6332 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
6334 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
6336 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
6338 1998-09-20 Mark Mitchell <mark@markmitchell.com>
6340 * class.c (maybe_warn_about_overly_private_class): Reformat.
6342 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
6344 * exception.cc (__cplus_type_matcher): Realign some code.
6346 1998-09-16 Mark Mitchell <mark@markmitchell.com>
6348 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
6349 (tinfo2.o): Likewise.
6350 (exception.o): Likewise.
6352 (opnew.o): Likewise.
6353 (opnewnt.o): Likewise.
6354 (opvnew.o): Likewise.
6355 (opvnewnt.o): Likewise.
6356 (opdel.o): Likewise.
6357 (opdelnt.o): Likewise.
6358 (opvdel.o): Likewise.
6359 (opvdelnt.o): Likewise.
6361 1998-09-16 Richard Henderson <rth@cygnus.com>
6363 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
6365 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
6367 * call.c (build_field_call): Handle static data members too.
6369 * typeck.c (comptypes): When comparing pointer types, check
6370 whether referred types match even in strictest modes.
6372 1998-09-15 Mark Mitchell <mark@markmitchell.com>
6374 * cp-tree.h: Revert previous change.
6375 (finish_struct_methods): Remove declaration.
6376 * class.c: Revert previous change.
6377 (maybe_warn_about_overly_private_class): New function.
6378 (finish_struct_methods): Declare here, and make static. Remove
6379 unnecessary parameters. Tidy slightly. Use
6380 maybe_warn_about_overly_private_class.
6381 (finish_struct_1): Adjust. Remove check for private constructors,
6383 (finish_struct): Adjust.
6385 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6387 * except.c (expand_start_catch_block): No need to check for new
6389 (process_start_catch_block_old): Deleted.
6390 (process_start_catch_block): Add call to start_decl_1().
6391 (expand_end_catch_block): Add call to end_catch_handler().
6392 * exception.cc (__cplus_type_matcher): Only check the exception
6393 language if there is an exception table.
6395 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
6397 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
6398 as used to prevent conflicts with virtual function tables.
6400 1998-09-14 Mark Mitchell <mark@markmitchell.com>
6402 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
6403 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
6404 * class.c (maybe_class_too_private_p): New function.
6405 (finish_struct_methods): Use it.
6406 (finish_struct_1): Likewise.
6407 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
6410 * pt.c (check_specialization_scope): Fix spelling error.
6411 (check_explicit_specialization): Remove code to handle explicit
6412 specializations in class scope; they are now correctly diagnosed
6415 1998-09-10 Mark Mitchell <mark@markmitchell.com>
6417 * decl.c (pushdecl): Don't copy types if the
6418 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
6421 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6423 * class.c (get_enclosing_class): New function.
6424 (is_base_of_enclosing_class): Likewise.
6425 * cp-tree.h (get_enclosing_class): Declare.
6426 (is_base_of_enclosing_class): Likewise.
6427 * pt.c (coerce_template_parms): Use them.
6429 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
6431 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
6432 null to decide whether to use it.
6434 * error.c (dump_type_real): Handle NAMESPACE_DECL.
6435 * parse.y (base_class.1): Avoid crash on error.
6437 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
6439 * decl.c (make_typename_type): If context is a namespace, the code
6442 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
6444 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
6446 1998-09-08 Mark Mitchell <mark@markmitchell.com>
6448 * cp-tree.h (anonymous_namespace_name): Declare.
6449 * decl.c: Define it.
6450 (push_namespace): Use anonymous_namespace_name, rather than local
6452 * error.c (dump_decl): If a namespace is named
6453 anonymous_namespace_name, call it {anonymous}.
6455 * decl.c (grokparms): Distinguish between references and pointers
6458 1998-09-08 Richard Henderson <rth@cygnus.com>
6459 Mark Mitchell <mark@markmitchell.com>
6461 * pt.c (process_partial_specialization): Consistently allocate
6462 and zero tpd.parms based on ntparms. Use tpd2.parms, not
6463 tpd.parms, where appropriate.
6465 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
6467 * Makefile.in (INCLUDES): Update after recent toplevel gcc
6470 1998-09-05 Mark Mitchell <mark@markmitchell.com>
6472 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
6473 * class.c (finish_struct): Remove hackery to deal with explicit
6474 specializations in class scope.
6475 * decl.c (grokfndecl): Improve error-recovery.
6476 * decl2.c (grokfield): Likewise.
6477 * pt.c (check_specialization_scope): New function.
6478 (begin_specialization): Call it.
6479 (process_partial_specialization): New function, split out from
6480 push_template_decl. Check partial specializations more
6482 (push_template_decl): Call it.
6483 (check_explicit_specialization): Don't attempt to handle explicit
6484 specializations in class scope.
6485 (template_parm_data): Document. Add current_arg and
6486 arg_uses_template_parms.
6487 (mark_template_parm): Set it.
6488 (tsubst_arg_types): Remove unused variable.
6489 * semantics.c (begin_class_definition): Tweak.
6491 1998-09-04 Mark Mitchell <mark@markmitchell.com>
6493 * inc/typeinfo (type_info::type_info(const char*)): Make
6496 * cp-tree.h (hash_tree_cons_simple): New macro.
6497 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
6498 (coerce_template_parms): Use make_temp_vec, instead of
6499 make_tree_vec. Document this behavior.
6500 (lookup_template_class): Likewise.
6501 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
6502 Remove dead code (and add assertion to check its deadness). Fix
6503 bug w.r.t. exception specifications.
6505 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
6507 * decl2.c (import_export_vtable): Always make artificials comdat.
6508 (import_export_decl): Likewise.
6509 * pt.c (mark_decl_instantiated): Likewise.
6511 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6513 * cp-tree.h (finish_globally_qualified_member_call_expr):
6515 (finish_qualified_call_expr).
6516 * semantics.c: Likewise.
6517 * parse.y (primary): Use it.
6518 * method.c (hack_identifier): Remove redundant code.
6520 * init.c (resolve_offset_ref): Call convert_from_reference to
6521 handle members of reference type. Improve error recovery.
6523 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
6525 * cp-tree.h: Declare warn_nontemplate_friend.
6526 * decl2.c (lang_decode_option): Set.
6527 * lang-options.h: Add -Wnon-template-friend.
6528 * friend.c (do_friend): Use to toggle non-template function warning.
6530 1998-09-03 Mark Mitchell <mark@markmitchell.com>
6532 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
6533 corresponding INTEGER_CSTs when processing_template_decl.
6534 * pt.c (tsubst_enum): Tweak accordingly.
6536 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
6538 * decl.c (pushdecl_class_level): Add warning here.
6541 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
6543 * cvt.c (convert_pointer_to_real): Tidy.
6544 * search.c (get_base_distance_recursive): Simplify.
6545 (get_base_distance): Likewise.
6547 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
6550 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
6552 * lex.c (check_newline): Call HANDLE_PRAGMA before
6553 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
6554 if unknown pragmas are encountered.
6555 (handle_sysv_pragma): Interpret return code from
6556 handle_pragma_token (). Return success/failure indication rather
6557 than next unprocessed character.
6558 (pragma_getc): New function: retrieves characters from the
6559 input stream. Defined when HANDLE_PRAGMA is defined.
6560 (pragma_ungetc): New function: replaces characters back into the
6561 input stream. Defined when HANDLE_PRAGMA is defined.
6563 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6565 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
6566 * class.c (build_vtable_entry_ref): Likewise.
6568 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6570 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
6571 * decl2.c (import_export_decl): Likewise.
6572 * pt.c (instantiate_decl): Use it.
6574 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
6576 * decl.c (lookup_name_real): Also do implicit typename thing for
6577 artificial TYPE_DECLs.
6578 * search.c (lookup_field): Likewise.
6579 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
6580 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
6581 (enter_scope_of): Extract type from implicit typename.
6582 (begin_class_definition): Likewise.
6583 * lex.c (identifier_type): Handle implicit typename when checking
6586 * cp-tree.h: Declare flag_strict_prototype.
6587 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
6589 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
6590 specified, set it to the value of pedantic.
6592 1998-09-01 Mark Mitchell <mark@markmitchell.com>
6594 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
6596 1998-08-31 Mark Mitchell <mark@markmitchell.com>
6598 * decl.c (finish_enum): Handle member enums of classes declared in
6601 * decl2.c (grok_x_components): Strip attributes before calling
6604 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
6606 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
6607 -fenum-int-equivalence and -fno-nonnull-objects.
6608 * class.c (check_for_override): Remove support for -fall-virtual.
6609 (finish_struct_1): Likewise.
6610 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
6611 * typeck.c (build_binary_op_nodefault): Likewise.
6612 * cvt.c (ocp_convert): Likewise.
6613 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
6614 * class.c (build_vbase_path): Likewise.
6616 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
6618 * Makefile.in (INTERFACE): New, set to 1.
6620 1998-08-30 Mark Mitchell <mark@markmitchell.com>
6622 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
6623 comparing with global_namespace.
6624 (dump_aggr_type): Likewise.
6626 * decl.c (grokfndecl): Issue error on declaration of friend
6627 templates with explicit template arguments.
6629 * pt.c (convert_template_argument): New function, split out
6631 (coerce_template_parms): Here.
6632 (tsubst): Attempt better error-recovery.
6634 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
6636 * pt.c (decl_template_parm_p): Add checks for
6637 TEMPLATE_TEMPLATE_PARM.
6639 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6641 * lex.c (do_identifier): Fix thinko in previous change.
6643 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
6645 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
6646 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
6648 1998-08-28 Richard Henderson <rth@cygnus.com>
6650 Add support for discarding unused virtual functions.
6651 * lang-options.h: Add -fvtable-gc.
6652 * cp-tree.h: Add flag_vtable_gc.
6653 * decl2.c (output_vtable_inherit): New fn.
6654 (finish_vtable_vardecl): Call it.
6655 * class.c (build_vtable_entry_ref): New fn.
6656 (build_vtbl_ref): Call it.
6658 1998-08-28 Mark Mitchell <mark@markmitchell.com>
6660 * cp-tree.h (build_enumerator): Take the enumeration type as a
6662 * decl.c (finish_enum): Don't set the TREE_TYPE for the
6663 enumeration constant values if we're processing_template_decls.
6664 Don't set the type for the CONST_DECLs either; that's done in
6666 (build_enumerator): Take the enumeration type as a
6668 * lex.c (do_identifier): Don't resolve enumeration constants while
6669 processing template declarations, even if they happen to be
6670 TEMPLATE_PARM_INDEXs.
6672 * parse.y (current_enum_type): New variable.
6673 (primary): Don't allow statement-expression in local classes just
6674 as we don't in global classes.
6675 (structsp): Use current_enum_type.
6676 (enum_list): Likewise.
6677 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
6678 finish_enum; they no longer occur.
6680 * cp-tree.h (finish_base_specifier): New function.
6681 * parse.y (base_class): Use it.
6682 * semantics.c (finish_base_specifier): Define it.
6684 * parse.y (structsp): Warn on use of typename outside of template
6687 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6689 * lex.c (handle_cp_pragma): Remove #pragma vtable.
6690 * lang-options.h: Remove +e options.
6691 * decl2.c (lang_decode_option): Likewise.
6692 (import_export_vtable): Don't check write_virtuals.
6693 (finish_vtable_vardecl, finish_file): Likewise.
6694 * search.c (dfs_debug_mark): Likewise.
6695 * semantics.c (begin_class_definition): Likewise.
6696 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
6698 * call.c (build_over_call): Check flag_elide_constructors.
6699 * decl2.c: flag_elide_constructors defaults to 1.
6700 * typeck.c (convert_arguments): Remove return_loc parm.
6701 (build_function_call_real): Adjust.
6703 * search.c: Tear out all mi_matrix and memoize code.
6704 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
6705 * lang-options.h: Remove documentation for -fhandle-exceptions,
6706 -fmemoize-lookups and -fsave-memoized.
6707 * cp-tree.h: Lose mi_matrix and memoize support.
6708 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
6709 * class.c: Lose struct class_level.
6710 (pushclass, popclass): Lose memoize support.
6711 * init.c (build_offset_ref): Likewise.
6713 Never change BINFO_INHERITANCE_CHAIN.
6714 * init.c (emit_base_init): Change modification of
6715 BINFO_INHERITANCE_CHAIN to an assert.
6716 * search.c (get_base_distance_recursive): Likewise.
6717 (get_base_distance): Likewise.
6718 (lookup_member): Likewise.
6719 (convert_pointer_to_single_level): Likewise.
6720 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
6721 (lookup_fnfields): Likewise.
6722 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
6723 (unshare_base_binfos): Don't call propagate_binfo_offsets.
6724 (layout_basetypes): Call propagate_binfo_offsets instead of
6725 unshare_base_binfos.
6726 * decl.c (xref_basetypes): Call unshare_base_binfos.
6727 * pt.c (instantiate_class_template): Likewise.
6728 * tree.c (reverse_path): Remove 'copy' parm; always make a
6730 * class.c (build_vbase_path): Just call it.
6731 * search.c (compute_access): Likewise. Don't re-reverse.
6733 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6735 * class.c (build_vbase_path): Use reverse_path.
6736 (finish_base_struct): Move warnings for inaccessible bases to
6738 (modify_one_vtable): Remove check of TREE_USED (binfo).
6739 (fixup_vtable_deltas1): Likewise.
6740 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
6741 (xref_tag): Remove binfos parameter.
6742 (make_binfo): Remove chain parameter.
6743 (reverse_path): Add copy parameter.
6744 * decl.c (init_decl_processing): Change calls to xref_tag.
6745 (xref_tag): Remove binfos parameter.
6746 (xref_basetypes): Change calls to make_binfo.
6747 * decl2.c (grok_x_components): Change calls to xref_tag.
6748 (handle_class_head): Likewise.
6749 * friend.c (do_friend): Likewise.
6750 * lex.c (make_lang_type): Change calls to make_binfo.
6751 * parse.y (structsp): Change calls to xref_tag.
6752 (named_complex_class_head_sans_basetype): Likewise.
6753 (named_class_head): Likewise.
6754 * rtti.c (init_rtti_processing): Likewise.
6755 * search.c (compute_access): Change calls to reverse_path.
6756 (dfs_get_vbase_types): Change calls to make_binfo.
6757 (get_vbase_types): Remove dead code.
6758 * tree.c (unshare_base_binfos): Change calls to make_binfo.
6759 (layout_basetypes): Warn here about inaccessible bases.
6760 (make_binfo): Remove chain parameter.
6761 (reverse_path): Add copy parameter.
6763 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
6765 * class.c: #if 0 complete_type_p.
6766 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
6767 * method.c (process_overload_item): Likewise.
6768 * typeck.c (comp_target_types): Likewise.
6770 Stop sharing binfos for indirect virtual bases.
6771 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
6772 (layout_basetypes): Likewise.
6773 (unshare_base_binfos): Copy vbases, too.
6774 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
6775 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
6776 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
6777 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
6778 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
6779 reference to BINFO_VIA_PUBLIC.
6780 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
6781 (push_class_decls): Use them.
6782 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
6783 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
6785 1998-08-27 Mark Mitchell <mark@markmitchell.com>
6787 * decl.c (build_enumerator): Set DECL_CONTEXT for the
6790 1998-08-26 Mark Mitchell <mark@markmitchell.com>
6792 * cp-tree.h (finish_enum): Change prototype.
6793 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
6794 VALUES parameter. Don't try to compute mins/maxs if
6795 processing_template_decl.
6796 * parse.y (structsp): Use new calling sequence for finish_enum.
6797 * pt.c (tsubst_enum): Likewise. Take the new type as input.
6798 (lookup_template_class): Remove unused variables. Tweak.
6799 Register enums on instantiation list before substituting
6800 enumeration constants.
6801 (tsubst_decl): Remove unused variables.
6802 (regenerate_decl_from_template): Likewise.
6804 * decl.c (duplicate_decls): Don't obliterate the
6805 DECL_TEMPLATE_INFO for a template if we're not replacing it with
6808 * lex.c (do_identifier): Fix typo in comment.
6810 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6812 * errfn.c: Remove stdarg.h/varargs.h.
6815 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
6817 * pt.c (tsubst_copy): Only do typename overloading on an
6818 IDENTIFIER_NODE that happens to look like a typename if it actually
6819 has a type for us to use.
6821 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6823 * typeck.c (comp_cv_target_types): Split out...
6824 (comp_target_types): From here. Don't allow cv-qual changes under
6825 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
6826 (build_ptrmemfunc): Pass 1 to nptrs.
6827 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
6829 1998-08-25 Mark Mitchell <mark@markmitchell.com>
6831 * search.c (dependent_base_p): Don't compare a binfo to
6832 current_class_type; use the TREE_TYPE of the binfo instead.
6834 * cp-tree.h (CLASS_TYPE_P): Revise definition.
6836 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
6838 * decl.c (duplicate_decls): Don't complain about different
6839 exceptions from an internal decl even if pedantic.
6841 * typeck.c (convert_for_assignment): Converting from pm of vbase
6842 to derived is an error, not a sorry.
6844 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
6845 * class.c (fixed_type_or_null): Rename from
6846 resolves_to_fixed_type_p. Return the dynamic type of the
6847 expression, if fixed, or null.
6848 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
6849 does not match the static type.
6850 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
6851 resolves_to_fixed_type_p again.
6853 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6855 * pt.c (tsubst_decl): Move special case code for dealing with
6856 tricky friend templates here from ...
6857 (regenerate_decl_from_template): Here.
6859 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6861 * decl.c (start_decl): Remove redundant linkage check.
6863 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
6865 * typeck.c (c_expand_return): Handle the case that valtype
6866 is wider than the functions return type.
6868 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6870 * cp-tree.h (CLASS_TYPE_P): New macro.
6871 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
6872 * pt.c (process_template_parm): Undo previous change.
6874 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
6876 * cp-tree.h: Declare.
6877 * pt.c (decl_template_parm_p): New function.
6878 * decl.c (pushdecl): Check decls for redeclaring template parms.
6879 (xref_tag): Make redeclaration an error, print decl.
6880 * decl2.c (grokfield): Check field_decls for redeclaration as well.
6882 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6884 * parse.y (primary): Fix up the type of string constants.
6886 1998-08-24 Mark Mitchell <mark@markmitchell.com>
6888 * typeck.c (convert_for_initialization): Move check for odd uses
6889 of NULL to avoid duplicate warnings.
6891 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
6893 * tree.c (lvalue_type): Fix for arrays.
6894 * typeck.c (string_conv_p): New fn.
6895 (convert_for_assignment): Use it.
6896 (build_unary_op): Use lvalue_type.
6897 * call.c (standard_conversion, convert_like): Use string_conv_p.
6898 (add_function_candidate): Use lvalue_type.
6899 * cvt.c (convert_to_reference): Likewise.
6900 * decl2.c (lang_decode_option): Ignore -traditional.
6901 * decl.c (init_decl_processing): flag_writable_strings inhibits
6904 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
6906 * lang-options.h (lang_options): Add fconst-strings to the list
6908 * decl2.c (lang_f_options, lang_decode_option): Likewise.
6910 1998-08-24 Nathan Sidwell <nathan@acm.org>
6912 * lex.c (real_yylex): Don't warn about long long constants if
6913 we're allowing long long.
6915 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
6917 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
6918 accessing bindings directly.
6920 * search.c (my_tree_cons): Reimplement.
6922 * lang-specs.h: Remove __HONOR_STD.
6923 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
6925 1998-08-23 Mark Mitchell <mark@markmitchell.com>
6927 * decl.c (grokdeclarator): Complain about in-class initialization
6928 of aggregates and/or references.
6929 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
6930 TEMPLATE_TYPE_PARMs.
6932 * decl2.c (grok_array_decl): Add comment.
6933 (mark_used): Don't instantiate an explicit instantiation.
6934 * friend.c (make_friend_class): Remove bogus comment. Fix check
6935 for partial specializations.
6936 * pt.c (check_explicit_specialization): Don't
6937 SET_DECL_EXPLICIT_INSTANTIATION here.
6938 (mark_decl_instantiated): Or here.
6939 (do_decl_instantiation): Do it here, instead. Add checks for
6940 duplicate explicit instantiations, etc. Tidy.
6941 (do_type_instantiation): Likewise.
6942 (instantiate_decl): Improve comments. Complain about explicit
6943 instantiations where no definition is available.
6945 * cp-tree.h (ansi_null_node): Remove.
6946 * call.c (build_over_call): Warn about converting NULL to an
6948 * cvt.c (build_expr_type_conversion): Likewise. Use
6949 null_ptr_cst_p instead of expanding it inline.
6950 * decl.c (ansi_null_node): Remove.
6951 (init_decl_processing): Make null_node always have integral type.
6952 * except.c (build_throw): Warn about converting NULL to an
6954 * lex.c (init_parse): Remove handling of ansi_null_node.
6955 * pt.c (type_unification_real): Don't convert NULL to void* type.
6956 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
6957 (convert_for_assignment): Warn about converting NULL to an
6959 (convert_for_initialization): Likewise.
6961 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
6963 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
6964 * pt.c (coerce_template_parms): Use no_linkage_check.
6965 * decl.c (grokvardecl): Likewise.
6966 (grokfndecl): Likewise. Members of anonymous types have no linkage.
6968 * method.c (process_overload_item): Remove useless code.
6970 1998-08-20 Per Bothner <bothner@cygnus.com>
6972 Handle new'ing of Java classes.
6973 * init.c (build_class_classref): New function.
6974 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
6975 constructor does not return this; don't need to exception-protect.
6977 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
6978 * decl2.c (acceptable_java_type): Handle template-derived types.
6980 1998-08-20 Per Bothner <bothner@cygnus.com>
6982 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
6984 1998-08-20 Mark Mitchell <mark@markmitchell.com>
6986 * decl.c (duplicate_decls): Always merge the old and new patterns
6987 for templates, regardless of whether or not the new one has
6988 DECL_INITIAL. Don't throw away specializations. Merge
6990 * pt.c (tsubst_decl): Use the right pattern when calculating the
6991 complete args for a new template instance.
6992 (do_decl_instantiation): Fix typo in comment.
6993 (regenerate_decl_from_template): Deal with tricky friend template
6995 (instantiate_decl): Likewise.
6997 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
6999 * init.c (build_builtin_delete_call): Add missing assemble_external
7002 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
7004 * parse.y (notype_unqualified_id): Also accept ~A<int>.
7006 1998-08-19 Mark Mitchell <mark@markmitchell.com>
7008 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
7010 * except.c (build_throw): Warn when NULL is thrown, even with
7011 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
7014 * cp-tree.h (ansi_null_node): New variable.
7015 * decl.c (ansi_null_node): New variable.
7016 (init_decl_processing): Initialize its type.
7017 * lex.c (init_parse): Initialize its value. Use ansi_null_node
7018 for null_node in non-ANSI mode.
7019 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
7020 place of null_node to avoid spurious errors.
7022 1998-08-17 Mark Mitchell <mark@markmitchell.com>
7024 * cp-tree.h (enter_scope_of): New function.
7025 * parse.y (complex_direct_notype_declarator): Use it.
7026 * semantics.c (enter_scope_of): New function.
7028 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
7030 * decl.c (grokparms): No, here.
7032 * decl.c (grokdeclarator): Catch parm with pointer to array of
7033 unknown bound here...
7034 * method.c (process_overload_item): ...not here.
7036 * gxxint.texi: Remove obsolete documentation of overloading code.
7038 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
7039 * class.c (finish_struct_bits): Likewise.
7041 * tree.c (lvalue_type): Fix for arrays.
7042 * typeck.c (build_unary_op): Use lvalue_type.
7043 * call.c (add_function_candidate): Likewise.
7044 * cvt.c (convert_to_reference): Likewise.
7046 * decl2.c (lang_decode_option): Ignore -traditional.
7048 * init.c (build_offset_ref): Don't mess with error_mark_node.
7049 * lex.c (do_scoped_id): Use cp_error.
7051 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
7053 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
7055 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
7057 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
7059 * cp-tree.h (set_identifier_local_value): Provide prototype.
7061 * decl2.c (do_namespace_alias): Remove unused variables `binding'
7064 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
7066 * Makefile.in: Rename BBISON to BISON so that it can be properly
7067 inherited from the parent makefile.
7069 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7071 * lang-options.h: Add -finit-priority.
7072 * decl2.c: Likewise. Check flag_init_priority instead of
7075 * decl2.c (setup_initp): New fn.
7076 (start_objects, finish_objects, do_ctors): Handle init_priority.
7077 (do_dtors, finish_file): Likewise.
7079 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
7081 * pt.c (tsubst_copy): Hush warning.
7083 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
7085 1998-08-12 Mark Mitchell <mark@markmitchell.com>
7087 * pt.c (print_template_context): Don't abort when instantiating a
7090 * decl.c (grokdeclarator): Issue errors on namespace qualified
7091 declarators in parameter lists or in class scope.
7093 1998-08-09 Mark Mitchell <mark@markmitchell.com>
7095 * pt.c (check_explicit_specialization): Don't abort on bogus
7096 explicit instantiations.
7098 1998-08-07 Mark Mitchell <mark@markmitchell.com>
7100 * typeck.c (require_complete_type): Use complete_type_or_else.
7101 (complete_type_or_else): Always return NULL_TREE on failure, as
7104 * pt.c (tsubst_aggr_type): Prototype.
7105 (tsubst_decl): New function, split out from tsubst. Set
7106 input_filename and lineno as appropriate.
7107 (pop_tinst_level): Restore the file and line number saved in
7109 (instantiate_class_template): Set input_filename and lineno as
7111 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
7112 context for a TYPENAME_TYPE is complete.
7114 * decl2.c (grokbitfield): Issue errors on bitfields declared with
7116 (do_dtors): As in do_ctors, pretend to be a member of the same
7117 class as a static data member while generating a call to its
7120 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
7121 conversions, even in complex virtual base class hierarchies.
7123 1998-08-06 Mark Mitchell <mark@markmitchell.com>
7125 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
7126 (TYPE_TEMPLATE_INFO): Likewise.
7127 (SET_TYPE_TEMPLATE_INFO): Likewise.
7128 (ENUM_TI_TEMPLATE): Likewise.
7129 (ENUM_TI_ARGS): Likewise.
7130 (lookup_nested_type_by_name): Remove.
7131 * decl.c (maybe_process_template_type_declaration): Handle enums.
7132 (start_enum): Don't check for primary-template enum declarations
7134 (finish_enum): Clean up, document. Make sure template enum
7135 constants get the correct type.
7136 (build_enumerator): Copy initializers for template enumerations,
7138 (grok_enum_decls): Document.
7139 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
7140 better. Build LOOKUP_EXPRs for local variables, even if they are
7142 * pt.c (tsubst_enum): Remove field_chain parameter.
7143 (template_class_depth): Include the depth of surrounding function
7145 (push_template_decl): Check for primary-template enum declarations
7146 here. Deal with enumeration templates.
7147 (lookup_template_class): Likewise.
7148 (for_each_template_parm): Likewise.
7149 (instantiate_class_template): Don't call tsubst_enum directly,
7150 call tsubst instead, to instantiate enums. Deal with all
7151 field_chain issues here, not in tsubst_enum.
7152 (lookup_nested_type_by_name): Remove.
7153 (tsubst_aggr_type): Revise handling of enumeration types.
7155 (tsubst_copy): Likewise.
7156 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
7158 1998-08-04 Mark Mitchell <mark@markmitchell.com>
7160 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
7161 uses template parameters.
7162 * method.c (build_template_parm_names): Use the full set of
7163 template arguments for tsubst'ing.
7164 (build_overload_identifier): Pass the full set of template
7165 arguments to build_template_parm_names, not just the
7167 * pt.c (TMPL_ARGS_DEPTH): Define using
7168 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
7169 (NUM_TMPL_ARGS): New macro.
7170 (add_outermost_template_args): Deal with the case where the outer
7171 args will be completely discarded.
7172 (coerce_template_parms): Use the full set of template arguments
7173 for tsubst'ing. Simplify. Add some asserts. Improve
7175 (lookup_template_class): Pass the full set of template arguments
7176 to coerce_template_parms.
7177 (tsubst): Add assertion.
7178 (do_type_instantiation): Don't instantiate member template
7181 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
7182 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
7184 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
7186 * method.c (set_mangled_name_for_decl): Change return type to void.
7188 * decl.c (lookup_name_real): A namespace-level decl takes priority
7189 over implicit typename. Avoid doing the same lookup twice.
7191 * search.c (dependent_base_p): New fn.
7192 (dfs_pushdecls, dfs_compress_decls): Use it.
7194 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
7195 virtual functions if the type doesn't have any.
7197 1998-08-03 Mark Mitchell <mark@markmitchell.com>
7199 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
7200 uses template parameters.
7202 1998-08-02 Mark Mitchell <mark@markmitchell.com>
7204 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
7205 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
7206 * lex.c (do_identifier): Don't use a second argument, or a type,
7207 when building LOOKUP_EXPRs.
7208 (do_identifier): Likewise.
7209 (do_scoped_id): Likewise.
7210 * method.c (hack_identifier): Improve error message.
7211 * pt.c (lookup_template_function): Don't needlessly call
7212 copy_to_permanent or build_min.
7213 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
7215 (do_decl_instantiation): Improve error message.
7216 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
7217 (build_min): Copy the type to the permanent obstack, too.
7219 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
7221 * init.c (init_init_processing): Remove BI* handling.
7222 (build_builtin_call): Remove.
7223 (build_builtin_delete_call): New fn.
7224 (build_delete): Use it.
7226 1998-07-31 Mark Mitchell <mark@markmitchell.com>
7228 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
7229 (maybe_check_template_type): New function.
7230 * decl.c (maybe_process_template_type_declaration): New function,
7231 split out from pushtag Call maybe_check_template_type.
7232 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
7233 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7234 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
7235 * pt.c (template_class_depth_real): Generalization of ...
7236 (template_class_depth): Use it.
7237 (register_specialization): Use duplicate_decls for duplicate
7238 declarations of specializations.
7239 (maybe_check_template_type): New function.
7240 (push_template_decl_real): Fix comment.
7241 (convert_nontype_argument): Likewise.
7242 (lookup_template_class): Likewise. Avoid an infinite loop on
7244 (tsubst_friend_function): Fix comment.
7245 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
7247 * semantics.c (begin_function_definition): Use
7248 reset_specialization to note that template headers don't apply
7249 directly to declarations after the opening curly for a function.
7251 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
7253 * decl.c (push_overloaded_decl): Use current_namespace instead of
7254 DECL_CONTEXT (decl) to determine where we go.
7256 * decl.c (lookup_name_real): Fix typo.
7258 1998-07-28 Mark Mitchell <mark@markmitchell.com>
7260 * friend.c (is_friend): Be lenient with member functions to deal
7261 with nested friends.
7263 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
7265 * class.c (finish_struct_1): Convert integer_zero_node to
7266 ssizetype before passing it to set_rtti_entry.
7267 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
7268 of any size to a pointer.
7270 1998-07-27 Mark Mitchell <mark@markmitchell.com>
7272 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
7273 (build_template_decl_overload): Remove.
7274 (set_mangled_name_for_decl): New function.
7275 (innermost_args): Remove is_spec parameter.
7276 (most_specialized, most_specialized_class): Remove declarations.
7277 (lookup_template_class): Add entering_scope parameter.
7278 (maybe_process_partial_specialization): New function.
7279 (finish_template_decl): Likewise.
7280 (finish_template_type): Likewise.
7281 * class.c (finish_struct): Clean up processing of member template
7283 * decl.c (pushtag): Fix formatting.
7284 (lookup_tag): Improve handling of pseudo-global levels.
7285 (make_typename_type): Adjust call to lookup_template_class.
7286 (shadow_tag): Use maybe_process_partial_specialization.
7287 (xref_tag): Improve handling of member friends.
7288 (start_function): Call push_nested_class before
7289 push_template_decl. Don't call push_template_decl for
7291 * decl2.c (grok_x_components): Don't call xref_tag for
7292 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
7293 (grokclassfn): Use set_mangled_name_for_decl.
7294 (arg_assoc_class): Adjust call to innermost_args.
7295 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
7296 * error.c (dump_function_name): Improve printing of template
7298 * friend.c (is_friend): Don't compare types of decls to determine
7299 friendship, unless flag_guiding_decls.
7300 (make_friend_class): Partial specializations cannot be friends.
7301 (do_friend): Use set_mangled_name_for_decl. Call
7302 push_template_decl_real instead of push_template_decl.
7303 * method.c (build_decl_overload_real): Remove prototype. Give it
7305 (build_overload_identififer): Adjust call to innermost_args.
7306 (build_template_decl_overload): Remove.
7307 (set_mangled_name_for_decl): New function.
7308 * parse.y (.finish_template_type): New non-terminal.
7309 (template_def): Use finish_template_decl. Use template_extdef
7311 (template_extdef, template_datadef): New non-terminals, containing
7312 only those rules for things which can be templates.
7314 (template_type, self_template_type): Use .finish_template_type.
7315 (named_class_head): Use maybe_process_partial_specialization.
7316 * pt.c (mangle_class_name_for_template): Remove context parameter.
7317 (get_class_bindings): Remove outer_args parameter.
7318 (complete_template_args): Remove.
7319 (add_outermost_template_args): New function.
7320 (register_specialization): Return the specialization.
7321 (unregister_specialization): New function.
7322 (tsubst_template_parms): Likewise.
7323 (most_specialized, most_specialized_class): Prototype here as
7325 (original_template): Rename to most_general_template.
7326 (tsubst_template_parms): New function.
7327 (set_mangled_name_for_template_decl): Likewise.
7328 (TMPL_ARGS_DEPTH): New macro.
7329 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
7330 (TMPL_ARGS_LEVEL): New macro.
7331 (SET_TMPL_ARGS_LEVEL): Likewise.
7332 (TMPL_ARG): Likewise.
7333 (SET_TMPL_ARG): Likewise.
7334 (TMPL_ARGS_DEPTH): Likewise.
7335 (finish_member_template_decl): Use finish_template_decl.
7336 (maybe_process_partial_specialization): New function, split out
7338 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
7339 (maybe_begin_member_template_processing): Use new macros.
7340 (is_member_template): Likewise.
7341 (is_member_template_class): Likewise.
7342 (add_to_template_args): Likewise. Deal with multiple levels of
7344 (maybe_process_partial_specialization): New function.
7345 (retrieve_specialization): Add consistency check.
7346 (determine_specialization): Return full argument list.
7347 (check_explicit_specialization): Tweak friend handling. Use full
7348 argument lists. Simplify.
7349 (current_template_args): Use new macros.
7350 (push_template_decl_real): Change ill-named mainargs to specargs.
7351 Check that a partial specialization actually specializes at least
7352 one parameter. Improve friend handling. Modify for full
7354 (classtype_mangled_name): Don't mangle the names of
7356 (lookup_template_class): Add entering_scope parameter. Use it to
7357 avoid finding a template type when an instantiation is required.
7358 Simplify. Use full template arguments.
7359 (tsubst_friend_function): Use unregister_specialization. Use new
7360 macros. Use full template arguments.
7361 (tsubst_friend_class): Substitute, using tsubst_template_parms,
7362 into the template parameters before passing them to
7363 redeclare_class_template.
7364 (instantiate_class_template): Simplify. Use full template
7365 arguments. Adjust calls to get_class_bindings. Use
7366 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
7367 (innermost_args): Use new macros.
7368 (tsubst_aggr_type): New function, split out from tsubst.
7369 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
7370 conventions for lookup_template_class. Refine handling of partial
7371 instantiations. Remove calls to complete_template_args.
7372 Simplify. Add consistency checks. Use set_mangled_name_for_decl
7373 and set_mangled_name_for_template_decl.
7374 (tsubst_copy): Use tsubst_aggr_type.
7375 (instantiate_template): Use full template arguments.
7376 (more_specialized): Improve formatting.
7377 (more_specialized_class): Adjust calls to get_class_bindings.
7378 (get_bindings_real): Don't call complete_template_args.
7379 (most_specialized): Don't overwrite input; create a new list.
7380 (most_specialized_class): Use most_general_template.
7381 (regenerate_decl_from_template): Use unregister_specialization.
7382 Use full template arguments.
7383 (instantiate_decl): Use full template arguments.
7384 (set_mangled_name_for_template_decl): New function.
7385 * semantics.c (begin_class_definition): Use
7386 maybe_process_partial_specialization.
7387 (finish_member_class_template): New function.
7388 (finish_template_decl): Likewise.
7389 (finish_template_type): Likewise.
7390 (typeck.c): Don't crash after issuing a compiler_error.
7391 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
7393 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
7395 * typeck2.c (build_functional_cast): Handle default-initialization.
7397 * call.c (build_over_call): Pass 1 to popclass.
7399 * parse.y (direct_notype_declarator): Add precedence declaration
7400 to notype_unqualified_id case.
7401 * Makefile.in (EXPECT): Adjust.
7403 * tree.c (ovl_member): Fix for single function in OVL.
7405 1998-07-27 Dave Brolley <brolley@cygnus.com>
7407 * c-lex.c (yylex): Fix boundary conditions in character literal and
7408 string literal loops.
7410 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
7412 * decl.c (lookup_name_real): OK, do return the from_obj value
7413 unless got_object depends on template parms.
7415 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
7417 * pt.c (coerce_template_parms): Also complain about local enums.
7419 * cp-tree.h: Add prototype for set_identifier_local_value.
7420 * decl.c (set_identifier_local_value_with_scope): Make static,
7422 * search.c (covariant_return_p): Likewise.
7423 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
7425 * call.c (build_method_call): Only pull out the type of a destructor
7426 if it's a template type parm.
7427 * decl.c (lookup_name_real): Never return the from_obj value.
7429 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7431 * except.c (process_start_catch_block_old): Call start_decl_1 for
7433 * decl.c (start_decl_1): Avoid duplicate error.
7435 * init.c (expand_default_init): Only perform the initialization if
7436 it will do something.
7438 1998-07-23 H.J. Lu (hjl@gnu.org)
7440 * parse.y (base_class): Check for invalid base class.
7442 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
7444 * decl2.c (import_export_template): Fold in...
7445 (import_export_class): ...to here. Handle dllimport/export.
7447 * class.c (build_vtable): Pass at_eof to import_export_vtable.
7448 (prepare_fresh_vtable): Likewise.
7449 * decl2.c (import_export_class): Split out...
7450 (finish_prevtable_vardecl): From here.
7451 * class.c (finish_struct_1): Call import_export_class if at_eof.
7453 * decl.c (start_function): #if 0 mysterious code I wrote and have
7455 * rtti.c (get_tinfo_fn): If this is for a class type, set
7458 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
7460 * inc/exception: Change terminate and unexpected to ().
7462 * parse.y (named_class_head_sans_basetype_defn): A
7463 named_class_head_sans_basetype followed by '{' or ':' is a defn.
7465 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
7467 * tree.c (canonical_type_variant): New fn to handle arrays.
7468 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
7469 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
7470 * method.c (process_overload_item): Use build_overload_value for
7473 1998-07-20 Dave Brolley <brolley@cygnus.com>
7475 * lex.c (mbchar.h): #include it.
7476 (GET_ENVIRONMENT): New macro.
7477 (init_parse): Set character set based on LANG environment variable.
7478 (real_yylex): Handle multibyte characters in character literals.
7479 (real_yylex): Handle multibyte characters in string literals.
7481 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
7483 * lex.c (do_identifier): Look for class value even if we don't
7484 have a global value. Do implicit declaration if parsing is 2.
7485 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
7488 1998-07-19 Mark Mitchell <mark@markmitchell.com>
7490 * decl.c (pushtag): Revert previous change.
7491 * pt.c (lookup_template_class): Don't put out debugging
7492 information for types that use template parameters.
7494 * decl.c (pushtag): Don't put out debugging information for
7495 compiler-generated typedefs.
7497 * error.c (dump_type_real): Don't crash when presented with
7498 intQI_type_node or the like.
7500 * semantics.c (finish_translation_unit): Fix spelling error in
7503 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
7505 * decl.c (lookup_name_real): Pull out single function here.
7506 (select_decl): Not here.
7507 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
7509 * decl.c (qualify_lookup): Tweak again.
7511 * pt.c (lookup_template_class): Don't mess with the context of the
7513 * decl2.c (current_decl_namespace): Remove special handling for
7516 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
7517 a member template specialization.
7519 * tree.c (ovl_member): Use decls_match to compare functions.
7520 * decl.c (decls_match): Check the context of a function.
7522 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
7523 in Koenig lookup support rules.
7524 * semantics.c (finish_call_expr): Handle the new cases.
7526 * typeck.c (build_x_function_call): Handle overloaded methods.
7528 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
7530 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7532 * semantics.c (finish_object_call_expr): Revert previous change.
7533 * call.c (build_new_method_call): Likewise. Instead, convert
7534 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
7536 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7538 * decl.c (qualify_lookup): Handle templates.
7540 * decl2.c (do_using_directive): Don't pass ancestor.
7541 * decl.c (push_using_directive): Calculate ancestor.
7543 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
7544 * decl.c (pushdecl): Move type shadowing handling from here...
7545 (duplicate_decls): ...to here.
7546 * decl.c (set_identifier_local_value_with_scope): New fn.
7548 (set_identifier_local_value, lookup_type_current_level): New fns.
7549 * decl2.c (do_local_using_decl): Handle types and binding level
7552 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
7553 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
7554 (lookup_namespace_name): Likewise.
7555 * typeck.c (build_unary_op): Not here anymore.
7557 * decl2.c (do_class_using_decl): Make sure we get an identifier.
7558 * class.c (handle_using_decl): Ignore TYPE_DECLs.
7560 * decl.c (qualify_lookup): New fn.
7561 (lookup_name_real): Use it.
7563 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
7565 * decl2.c (add_using_namespace): When directly using a namespace
7566 that was indirect before, promote it.
7568 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
7569 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
7570 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
7571 * decl.c (select_decl): Replace two flag parameters by one.
7572 (unqualified_namespace_lookup): Likewise, pass flag.
7573 (lookup_flags): New function.
7574 (lookup_name_real): Compute flags, pass them.
7575 (lookup_namespace_name): Call with zero-flag.
7576 * decl2.c (ambiguous_decl): Add flag parameter, complain only
7578 (lookup_using_namespace, qualified_lookup_using_namespace):
7579 Add flag parameter, pass them through.
7580 * lex.c (do_scoped_id): Call with zero-flag.
7582 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
7584 * typeck.c (convert_for_assignment): Use comptypes.
7586 1998-07-16 Mark Mitchell <mark@markmitchell.com>
7588 * semantics.c (finish_object_call_expr): Move test for the
7589 function called being a TYPE_DECL to ...
7590 * call.c (build_new_method_call): Here.
7592 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7594 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
7595 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
7597 * lex.c (looking_for_typename): Don't initialize.
7599 * decl2.c (ambiguous_decl): Clarify error message.
7601 * decl.c (push_using_directive): Iterate over namespaces used
7604 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7606 * decl2.c (add_using_namespace): Iterate over namespaces used
7609 * decl.c (lookup_name_real): Accept namespace aliases as locals.
7610 (cat_namespace_levels): Ignore aliases.
7611 (duplicate_decls): Ignore duplicate aliases.
7612 * decl2.c (do_namespace_alias): Process block level namespace
7613 aliases. Store alias with pushdecl. Remove odr errors.
7614 * parse.y (namespace_alias): New non-terminal.
7617 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
7619 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
7620 Handle TEMPLATE_TYPE_PARM.
7621 (arg_assoc): Rewrite.
7623 * pt.c (complete_template_args): Don't look at the context unless
7626 * method.c (build_decl_overload_real): Fix namespace handling.
7628 * typeck.c (build_unary_op): Extract a lone function from an
7631 * call.c (build_scoped_method_call): Handle getting a namespace
7632 for basetype in a destructor call.
7633 (check_dtor_name): Handle enums.
7635 * parse.y (using_directive): New nonterminal.
7636 (extdef, simple_stmt): Use it.
7638 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7640 * decl2.c (add_function): Move error message ...
7641 (arg_assoc_namespace): ... from here.
7643 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7645 * parse.y (namespace_qualifier): Fix multiple level handling.
7646 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
7647 (arg_assoc): Don't skip the first argument of a function.
7649 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
7651 * search.c (my_tree_cons): Clean up.
7653 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
7655 * call.c (joust): Don't warn about "confusing" conversions to the
7658 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7660 * class.c (push_nested_class): Complain about namespaces.
7661 * decl.c (start_decl): Enter the object's namespace.
7662 (cp_finish_decl): Leave it.
7663 (grokdeclarator): Likewise.
7664 * decl2.c (check_decl_namespace): New function.
7665 (finish_file): Call it.
7666 * parse.y (complex_direct_notype_declarator): Set complexity
7667 of namespace-qualified ids to -1, enter the namespace.
7669 * method.c (build_template_decl_overload): Expect _DECL as first
7670 parameter. Put context temporarily into current_namespace.
7671 * pt.c (check_explicit_specialization): Change caller.
7674 * init.c (build_offset_ref): Call mark_used and
7675 convert_from_reference for namespace members.
7677 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
7679 * search.c (my_tree_cons): The bitfield is at index 2.
7681 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
7683 * lang-options.h: Format changed to work with new --help support
7686 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
7688 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
7689 Do Koenig lookup in CALL_EXPR.
7690 (arg_assoc): Handle error_mark.
7691 * lex.c (is_global): New function.
7692 (do_identifier): Expect arguments for Koenig lookup.
7693 * parse.y (primary): Add rules for calls of unqualified function calls.
7694 (do_id): Change call of do_identifier.
7695 * pt.c (finish_stmt_expr): Likewise.
7696 * semantics.c (finish_id_expr): Likewise.
7697 (finish_call_expr): Add integer parameter to indicate
7698 argument-dependent lookup.
7700 * decl.c (struct binding_level): New field using_directives.
7701 (push_using_decl): Not sorry anymore.
7702 (push_using_directive): New function.
7703 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
7704 (unqualified_namespace_lookup): New function, code from ...
7705 (lookup_name_real): ... here.
7706 * decl2.c (lookup_using_namespace): Pass using list instead of
7708 (validate_nonmember_using_decl): New function.
7709 (do_nonmember_using_decl): New function.
7710 (do_toplevel_using_decl): Use them.
7711 (do_local_using_decl): New function.
7712 (do_using_directive): Support block-level directives.
7713 * parse.y (simple_stmt): Support using declarations and
7715 (namespace_qualifier, namespace_using_decl): New non-terminals.
7717 * xref.c (classname): New function.
7718 (GNU_xref_hier): Change class and base parameters to tree.
7719 * decl.c (xref_baseypes): Change caller.
7720 * friend.c (make_friend_class): Likewise.
7722 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7724 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
7727 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
7728 template template parameter, record its use.
7729 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
7730 its template arguments if exists.
7732 * pt.c (coerce_template_template_parms): New function equivalent
7733 to coerce_template_parms when IS_TMPL_PARM is true.
7734 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
7735 all callers changed.
7737 (coerce_template_parms): Access ARGLIST properly when creating a
7738 new vector. Only accept implicit TYPE_DECL as valid argument for
7739 a template template parameter when it is a base class of
7740 current_class_type. Don't display error message when COMPLAIN is
7743 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
7745 * repo.c (get_base_filename): Use file_name_nondirectory.
7746 (open_repo_file): Likewise.
7747 * cp-tree.h (file_name_nondirectory): Add prototype.
7749 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
7751 * friend.c (do_friend): Pull the identifier out of declarator.
7752 Use cp_error and friends.
7753 * decl2.c (qualified_lookup_using_namespace): Fix call to
7755 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
7756 (grokvardecl): Use DECL_CLASS_SCOPE_P.
7757 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
7758 * class.c (warn_hidden): Fix for OVERLOAD.
7759 From grahams@rcp.co.uk:
7760 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
7761 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
7763 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
7765 * g++.1 (-traditional): Remove duplicated documentation.
7767 1998-07-11 Mark Mitchell <mark@markmitchell.com>
7769 * method.c (flush_repeats): Add nrepeats parameter.
7770 (issue_nrepeats): Likewise.
7771 (is_back_referenceable_type): New function. Don't back-reference
7772 TEMPLATE_TYPE_PARMs as well as simple types like integers.
7773 (build_mangled_name_for_type): Likewise.
7774 (build_mangled_name_for_type_with_Gcode): Likewise.
7776 (nrepeats): Likewise.
7777 (Nrepeats): Likewise.
7778 (start_squangling): Don't clear the variables removed above.
7779 (end_squangling): Likewise.
7780 (flush_repeats): Tidy. Use nrepeats parameter rather than
7782 (issue_nrepeats): Likewise, but with nrepeats global. Use
7783 is_backreferenceable_type.
7784 (build_overload_nested_name): Tidy. Add comment. Use
7785 build_mangled_name_for_type.
7786 (build_underscore_int): Comment.
7787 (build_overload_scope_ref): Use build_mangled_name_for_type.
7788 (build_overload_int): Likewise.
7789 (build_template_template_parm_names): Tidy.
7790 (build_template_parm_names): Use build_mangled_name_for_type.
7791 (build_overload_identifier): Add comments.
7792 (build_mangled_name_for_type_with_Gcode): Split out from
7794 (build_mangled_name_for_type): Use it.
7795 (build_mangled_name): Rework to use build_mangled_name_for_type
7796 and to not use global nrepeats/Nrepeats. Tidy.
7797 (process_modifiers): Tidy.
7798 (check_btype): Use is_backreferenceable_type. Add comment.
7799 Rename `node' to `type'.
7800 (process_overload_item): Set numeric_output_need_bar here.
7801 Use build_mangled_name_for_type. Tidy.
7802 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
7803 build_mangled_name_for_type.
7805 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
7808 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
7810 * cp-tree.h (warn_long_long): Define.
7811 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
7812 warning "ANSI C++ does not support `long long'".
7813 * decl2.c (warn_long_long): Define.
7814 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
7816 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
7818 * decl.c (xref_tag): Handle attributes between 'class' and name.
7819 * parse.y (aggr): Likewise.
7820 * semantics.c (finish_class_definition): Likewise.
7821 * Makefile.in (EXPECTED): Adjust.
7823 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
7824 * decl2.c: Define them.
7825 (lang_decode_option): Handle them.
7826 * lang-options.h: Add -foptional-diags.
7827 * class.c (finish_struct): Don't complain about multiple meanings of
7828 name if -fno-optional-diags.
7829 * decl.c (pushdecl_class_level): Likewise.
7830 * lex.c (real_yylex): Check warn_multichar.
7832 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
7834 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
7836 * tree.c (make_binfo): Fix length.
7838 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
7840 * decl2.c (lang_decode_option): Remove warn_template_debugging.
7841 * lang-options.h: Likewise.
7843 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7845 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
7846 (process_start_catch_block): Likewise for variables
7847 `false_label_rtx', `call_rtx' and `return_value_rtx'.
7849 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
7851 * tree.c (build_srcloc): Make sure we allocate this node on the
7854 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
7856 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
7857 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
7858 (lang_specific_driver): Only add -lm automatically if need_math is
7861 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
7863 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
7865 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7867 * Makefile.in (EXPR_H): New dependency variable.
7868 (decl2.o): Depend on $(EXPR_H).
7869 (typeck.o): Likewise.
7873 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
7875 * decl.c (start_enum): Put local enums on permanent_obstack.
7877 1998-06-25 Mark Mitchell <mark@markmitchell.com>
7879 * cp-tree.h (c_get_alias_set): Declare.
7880 * decl.c (init_decl_processing): Set lang_get_alias_set.
7882 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
7884 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
7885 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
7886 flag for all function decls which are in the exception table.
7887 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
7888 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
7889 code is emitted for any referenced rtti function.
7891 1998-06-25 Dave Brolley <brolley@cygnus.com>
7893 * lang-specs.h: Use new | syntax to eliminate
7894 string concatenation.
7896 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
7898 * cp-tree.h (CP_DECL_CONTEXT): New macro.
7899 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
7900 * method.c (build_overload_nested_name): Likewise.
7901 * sig.c (build_signature_pointer_or_reference_type): Don't set
7904 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7906 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
7907 * cp-tree.h (FROB_CONTEXT): New macro.
7908 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
7909 * decl.c (namespace_binding): Replace NULL_TREE with
7911 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
7912 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
7914 * decl.c (pushtag): Use FROB_CONTEXT.
7915 (pushdecl, make_typename_type, define_function, grokdeclarator):
7917 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
7918 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
7920 * decl2.c (decl_namespace): Return global_namespace if no context.
7921 * method.c (build_overload_nested_name): Expect null as context.
7922 * pt.c (mangle_class_name_for_template): Do nothing for null
7924 (lookup_template_class): Allow for null id_context.
7926 1998-06-25 Richard Henderson <rth@cygnus.com>
7928 * method.c (emit_thunk): Set current_function_is_thunk for the
7929 ASM_OUTPUT_MI_THUNK case as well.
7931 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7933 * exception.cc (__cplus_type_matcher): Get a match_info pointer
7934 instead of an exception table entry as a parameter.
7936 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
7938 * parse.y (function_try_block): Don't call start_catch_handler.
7939 * except.c (call_eh_info): Remove coerced field from declaration.
7940 (build_eh_type_type_ref): New function to create an address of a
7941 rtti function for the new style exception tables.
7942 (expand_start_catch_block): Split function, this contains the
7944 (process_start_catch_block_old): New function to perform the rest
7945 of expand_start_catch_block under old style exceptions.
7946 (process_start_catch_block_old): New function to perform the rest
7947 of expand_start_catch_block under new style exceptions.
7948 (expand_end_catch_block): Only pop the false label off the stack under
7949 the old style of exceptions.
7950 * semantics.c (finish_try_block): Don't call start_catch_handler.
7951 * exception.cc (struct cp_eh_info): Add original_value field.
7952 (__cplus_type_matcher): Perform type matching on the original exception
7953 value, and if we have a match, set the current value.
7954 (__cp_push_exception): Set the original exception value.
7956 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
7958 * call.c (joust): Fix confusing conversion warning.
7960 * call.c (build_op_delete_call): Add placement parm. Check
7961 LOOKUP_SPECULATIVELY.
7962 * cp-tree.h, decl2.c, init.c: Adjust.
7963 * decl.c (finish_function): Use it.
7965 * pt.c (tsubst): Diagnose creating void fields or variables.
7967 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7969 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
7971 * cp-tree.h (check_dtor_name): Add prototype.
7973 * init.c (expand_member_init): Remove unused variables
7974 `ptr_type_node', `parm' and `rval'.
7976 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
7978 (lang_print_xnode): Likewise.
7980 * typeck2.c (enum_name_string): Cast argument to sprintf to long
7981 and use %ld specifier.
7983 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
7984 specifier in call to fprintf.
7985 (GNU_xref_member): Cast argument to sprintf to int.
7987 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
7989 * typeck2.c (pop_init_level): Warn about implicit zero initialization
7992 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7994 * cp-tree.h: Prototype function `check_java_method'.
7996 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
7998 * class.c (finish_struct): Make conflicting use of id a pedwarn.
7999 * decl.c (pushdecl_class_level): Likewise.
8001 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8003 * pt.c (convert_nontype_argument): Issue an error when presented
8004 with an integer (real) constant that cannot be simplified to an
8007 * cp-tree.h (c_get_alias_set): Remove declaration added in
8008 1998-06-13 change that should never have been checked in.
8010 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8012 * typeck.c (build_binary_op_nodefault): Change % in format strings
8015 * decl.c (grokvardecl): Don't build_static_name for decls that
8016 aren't at namespace scope.
8018 * init.c (perform_member_init): Catch default-initialization of
8021 1998-06-17 Mark Mitchell <mark@markmitchell.com>
8023 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
8025 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
8027 * method.c (hack_identifier): Complain about getting a namespace
8029 * typeck.c (decay_conversion): Remove check for namespaces.
8030 * typeck2.c (incomplete_type_error): Likewise.
8031 * parse.y (template_arg): Add PTYPENAME expansion.
8033 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
8035 * decl.c (grokvardecl): Don't build external assembler names for
8036 TYPENAMEs in other namespaces as there is no declarator.
8037 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
8038 info from DECL_CONTEXT if it is NULL.
8040 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
8042 * call.c (check_dtor_name): Split out.
8043 (build_scoped_method_call): Use it.
8044 (build_method_call): Use it.
8045 * init.c (build_offset_ref): Use it.
8047 * typeck.c (build_static_cast): Fix handling of pointers to members.
8049 * decl.c (finish_function): Just return nothing from a constructor.
8050 * typeck.c (c_expand_return): Complain about returning a void
8051 expression from a destructor.
8053 1998-06-13 Mark Mitchell <mark@markmitchell.com>
8055 * class.c (alter_access): Accept a BINFO explaining how to get
8056 from the entity whose accessed is being altered to the type doing
8058 (handle_using_decl): New function containing code split out from ...
8059 (finish_struct_1): Here.
8061 * cp-tree.h (complete_type_or_else): Declare.
8062 * init.c (build_new_1, build_delete): Use it.
8063 * typeck.c (require_complete_type): Use complete_type, rather than
8064 expanding it inline.
8065 (complete_type_or_else): New function.
8066 (build_component_ref): Use it.
8067 (pointer_int_sum): Make sure the type pointed to is complete.
8068 (pointer_diff): Likewise.
8070 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
8073 * search.c (get_matching_virtual): Note that member templates
8074 cannot override virtual functions.
8076 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
8078 * pt.c (check_explicit_specialization): If DECLARATOR turned into
8079 an error_mark_node from lookup_template_function, return the same.
8080 (determine_specialization): Also make sure TEMPLATE_ID isn't an
8081 error_mark_node, before we try to read its operands.
8082 * decl.c (grokdeclarator): If we got an error_mark_node from
8083 check_explicit_specialization, just return it right back.
8085 1998-06-12 Mark Mitchell <mark@markmitchell.com>
8087 * class.c (instantiate_type): Don't treat template-ids that don't
8088 specify any template arguments as equivalent to ordinary
8089 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
8090 pointer-to-members for member templates. Tidy slightly.
8091 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
8092 * init.c (build_offset_ref): Handle template-ids like ordinary
8093 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
8094 offset part of the OFFSET_REF.
8095 * typeck.c (build_unary_op): Change check for unknown types to
8096 look for OFFSET_REFs, not SCOPE_REFs.
8098 1998-06-11 Mark Mitchell <mark@markmitchell.com>
8100 * pt.c (is_member_template_class): New function.
8101 (push_template_decl_real): Use it.
8103 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
8105 * friend.c (do_friend): Add support for nested classes using
8106 member functions of the enclosing class as friends.
8108 1998-06-10 Mark Mitchell <mark@markmitchell.com>
8110 * call.c (convert_default_arg): Make global, not static.
8111 (convert_arg_for_ellipsis): Split out from ...
8112 (build_over_call): Here.
8113 * cp-tree.h (convert_default_arg); Declare.
8114 (convert_arg_to_ellipsis): Likewise.
8115 (do_member_init): Remove.
8116 * init.c (do_member_init): Remove; this code is dead.
8117 (expand_member_init): Remove much of this code; it is dead.
8118 * typeck.c (convert_arguments): Use convert_default_arg and
8119 convert_arg_for_ellipsis, rather than duplicating here.
8121 * call.c (convert_like): Don't fail silently if
8122 build_user_type_conversion fails. Always return error_mark_node
8125 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8127 * search.c (covariant_return_p): Complain about ambiguous base.
8129 * typeck.c (build_component_ref): Diagnose ref to nested type.
8131 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8133 * decl.c (grokparms): Check that INIT isn't an error_mark_node
8134 before giving error about invalid type for default arg.
8136 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8138 * call.c (build_method_call): Fix thinko.
8140 1998-06-10 Dave Brolley <brolley@cygnus.com>
8142 * decl2.c (lang_decode_option): New argc/argv interface.
8143 * cp-tree.h (lang_decode_option): New argc/argv interface.
8144 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
8145 specified for cpplib-enabled compilers.
8146 * lex.c (lang_init): Don't check_newline for cpplib.
8147 (init_parse): Don't initialize cpplib here.
8149 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
8151 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
8152 piece before checking DECL_MUTABLE_P.
8154 1998-06-10 John Carr <jfc@mit.edu>
8156 * tree.c (debug_binfo): Make printf format match arguments.
8158 * error.c (OB_PUTI): Make printf format match arguments.
8160 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
8162 * init.c (perform_member_init): Handle default-initialization.
8164 * except.c (build_throw): Handle throwing NULL.
8166 * typeck.c (build_x_function_call): Use resolve_offset_ref.
8168 * search.c (compute_access): Only strip an anonymous union
8171 * call.c (add_builtin_candidates): Tweak.
8173 * cvt.c (build_expr_type_conversion): Restore code for conversion
8175 * decl2.c (delete_sanity): Use it. Clean up.
8177 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
8179 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
8181 * typeck.c (c_expand_return): Don't warn about void expressions on
8182 return statements in functions returning void.
8184 1998-06-09 Mark Mitchell <mark@markmitchell.com>
8186 * pt.c (fn_type_unification): Revise documentation. Tidy.
8187 (type_unification): Likewise.
8189 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
8191 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
8193 * parse.y (function_try_block): Rename expand_start_catch, and delete
8195 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
8198 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
8200 * search.c (lookup_member): New fn.
8201 * class.c (finish_struct_1): Use it.
8202 * decl.c (lookup_name_real): Use it.
8204 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8206 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
8208 * cp-tree.h: Add prototype for `maybe_print_template_context' and
8209 `maybe_make_one_only'.
8211 * decl.c (auto_function): Remove unused variable `decl'.
8213 * decl2.c: Include dwarf2out.h and dwarfout.h.
8215 * lex.c: Remove redundant declarations of `set_float_handler' and
8218 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
8220 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
8221 time flag. Call __cp_eh_info instead of __cp_exception_info.
8222 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
8223 (__cp_exception_info): Return offset into cp_eh_info structure to
8224 match what use to be the start of this structure.
8225 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
8226 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
8228 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
8229 __cp_eh_info instead of __cp_exception_info.
8231 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
8233 * decl.c (cp_finish_decl): Disable inlining of extern inlines
8234 with static variables.
8236 1998-06-08 Mark Mitchell <mark@markmitchell.com>
8238 * init.c (build_offset_ref): Correct previous change to use build,
8241 1998-06-07 Mark Mitchell <mark@markmitchell.com>
8243 * class.c (instantiate_type): Handle pointer-to-members where the
8244 member is a template.
8245 * init.c (build_offset_ref): Likewise.
8246 * typeck.c (build_unary_op): Likewise.
8248 1998-06-07 Richard Henderson <rth@cygnus.com>
8250 * lex.c (lang_init_options): New function.
8251 (lang_init): Remove flag_exceptions == 2 hack.
8253 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8255 * search.c (envelope_add_decl): Tweak for implicit typename.
8257 * call.c (joust): Also warn about confusing conversion op/constructor
8258 overload resolution.
8260 * spew.c (yylex): Also return the TYPE_DECL if got_object.
8261 Don't clear got_object after '~'.
8262 * call.c (build_scoped_method_call): Tweak destructor handling.
8263 (build_method_call): Likewise.
8264 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
8265 TYPE_MAIN_VARIANT for destructors.
8266 * semantics.c (finish_object_call_expr): Complain about calling a
8269 1998-06-05 Per Bothner <bothner@cygnus.com>
8271 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
8272 Define - update needed by gcc.c change.
8274 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
8276 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
8278 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8280 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
8281 * decl.c (lookup_name_real): Add namespaces_only parameter.
8282 If set, return only NAMESPACE_DECLs.
8283 (select_decl): Likewise.
8284 (identifier_type_value): Give additional parameter.
8285 (lookup_name_nonclass): Likewise.
8286 (lookup_name): Likewise.
8287 (find_binding): Skip namespace aliases.
8288 (binding_for_name): Likewise.
8289 (push_namespace): Check for namespace aliases.
8290 (lookup_name_namespace_only): New function.
8291 (begin_only_namespace_names, end_only_namespace_names): New functions.
8292 * decl2.c (set_decl_namespace): Skip namespace aliases.
8293 (do_using_directive): Likewise.
8294 (do_namespace_alias): Produce namespace aliases, fix alias
8296 * error.c (dump_decl): Support SCOPE_REF.
8297 * parse.y (extdef): Wrap lookup with namespace_only for namespace
8298 aliases and using declarations.
8300 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
8302 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
8304 * error.c (dump_expr): Clean up NEW_EXPR case.
8306 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8308 Suggested by Brendan Kehoe
8309 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
8310 treat it as using ::decl.
8312 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
8314 * tree.c (mapcar): Support NEW_EXPR.
8316 * error.c (dump_expr): Support NEW_EXPR.
8318 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
8320 * method.c (make_thunk): Use overload machinery to make name.
8321 * search.c (covariant_return_p): New fn.
8322 (get_matching_virtual): Use it.
8324 * init.c (build_new_1): Fix check for void.
8326 1998-06-01 Per Bothner <bothner@cygnus.com>
8328 * cp-tree.h (TYPE_FOR_JAVA): New macro.
8329 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
8330 java_int_type_node, java_long_type_node, java_float_type_node,
8331 java_double_type_node, java_char_type_node, java_boolean_type_node):
8332 New "primitive" types, with predefined names __java_byte etc.
8333 (record_builtin_java_type): New function.
8334 (init_decl_processing): Make Java types with record_builtin_java_type.
8335 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
8336 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
8337 (grokfndecl): Call check_java_method for Java classes.
8338 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
8339 (process_overload_item): Match types against specific
8340 java_XX_type_node types, rather than using is_java_type.
8341 * class.c (finish_struct_1): Don't add default copy constructor
8342 or operator= if TYPE_FOR_JAVA.
8343 (pop_lang_conext): Restore strict_prototyp proper if Java.
8344 * decl2.c (acceptable_java_type, check_java_method): New functions.
8345 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
8346 (tsubst): Move common statement after if statement.
8347 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
8349 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
8351 * pt.c (for_each_template_parm): Use first_rtl_op.
8353 * tree.c (build_cplus_array_type_1): Also check index_type for
8356 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
8358 * pt.c (tsubst): Always copy BINFO_BASETYPES.
8360 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
8362 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
8365 1998-05-29 Mark Mitchell <mark@markmitchell.com>
8367 * decl.c (grokdeclarator): Don't complain about in-class
8368 initialization of static consts if we don't really know the type
8371 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
8373 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
8374 * method.c (build_destructor_name): New fn.
8375 * decl2.c (maybe_retrofit_in_chrg): Split out...
8376 (grokclassfn): From here. Reorganize.
8377 * decl.c (grok_ctor_properties): Make sure ctors for types with
8378 vbases have the in_chrg parm.
8379 * pt.c (instantiate_class_template): Update
8380 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
8382 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
8384 1998-05-28 Mark Mitchell <mark@markmitchell.com>
8386 * pt.c (instantiate_decl): Make test for whether or not static
8387 variables should be instantiated early match its comment.
8389 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
8391 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
8393 (start_function): Call check_default_args.
8394 * decl2.c (grokfield): Don't call check_default_args.
8395 (check_default_args): Use cp_error_at.
8396 * lex.c (do_pending_defargs): Call check_default_args.
8398 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
8400 * call.c (build_method_call): Make sure get_type_value returns
8401 something before we try to use its TYPE_MAIN_VARIANT.
8402 (build_scoped_method_call): Likewise.
8404 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
8406 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
8407 initialize an array.
8409 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
8412 * friend.c (do_friend): Clarify template warning.
8414 1998-05-27 Mark Mitchell <mark@markmitchell.com>
8416 * decl.c (shadow_label): Don't treat decls as identifiers.
8417 (maybe_push_to_top_level): Clear shadowed_labels.
8419 * pt.c (instantiate_decl): Reset lineno and filename after calling
8420 regenerate_decl_from_template.
8422 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
8425 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
8427 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
8429 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8431 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
8432 (convert_nontype_argument): Handle cases when nontype template
8433 parameters become classes after substitution.
8435 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8437 * friend.c (is_friend): Use comptypes, rather than == to compare
8438 types. Modify for new representation of template friends.
8439 (make_friend_class): Likewise.
8440 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
8441 (instantiate_class_template): Deal with template friends.
8443 * decl.c (store_parm_decls): Remove redundant call to
8444 expand_main_function.
8446 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
8448 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
8451 1998-05-26 Per Bothner <bothner@cygnus.com>
8453 * language_as_string: Handle lang_java.
8455 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
8457 * decl.c (pushdecl): Don't copy the type_decl.
8459 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8461 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
8463 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
8465 * parse.y (complex_direct_notype_declarator): Use $1 to access
8466 scope of notype_qualified_id.
8468 1998-05-26 Dave Brolley <brolley@cygnus.com>
8470 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
8471 (init_parse): Initialize cpplib interface.
8473 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
8476 1998-05-26 Mark Mitchell <mark@markmitchell.com>
8478 * decl.c (pushtag): Avoid crashing on erroneous input.
8480 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8482 * decl.c (push_namespace): Only produce one unique name for
8483 anonymous namespaces.
8484 (get_unique_name): Remove.
8486 1998-05-25 Mark Mitchell <mark@markmitchell.com>
8488 * call.c (tourney): Don't do any extra comparisons.
8490 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
8492 * cp-tree.h (processing_template_parmlist): Declare.
8493 * decl.c (pushtag): Don't call push_template_decl when we
8495 * pt.c (processing_template_parmlist): New variable.
8496 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
8497 (complete_template_args): Use it.
8498 (add_to_template_args): Likewise.
8499 (innermost_args): Likewise.
8501 (begin_template_parm_list): Use processing_template_parmlist.
8502 (end_template_parm_list): Likewise.
8504 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
8505 * decl.c (grokdeclarator): Use it.
8506 * decl2.c (grok_x_components): Likewise.
8507 * init.c (initializing_context): Likewise.
8508 * method.c (do_build_copy_constructor): Likewise.
8509 (do_build_assign_ref): Likewise.
8510 * search.c (compute_access): Likewise.
8511 * typeck.c (build_component_ref): Likewise.
8513 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
8514 unnamed type a typedef name "for linkage purposes".
8516 * pt.c (lookup_template_class): Don't look at
8517 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
8519 * method.c (build_overload_int): Handle error cases gracefully.
8521 * pt.c (instantiate_decl): Handle static member variables
8524 * pt.c (tsubst): Use the tsubst'd type when producing new
8525 TEMPLATE_PARM_INDEX nodes.
8527 1998-05-24 Mark Mitchell <mark@markmitchell.com>
8529 * tree.c (cp_tree_equal): Handle pointers to member functions.
8531 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
8532 sure the type of the REF_BIND is a reference type.
8533 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
8534 target_type for clarity.
8536 * parse.y (xcond): Move call to condition_conversion ...
8537 * semantics.c (finish_for_cond): Here.
8538 * parse.c: Regenerated.
8540 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
8542 * decl.c (push_namespace): Namespaces have type void.
8543 * typeck2.c (incomplete_type_error): Complain about namespace
8545 * typeck.c (decay_conversion): Likewise.
8547 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
8549 * error.c (dump_expr): Support namespaces.
8551 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
8553 * cp-tree.def: Add SRCLOC.
8554 * cp-tree.h: Add struct tree_srcloc and accessor macros.
8555 * tree.c (build_srcloc, build_srcloc_here): New fns.
8556 * pt.c (add_pending_template): Use build_srcloc_here.
8557 (push_tinst_level): Update last_template_error_tick before erroring.
8558 (instantiate_decl): Restore lineno and input_filename before
8559 calling add_pending_template.
8560 * decl2.c (finish_file): Set up lineno and input_filename for
8563 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8565 * decl.c (lang_print_error_function): New fn.
8566 (init_decl_processing): Set print_error_function to use it.
8567 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
8569 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
8572 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
8573 copy-initialization.
8575 * class.c (build_vtable_entry): Use int_fits_type_p.
8576 (build_vtable): Pass a signed offset to build_vtable_entry.
8577 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
8578 set_rtti_entry): Likewise.
8580 1998-05-22 Per Bothner <bothner@cygnus.com>
8582 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
8583 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
8585 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
8587 * pt.c (print_template_context): Use fprintf instead of cp_error.
8589 * pt.c (determine_specialization): Just return an error_mark_node.
8590 Also print the decl we want in error messages. If we complain,
8591 return error_mark_node.
8592 (tsubst_friend_function): Set lineno and input_filename so
8593 error messages will be useful.
8594 (instantiate_template): Just return an error_mark_node.
8595 (check_explicit_specialization): Don't mess with a returned
8598 * pt.c (print_template_context): Add new argument.
8599 (maybe_print_template_context): New fn.
8600 (push_tinst_level): Increment tinst_level_tick.
8601 (pop_tinst_level): Likewise.
8602 * errfn.c (cp_thing): Call maybe_print_template_context. Use
8603 xrealloc instead of xmalloc.
8605 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
8607 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8609 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
8610 if the template we looked up is the same as the one we already
8613 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
8615 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
8616 (cpp_reader,parse_in): Add for cpplib.
8617 (check_newline): Call handle_sysv_pragma with new interface.
8618 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
8620 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
8621 (sub_getch): Call GETC for cpplib.
8623 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
8624 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
8626 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
8628 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
8630 * decl2.c (maybe_make_one_only): New fn.
8631 (import_export_vtable): Use it.
8632 (import_export_decl): Likewise.
8633 * pt.c (mark_decl_instantiated): Likewise.
8635 1998-05-21 Mark Mitchell <mmitchell@usa.net>
8637 * decl2.c (find_representative_member): Rename to ...
8638 (build_anon_union_vars): New function.
8639 (finish_anon_union): Fix stupidity of previous change.
8641 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
8643 * decl.c (grokfndecl): Handle definition of specialization in
8646 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
8648 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8650 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
8651 to look for type declarations.
8652 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
8653 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
8654 (finish_member_class_template): Declare.
8655 * decl.c (pushtag): Put member class templates on the
8656 CLASSTYPE_TAGS list, just as for ordinary member classes.
8657 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
8658 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
8659 IDENTIFIER_NAMESPACE_VALUEs.
8660 * parse.y (component_decl): Move code to ...
8661 * semantics.c (finish_member_class_template): New function.
8662 Don't put member class templates on the list of components for a
8664 * parse.c: Regenerated.
8665 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
8666 In fact, don't use DECL_CONTEXT at all here.
8668 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
8670 * decl.c (record_unknown_type): New function.
8671 (init_decl_processing): Call it for the unknown and global type
8674 1998-05-20 Mark Mitchell <mmitchell@usa.net>
8676 * decl2.c (find_representative_member): New function.
8677 (finish_anon_union): Use it.
8679 * cp-tree.h (MAIN_NAME_P): New macro.
8680 (DECL_MAIN_P): Likwise.
8681 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
8682 (grokfndecl): Use the new macros.
8683 (grokdeclarator): Likewise.
8684 (start_function): Likewise.
8685 (store_parm_decls): Likewise.
8686 (finsh_function): Likewise.
8687 * friend.c (do_friend): Likewise.
8688 * typeck.c (build_function_call_real): Likewise.
8689 (build_unary_op): Likewise.
8691 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
8693 * decl2.c (start_objects, finish_objects, do_dtors,
8694 do_ctors): Split out from...
8695 (finish_file): ...here.
8697 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
8699 * tree.c (is_overloaded_fn): Don't abort on placeholders from
8702 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
8704 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
8706 * error.c (dump_expr): Handle an ARROW_EXPR.
8708 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
8710 * decl.c (saveable_obstack): Declare.
8711 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
8712 declare, if necessary.
8714 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
8716 * call.c (compare_qual): Remove.
8718 (is_properly_derived_from): New function.
8719 (maybe_handle_ref_bind): Likewise.
8720 (maybe_handle_implicit_object): Likewise.
8721 (compare_ics): Modify substantially to bring into conformance with
8723 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
8724 (comp_cv_qualification): Declare.
8725 (comp_cv_qual_signature): Likewise.
8726 * typeck.c (comp_cv_qualification): Likewise.
8727 (comp_cv_qual_signature): Likewise.
8729 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8731 * Makefile.in (parse.o): Depend on toplev.h.
8733 * class.c (typecode_p): Remove prototype and definition.
8735 * cp-tree.h (currently_open_class, is_empty_class, member_p):
8738 * decl.c (push_overloaded_decl_top_level): Remove prototype and
8741 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
8742 in call to `cp_thing'.
8743 (cp_warning): Likewise for function pointer `warning'.
8745 * except.c (do_function_call): Remove prototype and definition.
8746 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
8748 * method.c (is_java_type): Add prototype and make it static.
8750 * parse.y: Include toplev.h.
8752 * pt.c (type_unification): Remove unused variable `arg'.
8753 (instantiate_decl): Likewise for `save_ti'.
8755 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
8757 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
8759 * init.c (build_member_call): Handle template_ids.
8760 * parse.y (primary): Add global_scope template_id.
8762 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
8764 * decl2.c (get_sentry): Use end_temporary_allocation.
8765 Don't declare permanent_obstack.
8767 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
8769 * parse.y (.finish_new_placement): New non-terminal.
8770 (unary_expr, new_type_id): Use it.
8771 * parse.c: Regenerated.
8773 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
8775 * pt.c (redeclare_class_template): Say where the original definition
8776 of the template-parameter's default argument appeared.
8778 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
8780 * call.c (build_over_call): Tweak empty class handling.
8782 * decl.c (make_typename_type): Use currently_open_class.
8784 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
8786 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8788 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
8789 for a type unless it is one.
8791 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
8793 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
8795 * Makefile.in (program_transform_name, objdir): Define.
8797 * Makefile.in (BISON): Use bison from the build tree if it exists.
8800 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8802 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
8804 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
8806 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
8808 * call.c (build_scoped_method_call): Likewise.
8810 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
8812 * init.c (build_new_1): Call suspend_momentary around the creation
8813 of values that must be saved for exception handling.
8814 * parse.y (.build_new_placement): New non-terminal.
8815 (unary_expr, new_placement): Use it.
8816 * parse.c: Regenerated.
8818 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
8820 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
8823 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
8826 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
8828 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
8830 * decl.c (start_decl): Revert problem change.
8832 * Makefile.in (CONFLICTS): Fix.
8834 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
8836 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
8838 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
8840 * class.c (finish_struct_1): Use BINFO_SIZE.
8842 * decl.c (start_decl): Use 'tem'.
8844 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
8846 * exception.cc: Include eh-common.h.
8847 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
8848 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
8849 (__cp_push_exception): Initialize eh_info struct as well.
8850 * except.c: Remove local structs and include eh-common.h.
8851 (init_exception_processing): Set language and version codes.
8852 (call_eh_info): Add presence of eh_info to runtime description of
8854 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
8855 * semantics.c (finish_try_block): Call start_catch_block() and
8857 * parse.y (function_try_block): Call start_catch_block() and
8860 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
8862 * typeck.c (original_type): New function.
8863 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
8864 to see if they're actually the same.
8865 * cp-tree.h (original_type): Declare.
8867 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8869 * Makefile.in (lex.o): Depend on output.h.
8871 * call.c (add_function_candidate): Remove unused variable `cand'.
8872 (add_conv_candidate): Likewise.
8873 (build_builtin_candidate): Likewise.
8875 * cp-tree.h: Add prototype for `types_overlap_p'.
8877 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
8879 * decl2.c (merge_functions): Remove unused variables `tmp' and
8882 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
8883 (code_as_string): Likewise.
8884 (language_as_string): Likewise.
8885 (parm_as_string): Likewise.
8886 (op_as_string): Likewise.
8887 (assop_as_string): Likewise.
8888 (cv_as_string): Likewise.
8890 * lex.c: Include output.h.
8892 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
8894 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
8897 * tinfo.cc (__class_type_info::dcast): Change the type of variable
8898 `i' from int to size_t.
8900 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
8903 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
8905 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
8906 DECL_NAMESPACE_SCOPE_P.
8907 (lang_decl_name): Likewise.
8908 * pt.c (tsubst_friend_function, tsubst): Likewise.
8909 * decl.c (pushdecl, redeclaration_error_message, start_decl,
8910 cp_finish_decl, start_function): Likewise.
8911 * class.c (finish_struct_1): Likewise.
8912 * call.c (build_over_call): Likewise.
8913 (compare_ics): Use DERIVED_FROM_P.
8915 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
8917 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
8918 * method.c (build_mangled_name): Use it.
8919 (build_decl_overload_real): Likewise.
8921 * error.c (dump_simple_decl): New function, broken out from ...
8922 (dump_decl): Use it.
8924 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
8926 * ptree.c (lang_print_xnode): Add missing `break'.
8928 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
8930 * call.c (add_template_candidate): Adjust for changes to
8931 fn_type_unification.
8932 (add_template_candidate_real): Likewise.
8933 (add_template_conv_candidate): Likewise.
8934 (build_user_type_conversion_1): Likewise.
8935 (build_new_function_call): Likewise.
8936 (build_object_call): Likewise.
8937 (build_new_op): Likewise.
8938 (build_new_method_call): Likewise.
8939 * class.c (instantiate_type): Likewise.
8940 * cp-tree.h (unification_kind_t): New type.
8941 (fn_type_unification): Adjust prototype.
8942 (type_unificaiton): Likewise.
8943 * pt.c (UNIFY_ALLOW_NONE): New macro.
8944 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
8945 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
8946 (UNIFY_ALLOW_DERIVED): Likewise.
8947 (unify): Change prototype.
8948 (maybe_adjust_types_for_deduction): New function.
8949 (check_cv_quals_for_unify): Likewise.
8950 (determine_specialization): Adjust.
8951 (fn_type_unification): Likewise.
8952 (type_unification): Likewise.
8953 (type_unification_real): Likewise. Use
8954 maybe_adjust_types_for_deduction. Fix mishandling of
8955 back-unification of template functions passed as arguments. Pass
8956 appropriate combination of UNIFY_ALLOW_* to unify.
8957 (unify): Remove unused NTPARMS parameter. Use
8958 check_cv_quals_for_unify. Remove bogus code that allowed
8959 too-generous unification in order to adhere more closely to standard.
8960 (get_bindings_real): Adjust.
8961 (get_class_bindings): Likewise.
8963 * method.c (build_overload_identifier): Only use the innermost
8964 template arguments when mangling.
8965 * pt.c (tsubst_template_argument_vector): New function.
8966 (complete_template_args): Deal with the situation where the
8967 extra_args contain more than one level of arguments.
8968 (lookup_template_class): Deal with member template classes, which
8969 may have more than one level of arguments.
8970 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
8971 Improve handling of member template classes. Use
8972 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
8973 tsubst_template_argument_vector where appropriate.
8974 (regenerate_decl_from_template): Break out from ...
8975 (instantiate_decl): Here.
8977 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
8978 * parse.h: Regenerated.
8979 * parse.c: Really regenerated.
8981 * cp-tree.h (finish_unary_op_expr): New function.
8982 (finish_id_expr): Likewise.
8983 (begin_new_placement): Likewise.
8984 (finish_new_placement): Likewise.
8985 (finish_declarator): Likewise.
8986 (finish_translation_unit): Likewise.
8987 (finish_parmlist): Likewise.
8988 (begin_class_definition): Likewise.
8989 (finish_class_definition): Likewise.
8990 (finish_default_args): Likewise.
8991 (finish_inline_definitions): Likewise.
8992 * parse.y (GCC_ASM_KEYWORD): Remove.
8993 (TYPENAME_ELLIPSIS): Likewise.
8994 * parse.c: Regenerated.
8995 Use new functions in semantics.c in the actions for many rules.
8996 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
8997 * hash.h: Regenerated.
8998 * semantics.c (finish_expr_stmt): Allow NULL expr.
8999 (finish_unary_op_expr): New function, containing
9000 code previously in parse.y.
9001 (finish_id_expr): Likewise.
9002 (begin_new_placement): Likewise.
9003 (finish_new_placement): Likewise.
9004 (finish_declarator): Likewise.
9005 (finish_translation_unit): Likewise.
9006 (finish_parmlist): Likewise.
9007 (begin_class_definition): Likewise.
9008 (finish_class_definition): Likewise.
9009 (finish_default_args): Likewise.
9010 (finish_inline_definitions): Likewise.
9012 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
9014 * typeck.c (build_c_cast): Don't decay arrays and functions to
9015 pointer type when converting to a class type.
9017 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
9019 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
9020 (DECL_CLASS_SCOPE_P): Likewise.
9022 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
9024 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
9025 * decl2.c (constructor_name_full): Likewise.
9027 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
9029 * tree.c (mapcar): Add OVERLOAD support.
9031 * init.c (resolve_offset_ref): We must use basetype_path before we
9032 destroy it with a call to convert_pointer_to.
9034 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9036 * class.c (currently_open_class): New fn.
9037 * decl.c (lookup_name_real): Use it.
9038 * search.c (lookup_field): Likewise.
9040 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
9042 * cp-tree.def (OVERLOAD): New node.
9043 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
9044 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
9045 (NAMESPACE_BINDING): Remove.
9046 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
9048 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
9050 (tree_overload): New struct.
9051 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
9052 (REAL_IDENTIFIER_TYPE_VALUE): Define.
9053 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
9054 (lang_decl_flags): Remove in_namespace.
9055 (lang_decl): Remove chain.
9056 (DECL_CHAIN, DECL_NAMESPACE): Remove.
9057 (flag_honor_std): Declare extern.
9058 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
9059 namespace_binding, set_namespace_binding,
9060 lookup_function_nonclass, cat_namespace_levels,
9061 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
9062 scratch_ovl_cons, ovl_member, build_overload): Declare.
9063 (decl_list_length, get_namespace_id, current_namespace_id,
9064 overloaded_globals_p): Remove.
9065 (lookup_using_namespace, qualified_lookup_using_namespace): Change
9067 (push_scratch_obstack): New macro.
9068 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
9069 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
9071 (build_new_function_call): Iterate using OVL_CHAIN.
9072 Print DECL_NAME in when reporting ambiguities.
9073 (build_object_call): Iterate using OVL_NEXT for fns, convs.
9074 (build_new_op): Call lookup_function_nonclass.
9075 Iterate using OVL_NEXT.
9076 (build_op_delete_call): Change detection of members.
9077 Do not wrap TREE_LIST around fields and single global functions.
9078 (build_over_call): Don't push a class level if the context is a
9080 (build_new_method_call): Iterate using OVL_NEXT.
9081 * class.c (add_method): Chain overloaded members using
9082 build_overload. Remove copying of method.
9083 (grow_method): When iterating through the obstack, expect OVERLOAD
9084 nodes. Chain overload members.
9085 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
9086 nodes in call to get_baselinks.
9087 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
9088 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
9089 fdecls that are OVERLOAD nodes.
9090 (validate_lhs): New function.
9091 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
9092 code. Use DECL_NAME in error messages. Split code between global
9093 and member function processing.
9094 * decl.c (global_type_node): New static variable.
9095 (in_std): New global.
9096 (struct binding_level): New field usings.
9097 (resume_binding_level): Assert that we are not in a class.
9098 (toplevel_bindings_p): Just check for namespace_p or
9100 (resume_level): Remove.
9101 (find_binding): New function.
9102 (binding_for_name): Call it.
9103 (namespace_binding, set_namespace_binding): New functions.
9104 (push_namespace): Associate binding level with new namespace,
9105 resume_binding_level for existing namespace. Remove old code.
9106 Fake std by counting.
9107 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
9108 (maybe_push_to_top_level): Save current namespace.
9109 (pop_from_top_level): Restore saved namespace.
9110 (pop_namespace): Call suspend_binding_level. Remove old code.
9111 (cat_namespace_levels): New function.
9112 (set_identifier_type_value_with_scope): For namespace bindings,
9113 set BINDING_TYPE, and use global_type_node.
9114 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
9115 (identifier_type_value): New function.
9116 (pushtag): If no context, use current_namespace.
9117 (duplicate_decls): Don't process DECL_CHAIN.
9118 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
9119 already set. Never reset it to NULL_TREE. Lookup global variables
9120 in their namespace. Push overloaded templates if they are on
9122 (pushdecl_namespace_level): New function.
9123 (pushdecl_top_level): Implement using pushdecl_namespace_level.
9124 (pushdecl_using_decl): New function.
9125 (overloaded_globals_p): Remove.
9126 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
9127 them. Use namespace_binding and set_namespace_value.
9128 (redeclaration_error_message): Complain if the declarations come
9129 from different namespaces.
9130 (lookup_tag): On namespace level, look in the BINDING_TYPE.
9131 (lookup_namespace_name): Pass tree_bindings from stack. Remove
9133 (select_decl): New function.
9134 (lookup_name_real): Call it for qualified and unqualified lookup.
9135 Pass tree_bindings from the stack.
9136 If prefer_type is 1, also accept namespaces.
9137 (lookup_function_nonclass): New function.
9138 (init_decl_processing): Set the binding level of the global
9139 namespace to global_binding_level.
9140 Build a proper type list for __builtin_apply.
9141 Initialize std_node to "fake std" if flag_honor_std is set.
9142 Initialize global_type_node.
9143 Allocated bad_alloc in namespace std if flag_honor_std.
9144 (define_function): Set the DECL_CONTEXT to the current_namespace.
9145 (start_decl): A namespace is not considered as a context here. If
9146 the DECL_CONTEXT is a namespace, push the decl.
9147 (cp_finish_decl): Check for namespaces used as initializers.
9148 (grokfndecl): Add namespace parameter. Remove processing of
9150 (grokvardecl): Add namespace parameter.
9151 (grokdeclarator): Process SCOPEs that are namespaces. For
9152 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
9153 (start_function): Check for contexts that are namespaces.
9154 Set context for declarations that have not been pushed.
9155 (store_parm_decls): Check for ::main only.
9156 (finish_function): Likewise.
9157 (start_method): Check for contexts that are namespaces.
9158 (start_method): Remove DECL_CHAIN processing.
9159 * decl2.c (flag_honor_std): Declare.
9160 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
9161 (decl_namespace_list): New static global.
9162 (grok_x_components): Ignore namespaces as type contexts.
9163 (check_classfn): Expect OVERLOAD nodes.
9164 (grokfield): Remove DECL_CHAIN processing.
9165 (finish_file): Call cat_namespace_levels.
9166 (merge_functions): New function.
9167 (ambiguous_decl): Rewrite.
9168 (lookup_using_namespace): Produce tree_bindings.
9169 (qualified_lookup_using_namespace): Likewise.
9170 (set_decl_namespace, decl_namespace, current_decl_namespace,
9171 push_decl_namespace, pop_decl_namespace): New functions.
9172 (arg_lookup): New struct.
9173 (add_function, arg_assoc_namespace, arg_assoc_class,
9174 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
9176 (get_namespace_id, current_namespace_id): Remove.
9177 (do_toplevel_using_decl): Rewrite.
9178 (do_class_using_decl): Complain about namespace qualifiers.
9179 (do_using_directive): Sorry if not on namespace level. Complain
9180 about unknown namespaces.
9181 * error.c (dump_aggr_type): Check for namespace contexts.
9182 * except.c (init_exception_processing): Push terminate into std.
9183 * friend.c (is_friend): A namespace is not a context, here.
9184 * init.c (expand_member_init): Remove DECL_CHAIN processing.
9185 (build_offset_ref): Process OVERLOAD nodes.
9186 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
9187 * lex.c (identifier_type): Loop using OVL_CHAIN.
9188 (see_typename): Set looking_for_typename to 2.
9189 (real_yylex): Likewise.
9190 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
9191 (do_scoped_id): Expect OVERLOAD nodes.
9192 Change calling convention for qualified_lookup_using_namespace.
9193 (build_lang_decl): Don't set in_namespace anymore.
9194 * method.c (typevec_size): New global.
9195 (build_overload_nested_name): Return if global_namespace.
9196 Otherwise, always expect a declaration context.
9197 (build_qualified_name): Likewise.
9198 Make sure we don't write beyond typevec_size.
9199 (build_decl_overload_real): Likewise.
9200 Allocate one extra slot for the namespace.
9201 (hack_identifier): Mark code dead.
9202 Process OVERLOAD and NAMESPACE_DECL nodes.
9203 * parse.y (program): Pop namespaces until in global namespace.
9204 (extdef): In a using-declaration, don't discard the identifier if
9205 there is no declaration.
9206 (left_curly): Ignore type contexts which are namespaces.
9207 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
9209 * pt.c (template_class_depth): Expect types to be namespaces.
9210 (determine_specialization): Simplify by expecting OVERLOAD nodes.
9211 (push_template_decl): Push into namespace level.
9212 Reset ctx if it is a namespace.
9213 Set DECL_CONTEXT to current_namespace if not set already.
9214 Ignore real contexts that are namespaces.
9215 (mangle_class_name_for_template): Skip global_namespace.
9216 Mangle other namespaces as declarations.
9217 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
9218 (lookup_template_class): Push into namespace of context.
9219 If the context is a namespace, set it to global_namespace.
9220 Use id_context for mangling.
9221 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
9222 (tsubst_friend_function): Ignore namespace contexts.
9223 Push into namespace level.
9224 (tsubst): Handle NAMESPACE_DECL nodes.
9225 Remove DECL_CHAIN processing.
9226 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
9227 * ptree.c (print_lang_identifier): Print bindings.
9228 (lang_print_xnode): Print OVERLOAD nodes.
9229 * rtti.c (init_rtti_processing): Push type_info into std.
9230 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
9231 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
9232 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
9233 lookup_fnfields_here): Likewise.
9234 Process all nodes, instead of going through TREE_CHAIN.
9235 * sig.c (build_signature_pointer_or_reference_type): Set context
9236 to global_namespace.
9237 (build_signature_table_constructor): Expect OVERLOAD nodes.
9238 * spew.c (yylex): Save old setting of looking_for_typename.
9239 * tree.c (decl_list_length): Remove.
9240 (binding_init): New function.
9241 (count_functions): Rewrite.
9242 (is_overloaded_fn): Expect OVERLOAD nodes.
9243 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
9244 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
9245 ovl_member): New functions.
9246 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
9247 (type_unknown_p): Likewise.
9248 (require_instantiated_type): Likewise.
9249 (build_component_ref): Declare code dead.
9250 (build_x_function_call): Create and expect OVERLOAD nodes.
9251 (build_function_call_real): Check for ::main only.
9252 (build_unary_op): Likewise. Expect OVERLOAD nodes.
9253 (convert_for_assignment): Check for TREE_LIST before accessing
9255 * decl.c (duplicate_decls): Check for namespace bindings instead
9257 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
9258 lookup_name_current_level, start_decl, xref_tag,
9259 finish_enum): Likewise.
9260 * init.c (build_offset_ref): Likewise.
9261 * search.c (lookup_field): Likewise.
9262 (lookup_fnfields): Likewise.
9263 (dfs_debug_mark): Likewise.
9264 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
9265 (poplevel_class, pop_from_top_level): Likewise.
9266 * decl2.c (finish_method): Likewise.
9267 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
9268 * decl.c (record_builtin_type): Likewise.
9269 (init_decl_processing, grokfndecl): Likewise.
9270 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
9271 (make_lang_type): Likewise.
9272 * parse.y (make_thunk): Likewise.
9273 * pt.c (tsubst): Likewise.
9274 * tree.c (debug_binfo): Likewise.
9275 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
9276 tinfo2.cc, inc/new.h: Add std qualifications.
9277 * inc/new: Wrap with namespace std if __HONOR_STD.
9278 * inc/typeinfo: Likewise.
9280 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
9282 * call.c (build_user_type_conversion_1): Handle second_conv
9283 properly for templates.
9285 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
9287 * method.c (build_decl_overload_real): Set TREE_USED flag to
9288 zero for build_type_variants nodes as well.
9290 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
9292 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
9294 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
9296 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
9297 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
9298 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
9299 xref.o): Add toplev.h dependencies.
9301 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
9303 * errfn.c (cp_error, cp_warning): Remove declarations for
9304 error and warning respectively.
9306 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9308 * error.c: Convert to using ctype macros defined in system.h.
9309 * method.c: Likewise.
9311 * lex.c: Likewise. Also remove redundant system header stuff.
9313 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
9315 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
9316 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
9317 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
9318 xref.c: Add include of toplev.h.
9320 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
9322 * tree.c (perm_manip): Also regenerate the RTL of an extern.
9323 (copy_to_permanent): Use end_temporary_allocation.
9325 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
9327 * init.c (expand_vec_init): The initialization of each array
9328 element is a full-expression.
9330 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
9332 * method.c (build_mangled_name): Add a call to build_type_variant
9333 to get the right type.
9335 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
9337 * Makefile.in: Add .SUFFIXES.
9339 * cp-tree.def: Remove NAMESPACE_DECL.
9341 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
9343 * call.c (build_over_call): Do evaluate arg even if it has empty
9345 * decl.c (start_function): Don't push a member function.
9347 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
9349 * Makefile.in (g++FAQ.info): Put -o option before input file.
9351 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
9353 * gxxint.texi: Add info for squangling codes K and B.
9355 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
9357 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
9358 the expression in templates.
9359 (finish_stmt_expr): Likewise.
9361 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
9363 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
9365 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
9367 * decl.c (maybe_push_to_top_level): Always clear
9368 current_template_parms and processing_template_decl.
9369 (pushtag): Remove check of current_class_type and some comments,
9370 since maybe_push_to_top_level no longer creates confusion.
9372 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
9374 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
9375 (DECL_CLASS_TEMPLATE_P): Likewise.
9376 (DECL_PRIMARY_TEMPLATE): Likewise.
9377 (PRIMARY_TEMPLATE_P): Use it.
9378 (push_template_decl_real): New function.
9379 (redeclare_class_template): Take new template parameters as
9381 (is_specialization_of): New function.
9382 (comp_template_args): Declare.
9383 * decl.c (pushtag): Handle friend template classes.
9384 (xref_tag): Likewise. Use new calling convention for
9385 redeclare_class_template.
9386 * decl2.c (grok_x_components): Handle friend templates.
9387 * friend.c (is_friend): Use is_specialization_of where
9388 appropriate. Deal with friend class templates.
9389 (make_friend_class): Let a class template be friends with itself.
9390 * pt.c (comp_template_args): Remove declaration.
9391 (tsubst_friend_class): New function.
9392 (push_template_decl_real): New function.
9393 (push_template_decl): Use it.
9394 (redeclare_class_template): Adjust for new calling convention.
9395 (comp_template_args): Give it external linkage.
9396 (instantiate_class_type): Use tsubst_friend_class to deal
9397 with friend templates.
9398 * typeck.c (comptypes): Use comp_template_args, rather than
9399 expanding it inline.
9400 * parse.y (component_decl): Handle a nested template type
9401 like other component type declarations.
9403 * pt.c (check_explicit_specialization): Handle overloaded
9404 constructors correctly.
9406 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
9407 (lookup_template_class): Use it.
9409 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
9411 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
9412 * cp-tree.h: Add WRAPPER support.
9413 * call.c (add_candidate): Split out from add_*_candidate fns.
9414 (build_over_call): Take the candidate instead of function and args.
9415 Enforce access control here. Emit overload warnings here.
9416 (add_warning): New fn.
9417 (joust): Add WARN parm. If not set, call add_warning instead of
9418 printing a warning. Re-enable some warnings.
9420 (convert_like): Adjust.
9421 (build_new_op): Adjust.
9422 (build_new_function_call): Adjust.
9423 (build_user_type_conversion_1): Adjust.
9424 (USER_CONV_FN): Adjust.
9425 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
9426 build_int_wrapper): New fns.
9428 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
9430 * pt.c (unify): Fix typo in previous change.
9432 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9434 * error.c (dump_type_real): Declare canonical_name.
9436 * typeck.c (comp_target_types): Fix PMFs.
9438 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
9440 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
9441 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
9444 * pt.c (tsubst): Decrease the template-level of
9445 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
9446 TEMPLATE_PARM_INDEX.
9447 (template_decl_level): New function.
9448 (unify): Make sure to record unifications for template
9449 parameters, even when the parameters exactly match the arguments.
9450 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
9451 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
9452 aren't from the level we're currently working on.
9454 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
9456 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
9458 * decl2.c (check_member_template): Set DECL_IGNORED for member
9459 class templates, too.
9461 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
9463 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
9465 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
9467 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
9469 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
9470 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
9471 (init_decl_processing): Handle TI types.
9472 * typeck.c (unsigned_type, signed_type): Handle TI types.
9474 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
9476 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
9477 New local added_libraries. Increment count when add library to
9480 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
9482 * cp-tree.h (type_as_string_real): New function.
9483 * pt.c (mangle_class_name_for_template): Use it.
9484 * error.c (dump_aggr_type): Change prototype.
9485 (dump_type_prefix): Likewise.
9486 (dump_type_suffix): Likewise.
9487 (dump_type_real): Convert from dump_type. If desired, the
9488 "canonica" name of a typedef, i.e., the name of the underlying
9489 type, can be printed.
9490 (dump_type): Call dump_type_real.
9492 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
9494 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
9496 * typeck.c (comp_target_types): Tweak pedantic case.
9497 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
9498 Return -1 or 1 instead of 1 or 2.
9499 (compparms): Remove STRICT handling.
9500 (convert_for_assignment): Fix handling of pmfs.
9502 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
9504 * typeck.c (comp_target_types): Handle references like pointers.
9505 (comp_target_parms): Note that return code from comp_target_types
9506 can be negative to indicate failure.
9508 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
9510 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
9511 which requires a working target compiler to build.
9513 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
9515 * tree.c (avoid_overlap): Add prototype.
9517 * spew.c (num_tokens): Add prototype.
9518 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
9520 * search.c (dfs_check_overlap): Add prototype.
9521 (dfs_no_overlap_yet): Likewise.
9523 * pt.c (original_template): Add prototype.
9524 (inline_needs_template_parms): Likewise.
9525 (push_inline_template_parms_recursive): Likewise.
9526 (retrieve_specialization, register_specialization): Likewise.
9527 (print_candidates, reduce_template_parm_level): Likewise.
9528 (build_template_decl, mark_template_parm): Likewise.
9529 (tsubst_friend_function, get_bindings_real): Likewise.
9531 * method.c (start_squangling): Add prototype.
9532 (end_squangling, check_ktype, issue_ktype): Likewise.
9533 (build_overloaded_scope_ref, check_btype): Likewise.
9534 (build_mangled_template_parm_index): Likewise.
9536 * lex.c (init_cpp_parse): Add prototype.
9537 (handle_cp_pragma, handle_sysv_pragma): Likewise.
9538 (reduce_cmp, token_cmp): Likewise.
9540 * except.c (call_eh_info): Add prototype.
9541 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
9542 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
9544 * decl2.c (is_namespace_ancestor): Add prototype.
9545 (namespace_ancestor, add_using_namespace): Likewise.
9546 (ambiguous_decl): Likewise.
9548 * decl.c (indent): Add prototype.
9550 * call.c (add_template_candidate_real): Add prototype.
9552 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
9554 * decl2.c (build_expr_from_tree): Just return a PMF.
9556 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
9558 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
9559 when doing initializations.
9561 * pt.c (unify): Use comptypes to compare type args.
9563 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
9565 * decl.c (duplicate_decls): Fix check for when it's safe to free
9568 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
9571 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
9573 * pt.c (build_template_parm_index): Add prototype.
9575 * search.c (my_tree_cons): Don't clear words outside the
9576 newly allocated node.
9578 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
9580 * lex.c (init_parse): Now returns char* containing the filename.
9582 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
9583 Jeff Law <law@cygnus.com>
9585 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
9588 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9590 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
9592 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9594 * decl.c (duplicate_decls): Don't warn for redundant decls if
9595 friend: let add_friend take care of it.
9597 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9599 * sig.c (build_signature_pointer_constructor): Don't set
9600 TREE_HAS_CONSTRUCTOR for a signature pointer.
9601 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
9602 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
9604 * typeck.c (build_unary_op): Only allow taking the address of a
9606 * typeck2.c (digest_init): Simplify.
9607 (store_init_value): Don't pedwarn about using { } for pmfs.
9609 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
9611 * cp-tree.h (start_decl): Update prototype.
9612 * decl.c (start_decl): Like the C version, new parameters
9613 for the attributes. Call cplus_decl_attributes here,
9614 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
9615 (grokdeclarator): Pass NULL for new start_decl arguments.
9616 * pt.c (tsubst_expr): Likewise.
9617 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
9618 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
9619 * lex.c (build_lang_decl): Add lang_name_java.
9620 * class.c (push_lang_context): Add lang_name_java.
9621 * method.c (build_mangled_name): Check for is_java_type.
9623 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
9625 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
9626 * call.c (build_scoped_method_call): Check for TREE_CODE for
9627 VOID_TYPE instead of type == void_type_node.
9628 (build_method_call): Likewise.
9629 * decl.c (lookup_name_real): Likewise.
9630 (grokdeclarator): Likewise.
9631 (start_decl): Likewise.
9632 (grokparms): Likewise.
9633 (start_function): Likewise.
9634 (finish_function): Likewise.
9635 (start_method): Likewise.
9637 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
9639 * lex.c (finput): New variable.
9640 (init_cpp_parse): Renamed from init_parse.
9641 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
9642 (finish_parse): New function.
9643 * cp-tree.h (init_lex, init_parse): Remove declarations.
9645 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
9647 * call.c (build_call): Still evaluate the actual argument.
9648 * class.c (is_empty_class): Update for -fnew-abi.
9650 * decl2.c: -fnew-abi implies -fsquangle.
9652 * method.c (do_build_assign_ref): Don't do anything to copy
9654 (do_build_copy_constructor): Likewise.
9655 * call.c (build_over_call): Likewise.
9657 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9659 * tree.c (avoid_overlap): Return a value.
9661 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
9663 * method.c (check_btype): Add missing argument to xrealloc.
9664 (check_ktype): Likewise.
9666 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9668 Implement empty base optimization.
9669 * class.c (finish_struct_1): Add vbase fields earlier. Set
9670 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
9671 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
9672 (types_overlap_p): New fn.
9673 * tree.c (avoid_overlap): New fn.
9674 (build_base_fields): Use it to avoid overlapping empty bases.
9675 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
9677 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
9679 Re-implement allocation of base class subobjects.
9680 * tree.c (unshare_base_binfos): New fn.
9681 (layout_basetypes): Use it. Now handles offsets of both virtual and
9682 non-virtual bases, after layout_type.
9683 (layout_vbasetypes): Remove.
9684 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
9685 (build_vbase_pointer_fields): Split out from old layout_basetypes.
9686 * class.c (finish_base_struct): Lose offset handling code.
9687 Move nonvdtor warning here. Don't mess with t_binfo anymore.
9688 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
9689 * cp-tree.h: Adjust.
9691 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
9693 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
9694 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
9695 * class.c (duplicate_tag_error): Likewise.
9696 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
9697 * tree.c (layout_vbasetypes): Update from layout_record, remove
9698 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
9699 (layout_basetypes): Likewise.
9701 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
9703 * class.c, Make sure system.h is included just after config.h.
9704 Delete lingering stdio and errno references too.
9705 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
9707 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
9709 * friend.c (is_friend): Fix access control for local classes.
9711 * class.c (is_empty_class): New fn.
9712 * call.c (build_call): Don't pass empty class objects to a function.
9714 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
9716 * call.c (build_over_call): Do name resolution for default
9717 arguments of function templates in the scope of the templates.
9719 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
9721 * call.c: Include system.h. Remove includes, declarations and
9722 defines provided by system.h.
9723 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
9724 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
9725 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
9726 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
9727 * typeck2.c, xref.c: Likewise.
9728 * Makefile.in: Dependencies updated as appropriate.
9729 * Make-lang.in: Likewise.
9731 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
9733 * pt.c (fn_type_unification): Allow incomplete unification without
9734 an immediate error message.
9736 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
9738 * tree.c (member_p): New fn.
9739 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
9740 initializing class members.
9742 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
9743 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
9745 * call.c (build_method_call): Handle non-scoped destructors, too.
9746 * pt.c (tsubst_copy): Likewise.
9748 * pt.c (print_template_context): Split out...
9749 (push_tinst_level): ...from here.
9751 * friend.c (is_friend): Don't pass a type to decl_function_context.
9753 * typeck.c (convert_for_initialization): Always hand off
9754 conversions to class type.
9756 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
9758 * friend.c (is_friend): Local classes have the same access as the
9761 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
9763 * typeck.c (expand_target_expr): Delete dead function.
9765 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
9767 * repo.c (save_string): Delete dead function.
9769 * method.c (thunk_printable_name): Delete dead function.
9771 * lex.c (yynextch): Delete dead function.
9773 * expr.c (tree_extract_aggr_init): #if 0 out.
9775 * except.c (do_unwind): Delete dead function.
9776 (easy_expand_asm): Likewise.
9778 * cvt.c (build_conversion_type_1): Delete dead function.
9780 * cp-tree.h (push_expression_obstack): Declare.
9782 * call.c (source_type): #if 0 out.
9784 * class.c (alter_access): Remove unused label. Add braces
9785 around empty else clause.
9787 * lex.c (yyprint): Fix argument to printf.
9789 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
9791 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
9793 * pt.c (instantiate_class_template): Make sure template
9794 arguments are permanent.
9795 * init.c (resolve_offset_ref): Don't go looking around in
9798 * semantics.c: Add routines to handle expressions, and some
9799 declaration processing.
9800 * parse.y: Use them.
9801 (current_class_depth): Move declaration to cp-tree.h.
9802 * parse.c: Regenerated.
9803 * cp-tree.h: Use them.
9804 (current_class_depth): Declare.
9805 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
9807 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
9809 * error.c (dump_decl): Be a bit more explicit with template
9810 type arguments, when verbose.
9812 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
9814 * inc/exception: Reorder closing braces.
9816 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
9818 * pt.c (redeclare_class_template): New function.
9819 * cp_tree.h (redeclare_class_template): Declare it.
9820 * decl.c (xref_tag): Use it.
9822 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
9824 * call.c (build_over_call): Check IS_AGGR_TYPE, not
9826 * typeck.c (convert_arguments): Likewise.
9828 * decl.c (grokdeclarator): Remove const and volatile from type after
9829 setting constp and volatilep.
9831 * class.c (finish_struct_1): Don't warn about bool bitfield larger
9834 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
9836 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
9838 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
9840 * call.c (build_object_call): Complain about ambiguous operator(),
9841 rather that crashing.
9842 (build_new_op): Likewise.
9843 (build_op_delete_call): Likewise.
9845 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
9847 * cvt.c (perform_qualification_conversions): Use comp_target_types
9848 instead of comp_ptr_ttypes.
9850 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
9852 * cp-tree.h (enforce_access): Declare.
9853 * call.c (enforce_access): Make it extern, not static.
9854 * class.c (alter_access): Use enforce_access; modify code for ISO
9855 compliance, rather than ARM rules.
9857 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9859 * cp-tree.h: Fix typo.
9861 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
9863 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
9864 if (aggregate_value_p (type)).
9866 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
9868 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
9870 * tree.c (mapcar): When dealing with a DECL, use it's constant
9872 * pt.c (lookup_template_class): Don't mangle the names of template
9873 classes whose arguments are unknown.
9875 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
9877 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
9879 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
9881 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
9883 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
9884 boolean_type_node to 1.
9886 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
9888 * error.c (dump_expr): Remove unused variable `l'.
9890 * pt.c (for_each_template_parm): New function, created by
9891 converting uses_template_parms.
9892 (tree_fn_t): New typedef.
9893 (uses_template_parms): Use it.
9894 (mark_template_parm): New function.
9895 (push_template_decl): Check that the argument list of a partial
9896 specialization uses all the template parameters.
9898 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
9899 with it; we might want it for debugging.
9900 * cp-tree.h (type_unification): Change interface.
9901 * class.c (finish_struct_1): Skip nested template types, just like
9902 ordinary nested types.
9903 (instantiate_type): Use new interface to type_unification.
9904 * lex.c (init_lex): Add __sz as opname for sizeof.
9905 * method.c (build_overload_scope_ref): New function.
9906 (build_overload_int): Handle complex expressions. Set
9907 numeric_output_need_bar if necessary.
9908 (build_overload_value): Handle non-PARM_DECL nodes; this
9909 routine is now used by build_overload_int. Remove some
9910 assignments to numeric_output_need_bar. Use
9911 build_overload_scope_ref.
9912 (build_qualified_name): Note that some template mangled names end
9913 with digits, and set numeric_output_need_bar appropriately. Use
9914 build_underscore_int.
9915 * pt.c (unify): Change interface.
9916 (type_unification_real): Likewise.
9917 (determine_specialization): Use new interfaces.
9918 (tsubst): Deal gracefully with situations in which the argument
9919 vector is not fully filled.
9920 (fn_type_unification): Use new interfaces.
9921 (type_unification): Likewise. Remove NOP_EXPR hack.
9922 (type_unification_real): Likewise.
9923 (unify): Likewise. Deal with unification of complex expressions.
9925 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
9927 * pt.c (complete_template_args): Initialize skip properly.
9929 * decl.c (make_typename_type): Revert.
9930 (make_implicit_typename): Remove.
9931 (lookup_name_real): Don't call it. Call lookup_field if we see a
9932 TYPE_DECL from a template base.
9933 * search.c (lookup_field): Do implicit typename stuff.
9935 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
9936 Geoff Noer <noer@cygnus.com>
9938 * Makefile.in: Various fixes for building cygwin32 native toolchains.
9939 * Make-lang.in: Likewise.
9941 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9943 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
9945 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
9947 * decl.c (make_implicit_typename): Rewrite removed code.
9948 (make_typename_type): Call it if the type we look up comes from
9949 a base that uses template parms.
9951 * pt.c (complete_template_args): Rewrite.
9952 (tsubst, FUNCTION_DECL): Use it.
9954 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
9956 * semantics.c (finish_asm_stmt): Fix combine strings. Call
9957 c_expand_asm_operands () if output_operands, input_operands or
9958 clobbers is not NULL_TREE.
9960 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
9962 * pt.c (complete_template_args): New function.
9963 (get_bindings): Deal with specializations of function templates
9964 with return type containing parameters from outer class
9966 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
9967 substitute arguments and compose a new type.
9969 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
9971 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
9974 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
9976 * decl.c (make_implicit_typename): Lose useless code.
9978 * call.c (standard_conversion): Handle A* -> const A* properly.
9980 * pt.c (get_bindings_real): Rename from get_bindings. Add
9982 (get_bindings): Pass 1.
9983 (get_bindings_overload): Pass 0.
9985 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
9987 * pt.c (check_explicit_specialization): When reverting a static
9988 member function, also remove the `this' parameter from
9989 last_function_parms.
9991 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
9993 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
9996 * decl.c (store_bindings): Use free_binding_vecs.
9997 (pop_from_top_level): Likewise.
9999 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10001 * decl.c (make_implicit_typename): Only change the type of a
10004 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
10006 * semantics.c: New file, containing routines to perform the
10007 semantic phase of parsing.
10009 * pt.c (tsubst_expr): Likewise.
10010 * cp-tree.h: Declare the various functions in semantics.c.
10011 Provide macros to access _STMT tree nodes.
10012 * cp-tree.def: Add ASM_STMT tree node.
10013 * Makefile.in, Make-lang.in: Add dependencies on and for
10016 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
10018 * pt.c (push_template_decl): Only check primary templates.
10020 * pt.c (check_explicit_specialization): Complain about default args
10021 in explicit specialization.
10023 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
10024 constructor_declarator.
10026 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
10028 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
10029 has no overloaded operator ->.
10031 * call.c (build_field_call): Don't crash when presented with a
10032 field that is actually a nested type.
10034 * decl.c (pushtag): Deal with friend class injection in local
10037 * call.c (build_object_call): Don't crash if OBJ is a
10038 pointer-to-member-function.
10040 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10042 * pt.c (push_template_decl): Complain about template with C linkage,
10043 anonymous template class.
10045 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
10047 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
10048 * search.c: Likewise.
10050 * lex.c (do_pending_defargs): Only call
10051 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
10053 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
10055 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
10057 * parse.y: Deal with CONSTRUCTORS in new_initializers.
10059 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
10061 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
10062 closely mimics the behavior in parse.y.
10063 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
10064 into a compound statement.
10066 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
10068 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
10069 * pt.c (inline_needs_template_parms): New fn.
10070 (original_template): New fn.
10071 (push_inline_template_parms_recursive): New fn.
10072 (maybe_begin_member_template_processing): Use them.
10073 (maybe_end_member_template_processing): Likewise.
10074 (is_member_or_friend_template): Rename to is_member_template.
10075 Member functions of local classes are never member templates.
10077 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10079 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
10080 added in the class scope to catch redefinition error.
10082 * pt.c (reduce_template_parm_level): Also copy
10083 the DECL_TEMPLATE_PARMS field.
10085 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
10087 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
10088 reduced-level template type parameter.
10090 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
10092 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
10093 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
10094 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
10095 * decl.c (duplicate_decls): Propagate it.
10096 * typeck2.c (abstract_virtuals_error): Use two loops to emit
10097 abstract virtual functions and virtual functions which need a
10098 final overrider separately.
10100 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
10102 * lang-specs.h: Properly put brackets around array elements in
10105 * typeck.c (build_binary_op_nodefault): Correctly place parens around
10106 && and || in expression.
10108 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
10110 * call.c (default_parm_conversions): Remove prototype definition.
10111 (build_method_call): Remove unused variable result.
10113 * cvt.c (ocp_convert): Remove unused variable conversion.
10115 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
10117 * except.c (do_unwind): #if 0 definition of unused variables fcall
10120 * expr.c (extract_scalar_init): #if 0 prototype and function
10123 * init.c (expand_aggr_init_1): Remove unused variable init_type.
10124 (build_new_1): Remove unused variable t.
10126 * pt.c (instantiate_class_template): Remove unused variable newtag;
10127 cast called function return value to void.
10128 (do_decl_instantiation): Remove unused variables name and fn.
10130 * tree.c (get_type_decl): Add default return to shut up compiler from
10131 complaining control reaches end of non-void function.
10133 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
10135 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
10137 * call.c (default_parm_conversions): Remove prototype definition.
10138 (build_method_call): Remove unused variable result.
10139 (build_over_call): Add default case in enumeration switch.
10141 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
10143 * decl2.c (lang_decode_option): Change j's type to size_t.
10145 * tree.c (layout_vbasetypes): record_align and desired_align are of
10146 type unsigned int; const_size and nonvirtual_const_size likewise.
10148 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
10150 * parse.y (new_initializer): Make sure all initializers are
10153 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
10155 * decl2.c (import_export_decl): Mark tinfo functions for
10156 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
10158 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
10160 * method.c: Fix typo.
10162 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10164 * method.c: Include "system.h" to get stdlib.h, stdio.h,
10165 ctype.h, string.h, etc.
10166 (issue_nrepeats): Add default case in enumeration switch.
10167 (check_btype): Likewise.
10168 (process_overload_item): Likewise.
10170 * Makefile.in (method.o): Depend on system.h.
10172 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10174 * lex.c (do_scoped_id): Fix parenthesizing.
10176 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
10178 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
10179 FLAG_RTTI is unset, initialize type info machinery and continue
10180 with FLAG_RTTI enabled.
10181 (get_typeid): Likewise.
10183 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10185 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
10188 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
10190 * pt.c (finish_member_template_decl): Deal more gracefully with
10191 invalid declarations.
10193 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
10195 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
10196 cp-tree.h: Clean up more old overloading code, old RTTI code, and
10197 some formatting quirks.
10199 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
10200 method.c, pt.c, ptree.c, typeck.c: Remove support for
10201 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
10203 * Makefile.in: Adjust.
10205 * pt.c (unify): Don't allow reduced cv-quals when strict.
10207 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
10208 *type_unification* and unify.
10210 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
10212 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
10213 (nested_name_specifier): And add it before this use.
10214 (typename_sub0): And this use. Also add use without the keyword.
10215 (typename_sub1): Likewise.
10216 * pt.c (instantiate_class_template): Don't actually instantiate
10217 anything if our type uses template parms.
10219 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
10221 * decl.c (start_function): Don't call temporary_allocation for a
10224 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10226 * pt.c (instantiate_class_template): Don't mess with friends if
10227 our type uses template parms.
10229 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10231 * parse.y (nested_name_specifier): Use explicit_template_type.
10232 (typename_sub): Allow a template_type, an explicit_template_type,
10233 or an implicit template type at the end.
10234 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
10235 * decl.c (make_typename_type): Handle template-id where the name
10236 is a TEMPLATE_DECL.
10237 * call.c (build_scoped_method_call): Handle member template
10239 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
10240 destructor is represented by the type.
10242 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
10243 * parse.y (nested_name_specifier): Add 'template' case.
10244 (explicit_template_type): New rule.
10245 (typename_sub): Use it.
10246 * decl.c (make_typename_type): Handle getting a template-id for NAME.
10247 * pt.c (tsubst): Likewise.
10249 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
10251 * pt.c (add_to_template_args): Fix thinko.
10252 (instantiate_class_template): Call it later.
10254 * pt.c (get_class_bindings): Add outer_args parm.
10255 (most_specialized_class): Likewise.
10256 (instantiate_class_template): Pass it.
10257 (more_specialized_class): Likewise.
10258 (lookup_template_class): Get context from template if none
10260 (finish_member_template_decl): Don't do anything with a
10261 partial specialization.
10262 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
10264 * class.c (finish_struct): Member class templates have already been
10265 checked for name clashes.
10266 * decl.c (pushdecl_with_scope): Handle pushing at class level.
10268 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10270 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
10271 (tsubst, *_PARM): Support multiple levels of template classes.
10272 (instantiate_class_template): Look up the pattern from the
10274 (lookup_template_class): Handle getting a template for d1.
10275 (push_template_decl): Correct setting of 'primary'.
10276 (reduce_template_parm_level): Add 'levels' parm.
10277 (finish_member_template_decl): Support member class templates.
10278 (template_class_depth): Handle multiple levels.
10279 * parse.y (component_decl_1, fn.def2): Remove member template case.
10280 (component_decl): Add member template cases.
10281 * decl2.c (check_member_template): We now handle member template
10283 * decl.c (pushtag): Handle member templates.
10284 * method.c (do_inline_function_hair): Don't touch
10285 IDENTIFIER_GLOBAL_VALUE.
10286 * init.c (build_offset_ref): If name isn't an identifier, just
10288 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
10290 * typeck.c (get_delta_difference): Do adjust for conversions to
10291 and from virtual base.
10293 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
10295 * typeck.c (get_delta_difference): Give hard error for conversion
10298 * cp-tree.h: Tweak formatting.
10300 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
10302 * decl.c (push_namespace): Handle redeclaration error.
10304 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
10305 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
10306 (NAMESPACE_BINDING): New macro.
10307 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
10310 * pt.c (push_template_decl): Use innermost_args.
10312 * decl.c (get_unique_name): Tweak from earlier in the name.
10314 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
10316 * cp-tree.def: Add CPLUS_BINDING node.
10317 * cp-tree.h (tree_binding): New struct.
10318 (BINDING_SCOPE, BINDING_VALUE): New macros.
10319 (current_namespace, global_namespace): Declare extern.
10320 (struct lang_decl_flags): New field in_namespace.
10321 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
10322 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
10323 (TREE_INDIRECT_USING): New macro.
10324 * decl2.c (current_namespace, global_namespace): Declare. The
10325 value is a NAMESPACE_DECL now, not a TREE_LIST.
10326 (is_namespace_ancestor, namespace_ancestor): New static functions.
10327 (add_using_namespace, ambiguous_decl): Likewise.
10328 (lookup_using_namespace): New support function for lookup_name.
10329 (qualified_lookup_using_namespace): New support function for
10330 do_scoped_id and lookup_namespace_name.
10331 (get_namespace_id): Mark as obsolete.
10332 (current_namespace_id): Likewise.
10333 (do_namespace_alias): Implement.
10334 (do_using_directive): Implement as call to add_using_namespace.
10335 * decl.c (binding_for_name): New function.
10336 (push_namespace, pop_namespace): Implement.
10337 (push_decl): Don't install a FUNCTION_DECL in the global branch.
10338 (lookup_namespace_name): Implement using qualified lookup.
10339 (lookup_name_real): For global scoping, lookup in
10340 global_namespace. For namespace scoping, lookup in given
10341 namespace. For unscoped lookup, iterate over namespace,
10342 considering using directives.
10343 (init_decl_processing): Initialize global_namespace.
10344 (grokvardecl): Build assembler name as static name for globals.
10345 (grokdeclarator): Remove old namespace mangling.
10346 (xref_tag): When installing a global binding for the
10347 tag, make sure we have an identifier.
10348 * method.c (build_overload_nested_name): Mangle namespaces.
10349 (build_qualified_name): Likewise.
10350 (build_decl_overload_real): Likewise.
10351 * lex.c (build_lang_decl): Set namespace for new declaration to
10353 (do_scoped_id): Find global names in global or current
10354 namespace, or using qualified namespace lookup, depending on
10356 * init.c (build_member_call): When scope is namespace, use
10357 build_x_function_call instead.
10358 (build_offset_ref): When scope is namespace, collapse processing
10359 to lookup_namespace_name instead.
10360 * error.c (dump_decl): Support NAMESPACE_DECL.
10361 * decl.c (pushdecl): Bind globals to current namespace.
10362 (push_overloaded_decl): Likewise.
10363 (lookup_tag): Likewise.
10364 (lookup_name_current_level): Likewise.
10365 (xref_tag): Likewise.
10366 (start_function): Likewise.
10367 * lex.c (do_identifier): Likewise.
10368 (identifier_typedecl_value): Likewise.
10369 (real_yylex): Likewise.
10370 * method.c (do_inline_function_hair): Likewise.
10371 * parse.y (unscoped): Likewise.
10372 * pt.c (check_explicit_specialization): Likewise.
10373 (lookup_template_class): Likewise.
10374 * rtti.c (call_void_fn): Likewise.
10375 * sig.c (build_sigtable): Likewise.
10376 * ptree.c (lang_print_xnode): New function.
10378 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
10380 * pt.c (instantiate_class_template): Don't instantiate if pedantic
10381 and the args use template parms.
10383 * pt.c (push_tinst_level): If the instantiation uses template parms,
10385 * decl.c (xref_basetypes): Do call complete_type for basetypes
10386 that involve template parameters.
10388 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
10390 * typeck2.c (process_init_constructor): Fix labeled init check.
10392 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
10394 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
10395 argument to tsubst and friends.
10397 * pt.c (tsubst, FUNCTION_DECL): Tidy.
10399 * typeck.c (build_x_function_call): Handle static member function
10400 templates like non-templates. Handle friend templates like normal
10401 function templates.
10402 * pt.c (tsubst, *_PARM): Don't use orig_level.
10403 (get_bindings): Don't call add_to_template_args.
10404 (instantiate_template): Likewise.
10405 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
10406 * ptree.c (print_lang_type): Print index/level for template parms.
10408 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
10410 * Make-lang.in (cc1plus): Note that cc1plus depends on
10411 cp/cp-tree.h and cp/cp-tree.def.
10413 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
10414 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
10415 position in a template parameter list.
10416 * cp-tree.h (template_parm_index): New structure, used as the tree
10417 structure for a TEMPLATE_PARM_INDEX.
10418 (TEMPLATE_PARM_IDX): New macro.
10419 (TEMPLATE_PARM_LEVEL): Likewise.
10420 (TEMPLATE_PARM_DESCENDANTS): Likewise.
10421 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
10422 (TEMPLATE_PARM_DECL): Likewise.
10423 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
10424 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
10425 (TEMPLATE_TYPE_DECL): Likewise.
10426 (TEMPLATE_CONST_IDX): Remove.
10427 (TEMPLATE_CONST_LEVEL): Likewise.
10428 (TEMPLATE_CONST_SET_INFO): Likewise.
10429 (TEMPLATE_TYPE_SET_INFO): Likewise.
10430 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
10432 (TEMPLATE_TYPE_LEVEL): Likewise.
10433 * decl.c (decls_match): Call comp_template_parms, rather than
10434 expanding it inline.
10435 (duplicate_decls): If two template declarations are being merged,
10436 then their TEMPLATE_INFOs should be merged as well.
10437 (grokfndecl): Save template-id information when declaring a friend
10438 with explicit template arguments. Pass arguments to
10439 check_explicit_specialization via correct convention; at some
10440 point check_explicit_specialization changed, but these call-sites
10442 (grokdeclarator): Tidy up slightly.
10443 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
10444 two template functions with the same DECL_ASSEMBLER_NAME the same,
10445 since the names are not yet mangled.
10446 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
10447 TEMPLATE_CONST_PARM.
10448 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
10449 decl for a non-type parameter, rather than printing `<tparm ...>'.
10450 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
10451 (do_friend): Deal with template friends.
10452 * lex.c (do_pending_inlines): Call
10453 maybe_begin_member_template_processing, rather than
10454 conditionally calling begin_member_template_processing.
10455 (process_next_inline): Likewise. Call
10456 maybe_end_member_template_processing, rather than
10457 conditionally calling end_member_template_processing.
10458 (do_pending_defargs): Likewise.
10459 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
10460 TEMPLATE_CONST_PARM.
10461 * method.c (build_mangled_template_parm_index): New function.
10462 (build_overload_value): Use it.
10463 (build_overload_name): Likewise.
10464 * pt.c (finish_member_template_decl): Allow friend declarations.
10465 (template_class_depth): New function.
10466 (is_member_template): Rename, and modify, to become...
10467 (is_member_or_friend_template): New function.
10468 (end_member_template_processing): Rename, and modify, to become...
10469 (maybe_end_member_template_processing).
10470 (build_template_parm_index): New function.
10471 (reduce_template_parm_level): New function.
10472 (process_template_parm): Modify to use build_template_parm_index.
10473 (push_template_decl): Deal with friend templates.
10474 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
10475 TEMPLATE_CONST_PARM.
10476 (tsubst_friend_function): New function.
10477 (instantiate_class_template): Generate the DECL_FRIENDLIST
10478 for a new instantiation by using tsubst_friend_function rather
10480 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
10481 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
10482 appropriate new macros. Use reduce_template_parm_level to
10483 generate lower-level template parameters. Handle tsubst'ing into
10484 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
10485 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
10486 templates. Similarly for the template parameters for a new
10488 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
10489 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
10490 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
10491 (get_bindings): Call add_to_template_args if necessary.
10492 (instantiate_decl): Handle instantiations of friend templates.
10493 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
10494 TEMPLATE_TYPE_PARM as a list of fields; it's not!
10495 * spew.c (yylex): Do a little manual constant propagation to
10498 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
10500 * error.c: Include sys/types.h.
10502 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
10504 * method.c (build_mangled_name): Start CPP directives in column zero.
10506 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
10508 * typeck2.c (process_init_constructor): Sorry about non-trivial
10509 labeled initializers.
10510 * parse.y (initlist): Re-enable labeled initializers.
10512 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10514 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
10515 all callers changed. Rely on the new parameter instead of arg
10516 being a TREE_LIST when determine whether we are working inside
10517 template template parameter. Clean up is_type test.
10519 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
10521 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
10522 * typeck2.c (initializer_constant_valid_p): Allow conversions
10523 between pointers and references.
10525 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
10527 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
10528 if pedantic || warn_pointer_arith.
10530 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10532 * pt.c (unify): Handle TEMPLATE_DECL.
10534 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
10536 * cp-tree.h (strip_attrs): Remove decl.
10538 1998-02-18 Doug Evans <devans@cygnus.com>
10540 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
10541 Update olddecl's attributes too.
10542 (strip_attrs): Remove function.
10543 * typeck.c (common_type): Call merge_machine_type_attributes.
10545 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
10547 * parse.y (initdcl0_innards): New grammar symbol.
10548 (nomods_initdecls, nomods_initdcl0): Change type from itype to
10549 none, since the resulting value is never used.
10550 (parse_decl): New function.
10551 (datadef): Remove redundant actions.
10552 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
10553 * parse.c: Regenerated.
10555 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
10557 * parse.y (simple_stmt): Use getdecls() to check for decl.
10559 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
10561 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
10563 (c++.install-common): Install c++filt properly as native or as cross
10565 (c++.uninstall): Add c++filt.
10567 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
10569 * call.c (standard_conversion): Fix multi-level ptr conversions.
10571 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
10573 * init.c (build_new): Propagate error_mark_node up.
10575 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
10577 * parse.y (simple_stmt): If the condition isn't a declaration,
10578 start the controlled block after the test.
10580 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
10582 * call.c (build_over_call): Convert builtin abs, labs and fabs to
10584 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
10587 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10589 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
10591 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
10593 * cp-tree.h: Add access_protected_virtual_node.
10594 * class.c (init_class_processing): Initialize it.
10595 * decl.c (xref_basetypes): Use it.
10596 * parse.y (base_class_access_list): Likewise.
10598 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
10599 (c++.install-common): Install c++filt.
10601 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
10603 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
10605 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
10607 * call.c (reference_binding): Use comptypes when comparing
10608 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
10610 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
10612 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
10613 (really_overloaded_fn): Move check here from is_overloaded_fn.
10614 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
10616 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
10618 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
10621 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
10623 * cp-tree.h (push_template_decl): Return the decl passed in, or an
10624 equivalent duplicate.
10625 * decl.c (pushtag): Use the return value from push_template_decl.
10626 (duplicate_decls): When duplicating a template declaration, merge
10627 the DECL_TEMPLATE_RESULTs as well.
10628 (make_implicit_typename): Don't try to dive into typename types to
10629 find a context for making a new implicit typename.
10630 (start_decl): Use the return value from push_template_decl.
10631 (grokdeclarator): Complain about declarations list `const operator
10632 int'. Since we don't correctly handle in-class initializations of
10633 non-static data members, complain about this (now illegal)
10634 practice. Issue an error for initializations of non-const statics
10635 since that is illegal as well, and since we don't handle that case
10637 (start_function): Use the return value from push_template_decl.
10638 (start_method): Likewise.
10639 * decl2.c (grokfield): Likewise. Since the change to
10640 grokdeclarator ensures that all initialized fields are in fact
10641 static, remove a redundant test for TREE_PUBLIC.
10642 * parse.y (initlist): Disable labeled initializers since they do
10643 not work as per the documentation, and since they do not use the
10644 same syntax as the C front end.
10645 * pt.c (push_template_decl): Return the decl passed in, or an
10646 equivalent duplicate.
10647 (lookup_template_class): When searching in a nested context,
10648 use the right arguments.
10649 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
10650 * typeck.c (build_component_ref): Assign the correct type to the
10651 result of build_vfn_ref.
10653 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
10655 * pt.c (convert_nontype_argument): Fix typo.
10656 (check_explicit_specialization): Allow old-style specialization
10657 of class template members.
10659 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
10660 Manfred Hollstein <manfred@s-direktnet.de>
10662 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
10663 when deciding to override DECL_ASSEMBLER_NAME.
10665 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
10667 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
10668 * cp-tree.h (flag_do_squangling): Add declaration.
10669 * lang-options.h: Add -fsquangle and -fno-squangle.
10670 * method.c: Add macros and static variables for squangling.
10671 (build_overload_name): Rename to build_mangled_name, add logic for B
10672 compression, and split into process_modifiers and
10673 process_overload_item.
10674 (process_modifiers): New function, to handle constant, reference,
10676 (process_overload_item): New function, handles issue of type codes.
10677 (build_overload_name): New function, start squangling and call
10678 build_mangled_name.
10679 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
10680 (start_squangling): New function to initialize squangling structs.
10681 (end_squangling): New function to destroy squangling structs.
10682 (nrepeats): Rename variable to Nrepeats.
10683 (issue_nrepeats): New function for issuing 'n' type repeats.
10684 (check_ktype): New function to check for type K name compression.
10685 (build_overload_nested_name): Add a check for K name compression.
10686 (build_qualified_name): Add a check for K name compression and don't
10687 use DECL_ASSEMBLER_NAME when squangling is on.
10688 (check_btype): New function, checks for B type compression.
10689 (build_static_name, build_decl_overload_real): Initiate squangling.
10690 (build_typename_overload, build_overload_with_type): Initiate
10693 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
10695 * method.c (make_thunk): Avoid name buffer overflow.
10697 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
10699 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
10700 don't define them yet.
10702 * parse.y (nomods_initdcl0): Add constructor_declarator case.
10704 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10706 * config-lang.in (diff_excludes): Use basename only.
10708 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
10710 * tinfo2.cc: Add tinfo for signed char.
10712 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
10714 * search.c (compute_access): Handle protected constructors in derived
10715 classes as accessible.
10717 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
10719 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
10720 Call convert_from_reference sooner.
10722 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
10724 * cvt.c (ocp_convert): Obtain the constant values from constant
10725 decls even if the destination type is the same as the type of the
10728 * decl2.c (finish_file): Make sure that static inlines with
10729 definitions are not marked DECL_EXTERNAL before returning.
10731 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
10733 * decl.c: Lose arg_looking_for_template.
10734 (lookup_name_real): Likewise.
10735 * parse.y: Lose processing_template_arg, template_arg1.
10736 (primary): Likewise.
10737 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
10739 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
10741 * error.c (dump_decl): Fix type of default arguments for template
10742 template parameters and nontype template parameters.
10743 * parse.y (template_parm): Handle invalid default template
10744 template arguments here.
10746 * parse.y (template_parm): Use template_arg instead of PTYPENAME
10747 for default template template argument.
10748 * pt.c (coerce_template_parms): Merge default template argument
10749 codes. Can treat RECORD_TYPE as template name if it is implicitly
10750 created. Fix argument index in error message.
10751 * typeck.c (comptypes): Merge template argument comparison codes in
10752 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
10754 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
10756 * lex.c (file_name_nondirectory): Also check for '/'.
10758 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
10760 * parse.y (primary): Deal with statement-expressions in
10762 * pt.c (tsubst_copy): Handle BIND_EXPR.
10763 * tree.c (mapcar): Likewise.
10765 * call.c (add_template_candidate_real): Pass extra parameter to
10766 fn_type_unification.
10767 * cp-tree.h (fn_type_unification): Add parameter.
10768 * pt.c (fn_type_unification): Add additional parameter to deal with
10769 static member functions.
10770 (get_bindings): Deal with static member functions.
10772 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
10773 (revert_static_member_fn): Declare.
10774 * decl.c (revert_static_member_fn): Remove declaration. Change
10775 linkage from internal to external.
10776 (cp_finish_decl): Deal with virtual functions in classes local to
10777 template functions.
10778 * decl2.c (finish_file): Don't forget to emit increment/decrement
10779 expressions in initializers for file-scope variables.
10780 * parse.y (typename_sub2): If the typename doesn't names a
10781 template, rather than a type, issue an error message.
10782 * pt.c (check_explicit_specialization): Handle specializations of
10783 static member functions.
10784 (coerce_template_parms): Handle offset references to lists of
10786 * search.c (note_debug_info_needed): Don't crash when handed a
10787 type which is being defined.
10788 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
10789 that can happen with some illegal code.
10791 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10793 * call.c (user_harshness): Initialize `code' to 0.
10794 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
10795 (null_ptr_cst_p): Add parentheses around && within ||.
10796 (standard_conversion): Likewise.
10797 (z_candidate): Likewise.
10798 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
10799 (build_object_call): Likewise for `mem_args'.
10800 (build_new_op): Likewise for `mem_arglist'. Add `return' from
10801 default case in enumeration switch.
10803 * class.c (build_vtable_entry): Add explicit braces to avoid
10805 (build_class_init_list): Likewise.
10806 (finish_struct_1): Initialize `width' to 0.
10807 (instantiate_type): Initialize `name' to NULL_TREE. Add
10808 explicit braces to avoid ambiguous `else'.
10810 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
10813 * decl.c (grok_reference_init): Eliminate unused parameter, all
10815 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
10816 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
10817 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
10818 (grokdeclarator): Add parentheses around && within ||. Add
10819 explicit braces to avoid ambiguous `else'.
10820 (grokparms): Initialize `type' to NULL_TREE.
10821 (xref_tag): Remove unused label `just_return'.
10822 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
10823 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
10824 (hack_incomplete_structures): Add parentheses around assignment
10825 used as truth value.
10827 * decl2.c (coerce_delete_type): Hide definition of `e3'.
10829 * error.c: Include <stdlib.h>.
10830 (dump_expr): Change the type of `i' to size_t. Remove unused
10833 * except.c (init_exception_processing): Remove unused variable `d'.
10834 (expand_throw): Likewise for `label'.
10836 * friend.c (add_friends): Add explicit braces to avoid ambiguous
10839 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
10840 (sort_base_init): Likewise for `binfo'.
10841 (expand_member_init): Likewise for `rval'.
10842 (build_member_call): Add parentheses around assignment used as
10844 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
10845 (build_new): Initialize `nelts' to NULL_TREE. Initialize
10846 `old_immediate_size_expand' to 0.
10847 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
10848 (build_vec_delete_1): Remove unused variable `block'.
10849 (expand_vec_init): Initialize `itype' to NULL_TREE.
10851 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
10852 declaration of `index' and `rindex' with autoconf macros.
10853 (reinit_parse_for_expr): Remove unused variables
10854 `look_for_semicolon' and `look_for_lbrac'.
10855 (cons_up_default_function): Initialize `args' to NULL_TREE.
10856 (readescape): Initialize `firstdig' to 0.
10857 (real_yylex): Add parentheses around assignment used as truth value.
10859 * method.c: Include <strings.h> if we don't have <string.h>.
10860 Protect declaration of `index' with autoconf macro.
10862 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
10863 Initialize `type' to NULL_TREE.
10864 (structsp): Remove unused variable `id'.
10866 * pt.c (coerce_template_parms): Add explicit braces to avoid
10868 (lookup_template_class): Initialize `template' to NULL_TREE.
10869 (instantiate_class_template): Remove unused variable `name' and `e'.
10870 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
10871 (do_poplevel): Initialize `saved_warn_unused' to 0.
10872 (type_unification): Remove unused varable `parm'.
10873 (unify): Likewise for `j'.
10875 * repo.c (init_repo): Add parentheses around assignment used as
10877 (finish_repo): Remove unused varable `p'.
10879 * search.c (get_binfo): Initialize `type' to NULL_TREE.
10880 (get_base_distance): Likewise.
10881 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
10882 and `new_v' to NULL_TREE.
10883 (lookup_fnfields): Likewise for `rval_binfo_h'.
10884 (breadth_first_search): Add parentheses around assignment used as
10886 (get_template_base): Initialize `type' to NULL_TREE.
10888 * sig.c (append_signature_fields): Initialize `last_mfptr' to
10890 (build_signature_table_constructor): Likewise for
10891 `last_rhs_field', `pfn' and `vt_off'.
10892 (build_sigtable): Likewise for `init'.
10894 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
10895 (propagate_binfo_offsets): Likewise for `delta'.
10896 (hash_tree_cons): Initialize hashcode to 0.
10897 (can_free): Likewise for `size'.
10898 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
10900 * typeck.c (convert_sequence): Hide prototype.
10901 (common_type): Add explicit braces to avoid ambiguous `else'.
10902 (comp_target_types): Likewise.
10903 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
10904 (build_function_call_real): Add explicit braces to avoid ambiguous
10906 (convert_arguments): Initialize `called_thing' to 0.
10907 (convert_for_initialization): Initialize `savew' and `savee' to 0.
10909 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
10910 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
10911 (build_x_arrow): Likewise for `last_rval'.
10913 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
10915 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
10917 * decl.c (init_decl_processing): Use set_sizetype.
10918 * decl2.c (sizetype): Don't declare.
10919 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
10920 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
10921 (build_component_addr, unary_complex_lvalue): Likewise.
10922 * rtti.c (expand_class_desc): Likewise.
10923 * class.c (get_vfield_offset): Likewise.
10925 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
10927 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
10928 early to avoid bogus error. Handle overloaded function
10929 names provided as template arguments correctly.
10930 (coerce_template_parms): Don't mishandle overloaded functions when
10931 dealing with template template parameters.
10932 (lookup_template_class): Issue an error message, rather than
10933 crashing, when the TYPE_DECL provided is not a template type.
10935 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
10937 * class.c (instantiate_type): Don't just return a known type if
10940 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
10942 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
10943 since that code could never be reached.
10945 * error.c (dump_decl): Avoid aborting in the midst of printing an
10946 error message about an illegal template declaration.
10948 * parse.y (structsp): Print an error message, rather than crashing,
10949 when a class-head does not name a class.
10951 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
10952 template arguments as a g++ extension.
10954 * cp-tree.def (ALIGNOF_EXPR): New tree code.
10955 * decl2.c (grok_alignof): If processing_template_decl, just store
10957 * typeck.c (c_alignof): Likewise.
10958 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
10959 * error.c (dump_expr): Likewise.
10960 * pt.c (tsubst_copy): Likewise.
10961 * tree.c (cp_tree_equal): Likewise.
10962 * pt.c (uses_template_parms): Correctly determine whether or not a
10963 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
10964 folding can be done.
10966 * cp-tree.h (grok_enum_decls): Remove type parameter.
10967 * decl.c (grok_enum_decls): Likewise.
10968 * decl2.c (grok_x_components): Call grok_enum_decls
10969 unconditionally, since it will do nothing if there is no
10970 current_local_enum. Use the new calling sequence.
10971 * pt.c (tsubst_enum): Use the new calling sequence for
10974 * decl.c (start_function): Make member functions of local classes
10975 in extern inline functions have comdat linkage here...
10976 (grokdeclarator): Rather than here.
10978 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
10980 * pt.c (convert_nontype_argument): Use decl_constant_value.
10982 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
10984 * call.c (add_template_candidate_real): New function.
10985 (add_template_candidate): Use it.
10986 (add_template_conv_candidate): Likewise.
10987 (joust): Pass extra argument to more_specialized.
10988 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
10989 (is_local_class): Remove.
10990 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
10991 * cp-tree.h (is_local_class): Remove.
10992 (perform_array_to_pointer_conversion): Likewise.
10993 (finish_member_template_decl): Add.
10994 (check_explicit_specialization): Return a tree, not an int.
10995 (more_specialized): Take additional argument.
10996 (get_bindings): Likewise.
10997 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
10998 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
10999 (perform_array_to_pointer_conversion): Remove.
11000 * decl.c (saved_scope): Add processing_specialization,
11001 processing_explicit_instantiation fields.
11002 (maybe_push_to_top_level): Save them.
11003 (pop_from_top_level): Restore them.
11004 (grokfndecl): Use new return value from
11005 check_explicit_specialization.
11006 (start_decl): Don't check flag_guiding_decls before pushing
11008 (cp_finish_decl): Remove previous (bogus) change.
11009 (grok_declarator): Use decl_function_context rather than
11011 * decl2.c (finish_file): Pass extra argument to get_bindings.
11012 (build_expr_from_tree): Let build_x_component_ref check
11013 validity of arguments rather than doing it here.
11014 * lex.c (cons_up_default_function): Remove code fooling with
11015 processing_specialization, processing_explicit_instantiation
11016 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
11017 * method.c (build_overload_identifier): Mangle local classes in
11018 template functions correctly.
11019 * parse.y (finish_member_template_decl): Move to pt.c.
11020 * pt.c (finish_member_template_decl): Moved here from parse.y.
11021 (print_candidates): New function.
11022 (determine_specialization): Change interface. Properly look for
11023 most specialized versions of template candidates.
11024 (check_explicit_specialization): Fully process explicit
11026 (push_template_decl): Avoid looking at CLASSTYPE fields in
11028 (determine_overloaded_function): Remove.
11029 (convert_nontype_argument): Change name from
11030 convert_nontype_parameter. Use determine_overloaded_function
11031 instead of instantiate_type.
11032 (mangle_class_name_for_template): Handle type contexts as well as
11034 (classtype_mangled_name): Likewise.
11035 (lookup_template_class): Likewise.
11036 (tsubst): Likewise.
11037 (more_specialized): Take explict template arguments as a
11039 (most_specialized): Likewise.
11040 (get_bindings): Likewise. Check that return types match before
11041 proclaiming a function a match.
11042 (do_decl_instantiation): Remove code searching for function to
11043 instantiate; that is now done in check_explicit_specialization.
11044 (add_maybe_template): Pass extra argument to get_bindings.
11045 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
11047 * typeck.c (build_component_ref): Check for invalid arguments.
11049 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
11051 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
11052 return_target and call_target are equivalent.
11054 * pt.c (type_unification_real): Just accept function parms that
11055 don't use any template parms.
11057 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
11059 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
11060 unset DECL_NOT_REALLY_EXTERN.
11062 * parse.y (typename_sub*): Fix std::.
11064 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
11066 * error.c (dump_decl): Fix type default template args.
11067 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
11069 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
11071 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
11072 (file_name_nondirectory): Use.
11074 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
11076 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
11077 that are not really present. Substitute default arguments in
11078 template template arguments. Correctly convert TEMPLATE_DECL to
11079 TEMPLATE_TEMPLATE_PARM.
11080 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
11081 are no longer treated specially here.
11082 * parse.y (template_template_parm): Fix copy error.
11083 * decl.c (grokdeclarator): Warn about missing `typename' for nested
11084 type created from template template parameters.
11085 * parse.y (bad_parm): Likewise
11087 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
11088 (push_nested_class): Likewise.
11089 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
11090 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
11091 (copy_template_template_parm): Declare.
11092 * decl.c (arg_looking_for_template): New variable.
11093 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
11094 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
11095 node if arg_looking_for_template is nonzero.
11096 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
11097 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
11098 (grokdeclarator): Handle TEMPLATE_DECL.
11099 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
11100 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
11101 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
11102 (dump_decl): Handle unnamed template type parameters.
11103 Handle template template parameters.
11104 (dump_function_name): Handle template template parameters.
11105 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
11106 Handle TEMPLATE_TEMPLATE_PARM.
11107 * method.c (build_template_template_parm_names): New function.
11108 (build_template_parm_names): Handle TEMPLATE_DECL.
11109 (build_overload_nested_name, build_overload_name):
11110 Handle TEMPLATE_TEMPLATE_PARM.
11111 * parse.y (maybe_identifier): New nonterminal.
11112 (template_type_parm): Use it.
11113 (template_template_parm, template_arg1): New nonterminal.
11114 (template_parm): Add template_template_parm rules.
11115 (template_arg): Set processing_template_arg.
11116 (template_arg1): Rules moved from template_arg.
11117 (primary, nonnested_type): Set arg_looking_for_template if we are
11118 processing template arguments.
11119 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
11120 (process_template_parm): Handle template template parameters.
11121 (coerce_template_parms, comp_template_args): Likewise.
11122 (mangle_class_name_for_template, lookup_template_class): Likewise.
11123 (uses_template_parms): Handle TEMPLATE_DECL and
11124 TEMPLATE_TEMPLATE_PARM.
11125 (current_template_args): Handle TEMPLATE_DECL.
11126 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
11127 * search.c (dfs_walk, dfs_record_inheritance):
11128 Handle TEMPLATE_TEMPLATE_PARM.
11129 * tree.c (copy_template_template_parm): New function.
11130 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
11131 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
11133 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
11135 * decl.c (start_decl): Don't allow duplicate definitions of static
11138 * call.c (build_user_type_conversion_1): Handle user-defined
11139 template conversion operators correctly.
11141 * decl2.c (build_expr_from_tree): Issue an error message if the
11142 object in a COMPONENT_REF is a TEMPLATE_DECL.
11144 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
11146 * class.c (is_local_class): New function.
11147 * cp-tree.h (is_local_class): Declare it.
11148 (last_tree): Likewise.
11149 (begin_tree): Likewise.
11150 (end_tree): Likewise.
11151 (lookup_template_class): Change prototype.
11152 * decl.c (cp_finish_decl): Check for NULL where necessary.
11153 Consider FUNCTION_DECLS to declare objects with top-level binding,
11154 when calling make_decl_rtl.
11155 (grokdeclarator): Give members of local classes internal linkage.
11156 (start_function): Remove declaration of last_tree.
11157 (finish_function): Set flag_keep_inline_functions around call to
11158 rest_of_compilation if we are processing a member function in a
11160 (start_method): Call push_template_decl for member functions of
11161 local classes in template functions.
11162 * decl2.c (import_export_decl): Don't give external linkage to
11163 instantiations of templates with internal linkage.
11164 * parse.y (last_tree): Remove declaration.
11165 (template_type): Pass extra parameter to lookup_template_class.
11166 (self_template_type): Likewise.
11167 (structsp): Move call to reset_specialization into left_curly.
11168 (left_curly): Call reset_specialization, and begin_tree.
11169 * pt.c (saved_trees): New variable.
11170 (mangle_class_name_for_template): Change prototype. Use
11171 additional function context to name local classes in templates
11173 (classtype_mangled_name): Pass the context.
11174 (push_template_decl): Handle local classes and templates, and
11175 member functions for such classes.
11176 (convert_nontype_parameter): Fix handling of pointer-to-member
11178 (lookup_template_class): Handle local classes in templates.
11179 (tsubst): Likewise. Don't assume that template instantiations
11180 have external linkage; pay attention to the template declaration.
11181 (mark_decl_instantiated): Likewise.
11182 (begin_tree): New function.
11183 (end_tree): Likewise.
11185 * decl.c (xref_basetypes): Don't call complete_type for basetypes
11186 that involve template parameters; that can lead to infinite
11187 recursion unnecessarily.
11189 * pt.c (register_specialization): Do not register specializations
11190 that aren't ready to be registered yet.
11191 (check_explicit_specialization): Handle explicit specialization of
11192 constructors and destructors.
11193 (build_template_decl): New function.
11194 (push_template_delc): Handle out-of-class specializations of
11197 * pt.c (check_explicit_specialization): Set up the template
11198 information before registering the specialization.
11199 (coerce_template_parms): Fix thinko.
11200 (tsubst): Handle specializations of member templates correctly.
11202 * class.c (finish_struct_methods): Remove calls to
11203 check_explicit_specialization from here.
11204 (finish_struct): And insert them here.
11205 * cp-tree.h (perform_qualification_conversions): New function.
11206 (perform_array_to_pointer_conversion): Likewise.
11207 (begin_explicit_instantiation): Likewise.
11208 (end_explicit_instantiation): Likewise.
11209 (determine_specialization): Renamed from
11210 determine_explicit_specialization.
11211 (comp_template_parms): New function.
11212 (processing_explicit_instantiation): New variable.
11213 * cvt.c (perform_qualification_conversions): New function.
11214 (perform_array_to_pointer_conversion): Likewise.
11215 * decl.c (duplicate_decls): Don't consider template functions
11216 alike unless they have the same parameters. Refine handling of
11217 instantiation/specialization mismatches.
11218 (start_decl): Don't call pushdecl for template specializations,
11219 since they don't affect overloading.
11220 (start_function): Likewise.
11221 (grokfndecl): Call check_explicit_specialization a little later.
11222 Don't call duplicate_decls for memberm template specializations.
11223 (grokdeclarator): Don't update template_count for classes that are
11224 themselves specializations. Remove use of `2' as parameter to
11225 grokfndecl since that value isn't used.
11226 * lex.c (cons_up_default_function): Save and restore
11227 processing_explicit_instantiation around calls to grokfield.
11228 * parse.y (finish_member_template_decl): New function.
11229 (component_decl_1): Use it.
11230 (fn.def2): Likewise.
11231 (template_arg_list_opt): New nonterminal.
11232 (template_type): Use it.
11233 (self_template_type): Likewise.
11234 (template_id): Likewise.
11235 (object_template_id): Likewise.
11236 (notype_template_declarator): Likwise.
11237 (begin_explicit_instantiation): Likewise.
11238 (end_explicit_instantiation): Likewise.
11239 (explicit_instantiation): Use them.
11240 * pt.c (coerce_template_parms): Add parameters.
11241 (processing_explicit_instantiation): New variable.
11242 (convert_nontype_parameter): New function.
11243 (determine_overloaded_function): Likewise.
11244 (begin_explicit_instantiation): Likewise.
11245 (end_explicit_instantiation): Likewise.
11246 (retrieve_specialization): Likewise.
11247 (register_specialization): Likewise.
11248 (processing_explicit_specialization): Removed.
11249 (determine_specialization): Handle specializations of member
11250 functions of template class instantiations.
11251 (check_explicit_specialization): Refine to conform to standard.
11252 (comp_template_parms): New function.
11253 (coerce_template_parms): Call convert_nontype_parameter.
11254 (tsubst): Refine handling of member templates. Use
11255 register_specialization.
11256 (instantiate_template): Use retrieve_specialization.
11257 (do_decl_instantiation): Likewise.
11258 (instantiate_decl): Likewise.
11259 (type_unification): Improve handling of explict template
11261 * tree.c (mapcar): Return error_mark_node, rather than aborting,
11262 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
11263 * typeck.c (build_unary_op): Call determine_specialization, rather
11264 than determine_explicit_specialization.
11266 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
11268 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
11270 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11272 * error.c (dump_decl): For enum tags, output the tag, not its value.
11274 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
11276 * decl.c (init_decl_processing): Only call init_rtti_processing
11279 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
11281 * init.c (build_new_1): Split out from build_new.
11282 (build_new): Just return a NEW_EXPR.
11283 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
11285 * decl2.c (get_temp_regvar): Tweak.
11287 * cp-tree.h (TREE_CALLS_NEW): Comment out.
11288 * class.c (resolves_to_fixed_type_p): Remove use.
11289 * method.c (build_opfncall): Likewise.
11290 * call.c (build_new_op): Likewise.
11292 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
11294 * exception.cc (__eh_alloc, __eh_free): New fns.
11295 (__cp_push_exception, __cp_pop_exception): Use them.
11296 (__uncatch_exception): Call terminate here if no exception.
11297 * except.c (build_terminate_handler): New fn.
11298 (expand_start_catch_block): Use it.
11299 (expand_exception_blocks): Likewise.
11300 (alloc_eh_object): New fn.
11301 (expand_throw): Use it. Protect exception init with terminate.
11302 * typeck.c (build_modify_expr): Remove code that ignores trivial
11305 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11307 * call.c (add_builtin_candidate): Add default case in enumeration
11309 (build_new_op): Likewise.
11310 (convert_like): Likewise.
11311 * cvt.c (build_expr_type_conversion): Likewise.
11312 * tree.c (real_lvalue_p): Likewise.
11313 (lvalue_p): Likewise.
11314 (cp_tree_equal): Likewise.
11315 * typeck.c (comptypes): Likewise.
11316 (build_component_ref): Likewise.
11317 (build_function_call_real): Likewise.
11318 (build_binary_op_nodefault): Likewise.
11319 (build_unary_op): Likewise.
11320 (build_modify_expr): Likewise.
11321 * typeck2.c (initializer_constant_valid_p): Likewise.
11323 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
11325 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
11327 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
11329 * pt.c (coerce_template_parms): Make sure to digest_init if
11332 * decl.c (duplicate_decls): Make the newdecl virtual if the
11333 olddecl was, just as is done with other attributes of olddecl.
11335 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11337 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
11338 address of an OFFSET_REF.
11340 * cp-tree.def: Add AGGR_INIT_EXPR.
11341 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
11342 AGGR_INIT_EXPR where appropriate.
11343 * expr.c (cplus_expand_expr): Likewise. Simplify.
11345 * decl2.c (finish_file): Remove call to register_exception_table.
11347 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11349 * pt.c (instantiate_class_template): Don't do injection when
11350 processing_template_decl is true, as pollutes current_binding_level
11353 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
11355 * pt.c (maybe_fold_nontype_arg): Add prototype.
11357 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11359 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
11360 * error.c (dump_expr): Likewise.
11362 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
11364 * typeck.c (build_function_call_real): Remove "inline called before
11365 definition" pedwarn.
11367 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
11369 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11371 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
11373 * pt.c (type_unification_real): Change __null to type void* with
11376 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
11378 * call.c (implicit_conversion): Don't call
11379 build_user_type_conversion_1 with a NULL expr, since it will
11382 * pt.c (unify): Don't try to unify array bounds if either array is
11385 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11387 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
11388 Replace extern decls with casts.
11390 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
11391 Update last_parm_cleanup_insn.
11392 (store_after_parms): Remove.
11393 * cp-tree.h: Adjust.
11395 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11397 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
11398 (finish_file): Check DECL_COMDAT instead of weak|one_only.
11399 (import_export_vtable): Use make_decl_one_only instead of
11400 comdat_linkage for win32 tweak.
11401 (import_export_decl): Likewise.
11402 * pt.c (mark_decl_instantiated): Likewise.
11404 * decl2.c (finish_file): Lose handling of templates in pending_statics.
11406 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
11408 * decl2.c (finish_file): Lose call to expand_builtin_throw.
11409 * except.c (expand_builtin_throw): Remove.
11410 * cp-tree.h: Remove ptr_ptr_type_node.
11411 * decl.c: Likewise.
11413 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
11415 * decl.c (ptr_ptr_type_node): Define.
11416 (init_decl_processing): Initialize it.
11417 * cp-tree.h: Declare it.
11418 * exception.cc (__cp_exception_info): Use __get_eh_info.
11419 (__cp_push_exception): Likewise.
11420 (__cp_pop_exception): Likewise.
11422 From Scott Snyder <snyder@d0sgif.fnal.gov>:
11423 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
11425 (init_exception_processing): Removed saved_pc initialization.
11427 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
11429 * pt.c (instantiate_decl): Defer all templates but inline functions.
11431 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
11433 * init.c (expand_vec_init): Don't fold a list of parameters.
11435 * decl.c (copy_args_p): Handle copy elision for types with virtual
11437 * call.c (build_over_call): Likewise.
11439 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
11441 * pt.c (lookup_template_function): Copy the template arguments,
11442 not just the list containing them, to the permanent obstack.
11444 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
11446 * except.c (expand_start_catch_block): suspend_momentary for the
11449 * error.c (dump_decl): Handle LOOKUP_EXPR.
11451 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
11453 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
11454 permanent obstack if we are processing a template decl.
11455 * typeck.c (build_static_cast): Likewise.
11456 (build_const_cast): Likewise.
11457 (build_reinterpret_cast): Likewise.
11459 * pt.c (coerce_template_parms): Coerce some expressions, even
11460 when processing_template_decl.
11462 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11464 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
11465 handling of pointer difference expressions.
11467 * typeck.c (comp_target_types): Comparison of function/method types
11468 is independent of nptrs.
11470 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
11472 * pt.c (tsubst): Avoid creating pointer to reference and
11473 reference to reference types.
11475 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
11477 * parse.y (do_id): New nonterminal.
11478 (template_id): Use it.
11480 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11482 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
11483 * spew.c (yylex): Don't do_identifier here.
11484 * decl2.c (build_expr_from_tree): Revert last change.
11486 * decl2.c (build_expr_from_tree): Expand the name for a method call.
11487 * parse.y (object_template_id): Don't try to take the DECL_NAME.
11489 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
11491 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
11493 * call.c (build_op_delete_call): Adjust.
11495 * except.c (expand_end_catch_block): Lose rethrow region.
11496 (expand_start_catch_block): Likewise.
11497 (expand_end_catch_block): Don't expand_leftover_cleanups.
11499 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11501 * pt.c (tsubst): Remove tree_cons call (places redundant info into
11502 DECL_TEMPLATE_INSTANTIATION).
11504 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
11506 * tree.c (is_overloaded_fn): Handle getting a fn template.
11507 (really_overloaded_fn): Likewise.
11508 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
11509 * pt.c (check_explicit_specialization): Tweak.
11510 (determine_explicit_specialization): Tweak.
11512 * tree.c, cp-tree.h (get_target_expr): New fn.
11514 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
11516 * pt.c (check_explicit_specialization): Fix misspelling in
11517 diagnostic: `preceeded'.
11518 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
11521 1997-12-02 Mark Mitchell <mmitchell@usa.net>
11523 * pt.c (determine_explicit_specialization): Avoid an internal
11524 error for bad specializations.
11526 * method.c (build_overload_value): Handle SCOPE_REF.
11528 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
11530 * class.c (prepare_fresh_vtable): Enable even more complex MI
11533 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
11535 * exception.cc (__check_eh_spec): Optimize a bit.
11537 * exception.cc (__cp_pop_exception): Lose handler arg.
11538 * except.c (do_pop_exception): Likewise.
11539 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
11540 (expand_end_catch_block): Likewise.
11542 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11544 * pt.c (check_explicit_specialization): Complain about using a
11545 template-id for a non-specialization.
11547 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
11549 * repo.c: Prototype rindex only if needed.
11550 * xref.c: Likewise.
11552 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11554 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
11556 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
11558 * typeck.c (build_const_cast): Handle references here instead of
11559 handing off to convert_to_reference.
11561 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
11562 TerminateFunctionCall.
11563 (init_exception_processing): Likewise. Terminate et al are now
11564 the fns, not ADDR_EXPRs.
11565 (various): Lose redundant assemble_external calls.
11566 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
11568 * cp-tree.h (struct lang_decl_flags): Add comdat.
11569 (DECL_COMDAT): New macro.
11570 * decl.c (duplicate_decls): Propagate it.
11571 (cp_finish_decl): Handle it.
11572 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
11574 * class.c: Remove static pending_hard_virtuals.
11575 (add_virtual_function): Take pointers to pending_virtuals
11576 and pending_hard_virtuals.
11577 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
11579 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
11581 * decl2.c (import_export_vtable): If we support one_only but not
11582 weak symbols, mark instantiated template vtables one_only.
11583 (import_export_decl): Likewise for tinfo functions.
11584 (finish_vtable_vardecl): Also write out vtables from explicitly
11585 instantiated template classes.
11586 * pt.c (mark_class_instantiated): Revert last change.
11588 * except.c (expand_throw): Call mark_used on the destructor.
11590 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
11592 * lex.c (lang_init): Enable flag_exceptions by default if no
11593 command line switch was specified.
11595 1997-11-26 Mark Mitchell <mmitchell@usa.net>
11597 * pt.c (unify): Handle `void' template parameters in
11600 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
11602 * rtti.c (build_dynamic_cast): Handle template case here.
11603 (build_dynamic_cast_1): Not here.
11605 * typeck2.c (digest_init): Make copies where appropriate.
11607 * decl2.c (delete_sanity): resolve_offset_ref.
11609 * except.c: Call terminate without caching so many bits.
11611 * except.c (expand_start_catch_block): Fix catching a reference
11614 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11616 * init.c (build_new): Copy size to the saveable obstack.
11618 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
11619 TRY_CATCH_EXPR for now.
11621 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
11623 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
11624 has DECL_LANG_SPECIFIC.
11626 * exception.cc (struct cp_eh_info): Add handlers field.
11627 (__cp_push_exception): Initialize it.
11628 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
11629 (__throw_bad_exception): Remove.
11630 * except.c (call_eh_info): Add handlers field.
11631 (get_eh_handlers): New fn.
11632 (push_eh_cleanup): Increment handlers.
11634 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
11636 * except.c (expand_start_eh_spec): Use the try/catch code.
11637 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
11638 doing everything inline.
11639 (init_exception_processing): throw_type_match now takes
11640 const void pointers.
11641 * exception.cc (__check_eh_spec): New fn.
11642 * inc/exception: Neither terminate nor unexpected return.
11643 * decl.c: Make const_ptr_type_node public.
11644 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
11646 * except.c (expand_start_catch_block): We only need the rethrow
11647 region for non-sjlj exceptions.
11648 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
11650 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
11652 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
11653 (various.o): Likewise.
11654 * inc/new: Add placement deletes. Add throw specs for default new.
11655 * new.cc (set_new_handler): Move here from libgcc2.
11656 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
11657 (new): Move from libgcc2. Throw bad_alloc.
11658 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
11659 * decl.c (init_decl_processing): Update exception specs on new and
11662 * method.c (build_decl_overload_real): Don't mess with global
11665 * init.c (build_new): Check for null throw spec, not nothrow_t.
11667 * decl.c (duplicate_decls): Don't complain about different exceptions
11668 from an internal declaration.
11670 * call.c (build_op_delete_call): Fix check for member fns again.
11672 * decl2.c (import_export_decl): Interface hackery affects
11673 virtual synthesized methods.
11675 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11677 * decl.c (start_decl): Don't just complain about a mismatched
11680 * decl.c (make_implicit_typename): Handle case where t is not
11681 actually from context.
11682 * tree.c (get_type_decl): Lose identifier case.
11683 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
11684 * parse.y (nonnested_type): Just use lookup_name.
11685 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
11687 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
11689 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
11690 T was built in C language context (for example, by
11691 output_func_start_profiler).
11693 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
11695 * decl.c (make_implicit_typename): New fn.
11696 (lookup_name_real): Use it. Use current_class_type as the context.
11698 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
11700 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
11702 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11704 * friend.c (do_friend): Warn about non-template friends in templates.
11706 * call.c (build_op_delete_call): Fix handling of inherited delete.
11708 * search.c (dfs_record_inheritance): Ignore template type parms.
11710 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
11712 * call.c (build_new_op): Fix copy error.
11713 (build_op_new_call): New fn.
11714 (build_op_delete_call): New fn.
11715 * cp-tree.h: Declare them.
11716 * init.c (build_new): Use them. Support placement delete.
11717 (build_x_delete): Use build_op_delete_call.
11718 (build_delete): Likewise.
11719 * decl2.c (delete_sanity): Likewise.
11720 (coerce_delete_type): Don't complain about placement delete.
11722 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
11724 * call.c (build_new_function_call): Remove unused 'obj' parm.
11725 * cp-tree.h, typeck.c: Adjust.
11727 * init.c (build_new): Make the cleanup last longer.
11728 (expand_vec_init): Call do_pending_stack_adjust.
11730 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
11732 * pt.c (do_type_instantiation): Fix typo.
11733 (mark_class_instantiated): If we support one_only but not weak
11734 symbols, don't mark this as known.
11736 * init.c (build_new): Handle vec delete in EH cleanup.
11738 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11740 * call.c (build_method_call): Call complete_type before checking
11743 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
11745 * decl.c (add_block_current_level): Delete.
11746 * init.c (build_vec_delete_1): Delete build_block and
11747 add_block_current_level calls.
11749 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
11751 * init.c (build_new): Handle freeing allocated memory when the
11752 constructor throws.
11754 * call.c (build_new_method_call): Fix flags arg.
11756 * pt.c (do_type_instantiation): Don't try to instantiate
11758 (mark_decl_instantiated): If we support one_only but not
11759 weak symbols, mark this one_only.
11760 * decl2.c (import_export_vtable): Don't defer handling of vtables
11761 if MULTIPLE_SYMBOL_SPACES.
11763 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11765 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
11767 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
11769 * except.c (do_pop_exception): Return a value.
11771 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
11773 * call.c (build_new_method_call): Handle getting a
11774 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
11775 if we got template parms.
11776 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
11778 * decl2.c (build_expr_from_tree): Tweak last change.
11779 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
11780 (maybe_fold_nontype_arg): Split out from tsubst_copy.
11781 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
11783 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
11785 * pt.c (tsubst_copy): Handle explicit template arguments in
11787 * typeck.c (build_x_function_call): Likewise.
11788 * decl2.c (build_expr_from_tree): Lookup function name if it
11791 * pt.c (tsubst): Instantiate template functions properly when
11792 template parameter does not appear in function arguments and return
11794 (comp_template_args): Handle member templates required by tsubst.
11796 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
11798 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
11801 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
11803 * pt.c (coerce_template_parms): Tweak error message.
11805 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
11806 return type defaults to `int', even if there are storage-class
11809 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
11811 Complete nested exception support.
11812 * except.c (do_pop_exception): Split out...
11813 (push_eh_cleanup): From here. Handle the EH region by hand.
11814 (expand_start_catch_block): Add a new level for the catch parm.
11815 Move the rethrow region outside the two cleanup regions.
11816 Protect the initializer for the catch parm with terminate.
11817 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
11818 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
11819 popping off the middle of the stack.
11820 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
11821 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
11822 (build_cplus_new): Only wrap CALL_EXPRs.
11823 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
11824 the constructor call.
11826 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11828 * Make-lang.in (c++.distdir): Make inc subdirectory.
11830 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
11832 * decl2.c (finish_file): Put back some code.
11834 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11836 * decl2.c (finish_file): Remove redundant code.
11837 * method.c (emit_thunk): Don't let the backend defer generic thunks.
11839 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
11841 * except.c (call_eh_info): Split out...
11842 (push_eh_info): From here.
11843 (expand_builtin_throw): Use it.
11844 (expand_start_catch_block): Move region start back.
11846 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
11848 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
11849 (real_yylex): Record wide strings using target endianness, not host.
11851 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
11853 * repo.c (rindex): Add decl unconditionally.
11854 (get_base_filename, open_repo_file): Don't cast rindex.
11855 * xref.c (rindex): Add decl unconditionally.
11856 (index): Remove unused decl.
11857 (open_xref_file): Don't cast rindex.
11859 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
11861 * class.c (build_vbase_path): Propagate the result type properly.
11863 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
11865 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
11866 remaining use of saved_throw_type with a call to get_eh_type.
11868 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
11870 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
11871 (file_name_nondirectory): New function, doing the same as the macro.
11872 (set_typedecl_interface_info): Use it instead of the macro.
11873 (check_newline): Likewise.
11874 (handle_cp_pragma): Likewise.
11876 * repo.c (get_base_filename): Cast result of rindex to char*.
11877 (open_repo_file): Likewise.
11878 * xref.c (open_xref_file): Likewise.
11879 * error.c (dump_char): Make its arg int, not char.
11881 * except.c (push_eh_info): Pass the number of fields - 1 down, not
11882 the exact number of fields.
11884 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
11886 Support for nested exceptions.
11887 * tinfo2.cc (__is_pointer): New fn.
11888 * exception.cc (struct cp_eh_info): Define.
11889 (__cp_exception_info, __uncatch_exception): New fns.
11890 (__cp_push_exception, __cp_pop_exception): New fns.
11891 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
11893 (init_exception_processing): Likewise. __eh_pc is now external.
11894 (push_eh_info): New fn.
11895 (get_eh_{info,value,type,caught}): New fns.
11896 (push_eh_cleanup): Just call __cp_pop_exception.
11897 (expand_start_catch_block): Use push_eh_info. Start the eh region
11899 (expand_end_eh_spec): Use push_eh_info.
11900 (expand_throw): Call __cp_push_exception to set up the exception info.
11901 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
11903 (expand_builtin_throw): Don't refer to empty_fndecl.
11905 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
11907 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
11909 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
11911 * method.c (build_template_parm_names, build_decl_overload_real):
11912 Add static to definitions.
11913 * pt.c (add_to_template_args, note_template_header,
11914 processing_explicit_specialization, type_unification_real): Likewise.
11915 ({determine,check}_explicit_specialization): Use a single string for
11918 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
11920 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
11921 (expand_end_catch_block): Likewise.
11922 (expand_end_eh_spec): Likewise.
11924 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
11926 * decl.c (duplicate_decls): Handle template specializations
11928 * error.c (dump_function_name): Fix printing of specializations of
11929 member functions that are not member templates.
11930 * cp-tree.h (processing_specialization): Make global.
11931 * pt.c (processing_specialization): Likewise.
11932 * lex.c (cons_up_default_function): Save and restore
11933 processing_specialization to avoid confusion.
11935 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
11937 * decl.c (init_decl_processing): Give null_node unknown* type.
11938 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
11939 (common_type): Likewise.
11940 * error.c (args_as_string): Recognize null_node.
11942 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
11944 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
11945 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
11947 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
11949 * Make-lang.in (g++): Include prefix.o.
11951 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
11953 * pt.c (determine_explicit_specialization): Initialize "dummy"
11954 to keep Purify quiet.
11956 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
11958 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
11959 (build_overload_int): Not here.
11961 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
11963 * class.c (build_type_pathname): Remove.
11964 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
11966 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
11968 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
11969 &&label GNU extension.
11971 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
11973 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
11974 so as to avoid incorrect manglings.
11975 * method.c (build_decl_overload_real): Don't mangle return types
11978 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
11980 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
11981 scratch_tree_cons): Define as macros for now.
11982 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
11983 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
11984 typeck2.c: Use them and the expression_obstack variants.
11986 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11988 * decl.c (store_return_init): Allow classes with explicit ctors to
11989 be used with the named return values extension.
11991 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
11993 * pt.c (instantiate_decl): Fix previous change.
11995 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
11997 * pt.c (tsubst): Fix thinko.
11998 (instantiate_decl): Really use the original template.
12000 * call.c (build_new_method_call): Use simple constructor_name for
12003 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
12005 * method.c (build_underscore_int): Don't use ANSI specific
12008 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12010 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
12011 for our key method; it might have been inlined by -O3.
12013 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
12015 * decl.c (make_typename_type): Do not try to call lookup_field for
12016 non-aggregate types.
12018 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
12020 * typeck.c (build_reinterpret_cast): Tweak.
12022 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12024 * typeck.c (build_reinterpret_cast): Converting a void pointer
12025 to function pointer with a reinterpret_cast produces a warning
12026 if -pedantic is issued.
12028 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
12030 * typeck.c (c_expand_return): Don't warn about returning a
12031 reference-type variable as a reference.
12033 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
12035 * method.c (build_static_name): Fix typo.
12037 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
12039 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
12040 OLDDECL before we try to do DECL_USE_TEMPLATE.
12042 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12044 * decl.c (duplicate_decls): Don't warn about template instances.
12046 * typeck.c (mark_addressable): Lose ancient code that unsets
12049 * pt.c (do_decl_instantiation): Lose support for instantiating
12052 * call.c (build_new_function_call): Fix handling of null explicit
12054 (build_new_method_call): Likewise.
12056 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
12058 * method.c (build_underscore_int): Fix typo.
12060 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
12062 * tree.c (print_lang_statistics): #if 0 call to
12063 print_inline_obstack_statistics until its definition is checked in.
12065 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12067 * decl2.c (finish_file): Move dump_tree_statistics to end.
12069 * pt.c (instantiate_decl): Look for the original template.
12070 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
12071 of member templates.
12073 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12075 * Makefile.in (g++FAQ.*): New rules.
12076 (CONFLICTS): Update.
12077 * g++FAQ.texi: Moved from libg++.
12079 * parse.y (PFUNCNAME): Only specify the type once.
12081 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
12083 * lex.c (real_yylex): Clean up the code to fully behave the way
12084 the c-lex.c parser does for complex and real numbers.
12086 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12088 * method.c (build_decl_overload_real): Reformat.
12090 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
12092 * method.c (synthesize_method): If at_eof, determine our linkage.
12094 1997-09-29 Paul Eggert <eggert@twinsun.com>
12096 * lex.c (real_yylex): Treat `$' just like `_', except issue a
12097 diagnostic if !dollars_in_ident or if pedantic.
12099 * lang-specs.h (@c++): -ansi no longer implies -$.
12101 * decl2.c (lang_decode_option):
12102 -traditional and -ansi now do not mess with
12105 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
12107 * Makefile.in (parse.o, decl.o): Also depend on
12108 $(srcdir)/../except.h $(srcdir)/../output.h.
12109 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
12110 $(srcdir)/../except.h $(srcdir)/../output.h.
12111 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
12114 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
12116 * expr.c (cplus_expand_expr): Make it static.
12118 * decl2.c, init.c, typeck.c: Include "expr.h".
12119 (expand_expr): Use proper values when calling the function.
12121 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
12123 * lang-options.h: New -Wold-style-cast flag.
12124 * cp-tree.h (warn_old_style_cast): New variable.
12125 * decl2.c (warn_old_style_cast): Likewise.
12126 (lang_decode_option): Support -Wold-style-cast.
12127 (reparse_absdcl_as_casts): Produce old-style-cast warning.
12129 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12131 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
12132 TREE_USED, reset value based on already_used.
12134 * init.c (expand_member_init): Revert change.
12136 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12138 * cp-tree.h, decl.c, decl2.c, pt.c:
12139 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
12141 * decl2.c (lang_decode_option): Add missing ;.
12143 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12145 * friend.c (do_friend): Disable injection for all template-derived
12147 * decl2.c (lang_decode_option): Handle -fguiding-decls.
12148 * parse.y (notype_template_declarator): New nonterminal.
12149 (direct_notype_declarator): Use it.
12150 (complex_direct_notype_declarator): Likewise.
12151 (object_template_id): Accept any kind of identifier after TEMPLATE.
12152 (notype_qualified_id): Don't add template declarators here.
12154 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
12156 * call.c (add_template_candidate): Add explicit_targs parameter.
12157 (build_scoped_method_call): Use it.
12158 (build_overload_call_real): Likewise.
12159 (build_user_type_conversion_1): Likewise.
12160 (build_new_function_call): Likewise.
12161 (build_object_call): Likewise.
12162 (build_new_op): Likewise.
12163 (build_new_method_call): Likewise.
12164 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
12165 (build_new_method_call): Likewise.
12167 * class.c (finish_struct_methods): Add specialization pass to
12168 determine which methods were specializing which other methods.
12169 (instantiate_type): Handle TEMPLATE_ID_EXPR.
12171 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
12173 * cp-tree.h (name_mangling_version): New variable.
12174 (flag_guiding_decls): Likewise.
12175 (build_template_decl_overload): New function.
12176 (begin_specialization): Likewise.
12177 (reset_specialization): Likewise.
12178 (end_specialization): Likewise.
12179 (determine_explicit_specialization): Likewise.
12180 (check_explicit_specialization): Likewise.
12181 (lookup_template_function): Likewise.
12182 (fn_type_unification): Add explicit_targs parameter.
12183 (type_unification): Likewise.
12185 * decl.c (duplicate_decls): Add smarts for explicit
12187 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
12189 (grokfndecl): Call check_explicit_specialization.
12191 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
12192 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
12193 (check_classfn): Handle specializations.
12195 * error.c (dump_function_name): Print specialization arguments.
12197 * friend.c (do_friend): Don't call pushdecl for template
12200 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
12202 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
12203 and -fno-guiding-decls.
12205 * lex.c (identifier_type): Return PFUNCNAME for template function
12208 * method.c (build_decl_overload_real): New function.
12209 (build_template_parm_names): New function.
12210 (build_overload_identifier): Use it.
12211 (build_underscore_int): New function.
12212 (build_overload_int): Use it. Add levels for template
12214 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
12215 (build_overload_nested_names): Handle template type parameters.
12216 (build_template_decl_overload): New function.
12218 * parse.y (YYSTYPE): New ntype member.
12219 (nested_name_specifier): Use it.
12220 (nested_name_specifier_1): Likewise.
12221 (PFUNCNAME): New token.
12222 (template_id, object_template_id): New non-terminals.
12223 (template_parm_list): Note specializations.
12224 (template_def): Likewise.
12225 (structsp): Likewise.
12226 (fn.def2): Handle member template specializations.
12227 (component_decl_1): Likewise.
12228 (direct_notype_declarator): Handle template-ids.
12229 (component_decl_1): Likewise.
12230 (direct_notype_declarator): Handle template-ids.
12231 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
12233 * pt.c (processing_specializations): New variable.
12234 (template_header_count): Likewise.
12235 (type_unification_real): New function.
12236 (processing_explicit_specialization): Likewise.
12237 (note_template_header): Likewise.
12238 (is_member_template): Handle specializations.
12239 (end_template_decl): Call reset_specialization.
12240 (push_template_decl): Handle member template specializations.
12241 (tsubst): Likewise.
12242 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
12243 (instantiate_template): Handle specializations.
12244 (instantiate_decl): Likewise.
12245 (fn_type_unification): Handle explicit_targs.
12246 (type_unification): Likewise. Allow incomplete unification
12247 without an error message, if allow_incomplete.
12248 (get_bindings): Use new calling sequence for fn_type_unification.
12250 * spew.c (yylex): Handle PFUNCNAME.
12252 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
12253 (really_overloaded_fn): Likewise.
12254 (get_first_fn): Handle function templates.
12256 * typeck.c (build_x_function_call): Use really_overloaded_fn.
12257 Handle TEMPLATE_ID_EXPR.
12258 (build_x_unary_op): Likewise.
12259 (build_unary_op): Likewise.
12260 (mark_addressable): Templates whose address is taken are marked
12263 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12265 * decl.c (init_decl_processing): Declare __builtin_constant_p as
12266 accepting any kind of type, not only int.
12268 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12270 * search.c (get_matching_virtual): Notice virtual bases when sorrying
12271 about covariant returns.
12273 * parse.y (member_init): Also imply typename here. Remove ancient
12274 extension for initializing base members.
12276 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12278 Handle multi-level typenames and implicit typename in base list.
12279 * parse.y (typename_sub{,[0-2]}): New rules.
12280 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
12281 (nonnested_type): New rule.
12282 (complete_type_name): Use it.
12283 (base_class.1): Use typename_sub and nonnested_type.
12284 (nested_name_specifier): Don't elide std:: here.
12285 * decl.c (make_typename_type): Handle getting a type for NAME.
12286 (lookup_name_real): Turn std:: into :: here.
12288 Rvalue conversions were removed in London.
12289 * call.c (is_subseq): Don't consider lvalue transformations.
12290 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
12291 (joust): Re-enable ?: kludge.
12293 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
12295 * decl.c (start_function): Up warning of no return type to be a
12298 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12300 * init.c (expand_member_init): Don't set TREE_USED.
12301 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
12302 set,don't clear TREE_USED wholesale.
12304 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
12306 * call.c (build_over_call): Do require_complete_type before
12309 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12311 * search.c (lookup_field): Call complete_type in all cases.
12313 * decl.c (finish_function): Just warn about flowing off the end.
12315 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12317 * decl.c (grokparms): Don't bash a permanent list node if we're
12320 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
12322 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
12324 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
12326 * call.c (build_new_op): Give better error for syntactically
12327 correct, but semantically invalid, use of undeclared template.
12329 * call.c (compare_qual): Handle pmfs.
12331 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
12332 after the exception spec.
12334 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12336 * call.c (null_ptr_cst_p): Integer type, not integral type.
12338 * call.c (joust): Disable warnings until they can be moved to the
12341 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
12343 * Makefile.in, config-lang.in: Convert to autoconf.
12345 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12347 * decl.c (lookup_name_real): Add implicit 'typename' to types from
12350 * pt.c (most_specialized_class): Fix typo.
12351 (tsubst): Move constant folding to TREE_VEC case.
12353 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
12355 * pt.c (do_poplevel): Don't warn about unused local variables
12356 while processing_template_decl since we don't always know whether
12357 or not they will need constructing/destructing.
12359 * pt.c (uses_template_parms): Check the values of an enumeration
12360 type to make sure they don't depend on template parms.
12362 * decl.c (make_typename_type): Don't lookup the field if the
12363 context uses template parms, even if we're not
12364 processing_template_decl at the moment.
12366 * pt.c (coerce_template_parms): Avoid looking at the
12367 TYPE_LANG_DECL portion of a typename type, since there won't be
12369 (tsubst): Do constant folding as necessary to make sure that
12370 arguments passed to lookup_template_class really are constants.
12372 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
12374 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
12375 * decl2.c (finish_file): Only register exception tables if we
12378 * decl.c (init_decl_processing): Add __builtin_[fs]p.
12380 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12382 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
12384 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
12386 * error.c (dump_decl): Avoid crashing when presented with a
12387 uninitialized constant, as can occur with a template parameter.
12388 (dump_expr): Make sure that there are enough levels of
12389 current_template_parms before we start diving through them.
12391 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
12393 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
12396 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12398 * except.c (expand_throw): Call build_delete for all
12399 exception types, not just objects with destructors.
12401 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
12403 * decl.c (current_local_enum): Remove static.
12404 * pt.c (tsubst_enum): Save and restore value of current_local_enum
12405 in case template is expanded in enum decl.
12406 (instantiate_class_template): Use new tsubst_enum signature.
12407 (tsubst_expr): Likewise.
12409 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
12411 * pt.c (begin_member_template_processing): Take a function as
12412 argument, not a set of template arguments. Use the template
12413 parameters, rather than the arguments. Handle non-type parameters
12414 correctly. Push a binding level for the parameters so that multiple
12415 member templates using the same parameter names can be declared.
12416 (end_member_template_processing): Pop the binding level.
12417 (push_template_decl): Mark member templates as static when
12420 * lex.c (do_pending_inlines): Pass the function, not its template
12421 arguments, to begin_member_template_processing.
12422 (process_next_inline): Likewise.
12423 (do_pending_defargs): Likewise.
12425 * error.c (dump_expr): Obtain the correct declaration for a
12426 TEMPLATE_CONST_PARM.
12428 * call.c (add_template_conv_candidate): New function.
12429 (build_object_call): Handle member templates, as done in the other
12432 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
12434 * decl.c (replace_defag): Undo previous change.
12435 * lex.c (do_pending_defargs): Deal with member templates.
12437 * pt.c (is_member_template): Avoid crashing when passed a
12438 non-function argument.
12440 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
12442 * class.c (grow_method): Remove check for redeclaration.
12444 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
12446 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
12447 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
12448 (PRIMARY_TEMPLATE_P): Use it.
12449 * call.c (build_overload_call_real): Use it.
12450 * class.c (instantiate_type): Likewise.
12451 * decl.c (decls_match): Likewise.
12452 * method.c (build_overload_identifier): Likewise.
12453 * pt.c (push_template_decl): Likewise.
12454 (classtype_mangled_name): Likewise.
12455 (lookup_template_class): Likewise.
12457 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
12458 DECL_NTPARMS to conform to usage elsewhere.
12459 * call.c (add_template_candidate): Likewise.
12460 * class.c (instantiate_type): Likewise.
12461 * pt.c (instantiate_template): Likewise.
12462 (get_bindings): Likewise.
12464 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
12465 is_member_template.
12467 * pt.c (unify): Undo changes to allow multiple levels of template
12469 (type_unification): Likewise.
12470 (fn_type_unification): Likewise.
12471 (get_class_bindings): Likewise.
12472 * cp-tree.h (Likewise).
12474 * decl.c (replace_defarg): Check that the type of the default
12475 parameter does not invlove a template type before complaining
12476 about the initialization.
12478 * error.c (dump_expr): Deal with template constant parameters in
12479 member templates correctly.
12481 * pt.c (is_member_template): Deal with class specializations
12483 (tsubst): Handle "partial instantiation" of member templates
12486 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
12488 * pt.c (type_unification): Change calling sequence to allow for
12489 multiple levels of template parameters.
12490 (tsubst_expr): Likewise.
12491 (tsubst): Likewise.
12492 (tsubst_copy): Likewise.
12493 (instantiate_template): Likewise.
12495 * call.c (build_overload_call_real): Use it.
12496 (add_builtin_candidate): Use it.
12497 (build_new_method_call): Use it.
12498 * class.c (instantiate_type): Use it.
12499 * decl.c (grokdeclarator): Use it.
12500 * decl2.c (finish_file): Use it.
12501 * method.c (build_overload_identifier): Use it.
12503 * call.c (add_template_candidate): Add additional parameter for
12504 the function return type. Call fn_type_unification istead of
12506 (build_user_type_conversion_1): Handle member templates.
12507 (build_new_function_call): Likewise.
12508 (build_new_op): Likewise.
12509 (build_new_method_call): Likewise.
12511 * class.c (grow_method): Don't give an error message indicating
12512 that two member templates with the same name are ambiguous.
12513 (finish_struct): Treat member template functions just like member
12516 * cp-tree.h (check_member_template): Add declaration.
12517 (begin_member_template_processing): Likewise.
12518 (end_member_template_processing): Likewise.
12519 (fn_type_unification): Likewise.
12520 (is_member_template): Likewise.
12521 (tsubst): Change prototype.
12522 (tsubst_expr): Likewise.
12523 (tsubst_copy): Likewise.
12524 (instantiate_template): Likewise.
12525 (get_bindings): Likewise.
12527 * decl.c (decls_match): Handle multiple levels of template
12529 (pushdecl): Handle template type params just like other type
12531 (push_class_level_binding): Return immediately if the
12532 class_binding_level is NULL.
12533 (grokfndecl): If check_classfn() returns a member_template, use
12534 the result of the template, not the template itself.
12536 * decl2.c (check_member_template): New function. Check to see
12537 that the entity declared to be a member template can be one.
12538 (check_classfn): Allow redeclaration of member template functions
12539 with different types; the new functions can be specializations or
12540 explicit instantiations.
12542 * error.c (dump_decl): Handle multiple levels of template
12544 (dump_function_decl): Update to handle function templates.
12546 * lex.c (do_pending_inlines): Set up template parameter context
12547 for member templates.
12548 (process_next_inline): Likewise.
12550 * method.c (build_overload_identifier): Adjust for multiple levels
12551 of template parameters.
12553 * parse.y (fn.def2): Add member templates.
12554 (component_decl_1): Likewise.
12556 * pt.c (begin_member_template_processing): New function.
12557 (end_member_template_processing): Likewise.
12558 (is_member_template): Likewise.
12559 (fn_type_unification): Likewise.
12560 (current_template_parms): Return a vector of all the template
12561 parms, not just the innermost level of parms.
12562 (push_template_decl): Deal with the possibility of member
12564 (lookup_template_class): Likewise.
12565 (uses_template_parms): Likewise.
12566 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
12567 TEMPLATE_CONST_PARM to deal with multiple levels of template
12568 arguments. Add processing of TEMPLATE_DECL to produce new
12569 TEMPLATE_DECLs from old ones.
12570 (do_decl_instantiation): Handle member templates.
12572 * search.c (lookup_fnfields_1): Handle member template conversion
12575 * tree.c (cp_tree_equal): Check the levels, as well as the
12576 indices, of TEMPLATE_CONST_PARMs.
12578 * typeck.c (comptypes): Check the levels, as well as the indices,
12579 fo TEMPLATE_TYPE_PARMs.
12580 (build_x_function_call): Treat member templates like member
12583 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12585 * typeck.c (c_expand_return): Always convert_for_initialization
12586 before checking for returning a pointer to local.
12588 * pt.c (type_unification): If strict and the function parm doesn't
12589 use template parms, just compare types.
12591 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
12593 * method.c (build_overloaded_value): Replace direct call
12594 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
12596 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
12598 * typeck.c (convert_arguments): Don't arbitrarily choose the first
12599 of a set of overloaded functions.
12601 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
12603 * lex.c (real_yylex): Don't elide __FUNCTION__.
12605 * method.c (build_overload_value): Add in_template parm.
12606 (build_overload_int): Likewise.
12607 (build_overload_identifier): Pass it.
12609 * decl.c (duplicate_decls): Don't bash a previous template
12610 definition with a redeclaration.
12612 * pt.c (unify): float doesn't match double.
12614 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
12615 TYPE_DECL. Handle getting non-template types.
12616 * parse.y (explicit_instantiation): Use typespec instead of
12617 aggr template_type.
12619 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
12621 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
12623 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
12625 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
12626 (compare_ics): Likewise.
12628 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12630 * call.c (joust): Warn about choosing one conversion op over
12631 another because of 'this' argument when the other return type is
12633 (source_type): New fn.
12635 * call.c (build_new_op): Strip leading REF_BIND from first operand
12636 to builtin operator.
12638 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
12641 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
12643 * call.c (null_ptr_cst_p): Remove support for (void*)0.
12645 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
12647 * typeck.c (expand_target_expr): Make definition match declaration.
12649 * class.c (get_basefndecls): Make definition match declaration.
12651 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
12653 * input.c (sub_getch): Eventually give up and release the input file.
12655 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
12658 * call.c (joust): Tweak message.
12660 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
12662 * error.c (type_as_string): Put const/volatile on template type
12663 parameters where appropriate.
12665 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
12667 * call.c (strictly_better): Make arguments unsigned ints.
12669 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
12671 * lex.c (real_yylex): Refer to __complex instead of complex.
12673 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
12675 * lex.c (real_yylex): Don't use getc directly.
12677 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12679 * call.c (is_subseq): Don't try to be clever.
12681 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12683 * parse.y, pt.c: Include "except.h".
12684 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
12685 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
12686 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
12687 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
12690 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
12692 * decl2.c (mark_vtable_entries): Instead of replacing pure
12693 virtuals with a reference to __pure_virtual, copy the decl and
12696 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12698 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
12700 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
12702 * pt.c (instantiate_class_template): Call repo_template_used
12703 before finish_prevtable_vardecl.
12705 * call.c (is_subseq): New fn.
12706 (compare_ics): Use it.
12708 * repo.c (finish_repo): Don't crash on no args.
12710 * parse.y (named_complex_class_head_sans_basetype): Handle
12711 explicit global scope.
12712 * decl2.c (handle_class_head): New fn.
12714 * pt.c (unify): Add CONST_DECL case.
12716 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12718 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
12720 * cp-tree.h (report_type_mismatch): Add prototype.
12721 * call.c (build_overload_call_real): Remove erroneous fourth
12722 argument to report_type_mismatch.
12723 (build_user_type_conversion_1): Remove erroneous second arg to
12725 (build_new_function_call): Likewise.
12726 (build_object_call): Likewise.
12727 (build_new_op): Likewise.
12728 (build_new_method_call): Likewise.
12730 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12732 * error.c (dump_decl): Don't bother processing a function with no
12733 DECL_LANG_SPECIFIC.
12735 * method.c (emit_thunk): Call init_function_start in the macro case.
12737 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
12739 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
12740 defined and used to set flag_vtable_thunks.
12742 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
12744 * parse.y: Don't clear the inlines from their obstack until they've
12745 all been processed.
12747 * decl.c (duplicate_decls): Don't complain about exception
12748 specification mismatch if flag_exceptions is off.
12750 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
12752 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
12754 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
12756 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
12757 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
12758 Include <stdio.h> before include files that formerly used STDIO_PROTO.
12760 * decl.c, g++spec.c, lex.c, method.c, repo.c:
12761 Include "config.h" first, as per autoconf manual.
12763 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
12765 * decl.c (duplicate_decls): Tweak wording.
12766 * lex.c (do_pending_defargs): Don't die if we see a default arg
12767 that isn't a DEFAULT_ARG.
12768 * error.c (dump_expr): Handle DEFAULT_ARG.
12770 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
12771 * lang-options.h: Add -fhandle-exceptions.
12773 * class.c (build_vtable): Vtables are artificial.
12774 (prepare_fresh_vtable): Likewise.
12776 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12778 * cvt.c (ocp_convert): After converting to the target type, set
12779 LOOKUP_NO_CONVERSION.
12781 * call.c (joust): Warn about potentially confusing promotion rules
12783 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
12785 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
12787 * exception.cc: Declare __terminate_func with noreturn attribute.
12789 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
12791 * parse.y: Break out eat_saved_input, handle errors.
12792 (function_try_block): Use compstmt instead of compstmt_or_error.
12794 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
12796 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
12798 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12800 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
12801 existence of cc1plus check whether $(LANGUAGES) contains C++.
12803 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
12805 * method.c (do_build_copy_constructor): When copying an anonymous
12806 union member loop around to handle nested anonymous unions. Use
12807 the offset of the member relative to the outer structure, not the
12810 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12812 * call.c (resolve_args): New fn.
12813 (build_new_function_call): Use it.
12814 (build_object_call): Likewise.
12815 (build_new_method_call): Likewise.
12817 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
12819 * call.c (build_over_call): tsubst all default parms from templates.
12821 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
12823 * decl.c (struct cp_function): Add static_labelno.
12824 (push_cp_function_context): Save it.
12825 (pop_cp_function_context): Restore it.
12827 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
12829 * typeck.c (build_component_ref_1): Convert from reference.
12831 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12833 * parse.y (current_declspecs, prefix_attributes): Initialize to
12836 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
12837 before we try to force it to be a TREE_LIST.
12838 (decl): Make sure $1.t is non-nil.
12840 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
12842 * pt.c (uses_template_parms): Handle template first-parse codes.
12844 * decl.c (cp_finish_decl): Only warn about user-defined statics.
12846 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12848 * pt.c (unify): Handle BOOLEAN_TYPE.
12850 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
12851 * pt.c (tsubst): Don't set it.
12852 * call.c (build_over_call): Use uses_template_parms.
12854 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
12856 * method.c (build_overload_nested_name): Use static_labelno
12857 instead of var_labelno.
12858 (build_qualified_name): New fn.
12859 (build_overload_name): Split out from here.
12860 (build_static_name): Use build_qualified_name.
12861 * decl.c (cp_finish_decl): Statics in extern inline functions
12862 have comdat linkage.
12863 (start_function): Initialize static_labelno.
12865 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12867 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
12868 before "all member functions in class [] are private".
12870 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
12872 * lex.c (do_scoped_id): convert_from_reference.
12873 * init.c (build_offset_ref): Likewise.
12875 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
12877 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
12879 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12881 * typeck.c (get_member_function_from_ptrfunc): Promote index
12884 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
12886 * tree.c (layout_basetypes): Move non-virtual destructor warning.
12887 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
12889 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12891 * decl.c (grokdeclarator): Call add_defarg_fn for the function
12893 * lex.c (add_defarg_fn): Adjust.
12894 (do_pending_defargs): Adjust. Don't skip the first parm.
12896 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
12898 * decl.c (build_enumerator): Global enumerators are also readonly.
12900 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
12901 (build_dynamic_cast): Call it and convert_from_reference.
12903 * lex.c (add_defarg_fn): New fn.
12904 (snarf_defarg): Don't add to defarg_types.
12905 (do_pending_defargs): Lose defarg_types. All fns we process now
12907 * decl.c (grokfndecl): Call add_defarg_fn.
12909 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
12910 * cp-tree.def: Add DEFAULT_ARG.
12911 * spew.c (yylex): Call snarf_defarg as appropriate.
12912 * parse.y: New tokens DEFARG and DEFARG_MARKER.
12913 (defarg_again, pending_defargs, defarg, defarg1): New rules.
12914 (structsp): Use pending_defargs.
12915 (parms, full_parm): Use defarg.
12916 * lex.c (init_lex): Initialize inline_text_firstobj.
12917 (do_pending_inlines): Never pass the obstack to feed_input.
12918 (process_next_inline): Call end_input instead of restore_pending_input.
12919 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
12920 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
12921 * input.c (end_input): New fn.
12922 (sub_getch): At the end of some fed input, just keep returning EOF
12923 until someone calls end_input.
12924 Remove 'obstack' field from struct input_source.
12925 * decl.c (grokparms): Handle DEFAULT_ARG.
12926 (replace_defarg): New fn.
12927 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
12929 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
12931 * call.c (implicit_conversion): If nothing else works, try binding
12932 an rvalue to a reference.
12934 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
12936 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
12937 ifndef for Cygwin32 to include SIGSEGV.
12939 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
12941 * class.c (finish_struct_1): Only complain about pointers without
12942 copy stuff if there are any constructors.
12944 * rtti.c (build_dynamic_cast): Call complete_type on the types.
12946 * decl.c (grokfndecl): If the function we chose doesn't actually
12949 * decl2.c (grokclassfn): Don't specify 'const int' for the
12950 artificial destructor parm.
12952 * pt.c (type_unification): If we are called recursively, nothing
12955 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
12957 * decl.c (init_decl_processing): Stop trying to catch signals
12958 other than SIGABRT since the Cygwin32 library doesn't support
12959 them correctly yet. This fixes a situation in which g++ causes
12960 a hang on SIGSEGVs and other such signals in our Win32-hosted
12963 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
12965 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
12967 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
12969 * typeck2.c (store_init_value): Always return the value if our
12970 type needs constructing.
12972 * method.c (hack_identifier): Convert class statics from
12975 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
12977 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
12979 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
12981 * typeck.c (c_expand_return): Make sure we clean up temporaries at
12982 the end of return x;
12984 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
12986 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
12988 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
12990 * except.c (expand_builtin_throw): Add support
12991 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
12993 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
12995 * repo.c (extract_string): Null-terminate.
12997 * cp-tree.h (TI_SPEC_INFO): New macro.
12998 (CLASSTYPE_TI_SPEC_INFO): New macro.
12999 * pt.c (push_template_decl): Correctly determine # of template parms
13002 * call.c (compare_ics): Really fix 'this' conversions.
13004 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
13007 * pt.c (push_template_decl): Complain about mismatch in # of
13008 template parms between a class template and a member template.
13010 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13012 * method.c (synthesize_method): You can't call
13013 function_cannot_inline_p after finish_function.
13014 * decl.c (finish_function): Turn on flag_inline_functions and turn
13015 off DECL_INLINE before handing a synthesized method to the
13018 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13020 * method.c (synthesize_method): Remove July 30 change to never set
13021 DECL_INLINE if at_eof.
13023 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
13025 * xref.c (GNU_xref_member): Ensure that the node has a
13026 decl_lang_specific part before checking DECL_FRIEND_P.
13028 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13030 * pt.c (instantiate_class_template): Diagnose non-class types used
13033 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13035 * typeck.c (build_conditional_expr): Use convert_for_initialization
13036 instead of convert_and_check.
13038 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13040 * parse.y (typespec): Don't pedwarn for typeof.
13042 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
13044 * repo.c (finish_repo): Only check changes if we would write a
13047 * call.c (compare_ics): Fix handling of 'this' conversions.
13049 * pt.c (do_decl_instantiation): Support static data too. Rename
13050 from do_function_instantiation.
13051 * cp-tree.h: Adjust.
13054 * repo.c (extract_string): New fn.
13055 (get_base_filename): Use it.
13056 (init_repo): Compare old args with current args.
13058 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
13060 * Makefile.in, Make-lang.in: Protect C-ls with a comment
13061 character, idea from Paul Eggert <eggert@twinsun.com>.
13063 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
13065 * typeck.c (c_expand_return): Be more persistent in looking for
13068 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
13069 pointer to reference.
13071 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
13073 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13075 * init.c (build_member_call, build_offset_ref):
13076 Use do_scoped_id instead of do_identifier.
13078 * cvt.c (convert): Remove bogosity.
13080 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13082 * cvt.c (build_up_reference): Do checks of ARGTYPE and
13083 TARGET_TYPE before trying to use get_binfo.
13085 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
13087 * cvt.c (build_up_reference): Call get_binfo to get access control.
13089 * decl2.c (import_export_decl): If we don't support weaks, leave
13092 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
13094 * except.c (expand_builtin_throw): Add support for machines that
13095 cannot access globals after throw's epilogue when
13096 -fno-sjlj-exceptions is used.
13098 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13100 * parse.y: 'std::' becomes '::'.
13101 * lex.c (real_yylex): Remove 'namespace' warning.
13102 * init.c (build_member_call): Ignore 'std::'.
13103 (build_offset_ref): Likewise.
13104 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
13105 (do_toplevel_using_decl): Ignore 'using std::whatever'.
13106 * decl.c (push_namespace): Just sorry.
13107 (pop_namespace): Nop.
13108 (init_decl_processing): Declare std namespace.
13110 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13112 * search.c (push_class_decls): A name which ambiguously refers to
13113 several instantiations of the same template just refers to the
13116 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
13118 * decl.c (build_enumerator): Fix problem with unsigned long
13119 enumerated values being smashed to ints, causing overflow
13120 when computing next enumerated value (for enum values around
13123 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
13125 * typeck.c (build_component_ref): Only call mark_used on a decl.
13127 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13129 * typeck.c (build_c_cast): Make the check for a ptr to function
13130 more specific before possible default_conversion call.
13132 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
13134 * except.c (expand_exception_blocks): Simplify and fix and make
13135 sure we don't end a region in a sequence, as expand_end_bindings
13138 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
13140 * except.c (init_exception_processing): Mark terminate as not
13141 returning so that the optimizer can optimize better.
13143 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
13145 * cvt.c (convert): Don't do any extra work, if we can avoid it
13148 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
13150 * *.[chy]: Change cp_convert to ocp_convert, change convert to
13151 cp_convert. convert is now reserved for the backend, and doesn't
13152 have the semantics a frontend person should ever want.
13154 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13156 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
13157 Lose -traditional support.
13159 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13161 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
13163 * parse.y (self_reference): Do it for templates, too.
13164 * class.c (pushclass): Don't overload_template_name; the alias
13165 generated by build_self_reference serves the same purpose.
13167 * tree.c (list_hash): Make static, take more args.
13168 (list_hash_lookup): Likewise.
13169 (list_hash_add): Make static.
13170 (list_hash_canon): Lose.
13171 (hash_tree_cons): Only build a new node if one isn't already in the
13173 (hash_tree_chain): Use hash_tree_cons.
13174 * cp-tree.h: Adjust.
13175 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
13176 of calling lookup_name.
13178 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
13180 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
13181 doesn't refer to the CONST_DECLs.
13183 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
13185 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
13187 (expand_class_desc): Convert the last argument to a sizetype.
13189 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13191 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
13192 __real__): Add reswords.
13193 * hash.h: Regenerate.
13194 * lex.h (rid): Add RID_COMPLEX.
13195 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
13196 * lex.c (init_lex): Add building of RID_COMPLEX.
13197 (real_yylex): General cleanup in line with what c-lex.c also has,
13198 sans the cruft for traditional; add handling of SPEC_IMAG, complex
13199 types, and imaginary numeric constants.
13200 * parse.y (REALPART, IMAGPART): Add tokens.
13201 (unary_expr): Add REALPART and IMAGPART rules.
13202 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
13203 * decl.c (complex_{integer,float,double,long}_type_node): Define
13205 (init_decl_processing): Set up the types.
13206 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
13207 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
13208 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13209 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
13210 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
13212 * method.c (build_overload_name): Add handling of the different
13213 COMPLEX_TYPEs, prefixing them with `J'.
13214 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
13215 as a template parm.
13216 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
13217 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
13218 (mapcar): Handle COMPLEX_CST.
13219 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
13220 (common_type): Add code for complex types.
13221 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
13222 (convert_for_assignment): Likewise.
13223 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
13225 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13227 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
13228 tsubst_expr, as it might try to do overload resolution.
13230 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
13232 * pt.c (instantiate_class_template): Oops.
13234 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13236 * cp-tree.def: Add TAG_DEFN.
13237 * pt.c (tsubst_enum): New fn.
13238 (instantiate_class_template): Use it.
13239 (tsubst_expr): Support TAG_DEFN.
13240 (tsubst): Support local enums.
13241 (tsubst_copy): Likewise.
13242 * decl.c (finish_enum): Likewise.
13243 (start_enum): If this is a local enum, switch to permanent_obstack.
13245 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
13247 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
13248 (finish_function): Put the base init code for constructors just
13249 after the parm cleanup insns.
13250 (struct cp_function): Add last_parm_cleanup_insn.
13251 (push_cp_function_context): Likewise.
13252 (pop_cp_function_context): Likewise.
13254 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
13256 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
13258 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13260 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
13261 for THUNK_FNDECL before we switch to temporary allocation.
13263 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
13265 * call.c (build_new_op): Handle null arg2 for ?:.
13267 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
13269 * except.c (expand_exception_blocks): Ensure that we flow through
13270 the end of the exception region for the exception specification.
13271 Move exception region for the exception specification in, so that
13272 it doesn't protect the parm cleanup. Remove some obsolete code.
13273 * decl.c (store_parm_decls): Likewise.
13274 (finish_function): Likewise.
13276 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13278 * init.c (build_new): Fix nothrow handling.
13280 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13282 * init.c (emit_base_init): Don't warn about the initialization
13283 list for an artificial member.
13285 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13287 * expr.c (do_case): Handle !START case for the error msg.
13289 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
13291 * decl2.c, lang-options.h: New option -Weffc++.
13292 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
13295 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
13296 to MULTIPLE_SYMBOL_SPACES.
13298 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
13300 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
13302 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
13304 * typeck.c (c_expand_return): Don't complain about returning void
13305 to void in an artificial function.
13306 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
13307 don't set DECL_RESULT, set DECL_ARTIFICIAL.
13308 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
13310 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
13312 * init.c (init_decl_processing): Add support for setjmp/longjmp based
13313 exception handling.
13314 * except.c (init_exception_processing): Likewise.
13315 (expand_end_catch_block): Likewise.
13316 (expand_exception_blocks): Likewise.
13317 (expand_throw): Likewise.
13318 * exception.cc (__default_terminate): Likewise.
13320 * init.c (perform_member_init): Use new method of expr level
13321 cleanups, instead of cleanups_this_call and friends.
13322 (emit_base_init): Likewise.
13323 (expand_aggr_vbase_init_1): Likewise.
13324 (expand_vec_init): Likewise.
13325 * decl.c (cp_finish_decl): Likewise.
13326 (expand_static_init): Likewise.
13327 (store_parm_decls): Likewise.
13328 (cplus_expand_expr_stmt): Likewise.
13329 * decl2.c (finish_file): Likewise.
13331 * Make-lang.in (exception.o): Ok to compile with -O now.
13333 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
13334 we know it will be done later by the backend.
13336 * decl2.c (lang_f_options): Remove support for short temps.
13337 * lang-options.h: Likewise.
13339 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13341 * tree.c (varargs_function_p): New fn.
13342 * method.c (emit_thunk): Replace broken generic code with code to
13343 generate a heavyweight thunk function.
13345 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
13347 * pt.c (process_template_parm): pedwarn about floating-point parms.
13349 * decl.c (grokdeclarator): inline no longer implies static.
13351 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
13353 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
13355 * class.c (check_for_override): The signature of an overriding
13356 function is not changed.
13358 * call.c (build_over_call): Move setting of conv into the loop.
13359 Note: this change, along with the related changes of the 18th thru
13360 the 20th of April, fix an infinite loop problem in conversions.
13362 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
13364 * call.c (build_user_type_conversion_1): Really ignore rvalue
13365 conversions when looking for a REFERENCE_TYPE.
13367 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
13368 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
13369 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
13370 (build_unary_op): Likewise.
13371 * call.c (build_over_call): See through a CONVERT_EXPR around the
13372 ADDR_EXPR for on a temporary.
13373 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
13374 the ADDR_EXPR for a local variable.
13376 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
13378 * call.c (build_user_type_conversion_1): If we're trying to
13379 convert to a REFERENCE_TYPE, only consider lvalue conversions.
13380 (build_new_function_call): Print candidates.
13381 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
13382 (reference_binding): Binding a temporary of a reference-related type
13385 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13387 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
13388 * tinfo2.cc (type_info::before): Likewise.
13390 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
13392 * call.c (implicit_conversion): Oops.
13394 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
13396 * call.c (implicit_conversion): Try to find a reference conversion
13397 before binding a const reference to a temporary.
13399 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
13401 * exception.cc (__default_unexpected): Call terminate by default,
13402 so that if the user overrides terminate, the correct function will
13405 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
13407 * parse.y (left_curly): Avoid trying to use any fields of
13408 error_mark_node, as there aren't any.
13410 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
13412 * lex.c (do_identifier): Avoid breaking on overloaded methods
13413 as default arguments.
13415 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
13417 * call.c (add_template_candidate): Initialize the variable "dummy".
13419 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
13421 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
13422 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
13424 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13426 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
13427 (debug_binfo): Delete decl, not needed.
13429 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
13430 promotes_to_aggr_type): Delete fns.
13431 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
13432 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
13433 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
13435 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
13437 * friend.c (is_friend_type): Delete fn.
13438 * cp-tree.h (is_friend_type): Delete decl.
13440 * decl.c (original_result_rtx, double_ftype_double,
13441 double_ftype_double_double, int_ftype_int, long_ftype_long,
13442 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
13443 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
13445 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
13447 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
13449 * decl.c (pushdecl_nonclass_level): #if 0, unused.
13450 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
13452 * lex.c (reinit_lang_specific): #if 0, unused.
13453 * cp-tree.h (reinit_lang_specific): #if 0 decl.
13455 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
13456 * cp-tree.h (revert_static_member_fn): Delete decl.
13458 * class.c (root_lang_context_p): Delete fn.
13459 * cp-tree.h (root_lang_context_p): Delete decl.
13461 * decl.c (set_current_level_tags_transparency): #if 0, unused.
13462 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
13464 * lex.c (set_vardecl_interface_info): Make static.
13465 * cp-tree.h (set_vardecl_interface_info): Delete decl.
13467 * call.c (find_scoped_type): Make static.
13468 * cp-tree.h (find_scoped_type): Delete decl.
13470 * search.c (convert_pointer_to_vbase): Make static.
13471 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
13473 * decl.c (const_ptr_type_node): Likewise.
13474 * cp-tree.h (const_ptr_type_node): Delete decl.
13476 * typeck.c (common_base_type): Make static.
13477 * cp-tree.h (common_base_types): Delete erroneous decl.
13479 * pt.c (classtype_mangled_name): Make static.
13480 * cp-tree.h (classtype_mangled_name): Delete decl.
13482 * lex.c (check_newline): Make static.
13483 * cp-tree.h (check_newline): Delete decl.
13485 * typeck.c (build_x_array_ref): Delete fn, same idea as
13487 * cp-tree.h (build_x_array_ref): Delete decl.
13489 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
13491 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
13493 * class.c (build_vtable_entry): Make static.
13494 * cp-tree.h (build_vtable_entry): Delete decl.
13496 * class.c (build_vbase_pointer): Make static.
13497 * cp-tree.h (build_vbase_pointer): Delete decl.
13499 * sig.c (build_sptr_ref): Add forward decl and make static.
13500 * cp-tree.h (build_sptr_ref): Delete decl.
13502 * call.c (build_new_method_call): Add forward decl and make static.
13503 * cp-tree.h (build_new_method_call): Delete decl.
13505 * call.c (build_object_call): Make static.
13506 * class.c (check_for_override, complete_type_p, mark_overriders):
13508 * decl.c (cp_function_chain): Likewise.
13509 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
13511 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
13513 * tree.c (build_cplus_array_type_1): Likewise.
13514 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
13515 (comp_target_parms): Likewise.
13517 * init.c (build_builtin_call): Make static.
13518 * cp-tree.h (build_builtin_call): Delete decl.
13520 * typeck.c (binary_op_error): Delete decl.
13521 * cp-tree.h (binary_op_error): Likewise.
13523 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13525 * call.c (build_method_call): Compare against error_mark_node
13526 directly, rather than the ERROR_MARK tree code.
13527 * cvt.c (cp_convert): Likewise.
13528 * decl.c (print_binding_level): Likewise.
13529 (duplicate_decls): Likewise.
13530 (grokdeclarator): Likewise.
13531 (grokdeclarator): Likewise.
13532 * init.c (expand_aggr_init_1): Likewise.
13533 (decl_constant_value): Likewise.
13534 * method.c (build_opfncall): Likewise.
13535 (hack_identifier): Likewise.
13536 * typeck.c (build_modify_expr): Likewise.
13538 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
13540 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13542 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
13544 * pt.c (coerce_template_parms): Add new error message.
13546 * method.c (build_overload_value): Implement name mangling for
13547 floating-point template arguments.
13549 * method.c (build_overload_int, icat, dicat): Fix mangling of template
13550 arguments whose absolute value doesn't fit in a signed word.
13552 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13554 * friend.c: New file; put all of the friend stuff in here.
13555 * init.c: Instead of here.
13556 * Makefile.in (CXX_OBJS): Add friend.o.
13557 (friend.o): Add dependencies.
13558 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
13560 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
13562 * call.c (build_scoped_method_call): Complain if the scope isn't a
13565 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13567 * parse.y (left_curly): Don't crash on erroneous type.
13569 * init.c (build_delete): Fix type of ref.
13571 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
13573 * search.c (get_vbase_1): Renamed from get_vbase.
13574 (get_vbase): Wrapper, now non-static.
13575 (convert_pointer_to_vbase): Now static.
13577 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
13578 * init.c (build_delete): Pass one.
13579 (build_partial_cleanup_for): Use build_scoped_method_call.
13580 * decl.c (finish_function): Pass a binfo.
13582 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13584 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
13586 * typeck.c (build_c_cast): Lose other reference to flag.
13588 * call.c (build_field_call): Don't look for [cd]tor_identifier.
13589 * decl2.c (delete_sanity): Remove meaningless use of
13590 LOOKUP_HAS_IN_CHARGE.
13591 * decl.c (finish_function): Use build_scoped_method_call instead
13592 of build_delete for running vbase dtors.
13593 * init.c (build_delete): Call overload resolution code instead of
13594 duplicating it badly.
13596 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
13598 * call.c (build_over_call): Call mark_used before trying to elide
13601 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
13603 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13605 * typeck.c (build_modify_expr): Always pedwarn for a cast to
13606 non-reference used as an lvalue.
13608 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
13610 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
13612 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
13614 * parse.y (handler): Fix template typo.
13616 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13618 * error.c (lang_decl_name): New fn.
13619 * tree.c (lang_printable_name): Use it.
13621 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
13623 * g++spec.c: Include config.h so that we can catch bzero #defines
13624 from the config file.
13626 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
13628 * new1.cc: Include a declaration for malloc, to avoid warning, and
13629 avoid lossing on systems that require one (ones that define malloc
13632 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13634 * decl2.c (max_tinst_depth): New variable.
13635 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
13637 * pt.c (max_tinst_depth): Variable moved.
13638 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
13641 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
13643 * decl.c (xref_basetypes): Allow a base class that depends on
13644 template parms to be incomplete.
13646 * decl2.c (build_expr_from_tree): Support typeid(type).
13647 * rtti.c (get_typeid): Support templates.
13648 (expand_si_desc, expand_class_desc): Fix string length.
13649 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
13651 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
13653 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
13655 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
13657 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
13659 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
13660 smashes together template and non-template decls of the same
13663 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
13665 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
13667 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13669 * decl.c (duplicate_decls): Next route, pedwarn about different
13670 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
13672 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13674 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
13675 (struct lang_type): Delete has_default_implementation member.
13676 Increase dummy to 21.
13677 * decl.c (start_method): Delete usage.
13679 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
13680 store_after_parms, start_decl_1, auto_function): Add decls.
13681 (get_arglist_len_in_bytes, declare_implicit_exception,
13682 have_exceptions_p, make_type_decl, typedecl_for_tag,
13683 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
13684 build_component_type_expr, cplus_exception_name,
13685 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
13686 * call.c (build_this): Make static.
13687 (is_complete): Likewise.
13688 (implicit_conversion): Likewise.
13689 (reference_binding): Likewise.
13690 (standard_conversion): Likewise.
13691 (strip_top_quals): Likewise.
13692 (non_reference): Likewise.
13693 (build_conv): Likewise.
13694 (user_harshness): Likewise.
13695 (rank_for_ideal): Likewise.
13696 * decl.c (start_decl_1): Delete forward decl.
13697 (push_decl_level): Make static.
13698 (resume_binding_level): Make static.
13699 (namespace_bindings_p): Make static.
13700 (declare_namespace_level): Make static.
13701 (lookup_name_real): Make static.
13702 (duplicate_decls): Make static. Take register off NEWDECL and
13703 OLDDECL parm decls.
13704 * decl2.c (get_sentry): Make static.
13705 (temp_name_p): Delete fn.
13706 * except.c (auto_function): Delete decl.
13707 * lex.c (handle_{cp,sysv}_pragma): Make static.
13708 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
13709 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
13710 * pt.c (tsubst_expr_values): Make static.
13711 * rtti.c (combine_strings): Delete decl.
13713 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
13715 * pt.c (push_template_decl): Handle getting a typedef.
13717 * call.c (build_new_function_call): Complain about void arg.
13719 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13721 * decl.c (duplicate_decls): Give pedwarn of different exceptions
13722 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
13724 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
13726 * except.c (expand_throw): Don't expand the cleanup tree here,
13727 since we are not going to write the rtl out. Fixes problem with
13730 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
13732 * Make-lang.in: Add $(exeext) as necessary.
13734 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
13736 * parse.y (handler_seq): Must have at least one catch clause.
13738 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
13740 * call.c (add_builtin_candidate): Restore ?: hack.
13742 * decl.c (grok_op_properties): More warnings.
13744 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13746 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
13747 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
13749 * decl.c (duplicate_decls): Scale back to a warning, and only do
13752 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
13754 * decl.c (duplicate_decls): pedwarn mismatched exception
13757 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
13759 * call.c (build_new_method_call): Don't display the invisible
13760 argument for controlling virtual bases.
13762 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
13764 * new: Add nothrow new and delete, bad_alloc and throw specifications
13766 * decl.c (init_decl_processing): Add throw specification for delete.
13767 * new.cc (nothrow): Define.
13768 * lex.c (real_yylex): Removing warning that throw and friends are
13770 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
13771 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
13772 * Make-lang.in: Add new{1,2}.{cc,o}.
13774 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
13776 * lex.c (cons_up_default_function): Fix return type of synth op=.
13778 * init.c (emit_base_init): Add warnings for uninitialized members
13781 * decl.c (xref_basetypes): Add warning for non-polymorphic type
13782 with destructor used as base type.
13784 * decl.c (grok_op_properties): Add warning for op= returning void.
13785 * typeck.c (c_expand_return): Add warning for op= returning anything
13788 * class.c (finish_struct_1): Add warning for class with pointers
13789 but not copy ctor or copy op=.
13791 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
13792 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
13793 (instantiate_template): If -fexternal-templates, add this
13794 instantiation to pending_templates.
13796 * decl2.c (copy_assignment_arg_p): Disable old hack to support
13799 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
13801 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
13803 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
13805 * call.c (standard_conversion): Handle getting references. Tack
13806 on RVALUE_CONV here. Do it for non-class types, too.
13807 (reference_binding): Pass references to standard_conversion.
13808 (implicit_conversion): Likewise.
13809 (add_builtin_candidate): Disable one ?: kludge.
13810 (convert_like): Handle RVALUE_CONVs for non-class types.
13811 (joust): Disable the other ?: kludge.
13813 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13815 * decl.c (init_decl_processing): Add code to build up common
13816 function types beforehand, to avoid creation then removal of
13817 things already in the hash table.
13819 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
13821 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
13824 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
13825 current_template_parms.
13827 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
13829 * search.c (lookup_field): Don't return a function, check want_type.
13831 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13833 * init.c (build_new): Make sure PLACEMENT has a type.
13835 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
13837 * init.c (build_new): Support new (nothrow).
13839 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
13841 * pt.c (instantiate_decl): Also do push_to_top_level before setting
13844 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
13845 * pt.c (tsubst): Defer instantiation of default args.
13846 * call.c (build_over_call): Until here.
13848 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13850 * search.c (lookup_field): Make sure we have an
13851 IDENTIFIER_CLASS_VALUE before we try to return it.
13853 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
13855 * call.c (build_method_call): Delete unused var PARM.
13856 (build_overload_call_real): Likewise.
13857 (build_object_call): Delete unused var P.
13858 (build_new_op): Likewise.
13859 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
13860 var definitions, which are never used.
13861 (shadow_tag): Delete unused var FN.
13862 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
13863 * init.c (build_new): Delete unused var ALLOC_TEMP.
13864 * method.c (hack_identifier): Delete unused var CONTEXT.
13865 (do_build_copy_constructor): Delete unused var NAME.
13866 (synthesize_method): Delete unused var BASE.
13867 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
13868 * rtti.c (build_headof): Delete unused var VPTR.
13869 (get_typeid): Delete unused var T.
13870 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
13872 (build_ptrmemfunc): Delete unused vars U and NINDEX.
13873 * typeck2.c (build_functional_cast): Delete unused var BINFO.
13875 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
13877 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
13878 things in a type being defined.
13879 * decl.c (finish_enum): Reverse the values so that they are in
13882 * pt.c (instantiate_class_template): Don't initialize
13883 BINFO_BASETYPES until the vector is filled out.
13884 (unify): Don't abort on conflicting bindings, just fail.
13885 (instantiate_decl): Do push_tinst_level before any tsubsting.
13887 * method.c (build_overload_value): Handle getting a
13888 TEMPLATE_CONST_PARM for a pointer.
13890 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
13892 * init.c (expand_member_init): Don't give 'not a base' error for
13895 * pt.c (instantiate_decl): Call import_export_decl later.
13897 * pt.c (instantiate_class_template): Return a value.
13899 * parse.y (extension): New rule for __extension__.
13900 (extdef, unary_expr, decl, component_decl): Use it.
13902 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
13904 * class.c (base_binfo): Remove unused base_has_virtual member.
13905 (finish_base_struct): Likewise.
13906 (finish_struct_1): Likewise.
13908 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
13910 * search.c (expand_upcast_fixups): Fix bogus code generation
13911 problem where the generated code uses the wrong index into the
13912 runtime built vtable on the stack. Old code could clobber random
13915 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
13917 * init.c (perform_member_init): Make sure the partial EH cleanups
13918 live on the function_obstack.
13920 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
13922 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
13923 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
13925 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
13927 * decl.c (grokvardecl): Avoid ANSI style initialization.
13929 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
13931 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
13933 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
13935 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
13937 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13939 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
13940 arguments we compare against. Start the count of I at 1, not 0,
13941 since argv[0] is still the command.
13943 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
13945 * lang-specs.h: Accept .cp as an C++ extension.
13947 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13949 * cp-tree.h (ptr_reasonably_similar): Add decl.
13951 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
13953 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
13954 pointer. New local SPECBITS with the parm's value.
13955 (grokdeclarator): Pass &specbits down.
13957 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
13958 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
13960 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
13961 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
13963 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
13964 not an error_mark_node.
13966 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
13968 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
13969 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
13971 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
13973 * decl.c (grokdeclarator): When giving an anonymous struct a name,
13974 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
13977 * typeck2.c (build_m_component_ref): If component is a pointer
13978 to data member, resolve the OFFSET_REF now.
13980 * call.c (convert_like): Don't go into infinite recursion.
13982 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
13984 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
13985 * tree.c (layout_basetypes): And on the vbase ptr.
13987 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
13989 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
13990 CHAR_TYPE_SIZE so bool is always the same size as another type.
13992 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
13994 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
13996 * decl2.c (grok_x_components): Remove synthesized methods from
13997 TYPE_METHODS of an anonymous union, complain about member
13999 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
14001 (finish_function): Just clear the DECL_RTL of our arguments.
14003 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14005 * decl2.c (finish_file): Emit DWARF debugging info for static data
14008 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
14010 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
14012 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
14015 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14017 * Make-lang.in (g++-cross$(exeext)): Fix typo.
14019 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14021 Make the g++ driver now be a standalone program, rather than one
14022 that tries to run the gcc driver after munging up the options.
14023 * Make-lang.in (g++.c, g++spec.o): New rules.
14024 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
14026 (g++$(exeext)): New rule, based on xgcc rule.
14027 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
14028 * g++spec.c: New file.
14029 * g++.c: Removed file.
14031 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
14033 * cvt.c (build_up_reference): Arrange for any temporary values
14034 that have been keep in registers until now to be put into memory.
14036 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14038 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
14039 that make -j3 bootstrap works better.
14041 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
14043 * decl.c (pushtag): Do pushdecl for anon tags.
14045 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14047 * typeck.c (c_expand_return): Fix logic.
14048 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
14050 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
14052 * g++.c (main): Make sure arglist has a final NULL entry. Add
14053 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
14054 stdin/stdout of the invoked program are redirected to
14057 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14059 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
14061 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
14063 * init.c (resolve_offset_ref): Handle obj.vfn better.
14064 * typeck.c (build_component_ref): Set TREE_TYPE on result from
14067 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
14069 * typeck.c (convert_for_assignment): Also handle anachronistic
14070 implicit conversions from (::*)() to cv void*.
14071 * cvt.c (cp_convert_to_pointer): Likewise.
14073 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14075 * lex.c (handle_cp_pragma): Fix bogus warning.
14077 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
14079 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
14080 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
14082 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14084 * class.c (finish_struct_1): Support DWARF2_DEBUG.
14085 * search.c (dfs_debug_mark): Likewise.
14086 * decl2.c (finish_vtable_vardecl): Likewise.
14087 * decl.c (pushtag, finish_enum): Likewise.
14088 * lex.c (check_newline): Use debug_* instead of calling *out
14089 functions directly.
14091 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14093 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
14094 on some picky hosts.
14096 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14098 * class.c (finish_struct_1): A class has a non-trivial copy
14099 constructor if it has virtual functions.
14101 * cvt.c (cp_convert): Always call a constructor.
14103 * call.c (reference_binding): Still tack on a REF_BIND
14104 for bad conversions.
14105 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
14107 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
14108 (c_expand_return): Likewise.
14109 * typeck2.c (digest_init): Likewise for { }.
14110 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
14111 * cvt.c (cp_convert): Handle failure better.
14113 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14115 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
14116 of GCC be path-relative.
14118 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14120 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
14121 it does need choose-temp.o and pexecute.o.
14123 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14125 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
14126 that we still use it.
14127 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
14129 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
14131 * init.c (expand_default_init): Avoid calling constructors to
14132 initialize reference temps.
14134 * cvt.c (convert_to_reference): Fix.
14136 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14138 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
14139 (convert_to_reference): Likewise.
14140 * typeck.c (convert_for_initialization): Likewise.
14141 * init.c (expand_default_init): Likewise.
14142 (expand_aggr_init_1): Likewise.
14143 * cp-tree.h (CONV_NONCONVERTING): Lose.
14144 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
14146 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
14148 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
14150 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
14152 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14154 * init.c (expand_aggr_init_1): Don't crash on non-constructor
14157 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14159 * g++.c: Include gansidecl.h.
14160 (VPROTO, PVPROTO, VA_START): Delete.
14161 (choose_temp_base_try, choose_temp_base, perror_exec,
14162 run_dos) [__MSDOS__]: Delete fns.
14163 (pfatal_with_name): Delete fn.
14164 (temp_filename): Declare like in gcc.c.
14165 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
14166 (error_count, signal_count): Define.
14167 (error): Delete both definitions.
14168 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
14169 (pfatal_pexecute): Add fn from gcc.c.
14170 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
14171 code to use the pexecute stuff also used by gcc.c.
14172 (MIN_FATAL_STATUS): Define.
14173 * Make-lang.in (g++): Add dependency on and linking with
14174 choose-temp.o and pexecute.o.
14176 * cp-tree.h: Include gansidecl.h.
14177 (STDIO_PROTO): Delete #undef/#define.
14178 * cvt.c (NULL): Delete #undef/#define.
14179 * expr.c (NULL): Likewise.
14180 * init.c (NULL): Likewise.
14181 * rtti.c (NULL): Likewise.
14182 * xref.c (NULL): Likewise.
14184 * cp-tree.h (build_user_type_conversion): Add prototype.
14185 * call.c (build_user_type_conversion): Delete prototype. Correct
14186 decl of FLAGS arg to be an int.
14187 * cvt.c (build_user_type_conversion): Likewise.
14189 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
14191 * cp-tree.def: Add TRY_BLOCK and HANDLER.
14192 * except.c (expand_start_catch_block): Support templates.
14193 * parse.y (try_block, handler_seq): Likewise.
14194 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
14196 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14198 * pt.c (current_template_args): New fn.
14199 (push_template_decl): Use it.
14200 * decl.c (grokdeclarator): Use it.
14202 * decl2.c (build_expr_from_tree): Dereference ref vars.
14204 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
14205 the decl-specifier-seq.
14207 * decl.c (grok_op_properties): Don't force the type of a conversion
14208 op to be complete. Don't warn about converting to the same type
14209 for template instantiations.
14211 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
14214 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
14216 * typeck.c (get_delta_difference): Remove previous bogusness.
14217 Don't give errors if force is set.
14219 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14221 * decl2.c (finish_file): Don't emit debug info.
14222 * decl.c (pushdecl): Lose obsolete code.
14223 (grokdeclarator): Still do the long long thing after complaining.
14224 * search.c (note_debug_info_needed): Don't do anything if we're in a
14226 * method.c (synthesize_method): For non-local classes,
14227 push_to_top_level first.
14229 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
14231 * typeck.c (get_delta_difference): Add no_error parameter.
14232 (build_ptrmemfunc): Call get_delta_difference with no_error set;
14233 we don't want error messages when converting unrelated
14234 pointer-to-member functions.
14236 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
14238 * error.c (dump_expr): Improve the wording on error messages that
14239 involve pointer to member functions.
14241 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
14243 * cvt.c (cp_convert_to_pointer): Move code for conversions from
14244 (::*)() to void* or (*)() up a bit, so that we can convert from
14245 METHOD_TYPEs as well.
14247 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14249 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
14250 There are no 'member' types.
14251 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
14252 (build_x_typeid): Handle errors.
14254 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
14256 * typeck.c (convert_for_assignment): Handle anachronistic implicit
14257 conversions from (::*)() to void* or (*)().
14258 * cvt.c (cp_convert_to_pointer): Likewise.
14259 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
14260 conversions from here.
14261 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
14262 * lang-options.h: Likewise.
14263 * decl2.c (warn_pmf2ptr): Define.
14264 * cp-tree.h: Declare it.
14265 * typeck2.c (digest_init): Allow pmfs down into
14266 convert_for_initialization.
14268 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14270 * typeck.c (c_expand_return): Fix for returning overloaded fn.
14272 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
14274 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
14275 * decl.c (grok_reference_init): Pass DIRECT_BIND.
14276 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
14278 * call.c (convert_like): Don't pass INDIRECT_BIND.
14279 * typeck.c (convert_arguments): Likewise.
14280 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
14282 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14284 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
14285 similar code in build_up_ref.
14286 * cvt.c (build_up_reference): Drastically simplify.
14288 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
14290 * typeck.c (signed_or_unsigned_type): If the given type already
14291 as the correct signedness, then just return it.
14293 * typeck.c ({un,}signed_type): If can't do anything, call
14294 signed_or_unsigned_type.
14296 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
14298 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
14299 current_class_type is NULL.
14301 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
14303 * class.c (finish_struct_1): Avoid empty structs by adding a field
14304 so layout_type gets the mode right.
14306 * typeck.c (c_expand_return): Drastically simplify.
14308 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14310 * typeck.c (decay_conversion): Handle overloaded methods.
14312 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14314 * call.c (build_over_call): A TARGET_EXPR has side-effects.
14316 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
14318 * cvt.c (convert_to_pointer_force): Add code to support pointer to
14319 member function to pointer to function conversions.
14320 * init.c (resolve_offset_ref): Add code to allow faked up objects,
14321 ignoring them if they are not used, and giving an error, if they
14323 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
14324 code, and so that we can give an error, if we needed an object,
14325 and one was not provided.
14326 (build_c_cast): Don't call default_conversion when we want to
14327 convert to pointer to function from a METHOD_TYPE.
14329 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
14331 * Make-lang.in (cplib2.ready): Fix logic.
14333 * decl.c (shadow_tag): Only complain about non-artificial function
14336 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
14338 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
14340 * expr.c (cplus_expand_expr): Pre-tweak call_target like
14341 expand_inline_function would.
14343 * pt.c (mark_decl_instantiated): If extern_p, call
14344 mark_inline_for_output.
14346 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
14348 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
14351 * typeck.c (get_delta_difference): Fix wording, as we can be used
14352 for pointer to data members.
14354 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
14356 * pt.c (tsubst): If the function decl isn't a member of this
14357 template, return a copy of the decl (including copying the
14358 lang-specific part) so we don't hose ourselves later.
14360 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14362 * class.c (finish_struct): Remove DWARF-specific tag handling.
14363 * decl.c (pushtag): Likewise.
14364 (finish_function): Always clear DECL_ARGUMENTS on function decls with
14366 * decl2.c (finish_file): Emit DWARF debugging info for static data
14369 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
14371 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
14372 isn't the same as the new one before we whack it.
14374 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
14376 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
14377 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
14378 warn_traditional and warn_strict_prototypes; remove ancient
14379 'overload' code; remove references to flag_traditional.
14381 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
14383 * input.c (sub_getch): Handle 8-bit characters in string literals.
14385 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
14387 * tree.c (mapcar): Handle CONSTRUCTORs.
14388 (copy_to_permanent): Handle expression_obstack properly.
14390 * Make-lang.in (cplib2.txt): Also depend on the headers.
14392 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
14394 (expand_class_desc): Use USItype for offset field.
14395 * tinfo.h (struct __class_type_info): Likewise.
14397 * method.c (build_overload_int): TYPE_PRECISION should be applied
14400 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14402 * call.c (build_new_op): A COND_EXPR involving void must be a
14405 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14407 * typeck.c (build_x_component_ref): New fn.
14408 (build_object_ref): Use it.
14409 * parse.y (primary): Use it.
14410 * decl2.c (build_expr_from_tree): Use it.
14411 * cp-tree.h: Declare it.
14413 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
14414 * error.c (dump_type_suffix): Handle variable arrays.
14416 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14418 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
14420 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
14422 * decl.c (lookup_name_real): Don't try to look up anything in a
14425 * tinfo2.cc (__throw_type_match_rtti): Oops.
14427 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14429 * Make-lang.in (exception.o): Use -fno-PIC for now.
14431 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14433 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
14435 (get_tinfo_fn_dynamic): Extracted from build_typeid.
14436 * tinfo2.cc (__dynamic_cast): Adjust.
14438 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
14439 (build_x_typeid): Likewise.
14441 * parse.y: Call build_x_typeid instead of build_typeid.
14442 * cp-tree.def: Add TYPEID_EXPR.
14443 * pt.c (tsubst_copy): Handle typeid.
14444 * decl2.c (build_expr_from_tree): Likewise.
14445 * rtti.c (build_x_typeid): Throw bad_typeid from here.
14446 (build_typeid): Not here.
14447 * cp-tree.h: Declare build_x_typeid.
14449 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
14451 * call.c (convert_like): Pull out constant values.
14453 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
14455 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14457 * decl.c (init_decl_processing): Create short int types before
14458 creating size_t in case a machine description needs to use
14459 unsigned short for size_t.
14461 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
14463 * Make-lang.in (exception.o): Turn off pic.
14465 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
14466 type, multi-level ptr conversions.
14468 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
14469 (throw_bad_cast): Use it.
14470 (throw_bad_typeid): New fn.
14471 (build_typeid): Throw bad_typeid as needed.
14473 (synthesize_tinfo_fn): Handle functions and arrays before checking
14476 * Remove .h from standard C++ headers, add new.h, move into inc
14479 * exception*: Remove pointer from object, constructors. Add
14480 default exception::what that uses type_info::name. Add
14481 __throw_bad_typeid.
14483 * init.c (build_new): Don't add a cookie to new (void *) T[2].
14485 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
14487 * Make-lang.in: Building C++ code depends on cc1plus.
14489 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14491 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
14492 a HOST_WIDE_INT, not a tree.
14494 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
14496 * exception.cc: Don't include <stdlib.h>.
14498 * Make-lang.in (c++.clean): Remove cplib2.*.
14500 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
14502 * parse.y (component_decl_1, component_costructor_declarator case):
14503 Pass attributes/prefix_attributes in tree list.
14505 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
14507 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
14509 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14511 * lex.c (do_identifier): Don't do deferred lookup in a template
14514 * typeck2.c (store_init_value): Oops.
14516 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
14517 New files for C++ lang-support library.
14518 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
14519 (CXX_LIB2FUNCS): Define.
14520 And rules for building the C++ lang-support code.
14521 * config-lang.in (headers): Define.
14522 (lib2funcs): Define.
14524 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14526 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
14528 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
14529 * typeck2.c (store_init_value): Check for initializing pmf with { }
14531 (process_init_constructor): Not here.
14533 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14535 * pt.c (begin_template_parm_list): Increment
14536 processing_template_decl here.
14537 (end_template_parm_list): Not here.
14538 (process_template_parm): No need to add 1 to it now.
14539 * *.c: Use processing_template_decl instead of current_template_parms
14540 to check for being in a template.
14542 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
14543 (tsubst_copy): Handle CONSTRUCTOR.
14544 (instantiate_decl): Set up context properly for variables.
14545 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
14546 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
14548 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14550 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
14552 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
14554 * method.c (make_thunk): Call comdat_linkage before setting the
14557 * decl2.c (comdat_linkage): Use make_decl_one_only.
14558 (import_export_decl): Likewise.
14559 * decl.c (init_decl_processing): Check supports_one_only instead of
14562 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
14564 * decl2.c (grokfield): Tighten checking for access decls.
14566 * decl.c (make_typename_type): Resolve references to
14567 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
14568 (lookup_name_real): Types that depend on a template parameter get
14569 an implicit 'typename' unless they're in the current scope.
14570 (start_decl_1): We don't care about incomplete types that depend
14571 on a template parm.
14572 (grokdeclarator): Resolve 'typename's in the type specifier that
14573 refer to members of the current scope.
14575 * call.c (build_over_call): Remove 'inline called before
14576 definition' diagnostic.
14577 (build_method_call): Likewise.
14578 * decl.c (duplicate_decls): Downgrade 'used before declared
14579 inline' to a warning, only with -Winline.
14581 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
14583 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
14585 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14587 * call.c (build_method_call): When calling a signature
14588 default implementation, as in other cases, let instance_ptr simply
14591 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
14593 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
14595 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
14597 * except.c (expand_start_catch_block): Add a pushlevel so that -g
14598 works on hppa and SPARC.
14600 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14602 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
14604 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14606 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
14607 before testing whether it's a signature.
14609 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
14611 * call.c (build_new_method_call): Don't complain about signature
14612 pointers and references not being an aggr type.
14613 (build_this): If a signature pointer or reference was passed in,
14615 (build_new_method_call): If instance is a signature pointer, set
14616 basetype to the signature type of instance.
14617 * sig.c (build_signature_method_call): Deleted basetype and
14618 instance parameters, they can be found as the DECL_CONTEXT of
14619 function and as the first argument passed in.
14620 * cp-tree.h: Changed declaration of build_signature_method_call.
14621 * call.c (build_method_call): Deleted first two arguments in call
14622 of build_signature_method_call.
14623 (build_over_call): Added call to build_signature_method_call.
14625 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
14627 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
14630 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
14632 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
14634 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
14636 * except.c (expand_start_try_stmts): Move to except.c in the backend.
14637 (expand_end_try_stmts): Remove.
14639 * init.c (perform_member_init): Use add_partial_entry () instead
14640 of directly manipulating lists.
14641 (emit_base_init): Likewise.
14643 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
14645 * except.c (expand_exception_blocks): Always make sure USE and
14646 CLOBBER insns that came at the end still do, the backend relies
14649 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
14651 * call.c (build_over_call): We can only use a TARGET_EXPR of the
14654 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
14656 * cvt.c (convert_to_reference): Revert last change, don't complain
14657 about temp without target decl.
14659 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
14661 * decl.c (grokdeclarator): Don't core dump when void() is given.
14663 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
14665 * decl.c (copy_args_p): Don't crash.
14667 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
14669 * pt.c (tsubst): And support template args inside the exception
14672 * pt.c (tsubst): Add support for exception specifications in
14673 template functions.
14675 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
14677 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
14679 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
14680 (start_function): Likewise.
14681 (start_method): Likewise.
14682 (grokfield): Likewise.
14683 (make_call_declarator): Add throw spec parameter.
14684 (set_quals_and_spec): Add routine.
14685 * lex.c (set_quals_and_spec): Likewise.
14686 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
14687 * decl.c (shadow_tag): Eliminate the throw spec parameter to
14689 (groktypename): Likewise.
14690 (start_decl): Eliminate the throw spec parameter. Eliminate the
14691 throw spec parameter to grokdeclarator. Eliminate the throw spec
14692 field in DECL_STMT.
14693 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
14694 (grokfndecl): Remove useless set of raises.
14695 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
14696 the throw spec parameter to start_decl. Pull the throw spec out
14697 of the call declarator.
14698 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
14699 (start_function): Eliminate the throw spec parameter. Eliminate
14700 the throw spec parameter to grokdeclarator.
14701 (start_method): Likewise.
14702 * decl2.c (grokfield): Likewise.
14703 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
14704 (grokoptypename): Likewise.
14705 (finish_file): Eliminate the throw spec parameter to
14706 start_function. Add throw spec to make_call_declarator.
14707 * except.c (init_exception_processing): Add throw spec to
14708 make_call_declarator. Eliminate the throw spec parameter to
14710 (expand_start_catch_block): Eliminate the throw spec parameter to
14712 (expand_builtin_throw): Add throw spec to make_call_declarator.
14713 Eliminate the throw spec parameter to start_function.
14714 (start_anon_func): Likewise.
14715 * lex.c (make_call_declarator): Add throw spec parameter.
14716 (set_quals_and_spec): New routine.
14717 (cons_up_default_function): Add throw spec to make_call_declarator.
14718 Eliminate the throw spec parameter to grokfield.
14719 * method.c (synthesize_method): Eliminate the throw spec parameter
14721 * pt.c (process_template_parm): Eliminate the throw spec parameter
14723 (tsubst): Add throw spec to make_call_declarator.
14724 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
14725 (do_function_instantiation): Eliminate the throw spec parameter to
14726 grokdeclarator. Eliminate the throw spec parameter to
14728 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
14730 * parse.y (datadef): Remove non-winning optimization.
14732 (fndef): Remove ambiguous error productions uncovered by grammar
14734 (constructor_declarator): Add exception_specification_opt here.
14735 (component_constructor_declarator): Likewise.
14736 (direct_after_type_declarator): Likewise.
14737 (complex_direct_notype_declarator): Likewise.
14738 (direct_abstract_declarator): Likewise.
14739 (fn.def1): Remove exception_specification_opt.
14740 (fn.def2): Likewise.
14741 (condition): Likewise.
14742 (initdcl0): Likewise.
14743 (initdcl): Likewise.
14744 (notype_initdcl0): Likewise.
14745 (nomods_initdcl0): Likewise.
14746 (component_decl_1): Likewise.
14747 (component_declarator): Likewise.
14748 (after_type_component_declarator0): Likewise.
14749 (after_type_component_declarator): Likewise.
14750 (notype_component_declarator): Likewise.
14752 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
14754 * call.c (build_over_call): Also use an INIT_EXPR when
14755 initializing anything from an rvalue.
14757 * call.c (build_over_call): Call stabilize_reference when building
14758 an INIT_EXPR instead of calling the copy ctor.
14760 * call.c (joust): Extend the previous change to all comparisons.
14762 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
14763 NO_LINKAGE_HEURISTICS.
14765 * decl2.c (finish_file): Emit any statics that weren't already.
14767 * typeck.c (build_static_cast): Implement.
14768 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
14769 * decl.c (grokparms): Use can_convert_arg instead of
14770 implicit_conversion directly.
14771 (copy_args_p): New fn.
14772 * cvt.c (convert_to_reference): Don't complain about temp with
14774 (build_up_reference): Handle TARGET_EXPRs.
14775 * call.c (build_over_call): Elide unnecessary temps.
14776 (can_convert*): Use new overloading code.
14778 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
14780 * call.c: Move TYPE_PTR*_MACROS ...
14781 * cp-tree.h: To here.
14782 * typeck.c (build_reinterpret_cast): Implement.
14784 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
14786 (joust): If we're comparing a function to a builtin and the worst
14787 conversion for the builtin is worse than the worst conversion for the
14788 function, take the function.
14790 * typeck.c (build_const_cast): Implement.
14791 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
14792 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
14794 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
14796 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
14797 too early. Make sure we explode if exprtype turns out to be a
14798 NULL_TREE when it shouldn't be.
14800 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
14802 * cp-tree.h: New routine make_call_declarator.
14803 * lex.c (make_call_declarator): Define it.
14804 * except.c (init_exception_processing): Use it.
14805 (expand_builtin_throw): Likewise.
14806 (start_anon_func): Likewise.
14807 * decl2.c (finish_file): Likewise.
14808 * lex.c (cons_up_default_function): Likewise.
14809 * parse.y: Likewise.
14810 * pt.c (tsubst): Likewise.
14812 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
14814 * decl2.c (groktypefield): Remove unused code.
14816 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
14818 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
14819 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
14820 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
14821 nonempty_cv_qualifiers.
14824 * lex.c (make_pointer_declarator): Change type_quals into
14826 (make_reference_declarator): Likewise.
14828 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
14830 * decl.c (start_function): Only check interface_* for templates
14831 with flag_alt_external_templates.
14833 * call.c (build_new_op): Check for comparison of different enum types.
14834 (build_over_call): Fix arg # output.
14836 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
14838 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
14840 * call.c (build_new_op): Check for erroneous args.
14842 * call.c (build_new_method_call): Add missing args to cp_error.
14844 * tree.c (error_type): Don't print reference-to-array.
14846 * typeck.c (convert_for_assignment): Don't say contravariance for
14849 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
14851 * call.c (build_over_call): Diagnose bad convs for `this'.
14853 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
14856 * call.c (convert_like): Handle bad convs.
14857 (build_over_call): Handle bad convs better.
14859 * decl2.c: -fansi-overloading is now the default.
14861 * call.c (build_new_method_call): Check for erroneous args.
14863 * pt.c (instantiate_class_template): Propagate
14864 TYPE_USES_MULTIPLE_INHERITANCE.
14866 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
14868 * call.c (enforce_access): Add static to routine.
14870 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
14872 * call.c (build_user_type_conversion_1): Fix bad handling.
14873 (compare_ics): Likewise.
14875 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14877 * call.c (standard_conversion): Oops.
14879 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
14881 * g++.c: Update test for win32 (&& ! cygwin32).
14883 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
14885 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
14886 (ptr_reasonably_similar): New fn.
14887 * call.c (BAD_RANK): New rank.
14888 (ICS_BAD_FLAG): New macro.
14889 (standard_conversion): Handle almost-right pointer conversions.
14890 (reference_binding): Handle bad rvalue bindings.
14891 (add_*_candidate): Stuff.
14892 (build_over_call): Pass bad conversions to convert_for_initialization.
14893 (compare_ics): Handle bad convs.
14896 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
14898 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
14899 integer_type_node when computing pointer offsets.
14901 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
14903 * tree.c (lvalue_type): New fn.
14904 (error_type): New fn.
14905 * call.c (op_error): Use error_type.
14906 (add_conv_candidate): Use lvalue_type.
14907 (add_builtin_candidates): Likewise.
14908 * error.c (args_as_string): Use error_type.
14910 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
14912 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
14913 (tsubst): Not here.
14915 * decl.c (init_decl_processing): With -ansi, __null's type is the
14916 signed integral type with the same number of bits as a pointer.
14917 Introduce a new variable null_node for it.
14918 * cp-tree.h: Adjust.
14919 * call.c (null_ptr_cst_p): Adjust.
14921 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
14923 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
14926 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
14928 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
14929 fns of classes without virtual functions.
14931 * call.c (add_function_candidate): Handle `this' specially.
14932 (compare_ics): Likewise.
14934 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
14936 * typeck.c (build_conditional_expr): Fix handling of __null.
14938 * decl2.c (comdat_linkage): New fn.
14939 (import_export_vtable): Use it.
14940 (import_export_decl): Use it.
14941 * method.c (make_thunk): Use it.
14943 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14945 * pt.c (end_template_decl): If we don't actually have parms, return.
14946 * parse.y (template_header): Accept 'template <>'.
14948 * errfn.c: Allow 5 args.
14950 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
14952 * tree.c (make_temp_vec): New fn.
14953 * pt.c (push_template_decl): Handle partial specs.
14954 (instantiate_class_template): Likewise.
14955 (more_specialized): Use get_bindings.
14956 (more_specialized_class): New fn.
14957 (get_class_bindings): New fn.
14958 (most_specialized_class): New fn.
14959 (do_function_instantiation): List candidates for ambiguous case.
14960 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
14961 (shadow_tag): Call push_template_decl for partial specializations.
14962 * parse.y: Likewise.
14963 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
14964 DECL_TEMPLATE_MEMBERS.
14965 * call.c (print_z_candidates): Reduce duplication.
14967 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
14969 * decl2.c (lang_decode_option): Allow -fansi-overloading.
14971 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
14973 * pt.c (get_bindings): New fn.
14974 (most_specialized): Likewise.
14975 (do_function_instantiation): Use them.
14976 (add_maybe_template): New fn.
14977 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
14978 * call.c (build_new_op): Handle guiding decls.
14979 (build_new_function_call): Likewise.
14980 * decl2.c (finish_file): Likewise.
14982 * decl2.c (mark_used): Do synthesis here.
14983 * call.c (build_method_call): Not here.
14984 (build_over_call): Or here.
14985 * typeck.c (build_function_call_real): Or here.
14986 * tree.c (bot_manip): Call mark_used on functions used in default
14989 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
14991 * decl2.c (import_export_vtable): Delete code that disabled vtable
14992 heuristic on systems with ASM_OUTPUT_EXTERNAL.
14994 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
14996 * typeck.c (build_x_function_call): Handle static call context
14999 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
15000 the function, not its outer block.
15002 * call.c (build_field_call): Pass fields on to build_opfncall
15003 regardless of TYPE_OVERLOADS_CALL_EXPR.
15004 (build_method_call): Pass on to build_new_method_call sooner.
15006 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
15008 * class.c (instantiate_type): Don't put a POINTER_TYPE to
15009 METHOD_TYPE on an expression. Also make a copy of rhs instead of
15012 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15014 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
15015 (add_builtin_candidate): Don't take enums for ++.
15016 (build_new_method_call): Handle non-aggregates and field calls.
15017 Move new overloading code from...
15020 * decl.c (grokparms): Don't check default args in templates.
15022 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
15024 * cvt.c (build_new_op): Fix args to build_unary_op.
15025 (add_builtin_candidates): Don't call type_promotes_to on float.
15027 * decl.c (grokparms): Check the type of the default arg.
15029 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
15030 returning NULL_TREE.
15032 * typeck.c (build_x_binary_op): Avoid doing extra work.
15033 (build_x_unary_op): Likewise.
15034 (build_x_conditional_expr): Likewise.
15035 * cvt.c (build_over_call): Return.
15036 (add_builtin_candidate): Fix MEMBER_REF.
15037 (build_new_op): Likewise.
15039 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
15041 * method.c (build_overload_name): Put bug fix into code but leave
15042 disabled for now so we can be bug compatible with older releases
15043 that do repeats incorrectly. In the future, we can enable it.
15045 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
15047 * cvt.c (convert_like): Don't call build_cplus_new twice.
15049 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
15050 Control new overloading code with -fansi-overloading.
15052 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
15054 * cvt.c (build_over_call): Call build_cplus_new.
15055 * call.c (build_method_call): Likewise.
15056 * typeck.c (build_function_call_real): Likewise.
15057 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
15058 the COND_EXPR in a TARGET_EXPR so they use the same slot.
15060 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
15062 * typeck.c (complete_type): Propagate
15063 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
15065 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
15067 * cvt.c (joust): More ?: kludging. Sigh.
15068 (build_over_call): Don't try to synthesize global fns.
15070 * search.c (lookup_conversions): Use binfo marking.
15072 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
15074 * search.c (build_mi_matrix): Use the correct value of cid
15075 when determining the new mi_size.
15077 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15079 * cvt.c (add_builtin_candidates): Do consider type conversion ops
15080 for the first parms of += et al.
15081 (strip_top_quals): New fn.
15082 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
15083 (implicit_conversion): Likewise.
15084 (add_builtin_candidates): Be careful about arrays.
15085 (build_new_method_call): Handle vtable optimization.
15087 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15089 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
15090 * cvt.c (reference_binding): Use it.
15091 (implicit_conversion): Use it.
15092 (add_builtin_candidate, COND_EXPR): Use it.
15094 * cvt.c (build_new_function_call): Check for error args.
15096 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
15098 * gxx.gperf: Add __null.
15099 * hash.h: Regenerate.
15100 * lex.h: Add RID_NULL.
15101 * lex.c (init_lex): Create null_pointer_node here, stick it in
15103 * decl.c (init_decl_processing): Still set its type here.
15104 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
15105 (convert_to_pointer_force): Likewise.
15106 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
15108 * call.c (convert_harshness): Use null_ptr_cst_p.
15109 * typeck.c (convert_for_assignment): Likewise. Don't produce
15112 * error.c (args_as_string): Handle lists of actual args, too.
15113 * cvt.c (null_ptr_cst): Support (void*)0 for now.
15114 (build_user_type_conversion_1): Improve diagnostics.
15115 (build_new_function_call): Likewise.
15116 (build_object_call): Likewise.
15117 (build_new_method_call): Likewise. Move call before def diagnostic...
15118 (build_over_call): Here.
15120 * cvt.c (build_new_method_call): Don't complain about no match if
15121 LOOKUP_SPECULATIVELY.
15122 (build_over_call): Fix 'this' for virtual fn.
15123 (build_new_method_call): Add diagnostic.
15125 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15127 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
15128 constructors to be passed in.
15129 (build_over_call): Likewise.
15130 (build_user_type_conversion_1): Pass them in.
15131 (convert_like): Likewise.
15132 (build_object_call): Handle overloaded conversions.
15133 (build_over_call): Pass the right args to build_vfn_ref.
15134 (standard_conversion): Fix pmf convs.
15135 (joust): Handle comparing statics and non-statics.
15136 (build_new_method_call): New fn.
15137 * call.c (build_method_call): Call it if NEW_OVER.
15139 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
15141 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
15144 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
15146 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
15147 instead of just maybe_build_cleanup so that we deallocate the
15150 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15152 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
15153 * cp-tree.h (finish_prevtable_vardecl): Add decl.
15155 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
15157 * pt.c (instantiate_class_template): Call complete_type. Also, if
15158 we're at the end of the file and we just instantiated a template
15159 class with a vtable, call finish_prevtable_vardecl.
15161 * error.c (dump_decl): Don't explode (or explode more gracefully
15162 as appropriate) if the object being dumped has a null type.
15163 (dump_expr): Likewise.
15165 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
15166 by counting the number of nodes that we'll need before allocating
15168 (lookup_fnfields): Fix comment.
15169 (breadth_first_search): Fix comment.
15171 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
15173 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
15175 * class.c (finish_struct): Call cplus_decl_attributes here.
15176 (finish_struct_1): Not here.
15177 * cp-tree.h: Adjust.
15179 * pt.c (type_unification): New parameter STRICT.
15180 (unify): If STRICT, don't allow cv addition or base deduction.
15181 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
15183 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15185 * search.c (get_template_base{_recursive}): New fns.
15186 * pt.c (more_specialized): New fn.
15187 (do_function_instantiation): Use it.
15188 (unify): Handle base deduction.
15189 * cvt.c (joust): Use more_specialized.
15190 Don't arbitrarily choose between non-builtin candidates.
15191 (build_over_call): Call require_complete_type.
15193 * decl.c (start_function): Statics are static even in a #pragma
15196 * decl2.c (import_export_vtable): Disable vtable heuristic on
15197 systems with ASM_OUTPUT_EXTERNAL.
15199 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
15200 (standard_conversion): No std conv to enum type.
15202 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
15205 * cvt.c (reference_binding): Bind directly to a base subobject of
15208 * cvt.c (build_new_op): Enforce access control.
15210 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
15212 * typeck2.c (process_init_constructor): When scanning the
15213 union for a named field, skip things that aren't FIELD_DECLs.
15215 * method.c (synthesize_method): Don't scan fndecl's rtl if
15216 we're at the end of the file; just assume the function can't
15219 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15221 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
15224 * cvt.c (build_user_type_conversion_1): Handle overloaded
15227 * cvt.c (add_builtin_candidates): Don't consider type conversion
15228 operators for the first parameter of operator=.
15230 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
15232 * typeck.c (complete_type): Only call layout_type if we're not
15233 expanding a template.
15235 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15237 * cvt.c (compare_ics): Oops.
15239 * cvt.c (op_error): Oops.
15241 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
15242 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
15243 (build_conv): Use them.
15244 (implicit_conversion): Use them.
15245 (convert_like): Handle them.
15246 (build_new_op): Handle builtin COND_EXPR again.
15247 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
15248 in lists of types for COND_EXPR.
15249 (add_builtin_candidate): Add enum candidates for COND_EXPR.
15251 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
15253 * typeck.c (build_modify_expr): Always attempt to build a call to
15254 the assignment operator, even if we're using a default one.
15255 (convert_for_initialization): Call complete_type.
15257 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15259 * cvt.c (reference_binding): A REF_BIND gets the reference type.
15260 (implicit_conversion): Likewise.
15261 (convert_like): Likewise.
15262 (compare_ics): Likewise.
15263 (compare_qual): Likewise.
15264 (print_z_candidates): Handle no candidates.
15265 (build_new_op): Don't handle builtin COND_EXPR for now.
15267 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
15269 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
15271 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
15273 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
15275 * cvt.c (build_builtin_candidate): Oops.
15276 (build_new_op): Oops.
15278 * method.c (build_opfncall): Pass COND_EXPR on.
15279 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
15280 (add_builtin_candidate{,s}): Likewise.
15281 (add_builtin_candidates): Likewise.
15282 (print_z_candidates, op_error, build_new_op): Likewise.
15283 (type_decays_to): New fn.
15284 * lex.c (init_lex): Just say ?: for COND_EXPR.
15286 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
15288 * typeck.c (complete_type): Call layout_type rather than building
15291 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
15292 only use ptrdiff_t.
15294 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15296 * cvt.c: Always compile the new overloading code (but don't use it).
15297 (implicit_conversion): Add a BASE_CONV when converting to
15298 the same class type.
15299 (convert_like): Handle BASE_CONV.
15301 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15303 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
15304 (add_builtin_candidate): Likewise.
15307 * typeck.c (build_x_function_call): Try an operator function
15308 whenever we call an object of class type.
15309 * method.c (build_opfncall): Pass CALL_EXPRs through.
15310 * cvt.c (implicit_conversion): Do const-ref case first.
15311 (add_conv_candidate, build_object_call, op_error): New fns.
15312 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
15313 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
15314 builtin candidates.
15315 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
15316 Fall back on preincrement handling. Use op_error.
15318 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
15319 an error_mark_node.
15320 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
15323 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
15325 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
15327 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
15329 * typeck.c (build_component_ref_1): Use build_component_ref
15330 instead of open coding it here.
15332 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
15334 * g++.c (main): Don't link with -lg++.
15337 * cvt.c (convert_to_reference): Don't use convert_from_reference on
15338 result of build_type_conversion.
15339 (cp_convert): Only call build_method_call for ctors if
15340 build_type_conversion failed.
15341 (ptr_complete_ob): New function.
15342 (TYPE_PTR{,OB,MEM}_P): New macros.
15343 ({add,build}_builtin_candidate{,s}): New functions.
15344 (print_z_candidates): Handle builtins.
15345 (build_user_type_conversion_1): Don't use conversion fns for
15346 converting to a base type.
15347 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
15348 (build_user_type_conversion): Use convert_from_reference.
15349 (build_new_op): New function.
15350 (build_over_call): Fix handling of methods.
15351 (compare_ics): Handle AMBIG_CONV properly.
15352 * typeck2.c: Increment abort count.
15353 * method.c (build_opfncall): Forward most requests to build_new_op.
15354 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
15356 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15358 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
15359 invalid second argument to dump_expr_list.
15361 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
15363 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
15365 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
15367 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
15370 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
15372 * typeck2.c (process_init_constructor): New pedwarn for using { }
15373 to initialize a pointer to member function.
15374 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
15375 we can avoid the new error.
15377 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
15379 * typeck.c (build_ptrmemfunc1): New function to hide details of
15380 pointer to member functions better.
15382 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
15384 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
15385 methods into the actual method, as we know the implied object is
15388 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15390 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
15391 inside a system header.
15393 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
15395 * call.c (build_method_call): Call complete_type on the
15398 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
15400 * typeck.c (build_component_ref): Always build up an OFFSET_REF
15401 for obj_ptr->func so that we can know which object to use in a
15404 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
15406 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
15407 around things. Also improve maintainability.
15409 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
15411 * decl.c (grokdeclarator): Check for overflow when evaluating an
15414 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
15416 * cvt.c (cp_convert): Don't check for ambiguity with constructor
15419 * typeck.c (build_x_function_call): Pass function overload
15420 questions to new overloading code if NEW_OVER.
15421 * init.c (expand_aggr_init_1): Only check for type conversion ops
15422 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
15423 Don't check for ambiguity with constructor if NEW_OVER.
15424 * cvt.c (convert_to_reference): Dereference the result of a type
15425 conversion operator.
15426 (build_conv): Propagate ICS_USER_FLAG.
15427 (implicit_conversion): Call instantiate_type.
15428 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
15429 (add_function_candidate): Fix cv-quals on argtype.
15430 (print_z_candidates): New function.
15431 (build_new_function_call): Call it.
15432 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
15433 consider non-converting constructors.
15434 Call print_z_candidates.
15435 Return an AMBIG_CONV for an ambiguous conversion.
15436 (build_user_type_conversion): Handle AMBIG_CONV.
15437 (convert_like): Fix test for building TARGET_EXPR.
15438 Call instantiate_type.
15439 Handle AMBIG_CONV and LVALUE_CONV.
15440 (build_over_call): Handle 0 args and ellipsis.
15441 * cp-tree.def: Add AMBIG_CONV.
15443 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
15445 * decl.c (lookup_name_real): If we find mem in obj when parsing
15446 `obj->mem', make sure we return the right value.
15448 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
15450 * search.c (get_base_distance): Call complete_type.
15452 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
15454 * decl.c (store_bindings): Make static.
15456 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
15458 * init.c (expand_aggr_init_1): Don't check type conversions if
15461 * cvt.c (z_candidate): Put back template field.
15462 (add_function_candidate): Set it.
15463 (add_template_candidate): Likewise.
15465 (compare_qual): Handle references and pointers to members.
15466 (compare_ics): Handle reference bindings.
15468 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
15470 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
15472 * call.c (compute_conversion_costs): Call complete_type.
15474 * tree.c (vec_binfo_member): Use comptypes instead of comparing
15475 pointers, so we can handle template parameters.
15477 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
15479 * cvt.c (cp_convert_to_pointer): We have to call complete_type
15480 here; let's make it explicit instead of a side effect of an
15483 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15485 * cvt.c (z_candidate): Remove template field.
15486 (reference_binding): Handle binding to temporary.
15487 (implicit_conversion): Likewise.
15488 (add_function_candidate): Handle artificial constructor parms.
15489 Handle functions with too few parms.
15490 (add_template_candidate): New function.
15491 (build_user_type_conversion_1): Handle constructors.
15492 (convert_like): Likewise.
15493 (build_over_call): Likewise.
15494 (build_new_function_call): Support templates.
15495 (compare_ics): Fix reference, inheritance handling.
15497 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
15499 * decl.c: Add signed_size_zero_node.
15500 (init_decl_processing): Build it.
15501 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
15502 when we're trying to make a negative delta.
15504 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15506 Stop doing this damn index==strchr variable name confusion.
15507 * class.c (add_virtual_function): Change local var INDEX to be
15509 (add_method): Likewise.
15510 * lex.c (print_parse_statistics): Likewise.
15511 * search.c (make_memoized_table_entry): Likewise.
15512 (lookup_fnfields_here): Likewise.
15513 (lookup_field): Likewise.
15514 (lookup_fnfields): Likewise.
15515 (get_baselinks): Likewise.
15516 * sig.c (build_signature_table_constructor): Likewise.
15517 (build_signature_method_call): Likewise.
15518 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
15519 (get_member_function_from_ptrfunc): Likewise.
15520 (build_ptrmemfunc): Change local var INDEX to be IDX.
15521 (c_expand_start_case): Likewise.
15523 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15525 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
15526 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
15527 (convert_to_reference): Use build_type_conversion to convert to
15528 the reference type directly.
15529 (standard_conversion): Fix void* case, non-conversions.
15530 (reference_binding): Fix expr == 0 case, non-conversions.
15531 (convert_like): Support REF_BIND.
15532 (compare_qual): Split out from compare_ics.
15533 (compare_ics): Use it, handle icses with only a qual_conv.
15535 * init.c (expand_vec_init): Don't crash if decl is NULL.
15537 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
15539 * mpw-config.in: New file, configury for Mac MPW.
15540 * mpw-make.sed: New file, makefile editing for MPW.
15542 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15544 * pt.c (instantiate_class_template): Call repo_template_used.
15546 * search.c (lookup_conversions): Only lookup conversions in
15549 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15551 * cp-tree.def: Renamed from tree.def, to avoid confusion with
15553 * cp-tree.h, lex.c: Include cp-tree.def.
15554 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
15556 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
15558 * init.c (build_vec_delete_1): Call complete_type.
15560 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
15562 * except.c (start_anon_func): Make sure anonymous functions are
15565 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15567 * decl.c (finish_function): If function_depth > 1, set nested.
15569 * decl2.c (grokbitfield): Revert Bob's change.
15570 * class.c (finish_struct_1): Fix handling of named bitfield widths.
15572 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
15574 * pt.c (add_pending_template): Handle types.
15575 (lookup_template_class): With -fexternal-templates, just add the class
15576 to pending_templates instead of instantiating it now.
15577 * decl2.c (finish_file): Handle types in pending_templates.
15579 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
15581 * decl2.c (grokbitfield): Handle constant decls appropriately.
15582 Give an appropriate error message now instead of spewing core
15585 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
15587 * decl2.c: Don't turn on thunks by default for now.
15589 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
15591 * typeck.c (complete_type): Handle error_mark_node.
15592 (common_type, OFFSET_TYPE): Handle template_type_parms.
15594 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
15596 * pt.c (instantiate_decl): If at_eof, call import_export_decl
15597 regardless of DECL_INLINE.
15599 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
15601 * class.c (finish_struct_bits): Copy TYPE_SIZE.
15603 * rtti.c (build_dynamic_cast): Support templates.
15604 * tree.def: Support DYNAMIC_CAST_EXPR.
15605 * pt.c (tsubst_copy): Likewise.
15606 * decl2.c (build_expr_from_tree): Likewise.
15608 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15610 * typeck.c (build_static_cast): Support templates.
15611 (build_const_cast): Likewise.
15612 * tree.def: Support CONST/STATIC_CAST_EXPR.
15613 * pt.c (tsubst_copy): Likewise.
15614 * decl2.c (build_expr_from_tree): Likewise.
15616 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15618 * decl2.c (finish_vtable_vardecl): Don't trust
15619 TREE_SYMBOL_REFERENCED for vtables of local classes.
15621 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
15623 * pt.c (tsubst_copy): Handle operator T.
15625 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
15627 * init.c (build_delete): Move creation of PARMS inside test of
15628 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
15630 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
15632 * typeck.c (build_conditional_expr): Don't assume that
15633 the arguments to ?: are always pointers or records.
15635 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15637 * decl2.c (import_export_decl): Still emit static/weak/comdat
15638 copies of inline template functions with -fno-implicit-templates.
15640 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
15642 * init.c (build_delete): Determine the complete basetype
15643 path to the destructor we're calling.
15645 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
15647 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
15648 initialize the enum, because we really and truly don't know where
15650 (start_enum): Don't copy integer_zero_node because
15651 build_enumerator will do it.
15653 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
15655 * decl.c (finish_function): Do access control on base destructors.
15657 * pt.c (tsubst, case FUNCTION_DECL): Set up
15658 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
15661 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
15663 * cvt.c (build_up_reference): If we have already extended the
15664 lifetime of the temporary, don't try it again.
15665 * typeck.c (c_expand_return): Don't try and convert the return
15666 value twice when we want a reference, once is enough.
15668 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
15670 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
15671 LOOKUP_ONLYCONVERTING at all for now.
15673 * search.c (add_conversions): Put the conversion function in
15674 TREE_VALUE, the basetype in TREE_PURPOSE.
15675 * cvt.c (build_type_conversion): Adjust.
15676 * cvt.c (build_expr_type_conversion): Adjust.
15677 * call.c (user_harshness): Adjust.
15679 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15681 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
15684 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
15686 * except.c (expand_start_catch_block): Add a dummy region, if we
15687 get an error, so that we can avoid core dumping later.
15689 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
15691 * cp-tree.h (OFFSET_REF): Remove.
15692 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
15693 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
15694 * init.c (expand_aggr_init_1): Likewise.
15695 (build_new): Likewise.
15696 * typeck.c (expand_target_expr): Likewise.
15698 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
15700 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
15703 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
15705 * cvt.c (build_up_reference): Redo how and when temporaries are
15707 * decl.c (grok_reference_init): Don't try and be smart about
15710 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
15712 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
15713 (TARGET_EXPR...), now that it has 4 arguments.
15714 * tree.c (build_cplus_new): Likewise.
15716 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15718 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
15720 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
15721 * decl.c (struct saved_scope): Remove named_labels,
15722 {base,member}_init_list.
15723 (maybe_push_to_top_level): Don't set them. Call
15724 push_cp_function_context if appropriate.
15725 (pop_from_top_level): Likewise.
15727 * method.c (do_build_assign_ref): Remove obsolete check of
15728 TYPE_HAS_ASSIGN_REF (basetype).
15730 * decl.c (grokfndecl): Diagnose user definition of
15731 implicitly-declared methods.
15733 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
15735 * method.c (do_build_copy_constructor): Add code to give
15736 meaningful error messages instead of crashing.
15737 (do_build_assign_ref): Don't synthesize assignment operators for
15738 classes containing reference or const members.
15740 * class.c (struct base_info): Remove cant_synth_copy_ctor
15741 and cant_synth_asn_ref.
15742 (finish_base_struct): Remove the code that tries to conditionalize
15743 synthesis of copy constructors & assignment operators based on
15744 access permissions. Instead, let it fail when it tries to
15745 synthesize the copy constructor. This will give meaningful error
15746 messages instead of silently generating code to perform a bitcopy.
15748 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
15750 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
15751 determining types for constant values.
15753 * decl.c (struct named_label_list): Use instead of stuffing
15754 random items into a TREE_LIST node.
15755 (named_label_uses): Use the new struct.
15756 (poplevel): Likewise.
15757 (lookup_label): Likewise.
15758 (define_label): Add an error message to tell the user the line
15759 where the goto is located in addition to the destination of the
15761 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
15763 (finish_function): Likewise.
15765 (start_decl): Complain about defining a static data member
15766 in a different type from which it was declared.
15768 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15770 * cvt.c (build_expr_type_conversion): Adjust.
15772 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
15774 * call.c (build_method_call): Always convert 'this' to the
15777 * search.c (add_conversions): Put the conversion function in
15778 TREE_VALUE, the type in TREE_PURPOSE.
15779 * cvt.c (build_type_conversion): Adjust.
15780 * call.c (user_harshness): Adjust.
15782 * method.c (emit_thunk): Call temporary_allocation and
15783 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
15785 * tree.c (build_cplus_array_type): Handle tweaking of
15786 TYPE_MAIN_VARIANT here.
15787 * typeck.c (common_type): Not here.
15789 * typeck.c (complete_type): Only try to complete an array type if
15792 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
15794 * decl.c (grokvardecl): Call complete_type.
15795 (grokdeclarator): Call complete_type for PARM_DECLs.
15797 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
15799 * pt.c (instantiate_class_template): Re-set
15800 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
15802 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
15804 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
15805 smart enough to do it right.
15806 * tree.c (cp_expand_decl_cleanup): Likewise.
15807 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
15808 cp_expand_decl_cleanup.
15809 (store_parm_decls): Likewise.
15810 (hack_incomplete_structures): Likewise.
15811 * except.c (push_eh_cleanup): Likewise.
15813 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
15815 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
15816 frontend to the backend where it belongs.
15817 * tree.c (unsave_expr): Likewise.
15818 (unsave_expr_now): Likewise.
15819 * tree.def (UNSAVE_EXPR): Likewise.
15820 * cp-tree.h (unsave_expr): Likewise.
15821 (unsave_expr_now): Likewise.
15823 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
15825 * init.c (emit_base_init): Make sure the partial EH cleanups live
15826 on the function_obstack.
15828 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
15830 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
15831 when checking for pointer types.
15833 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
15835 * pt.c (instantiate_class_template): Remove obsolete check for
15836 access declarations.
15838 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
15840 * call.c (build_overload_call): Simplify calls to
15841 build_overload_call by removing last parameter.
15842 (build_method_call): Likewise.
15843 * cp-tree.h: Likewise.
15844 * method.c (build_opfncall): Likewise.
15845 * typeck.c (build_x_function_call): Likewise.
15847 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
15849 * call.c (default_parm_conversions): Factor out common code.
15850 (build_method_call): Use it.
15851 (build_overload_call_real): Use it.
15853 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
15855 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
15856 but pedwarn as the code is bogus.
15857 * typeck.c (decay_conversion): Likewise.
15858 (build_function_call_real): Use build_addr_func instead of
15859 default_conversion. Don't allow pointer-to-method functions down
15861 (build_unary_op): Use real pointer-to-member functions instead of
15863 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
15864 (convert_for_assignment): Removed some obsolete code.
15865 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
15866 build_x_function_call instead of current_class_ptr. Only call
15867 digest_init once on an initializer, we do this just checking
15869 (build_expr_from_tree): Pass current_class_ref to
15870 build_x_function_call instead of current_class_ptr.
15871 * init.c (build_member_call): Likewise.
15872 * pase.y: Likewise.
15873 * error.c (dump_expr): Handle OFFSET_REFs better.
15874 * pt.c (unify): Handle pointer-to-member functions better.
15875 * decl.c (finish_function): Clear out current_class_ref just like
15876 we do for current_class_ptr.
15878 * typeck.c (get_delta_difference): Handle virtual bases better.
15880 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
15882 * sig.c (build_signature_table_constructor): Use the delta for
15883 the original basetype for this virtual function with thunks.
15884 (build_signature_method_call): We still need to adjust 'this'
15887 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
15889 * call.c (build_addr_func): New routine. Used to get the `real'
15890 address of a function or a method. Needed to avoid getting a
15891 pointer-to-member function.
15892 (build_call): New routine to build CALL_EXPRs.
15893 (build_method_call): Use it.
15894 * cvt.c (convert_to_aggr): Likewise.
15895 * typeck.c (build_function_call_real): Likewise.
15896 * sig.c (build_signature_table_constructor): Use build_addr_func.
15897 * cp-tree.h (build_call, build_addr_func): Declare them.
15899 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
15901 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
15902 * parse.y: Remove uses of LOOKUP_AGGR.
15904 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
15906 * *.[chy]: Rename current_class_decl to current_class_ptr, and
15907 C_C_D to current_class_ref.
15909 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
15911 * call.c (convert_harshness): Tighten up pointer conversions.
15913 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
15915 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
15916 (finish_file): Likewise.
15918 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
15920 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
15922 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
15925 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
15927 * decl2.c: Turn on thunks by default where supported.
15929 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
15931 * cp-tree.h (build_overload_call_maybe): Removed.
15932 * call.c (build_overload_call_real): Invert meaning of last arg to
15933 be require_complete.
15934 (build_overload_call): Likewise.
15935 * typeck.c (build_x_function_call): Use build_overload_call_real
15936 instead of build_overload_call_maybe.
15938 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
15940 * decl2.c (finish_file): Don't try to emit functions that haven't
15943 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
15945 * decl2.c (finish_vtable_vardecl): Oops.
15947 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
15948 Also store the bindings from previous_class_values.
15949 (pop_from_top_level): Restore them.
15951 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
15953 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
15954 symbol has been referenced.
15955 (finish_file): Re-join synthesis/vtable loop with inline emission
15956 loop, disable inlining when an inline is output.
15958 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
15960 * except.c (init_exception_processing): Setup saved_in_catch.
15961 (push_eh_cleanup): Reset __eh_in_catch.
15962 (expand_start_catch_block): Set __eh_in_catch.
15964 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
15966 * except.c (push_eh_cleanup): Add tracking for whether or not we
15967 have an active exception object.
15968 (expand_builtin_throw): Use it to make sure a rethrow without an
15969 exception object is caught.
15971 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
15973 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
15976 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
15978 * decl2.c (finish_file): Also use sentries for vars with
15979 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
15982 * lex.c (handle_cp_pragma): Disable #pragma
15983 interface/implementation if SUPPORTS_ONE_ONLY > 1.
15985 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
15987 * method.c (emit_thunk): Wrap default case in
15988 temporary/permanent_allocation.
15990 * method.c (make_thunk): Use DECL_ONE_ONLY.
15991 (emit_thunk): Call assemble_end_function.
15993 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
15995 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
15996 (import_export_decl): Likewise.
15997 (finish_prevtable_vardecl): Disable vtable hack if
15998 SUPPORTS_ONE_ONLY > 1.
16000 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
16002 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
16003 PREDECREMENT_EXPRs take two arguments, not one.
16005 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
16007 * class.c (build_vtable_entry): Don't build thunks for abstract
16010 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
16013 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16015 * class.c (set_rtti_entry): Use size_zero_node.
16016 (build_vtable): Likewise.
16018 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
16020 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
16021 (prepare_fresh_vtable): Likewise.
16023 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
16025 * method.c (emit_thunk): Call mark_used on the target function.
16027 * call.c (build_method_call): Don't warn about pending templates.
16029 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16031 * decl2.c (finish_file): Fix list walking logic.
16033 * typeck2.c (check_for_new_type): Only warn if -pedantic.
16035 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
16037 * class.c (finish_struct_1): Remove old code for
16038 dont_allow_type_definitions.
16039 * cp-tree.h: Likewise.
16040 * spew.c: Make sure cp-tree.h is included before parse.h, so the
16041 definition of flagged_type_tree is found before it is used.
16043 * parse.y: Added the ftype member to the type union, and changed a
16044 number of rules to use it instead of ttype. Added calls to
16045 check_for_new_type() as appropriate.
16046 * typeck2.c (check_for_new_type): New function for checking
16047 if a newly defined type appears in the specified tree.
16048 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
16049 for check_for_new_type().
16051 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
16053 * decl2.c (finish_file): Only use a sentry if the decl is public.
16055 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
16056 don't pass LOOKUP_ONLYCONVERTING.
16058 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
16060 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
16061 properly keeps track of const and volatile type modifiers.
16063 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
16065 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
16066 * pt.c (comp_template_args): Use it.
16068 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
16069 assemble_external for artificial function decls.
16071 * decl.c (cp_finish_decl): Oops.
16073 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16075 * decl2.c (import_export_decl): Put static data member templates
16076 into common storage, or make them weak, depending on whether they
16077 are dynamically or statically initialized.
16078 (get_sentry): New function.
16079 (finish_file): Do import_export_decl for static data members before
16080 building the init/fini functions. Don't init/fini a variable that's
16081 EXTERNAL. Use a sentry for variables in common. Fix mismatching
16082 push/pop_temp_slots.
16083 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
16084 expand_static_init thang.
16085 * method.c (get_id_2): New function.
16087 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
16089 * parse.y (empty_parms): Make sure we use C++-style prototypes
16090 when we're declaring member functions.
16092 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16094 * Makefile.in (CONFLICTS): 16 s/r conflicts.
16095 * parse.y (self_template_type): New nonterminal.
16097 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16099 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
16101 * parse.y (base_class.1): Allow 'typename foo::bar'.
16103 * lex.c (check_newline): Remove #pragma code that plays with the
16104 input stream, since we now deal with tokens. Clear nextchar when
16106 (handle_cp_pragma): Use real_yylex.
16107 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
16110 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
16112 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
16114 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16116 * parse.y: New token SELFNAME for potential constructor.
16117 * spew.c (yylex): Handle it.
16118 * lex.c (identifier_type): Produce it.
16120 * parse.y (complete_type_name): In :: case, don't push class binding.
16121 (complex_type_name): Likewise.
16123 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
16125 * typeck.c (build_reinterpret_cast): Handle pointer to member
16128 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16130 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
16132 (check_newline): Put the vtable/unit/implementation/interface pragma
16133 code into handle_cp_pragma, replacing it with a call.
16134 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
16135 args. Get the next token after handling the pragma token.
16137 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16139 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
16140 (convert_to_pointer_force): Likewise.
16142 * init.c (build_new): Fix array new without -fcheck-new.
16144 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
16146 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
16147 tree.c: Lose TYPE_NESTED_NAME.
16149 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
16152 * tree.def: Add VEC_INIT_EXPR.
16153 * expr.c (cplus_expand_expr): Handle it.
16154 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
16155 the extra file-scope symbol nastiness.
16157 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16159 * method.c (make_thunk): Thunks are static.
16160 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
16162 * decl2.c (mark_vtable_entries): Emit thunks as needed.
16163 (finish_file): Don't emit them here.
16165 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16167 * rtti.c (build_dynamic_cast): Handle null pointers.
16168 (ifnonnull): New function.
16170 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
16172 * call.c (build_method_call): Remember the original basetype we
16173 were called with. Give an error message instead of trying
16174 (incorrectly) to call a non-static member function through a
16175 non-inherited class.
16177 * search.c (expand_upcast_fixups): Mark the new fixup as
16180 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16182 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
16184 * class.c (set_rtti_entry): Fix for thunks.
16186 * decl2.c (import_export_decl): Still emit typeinfo fns for
16187 cv-variants of builtin types.
16189 * rtti.c (expand_class_desc): Set up base_info_type_node here.
16190 (init_rtti_processing): Instead of here.
16192 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
16194 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
16195 (build_typeid): Only complain about taking dynamic typeid without
16198 * decl2.c: flag_rtti defaults to 1.
16200 * rtti.c (get_tinfo_var): The general class case is now smaller.
16201 (init_rtti_processing): Pack the latter three fields of base_info
16204 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
16206 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
16208 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
16210 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
16211 (push_memoized_context): Split out code to undefer pop_type_level to
16212 (clear_memoized_cache): here.
16213 (pop_memoized_context): We can only handle one layer of deferral of
16214 pop_type_level so clear the cache, if there was a previous level.
16216 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16218 * rtti.c (init_rtti_processing): Build up base_info_type_node.
16219 (expand_class_desc): Use one pointer to an array of base_info
16220 structs, passed using a CONSTRUCTOR.
16222 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
16224 * class.c (build_vbase_path): Remove block extern for
16225 flag_assume_nonnull_objects here.
16226 (build_vfn_ref): Split out functionality into build_vtbl_ref.
16227 (build_vtbl_ref): New routine.
16228 (build_vtable): Set up rtti info here.
16229 (add_virtual_function): Note in CLASSTYPE_RTTI the best
16230 place where we can get the rtti pointers from to avoid having to
16231 search around for a place.
16232 (finish_base_struct): Likewise.
16233 (finish_struct_1): Likewise. Never create totally new vtables
16234 with totally new vtable pointers for rtti. Disable code to layout
16235 vtable pointers better until we want to break binary
16237 * rtti.c (build_headof_sub): New routine to convert down to a
16238 sub-object that has an rtti pointer in the vtable.
16239 (build_headof): Use it. Also, use build_vtbl_ref now to be more
16241 (build_dynamic_cast): Make sure we have saved it, if we need to.
16242 * search.c (dfs_init_vbase_pointers): Disable code that deals with
16243 a more efficient vtable layout, enable later.
16244 * call.c (flag_assume_nonnull_objects): Moved declaration to
16245 * cp-tree.h: here. Declare build_vtbl_ref.
16246 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
16247 function calls that want a tree.
16249 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16251 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
16252 other X subobjects in the most derived type. Ack.
16254 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
16255 get_typeid will do it for us.
16256 (get_typeid_1): Break out call-building for expand_*_desc to use.
16257 (get_typeid): Call it.
16258 (expand_*_desc): Likewise.
16259 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
16261 (init_decl_processing): Lose builtin_type_tdescs lossage.
16262 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
16264 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
16266 * pt.c (tsubst): When calling set_nested_typename, use
16267 TYPE_NESTED_NAME (current_class_type) instead of
16268 current_class_name.
16270 * decl.c (pushdecl): Likewise.
16271 (pushdecl_class_level): Likewise.
16272 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
16273 set_nested_typename.
16275 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
16277 * rtti.c (synthesize_tinfo_fn): Handle arrays.
16279 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
16281 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
16283 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
16284 (init_rtti_processing): Lose bad_cast_type.
16285 (build_dynamic_cast): Use throw_bad_cast.
16287 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
16289 * decl2.c (finish_file): Don't synthesize artificial functions
16290 that are external and not inline.
16292 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
16294 * decl2.c (finish_file): Handle having new inlines added to
16295 saved_inlines by synthesis.
16297 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
16299 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16301 RTTI rewrite to initialize nodes as needed, not require that
16302 users #include <typeinfo>, complete functionality and reduce wasted
16304 * rtti.c (init_rtti_processing): New fn.
16305 (build_typeid): The vtable entry is now a function.
16306 (get_tinfo_var): New fn.
16307 (get_tinfo_fn): Likewise.
16308 (get_typeid): Use it.
16309 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
16310 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
16312 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
16313 (synthesize_tinfo_fn): New fn.
16314 * method.c (build_t_desc_overload): Lose.
16315 (build_overload_with_type): More generic.
16316 * decl.c (init_decl_processing): Call init_rtti_processing.
16317 * class.c (set_rtti_entry): Use get_tinfo_fn.
16318 * decl2.c (mark_vtable_entries): Mark the rtti function.
16319 (finish_prevtable_vardecl): Don't build_t_desc.
16320 (import_export_decl): Handle tinfo functions.
16321 (finish_file): Likewise.
16322 * typeck.c (inline_conversion): New fn.
16323 (build_function_call_real): Use it.
16324 * cp-tree.h: Add decls.
16326 * method.c (hack_identifier): Also convert component_refs from
16329 * lex.c (cons_up_default_function): Use the type, not the name, in
16332 * decl2.c (import_export_vtable): Fix weak vtables.
16334 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
16336 * search.c (get_base_distance_recursive): Fix access checks for
16339 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16341 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
16343 (convert_harshness): Add prototypes wrapped by PROTO.
16344 * decl2.c (grok_function_init): Likewise.
16345 (do_toplevel_using_decl): Change to void return type.
16346 * class.c (build_vtable_entry): Remove decl of make_thunk.
16347 (merge_overrides): Fix order of arg definitions.
16348 (finish_vtbls): Likewise.
16349 (fixup_vtable_deltas): Likewise.
16350 (modify_all_direct_vtables): Likewise.
16351 (modify_all_indirect_vtables): Likewise.
16352 * search.c (get_base_distance_recursive): Likewise.
16353 (get_abstract_virtuals_1): Likewise.
16354 (fixup_virtual_upcast_offsets): Likewise.
16355 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
16356 * init.c (perform_member_init): Fix order of arg definitions.
16357 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
16358 * cp-tree.h (make_thunk): Add decl.
16359 (overload_template_name, push_template_decl): Add decls.
16360 (do_toplevel_using_decl): Change to void return type.
16361 (vec_binfo_member): Add decl.
16363 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16365 * typeck.c (mark_addressable, convert_for_assignment,
16366 convert_for_initialization, pointer_int_sum, pointer_diff,
16367 unary_complex_lvalue): Add prototypes wrapped by PROTO.
16368 (convert_sequence): #if 0 fn decl, since definition also is.
16370 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
16372 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
16373 cast to pointer types for type searching.
16375 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16377 * typeck.c (get_delta_difference): Use cp_error, not error, in the
16378 case where BINFO == 0.
16380 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
16382 * call.c (build_method_call): Fix wording of error messages so
16383 constructors come out right.
16385 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
16387 * decl.c (push_overloaded_decl): Don't warn about hidden
16388 constructors when both the type and the function are declared
16389 in a system header file.
16391 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
16393 * class.c (finish_struct_1): Propagate the TYPE_PACKED
16394 flag for the type to the type's fields.
16396 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16398 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
16400 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
16402 * class.c (base_info, finish_base_struct): Replace
16403 needs_virtual_dtor with base_has_virtual.
16405 (finish_struct_1): Remove the old code that tried to make default
16406 destructors virtual. Use base_has_virtual when checking if we need
16407 to add a vtable entry for the rtti code.
16409 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16411 * pt.c (push_template_decl): Complain about template decl with
16412 inappropriate declaration.
16414 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
16416 * typeck.c (build_x_unary_op): Remove bogus check for taking
16417 the address of a member function.
16419 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16421 * parse.y (constructor_declarator): Only push the class if
16422 we are not already in the class.
16424 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
16426 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
16427 Add additional argument to INIT_CUMULATIVE_ARGS.
16429 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
16431 * decl.c (shadow_tag): Fix error about anon union with methods.
16433 * parse.y (self_reference): Only generate a self-reference if this
16434 is a non-template class.
16435 (opt.component_decl_list): Only use it if it was generated.
16437 * parse.y (component_decl_1): Use constructor_declarator.
16438 (fn.def2): Likewise.
16439 (notype_component_declarator0): Likewise.
16441 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
16443 * typeck.c (build_x_unary_op): Add checks for taking the address
16444 of a TARGET_EXPR or of a member function, and give appropriate
16447 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
16449 * pt.c (process_template_parm): Allow template type parms to be
16450 used as types for template const parms.
16452 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
16454 * init.c (expand_vec_init): Ensure the eh cleanups are on the
16457 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
16459 * decl.c (lookup_name_real): Be even more picky about the
16460 ambiguous lookup warning.
16461 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
16462 * parse.y (constructor_declarator): Rather than here.
16464 * parse.y (constructor_declarator): New nonterminal.
16466 (explicit_instantiation): Likewise.
16468 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16470 Add implicit declaration of class name at class scope.
16471 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
16472 * parse.y (self_reference): New nonterminal.
16473 (opt.component_decl_list): Use it.
16474 (fn.def1): Add nested_name_specifier type_name cases.
16475 * class.c (build_self_reference): New function.
16476 (finish_struct): Handle access_default later, move self-reference
16478 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
16479 * cp-tree.h: Adjust.
16481 * pt.c (do_function_instantiation): Separate handling of member
16482 functions and non-member functions properly.
16484 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
16486 * pt.c (process_template_parm): Improve error for 'volatile class K'.
16488 * class.c (finish_struct_1): Check the right slot for destructors.
16490 * decl.c (start_enum): Complain about enum templates.
16492 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
16494 * init.c (resolve_offset_ref): Offset pointers to member data by one.
16495 * typeck.c (unary_complex_lvalue): Likewise.
16497 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
16499 * typeck.c (c_expand_return): Check for a returned local
16500 array name, similar to the check for an ADDR_EXPR.
16502 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16504 * decl.c (cp_finish_decl): Don't build cleanups for static
16507 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
16509 * typeck.c (build_modify_expr): Fix error messages to be more
16511 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
16512 assignment operators.
16513 * error.c (assop_as_string): Likewise. Add support for `%Q' for
16514 assignment operators.
16516 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
16518 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
16519 give an error if initialized. pedwarn about nested type with the
16520 same name as its enclosing class.
16522 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
16524 * typeck.c (require_complete_type): Be sure to instantiate the
16525 MAIN_VARIANT of the type.
16527 * decl2.c (finish_file): Instantiate pending templates before
16528 processing static constructors and destructors.
16530 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
16533 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
16535 * decl2.c (delete_sanity): If error_mark_node is passed
16536 in as an expression, quit while we're ahead.
16538 * decl.c (grokdeclarator): Give an error message if `friend'
16539 is combined with any storage class specifiers.
16541 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
16543 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
16544 definition of nonexistent nested type.
16546 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
16547 not to say 'typedef'.
16549 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16551 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
16552 * search.c (dfs_walk, dfs_init_vbase_pointers,
16553 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
16554 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
16556 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16558 * except.c (build_throw): Support minimal parse.
16559 * pt.c (tsubst_copy): Support THROW_EXPR.
16560 * decl2.c (build_expr_from_tree): Likewise.
16562 * pt.c (mangle_class_name_for_template): Always allocate
16565 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
16567 * cvt.c (cp_convert_to_pointer): Give an appropriate error
16568 when trying to cast from an incomplete type.
16570 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16572 * pt.c (instantiate_class_template): Don't bother setting up
16573 CLASSTYPE_TAGS explicitly, as the nested types will add
16576 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
16578 * decl.c (shadow_tag): Remove old error check for usage of
16579 an enum without a previous declaration.
16580 (xref_tag): Add error message about usage of enums without a
16581 previous declaration.
16583 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
16585 * lex.c (do_identifier): Only do name consistency check if we're
16588 * pt.c (push_template_decl): Don't crash if we get a member defn
16589 that doesn't match.
16591 * decl.c (xref_tag_from_type): New function to do an xref without
16592 always having to figure out code_type_node.
16593 * cp-tree.h: Declare it.
16594 * pt.c (instantiate_class_template): Use it for friend classes.
16595 (lookup_template_class): Use it.
16597 * typeck2.c (build_functional_cast): Pull out a single parm before
16598 passing it to build_c_cast.
16600 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
16602 * expr.c (do_case): Give an error message if a pointer is
16603 given as a case value.
16605 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
16607 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
16610 * lex.c (cons_up_default_function): Really, now, interface hackery
16611 does not apply to synthesized methods.
16613 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
16615 * call.c (build_method_call): Ctors and dtors now have special names
16616 with respect to lookups.
16617 * class.c (add_method): Likewise.
16618 (grow_method): Likewise.
16619 (finish_struct_methods): Likewise.
16620 (warn_hidden): Likewise.
16621 (finish_struct_1): Likewise.
16622 * cvt.c (convert_to_reference): Likewise.
16623 (convert_to_aggr): Likewise.
16624 (cp_convert): Likewise.
16625 * decl2.c (check_classfn): Likewise.
16626 * init.c (expand_member_init): Likewise.
16627 (expand_default_init): Likewise.
16628 (expand_aggr_init_1): Likewise.
16629 (build_offset_ref): Likewise.
16630 (build_new): Likewise.
16631 (build_delete): Likewise.
16632 * lex.c (do_inline_function_hair): Likewise.
16633 * search.c (lookup_field_1): Likewise.
16634 (lookup_fnfields_here): Likewise.
16635 (lookup_field): Likewise.
16636 (lookup_fnfields): Likewise.
16637 (get_virtual_destructor): Likewise.
16638 (dfs_debug_mark): Likewise.
16639 (dfs_pushdecls): Likewise.
16640 (dfs_compress_decls): Likewise.
16641 * tree.c (layout_basetypes): Likewise.
16642 * typeck.c (build_component_ref): Likewise.
16643 (build_x_function_call): Likewise.
16644 (build_modify_expr): Likewise.
16645 (convert_for_initialization): Likewise.
16646 (build_functional_cast): Likewise.
16647 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
16650 * decl.c (ctor_identifier): New.
16651 (dtor_identifier): New.
16652 (init_decl_processing): Set them.
16654 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
16656 * typeck.c (build_component_ref): Don't get confused by fields whose
16657 context has no type name, like pointer to member functions.
16659 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
16661 * decl.c (grokdeclarator): Handle typedef without declarator.
16663 * pt.c (tsubst): Handle SCOPE_REF in declarator.
16665 * parse.y (bad_parm): Catch another case of missing `typename'.
16667 * lex.c (yyprint): Handle TYPE_DECLs.
16669 * decl.c (start_function): Don't try to be clever.
16671 * lex.c: Lose compiler_error_with_decl.
16672 * typeck2.c: Lose error_with_aggr_type.
16673 (incomplete_type_error): Use cp_* instead of old functions.
16674 (readonly_error): Likewise.
16675 * typeck.c (convert_arguments): Likewise.
16676 * search.c (lookup_nested_field): Likewise.
16677 * method.c (make_thunk): Likewise.
16678 * decl.c (grokparms): Likewise.
16679 * cp-tree.h: Update.
16681 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
16684 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
16686 * method.c (build_opfncall): When deleting a pointer to an
16687 array, build a new pointer to the tree past any ARRAY_TYPE
16690 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16692 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
16694 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
16696 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
16699 * decl.c (finish_function): Don't set nested based on
16700 hack_decl_function_context.
16701 * parse.y (function_try_block): Check for nested function.
16702 (pending_inlines): Likewise.
16704 * decl2.c (build_expr_from_tree): If a unary op already has a
16705 type, just return it.
16707 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
16709 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
16710 (finish_file): Check the return value of walk_vtables.
16711 (finish_prevtable_vardecl): Return int.
16712 (finish_vtable_vardecl): Likewise.
16713 (prune_vtable_vardecl): Likewise.
16714 * lex.c (set_vardecl_interface_info): Likewise.
16715 * cp-tree.h: Adjust return types.
16717 * class.c (delete_duplicate_fields_1): Don't complain about
16718 duplicate nested types if they're the same type.
16719 (finish_struct): Remove check for duplicate.
16720 * decl2.c (grokfield): Don't check for typedef of anonymous type.
16722 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
16724 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
16726 * decl.c (grokdeclarator): Lose special handling of class-level
16727 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
16728 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
16730 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
16732 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
16734 * search.c (compute_access): Fix handling of anonymous union
16736 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
16737 from anonymous unions to their members.
16739 * typeck.c (build_x_function_call): For static member functions,
16740 hand off to build_member_call.
16742 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
16744 * typeck.c (build_component_ref): Handle OFFSET_REFs.
16746 * init.c (expand_vec_init): Fix init == 0 case.
16748 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
16750 * init.c (build_new): pedwarn about init and array new.
16751 (expand_vec_init): Handle lists, use convert_for_initialization.
16753 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
16754 when converting to an aggregate type.
16755 * cvt.c (cp_convert): Pass it through.
16757 * typeck.c (build_conditional_expr): Handle user-defined
16758 conversions to slightly different types.
16760 * decl.c (grokdeclarator): Force an array type in a parm to be
16763 * decl2.c (do_using_directive): Sorry.
16764 (do_namespace_alias): Likewise.
16765 * lex.c (real_yylex): Warn about using the `namespace' keyword.
16767 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
16769 * parse.y (datadef): Move call to note_list_got_semicolon up.
16771 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
16773 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
16775 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
16777 * decl.c (cp_finish_decl): The exception regions have to be
16778 nested, not overlapping. We start the exception region for a
16779 decl, after it has been fully built, and all temporaries for it
16780 have been cleaned up.
16782 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
16784 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
16786 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
16788 * tree.def: Add RETURN_INIT.
16789 * pt.c (instantiate_decl): Handle RETURN_INIT.
16790 * decl.c (store_return_init): Handle minimal_parse_mode.
16792 * tree.c (cp_build_type_variant): Just return an error_mark_node.
16793 * decl.c (make_typename_type): Don't try to get the file and line
16795 * typeck.c (comptypes): Handle TYPENAME_TYPE.
16797 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
16799 * decl.c (poplevel): Make sure we clear out and restore old local
16800 non-VAR_DECL values by default when they go out of scope.
16802 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
16804 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
16805 referring to addresses of variables and functions.
16807 * error.c (dump_expr): Support SIZEOF_EXPR.
16809 * init.c (do_friend): Use the return value of check_classfn.
16811 * typeck.c (convert_arguments): Call complete_type.
16813 * method.c (hack_identifier): After giving an error, set value to
16816 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
16818 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
16819 lossage for local classes.
16820 * cp-tree.h: Declare it.
16821 * decl.c (lookup_name_real): Evil, painful hack for local classes.
16822 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
16823 Use hack_decl_function_context.
16824 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
16825 (start_function): Use hack_decl_function_context.
16826 (finish_function): Likewise.
16827 * method.c (synthesize_method): Likewise.
16828 * lex.c (process_next_inline): Likewise.
16829 (do_pending_inlines): Likewise.
16830 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
16833 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
16835 * sig.c (build_signature_pointer_or_reference_type): Align
16836 signature pointers/references on 8-byte boundaries so they can be
16837 grabbed 2 words at a time on a Sparc.
16839 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
16841 * method.c (hack_identifier): Requiring a static chain is now a
16843 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
16846 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16848 * init.c (build_offset_ref): Call complete_type.
16850 * decl.c (pop_from_top_level): Always pop previous_class_type.
16852 * parse.y: Handle multiple decls in a for-init-statement.
16853 * pt.c (tsubst_expr): Likewise.
16855 * pt.c (tsubst): Use tsubst_expr for the second operand of an
16858 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
16859 (poplevel_class): Set it here.
16860 (pop_from_top_level): Pop it here if we're returning to class scope.
16861 * class.c (pushclass): Don't set it here.
16863 * decl.c (maybe_push_to_top_level): Save current_template_parms,
16864 and clear it if !pseudo.
16865 (pop_from_top_level): Restore it.
16867 * decl2.c (finish_file): Push the dummy each time we walk the list
16870 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
16871 something for CAST_EXPR.
16873 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16875 * cvt.c (cp_convert): Warn about implicit conversion of the
16876 address of a function to bool, as it is always true.
16878 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
16880 * typeck.c (c_expand_return): Fix warning for local externs returned.
16882 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
16884 * tree.c (mapcar): Propagate const and volatile properly.
16886 * typeck.c (complete_type): Be sure to instantiate the
16887 MAIN_VARIANT of the type.
16889 * method.c (synthesize_method): Class interface hackery does not
16890 apply to synthesized methods.
16892 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
16894 * pt.c (comp_template_args): Use comptypes rather than just
16895 checking for TEMPLATE_TYPE_PARM equivalence.
16897 * typeck.c (build_x_function_call): Call complete_type before
16898 checking TYPE_OVERLOADS_CALL_EXPR.
16900 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
16902 * g++.c (main): Check also for new define ALT_LIBM.
16904 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
16906 * pt.c (instantiate_class_template): If we don't have a pattern
16908 (coerce_template_parms): If we see a local class, bail.
16910 * decl.c (grok_reference_init): Make sure there's a type before
16913 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
16914 (push_template_decl): Likewise.
16916 * parse.y (named_class_head): Set
16917 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
16919 * decl.c (xref_tag): Diagnose redeclaration of template
16920 type-parameter name.
16922 * error.c (dump_type): Handle anonymous template type parms.
16924 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
16926 (coerce_template_parms): Likewise.
16928 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
16930 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
16931 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
16933 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
16935 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
16936 before trying to get its STUB_DECL.
16937 (coerce_template_parms): Likewise.
16939 * parse.y (template_type_parm): If they didn't use 'class',
16940 pretend they did after giving an error.
16942 * pt.c (coerce_template_parms): Diagnose use of local class.
16944 * decl.c (grok_reference_init): Use instantiate_type.
16946 * error.c (dump_expr): Handle TEMPLATE_DECLs.
16948 * parse.y (named_class_head): Diagnose mismatching types and tags.
16950 * decl.c (pushdecl): Type decls and class templates clash with
16951 artificial type decls, not hide them.
16953 * decl.c (redeclaration_error_message): Diagnose redefinition of
16954 templates properly.
16955 (duplicate_decls): Diagnose disallowed overloads for template
16958 * decl.c (start_decl): Call complete_type before checking for a
16961 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
16963 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
16965 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
16967 * decl.c (grok_op_properties): Don't check for operator++(int) in
16970 * tree.c (perm_manip): Return a copy of variable and function
16971 decls with external linkage.
16973 * tree.def: Change some of the min tree codes to type "1".
16974 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
16975 * method.c (build_overload_int): Emit something arbitrary for
16976 anything but an INTEGER_CST if we're in a template.
16978 * decl.c (cp_finish_decl): Call complete_type before deciding
16979 whether or not to lay out the decl.
16981 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
16983 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
16985 * typeck2.c (build_x_arrow): Call complete_type.
16987 * pt.c (add_pending_template): Broken out.
16988 (lookup_template_class): If -fexternal-templates, call it for all
16989 the methods of implemented types.
16990 (instantiate_class_template): Instead of instantiating them here.
16991 (instantiate_decl): Handle -fexternal-templates earlier.
16993 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
16995 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
16996 memoized lookup stuff inside GATHER_STATISTICS.
16998 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17000 * decl.c (start_decl): Complain about array of incomplete type
17002 (grokdeclarator): Not here.
17004 * parse.y (template_parm): Expand full_parm inline so we can set
17005 the rule's precedence.
17007 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
17008 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
17009 * decl2.c (grokbitfield): Don't check for integer constant here.
17010 * class.c (finish_struct_1): Check here.
17012 * decl.c (define_label): Make the min decl go on permanent_obstack.
17014 * pt.c (unify): Don't handle CONST_DECLs.
17015 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
17016 (tsubst_copy): Likewise.
17018 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
17019 CONST_DECL for a template parm.
17021 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
17023 * decl.c (grokdeclarator): Complain about array of incomplete type
17025 (start_decl_1): Not here.
17027 * pt.c (tsubst): Handle pointer-to-function declarators.
17029 * method.c (hack_identifier): If pedantic, diagnose local class
17030 methods that require a static chain.
17032 * decl.c (grok_op_properties): No longer static.
17033 * cp-tree.h: Declare it.
17034 * pt.c (tsubst): Call it for operators.
17035 Use tsubst_copy for TREE_VECs.
17037 * parse.y (template_arg): The expr has precedence like '>'.
17039 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
17041 * pt.c (coerce_template_parms): Don't coerce an expression using
17043 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
17044 (tsubst): Don't use build_index_2_type if the max_value uses template
17046 * method.c (build_overload_int): Emit something arbitrary for an
17047 expression using template parms.
17049 * parse.y (template_close_bracket): New non-terminal to catch use
17050 of '>>' instead of '> >' in template class names.
17051 (template_type): Use it.
17052 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
17054 * tree.def: Add CAST_EXPR.
17055 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
17056 CONVERT_EXPR for minimal_parse_mode.
17057 * typeck.c (build_c_cast): Likewise.
17058 * pt.c (tsubst_copy): Likewise.
17059 * decl2.c (build_expr_from_tree): Likewise.
17060 * error.c (dump_expr): Likewise.
17062 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17064 * except.c (SetTerminate, SetUnexpected): Put back global vars.
17065 (init_exception_processing): Put back decl/init of
17066 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
17067 fns from libstdc++.
17069 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
17070 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
17072 * cp-tree.h (declare_uninstantiated_type_level,
17073 uninstantiated_type_level_p): Delete prototypes.
17075 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
17077 * pt.c (tsubst_expr): Add default return.
17079 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17081 * error.c (fndecl_as_string): Delete unused arg CNAME.
17082 * sig.c (build_signature_table_constructor,
17083 build_signature_method_call): Fix calls.
17085 * class.c (the_null_vtable_entry): Delete var definition.
17086 (init_class_processing): Delete tree the_null_vtable_entry init.
17087 * decl.c (no_print_{functions, builtins}): Declare as static.
17088 (__tp_desc_type_node): #if 0 var definition.
17089 (init_type_desc): #if 0 init of __tp_desc_type_node.
17090 (vb_off_identifier): Move var decl into init_decl_processing.
17091 (current_function_assigns_this): Declare as static.
17092 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
17093 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
17094 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
17095 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
17096 * init.c (BI_header_type, BI_header_size): Declare as static.
17097 * pt.c (template_classes): Delete unused var.
17098 (add_pending_template): Delete decl for non-existent fn.
17099 (lookup_template_class): Delete vars CODE and TAG_CODE.
17100 (instantiate_template): Delete unused var TARGS.
17101 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
17103 (__tp_desc_type_node): #if 0 var decl.
17104 (fndecl_as_string): Fix prototype.
17106 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
17108 * tree.def: Add GOTO_STMT.
17109 * pt.c (tsubst_expr): Support goto and labels.
17110 * decl.c (define_label): Support minimal parsing.
17111 * parse.y (simple_stmt): Likewise.
17113 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17115 * xref.c (GNU_xref_member): Only define/set var I if
17116 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
17118 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
17119 (GNU_xref_end): Fix call.
17120 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
17121 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
17123 * tree.c (build_exception_variant): Delete unused vars I, A, T,
17125 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
17126 (mapcar): Delete unused var CODE.
17127 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
17128 (break_out_cleanups): Fix call.
17129 (bot_manip): Likewise.
17130 * call.c (build_method_call): Likewise.
17131 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
17133 * typeck.c (unary_complex_lvalue, build_modify_expr,
17134 convert_for_initialization): Likewise.
17135 * typeck2.c (build_functional_cast): Likewise.
17136 * cp-tree.h (build_cplus_new): Fix prototype.
17138 * repo.c (open_repo_file): Delete unused var Q.
17139 (repo_compile_flags, repo_template_declared,
17140 repo_template_defined, repo_class_defined, repo_inline_used,
17141 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
17142 (repo_get_id, repo_vtable_used): Declare as static.
17143 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
17146 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
17148 * parse.y (pending_inlines): Add function_try_block case.
17150 * pt.c (unify): Fix for template const parms.
17152 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17154 * lex.c (extract_interface_info): Delete forward decl.
17155 (default_copy_constructor_body, default_assign_ref_body): Delete
17156 decls for non-existent functions.
17157 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
17158 (init_lex): Delete setting them.
17159 (cons_up_default_function): Delete unused vars FUNC_BUF,
17160 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
17161 #if 0'd synth code.
17162 (toplevel, expression_obstack): Delete unused extern decls.
17163 (tree_node_kind): Delete unused enum.
17164 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
17166 (tree_node_kind_names): Delete unused extern decl.
17167 (synth_obstack): Delete unused var.
17168 (init_lex): Don't set it.
17169 (init_parse): Add decl before use.
17170 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
17171 (current_unit_{name, language}): Delete unused vars.
17172 (check_newline): Don't bother setting them, just accept the #pragma.
17173 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
17174 (current_unit_{name, language}): Delete decls.
17176 * search.c: Wrap all of the memoized functions, macros, and
17177 variables inside #ifdef GATHER_STATISTICS.
17178 (lookup_field, lookup_fnfields): Likewise.
17179 (init_search_processing): Likewise.
17180 (reinit_search_statistics): Wrap whole function.
17181 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
17183 * decl.c (finish_function): Only call pop_memoized_context if
17184 GATHER_STATISTICS is defined.
17185 (start_function): Likewise for push_memoized_context.
17186 * class.c (pushclass, popclass): Likewise.
17188 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
17189 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
17191 * cvt.c (cp_convert): Delete unused local var FORM.
17192 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
17195 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17197 * pt.c (do_poplevel): Oops; really return what we get from
17198 poplevel this time.
17200 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17202 * cp-tree.h (is_aggr_type): Add prototype.
17204 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
17205 * method.c ({push,pop}_cp_function_context): Delete decls.
17206 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
17207 (SetUnexpected, SetTerminate): Delete unused vars.
17208 (init_exception_processing): Don't set SetUnexpected or
17209 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
17210 (output_exception_table_entry): Delete unused array LABEL.
17211 (expand_internal_throw): Delete unused var PARAMS.
17212 (expand_start_catch_block): Delete unused var CLEANUP.
17213 (emit_exception_table): Delete unused var EH_NODE_DECL.
17214 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
17215 GOTO_UNWIND_AND_THROW. Don't set them.
17216 (end_eh_unwinder): Add top decl.
17217 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
17218 (exception_section, push_rtl_perm, do_function_call,
17219 lang_interim_eh, push_eh_cleanup, eh_outer_context,
17220 expand_end_eh_spec, end_eh_unwinder): Declare as static.
17221 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
17222 throw_used): Likewise.
17223 * cp-tree.h (expand_end_eh_spec): Delete prototype.
17225 * search.c (dfs_mark, dfs_mark_vtable_path,
17226 dfs_unmark_vtable_path, dfs_mark_new_vtable,
17227 dfs_unmark_new_vtable, dfs_clear_search_slot,
17228 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
17229 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
17230 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
17232 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
17233 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
17234 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
17235 Only define #ifdef GATHER_STATISTICS.
17236 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
17238 (vbase_decl): Delete var definition.
17239 (init_search): Delete old decl.
17240 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
17241 never actually used.
17242 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
17243 (get_base_distance_recursive): Delete unused fourth arg
17244 BASETYPE_PATH. Fix call .
17245 (get_base_distance): Fix call.
17246 (push_class_decls): Delete unused var ID.
17247 (make_memoized_table_entry): Declare as static.
17248 (breadth_first_search): Declare as static.
17249 (tree_has_any_destructor_p): Declare as static.
17250 (pop_class_decls): Delete unused arg pop_class_decls.
17251 * class.c (popclass): Fix call to pop_class_decls.
17252 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
17253 tree_has_any_destructor_p): Delete prototypes.
17255 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
17256 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
17257 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
17258 (build_user_desc): Delete unused var T.
17259 (build_class_desc): Delete unused vars T and OFF.
17260 (build_t_desc): Delete unused var NAME_STRING.
17261 (build_headof): Make static.
17262 (get_bad_cast_node): Likewise.
17263 (get_def_to_follow): Likewise.
17264 * cp-tree.h (init_type_desc): Add prototype.
17265 (build_headof): Remove prototype.
17267 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
17269 * pt.c (tsubst): Only look for matching decls at file scope for
17270 non-member functions.
17272 * call.c (build_scoped_method_call): Handle scoped destructor
17273 calls in templates.
17275 * decl.c (*_top_level): Also save previous_class_values.
17277 * pt.c (tsubst_expr): Support do {} while loops.
17278 * parse.y (simple_stmt): Likewise.
17279 * tree.def: Likewise.
17281 * method.c (build_overload_identifier): For a class nested in a
17282 template class, don't mangle in the template parms from our
17285 * lex.c, cp-tree.h: Remove support for template instantiations in
17286 the pending_inlines code.
17287 * pt.c: Remove dead functions and unused arguments.
17288 (uses_template_parms): TYPENAME_TYPEs always use template parms.
17289 * parse.y: Stop passing anything to end_template_decl.
17290 * tree.c (print_lang_statistics): Only print tinst info #ifdef
17293 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17295 * init.c (expand_recursive_init{,_1}): Delete decls.
17296 (sort_member_init): Delete unused var INIT.
17297 (emit_base_init): Delete unused var X.
17298 (build_offset_ref): Delete unused var CNAME.
17299 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
17300 (emit_base_init): Delete unused local var BASE. Delete extern
17301 decl of IN_CHARGE_IDENTIFIER.
17302 (build_delete): Delete unused local var VIRTUAL_SIZE.
17304 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
17305 (build_delete): Fix call.
17306 * decl2.c (delete_sanity): Likewise.
17307 * cp-tree.h (build_vec_delete): Update prototype.
17309 * typeck.c (common_base_type): Delete unused var TMP.
17310 (build_binary_op): Delete local var ARGS_SAVE.
17311 (build_array_ref): Delete unused var ITYPE.
17312 (c_expand_return): Delete unused var USE_TEMP.
17314 * typeck.c (compexcepttypes): Delete unused arg STRICT.
17315 (comptypes): Fix calls.
17316 * decl.c (duplicate_decls): Likewise.
17317 * cp-tree.h (compexcepttypes): Delete extra arg.
17319 * decl2.c (check_classfn): Delete unused second arg CNAME.
17320 * decl.c (start_decl, grokfndecl): Fix calls.
17321 * init.c (do_friend): Likewise.
17322 * cp-tree.h (check_classfn): Update prototype.
17324 * cp-tree.h (signature_error, import_export_vtable,
17325 append_signature_fields, id_in_current_class, mark_used,
17326 copy_assignment_arg_p): Add decls.
17327 * decl2.c (mark_used): Delete decl.
17329 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
17331 * class.c (get_vtable_entry): Disable unused function.
17332 (doing_hard_virtuals): Delete unused static global var.
17333 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
17334 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
17335 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
17336 (modify_one_vtable): Delete unused var OLD_RTTI.
17337 (finish_struct_anon): Delete unused vars OFFSET and X.
17338 (finish_struct_bits): Delete unused var METHOD_VEC.
17339 (get_basefndecls): Delete unused var PURPOSE. Delete unused
17340 for-scope local variable METHODS.
17342 * call.c (user_harshness): Delete unused/unneeded arg PARM.
17343 (ideal_candidate): Delete unused args BASETYPE and PARMS.
17344 (build_method_call): Delete unused args passed into ideal_candidate.
17345 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
17346 * cp-tree.h (synthesize_method): Add decl.
17348 * decl.c (note_level_for_for): Give void return type.
17349 (pushdecl_nonclass_level): Likewise.
17350 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
17351 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
17352 (suspend_binding_level): Delete unused var LEVEL.
17353 (duplicate_decls): Delete unused var CTYPE.
17354 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
17355 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
17357 (grokdeclarator): Delete unused var C.
17358 (grokdeclarator): Delete unused var SIZE_VARIES.
17359 (grokparms): Delete unused var SAW_VOID.
17360 (start_function): Delete unused var OLDDECL.
17361 (cplus_expand_expr_stmt): Delete unused var
17362 REMOVE_IMPLICIT_IMMEDIATELY.
17364 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
17366 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
17368 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
17370 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
17371 (build_min_nt): Likewise.
17372 * pt.c (do_pushlevel): Emit line note.
17373 (do_poplevel): Return what we get from poplevel.
17374 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
17375 * parse.y: Use do_pushlevel and do_poplevel.
17376 * cp-tree.h: Declare do_poplevel.
17378 * cp-tree.h: Declare at_eof.
17379 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
17380 * decl2.c (import_export_decl): Renamed from import_export_inline.
17381 (finish_file): Call it to do interface handling for statics.
17382 * pt.c (tsubst_copy): Call mark_used on variables and functions
17385 * decl2.c (finish_file): Don't emit statics we can't generate.
17386 * pt.c (instantiate_decl): Don't set interface on instantiations
17389 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
17390 * tree.c (print_lang_statistics): Print max template depth.
17391 * pt.c (push_tinst_level): Dump entire instantiation context.
17392 (instantiate_class_template): Use it and pop_tinst_level.
17393 (instantiate_decl): Likewise.
17395 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
17396 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
17398 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
17400 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
17401 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
17402 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
17403 the new template implementation.
17405 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17407 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
17409 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
17411 * decl.c (cp_finish_decl): Delay emitting the debug information for
17412 a typedef that has been installed as the canonical typedef, if the
17413 type has not yet been defined.
17415 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
17417 * decl2.c (grokfield): Still call pop_nested_class for access decls.
17419 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17421 * decl.c (lookup_label): Call label_rtx.
17423 * decl.c (make_binding_level): New function.
17424 (pushlevel, pushlevel_class): Call it instead of explicit
17425 duplicate calls to xmalloc.
17427 * decl.c (init_decl_processing): Delete useless build_pointer_type
17430 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
17431 (sizet_ftype_string): Delete variable.
17432 (init_decl_processing): Add built-in functions fabsf, fabsl,
17433 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
17434 variable strlen_ftype, used for strlen.
17436 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
17438 * decl.c (push_to_top_level): Start from current_binding_level
17439 again for now; the stl hacks depend on g++ being broken in this
17440 way, and it'll be fixed in the template rewrite.
17442 * tree.def: Add USING_DECL.
17443 * decl2.c (do_class_using_decl): Implement.
17444 (grokfield): Pass access decls off to do_class_using_decl instead of
17446 * error.c (dump_decl): Handle USING_DECLs.
17447 * decl.c (grokdeclarator): Remove code for handling access decls.
17448 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
17449 as access decls for now.
17450 (finish_struct): Don't check USING_DECLs for other uses of the name.
17452 * search.c (get_matching_virtual): Use cp_error_at.
17454 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17456 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
17458 (self_promoting_args_p): Move the check that TYPE is non-nil
17459 before trying to look at its main variant.
17460 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
17462 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
17464 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
17465 (do_friend): Delete call to xref_friend.
17466 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
17468 * typeck.c (convert_sequence): #if 0 unused function.
17470 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
17471 be in decl_in_memory_p.
17472 (decl_in_memory_p): Delete decl.
17473 * expr.c (decl_in_memory_p): Delete fn.
17474 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
17476 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
17478 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
17480 * class.c (finish_struct_1): Check for a pure-specifier on a
17481 non-virtual function here.
17483 * decl2.c (grok_function_init): Don't check whether the function
17485 (grokfield): Don't call check_for_override here.
17487 * decl.c (push_to_top_level): Start from inner_binding_level,
17488 check class_shadowed in class levels.
17490 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
17492 * decl.c (resume_level): Ignore things that don't have names, instead
17495 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17497 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
17499 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
17501 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
17504 * parse.y (complete_type_name): Bind global_scope earlier.
17505 (complex_type_name): Likewise.
17506 (qualified_type_name): Remove.
17508 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
17510 * decl.c (grokfndecl): Move code that looks for virtuals in base
17512 * class.c (check_for_override): ... to a new function.
17513 (finish_struct_1): Call it.
17515 * cp-tree.h: Declare warn_sign_compare.
17517 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
17518 rather than extra_warnings to decide whether to warn about
17519 comparison of signed and unsigned.
17521 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
17522 implies -Wsign-compare. -Wall doesn't imply -W.
17524 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
17526 * typeck.c (build_component_ref): Fix to handle anon unions in base
17529 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17531 * class.c (resolves_to_fixed_type_p): Delete code dealing with
17532 a WITH_CLEANUP_EXPR, since we don't generate them any more.
17533 * cvt.c (build_up_reference): Likewise.
17534 * decl.c (grok_reference_init): Likewise.
17535 (cp_finish_decl): Likewise.
17536 * error.c (dump_expr): Likewise.
17537 * tree.c (real_lvalue_p): Likewise.
17538 (lvalue_p): Likewise.
17539 (build_cplus_new): Likewise.
17540 (unsave_expr_now): Likewise.
17541 * typeck.c (unary_complex_lvalue, build_modify_expr,
17542 c_expand_return): Likewise.
17544 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17546 Make the C++ front-end pay attention to attributes for structures.
17547 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
17549 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
17550 Take out old round_up_size use and setting the DECL_ALIGN possibly
17551 using it. Take out setting of TYPE_ALIGN to round_up_size, which
17552 can override what the attribute set.
17553 * cp-tree.h (finish_struct): Update prototype.
17554 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
17555 attributes to finish_struct.
17556 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
17557 value down into finish_struct.
17558 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
17560 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
17562 * decl.c (poplevel): Re-word dead for local handling.
17563 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
17564 (cp_finish_decl): If is_for_scope, check for duplicates so
17565 we can disable is_for_scope. Otherwise, preserve_temp_slots.
17567 * lex.c (do_identifier): Use global binding in preference of
17568 dead for local variable.
17570 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
17572 * init.c (initializing_context): Handle anon union changes, the
17573 context where fields of anon unions can be initialized now has to be
17574 found by walking up the TYPE_CONTEXT chain.
17576 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
17578 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
17579 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
17580 (obscure_complex_init): If bss is supported, always set
17581 DECL_INITIAL to error_mark_node.
17583 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17585 * init.c (is_friend): Make sure there's a context before we see if
17588 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
17590 * init.c (is_friend): Classes are not friendly with nested classes.
17592 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
17594 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
17595 and record its result.
17597 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
17599 * class.c (finish_struct_anon): Switch around code to not move anon
17600 union elements around, nor mess up their contexts, nor offsets,
17601 instead we now build up the right number of COMPONENT_REFs for all
17602 the anon unions that may be present at build_component_ref time.
17603 * typeck.c (lookup_anon_field): New routine to handle field lookup
17604 on fields without names. We find them, based upon their unique type
17606 * typeck.c (build_component_ref): Allow FIELD_DECL components.
17607 Handle finding components in anonymous unions, and ensure that a
17608 COMPONENT_REF is built for each level as necessary.
17610 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
17612 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
17613 code that ensures that copy ctors are used if appropriate.
17615 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17617 * init.c (build_vec_delete): Only give an error if base isn't an
17620 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
17622 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
17623 (yylex): If we see `new', keep slurping.
17625 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
17627 * class.c (finish_struct_1): Move code for handling anon unions...
17628 (finish_struct_anon): to here. Fixup so that we do the offset
17629 calculations right, and so that the fields are physically moved to
17630 the containers's chain.
17632 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17634 * decl.c (grokdeclarator): Avoid trying to get an operand off an
17637 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
17639 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
17640 POINTER_SIZE to agree with expr.c.
17642 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
17644 * search.c (lookup_field): Don't report ambiguities if protect is 0,
17645 instead return NULL_TREE.
17647 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
17649 * class.c (finish_struct_1): Call warn_hidden if we want warnings
17650 about overloaded virtual functions.
17651 (warn_hidden): New routine to warn of virtual functions that are
17652 hidden by other virtual functions, that are not overridden.
17653 (get_basefndecls): New routine, used by warn_hidden.
17654 (mark_overriders): New routine, used by warn_hidden.
17655 * search.c (get_matching_virtual): Remove old warning that just
17658 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17660 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
17662 * typeck.c (null_ptr_cst_p): Delete unused fn.
17663 (build_function_call_maybe): Delete unused fn.
17665 * expr.c (extract_init): #if 0 the code after unconditional return 0
17668 Delete old cadillac code.
17669 * edsel.c: Remove file.
17670 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
17671 * Makefile.in (CXX_OBJS): Delete edsel.o.
17672 (edsel.o): Delete rule.
17673 * cp-tree.h (flag_cadillac): Delete var decl.
17674 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
17675 * decl2.c (flag_cadillac): Delete var definition.
17676 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
17677 (grokfield): Delete code depending on flag_cadillac.
17678 (finish_anon_union): Likewise.
17679 * class.c (finish_struct_1): Likewise.
17680 (pushclass): Likewise.
17681 (popclass): Likewise.
17682 (push_lang_context): Likewise.
17683 (pop_lang_context): Likewise.
17684 * decl.c (init_decl_processing): Likewise.
17685 (start_decl): Likewise.
17686 (cp_finish_decl): Likewise.
17687 (xref_tag): Likewise.
17688 (finish_enum): Likewise.
17689 (start_function): Likewise.
17690 (finish_function): Likewise.
17691 (finish_stmt): Likewise.
17692 * lex.c (lang_init): Likewise.
17693 (check_newline): Likewise.
17695 * lex.c (do_pending_inlines): Delete synthesized method kludge.
17697 Delete defunct, ancient garbage collection implementation.
17698 * rtti.c: New file with the RTTI stuff from gc.c.
17699 * gc.c: Removed file (moved the remaining stuff into rtti.c).
17700 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
17701 (rtti.o): New rule, replacing gc.o.
17702 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
17703 * cp-tree.h: Delete gc-related fn decls.
17704 (DECL_GC_OFFSET): Delete macro.
17705 (flag_gc): Delete extern decl.
17706 * decl.c (current_function_obstack_index): Delete var decl.
17707 (current_function_obstack_usage): Delete var decl.
17708 (start_function): Delete clearing of current_function_obstack_index
17709 and current_function_obstack_usage.
17710 (init_decl_processing): Delete code relying on -fgc.
17711 Delete call to init_gc_processing.
17712 (cp_finish_decl): Delete calls to build_static_gc_entry and
17713 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
17714 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
17715 and to expand_expr of a __gc_main call.
17716 (maybe_gc_cleanup): Delete var decl.
17717 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
17718 * decl2.c (flag_gc): Delete var decl.
17719 (lang_f_options): Delete offering of -fgc.
17720 (lang_decode_option): Delete -fgc and -fno-gc handling.
17721 (get_temp_regvar): Delete gc code.
17722 * init.c (build_new): Delete gc code.
17723 * lex.c (init_lex): Delete checking of flag_gc.
17725 * typeck.c (convert_arguments): Delete gc code.
17726 (build_component_addr): Delete -fgc warning.
17727 (build_modify_expr): Delete gc code.
17729 * decl2.c (build_push_scope): Delete fn.
17730 * cp-tree.h (build_push_scope): Delete decl.
17732 * search.c (clear_search_slots): Delete fn.
17733 * cp-tree.h (clear_search_slots): Delete decl.
17735 * search.c (tree_needs_constructor_p): Delete fn.
17736 * cp-tree.h (tree_needs_constructor_p): Delete decl.
17738 * tree.c (id_cmp): Delete fn.
17740 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
17741 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
17743 * tree.c (decl_value_member): Delete fn.
17744 * cp-tree.h (decl_value_member): Delete decl.
17746 * tree.c (list_hash_lookup_or_cons): Delete fn.
17747 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
17749 * method.c (cplus_exception_name): Delete fn.
17750 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
17752 * spew.c (shift_tokens): Delete fn.
17754 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17756 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
17758 * parse.y: Likewise.
17760 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17762 * tree.c (build_cplus_staticfn_type): Delete function definition;
17764 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
17766 * tree.c (virtual_member): Delete function definition; never used.
17767 * cp-tree.h (virtual_member): Delete decl.
17769 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
17771 * typeck.c (build_component_ref): Handle getting vbase pointers
17772 out of complex multiple inheritance better.
17774 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
17776 * typeck.c (build_object_ref): Make sure we use the real type, not
17777 any reference type.
17779 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
17781 * tree.c (build_exception_variant): Don't create new types if we
17782 don't have to, also build new types on the right obstack.
17784 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
17786 * decl.c (store_bindings): Split out from push_to_top_level.
17787 (push_to_top_level): Call it for b->type_shadowed on class binding
17790 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
17792 * search.c (expand_upcast_fixups): Fix so that offsets stored in
17793 vbase_offsets are always right. Fixes a problem where virtual base
17794 upcasting and downcasting could be wrong during conversions on this
17795 during virtual function dispatch at ctor/dtor time when dynamic
17796 vtable fixups for deltas are needed. This only sounds easier than
17798 (fixup_virtual_upcast_offsets): Change to reflect new calling
17799 convention for expand_upcast_fixups.
17801 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17803 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
17804 check that it's usable as the bitfield width.
17806 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17808 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
17809 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
17810 only ever used for functions in it.
17812 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17814 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
17815 (nested_type): Likewise.
17816 (nested_name_specifier): Use lastiddecl.
17818 * decl.c (grokdeclarator): Adjust accordingly.
17819 * init.c (expand_member_init): Likewise.
17820 * parse.y (base_class): Likewise.
17821 * typeck2.c (build_functional_cast): Likewise.
17823 * typeck2.c (build_functional_cast): Fill in name after we've
17824 checked for non-aggr type.
17826 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
17828 * decl2.c (warn_pointer_arith): Default to on.
17830 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
17832 * lex.c (is_rid): New function.
17833 * decl.c (grokdeclarator): Diagnose reserved words used as
17836 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
17838 * tree.c (get_decl_list): Don't lose cv-quals.
17840 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
17841 typespecs used as declarator-ids.
17843 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
17845 * decl.c (poplevel): When poping a level, don't give a warning for
17846 any subblocks that already exist.
17848 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
17850 * typeck.c (build_object_ref): Finish what I started.
17852 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
17854 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
17856 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
17859 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
17861 * decl.c (xref_tag): Handle passing a type in directly.
17863 * parse.y (qualified_type_name): Pull out the type.
17864 (nested_type): Likewise.
17865 Take types directly instead of as identifiers.
17866 * call.c (build_scoped_method_call): Take types directly instead of
17868 * decl.c (xref_basetypes): Likewise.
17869 * init.c (expand_member_init): Likewise.
17870 (build_member_call): Likewise.
17871 (build_offset_ref): Likewise.
17872 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
17873 * method.c (do_build_assign_ref): Likewise.
17874 * decl.c (grokdeclarator): Handle a type appearing as the
17875 declarator-id for constructors.
17876 * method.c (do_build_copy_constructor): current_base_init_list now
17877 uses the types directly, not their names.
17878 * init.c (sort_base_init): Likewise.
17879 (expand_member_init): Likewise.
17880 * init.c (is_aggr_type): New function, like is_aggr_typedef.
17882 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
17884 * tree.c (layout_basetypes): Call build_lang_field_decl instead
17885 of build_lang_decl if first arg is a FIELD_DECL.
17887 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17889 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
17891 * except.c (expand_start_catch_block): Set TREE_USED to avoid
17892 warnings about the catch handler.
17894 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
17896 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
17897 expand_target_expr.
17899 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
17901 Fix access control to use trees rather than integers.
17902 * class.c (access_{default, public, protected, private,
17903 default_virtual, public_virtual, private_virtual}_node): Add
17905 (init_class_processing): Do creation of those nodes.
17906 * cp-tree.h (access_type): Delete enum decl.
17907 (access_{default, public, protected, private, default_virtual,
17908 public_virtual, private_virtual}_node): Add decls.
17909 (compute_access): Change return type.
17910 * search.c (compute_access): Have tree return type, instead of enum.
17911 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
17912 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
17913 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
17914 * parse.y (VISSPEC): Make ttype rather than itype.
17915 (base_class_access_list): Likewise.
17916 * *.[cy]: Change all refs of `access_public' to `access_public_node',
17918 * call.c (build_method_call): Make ACCESS be a tree.
17919 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
17920 * cvt.c (convert_to_aggr): Likewise.
17921 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
17923 * method.c (hack_identifier): Likewise.
17924 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
17926 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
17928 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
17929 frontend, and make it more consistent with respect to
17930 warn_pointer_arith.
17932 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
17934 * decl.c (pushdecl): Check for duplicate parameter names.
17936 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
17938 * decl.c (expand_static_init): Call assemble_external for atexit.
17940 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
17942 * except.c (do_unwind): Remove some generated dead code.
17943 (eh_outer_context): New routine, factor out some common code from
17944 expand_builtin_throw and end_eh_unwinder. Add code to do return
17945 address masking for the PA.
17946 (expand_builtin_throw): Use eh_outer_context instead of open coding
17948 (end_eh_unwinder): Likewise.
17950 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
17952 * except.c (expand_throw): Call assemble_external for __empty, if we
17955 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
17957 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
17958 NORMAL_RETURN_ADDR_OFFSET.
17959 (end_eh_unwinder): Likewise.
17961 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
17963 * gc.c (build_dynamic_cast): Make sure we don't cast away const
17964 when dealing with references, and make sure we handle dynamic
17965 casting to a cv qualified reference.
17967 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
17969 * except.c (struct eh_context): New structure top hold eh context
17971 (push_eh_context): New routine.
17972 (pop_eh_context): Likewise.
17973 * decl.c (push_cp_function_context): Use them.
17974 (pop_cp_function_context): Likewise.
17976 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
17978 * decl2.c (finish_file): Also prune uninteresting functions in the
17979 inline emission loop.
17981 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
17983 * sig.c (build_signature_table_constructor): Mark functions
17984 in the signature as referenced.
17986 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
17988 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
17989 the inline emission stuff.
17991 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
17993 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
17995 * lang-options.h: Add -f{no-,}weak.
17996 * decl.c (init_decl_processing): If the target does not support weak
17997 symbols, don't use them.
17998 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
18000 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18002 * init.c (expand_member_init): warning for base init after members.
18004 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
18006 * cvt.c (build_expr_type_conversion): Don't convert to a reference
18009 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
18011 * method.c (report_type_mismatch): Improve wording for volatile
18014 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
18016 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
18017 expand_assignment, as the later doesn't handle things that have
18018 copy constructors well. The compiler would do bitwise copying,
18019 instead of ctor calling in some cases.
18021 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
18023 * g++.c (my_strerror): Return "cannot access" if errno is 0.
18024 (pfatal_with_name, perror_exec): Don't assume that
18025 the returned value from my_strerror contains no '%'s.
18027 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
18029 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
18031 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
18032 TYPE_METHODS/TREE_CHAIN mean what they used to.
18033 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
18034 instead of TYPE_METHODS.
18035 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
18036 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
18037 * cp-tree.h (CLASSTYPE_METHODS): Lose.
18038 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
18040 (struct lang_decl): Lose next_method field.
18041 (DECL_NEXT_METHOD): Lose.
18042 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
18043 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
18045 (finish_struct_methods): Don't mess with the TREE_CHAINs in
18048 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
18051 * call.c (build_method_call): Synthesize here even when not inlining.
18052 * typeck.c (build_function_call_real): Likewise.
18054 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
18056 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
18057 == DBX_DEBUG, call dbxout_start_new_source_file and
18058 dbxout_resume_previous_source_file when appropriate.
18060 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
18062 * except.c (start_anon_func): Push to the top level.
18063 (end_anon_func): Pop from the top level.
18065 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
18067 * cp-tree.h (build_cleanup): New routine to build cleanups.
18068 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
18069 call at ctor time and use atexit to run it later.
18070 * decl2.c (build_cleanup): New routine, taken from finish_file.
18071 (finish_file): Use build_cleanup instead, and don't put function
18072 local statics in global dtor list.
18074 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
18076 * except.c (expand_throw): Ensure that we have cleanups, if we try
18077 and expand cleanups.
18079 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
18081 * except.c (expand_throw): Add logic to manage dynamic cleanups for
18083 (expand_end_catch_block): Use the magic of expand_goto, instead of
18084 emit_jump so that we get the cleanup for any catch clause parameter
18085 and the cleanup for the exception object. Update to reflect label
18087 (push_eh_cleanup): New routine to register a cleanup for an
18089 (empty_fndecl): Used to default cleanup actions to
18091 (init_exception_processing): Setup empty_fndecl. Setup
18093 (expand_start_catch_block): Update to reflect label changes. Call
18094 push_eh_object to register the cleanup for the EH object.
18095 (start_anon_func): New routine to start building lambda expressions
18097 (end_anon_func): New routine to end them.
18098 (struct labelNode): Change so that we can use tree labels, or rtx
18100 (saved_cleanup): Object to check for dynamic cleanups for the
18101 exception handling object.
18102 (push_label_entry): Change so that we can use tree labels, or rtx
18104 (pop_label_entry): Likewise.
18105 (top_label_entry): Likewise.
18106 (expand_start_all_catch): Use tree label instead of rtx label, so
18107 that we can get the magic of expand_goto.
18108 (expand_end_all_catch): Update to reflect label changes.
18110 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
18112 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
18113 building_cleanup logic, as we now use UNSAVE_EXPRs.
18114 * cp-tree.h (unsave_expr): Declare it.
18115 * decl.c (building_cleanup): Remove.
18116 (maybe_build_cleanup): Remove building_cleanup logic, and use
18117 UNSAVE_EXPR instead.
18119 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
18121 * gc.c (build_t_desc): Update error message to say <typeinfo>.
18123 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18125 * decl.c (pushdecl): Only warn about shadowing a local variable if
18126 warn_shadow is true.
18128 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
18130 * typeck.c (build_binary_op_nodefault): Added warning about
18131 comparisons between different enum types with -Wall, unless
18132 -fenum-int-equiv set.
18134 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
18136 * class.c (finish_struct_1): Skip down to the inner type in
18137 multidimensional arrays. Ensures ctors will be made for types that
18140 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
18142 * decl.c (last_dtor_insn): New to track the last compiler generated
18144 (store_parm_decls): Set it.
18145 (finish_function): Use it to see if the dtor is empty. Avoid doing
18146 vtable setup all the time, if we can.
18147 (struct cp_function): Add last_dtor_insn.
18148 (push_cp_function_context): Save it.
18149 (pop_cp_function_context): Restore it.
18151 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
18153 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
18156 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
18158 * typeck.c (expand_target_expr): Make sure targets get put into the
18159 current temp_slot_level, so that the free_temp_slots call will reuse
18162 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
18164 * class.c (finish_struct_1): Delay delta fixups for virtual bases
18165 until after we have done the hard virtuals, to avoid a bogus `every
18166 virtual function must have a unique final overrider' for virtual
18167 functions that are only overridden by hard virtuals.
18169 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18171 * pt.c (do_function_instantiation): Don't try to find a file-scope
18172 template for a member function.
18174 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
18176 * g++.c (main): Add handling of -nodefaultlibs.
18178 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
18180 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
18181 distinguish between direct bindings of reference variables, and
18182 indirect bindings of reference variables.
18183 * cvt.c (build_up_reference): Use it.
18184 * typeck.c (convert_arguments): Use it to indicate this is an
18186 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
18187 as they are unused.
18188 (expand_static_init): Likewise.
18189 (cplus_expand_expr_stmt): Likewise.
18190 * decl2.c (finish_file): Likewise.
18191 * init.c (perform_member_init): Likewise.
18192 (emit_base_init): Likewise.
18193 (expand_aggr_vbase_init_1): Likewise.
18195 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18197 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
18198 get a DECL_LANG_SPECIFIC node.
18199 * cp-tree.h (lang_decl_flags): Add new member `level'.
18200 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
18201 decl_flags level member.
18203 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18205 * call.c (build_method_call): Make sure instance has a
18206 TYPE_LANG_SPECIFIC node before we dive into it.
18208 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
18210 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
18212 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
18214 * decl.c (duplicate_decls): When smashing decls, smash staticness in
18217 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
18219 * decl.c (poplevel): Handle the merging of subblocks of cleanups
18220 when finishing blocks that have already been created (usually due to
18221 the fixup goto code). Fixes bad debugging information.
18223 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
18225 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
18226 that's not a list of overloaded functions.
18228 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18230 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
18231 before trying to use DECL_ABSTRACT_VIRTUAL_P.
18233 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
18235 * decl2.c (mark_used): New function for hooking into setting of
18236 TREE_USED on decls.
18237 * call.c (build_method_call): Use it.
18238 * class.c (instantiate_type): Likewise.
18239 * init.c (build_offset_ref): Likewise. Don't call assemble_external
18240 for all like-named functions.
18241 * method.c (hack_identifier): Likewise.
18242 (emit_thunk): Don't call assemble_external.
18243 (make_thunk): Create thunk as a FUNCTION_DECL so that it
18244 gets the right mode and ENCODE_SECTION_INFO works.
18246 * parse.y: Use mark_used. Pass operator names to do_identifier.
18247 * lex.c (do_identifier): Handle operator names.
18249 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
18251 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18253 * errfn.c: Include stdio.h.
18254 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
18256 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
18258 * typeck2.c (digest_init): Always convert initializers to the
18261 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
18263 * init.c (member_init_ok_or_else): Don't allow member initializers
18264 for indirect members, as it is invalid.
18266 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18268 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
18270 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
18272 * parse.y (for.init.statement): Catch compound statements inside for
18273 initializations, if we're being pedantic.
18275 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
18277 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
18280 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
18282 * error.c (dump_expr): Don't core dump when a boolean expression is
18283 used as a default argument.
18285 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
18287 * class.c (finish_struct_bits): Check aggregate_value_p instead of
18290 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
18292 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
18293 BLKmode type that would otherwise be returned in registers.
18295 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18297 * g++.c (WITHLIBC): New macro.
18298 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
18299 saw_libc and pass it at the end if it was set.
18301 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
18303 * parse.y (fn.def1): Call split_specs_attrs in
18304 declmods notype_declarator case.