1 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
3 * except.c: Add static prototypes.
5 2000-05-20 H.J. Lu <hjl@gnu.org>
7 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9 2000-05-19 Mark Mitchell <mark@codesourcery.com>
11 Don't create a separate copy of virtual bases for the
12 CLASSTYPE_VBASECLASSES list.
13 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
14 (BINFO_FOR_VBASE): Remove.
15 (CANONICAL_BINFO): Adjust.
16 (binfo_for_vbase): New function.
17 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
18 instead of BINFO_FOR_VBASE.
19 (build_vbase_pointer): Likewise.
20 (build_secondary_vtable): Likewise.
21 (dfs_mark_primary_bases): Likewise.
22 (mark_primary_bases): Likewise.
23 (layout_nonempty_base_or_field): Likewise.
24 (dfs_set_offset_for_shared_vbases): Likewise.
25 (dfs_set_offset_for_unshared_vbases): Likewise.
26 (layout_virtual_bases): Likewise. Adjust for changes to the
27 CLASSTYPE_VBASECLASSES list.
28 (dump_class_hierarchy_r): Use binfo_for_vbase
29 instead of BINFO_FOR_VBASE.
30 (dump_class_hierarchy): Likewise.
31 (finish_vtbls): Likewise.
32 (build_vtbl_initializer): Adjust for changes to the
33 CLASSTYPE_VBASECLASSES list.
34 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
35 * decl.c (finish_destructor_body): Adjust for changes to the
36 CLASSTYPE_VBASECLASSES list.
37 * init.c (sort_base_init): Use binfo_for_vbase.
38 (construct_virtual_bases): Adjust for changes to the
39 CLASSTYPE_VBASECLASSES list.
40 (expand_member_init): Use binfo_for_vbase.
41 (build_vbase_delete): Adjust for changes to the
42 CLASSTYPE_VBASECLASSES list.
43 * method.c (do_build_copy_constructor): Likewise.
44 * rtti.c (get_base_offset): Use binfo_for_vbase.
45 (expand_class_desc): Remove #if 0'd code.
46 * search.c (struct vbase_info): Remove vbase_types.
47 (get_base_distance): Use binfo_for_vbase.
48 (lookup_field_queue_p): Use CANONICAL_BINFO.
49 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
50 (get_pure_virtuals): Adjust for changes to the
51 CLASSTYPE_VBASECLASSES list.
52 (dfs_find_vbases): Use binfo_for_vbase.
53 (dfs_init_vbase_pointers): Likewise.
54 (init_vbase_pointers): Don't initialize vi.vbase_types.
55 (virtual_context): Use binfo_for_vbase.
56 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
57 CLASSTYPE_VBASECLASSES list.
58 (expand_indirect_vtbls_init): Simplify.
59 (dfs_get_vbase_types): Don't replicate virtual bases.
60 (find_vbase_instance): Use binfo_for_vbase.
61 (binfo_for_vbase): New function.
62 * typeck.c (get_delta_difference): Use binfo_for_vbase.
64 2000-05-17 Mark Mitchell <mark@codesourcery.com>
66 * decl2.c (finish_anon_union): Generalize error messages to handle
68 * init.c (perform_member_init): Remove `name' parameter.
69 (build_field_list): New function.
70 (sort_member_init): Handle anonymous union initialization order
71 correctly. Check for multiple initializations of the same union.
72 (emit_base_init): Don't look up fields by name here.
73 (expand_member_init): Record the result of name lookup for future
75 * typeck.c (build_component_ref): Fix formatting.
77 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
79 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
80 * typeck.c (build_x_compound_expr): Replace warn_unused with
83 * decl2.c (lang_decode_option): Update -Wall unused flags by
86 2000-05-16 Mark Mitchell <mark@codesourcery.com>
88 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
89 * init.c (dfs_vtable_path_unmark): Remove.
90 * search.c (marked_new_vtable_p): Likewise.
91 (unmarked_new_vtable_p): Likewise.
92 (dfs_search_slot_nonempty_p): Likewise.
94 (dfs_vtable_path_unmark): Likewise.
95 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
96 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
97 (dfs_init_vbase_pointers): Remove special-case new ABI code.
98 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
99 (init_vbase_pointers): Simplify.
100 (expand_indirect_vtbls_init): Likewise.
102 * class.c (copy_virtuals): New function.
103 (build_primary_table): Use it.
104 (build_secondary_vtable): Likewise.
105 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
106 indicate that no vcall offset is required.
107 (add_virtual_function): Likewise.
108 (modify_all_vtables): Likewise.
109 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
110 (dfs_accumulate_vtbl_inits): Likewise.
111 (build_vtbl_initializer): Make changes to handle construction
113 (dfs_build_vcall_offset_vtbl_entries): Likewise.
114 (build_rtti_vtbl_entries): Likewise.
115 (build_vtable_entries): Handle a NULL vcall_index.
117 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
119 * decl2.c (lang_decode_option): Fix thinko.
121 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
123 * except.c (check_handlers): New fn.
124 * cp-tree.h: Declare it.
125 * semantics.c (finish_handler_sequence): Call it.
126 (finish_function_handler_sequence): Likewise.
127 (finish_handler_parms): Set TREE_TYPE on the handler.
128 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
129 * search.c (get_base_distance_recursive): If protect>1, ignore
131 (get_base_distance): Don't reduce watch_access.
133 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
135 * lex.c: #include diagnostic.h.
136 (lang_init_options): Set default prefixing rules.
138 * lang-options.h: Add -fdiagnostics-show-location=.
140 * decl2.c: #include diagnostic.h.
141 (lang_decode_option): Handle -fdiagnostics-show-location=.
143 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
145 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
146 * vec.cc: Revert my 2000-05-07 change.
148 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
150 * class.c (check_field_decls): Complain about non-static data
151 members with same name as class in class with constructor.
153 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
155 * decl.c (grokdeclarator): Allow non-static data members with
158 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
160 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
161 and pending_inline.filename. Update prototypes.
162 * decl.c (define_label): Constify filename parameter.
163 * decl2.c (warn_if_unknown_interface): Constify local char *.
164 * input.c Constify input_source.filename. Don't declare
165 input_filename or lineno. Constify filename parameter to feed_input.
166 * lex.c (init_parse): Constify parameter and return value.
167 (cp_pragma_interface, cp_pragma_implementation): Constify
169 (reinit_parse_for_method, reinit_parse_for_block,
170 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
171 Constify local char *.
172 * pt.c: Don't declare lineno or input_filename.
173 (print_template_context, tsubst_friend_function, tsubst_decl,
174 tsubst, instantiate_decl): Constify local char *.
175 * semantics.c (expand_body): Constify local char *.
176 * tree.c (build_srcloc): Constify filename parameter.
177 * typeck.c (c_expand_asm_operands): Constify filename
180 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
182 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
185 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
187 * inc/cxxabi.h: Fix typos in comment.
188 (__base_class_info::__offset): Use a static_cast.
190 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
192 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
193 of std::size_t and std::ptrdiff_t respectively.
194 * tinfo.cc: Likewise.
197 2000-05-06 Richard Henderson <rth@cygnus.com>
199 * typeck.c (build_c_cast): Don't warn integer->pointer size
200 mismatch for constants.
202 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
204 * rtti.c (ptmd_initializer): Set non-public, if class is
207 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
208 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
209 __cxa_vec_delete): Likewise.
210 * tinfo.cc (__dynamic_cast): Likewise.
211 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
212 __cxa_vec_delete): Likewise.
214 2000-05-04 Mark Mitchell <mark@codesourcery.com>
216 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
217 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
218 (lang_decl_flags): Add vcall_offset.
219 (THUNK_VCALL_OFFSET): Use it.
220 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
221 * method.c (make_thunk): Create the lang_decl here, not in
223 (emit_thunk): Make generic thunks into ordinary functions once
224 they have been fed to expand_body.
225 * semantics.c (expand_body): Set current_function_is_thunk here.
227 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
229 * class.c (update_vtable_entry_for_fn): Prototype.
231 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
234 * search.c (dfs_build_inheritance_graph_order): Prototype.
236 2000-05-04 Mark Mitchell <mark@codesourcery.com>
238 * cp-tree.h (special_function_kind): Add various kinds of
240 (special_function_p): New function.
241 * class.c (overrides): Don't let one kind of destructor override
243 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
244 whether or not to instantiate a template.
245 * tree.c (special_function_p): Define.
247 2000-05-03 Mark Mitchell <mark@codesourcery.com>
249 * cp-tree.def (THUNK_DECL): Remove.
250 * cp-tree.h (DECL_THUNK_P): New macro.
251 (DECL_NON_THUNK_FUNCTION_P): Likewise.
252 (DECL_EXTERN_C_FUNCTION_P): Likewise.
253 (SET_DECL_THUNK_P): Likewise.
254 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
255 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
256 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
257 * decl.c (decls_match): Use DECL_EXTERN_C_P.
258 (duplicate_decls): Likewise.
259 (pushdecl): Likewise. Adjust thunk handling.
260 (grokfndecl): Use DECL_EXTERN_C_P.
261 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
262 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
263 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
264 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
265 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
266 DECL_NO_STATIC_CHAIN.
267 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
268 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
269 * search.c (covariant_return_p): Remove THUNK_DECL handling.
272 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
274 * tree.c (walk_tree): Set lineno.
276 2000-05-01 Mark Mitchell <mark@codesourcery.com>
278 * exception.cc: Update license notice.
282 * tinfo.cc: Likewise.
283 * tinfo2.cc: Likewise.
285 * inc/cxxabi.h: Likewise.
286 * inc/exception: Likewise.
288 * inc/new.h: Likewise.
289 * inc/typeinfo: Likewise.
291 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
293 * tree.c (build_target_expr_with_type): If we already have a
294 TARGET_EXPR, just return it.
296 * optimize.c (initialize_inlined_parameters): Don't generate an
297 EXPR_STMT if we can just use DECL_INITIAL.
298 * decl.c (emit_local_var): Only make the initialization a
299 full-expression if stmts_are_full_exprs_p.
301 2000-05-01 Mark Mitchell <mark@codesourcery.com>
303 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
305 * call.c (standard_conversion): Use it.
306 (direct_reference_binding): Likewise.
307 (build_over_call): Likewise.
308 (is_properly_derived_from): Likewise.
309 (compare_ics): Likewise.
310 * class.c (resolves_to_fixed_type_p): Likewise.
311 * optimize.c (declare_return_variable): Likewise.
312 * pt.c (is_specialization_of): Likewise.
314 * typeck.c (comp_target_parms): Likeiwse.
315 (build_static_cast): Likewise.
316 (build_reinterpret_cast): Likewise.
317 (build_const_cast): Likewise.
318 (comp_ptr_ttypes_real): Likewise.
319 (comp_ptr_ttypes_const): Likewise.
320 * typeck2.c (process_init_constructor): Likewise.
322 2000-04-30 Scott Snyder <snyder@fnal.gov>
324 * decl.c (finish_destructor_body): Use the base destructor when
325 destroying virtual bases.
327 2000-04-30 Mark Mitchell <mark@codesourcery.com>
329 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
331 * optimize.c (struct inline_data): Add target_exprs field.
332 (declare_return_variable): When a function returns an aggregate,
333 use the variable declared in the TARGET_EXPR as the remapped
335 (expand_call_inline): Update the pending target_exprs stack.
336 (optimize_function): Initialize the stack.
338 * decl2.c (finish_file): Fix typo in comment.
340 * method.c (emit_thunk): Don't try to return a `void' value.
342 * optimize.c (initialize_inlined_parameters): If the parameter is
343 addressable, we need to make a new VAR_DECL, even if the
344 initializer is constant.
346 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
348 * decl.c (grok_op_properties): Add an extra check of argtypes.
350 2000-04-27 Mark Mitchell <mark@codesourcery.com>
352 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
354 (initialize_inlined_parameters): Try to avoid creating new
357 2000-04-27 Alex Samuel <samuel@codesourcery.com>
359 * lex.c (my_get_run_time): Remove.
360 (init_filename_times): Use get_run_time instead of my_get_run_time.
361 (check_newline): Likewise.
362 (dump_time_statistics): Likewise.
363 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
364 of computing elapsed time explicitly.
366 2000-04-26 Mark Mitchell <mark@codesourcery.com>
368 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
369 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
370 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
371 before calling decl_constant_value.
372 * class.c (check_bitfield_decl): Likewise.
373 * cvt.c (ocp_convert): Likewise.
375 * decl.c (compute_array_index_type): Likewise.
376 (build_enumerator): Likewise.
377 * decl2.c (check_cp_case_value): Likewise.
378 * pt.c (convert_nontype_argument): Likewise.
380 * typeck.c (decay_conversion): Likewise.
381 (build_compound_expr): Likewise.
382 (build_reinterpret_cast): Likewise.
383 (build_c_cast): Likewise.
384 (convert_for_assignment): Likewise.
386 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
388 * decl.c (finish_function): Don't play games with DECL_INLINE.
390 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
392 * ir.texi: Correct typo.
394 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
396 * decl.c (grokdeclarator): Reject VLAs as members.
398 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
400 * call.c (standard_conversion): Accept conversion between
403 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
405 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
407 * decl2.c (finish_file): Remove double setup for accounting
410 2000-04-24 Robert Lipe <robertlipe@usa.net>
412 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
414 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
416 * new.cc (set_new_handler): Needs to be in std::.
418 2000-04-23 Mark Mitchell <mark@codesourcery.com>
420 * cp-tree.h (lang_decl): Remove pretty_function_p.
421 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
422 language-specific node.
423 * decl.c (cp_make_fname_decl): Use build_decl, not
424 build_lang_decl, to build the variables.
425 (grokvardecl): Don't call build_lang_decl for local variables in
427 (grokdeclarator): Don't call build_lang_decl for local type
428 declarations in templates.
429 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
430 zero'd memory, rather than calling memset.
431 * pt.c: Include hashtab.h.
432 (local_specializations): New variable.
433 (retrieve_local_specialization): Use it.
434 (register_local_specialization): Likewise.
435 (tsubst_decl): Don't assume local variables have
437 (instantiate_decl): Set up local_specializations.
438 * Makefile.in (HTAB_H): New variable.
440 2000-04-23 Richard Henderson <rth@cygnus.com>
442 * typeck.c (c_expand_asm_operands): Restore the original
443 contents of the output list.
445 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
447 * ir.texi: Document complex number representation.
449 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
451 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
452 (target_incomplete_p): New function.
453 (tinfo_base_init): Create comdat NTBS name variable.
454 (ptr_initializer): Add non_public parameter. Calculate it.
455 (ptmd_initializer): Likewise.
456 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
457 (create_real_tinfo_var): Add non_public parameter. Use it.
458 Push proxy into global namespace.
459 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
461 * inc/typeinfo (type_info::before, type_info::operator==):
462 Compare __name addresses.
464 * tinfo2.cc: Remove new-abi builtins comment.
466 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
468 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
470 * call.c (joust): Exit early if we get the same function, too.
472 * decl2.c (key_method): Return NULL_TREE for template classes.
473 (import_export_class): Don't need to check for template classes.
475 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
477 * lex.c: Remove references to cccp.c.
479 2000-04-18 Mark Mitchell <mark@codesourcery.com>
481 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
482 volatile_memfunc. Add destructor_attr. Adjust dummy.
483 (DECL_DESTRUCTOR_P): Use destructor_attr.
484 (DECL_CONST_MEMFUNC_P): Reimplement.
485 (DECL_VOLATILE_MEMFUNC_P): Remove.
486 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
487 (overrides): Use DECL_DESTRUCTOR_P.
488 (check_for_override): Likewise.
489 * decl.c (start_function): Likewise.
490 * decl2.c (grokfclassfn): Likewise.
491 (check_classfn): Likewise.
492 (grok_function_init): Likewise.
494 2000-04-17 Mark Mitchell <mark@codesourcery.com>
496 * decl2.c (grokfield): Issue error on illegal data member
499 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
501 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
503 2000-04-16 Mark Mitchell <mark@codesourcery.com>
505 * class.c (build_vtable_entry): Don't build thunks for type-info
508 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
510 * decl.c (decls_match): Allow a redeclaration of a builtin to
511 specify args while the builtin did not.
513 2000-04-15 Mark Mitchell <mark@codesourcery.com>
515 * cp-tree.def (THUNK_DECL): Add to documentation.
516 * cp-tree.h (flag_huge_objects): Declare.
517 * class.c (modify_vtable_entry): Tidy.
518 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
519 Calculate delta appropriately for the new ABI.
520 (dfs_modify_vtables): Use it.
521 (modify_all_vtables): Fix thinko in code to add overriding copies
522 of functions to primary vtables.
523 (build_clone): Fix typo in comment.
524 (clone_function_decl): Correct order of destructors in vtable.
525 (build_vbase_offset_vtbl_entries): Adjust comment.
526 (dfs_vcall_offset_queue_p): Remove.
527 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
528 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
529 (build_vtable_entry): Correct check for pure virtual functions.
530 Don't declare flag_huge_objects.
531 * decl.c (flag_huge_objects): Remove declaration.
532 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
533 Use int_size_in_bytes.
534 (emit_thunk): Handle vcall offset thunks.
536 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
538 * decl2.c (parse_time, varconst_time): Delete declarations.
539 (finish_file): Delete LINENO declaration.
540 START_TIME and THIS_TIME now long.
542 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
544 * class.c (build_base_field): Reformat comment.
546 * inc/cxxabi.h (stddef.h): Comment inclusion.
547 (__base_class_info::__offset): Comment shift.
549 2000-04-12 Mark Mitchell <mark@codesourcery.com>
551 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
552 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
553 (cp_push_exception_identifier): New macro.
554 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
555 (DECL_BASE_DESTRUCTOR_P): Likewise.
556 (DECL_DELETING_DESTRUCTOR_P): Likewise.
557 (get_vtbl_decl_for_binfo): Fix formatting.
558 (in_charge_arg_for_name): New macro.
559 (maybe_build_cleanup_and_delete): Remove declaration.
560 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
561 (in_charge_arg_for_name): New function.
562 (build_new_method_call): Use it. Handle cloned destructors.
563 (build_clone): Don't make the base constructor virtual.
564 Automatically defer generated functions.
565 (clone_function_decl): Handle destructors, too.
566 (clone_constructors_and_destructors): Likewise.
567 (create_vtable_ptr): Don't create a vtable entry for a cloned
569 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
570 (initialize_predefined_identifiers): Update appropriately.
571 (finish_destructor_body): Simplify.
572 (maybe_build_cleanup_and_delete): Remove.
573 * except.c (expand_throw): Handle new-ABI destructors.
574 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
575 (build_dtor_call): New function.
576 (build_delete): Use it. Simplify.
577 * optimize.c (maybe_clone_body): Handle destructors.
578 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
580 * exception.cc (cleanup_fn): New typedef.
581 (CALL_CLEANUP): New macro.
582 (cp_eh_info): Use them.
583 (__cp_push_exception): Likewise.
584 (__cp_pop_exception): Likewise.
586 2000-04-11 Mark Mitchell <mark@codesourcery.com>
588 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
589 (complete_dtor_identifier): New macro.
590 (CLASSTYPE_FIRST_CONVERSION): Remove.
591 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
592 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
593 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
594 (CLASSTYPE_CONSTRUCTORS): Likewise.
595 (CLASSTYPE_DESTRUCTORS): Likewise.
596 (lang_decl): Add cloned_function.
597 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
598 (DECL_BASE_CONSTRUCTOR_P): Likewise.
599 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
600 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
601 (DECL_CLONED_FUNCTION_P): Likewise.
602 (DECL_CLONED_FUNCTION): Likewise.
603 (clone_function_decl): Declare.
604 (maybe_clone_body): Likewise.
605 * call.c (build_user_type_conversion_1): Call complete object
606 constructors in the new ABI.
607 (build_new_method_call): Don't add in-charge parameters under the
609 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
610 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
611 CLASSTYPE_DESTRUCTOR_SLOT.
612 (build_clone): New function.
613 (clone_function_decl): Likewise.
614 (clone_constructors_and_destructors): Likewise.
615 (check_bases_and_members): Use it.
616 * decl.c (iniitialize_predefined_identifiers): Initialize
617 complete_dtor_identifier.
618 (finish_function): Don't add extra code to a clone.
619 (lang_mark_tree): Mark cloned_function.
620 * decl2.c (mark_used): Don't bother trying to instantiate things
622 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
623 * method.c (set_mangled_name_for_decl): Don't treat clones as
625 (synthesize_method): Sythesize cloned functions, not the clones.
626 * optimize.c (inline_data): Update comment on ret_label.
627 (remap_block): Don't assume DECL_INITIAL exists.
628 (copy_body_r): Allow ret_label to be NULL.
629 (maybe_clone_body): Define.
630 * pt.c (tsubst_decl): Handle clones.
631 (instantiate_clone): New function.
632 (instantiate_template): Use it.
633 (set_mangled_name_for_template_decl): Don't treat clones as
635 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
636 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
637 * semantics.c (expand_body): Clone function bodies as necessary.
639 * optimize.c (remap_decl): Avoid sharing structure for arrays
640 whose size is only known at run-time.
641 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
643 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
644 to has_in_charge_parm_p.
645 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
646 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
647 (DECL_COPY_CONSTRUCTOR_P): New macro.
648 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
649 (build_user_type_conversion_1): Likewise.
650 (convert_like_real): Likewise.
651 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
652 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
653 (copy_args_p): Likewise.
654 (grok_ctor_properties): Likewise.
655 (start_function): Likewise.
656 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
657 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
658 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
659 * method.c (do_build_copy_constructor): Use
660 DECL_HAS_IN_CHARGE_PARM_P.
661 (synthesize_method): Likewise.
662 * pt.c (instantiate_template): Remove goto.
663 * tree.c (build_cplus_method_type): Remove mention of obstacks in
666 * cp-tre.h (finish_function): Change prototype.
667 * decl.c (end_cleanup_fn): Adjust caller.
668 (finish_function): Take only one parameter.
669 * decl2.c (finish_objects): Adjust caller.
670 (finish_static_storage_duration_function): Likewise.
671 * method.c (emit_thunk): Likewise.
673 * parse.c: Regenerated.
674 * pt.c (instantiate_decl): Likewise.
675 * rtti.c (synthesize_tinfo_fn): Likewise.
676 * semantics.c (expand_body): Likewise.
678 * cp-tree.h (copy_decl): New function.
679 * class.c (finish_struct_1): Use it.
680 * lex.c (copy_decl): Define it.
681 * pt.c (tsubst_decl): Likewise.
682 * tree.c (copy_template_template_parm): Likewise.
684 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
685 has_nonpublic_assign_ref.
686 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
687 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
688 * class.c (finish_struct_methods): Don't set
689 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
690 (interface_only): Don't declare.
691 (interface_unknown): Likewise.
693 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
695 * tree.h (HAVE_TEMPLATES): Remove definition.
696 * lang-options.h (-fthis-is-variable): Remove documentation.
698 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
700 * class.c (instantiate_type): Handle object-relative template-id.
702 * semantics.c (finish_expr_stmt): Call convert_to_void here.
703 * decl.c (cplus_expand_expr_stmt): Not here.
705 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
706 Initialize exprtype earlier.
708 * parse.y (fn.def1): Check for defining types in return types.
710 * decl.c (check_tag_decl): Notice extra fundamental types.
711 Diagnose empty decls in classes, too.
713 * decl.c (grokdeclarator): Don't override an anonymous name if no
714 declarator was given.
716 * cvt.c (convert_to_void): Call resolve_offset_ref.
718 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
720 * decl2.c (decl_namespace): Handle getting a type.
722 * typeck.c (build_c_cast): Re-enable warning for cast between
723 pointer and integer of different size.
725 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
727 * inc/cxxabi.h (__pointer_type_info): Add restrict and
729 (__pointer_type_info::__pointer_catch): New virtual function.
730 (__pointer_to_member_type_info): Derive from
731 __pointer_type_info. Adjust.
732 (__pointer_to_member_type_info::__do_catch): Remove.
733 (__pointer_to_member_type_info::__is_pointer_p): Declare.
734 (__pointer_to_member_type_info::__pointer_catch): Declare.
735 * rtti.c (qualifier_flags): Add restrict flag.
736 (ptmd_initializer): Reorder members.
737 (create_tinfo_types): Expand comments. Reorder
738 ptmd_desc_type_node members.
739 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
741 (__pointer_type_info::__do_catch): Move specific code into
742 __pointer_catch. Call it.
743 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
744 specific catch checking. Fix void conversion check.
745 (__pointer_to_member_type_info::__do_catch): Remove.
746 (__pointer_to_member_type_info::__pointer_catch): Implement.
748 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
750 * lex.c (init_parse): Remove traces of classof and headof.
751 * decl2.c (flag_operator_names): Default to 1.
752 (lang_decode_option): Do not set it for -ansi.
754 2000-04-09 Mark Mitchell <mark@codesourcery.com>
756 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
757 (DECL_MAIN_VARIANT): Remove.
758 * decl.c (duplicate_decls): Don't set it.
759 (start_function): Likewise.
760 (lang_mark_tree): Don't mark it.
761 * decl2.c (defer_fn): Don't use it.
762 * lex.c (retrofit_lang_decl): Don't set it.
763 * pt.c (tsubst_decl): Likewise.
764 * ptree.c (print_lang_decl): Don't print it.
765 * typeck.c (mark_addressable): Don't use it.
767 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
769 * vec.cc: Include <new> and <exception>.
770 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
771 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
773 (__cxa_vec_delete): Catch dtor exceptions.
775 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
777 Prepend __ to implementation defined names.
778 * inc/typeinfo (type_info): Rename _name to __name.
779 (type_info::type_info): Rename parameter.
780 (type_info::operator==, type_info::operator!=,
781 type_info::before): Likewise.
782 (type_info::is_pointer_p, type_info::is_function_p,
783 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
786 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
787 (__pointer_type_info::__pointer_type_info): Likewise.
788 (__pointer_type_info::is_pointer_p,
789 __pointer_type_info::do_catch): Prepend __. Rename parameters.
790 (__array_type_info::__array_type_info): Rename parameters.
791 (__function_type_info::__function_type_info): Likewise.
792 (__function_type_info::is_function_p): Prepend __.
793 (__enum_type_info::__enum_type_info): Rename parameters.
794 (__pointer_to_member_type_info::__pointer_to_member_type_info):
796 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
798 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
799 (__class_type_info::__class_type_info): Rename parameters.
800 (__class_type_info::sub_kind): Prepend __. Adjust member names.
801 (__class_type_info::upcast_result,
802 __class_type_info::dyncast_result): Prepend __. Move definition
804 (__class_type_info::do_upcast, __class_type_info::do_catch,
805 __class_type_info::find_public_src,
806 __class_type_info::do_dyncast,
807 __class_type_info::do_find_public_src): Prepend __. Rename
809 (__si_class_type_info::__si_class_type_info): Rename parameters.
810 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
811 __si_class_type_info::do_find_public_src): Prepent __. Rename
813 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
814 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
815 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
817 (__dynamic_cast): Rename parameters.
818 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
819 type_info::do_catch, type_info::do_upcast): Prepend __.
820 (contained_p, public_p, virtual_p, contained_public_p,
821 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
822 (__class_type_info::do_catch,
823 __class_type_info::do_upcast): Prepend __. Adjust.
824 (__class_type_info::__upcast_result,
825 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
827 (__class_type_info::find_public_src): Prepend __. Adjust.
828 (__class_type_info::do_find_public_src,
829 __si_class_type_info::do_find_public_src,
830 __vmi_class_type_info::do_find_public_src): Likewise.
831 (__class_type_info::do_dyncast,
832 __si_class_type_info::do_dyncast,
833 __vmi_class_type_info::do_dyncast): Likewise.
834 (__class_type_info::do_upcast,
835 __si_class_type_info::do_upcast,
836 __vmi_class_type_info::do_upcast): Likewise.
837 (__dynamic_cast): Adjust.
838 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
839 (__function_type_info::is_function_p): Likewise.
840 (__pointer_type_info::do_catch): Likewise. Adjust.
841 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
842 (__throw_type_match_rtti_2): Adjust.
843 (__is_pointer): Adjust.
845 2000-04-08 Mark Mitchell <mark@codesourcery.com>
847 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
848 (complete_ctor_identifier): New macro.
849 (special_function_kind): Add sfk_copy_constructor and
850 sfk_assignment_operator.
851 (LOOKUP_HAS_IN_CHARGE): Remove.
852 (cons_up_default_function): Rename to ...
853 (implicitly_declare_fn): ... this.
854 * call.c (build_new_method_call): Add in-charge parameters for
856 * class.c (add_implicitly_declared_members): Change parameter name
857 from cant_have_assignment to cant_have_const_assignment.
858 Replace calls to cons_up_default_function to implicitly_declare_fn.
859 * cvt.c (ocp_convert): Use complete_ctor_identifier.
860 * decl.c (initialize_predefined_identifiers): Initialize it.
861 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
863 * init.c (expand_default_init): Don't calculate the in-charge
865 (build_new_1): Likewise.
866 * lex.c (cons_up_default_function): Move to method.c.
867 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
868 (implicitly_declare_fn): New function.
869 * typeck.c (build_static_cast): Use complete_ctor_identifier.
870 (build_modify_expr): Likewise.
871 * typeck2.c (build_functional_cast): Likewise.
873 Under the new ABI, constructors don't return `this'.
874 * cp-tree.h (warn_reorder): Declare.
875 (special_function_kind): New enum.
876 (global_base_init_list): Remove declaration.
877 (emit_base_init): Don't return a value.
878 (check_base_init): Don't declare.
879 (is_aggr_typedef): Likewise.
880 * decl.c (check_special_function_return_type): New function.
881 (return_types): Remove.
882 (grokdeclarator): Use check_special_function_return_type.
883 (start_function): Don't initialize ctor_label under the new ABI.
884 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
885 * init.c (begin_init_stmts): Move to top of file.
886 (finish_init_stmts): Likewise.
887 (warn_reorder): Don't declare.
888 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
890 (check_base_init): Remove.
891 (is_aggr_typedef): Likewise.
892 (build_new_1): Don't use the return value of a constructor.
893 * semantics.c (setup_vtbl_ptr): Don't use the return value
895 * typeck.c (check_return_expr): Don't magically convert return
896 statements into `return this' in constructors under the new ABI.
898 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
899 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
900 (base_ctor_identifier): New macro.
901 (base_dtor_identifier): Likewise.
902 (deleting_dtor_identifier): Likewise.
903 * decl.c: Don't include obstack.h.
904 (obstack_chunk_alloc): Don't define.
905 (obstack_chunk_free): Likewise.
906 (struct predefined_identifier): New type.
907 (initialize_predefined_identifiers): New function.
908 (init_decl_processing): Use it.
909 (debug_temp_inits): Remove.
910 (start_method): Don't call preserve_data.
911 (hack_incomplete_structures): Update comment.
912 * init.c (init_init_processing): Don't initialize
914 (build_offset_rf): Remove dead code.
915 (build_delete): Use CLASSTYPE_N_BASECLASSES.
916 * search.c (init_search_processing): Don't initialize
919 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
921 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
922 some sign_compare warnings.
924 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
926 Rename abi::__vmi_class_type_info members.
927 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
928 base_list, detail_masks members to vmi_flags, vmi_base_count,
929 vmi_bases and vmi_flags_masks respectively.
930 (__vmi_class_type_info::vmi_flags_masks): Rename
931 details_unknown_mask to flags_unknown_mask.
932 * tinfo.cc (__class_type_info::do_upcast): Adjust.
933 (__vmi_class_type_info::do_find_public_src): Adjust.
934 (__vmi_class_type_info::do_dyncast): Adjust.
935 (__vmi_class_type_info::do_upcast): Adjust.
937 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
939 * tinfo.cc (convert_to_base): New function.
940 (get_vbase_offset): Remove. Move into convert_to_base.
941 (__vmi_class_type_info::do_find_public_src): Adjust.
942 (__vmi_class_type_info::do_dyncast): Adjust.
943 (__vmi_class_type_info::do_upcast): Adjust.
945 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
947 * tinfo.cc (operator=): Use __builtin_strcmp.
948 * tinfo2.cc (before): Likewise.
950 2000-04-06 Mark Mitchell <mark@codesourcery.com>
952 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
953 (DECL_SAVED_INLINE): Rename to ...
954 (DECL_DEFERRED_FN): ... this.
955 (in_function_p): Remove declaration.
956 (mark_inline_for_output): Rename to ...
957 (defer_fn): ... this.
958 * decl.c (finish_function): Adjust call to mark_inline_for_output.
959 (in_function_p): Remove definition.
960 * decl2.c (saved_inlines): Rename to ...
961 (deferred_fns): ... this.
962 (saved_inlines_used): Rename to ...
963 (deferred_fns_used): ... this.
964 (mark_inline_for_output): Rename to ...
965 (defer_fn): ... this.
966 (finish_file): Adjust accordingly.
967 (init_decl2): Likewise.
968 * lex.c (cons_up_default_function): Likewise.
969 * pt.c (mark_decl_instantiated): Likewise.
970 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
972 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
973 * semantics.c (expand_body): Defer more functions.
975 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
978 * Make-lang.in (CXX_LIB2FUNCS): Add it.
980 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
981 __cxa_vec_delete): Declare.
983 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
985 * rtti.c (dfs_class_hint_mark): New static function.
986 (dfs_class_hint_unmark): New static function.
987 (class_hint_flags): Use them.
989 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
991 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
993 2000-04-05 Mark Mitchell <mark@codesourcery.com>
995 * cp-tree.h (instantiate_decl): Change prototype.
996 * decl2.c (mark_used): Adjust call.
997 * optimize.c (inlinable_function_p): Adjust handling of templates.
998 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
999 (do_type_instantiation): Likewise.
1000 (instantiate_decl): Defer more templates.
1001 (instantiate_pending_templates): Adjust logic to handle inline
1004 * Makefile.in (GGC_H): New variable. Use it throughout in place
1007 * call.c: Don't include obstack.h. Include ggc.h.
1008 (obstack_chunk_alloc): Don't define.
1009 (obstack_chunk_free): Likewise.
1010 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
1011 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
1012 (pop_switch): Free it.
1014 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
1016 * dump.c (dequeue_and_dump): Don't try to print the bit_position
1017 if we don't have a DECL_FIELD_OFFSET.
1019 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
1021 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
1024 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1026 * cfns.gperf (hash, libc_name_p): Prototype.
1028 * rtti.c (build_dynamic_cast_1): Constification.
1030 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
1032 * semantics.c (deferred_type_access_control): Prototype.
1034 2000-04-04 Mark Mitchell <mark@codesourcery.com>
1036 Correct many new ABI issues regarding vbase and vcall offset
1038 * cp-tree.h (BINFO_VTABLE): Document.
1039 (struct lang_type): Tweak formatting.
1040 (BINFO_PRIMARY_BINFO): Add to documentation.
1041 (CLASSTYPE_VSIZE): Fix typo in comment.
1042 (CLASSTYPE_VBASECLASSES): Update documentation.
1043 (BINFO_VBASE_MARKED): Remove.
1044 (SET_BINFO_VBASE_MARKED): Likewise.
1045 (CLEAR_BINFO_VBASE_MARKED): Likewise.
1046 (BINFO_FIELDS_MARKED): Remove.
1047 (SET_BINFO_FIELDS_MARKED): Likewise.
1048 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
1049 (enum access_kind): New enumeration.
1050 (num_extra_vtbl_entries): Remove declaration.
1051 (size_extra_vtbl_entries): Likewise.
1052 (get_vtbl_decl_for_binfo): New function.
1053 (dfs_vbase_unmark): Remove declaration.
1054 (mark_primary_bases): Likewise.
1055 * class.c (SAME_FN): Remove.
1056 (struct vcall_offset_data_s): Move definition.
1057 (build_vbase_pointer): Use `build', not `build_binary_op', to
1058 access the vbase pointer under the new ABI.
1059 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
1060 (build_primary_vtable): Likewise.
1061 (dfs_mark_primary_bases): Move here from search.c.
1062 (mark_primary_bases): Likewise.
1063 (determine_primary_bases): Under the new ABI, don't make a base
1064 class a primary base just because we don't yet have any virtual
1066 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
1067 (num_vfun_entries): Remove.
1068 (dfs_count_virtuals): Likewise.
1069 (num_extra_vtbl_entries): Likewise.
1070 (size_extra_vtbl_entries): Likewise.
1071 (layout_virtual_bases): Iterate in inheritance graph order under
1073 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
1074 indicate that a vfield is present.
1075 (init_class_processing): Initialize access_public_node, etc., from
1077 (get_vtbl_decl_for_binfo): New function.
1078 (dump_class_hierarchy_r): Likewise.
1079 (dump_class_hierarchy): Use it.
1080 (finish_vtbls): Build the vtbls in inheritance graph order.
1081 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
1082 (initialize_vtable): Use get_vtbl_decl_for_binfo.
1083 (accumulate_vtbl_inits): Add comments explaining why a pre-order
1085 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
1086 where the vptr points, even for primary vtables.
1087 (build_vtbl_initializer): Adjust handling of vbase and vcall
1089 (build_vcall_and_vbase_vtable_entries): New function.
1090 (dfs_build_vbase_offset_vtbl_entries): Remove.
1091 (build_vbase_offset_vtbl_entries): Reimplement.
1092 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
1093 were already handled in a primary base class vtable.
1094 (build_vcall_offset_vtbl_entries): Adjust.
1095 (build_rtti_vtbl_entries): Adjust.
1096 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
1097 * init.c (expand_virtual_init): Simplify.
1098 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
1099 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
1100 * search.c (BINFO_ACCESS): New macro.
1101 (SET_BINFO_ACCESS): Likewise.
1102 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
1103 (access_in_type): Likewise.
1104 (dfs_accessible_p): Likewise.
1105 (protected_accessible_p): Likewise.
1106 (lookup_fnfields_1): Adjust documentation.
1107 (dfs_mark_primary_bases): Move to class.c
1108 (mark_primary_bases): Likewise.
1109 (dfs_vbase_unmark): Remove.
1110 (virtual_context): Use BINFO_FOR_VBASE.
1111 (dfs_get_vbase_types): Simplify.
1112 (dfs_build_inheritance_graph_order): New function.
1113 (get_vbase_types): Use it.
1114 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
1116 * tinfo.cc (get_vbase_offset): New function.
1117 (__vmi_class_type_info::do_find_public_src): Use it.
1118 (__vmi_class_type_info::do_dyncast): Likewise.
1119 (__vmi_class_type_info::do_upcast): Likewise.
1121 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
1123 * lang-specs.h: Pass -fno-show-column to the preprocessor.
1125 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
1127 * rtti.c (class_hint_flags): Rename flags.
1128 (class_initializer): Remove flags.
1129 (synthesize_tinfo_var): Combine offset and flags. Add flags
1130 for __vmi_class_type_info.
1131 (create_tinfo_types): Remove flags from __class_type_info and
1132 __si_class_type_info. Merge flags and offset from
1133 base_class_type_info.
1134 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
1135 (__base_class_info::is_virtual_p): Adjust.
1136 (__base_class_info::is_public_p): Adjust.
1137 (__base_class_info::offset): New accessor.
1138 (__class_type_info::details): Remove member.
1139 (__class_type_info::__class_type_info): Lose details.
1140 (__class_type_info::detail_masks): Remove.
1141 (__si_class_type_info::__si_class_type_info): Lose details.
1142 (__vmi_class_type_info::details): New member.
1143 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
1144 (__vmi_class_type_info::detail_masks): New member.
1145 * tinfo.cc (__class_type_info::do_upcast): Initialize result
1146 with unknown_details_mask.
1147 (__vmi_class_type_info::do_find_public_src): Adjust
1148 (__vmi_class_type_info::do_dyncast): Adjust.
1149 (__vmi_class_type_info::do_upcast): Set result details, if
1151 (__dynamic_cast): Temporarily #if out optimization.
1153 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
1155 * rtti.c (get_tinfo_decl): Mark used.
1156 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
1157 mark as dealt with, if we output it.
1159 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1161 * class.c: Reorganize to put virtual function table initialization
1162 machinery at the end of the file.
1164 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
1166 * class.c (finish_struct): Use bitsize_zero_node.
1167 * pt.c (instantiate_class_template): Likewise.
1169 2000-03-28 Mark Mitchell <mark@codesourcery.com>
1171 Put RTTI entries at negative offsets in new ABI.
1172 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
1173 vbase offset at index -3, not -1.
1174 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
1175 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
1176 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
1177 (build_rtti_vtbl_entries): New function.
1178 (set_rtti_entry): Remove.
1179 (build_primary_vtable): Don't use it.
1180 (build_secondary_vtable): Likewise.
1181 (start_vtable): Remove.
1182 (first_vfun_index): New function.
1183 (set_vindex): Likewise.
1184 (add_virtual_function): Don't call start_vtable. Do call
1186 (set_primary_base): Rename parameter.
1187 (determine_primary_base): Likewise.
1188 (num_vfun_entries): Don't use skip_rtti_stuff.
1189 (num_extra_vtbl_entries): Include RTTI information.
1190 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
1191 (skip_rtti_stuff): Remove.
1192 (dfs_modify_vtables): Don't use it.
1193 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
1194 (layout_nonempty_base_or_field): Update size handling.
1195 (create_vtable_ptr): Tweak.
1196 (layout_class_type): Adjust parameter names.
1197 (finish_struct_1): Simplify.
1198 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
1199 (skip_rtti_stuff): Remove.
1200 (first_vfun_index): New function.
1201 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1202 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
1203 (marked_vtable_pathp): Declare.
1204 (unmarked_vtable_pathp): Likewise.
1205 * error.c (dump_expr): Use first_vfun_index to calculate vtable
1207 * rtti.c (build_headof): Look for RTTI at negative offsets.
1208 (get_tinfo_decl_dynamic): Likewise.
1209 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
1211 (create_pseudo_type_info): Do it here instead. Adjust so that
1212 vptr points at first virtual function.
1213 * search.c (marked_vtable_pathp): Make it global.
1214 (unmarked_vtable_pathp): Likewise.
1215 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
1216 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
1217 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
1218 (get_pure_virtuals): Likewise.
1219 (expand_upcast_fixups): Likewise.
1220 * tree.c (debug_binfo): Likewise.
1221 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
1224 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1226 * class.c (check_field_decl): Fix typo.
1227 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
1228 (check_methods): Likewise.
1229 (check_field_decls): Likewise.
1230 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
1231 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
1232 Use DECL_RESULT_FLD, not DECL_RESULT.
1233 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
1234 * lex.c (identifier_type): Likewise.
1235 * pt.c (determine_specialization, lookup_template_class): Likewise.
1236 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
1237 (resolve_overloaded_unification, more_specialized): Likewise.
1238 * semantics.c (finish_member_declaration): Likewise.
1239 * typeck.c (build_x_function_call): Likewise.
1241 2000-03-26 Mark Mitchell <mark@codesourcery.com>
1243 * class.c (layout_empty_base): Handle empty bases with non-byte
1245 (build_base_field): Likewise.
1246 (layout_virtual_bases): Likewise.
1248 * class.c (finish_struct_1): Fix typo in this change:
1250 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1252 2000-03-25 Mark Mitchell <mark@codesourcery.com>
1254 * decl.c (grokdeclarator): Count partial specializations when
1255 keeping track of how many template classes have been seen.
1257 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
1259 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1261 * class.c (build_vbase_pointer_fields): layout_field now place_field.
1262 (get_vfield_offset): Use byte_position.
1263 (set_rtti_entry): Set OFFSET to ssizetype zero.
1264 (get_binfo_offset_as_int): Deleted.
1265 (dfs_record_base_offsets): Use tree_low_cst.
1266 (dfs_search_base_offsets): Likewise.
1267 (layout_nonempty_base_or_field): Reflect changes in RLI format
1268 and call byte_position.
1269 (layout_empty_base): Convert offset to ssizetype.
1270 (build_base_field): use rli_size_unit_so_far.
1271 (dfs_propagate_binfo_offsets): Do computation in proper type.
1272 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
1273 (layout_class_type): Reflect changes in RLI names and fields.
1274 (finish_struct_1): Set DECL_FIELD_OFFSET.
1275 * dump.c (dequeue_and_dump): Call bit_position.
1276 * expr.c (cplus_expand_constant): Use byte_position.
1277 * rtti.c (expand_class_desc): Use bitsize_one_node.
1278 * typeck.c (build_component_addr): Use byte_position and don't
1279 special case for zero offset.
1281 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
1283 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
1285 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
1287 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
1290 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1292 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
1294 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
1295 make_typename_type, check_initializer, cp_finish_decl,
1296 xref_tag): Likewise.
1297 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
1298 decl_namespace, arg_assoc_template_arg, arg_assoc,
1299 validate_nonmember_using_decl, do_class_using_decl): Likewise.
1300 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
1301 args_to_string): Likewise.
1302 * friend.c (is_friend): Likewise.
1303 * lex.c (note_got_semicolon, note_list_got_semicolon,
1304 is_global): Likewise.
1305 * method.c (build_overload_nested_name, build_overload_value,
1306 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
1307 * parse.y (typename_sub, typename_sub1): Likewise.
1308 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
1309 process_partial_specialization, convert_template_argument,
1310 template_args_equal, add_pending_template, lookup_template_class,
1311 for_each_template_parm_r, maybe_fold_nontype_arg,
1312 tsubst, instantiate_template, type_unification_real, unify,
1313 instantiate_pending_templates, set_mangled_name_for_template_decl):
1315 * repo.c (repo_get_id, repo_template_used): Likewise.
1316 * search.c (lookup_field_1): Likewise.
1317 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
1318 * xref.c (classname): Likewise.
1320 2000-03-22 Mark Mitchell <mark@codesourcery.com>
1322 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
1323 (CANONICAL_BINFO): New macro.
1324 (BINFO_NEW_VTABLE_MARKED): Use it.
1325 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
1326 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
1327 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
1329 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1330 (build_secondary_vtable): Likewise.
1331 (dfs_finish_vtbls): Likewise.
1332 (dfs_accumulate_vtbl_inits): Likewise.
1333 (accumulate_vtbl_inits): New function.
1334 (finish_vtbls): Make sure that virtual bases come after
1335 non-virtual bases in the vtable group.
1336 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
1337 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1338 * search.c (struct vbase_info): Move definition.
1339 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1340 (unmarked_new_vtable_p): Likewise.
1341 (dfs_mark_vtable_path): Remove.
1342 (dfs_mark_new_vtable): Remove.
1343 (dfs_unmark_new_vtable): Likewise.
1344 (dfs_clear_search_slot): Likewise.
1345 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
1346 (dfs_clear_vbase_slots): Likewise.
1347 (init_vbase_pointers): LIkewise.
1349 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
1351 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
1352 SIZETYPE to a non-SIZETYPE.
1354 2000-03-21 Mark Mitchell <mark@codesourcery.com>
1356 * class.c (layout_virtual_bases): Adjust names in conditionally
1359 * class.c (record_base_offsets): New function.
1360 (layout_conflict_p): Likewise.
1361 (layout_nonempty_base_or_field): Use it.
1362 (layout_empty_base): New function.
1363 (build_base_field): Use it.
1364 (build_base_fields): Update comment.
1365 (layout_virtual_bases): Fold in a little code form
1366 layout_basetypes. Use layout_empty_base.
1367 (layout_basetypes): Remove.
1368 (end_of_class): New function.
1369 (layout_class_type): Use it. Adjust.
1371 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
1373 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
1375 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1376 * typeck.c (fntype_p): Remove.
1378 * cp-tree.h (TI_SPEC_INFO): Remove.
1379 (CLASSTYPE_TI_SPEC_INFO): Likewise.
1380 * pt.c (process_partial_specialization): Likewise.
1382 * class.c (build_base_field): Fix thinko in computation of binfo
1385 * tree.c (mark_local_for_remap_p): Mark variables declared in
1386 TARGET_EXPRs as well.
1388 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1390 * typeck.c (require_complete_type, complete_type,
1391 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
1392 build_array_ref, convert_arguments, pointer_diff,
1393 build_x_unary_op, build_unary_op, build_c_cast,
1394 build_modify_expr): Use COMPLETE_TYPE_P etc.
1395 * call.c (is_complete, convert_like_real,
1396 build_new_method_call): Likewise.
1397 * class.c (build_vbase_pointer_fields, check_bases,
1398 build_base_field, finish_struct_1, pushclass): Likewise.
1399 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
1400 * decl.c (maybe_process_template_type_declaration, pushtag,
1401 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
1402 layout_var_decl, check_initializer, cp_finish_decl,
1403 grokdeclarator, require_complete_types_for_parms,
1404 grok_op_properties, xref_tag, xref_basetypes,
1405 check_function_type): Likewise.
1406 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
1407 * friend.c (do_friend): Likewise.
1408 * init.c (build_offset_ref): Likewise.
1409 * parse.y (structsp): Likewise.
1410 * pt.c (maybe_process_partial_specialization,
1411 tsubst_friend_function, instantiate_class_template, tsubst,
1412 do_type_instantiation, instantiate_pending_templates): Likewise.
1413 * repo.c (repo_get_id): Likewise.
1414 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
1415 synthesize_tinfo_var, emit_support_tinfos): Likewise.
1416 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
1417 * semantics.c (begin_class_definition): Likewise.
1418 * tree.c (build_cplus_method_type): Likewise.
1419 * typeck2.c (digest_init, build_functional_cast,
1420 add_exception_specifier): Likewise.
1421 * parse.h, parse.c: Regenerated.
1423 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
1425 * inc/cxxabi.h: New header file. Define new-abi entry points.
1426 (__pointer_type_info::target): Rename member to ...
1427 (__pointer_type_info::type): ... here.
1428 (__base_class_info::type): Rename member to ...
1429 (__base_class_info::base): ... here.
1430 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
1431 * cp-tree.h (CPTI_ABI): New global tree enumeration.
1432 (abi_node): New global tree node.
1433 * decl.c (abi_node): Document.
1434 (init_decl_processing): Initialize abi_node.
1435 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
1436 (get_vmi_pseudo_type_info): Likewise.
1437 (create_tinfo_types): Likewise.
1438 (emit_support_tinfos): Likewise.
1439 * tinfo.h (cxxabi.h): Include for new-abi.
1440 Move rtti class definitions to new header file.
1441 * tinfo.cc (abi): Use the namespace.
1442 (std): Move new abi rtti classes from here ...
1443 (__cxxabiv1): ... to here.
1444 * tinfo2.cc (cxxabi.h): Include for new-abi.
1445 Move rtti class definitions to new header file.
1446 (std): Move new abi rtti classes from here ...
1447 (__cxxabiv1): ... to here.
1448 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
1451 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
1452 Jason Merrill <jason@casey.cygnus.com>
1454 * method.c (build_overload_int): Use host_integerp.
1456 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1458 * init.c (build_offset_ref): Handle the case of a templated member
1461 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1463 * except.c (expand_exception_blocks): Clear catch_clauses_last.
1465 2000-03-18 Mark Mitchell <mark@codesourcery.com>
1467 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
1468 * class.c (check_bitfield_decl): Turn illegal bitfields into
1470 (dfs_propagate_binfo_offsets): Adjust for new size_binop
1472 (dfs_offset_for_unshared_vbases): Likewise.
1473 * cvt.c (cp_convert_to_pointer): Convert NULL to a
1474 pointer-to-member correctly under the new ABI.
1475 * expr.c (cplus_expand_constant): Don't use cp_convert when
1476 turning an offset into a pointer-to-member.
1477 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
1478 when dereferencing them under the new ABI.
1479 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
1480 of pointers-to-members under the new ABI.
1482 * class.c (check_bitfield_decl): Remove restriction on really long
1484 (layout_class_type): Implement new ABI handling of bitfields
1485 longer than their types.
1487 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1489 * parse.y (extdefs): Call ggc_collect.
1490 * parse.c: Regenerated.
1492 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
1494 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
1495 (note_name_declared_in_class): Use OVL_CURRENT to get at a
1498 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1500 * class.c (build_vbase_path): Use integer_zerop.
1501 (build_vtable_entry): Use tree_low_cst.
1502 (get_vfield_offset): Use bit_position.
1503 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
1505 (check_bitfield_decl): Set DECL_SIZE using convert.
1506 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
1507 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
1509 (finish_struct_1): Use bit_position.
1510 (dump_class_hierarchy): Use tree_low_cst.
1511 * cp-tree.h (min_precision): Add declaration.
1512 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
1513 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
1514 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
1515 * expr.c (cplus_expand_constant): Use bit_position.
1516 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
1517 * rtti.c (get_base_offset): Use bit_position.
1518 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
1519 host_integerp, and tree_low_cst.
1520 (pointer_int_sum): Use integer_zerop.
1521 (build_component_addr): Use bit_position.
1523 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
1525 * typeck.c (require_complete_type): Don't assume size_zero_node.
1526 (complete_type_or_else): Likewise.
1528 2000-03-16 Steven Grady <grady@digitaldeck.com>
1529 Jason Merrill <jason@casey.cygnus.com>
1531 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
1533 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
1535 * decl2.c (grokfield): Bail out if type is error_mark_node.
1537 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1539 * tinfo2.cc (__ptr_to_member_data): Rename to ...
1540 (__pointer_to_member_data): ... here. Adjust.
1541 * rtti.c (create_tinfo_types): Adjust.
1543 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1545 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
1546 * decl.c (ref_desc_type_node): Undocument.
1547 * rtti.c (ptr_ref_initializer): Rename to ...
1548 (ptr_initializer): ... here. Adjust comments.
1549 (ptmd_initializer): Fix comment thinko.
1550 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
1551 (create_tinfo_types): Remove ref_desc_type_node init.
1552 * tinfo2.cc (__reference_type_info): Remove.
1554 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
1556 * decl.c (cp_finish_decl): Remove obsolete comment.
1558 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
1560 2000-03-14 Mark Mitchell <mark@codesourcery.com>
1562 * cp-tree.h: Tweak documentation.
1563 * class.c (build_vbase_pointer_fields): Layout the fields, too.
1564 (avoid_overlap): Remove.
1565 (get_binfo_offset_as_int): New function.
1566 (dfs_serach_base_offsets): Likewise.
1567 (layout_nonempty_base_or_field): Likewise.
1568 (build_base_field): Layout fields here. Avoid placing two objects
1569 of the same type at the same address, under the new ABI.
1570 (build_base_fields): Adjust accordingly.
1571 (create_vtable_ptr): Return the new field, but don't attach it to
1573 (remove_base_field): Remove.
1574 (remove_base_fields): Remove.
1575 (layout_basetypes): Adjust accordingly.
1576 (layout_class_type): Call layout_field for each field, rather than
1577 just making a wholesale call to layout_type.
1579 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
1581 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
1583 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
1585 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
1587 * except.c (dtor_nothrow): New fn.
1588 (do_pop_exception): Use it. Take type parm.
1589 (push_eh_cleanup): Take type parm.
1590 (expand_start_catch_block): Pass it.
1591 (build_eh_type_type_ref): Accept null type.
1593 2000-03-12 Mark Mitchell <mark@codesourcery.com>
1595 * cp-tree.h (revert_static_member_fn): Change prototype.
1596 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
1597 (grok_op_properties): Likewise.
1598 (start_function): Likewise.
1599 (revert_static_member_fn): Simplify.
1600 * pt.c (check_explicit_specialization): Adjust call to
1601 revert_static_member_fn.
1603 2000-03-11 Mark Mitchell <mark@codesourcery.com>
1605 * cp-tree.h (scope_kind): New type.
1606 (tmpl_spec_kind): Likewise.
1607 (declare_pseudo_global_level): Remove.
1608 (pseudo_global_level_p): Rename to template_parm_scope_p.
1609 (pushlevel): Remove declaration.
1610 (begin_scope): New function.
1611 (finish_scope): Likewise.
1612 (current_tmpl_spec_kind): Likewise.
1613 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
1614 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
1615 Add template_spec_p.
1616 (toplevel_bindings_p): Adjust.
1617 (declare_pseudo_global_level): Remove.
1618 (pseudo_global_level_p): Rename to template_parm_scope_p.
1619 (current_tmpl_spec_kind): New function.
1620 (begin_scope): Likewise.
1621 (finish_scope): Likewise.
1622 (maybe_push_to_top_level): Adjust.
1623 (maybe_process_template_type_declaration): Likewise.
1624 (pushtag): Likewise.
1625 (pushdecl_nonclass_level): Likewise.
1626 (lookup_tag): Likewise.
1627 (grokfndecl): Handle member template specializations. Share
1628 constructor and non-constructor code.
1629 * decl2.c (check_classfn): Handle member template specializations.
1630 * pt.c (begin_template_parm_list): Use begin_scope.
1631 (begin_specialization): Likewise.
1632 (end_specialization): Likewise.
1633 (check_explicit_specialization): Use current_tmpl_spec_kind.
1634 Handle member template specializations.
1635 (end_template_decl): Use finish_scope. Remove call to
1637 (push_template_decl_real): Remove bogus error message.
1638 (tsubst_decl): Fix typo in code contained in comment.
1639 (instantiate_template): Handle member template specializations.
1640 (most_general_template): Likewise.
1642 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
1644 * lex.c (whitespace_cr): Compress consecutive calls to warning().
1645 (do_identifier): Ditto for error().
1647 * pt.c (convert_nontype_argument): Ditto for cp_error().
1648 (convert_template_argument): Ditto for cp_pedwarn().
1650 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
1652 * exception.cc (__check_null_eh_spec): New fn.
1653 * except.c (expand_end_eh_spec): Call it if the spec is throw().
1655 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
1657 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
1658 * except.c (expand_end_eh_spec): Add the return type.
1659 * rtti.c (throw_bad_cast): Add the parmtypes.
1660 (throw_bad_typeid): Likewise.
1662 * semantics.c (expand_stmt): Only leave out rtl for unused
1663 artificials, and set DECL_IGNORED_P on them as well.
1664 * decl.c (wrapup_globals_for_namespace): Likewise.
1666 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
1668 * decl.c (maybe_commonize_var): Skip all artificial decls.
1669 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
1671 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
1673 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
1674 * cp-tree.h: Declare flag_enforce_eh_specs.
1675 * decl.c (store_parm_decls, finish_function): Check it.
1677 C library functions don't throw.
1678 * Makefile.in (cfns.h): New target.
1679 (except.o): Depend on it.
1680 * Make-lang.in (cc1plus): Depend on cfns.gperf.
1681 * cfns.gperf: New file.
1682 * cfns.h: Generated.
1683 * except.c: Include it.
1684 (nothrow_libfn_p): New fn.
1685 * decl.c (grokfndecl): Use it.
1686 * cp-tree.h: Declare it.
1688 * decl.c (push_overloaded_decl_1, auto_function,
1689 define_function): Lose.
1690 (build_library_fn_1): New static fn.
1691 (builtin_function): Use it.
1692 (get_atexit_node): Use build_library_fn_ptr.
1693 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
1694 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
1695 push_void_library_fn, push_throw_library_fn): New fns.
1696 * cp-tree.h: Declare them.
1697 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
1698 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
1699 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
1700 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
1701 * rtti.c (build_runtime_decl): Lose.
1702 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
1703 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
1704 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
1706 * call.c (build_call): Remove result_type parm.
1707 Call mark_used on unused artificial fns.
1708 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
1710 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
1712 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
1714 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
1715 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
1716 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
1717 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
1718 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
1719 expand_generic_desc): Likewise.
1721 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1723 * exception.cc (__cp_pop_exception): Cleanup the original object.
1725 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1727 * decl.c (grok_op_properties): Merge conversion to void warning
1728 with other silly op warnings.
1730 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
1732 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
1733 array CONSTRUCTOR elements. Don't use expr_tree_cons.
1735 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1737 * decl.c (cp_make_fname_decl): New function.
1738 (wrapup_globals_for_namespace): Don't emit unused static vars.
1739 (init_decl_processing): Remove comment about use of
1740 array_domain_type. Set make_fname_decl.
1741 (cp_finish_decl): Remove __FUNCTION__ nadgering.
1742 * semantics.c (begin_compound_stmt): Remove
1743 current_function_name_declared flagging.
1744 (expand_stmt): Don't emit unused local statics.
1745 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
1748 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
1750 * typeck.c (convert_for_assignment): Don't look at array
1752 * call.c (convert_like_real): Likewise.
1754 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
1756 Add initial support for '\uNNNN' specifier.
1757 * lex.c (read_ucs): New fn.
1758 (readescape, skip_white_space): Call it.
1759 (is_extended_char, is_extended_char_1): New fns.
1760 (utf8_extend_token): New fn, #if 0'd out.
1761 (real_yylex): Treat extended chars like letters.
1763 * search.c (note_debug_info_needed): Walk the bases even if we
1764 weren't deferring the type itself.
1766 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1768 * decl2.c (finish_objects): Constify a char*.
1770 * method.c (emit_thunk): Likewise.
1772 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
1774 * typeck.c (dubious_conversion_warnings): Look through
1777 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1779 * class.c (dfs_modify_vtables): I is now unsigned.
1780 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
1781 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
1782 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
1783 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
1784 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
1785 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
1786 Call integer_all_onesp.
1787 * typeck2.c (process_init_constructor): Use compare_tree_int.
1789 * lang-specs.h (as): Don't call if -syntax-only.
1791 2000-03-06 Mark Mitchell <mark@codesourcery.com>
1793 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
1794 RTL_EXPR_HAS_NO_SCOPE after all.
1796 2000-03-05 Mark Mitchell <mark@codesourcery.com>
1798 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
1799 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
1800 RTL_EXPR_HAS_NO_SCOPE.
1802 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
1805 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
1807 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
1809 * call.c (convert_like): Macrofy.
1810 (convert_like_with_context): New macro.
1811 (convert_like_real): Renamed from convert_like. Add calling
1812 context parameters, for diagnostics. Add recursive flag. Call
1813 dubious_conversion_warnings for outer conversion.
1814 (build_user_type_conversion): Use convert_like_with_context.
1815 (build_over_call): Likewise. Don't warn about dubious
1816 conversions here. Adjust convert_default_arg calls.
1817 (convert_default_arg): Add context parameters for diagnostics.
1818 Pass throught to convert_like_with_context.
1819 * cp-tree.h (convert_default_arg): Add context parameters.
1820 (dubious_conversion_warnings): Prototype new function.
1821 * typeck.c (convert_arguments): Adjust convert_default_arg call.
1822 (dubious_conversion_warnings): New function, broken
1823 out of convert_for_assignment.
1824 (convert_for_assignment): Adjust.
1826 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
1828 * decl2.c (key_method): Break out from...
1829 (import_export_vtable, import_export_class): ...here.
1831 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
1832 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
1834 * search.c (note_debug_info_needed, dfs_debug_mark,
1835 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
1836 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
1838 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
1840 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
1843 2000-03-02 Mark Mitchell <mark@codesourcery.com>
1845 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
1846 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
1847 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
1848 (lang_type): Split gets_new into has_new and has_array_new.
1849 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1850 (TYPE_GETS_NEW): Split into ...
1851 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
1852 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
1853 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
1854 (build_op_new_call): Don't declare.
1855 (build_new_1): Likewise.
1856 * call.c (build_op_new_call): Remove.
1857 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1858 instead of TYPE_NEEDS_DESTRUCTOR.
1859 (finish_struct_bits): Likewise.
1860 (add_implicitly_declared_members): Likewise.
1861 (check_field_decl): Likewise.
1862 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
1863 correctly under the new ABI.
1864 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
1865 instead of TYPE_NEEDS_DESTRUCTOR.
1866 (initialize_local_var): Likewise.
1867 (destroy_local_var): Likewise.
1868 (cp_finish_decl): Likewise.
1869 (register_dtor_fn): Likewise.
1870 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
1871 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
1872 TYPE_VEC_DELETE_TAKES_SIZE here.
1873 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
1874 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
1875 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1876 (finish_destructor_body): Likewise.
1877 (maybe_build_cleanup_1): Likewise.
1878 * decl2.c (do_static_destruction): Likewise.
1879 * init.c (build_new_1): Make it static.
1880 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1881 (expand_cleanup_for_base): Likewise.
1882 (get_cookie_size): New function.
1883 (build_new_1): Handle array-new cookies correctly under the new
1885 (build_vec_delete_1): Likewise.
1886 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1887 (build_delete): Likewise.
1888 (build_vec_delete): Handle array-new cookies correctly under the new
1890 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1891 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
1892 TYPE_HAS_ARRAY_NEW_OPERATOR.
1893 * ptree.c (print_lang_type): Check them.
1894 * search.c (context_for_name_lookup): Fix typo in comment.
1895 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
1896 * tree.c (break_out_cleanups): Likewise.
1897 (build_cplus_array_test_1): Likewise.
1898 (cp_build_qualified_type_real): Likewise.
1899 * typeck.c (complete_type): Likewise.
1901 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
1902 the command-line, not the end.
1904 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
1906 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
1908 2000-03-02 Tom Tromey <tromey@cygnus.com>
1910 * cp-tree.h (build_java_class_ref): Declare.
1911 * init.c (build_java_class_ref): No longer static.
1912 * except.c (expand_throw): Generate a Java-style `throw' if the
1913 thrown object is a "Java" object.
1914 (initialize_handler_parm): Generate a Java-style lookup of
1915 exception info if the caught object is a "Java" object.
1916 (catch_language, catch_language_init): New globals.
1917 (decl_is_java_type): New function.
1918 (expand_start_catch_block): Don't call push_eh_info() or
1919 push_eh_cleanup() when handling a Java-style "catch". Pass Java
1920 class reference to build_catch_block.
1922 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1924 * typeck.c (comptypes): Treat sizetype like its language equivalent.
1926 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
1928 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
1929 to merge reference/pointer code and fix incorrect warnings.
1931 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
1933 * search.c (protected_accessible_p): Use context_for_name_lookup.
1935 * init.c (construct_virtual_bases): Fix thinko.
1936 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
1938 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
1940 * decl.c (current_function_decl): Move to toplev.c.
1942 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
1944 * pt.c (fn_type_unification): Unify return type, whenever
1946 (get_bindings_real): Only pass return type when necessary.
1947 Remove explicit return type check.
1948 * class.c (resolve_address_of_overloaded_function): Pass desired
1949 return type to fn_type_unification.
1951 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1953 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
1955 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
1957 * rtti.c (expand_class_desc): Likewise.
1958 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
1959 (THUNK_VCALL_OFFSET): Likewise.
1960 (THUNK_DELTA): Reflect changes in ../tree.h.
1962 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
1964 * search.c (protected_accessible_p): Also allow the access if
1965 the member is public in DERIVED. Lose TYPE parm.
1966 (friend_accessible_p): Lose TYPE parm.
1967 (accessible_p): Adjust.
1969 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1971 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
1972 on things that are not sizes; ssize_binop deleted.
1973 Call size_diffop when appropriate.
1974 (dfs_build_vcall_offset_vtbl_entries): Likewise.
1975 (build_primary_vtable, build_secondary_vtable): Likewise.
1976 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
1977 Variable I is HOST_WIDE_INT.
1978 (get_vfield_offset): Pass proper types to size_binop.
1979 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
1980 (finish_struct_1): Likewise.
1981 (skip_rtti_stuff): Arg N is now pointer to signed.
1982 (layout_class_type): Use size_zero_node.
1983 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
1984 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
1985 * decl.c (complete_arry_type): Pass proper types to size_binop.
1986 (xref_basetypes): BINFO_OFFSET is sizetype.
1987 * error.c (dump_expr): Don't use size_binop non-sizes.
1988 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
1989 * init.c (construct_virtual_bases): Fix type error.
1990 (build_vec_delete_1): Pass proper type to size_binop and don't
1992 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
1993 * rtti.c (get_base_offset): Pass proper type to size_binop.
1994 * search.c (dfs_find_vbases): Fix type error.
1995 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
1996 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
1997 * tree.c (debug_binfo): Variable N is signed.
1998 Use HOST_WIDE_INT_PRINT_DEC.
1999 * typeck.c (comptypes): sizetype is same as equivalent integer type.
2000 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
2001 size_one_node and size_zero_node.
2002 (c_alignof): Use size_one_node.
2003 (build_component_addr): Pass proper types to size_binop.
2004 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
2006 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
2008 Implement class scope using-declarations for functions.
2009 * class.c (handle_using_decl): Call add_method for used functions.
2010 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
2011 (add_method): Used functions are hidden by local functions.
2012 (check_bases_and_members): Handle using-decls before finalizing
2013 CLASSTYPE_METHOD_VEC.
2014 * call.c (add_function_candidate): Add ctype parm; if non-zero,
2015 override the type of 'this' accordingly.
2016 (add_template_candidate, add_template_candidate_real): Add ctype parm.
2017 (convert_class_to_reference, build_user_type_conversion_1,
2018 build_new_function_call, build_object_call, build_new_op,
2019 build_new_method_call): Pass ctype parm.
2021 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
2023 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2024 build_new_function_call, build_object_call, build_new_op,
2025 build_new_method_call, build_op_delete_call): Don't get basetype_path
2027 * typeck.c (build_component_ref): Likewise.
2028 * init.c (build_offset_ref): Likewise.
2029 (resolve_offset_ref): Don't call enforce_access.
2030 Call build_scoped_ref.
2031 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
2032 would cause an error or if -pedantic.
2033 * class.c (alter_access): Lose binfo parm.
2035 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2037 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
2040 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
2042 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
2043 pseudo_type_info creation into the std namespace
2045 2000-02-26 Mark Mitchell <mark@codesourcery.com>
2047 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
2048 (import_export_class): Remove declaration.
2049 * decl2.c (import_export_class): Make it static.
2050 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
2051 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
2052 EXPR_WITH_FILE_LOCATION.
2053 * lex.c (check_newline): Tweak filename/lineno setting.
2054 * semantics.c (begin_while_stmt): Fix typo in comment.
2056 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2058 * lang-options.h (-fmessage-length=): Add missing option.
2060 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
2062 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
2064 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
2066 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
2068 * optimize.c (expand_call_inline): Emit the return label before
2069 evaluating the return value.
2071 2000-02-24 Mark Mitchell <mark@codesourcery.com>
2073 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
2074 than duplicating functionality here.
2075 * optimize.c: Include input.h.
2076 (expand_call_inline): Use push_srcloc and pop_srcloc.
2077 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
2078 * parse.c: Regenerated.
2079 * Makefile.in (lex.o): Depend on input.h.
2080 (optimize.o): Likewise.
2082 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
2084 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
2085 function type, rather than ICE.
2087 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
2089 * decl.c (grokdeclarator): Call decl_type_access_control.
2090 * parse.y (parse_end_decl): Don't call decl_type_access_control if
2093 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
2095 * decl.c (decls_match): Remove obsolete static member nadgering.
2097 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2099 * decl.c (grokdeclarator): Change ANSI to ISO.
2100 * lex.c (consume_string, readescape, do_identifier): Likewise.
2101 (parse_float, real_yylex): Likewise.
2102 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
2103 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
2104 new_type_id, maybe_label_decls, simple_stmt,
2105 for.init.statement): Likewise.
2106 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
2107 * semantics.c (finish_named_return_value): Likewise.
2108 * parse.c: Regenerate.
2110 2000-02-21 Mark Mitchell <mark@codesourcery.com>
2112 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
2113 (CPTI_CLASS_STAR_TYPE): Remove.
2114 (vtable_index_type): Likewise.
2115 (class_star_type_node): Remove.
2116 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
2117 (build_binary_op_nodefault): Remove.
2118 * call.c (build_new_op): Use build_binary_op instead of
2119 build_binary_op_nodefault.
2120 * decl.c (init_decl_processing): Remove class_star_type_node
2121 initialization. Make delta_type_node ptrdiff_type_node under the
2122 new ABI. Initialize vtable_index_type.
2123 (build_ptrmemfunc_type): Build different structures for the new
2125 (build_enumerator): Use build_binary_op instead of
2126 build_binary_op_nodefault.
2127 * method.c (build_overload_value): Mangle pointers-to-members
2128 appropriately under the new ABI.
2129 * typeck.c (build_array_ref): Use build_binary_op instead of
2130 build_binary_op_nodefault.
2131 (get_member_function_from_ptrfunc): Adjust for the new ABI.
2132 (build_binary_op_nodefault): Rename to ...
2133 (build_binary_op): ... this. Remove old version. Adjust for
2134 pointer-to-member comparisons under the new ABI.
2135 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
2136 (build_ptrmemfunc): Adjust for the new ABI.
2137 (expand_ptrmemfunc_cst): Likewise.
2138 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
2139 (pfn_from_ptrmemfunc): Adjust for the new ABI.
2141 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
2143 * call.c (build_object_call): Compress consecutive calls to
2145 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
2146 (build_op_delete_call): Adjust message formatting.
2148 * class.c (check_bases): Compress consecutive calls to
2150 (finish_struct_anon): Say 'ISO C++'.
2152 * decl.c (start_decl): Same here.
2153 (grok_reference_init): Likewise.
2154 (grokfndecl): Correct message formatting.
2155 (grokfndecl): Improve diagnostic.
2156 (check_static_variable_definition): Likewise. Say 'ISO C++'
2157 (compute_array_index_type): Say 'ISO C++'
2158 (create_array_type_for_decl): Compress consecutive calls to
2160 (grokdeclarator): Say 'ISO C++'
2161 (grok_op_properties): Likewise.
2163 * decl2.c (delete_sanity): Clairify diagnostic.
2164 (check_member_template): Same here.
2165 (grok_function_init): Use consistent terminology.
2167 * expr.c (do_case): Say 'ISO C++'
2169 * friend.c (do_friend): Compress consecutive calls to warning.
2171 2000-02-20 Mark Mitchell <mark@codesourcery.com>
2173 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
2174 * class.c (build_secondary_vtable): Reorganize. Don't create a
2175 new vtable under the new ABI.
2176 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
2178 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
2179 the initializing elements.
2180 (initialize_vtable): New function.
2181 (dfs_finish_vtbls): Use it.
2182 (dfs_accumulate_vtbl_inits): New function.
2183 (finish_vtbls): Merge primary and secondary vtables under the new
2185 (finish_struct_1): Remove redundant call to layout_vtable_decl.
2186 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
2189 * class.c (build_vtable): New function, split out from ...
2190 (get_vtable_decl): ... here, and ...
2191 (build_secondary_vtable): ... here.
2193 * pt.c (tsubst_decl): Fix formatting.
2195 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2197 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
2198 (avoid_overlap, build_base_field): Likewise.
2199 (build_base_field, build_base_fields, is_empty_class):
2200 Test DECL_SIZE with integer_zero.
2201 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
2202 * cp-tree.h (struct lang_type): New field size_unit.
2203 (CLASSTYPE_SIZE_UNIT): New macro.
2204 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
2205 (cp_finish_decl): Delete -Wlarger-than processing.
2206 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
2207 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
2208 * tree.c (make_binfo): binfo vector is one entry longer.
2209 (walk_tree): Walk DECL_SIZE_UNIT.
2211 2000-02-19 Mark Mitchell <mark@codesourcery.com>
2213 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
2215 (build_vtable_entry): Don't assume all vtable entries are
2217 (build_vtbl_initializer): Adjust accordingly.
2218 (get_vtable_decl): Fix formatting.
2220 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
2222 * semantics.c (deferred_type_access_control): Walk the entire
2224 (save_type_access_control): Rename from
2225 initial_deferred_type_access_control. Just remember the value.
2226 (decl_type_access_control): New fn.
2227 (begin_function_definition): Use deferred_type_access_control, after
2228 we've started the function. Set type_lookups to error_mark_node.
2229 * parse.y (frob_specs, fn.def1): Adjust.
2230 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
2231 (parse_end_decl, parse_bitfield0, parse_method): New fns.
2232 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
2233 (after_type_component_declarator0): Likewise.
2234 (after_type_component_declarator): Likewise.
2235 (notype_component_declarator): Likewise.
2236 * cp-tree.h: Adjust.
2238 * decl.c (redeclaration_error_message): Allow redeclaration of
2239 namespace-scope decls.
2241 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
2243 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
2245 2000-02-17 Mark Mitchell <mark@codesourcery.com>
2247 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
2248 * decl2.c (grokclassfn): Likewise.
2250 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
2252 * decl2.c (lang_decode_option): Don't set default message length
2254 * lex.c (lang_init_options): Set it here.
2256 2000-02-16 Mark Mitchell <mark@codesourcery.com>
2258 Make DECL_CONTEXT mean the class in which a member function was
2259 declared, even for a virtual function.
2260 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
2261 (DECL_FRIEND_CONTEXT): New macro.
2262 (DECL_REAL_CONTEXT): Remove.
2263 (SET_DECL_FRIEND_CONTEXT): Likewise.
2264 (DECL_VIRTUAL_CONTEXT): Adjust.
2265 (DECL_CLASS_SCOPE_P): Use TYPE_P.
2266 (add_friends): Remove.
2267 (hack_decl_function_context): Likewise.
2268 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
2270 (build_over_call): Fix indentation. Use DECL_CONTEXT
2271 instead of DECL_CLASS_CONTEXT.
2272 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
2273 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2274 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2275 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
2276 (build_base_field): Likewise.
2277 (finish_struct_1): Likewise.
2278 (build_self_reference): Likewise.
2279 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
2281 (pushtag): Use decl_function_context, not
2282 hack_decl_function_context.
2283 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2284 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
2285 (pushdecl): Remove bogus code.
2286 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
2287 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2288 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2289 Use decl_function_context, nothack_decl_function_context.
2290 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
2291 (grokdeclarator): Likewise. Use decl_function_context, not
2292 hack_decl_function_context.
2293 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
2294 (start_function): Use DECL_FRIEND_CONTEXT, not
2295 DECL_CLASS_CONTEXT. Use decl_function_context, not
2296 hack_decl_function_context.
2297 (finish_function): Use decl_function_context, not
2298 hack_decl_function_context.
2299 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
2301 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
2302 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
2303 (grokfield): Likewise.
2304 (finish_builtin_type): Likewise.
2305 (finish_vtable_vardec): Use decl_function_context, not
2306 hack_decl_function_context.
2307 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2308 (start_static_initialization_or_destruction): Likewise.
2309 (finish_static_initialization_or_destruction): Likewise.
2310 (mark_used): Adjust logic for deciding when to synthesize methods.
2311 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
2313 * error.c (dump_function_decl): Use DECL_CONTEXT, not
2315 * friend.c (is_friend): Likewise.
2316 (add_friends): Remove.
2317 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
2318 * lex.c (begin_definition_of_inclass_inline): Use
2319 decl_function_context, not hack_decl_function_context.
2320 (process_next_inline): Likewise.
2321 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
2322 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
2323 DECL_CLASSS_CONTEXT.
2324 (hack_identifier): Likewise.
2325 (synthesize_method): Use decl_function_context, not
2326 hack_decl_function_context.
2327 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
2329 (is_member_template): Use decl_function_context, not
2330 hack_decl_function_context. Use DECL_CONTEXT, not
2332 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
2334 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
2336 (push_template_decl_real): Likewise.
2337 (instantiate_class_template): Don't call add_friends.
2338 (tsubst_default_argument): Use DECL_CONTEXT, not
2340 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
2341 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2342 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
2344 * repo.c (repo_inline_used): Likewise.
2345 * search.c (current_scope): Adjust for new _CONTEXT macros.
2346 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
2348 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
2349 (lookup_fnfields_here):Likewise.
2350 (check_final_overrider): Likewise.
2351 (init_vbase_pointers): Likewise.
2352 (virtual_context): Likewise.
2353 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
2354 (expand_body): Use decl_function_context, not
2355 hack_decl_function_context.
2356 * tree.c (hack_decl_function_context): Remove.
2357 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
2359 * typeck2.c (error_not_base_type): Likewise.
2361 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
2363 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
2365 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2367 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
2369 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
2371 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
2373 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
2375 * decl2.c (lang_decode_option): Enable automatic line wrapping.
2377 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
2379 * parse.y (frob_specs): Split out...
2380 (parse_decl): From here.
2381 (fn.def2): Call initial_deferred_type_access_control.
2382 (after_type_component_declarator0): Call frob_specs.
2383 (notype_component_declarator0): Likewise.
2384 * search.c (friend_accessible_p): Nested classes are friends of their
2387 2000-02-10 Mark Mitchell <mark@codesourcery.com>
2389 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
2390 used to create an implicit temporary.
2392 * class.c (dfs_modify_vtables): Tweak calculation of functions to
2395 2000-02-08 Nathan Sidwell <nathan@acm.org>
2397 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
2398 strip array element qualifiers too.
2400 2000-02-07 Mark Mitchell <mark@codesourcery.com>
2402 * decl.c (store_parm_decls): Don't build cleanups for parameters
2403 while processing_template_decl.
2405 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
2407 * cp-tree.h (struct saved_scope): Add incomplete field.
2408 (namespace_scope_incomplete): New macro.
2409 * decl.c (pushdecl): Use it.
2410 (hack_incomplete_structures): Use it. See through artificial
2412 (mark_saved_scope): Mark it.
2414 Implement access control for nested types.
2415 * search.c (type_access_control): New fn.
2416 (accessible_p): Now we do perform access control for types.
2417 * semantics.c (deferred_type_access_control): New fn.
2418 (initial_deferred_type_access_control): New fn.
2419 (begin_function_definition): Call it. Add lookups parm.
2420 * decl.c (struct binding_level): Add this_class field.
2421 (pushlevel_class): Set it.
2422 (mark_binding_level): Mark it.
2423 (lookup_name_real): Use it. Call type_access_control.
2424 (mark_saved_scope): Mark lookups field.
2425 * cp-tree.h (flagged_type_tree): Add lookups field.
2426 (struct saved_scope): Add lookups field.
2427 (type_lookups): New macro.
2428 * parse.y (declmods): Now <ftype>.
2429 (parse_decl): Add lookups parm. Call
2430 initial_deferred_type_access_control.
2431 (lang_extdef): Clear type_lookups.
2432 (typed_declspecs, declmods, typespec): Set lookups field.
2433 (initdcl): Call deferred_type_access_control.
2434 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
2435 component_decl_1, named_parm): Adjust.
2436 * friend.c (is_friend): Nested classes are friends of their
2439 * class.c (currently_open_derived_class): New fn.
2440 * method.c (hack_identifier): Use it.
2442 * lex.c (do_identifier): Remove obsolete code.
2444 * parse.y (typed_typespecs): Propagate new_type_flag properly.
2446 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
2448 * tinfo.h: Remove apostrophes from C++ comment (xgettext
2449 thinks this file is plain C).
2451 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2453 * Makefile.in (call.o): Depend on $(EXPR_H).
2455 * call.c: Include "expr.h".
2457 * class.c (dump_class_hierarchy): Add prototype.
2459 * search.c (dfs_get_pure_virtuals): Likewise.
2461 2000-02-1 Ulrich Drepper <drepper@redhat.com>
2463 * parse.y (simple_stmt): Allow :: token in asm parameter list.
2466 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
2468 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
2469 Store it in DECL_FCONTEXT.
2470 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
2472 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
2474 * tinfo.h (old abi): #include "tconfig.h".
2475 * tinfo.cc (convert_to_base): Move into old abi section.
2477 2000-01-31 Mark Mitchell <mark@codesourcery.com>
2479 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
2480 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
2481 (BINFO_PRIMARY_BINFO): New macro.
2482 (BF_DELTA): Rename to ...
2483 (BV_DELTA): ... this.
2484 (BF_VCALL_INDEX): Rename to ...
2485 (BV_VCALL_INDEX): ... this.
2486 (BF_FN): Rename to ...
2488 * class.c (build_vbase_path): Adjust for changes to reverse_path.
2489 (set_rtti_entry): Rename BF_ macros to BV_ variants.
2490 (modify_vtable_entry): Simplify.
2491 (add_virtual_function): Rename BF_ macros to BV_ variants.
2492 (build_vtable_initializer): Likewise.
2493 (get_class_offset_1): Remove.
2494 (dfs_get_class_offset): Likewise.
2495 (get_class_offset): Likewise.
2496 (dfs_find_final_overrider): New function.
2497 (find_final_overrider): Likewise.
2498 (modify_one_vtable): Remove.
2499 (dfs_find_base): New function.
2500 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
2501 find_final_overrider.
2502 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
2504 (dfs_fixup_vtable_deltas): Remove.
2505 (override_one_vtable): Remove.
2506 (merge_overrides): Likewise.
2507 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
2508 unreal chilren of virtual bases.
2509 (finish_struct_1): Don't use merge_overrides. Don't use
2510 dfs_fixup_vtable_deltas.
2511 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
2514 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
2515 Jason Merrill <jason@yorick.cygnus.com>
2517 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
2519 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
2521 * exception.cc (__throw_bad_typeid): Add missing std::.
2523 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2525 * cp-tree.h (make_thunk): PROTO -> PARAMS.
2527 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
2529 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
2531 Runtime support for new-abi rtti.
2532 * inc/typeinfo (type_info::operator!=): Define in class.
2533 (type_info::before, type_info::name, type_info::operator==,
2534 type_info::operator!=): Define new ABI implementations.
2535 (type_info::is_pointer_p, type_info::is_function_p): Declare
2536 new virtual functions.
2537 (type_info::do_catch, type_info::do_upcast): Likewise.
2539 * tinfo.h (__base_class_info): Define new class.
2540 (__class_type_info): Likewise.
2541 (__si_class_type_info): Likewise.
2542 (__vmi_class_type_info): Likewise.
2543 (__dynamic_cast): Prototype.
2545 * tinfo.cc: Conditionalize old and new rtti mechanisms.
2546 (type_info::is_pointer_p): Define new function.
2547 (type_info::is_function_p): Likewise.
2548 (type_info::do_catch): Likewise.
2549 (type_info::do_upcast): Likewise.
2550 (vtable_prefix): New structure for vtable access.
2551 (adjust_pointer): Define new template function.
2552 (contained_p, public_p, virtual_p, contained_public_p,
2553 contained_nonpublic_p, contained_nonvirtual_p): Define new
2555 (nonvirtual_base_type): New local variable.
2556 (__class_type_info::~__class_type_info): Define.
2557 (__si_class_type_info::~__si_class_type_info): Likewise.
2558 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
2559 (__class_type_info::do_catch): Define new function.
2560 (__class_type_info::do_upcast): Likewise.
2561 (__class_type_info::find_public_src): Likewise.
2562 (__class_type_info::do_find_public_src): Likewise.
2563 (__si_class_type_info::do_find_public_src): Likewise.
2564 (__vmi_class_type_info::do_find_public_src): Likewise.
2565 (__class_type_info::do_dyncast): Likewise.
2566 (__si_class_type_info::do_dyncast): Likewise.
2567 (__vmi_class_type_info::do_dyncast): Likewise.
2568 (__class_type_info::do_upcast): Likewise.
2569 (__si_class_type_info::do_upcast): Likewise.
2570 (__vmi_class_type_info::do_upcast): Likewise.
2571 (__dynamic_cast): Likewise.
2573 * tinfo2.cc (__fundamental_type_info): Define new class.
2574 (__pointer_type_info): Likewise.
2575 (__reference_type_info): Likewise.
2576 (__array_type_info): Likewise.
2577 (__function_type_info): Likewise.
2578 (__enum_type_info): Likewise.
2579 (__ptr_to_member_type_info): Likewise.
2580 (__fundamental_type_info::~__fundamental_type_info): Define.
2581 (__pointer_type_info::~__pointer_type_info): Likewise.
2582 (__reference_type_info::~__reference_type_info): Likewise.
2583 (__array_type_info::~__array_type_info): Likewise.
2584 (__function_type_info::~__function_type_info): Likewise.
2585 (__enum_type_info::~__enum_type_info): Likewise.
2586 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
2587 (__pointer_type_info::do_catch): Define new function.
2588 (__ptr_to_member_type_info::do_catch): Define new function.
2590 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
2591 (__is_pointer): Likewise.
2593 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
2595 2000-01-30 Mark Mitchell <mark@codesourcery.com>
2597 * cp/class.c (build_vtable): Rename to build_primary_vtable.
2598 (prepare_fresh_vtable): Rename to build_secondary_vtable.
2599 (make_new_vtable): New function.
2600 (modify_vtable_entry): Handle generation of new vtables correctly.
2601 (modify_one_vtable): Remove unused parameter.
2602 (dfs_fixup_vtable_deltas): Likewise.
2603 (override_one_vtable): Use build_secondary_vtable.
2604 (finish_struct_1): Use build_primary_vtable and
2605 build_secondary_vtable.
2607 2000-01-28 Ulrich Drepper <drepper@redhat.com>
2609 * cp/decl.c: Adjust variable names, comments, help strings.
2611 2000-01-29 Nathan Sidwell <nathan@acm.org>
2613 * new2.cc (operator delete[]): Use operator delete, don't assume
2616 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
2618 * class.c (build_vtbl_initializer): Add argument to
2619 build_vtable_entry call.
2621 2000-01-27 Mark Mitchell <mark@codesourcery.com>
2623 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
2624 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
2625 (BF_DELTA): New macro.
2626 (BF_VCALL_INDEX): Likewise.
2628 (THUNK_VCALL_OFFSET): Likewise.
2629 (make_thunk): Change prototype.
2630 * class.c (build_vtable_entry): Integrate
2631 build_vtable_entry_for_fn. Handle vcall indices.
2632 (build_vtable_entry_for_fn): Remove.
2633 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
2634 BF_VCALL_INDEX, BF_FN.
2635 (modify_vtable_entry): Integrate common code from
2636 modify_one_vtable and dfs_fixup_vtable_deltas.
2637 (add_virtual_function): Set BF_VCALL_INDEX.
2638 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
2640 (modify_one_vtable): Simplify.
2641 (dfs_fixup_vtable_deltas): Likewise.
2642 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
2643 * method.c (make_thunk): Handle vcall indices.
2645 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
2647 Compiler side new abi rtti (not enabled).
2648 * cp-tree.h (new_abi_rtti_p): New macro.
2649 (emit_support_tinfos): Prototype new function.
2650 (tinfo_decl_p): Likewise.
2651 (emit_tinfo_decl): Likwise.
2652 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
2654 (doing_runtime): New local static.
2655 (init_rtti_processing): Add new-abi initializer.
2656 (get_tinfo_decl): Add new-abi logic.
2657 (tinfo_from_decl): Likewise.
2658 (build_dynamic_cast_1): Likewise.
2659 (qualifier_flags): New static function.
2660 (tinfo_base_init): Likewise.
2661 (generic_initializer): Likewise.
2662 (ptr_ref_initializer): Likewise.
2663 (ptmd_initializer): Likewise.
2664 (class_hint_flags): Likewise.
2665 (class_initializer): Likewise.
2666 (synthesize_tinfo_var): Likewise.
2667 (create_real_tinfo_var): Likewise.
2668 (create_pseudo_type_info): Likewise.
2669 (get_vmi_pseudo_type_info): Likewise.
2670 (create_tinfo_types): Likewise.
2671 (emit_support_tinfos): New global function.
2672 (tinfo_decl_p): New global predicate.
2673 (emit_tinfo_decl): New global function.
2674 * class.c (set_rtti_entry): Generalize for old and new rtti.
2675 (build_vtbl_initializer): Likewise.
2676 * decl2.c (finish_file): Likewise.
2678 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
2680 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
2681 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
2683 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
2685 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
2688 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
2690 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
2692 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2694 * optimize.c (calls_setjmp_r): Supply new argument
2695 to special_function_p.
2697 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2699 * call.c: PROTO -> PARAMS.
2700 * class.c: Likewise.
2701 * cp-tree.h: Likewise.
2705 * decl2.c: Likewise.
2707 * errfn.c: Likewise.
2708 * error.c: Likewise.
2709 * except.c: Likewise.
2712 * input.c: Likewise.
2715 * method.c: Likewise.
2716 * optimize.c: Likewise.
2717 * parse.y: Likewise.
2721 * search.c: Likewise.
2722 * semantics.c: Likewise.
2725 * typeck.c: Likewise.
2726 * typeck2.c: Likewise.
2729 2000-01-25 Richard Henderson <rth@cygnus.com>
2731 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
2733 2000-01-25 Mark Mitchell <mark@codesourcery.com>
2735 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
2736 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
2737 (struct vcall_offset_data_s): New type.
2738 (dfs_vcall_offset_queue_p): New function.
2739 (dfs_build_vcall_offset_vtbl_entries): Likewise.
2740 (build_vcall_offset_vtbl_entries): Likewise.
2741 (layout_vtable_decl): Likewise.
2742 (num_vfun_entries): Likewise.
2743 (num_extra_vtbl_entries): Add the entries for vcall offsets.
2744 (build_vtbl_initializer): Likewise.
2745 (dfs_finish_vtabls): Use layout_vtable_decl.
2746 (modify_one_vtables): Always duplicate vtables under the new ABI.
2747 (finish_struct_1): Use layout_vtable_decl.
2749 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2751 * decl.c (member_function_or_else): Change third arg from a format
2752 specifier to an `enum overload_flags'. Callers changed.
2754 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
2756 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
2757 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
2758 build_const_cast, get_delta_difference, check_return_expr): Avoid
2759 ANSI string concatenation usage.
2761 2000-01-24 Mark Mitchell <mark@codesourcery.com>
2763 * class.c (layout_class_type): Put the fields required to make a
2764 class non-empty at the end, not the beginning, of the TYPE_FIELDs
2767 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
2769 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
2772 * decl2.c (mark_used): Do instantiate inlines that have been
2773 explicitly instantiated.
2775 2000-01-24 Richard Henderson <rth@cygnus.com>
2777 * call.c (build_over_call): Use expand_tree_builtin.
2778 * typeck.c (build_function_call_real): Likewise.
2779 (build_binary_op_nodefault): Handle unordered compares.
2781 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2783 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
2784 cp_tree_index values.
2785 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
2786 New global node #defines for them.
2787 * rtti.c (call_void_fn): Replace with ...
2788 (build_runtime_decl): ... new static function.
2789 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
2790 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
2791 (build_dynamic_cast_1): Always produce correctly typed result.
2792 Explicitly produce type_info addresses. Use dynamic_cast_node.
2793 * exception.cc (__throw_bad_cast): Return `void *'.
2794 (__throw_bad_typeid): Return `const type_info &'.
2796 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2798 * cp-tree.h (get_vtable_decl): Prototype new function.
2799 * class.c (get_vtable_decl): New function. Broken out from ...
2800 (build_vtable): ... here. Use it.
2801 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
2804 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
2806 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
2807 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
2808 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
2809 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
2810 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
2811 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
2812 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
2813 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
2814 (CPTI_TINFO_VAR_ID): New enumeration.
2815 (__tp_desc_type_node, __access_mode_type_node,
2816 __bltn_desc_type_node, __user_desc_type_node,
2817 __class_desc_type_node, __ptr_desc_type_node,
2818 __attr_desc_type_node, __func_desc_type_node,
2819 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
2820 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
2821 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
2822 enum_desc_type_node, class_desc_type_node,
2823 si_class_desc_type_node, vmi_class_desc_type_node,
2824 ptmd_desc_type_node, base_desc_type_node): New #defines.
2825 (tinfo_fn_id, tinfo_fn_type): Rename to ...
2826 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
2827 (tinfo_var_id): New enumeration.
2828 (DECL_TINFO_FN_P): Augment comment.
2829 * decl.c (cp_global_trees): Adjust documentation.
2830 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
2831 tinfo_decl_type and tinfo_var_id.
2832 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
2833 (build_typeid): Remove unused variable.
2834 (get_tinfo_var): Use tinfo_var_id.
2835 (tinfo_name): New static function.
2836 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
2837 (tinfo_from_decl): Likewise.
2838 (get_base_offset): New static function, broken out of
2840 (expand_si_desc): Use tinfo_name.
2841 (expand_class_desc): Likewise. Lose local static variable.
2842 Use base_desc_type_node. Use get_base_offset.
2843 (expand_ptr_desc): Use tinfo_name.
2844 (expand_attr_desc): Likewise.
2845 (expand_generic_desc): Likewise.
2847 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
2848 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
2850 2000-01-23 Mark Mitchell <mark@codesourcery.com>
2852 * cp-tree.h (__eprintf): Remove declaration.
2853 * tree.c (__eprintf): Remove definition.
2855 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
2856 Mark Mitchell <mark@codesourcery.com>
2858 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
2859 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
2861 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
2863 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
2865 2000-01-23 Mark Mitchell <mark@codesourcery.com>
2867 * cp-tree.h (register_dtor_fn): New function.
2868 * decl.c (destroy_local_static): Rename to ...
2869 (register_dtor_fn): ... this. Give it external linkage.
2870 (expand_static_init): Use it.
2871 * decl2.c (do_static_initialization): Likewise, if using
2873 (do_static_destruction): Check that __cxa_atexit is not in use.
2874 (finish_file): Don't call do_static_destruction if using
2877 * typeck.c (convert_arguments): Restore two-message error
2880 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
2882 Remap dynamic cast hint values to be consistent across ABIs.
2883 * search.c (dynamic_cast_base_recurse): Remap generated value.
2884 (get_dynamic_cast_base_type): Adjust documentation.
2885 * tinfo.h (__user_type_info::dyncast): Likewise.
2886 (__user_type_info::find_public_subobj): Remap BOFF meaning.
2887 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
2888 (__class_type_info::do_dyncast): Likewise.
2889 (__class_type_info::do_find_public_subobj): Likewise.
2890 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
2892 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
2894 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
2896 * typeck2.c (incomplete_type_error): Restore previous
2897 cp_error and cp_error_at call sequence.
2899 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
2901 * class.c (dump_class_hierarchy): Make format agree with argument;
2902 cast pointer to unsigned long and print with %lx.
2904 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
2906 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
2908 * typeck.c (composite_pointer_type, common_type,
2909 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
2910 build_function_call_real, convert_arguments,
2911 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
2912 build_unary_op, mark_addressable, build_compound_expr,
2913 build_static_cast, build_reinterpret_cast, build_const_cast,
2914 build_c_cast, build_modify_expr, get_delta_difference,
2915 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
2916 'ISO C++'. Fusion consecutive calls to diagnotic message routines
2918 * typeck2.c (readonly_error, abstract_virtuals_error,
2919 process_init_constructor, check_for_new_type): Likewise.
2921 2000-01-19 Mark Mitchell <mark@codesourcery.com>
2923 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
2926 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
2928 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
2929 (build_x_typeid): Likewise.
2930 (get_tinfo_fn): Likewise.
2931 (get_tinfo_fn_unused): Rename to ...
2932 (get_tinfo_decl): ... here.
2933 * rtti.c (build_headof): Replace logic error with assertion.
2934 (get_tinfo_fn_dynamic): Rename to ...
2935 (get_tinfo_decl_dynamic): ... here. Make static. Use
2936 complete_type_or_else.
2937 (build_x_typeid): Move into ...
2938 (build_typeid): ... here. Adjust call to
2939 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
2940 throw_bad_typeid expression.
2941 (get_tinfo_fn_unused): Rename to ...
2942 (get_tinfo_decl): ... here. Adjust comment.
2943 (get_tinfo_fn): Delete.
2944 (tinfo_from_decl): New static function.
2945 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
2946 (get_typeid): Use complete_type_or_else.
2947 (build_dynamic_cast_1): Adjust calls to
2948 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
2949 * parse.y (primary): Adjust call to build_typeid.
2950 * except.c (build_eh_type_type_ref): Adjust call to
2951 get_tinfo_decl. Mark as used.
2952 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
2953 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
2954 * parse.c: Regenerated.
2956 2000-01-17 Mark Mitchell <mark@codesourcery.com>
2958 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
2960 (resolves_to_fixed_type_p): Document calling convention.
2961 * rtti.c (build_x_typeid): Initialize NONNULL.
2963 * cp-tree.h (build_shared_int_cst): New function.
2964 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
2965 * class.c (modify_vtable_entry): Likewise.
2966 (add_virtual_function): Split out code to generated shared
2967 INTEGER_CSTs to build_share_int_cst.
2968 (modify_all_vtables): Handle all the overridden functions here.
2969 Add overridden functions from non-primary virtual bases to the
2971 (finish_struct_1): Adjust call to modify_all_vtables. Add
2972 overridden functions from non-primary bases to the vtable.
2973 * tree.c (build_shared_int_cst): New function.
2975 * cp-tree.h (scratchalloc): Remove.
2976 (build_scratch_list): Likewise.
2977 * call.c (convert_class_to_reference): Replace build_scratch_list
2978 and build_expr_list with build_tree_list.
2979 (add_candidate): Replace scratchalloc with expralloc. Note memory
2981 (build_user_type_conversion_1): Replace build_scratch_list
2982 and build_expr_list with build_tree_list.
2983 (build_new_op): Likewise.
2984 (build_op_delete_call): Likewise.
2985 (convert_like): Likewise.
2986 * cvt.c (ocp_convert): Likewise.
2987 * decl.c (start_decl): Likewise.
2988 (start_function): Likewise.
2989 (finish_destructor_body): Likewise.
2990 (maybe_build_cleanup_1): Likewise.
2991 * decl2.c (reparse_decl_as_expr): Likewise.
2992 * init.c (perform_member_init): Likewise.
2993 (expand_cleanup_for_base): Likewise.
2994 (build_builtin_delete_call): Likewise.
2995 (build_new_1): Likewise.
2996 (build_delete): Likewise.
2997 * method.c (do_build_assign_ref): Likewise.
2998 * parse.y (already_scoped_stmt): Likewise.
2999 (nontrivial_exprlist): Likewise.
3000 (net_initializer): Likewise.
3001 (initlist): Likewise.
3002 * parse.c: Regenerated.
3003 * rtti.c (build_x_typeid): Likewise.
3004 (build_dynamic_cast_1): Likewise.
3005 * typeck.c (build_x_compound_expr): Likewise.
3006 (build_static_cast): Likewise.
3007 (build_modify_expr): Likewise.
3009 * cp-tree.h (DECL_VINDEX): Add documentation.
3010 * class.c (build_vtable_entry): Likewise.
3011 (start_vtable): Add comment.
3012 (add_virtual_function): Replace pending_hard_virtuals with
3013 overridden_virtuals and pending_virtuals with new_virtuals.
3014 Replace redundant assignments with assertions.
3015 (check_for_override): Add comment.
3016 (check_bases_and_members): Replace pending_hard_virtuals with
3017 overridden_virtuals and pending_virtuals with new_virtuals.
3018 (create_vtbl_ptr): Likewise.
3019 (layout_class_type): Likewise.
3020 (finish_struct_1): Likewise. Add comments.
3022 2000-01-16 Mark Mitchell <mark@codesourcery.com>
3024 * class.c (finish_struct_1): Replace redundant code with
3027 * cp-tree.h (flag_new_abi): Move.
3028 (flag_use_cxa_atexit): Likewise.
3029 (flag_honor_std): Likewise.
3030 (flag_rtti): Likewise.
3031 (vbase_offsets_in_vtable_p): Define.
3032 (vptrs_present_everywhere_p): Likewise.
3033 (TYPE_CONTAINS_VPTR_P): Likewise.
3034 (dfs_walk_real): Declare.
3035 * class.c (build_vbase_pointer_fields): Check
3036 vbase_offsets_in_vtable_p.
3037 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
3039 (build_vbase_offset_vtbl_entries): Simplify.
3040 (build_vbase_offset_vtbl_entries): Adjust.
3041 (build_vbase_pointer): Add ability to look up vbase offsets in
3043 (start_vtable): New function.
3044 (add_virtual_function): Use it.
3045 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
3046 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
3047 (build_vtbl_initializer): Take the type of the complete object as
3048 input. Use it to correctly calculate vbase offsets.
3049 (dfs_finish_vtbls): Pass the complete type to
3050 build_vtbl_initializer.
3051 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
3052 (create_vtable_ptr): Create a vtable even if there are no
3053 new virtual functions, under the new ABI.
3054 (finish_struct_1): Likewise.
3055 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
3056 * decl.c (exapnd_static_init): Remove call to
3057 preserve_initializer.
3058 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
3060 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
3061 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
3062 (construct_virtual_bases): Don't initialize virtual base pointers
3064 (build_aggr_init): Clean up comment.
3065 (expand_aggr_init_1): Likewise.
3066 * rtti.c (expand_class_desc): Store the virtual function table
3067 index where the vbase offset lives in the offset field.
3068 * search.c (dfs_walk_real): Make it global.
3069 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
3070 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
3072 * tinfo.h (USItype): Make it signed under the new ABI.
3073 * tinfo.cc (convert_to_base): New function. Encapsulate base
3074 conversion logic here.
3075 (__class_type_info::do_upcast): Use it.
3076 (__class_type_info::do_dyncast): Likewise.
3077 (__class_type_info::do_find_public_subobj): Likewise.
3079 * init.c (construct_virtual_bases): Don't look up the addresses of
3080 virtual bases at run-time.
3082 * class.c (build_vbase_pointer): Relocate.
3083 (build_vbase_pointer_fields): Likewise.
3084 (dfs_build_vbase_offset_vtbl_entries): Likewise.
3085 (build_vbase_offset_vtbl_entries): Likewise.
3087 * decl.c (init_decl_processing): Complain if -fnew-abi
3088 -fno-vtable-thunks is used.
3090 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
3093 2000-01-15 Mark Mitchell <mark@codesourcery.com>
3095 * cp-tree.h (num_extra_vtbl_entries): New function.
3096 (size_extra_vtbl_entries): Likewise.
3097 (dfs_vtable_path_unmark): Likewise.
3098 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
3099 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3100 * class.c (num_extra_vtbl_entries): New function.
3101 (size_extra_vtbl_entries): Likewise.
3102 (dfs_build_vbase_offset_vtbl_entries): New function.
3103 (build_vbase_offset_vtbl_entries): Likewise.
3104 (build_vtbl_initializer): Use it.
3105 (finish_struct_1): Adjust vtable sizes (using
3106 num_extra_vtbl_entries).
3107 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
3108 THUNK_DECL is non-NULL before expanding it.
3109 * init.c (expand_virtual_init): Adjust the vtable pointer by
3110 size_extra_vtbl_entries before storing it.
3111 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
3112 Handle TREE_LIST parameters here, not in the dfs_* functions.
3113 (dfs_unmarked_real_bases_queue_p): Adjust.
3114 (dfs_marked_real_bases_queue_p): Likewise.
3115 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
3116 (dfs_vtable_path_marked_real_bases_queue_p): New function.
3117 (dfs_vtable_path_unmark): Likewise.
3119 2000-01-14 Mark Mitchell <mark@codesourcery.com>
3121 * optimize.c (copy_body_r): Clear the operand three of a
3122 TARGET_EXPR when copying it.
3124 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3126 * method.c (build_decl_overload_real): Check whether we are in ::
3127 before returning __builtin_new/delete.
3129 2000-01-13 Mark Mitchell <mark@codesourcery.com>
3131 * pt.c (tsubst_friend_function): Improve comment.
3132 (instantiate_decl): Avoid crashing when a "nested" function is
3133 instantiated from the top level.
3135 * dump.c (dqeueue_and_dump): Dump
3136 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
3138 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3140 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
3142 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
3144 * g++spec.c (lang_specific_driver): Add -fnew-abi if
3145 ENABLE_NEW_GXX_ABI defined.
3146 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
3147 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
3148 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
3150 2000-01-12 Mark Mitchell <mark@codesourcery.com>
3152 * decl.c (start_cleanup_fn): Call pushdecl.
3154 * call.c (convert_class_to_reference): Fix typos.
3155 (build_conditional_expr): Handle errors gracefully.
3156 * class.c (push_nested_class): Likewise.
3157 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
3158 (DECL_THIS_EXTERN): Use it.
3159 (DECL_THIS_STATIC): Likewise.
3160 * cvt.c (convert_to_void): Handle errors gracefully.
3161 (build_expr_type_conversion): Likewise.
3162 * decl.c (maybe_push_decl): Likewise.
3163 (start_decl_1): Likewise.
3164 (require_complete_types_for_parms): Likewise.
3165 * parse.y (structsp): Likewise.
3166 (base_class): Likewise.
3167 * parse.c: Regenerated.
3168 * pt.c (finish_member_template_decl): Likewise.
3169 * typeck.c (decay_conversion): Likewise.
3171 * cp-tree.h (dfs_skip_vbases): New function.
3172 (find_vbase_instance): Likewise.
3173 * class.c (determine_primary_base): Allow a nearly empty base to
3174 serve as a primary base class under the new ABI.
3175 (get_class_offset_1): Rename to ...
3176 (dfs_get_class_offset): ... this. Simplify. Don't issue error
3178 (get_class_offset): Use it. Issue error messages here.
3179 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
3180 find the right copies of virtual bases.
3181 (fixup_vtable_deltas1): Rename to ...
3182 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
3183 bases as primary bases.
3184 (fixup_vtable_deltas): Remove.
3185 (override_one_vtable): Handle virtual bases as primary bases.
3186 (merge_overrides): Likewise.
3187 (finish_struct_1): Likewise.
3188 (dump_class_hierarchy): Dump primary-ness of bases as well.
3189 * search.c (mark_primary_bases): Use a pre-order traversal to
3190 handle primary virtual bases.
3191 (dfs_skip_vbases): New fiunction.
3192 (expand_upcast_fixups): Adjust to handle primary virtual bases.
3193 (fixup_virtual_upcast_offsets): Likewise.
3194 (fixup_all_virtual_upcast_offsets): Likewise.
3195 (dfs_find_vbase_instances): New function.
3196 (find_vbase_instance): Likewise.
3198 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
3200 * lex.c (DIR_SEPARATOR): Delete macro.
3202 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
3204 * decl2.c (lang_decode_option): Handle automatic line wrapping
3207 2000-01-11 Mark Mitchell <mark@codesourcery.com>
3209 * friend.c (do_friend): Don't resolve scopes when processing
3210 template declarations, even if the qualifying scope doesn't
3211 involve template parameters.
3213 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
3215 * class.c (dfs_modify_vtables_queue_p): Remove.
3216 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
3217 and dfs_marked_real_bases_queue_p instead of
3218 dfs_modify_vtables_queue_p.
3220 * class.c (build_vbase_path): Simplify.
3221 (dfs_propagate_binfo_offsets): New function.
3222 (propagate_binfo_offsets): Use it.
3223 (remove_base_field): Simplify.
3224 (dfs_set_offset_for_vbases): Remove.
3225 (dfs_set_offset_for_shared_vbases): New function.
3226 (dfs_set_offset_for_unshared_vbases): Likewise.
3227 (layout_virtual_bases): Use them.
3228 (layout_basetypes): Don't call propagate_binfo_offsets.
3229 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
3232 * class.c (build_base_field): New function, split out from ...
3233 (build_base_fields): ... here. Use it. Allocate primary bases
3234 first, under the new ABI.
3235 (get_vtable_entry): Remove.
3236 (remove_base_field): New function, split out from ...
3237 (remove_base_fields): ... here. Adjust since primary bases come
3238 first under the new ABI.
3240 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
3241 (initialize_vtbl_ptrs): New function.
3242 (expand_indirect_vtbls_init): Change prototype.
3243 (convert_pointer_to_vbase): Declare.
3244 * init.c (expand_direct_vtbls_init): Remove.
3245 (dfs_initialize_vtbl_ptrs): New function.
3246 (initialize_vtbl_ptrs): Likewise.
3247 (emit_base_init): Use initialize_vtbl_ptrs.
3248 * search.c (convert_pointer_to_vbase): Make it global.
3249 (expand_indirect_vtbls_init): Remove vtable initialization code.
3250 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
3252 * class.c (dfs_finish_vtbls): New function.
3253 (finish_vtbls): Use it.
3254 (dump_class_hierarchy): New function.
3256 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
3257 (BINFO_VBASE_PRIMARY_P): New macro.
3258 (BINFO_VIRTUALS): Add to documentation.
3259 (SET_BINFO_PRIMARY_MARKED_P): Remove.
3260 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3261 (dfs_mark_primary_bases_queue_p): Likewise.
3262 (dfs_unmarked_real_bases_queue_p): New function.
3263 (dfs_marked_real_bases_queue_p): Likewise.
3264 * search.c (dfs_mark_primary_bases): Adjust.
3265 (mark_primary_bases): Likewise.
3266 (get_shared_vbase_if_not_primary): New function.
3267 (dfs_unmarked_real_bases_queue_p): Likewise.
3268 (dfs_marked_real_bases_queue_p): Likewise.
3269 (dfs_get_pure_virtuals): Simplify.
3270 (get_pure_virtuals): Likewise.
3272 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3274 * lex.c: Include tm_p.h.
3276 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
3278 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
3280 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
3282 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
3283 * pt.c (instantiate_decl): Defer comdat templates that might not be
3286 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
3287 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
3288 (finish_file): Likewise.
3290 * decl2.c (import_export_class): Undo 12/14 change.
3292 * error.c (dump_decl): operator new, not operatornew.
3294 * class.c (field_decl_cmp): A nontype is "greater" than a type.
3295 * search.c (lookup_field_1): Look for the last field with the
3298 2000-01-05 Nathan Sidwell <nathan@acm.org>
3300 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
3303 2000-01-05 Nathan Sidwell <nathan@acm.org>
3305 * typeck.c (build_static_cast): Don't strip target qualifiers
3306 when casting from a class.
3308 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3310 * class.c (warn_hidden): Initialize variable `fndecl'.
3312 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
3314 * decl.c (flag_isoc9x): New variable to be able to use code in
3315 c-common.c. For now always zero.
3317 2000-01-03 Mark Mitchell <mark@codesourcery.com>
3319 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3320 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
3321 or unshare_base_binfos for virtual bases here.
3322 * search.c (dfs_get_vbase_types): Do it here.
3323 (get_vbase_types): Adjust.
3325 2000-01-02 Mark Mitchell <mark@codesourcery.com>
3327 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
3328 (BINFO_PRIMARY_MARKED_P): Use flag 5.
3329 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3330 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3331 (unmark_primary_bases): Remove declaration.
3332 (unmarkedp): Declare.
3333 (dfs_vbase_unmark): Likewise.
3334 * class.c (determine_primary_base): Return immediately if there
3335 are no base classes. Call mark_primary_bases here.
3336 (modify_all_direct_vtables): Remove.
3337 (modify_all_indirect_vtables): Remove.
3338 (dfs_modify_vtables_queue_p): New function.
3339 (dfs_modify_vtables): New function.
3340 (modify_all_vtables): Use them.
3341 (build_base_fields): Build FIELD_DECLs for primary virtual base
3343 (create_vtable_ptr): Don't call determine_primary_base here.
3344 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
3345 (dfs_set_offset_for_vbases): ... this.
3346 (layout_virtual_bases): Use it.
3347 (layout_class_type): Call determine_primary_base here.
3348 * search.c (unmarkedp): Make it global.
3349 (shared_marked_p): Simplify.
3350 (shared_unmarked_p): Likewise.
3351 (dfs_primary_bases_queue_p): Remove.
3352 (dfs_unmark_primary_bases): Likewise.
3353 (unmark_primary_bases): Likewise.
3354 (mark_primary_bases): Simplify.
3355 (get_pure_virtuals): Don't call mark_primary_bases here.
3356 (dfs_vbase_unmark): New function.
3357 (get_vbase_types): Simplify.
3359 * class.c (struct base_info): Remove.
3360 (determine_primary_base): Take has_virtual_p rather than a
3361 base_info as input. Don't calculate max_has_virtual.
3362 (finish_struct_bits): Remove max_has_virtual argument.
3363 (create_vtable_ptr): Remove max_has_virtual_p argument.
3364 (layout_virtual_bases): Remove max argument.
3365 (layout_basetypes): Likewise.
3366 (layout_class_type): Remove max_has_virtual_p argument.
3367 (finish_struct_1): Remove max_has_virtual.
3369 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
3370 (layout_basetypes): Remove.
3371 * class.c (propagate_binfo_offsets): Moved here from tree.c.
3372 Update to handle primary virtual bases.
3373 (remove_base_fields): New function, split out from
3375 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
3376 (layout_virtual_bases): New function, split out from
3377 layout_basetypes. Update to handle primary virtual bases.
3378 (layout_basetypes): Moved here from tree.c. Use
3379 remove_base_fields and layout_virtual_bases.
3380 * search.c (dfs_mark_primary_bases_queue_p): New function.
3381 (mark_primary_bases): Use it.
3382 * tree.c (CEIL): Remove.
3383 (propagate_binfo_offsets): Remove.
3384 (layout_basetypes): Remove.
3386 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3388 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
3389 (BINFO_PRIMARY_MARKED_P): New macro.
3390 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
3391 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
3392 (mark_primary_bases): New function.
3393 (unmark_primary_bases): Likewise.
3394 * search.c (get_abstract_virtuals_1): Remove.
3395 (dfs_mark_primary_bases): New function.
3396 (mark_primary_bases): Likewise.
3397 (dfs_unmark_primary_bases): Likewise.
3398 (unmark_primary_bases): Likewise.
3399 (dfs_get_pure_virtuals): Likewise.
3401 2000-01-01 Mark Mitchell <mark@codesourcery.com>
3403 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
3404 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
3405 (modify_one_vtable): Adjust.
3406 (fixup_vtable_deltas1): Likewise.
3407 (override_one_vtable): Likewise.
3408 * search.c (get_abstract_virtuals_1): Likewise.
3409 (get_pure_virtuals): Likewise.
3410 (expand_upcast_fixups): Likewise.
3411 * tree.c (debug_binfo): Likewise.
3413 * class.c (build_vtable): Don't return a value. Don't rebuild
3414 vtables for bases that have already been handled.
3415 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
3416 already been handled.
3417 (modify_one_vtable): Adjust accordingly.
3418 (fixup_vtable_deltas1): Likewise.
3419 (finish_struct_1): Likewise.
3421 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3423 * call.c (build_new_method_call): Also check destructors.
3425 1999-12-31 Mark Mitchell <mark@codesourcery.com>
3427 * cp-tree.h (VF_NORMAL_VALUE): Remove.
3428 * class.c (struct base_info): Remove vfield, vfields, and rtti.
3429 (set_primary_base): New function, split out from ...
3430 (finish_base_struct): ... here. Rename to ...
3431 (determine_primary_base): ... this. Simplify.
3432 (create_vtable_ptr): Tweak accordingly.
3433 (finish_struct_1): Simplify.
3435 * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
3436 (CLASSTYPE_N_BASECLASSES): Likewise.
3437 (BINFO_FOR_VBASE): New macro.
3438 (get_vbase_types): Change prototype.
3439 * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
3440 (prepare_fresh_vtable): Likewise.
3441 (finish_vtbls): Likewise.
3442 (get_class_offset_1): Likewise.
3443 (modify_all_indirect_vtables): Likewise.
3444 (build_vbase_pointer_fields): Likewise.
3445 * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
3446 * init.c (sort_base_init): Use BINFO_FOR_VBASE.
3447 (expand_member_init): Likewise.
3448 * search.c (get_base_distance): Likewise.
3449 (lookup_field_queue_p): Likewise.
3450 (virtual_context): Likewise.
3451 (get_vbase_types): Don't return a value. Set
3452 CLASSTYPE_VBASECLASSES here.
3453 * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
3455 1999-12-30 Mark Mitchell <mark@codesourcery.com>
3457 * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
3459 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3461 * class.c (create_vtable_ptr): Put the vtable at the beginning of
3462 the class, not the end, in the new ABI.
3463 * tree.c (propagate_binfo_offsets): Do the right thing for the new
3466 1999-12-29 Mark Mitchell <mark@codesourcery.com>
3468 * cp-tree.h (lang_type): Add nearly_empty_p. Adjust dummy.
3469 (CLASSTYPE_NEARLY_EMPTY_P): New macro.
3470 * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
3471 (check_field_decls): Likewise.
3472 (check_bases_and_members): Likewise.
3474 1999-12-28 Mark Mitchell <mark@codesourcery.com>
3476 * cp-tree.h (do_inline_function_hair): Remove.
3477 * class.c (layout_class_type): New function, split out from
3479 (fixup_pending_inline): Likewise.
3480 (fixup_inline_methods): New function.
3481 * method.c (fixup_pending_inline): Remove.
3482 (do_inline_function_hair): Likewise.
3484 * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
3487 * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
3488 (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
3489 (CLASSTYPE_PURE_VIRTUALS): ... this.
3490 (lang_decl_flags): Replace abstract_virtual with pure_virtual.
3491 (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
3492 (DECL_PURE_VIRTUAL_P): ... this.
3493 (get_abstract_virtuals): Rename to ...
3494 (get_pure_virtuals): ... this.
3495 * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
3496 DECL_ABSTRACT_VIRTUAL_P. Replace CLASSTYPE_ABSTRACT_VIRTUALS with
3497 CLASSTYPE_PURE_VIRTUALS.
3498 * class.c (build_vtable_entry): Likewise.
3499 (finish_struct_bits): Likewise. Call get_pure_virtuals, not
3500 get_abstract_virtuals.
3501 (build_vtbl_initializer): Likewise.
3502 (override_one_vtable): Likewise.
3503 (check_methods): Likewise.
3504 * decl.c (duplicate_decls): Likewise.
3505 (redeclaration_error_message): Likewise.
3506 (lang_mark_tree): Likewise.
3507 * decl2.c (grok_function_init): Likewise.
3508 (import_export_vtable): Likewise.
3509 (import_expor_class): Likewise.
3510 * typeck2.c (abstract_virtuals_error): Likewise.
3511 * xref.c (GNU_xref_member): Likewise.
3512 * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
3514 1999-12-26 Zack Weinberg <zack@wolery.cumb.org>
3516 * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
3519 1999-12-26 Mark Mitchell <mark@codesourcery.com>
3521 * decl.c (store_return_init): Use mode of old RTL generated for
3522 DECL_RESULT, not the mode of DECL_RESULT itself.
3523 * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
3524 for functions that used named return values.
3526 1999-12-24 Mark Mitchell <mark@codesourcery.com>
3528 * semantics.c (expand_body): Use
3529 note_deferral_of_defined_inline_function.
3531 1999-12-22 Mark Mitchell <mark@codesourcery.com>
3533 * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
3535 1999-12-22 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
3537 * error.c (dump_decl): Support named return values.
3539 1999-12-20 Mark Mitchell <mark@codesourcery.com>
3541 * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
3542 (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
3543 (CLASSTYPE_PRIMARY_BINFO): Likewise.
3544 * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
3545 TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
3546 (check_bases_and_members): Set them here instead.
3547 (create_vtable_ptr): New function, split out from ...
3548 (finish_struct_1): ... here. Use it. Tidy. Use
3549 CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
3550 * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
3551 the first field in the class.
3552 * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES. Handle
3553 seeing TYPE_VFIELD as the first field in the class.
3555 * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
3556 (TYPE_POLYMORPHIC_P): ... this.
3557 (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
3558 (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
3559 (TREE_CALLS_NEW): Remove.
3560 (TREE_MANGLED): Likewise.
3561 * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
3562 and TYPE_POLYMORPHIC_P.
3563 * class.c (check_bases): Likewise.
3564 (finish_base_struct): Likewise.
3565 (finish_struct_bits): Likewise.
3566 (check_for_override): Likewise.
3567 (finish_struct_1): Likewise.
3568 (get_vfield_name): Likewise.
3569 * decl.c (xref_basetypes): Likewise.
3570 * decl2.c (import_export_class): Likewise.
3571 (import_export_decl): Likewise.
3572 * error.c (dump_function_decl): Likewise.
3573 * pt.c (instantiate_class_template): Likewise.
3574 * repo.c (repo_inline_used): Likewise.
3575 * rtti.c (build_headof): Likewise.
3576 (get_tinfo_fn_dynamic): Likewise.
3577 (build_x_typeid): Likewise.
3578 (get_tinfo_var): Likewise.
3579 (build_dynamic_cast_1): Likewise.
3580 (synthesize_tinfo_fn): Likewise.
3581 * search.c (lookup_field_1): Likewise.
3582 (dfs_debug_mark): Likewise.
3583 (maybe_suppress_debug_info): Likewise.
3584 * typeck.c (build_component_ref): Likewise.
3585 (build_component_addr): Likewise.
3586 * typeck2.c (process_init_constructor): Likewise.
3588 1999-12-20 Nathan Sidwell <nathan@acm.org>
3590 * typeck.c (strip_all_pointer_quals): New static function.
3591 (build_static_cast): Use it. Don't use at_least_as_qualified_p.
3593 1999-12-16 Mark Mitchell <mark@codesourcery.com>
3595 * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
3596 (dso_handle_node): New macro.
3597 (flag_use_cxa_atexit): New variable.
3598 (declare_global_var): New function.
3599 (start_anon_func): Remove declaration.
3600 (end_anon_func): Likewise.
3601 * decl.c (get_atexit_node): New function, split out from
3602 destroy_local_static. Handle flag_use_cxa_atexit.
3603 (get_dso_handle_node): Likewise.
3604 (start_cleanup_fn): Renamed from start_anon_func. Moved here from
3605 except.c. Handle flag_use_cxa_atexit.
3606 (end_cleanup_fn): Renamed from end_anon_func. Moved here from
3608 (declare_global_var): New variable.
3609 (destroy_local_static): Handle flag_use_cxa_atexit.
3610 * decl2.c (flag_use_cxa_atexit): New variable.
3611 (lang_f_options): Likewise.
3612 * except.c (start_anon_func): Remove.
3613 (end_anon_func): Liekwise.
3614 * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
3615 * rtti.c (get_tinfo_var): Use declare_global_var.
3617 1999-12-16 Mark Mitchell <mark@codesourcery.com>
3619 * class.c (check_field_decls): Don't return a value.
3620 (avoid_overlap): Moved here from tree.c.
3621 (build_base_fields): Likewise.
3622 (check_bases): New function, split out from finish_base_struct.
3623 (check_bases_and_members): New function, split out from
3625 (struct base_info): Remove cant_have_default_ctor,
3626 cant_have_const_ctor, cant_have_asn_ref.
3627 (finish_base_struct): Split semantic analysis into check_bases.
3628 (finish_struct_methods): Fix bogus assertion.
3629 (check_field_decls): Call finish_struct_anon here.
3630 (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
3631 (finish_struct_1): Use check_bases_and_members. Reorganize.
3632 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
3633 (build_base_fields): Don't declare.
3634 * tree.c (avoid_overlap): Remove.
3635 (build_base_fields): Likewise.
3637 * optimize.c (struct inline_data): Remove scope_stmt.
3638 (remap_block): Don't use insert_block_after_note. Don't update
3640 (expand_call_inline): Don't update scope_stmt.
3641 (optimize_function): Don't initialize scope_stmt.
3642 * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
3643 NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
3645 1999-12-15 Mark Mitchell <mark@codesourcery.com>
3647 * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
3648 out of the class, rather than taking them as parameters.
3649 (build_vbase_pointer_fields): Move here from tree.c.
3650 (build_vtbl_or_vbase_field): New function.
3651 (check_methods): Likewise.
3652 (remove_zero_width_bitfields): Likewise.
3653 (add_virtual_function): Use tree_cons instead of temp_tree_cons.
3654 (delete_duplicate_fields_1): Tidy. Don't delete duplicate
3656 (finish_struct_methods): Handle the case where there are no
3658 (get_basefndecls): Use tree_cons instead of temp_tree_cons.
3659 (check_field_decls): Call delete_duplicate_fields here.
3660 (finish_struct_1): Tidy. Use check_methods and
3661 remove_zero_width_bitfields.
3662 * cp-tree.h (build_vbase_pointer_fields): Remove.
3663 * decl.c (grokdeclarator): Use tree_cons instead of
3665 * decl2.c (qualified_lookup_using_namespace): Use tree_cons
3666 instead of temp_tree_cons.
3667 * lex.c (cons_up_default_function): Remove dead code.
3668 * method.c (fixup_pending_inline): New function, split out from ...
3669 (do_inline_function_hair): ... here.
3670 * tree.c (build_vbase_pointer_fields): Remove.
3672 1999-12-15 Jason Merrill <jason@casey.cygnus.com>
3674 * tree.c (walk_tree): Walk operand subtrees in forward order.
3675 * optimize.c (expand_call_inline): Likewise.
3676 (optimize_function): Initialize id->scope_stmt to something useful.
3677 (remap_block): Assume id->scope_stmt has a useful value.
3679 1999-12-15 Nathan Sidwell <nathan@acm.org>
3681 * typeck.c (build_c_cast): Expand warning message. Move pointer
3682 alignment warning to after the cast. Don't warn about pointer
3683 alignment when given a pointer to incomplete.
3685 1999-12-15 Richard Henderson <rth@cygnus.com>
3687 * cp-tree.h (make_aggr_type): Declare.
3688 * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
3689 (make_aggr_type): New.
3691 * decl.c (build_typename_type, init_decl_processing): Use it.
3692 (build_ptrmemfunc_type, xref_tag): Likewise.
3693 * except.c (call_eh_info): Likewise.
3694 * init.c (init_init_processing): Likewise.
3695 * pt.c (process_template_parm, lookup_template_class): Likewise.
3696 * rtti.c (expand_class_desc): Likewise.
3697 * semantics.c (begin_class_definition, finish_typeof): Likewise.
3698 * tree.c (copy_template_template_parm): Likewise.
3700 1999-12-15 Jason Merrill <jason@yorick.cygnus.com>
3702 * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
3703 sizeof (struct tree_common).
3705 1999-12-14 Jason Merrill <jason@casey.cygnus.com>
3707 * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
3708 outermost block to point to the inlined function decl.
3710 * error.c (dump_decl): operator==, not operator ==.
3711 (op_to_string): Likewise.
3713 * decl.c (compute_array_index_type): Handle null name.
3715 * decl2.c (ambiguous_decl): Fix to match comment.
3716 (lookup_using_namespace): Adjust.
3718 * decl2.c (import_export_class): Don't ignore dllimport.
3720 1999-12-14 Mark Mitchell <mark@codesourcery.com>
3722 * class.c (check_field_decls): Split out from ...
3723 (finish_struct_1): ... here. Use it. Tidy.
3725 * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
3726 * optimize.c (copy_body_r): Pass it.
3727 * tree.c (remap_save_expr): Clear walk_subtrees for an
3728 already-handled SAVE_EXPR.
3729 (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
3731 * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
3732 * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
3734 * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
3736 1999-12-14 Mumit Khan <khan@xraylith.wisc.edu>
3738 * class.c (finish_base_struct): Allow multiple COM base classes
3739 as well as non-COM bases as long as it's not the leftmost.
3741 1999-12-13 Mumit Khan <khan@xraylith.wisc.edu>
3743 * lex.c (saving_parse_to_obstack): New global.
3744 (reinit_parse_for_block): Use.
3745 (reinit_parse_for_expr): Use.
3746 (check_newline): Use.
3748 1999-12-13 Mark Mitchell <mark@codesourcery.com>
3750 * optimize.c (initialize_inlined_parameters): Take FN to which the
3751 parameters belong as an argument.
3752 (expand_call_inline): Expand calls into the parameter
3753 initializations before pushing the function onto the list of
3754 functions we are presently expanding.
3756 1999-12-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3758 * class.c (get_vtable_name): Use a literal format string and
3759 VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
3760 (prepare_fresh_vtable): Likewise.
3762 * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
3765 * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
3767 * init.c (build_vec_init): Initialize variable `try_body'.
3769 * lex.c (yyerror): Don't call a variadic function with a
3770 non-literal format string.
3772 * optimize.c (optimize_function): Call memset, not bzero.
3774 * pt.c (for_each_template_parm_r): Add static prototype.
3776 1999-12-09 Andreas Jaeger <aj@suse.de>
3778 * except.c (expand_throw): Add static attribute to match
3781 * Makefile.in (semantics.o): Add dependency on output.h.
3782 * semantics.c: Include output.h for declaration of
3785 1999-12-09 Mark Mitchell <mark@codesourcery.com>
3787 * decl.c (init_decl_processing): Reenable inlining on trees.
3788 (finish_function): Likewise.
3789 * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
3790 * semantics.c (simplify_aggr_init_exprs): New function.
3791 (expand_body): Use it.
3792 * tree.c (walk_tree): Special-case TARGET_EXPRs since they
3793 sometimes present the same sub-tree twice.
3795 * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
3798 * semantics.c (finish_switch_cond): Do conversions here, not ...
3799 * typeck.c (c_expand_start_case): Here.
3801 * semantics.c (do_poplevel): Remove unused variable.
3803 1999-12-06 Mark Mitchell <mark@codesourcery.com>
3805 * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
3806 unless we're declaring the variable in question.
3808 1999-12-06 Mark Mitchell <mark@codesourcery.com>
3810 * decl.c (init_decl_processing): #if 0 last patch.
3811 (finish_function): Likewise.
3813 1999-12-05 Mark Mitchell <mark@codesourcery.com>
3815 * decl.c (init_decl_processing): Set flag_inline_trees if
3818 * cp-tree.h (calls_setjmp_p): Declare.
3819 * decl.c (finish_function): Mark functions that call setjmp as
3821 * optimize.c (calls_setjmp_r): New function.
3822 (calls_setjmp_p): Likewise.
3824 1999-12-04 Mark Mitchell <mark@codesourcery.com>
3826 * optimize.c (expand_call_inline): Wrap the expanded call in an
3827 EXPR_WITH_FILE_LOCATION node to get correct line numbers for
3830 * optimize.c (inline_data): Remove fns_top. Add scope_stmt. Add
3831 in_target_cleanup_p.
3832 (remap_decl): New function.
3833 (remap_block): Likewise.
3834 (copy_scope_stmt): Likewise.
3835 (copy_body_r): Use remap_decl and copy_scope_stmt.
3836 (copy_body): Use VARRAY_TOP_TREE.
3837 (initialize_inlined_parameters): Likewise.
3838 (declare_return_variable): Likewise.
3839 (inlinable_function_p): Check flag_inline_trees.
3840 (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
3841 specially. Use VARRAY_PUSH_TREE. Create a BLOCK for the
3842 parameters of the inlined function.
3843 (optimize_function): Prevent recursion into partially complete
3846 * cp-tree.def (SCOPE_STMT): Take one operand.
3847 * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
3848 (SCOPE_NULLIFIED_P): Redefine.
3849 (SCOPE_NO_CLEANUPS_P): New macro.
3850 (add_scope_stmt): Change prototype.
3851 * decl.c (poplevel): Tidy. Warn about unused variables here.
3852 Record SCOPE_STMT_BLOCKs.
3853 (finish_function): Keep DECL_INITIAL for functions that might be
3855 * ir.texi: Document SCOPE_NO_CLEANUPS_P.
3856 * semantics.c: Include rtl.h.
3857 (add_scope_stmt): Return the new scope statement and, for an
3858 end-of-scope statement, its matching begin statement. Don't set
3860 (do_pushlevel): Simplify, now that we are always
3862 (do_poplevel): Likewise. Record SCOPE_STMT_BLOCKs.
3863 (expand_stmt): Don't call expand_start_bindings or
3864 expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
3865 * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
3867 * Makefile.in (semantics.o): Depend on RTL_H.
3869 * decl2.c (pending_statics_used): Make it a macro.
3870 (saved_inlines_used): Likewise.
3871 (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
3872 (mark_inline_for_output): Likewise.
3873 (ssdf_decls_used): Remove.
3874 (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
3875 (generate_ctor_or_dtor_function): Adjust accordingly.
3877 1999-11-24 Geoffrey Keating <geoffk@cygnus.com>
3878 Greg McGary <gkm@gnu.org>
3880 * decl.c (duplicate_decls): Merge
3881 DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
3882 DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
3884 1999-12-02 Mike Stump <mrs@wrs.com>
3886 * init.c (perform_member_init): Handle parse errors better.
3888 1999-12-01 Mark Mitchell <mark@codesourcery.com>
3890 * cp-tree.h (min_tree_cons): Remove.
3891 (scratch_ovl_cons): Likewise.
3892 * decl.c (saveable_obstack): Don't declare.
3893 (duplicate_decls): Tweak error-message.
3894 (initialize_local_var): Explicitly mark the definition as static.
3895 (finish_function): Call permanent_allocation, just so
3896 that the middle-end sees the obstacks it expects.
3897 (mark_cp_function_context): Likewise.
3898 * init.c (build_new): Don't use min_tree_cons.
3899 * lex.c (permanent_obstack): Don't declare.
3900 (current_obstack, saveable_obstack): Likewise.
3901 * spew.c (current_obstack, saveable_obstack): Likewise.
3902 * tree.c (current_obstack, saveable_obstack): Likewise.
3903 (scratch_ovl_cons): Remove.
3904 (build_min_nt): Don't mess with obstacks.
3905 (build_min): Likewise.
3906 (min_tree_cons): Remove
3907 * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
3908 (build_x_function_call): Likewise.
3909 (build_c_cast): Don't use min_tree_cons.
3911 1999-11-29 Mark Mitchell <mark@codesourcery.com>
3913 * pt.c (tsubst_decl): Robustify.
3915 1999-11-27 Mark Mitchell <mark@codesourcery.com>
3917 * decl2.c (finish_file): Call expand_body for inline functions
3918 that will be written out but that do not yet have RTL.
3919 * semantics.c (expand_body): Do not generate RTL For inline
3920 functions that do not yet need to be written out.
3922 1999-11-25 Mark Mitchell <mark@codesourcery.com>
3924 * Make-lang.in (CXX_SRCS): Add optimize.c.
3925 * Makefile.in (CXX_OBJS): Add optimize.o.
3926 (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
3927 (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
3928 (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
3929 (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
3930 (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
3932 (optimize.o): New target.
3933 * class.c: Don't include splay-tree.h.
3934 * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.
3935 * cp-tree.h: Include splay-tree.h.
3936 (DECL_UNINLINABLE): New macro.
3937 (CTOR_BEGIN_P, CTOR_END_P): New macros.
3938 (flag_inline_trees): New variable.
3939 (local_variable_p): New function.
3940 (nonstatic_local_decl_p): Likewise.
3941 (optimize_function): Likewise.
3942 (cplus_unsave_expr_now): Remove.
3943 (copy_tree_r): Declare.
3944 (remap_save_expr): Likewise.
3945 * decl.c (local_variable_p): Don't
3947 (local_variable_p_walkfn): New function.
3948 (make_rtl_for_local_static): Remove code to try to avoid writing
3949 out static constants.
3950 (emit_local_var): Fix indentation.
3951 (nonstatic_local_decl_p): New function.
3952 (check_default_argument): Use local_variable_p_walkfn, not
3953 local_variable_p, when walking the tree.
3954 (start_function): Set the DECL_CONTEXT for automatically generated
3956 (finish_constructor_body): Use CTOR_STMT to mark the end of a
3958 * decl2.c: Don't include splay-tree.h.
3959 (flag_inline_trees): Define.
3960 * dump.c: Don't include
3962 * except.c (expand_end_catch_block): Fix comment formatting.
3963 (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
3964 (expand_throw): Tidy comment.
3965 * init.c (build_vec_delete_1): Use create_temporary_var.
3966 * lex.c (cplus_tree_code_type): Make it static.
3967 (cplus_tree_code_length): Likewise.
3968 (cplus_tree_code_name): Likewise.
3969 * optimize.c: New file.
3970 * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
3971 with computed gotos.
3972 (setup_vtbl_ptr): Mark the beginnings of constructors with
3974 (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
3975 (expand_body): Call optimize_function. Save bodies if we're doing
3977 * tree.c: Don't include splay-tree.h. Include insn-config.h and
3979 (copy_tree_r): Make it public.
3980 (statement_code_p): New function.
3981 (mark_local_for_remap_r): Likewise.
3982 (cp_usave_r): Likewise.
3983 (cp_unsave): Likewise.
3984 (build_cplus_new): Set DECL_CONTEXT for temporary variables.
3985 (walk_tree): Walk into `s' class nodes. Walk statement chains.
3986 (copy_tree_r): Handle 's' class nodes. Restore chains for
3987 statements. Nullify scopes. Don't copy types.
3988 (init_tree): Set lang_unsave to cp_unsave.
3989 (remap_save_expr): Define.
3990 * ir.texi: Document CTOR_STMT.
3992 1999-11-24 Jason Merrill <jason@casey.cygnus.com>
3994 * search.c (note_debug_info_needed): Do perform this optimization
3996 (maybe_suppress_debug_info): Likewise. Start by clearing
3997 TYPE_DECL_SUPPRESS_DEBUG.
3999 1999-11-24 Mark Mitchell <mark@codesourcery.com>
4001 * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
4003 * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
4005 1999-11-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4007 * decl.c (pushdecl, grokdeclarator): Don't call a variadic
4008 function with a non-literal format string.
4010 * lex.c (do_identifier): Likewise.
4012 * typeck.c (build_unary_op): Likewise.
4014 1999-11-23 Mark Mitchell <mark@codesourcery.com>
4016 * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
4018 1999-11-22 Mark Mitchell <mark@codesourcery.com>
4020 * cp-tree.def (CTOR_COMPLETE): New tree node.
4021 * decl.c (finish_constructor_body): Add it, to mark the end of the
4023 (finish_function): Don't call end_protect_partials here.
4024 * ir.texi (CTOR_COMPLETE): Document it.
4025 * semantics.c (expand_stmt): Handle it.
4027 * cp-tree.def (FUNCTION_NAME): New tree node.
4028 * cp-tree.h (current_function_name_declared): Tweak documentation.
4029 (lang_decl_flags): Add pretty_function_p, adjust dummy.
4030 (DECL_PRETTY_FUNCTION_P): New macro.
4031 * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
4032 etc., in a template function. Use at_function_scope_p instead of
4033 expanding it inline.
4034 * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
4036 (tsubst): Handle FUNCTION_NAME.
4037 (tsubst_copy): Likewise.
4038 (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
4039 etc. in instantiation.
4040 * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
4041 even in template functions.
4042 (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
4043 conditional scope at the top of a destructor.
4045 * error.c (dump_function_decl): Use `[ with ... ]' syntax for
4046 specializations too.
4048 1999-11-22 Nathan Sidwell <nathan@acm.org>
4050 * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
4051 when actually negative.
4053 * typeck.c (convert_for_assignment): Expand comment about
4054 strange NULL check, moved from ...
4055 (convert_for_initialization): ... here. Remove unneeded
4058 1999-11-21 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
4060 * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
4061 * init.c (build_vec_delete, build_vec_delete_1): Likewise.
4062 Always destruct virtual bases of array components, but never
4064 (build_vec_init): Adjust invocations.
4065 (build_delete): Likewise.
4066 * decl2.c (delete_sanity): Likewise.
4068 1999-11-19 Nathan Sidwell <nathan@acm.org>
4070 * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
4071 * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
4072 * decl2.c (grok_method_quals): Accept `restrict' as applying to
4073 the object pointer. Return such qualifiers.
4074 (grokclassfn): Apply this pointer qualifiers. Cleanup unused
4077 1999-11-18 Mark Mitchell <mark@codesourcery.com>
4079 * except.c (expand_end_catch_block): Fix typo.
4080 (expand_exception_blocks): Simplify. Don't call
4081 expand_leftover_cleanups.
4083 1999-11-15 Jason Merrill <jason@casey.cygnus.com>
4085 * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
4086 * pt.c (tsubst, case INTEGER_TYPE): Call it.
4087 Check uses_template_parms.
4089 * class.c (finish_struct): If we're a local class in a template
4090 function, add a TAG_DEFN.
4091 * pt.c (lookup_template_class): If this is a local class in a
4092 template function, call pushtag.
4093 (tsubst_expr, case TAG_DEFN): Handle classes, too.
4095 Emit debug info with the vtable.
4096 * search.c (maybe_suppress_debug_info): New function...
4097 * class.c (finish_struct_1): ...split out from here.
4098 * cp-tree.h: Declare it.
4099 * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
4100 if we're writing out the vtable.
4101 * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p,
4102 note_debug_info_needed): #if 0 out.
4104 1999-11-14 Mark Mitchell <mark@codesourcery.com>
4106 * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
4107 * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
4109 * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
4110 * decl2.c (lookup_arg_dependent): Use it.
4112 * cp-tree.h (cp_finish_decl): Change prototype.
4113 (finish_static_data_member_decl): Likewise.
4114 (push_permanent_obstack): Remove declaration.
4115 (push_expression_obstack): Likewise.
4116 (push_scratch_obstack): Likewise.
4117 (DECL_TEMPLATE_PARM_P): Robustify.
4118 (SET_DECL_TEMPLATE_PARM_P): New macro.
4119 * class.c (add_method): Don't manipulate obstacks.
4120 (finish_vtbls): Likewise.
4121 * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
4122 * decl.c (binding_for_name): Don't manipulate obstacks.
4123 (maybe_push_to_top_level): Likewise.
4124 (pop_from_top_level): Likewise.
4125 (duplicate_decls): Likewise.
4126 (pushdecl): Likewise.
4127 (implicitly_declare): Likewise.
4128 (build_typename_type): Likewise.
4129 (start_decl): Likewise.
4130 (cp_finish_decl): Likewise.
4131 (finish_decl): Likewise.
4132 (destroy_local_static): Likewise.
4133 (expand_static_init): Likewise.
4134 (complete_array_type): Likewise.
4135 (grokvardecl): Likewise.
4136 (build_ptrmemfnc_type): Likewise.
4137 (grokdeclarator): Likewise.
4138 (xref_tag): Likewise.
4139 (xref_basetypes): Likewise.
4140 (start_enum): Likewise.
4141 (finish_enum): Likewise.
4142 (start_function): Likewise.
4143 (finish_function): Likewise.
4144 (start_method): Adjust call to cp_finish_decl.
4145 * decl2.c (finish_static_data_member_decl): Don't manipulate
4147 (grokfield): Likewise.
4148 (grokbitfield): Likewise.
4149 (get_temp_name): Likewise.
4150 (get_sentry): Likewise.
4151 (fnish_file): Likewise.
4152 (lookup_arg_dependent): Likewise.
4153 * except.c (call_eh_info): Likewise.
4154 (push_eh_info): Likewise.
4155 (do_pop_exception): Likewise.
4156 (initialize_handler_parm): Likewise.
4157 (expand_end_eh_spec): Likewise.
4158 (alloc_eh_object): Likewise.
4159 (expand_throw): Likewise.
4160 * expr.c (extract_scalar_init): Likewise.
4161 * init.c (build_java_class_ref): Likewise.
4162 * lex.c (get_time_identifier): Likewise.
4163 (snarf_defarg): Likewise.
4164 (add_defarg_fn): Likewise.
4165 (is_global): Simplify.
4166 (do_identifier): Don't check TREE_PERMANENT.
4167 * method.c (emit_thunk): Don't manipulate obstacks.
4168 * parse.y (condition): Adjust call to cp_finish_decl.
4169 (primary): Likewise.
4170 (initdcl): Likewise.
4171 (initdcl0_innards): Likewise.
4172 (nomods_initdcl0): Likewise.
4173 * pt.c (push_inline_template_parms_recursive): Use
4174 SET_DECL_TEMPLATE_PARM_P.
4175 (process_template_parm): Likewise.
4176 (lookup_template_class): Don't manipulate obstacks.
4177 (instantiate_class_template): Adjust call to
4178 finish_static_data_member_decl.
4179 (tsubst_decl): Don't manipulate obstacks.
4180 (tsubst_expr): Likewise.
4181 (instantiate_template): Likewise.
4182 (instantiate_decl): Adjust calls to cp_finish_decl.
4183 * rtti.c (call_void_fn): Don't manipulate obstacks.
4184 (get_tinfo_var): Likewise.
4185 (get_tinfo_fn_unused): Likewise.
4186 (build_dynamic_cast_1): Likewise.
4187 (expand_si_desc): Likewise.
4188 (expand_class_desc): Likewise.
4189 (expand_ptr_desc): Likewise.
4190 (expand_attr_desc): Likewise.
4191 (expand_generic_desc): Likewise.
4192 (synthesize_tinfo_fn): Likewise.
4193 * search.c (expand_upcast_fixups): Likewise.
4194 * semantics.c (finish_asm_stmt): Likewise.
4195 (finish_named_return_value): Likewise.
4196 (begin_class_definition): Likewise.
4197 (finish_class_definition): Likewise.
4198 (finish_typeof): Likewise.
4199 * tree.c (build_cplus_method_type): Likewise.
4200 (reverse_path): Likewise.
4201 (copy_template_template_parm): Likewise.
4202 (build_expr_ptr_wrapper): Likewise.
4203 (push_expression_obstack): Remove.
4204 (push_permanent_obstack): Likewise.
4205 * typeck.c (mark_addressable): Likewise.
4207 1999-11-13 Mark Mitchell <mark@codesourcery.com>
4209 * call.c (build_conditional_expr): Use build_target_expr_with_type.
4210 (convert_like): Likewise.
4211 (build_over_call): Likewise.
4212 * cp-tree.h (build_target_expr): Remove.
4213 (build_target_expr_with_type): New function.
4214 * cvt.c (build_up_reference): Use get_target_expr.
4215 * decl.c (build_target_expr): Move to ...
4216 * tree.c (build_target_expr): Here. Make it static.
4217 (build_target_expr_with_type): New function. Set DECL_CONTEXT on
4218 the temporary VAR_DECLs.
4219 (get_target_expr): Use it.
4221 1999-11-13 Jason Merrill <jason@yorick.cygnus.com>
4223 * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
4224 * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
4225 * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
4226 * class.c (set_rtti_entry): Use it.
4228 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4230 * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
4232 * semantics.c (finish_expr_stmt): Call it here instead. Move
4233 default_conversion logic to semantic-analysis time.
4235 1999-11-12 Jason Merrill <jason@yorick.cygnus.com>
4237 * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
4239 Fri Nov 12 12:56:32 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4241 * init.c (init_init_processing): Re-instated Nov 11 patch after
4244 Fri Nov 12 10:42:02 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4246 * init.c (init_init_processing): Undo patch from Nov 11, 1999.
4247 Patch had not been approved yet.
4249 1999-11-12 Mark Mitchell <mark@codesourcery.com>
4251 * decl.c (compute_array_index_type): New function, split out from
4253 (create_array_type_for_decl): Likewise.
4254 (grokdeclarator): Use them.
4256 * semantics.c (expand_stmt): Don't suspend_momentary or
4259 Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com>
4261 * init.c (init_init_processing): Header information for
4262 arrays allocated via `new' should have the same alignment used by
4265 1999-11-10 Mark Mitchell <mark@codesourcery.com>
4267 * error.c (dump_function_name): Don't crash if given a friend
4268 pseudo-instantiation.
4270 * cp-tree.h (build_enumerator): Change prototype.
4271 * decl.c (enum_next_value): Remove.
4272 (enum_overflow): Likewise.
4273 (init_decl_processing): Don't register enum_next_value as a root.
4274 (start_enum): Clear TYPE_VALUES for a redefined enum.
4275 (finish_enum): Reset the type of enumeration constants.
4276 (build_enumerator): Fix indentation. Don't copy CONST_DECLs when
4277 we don't need to. Maintain the TYPE_VALUES list and look there
4278 for the previously defined enumeration constant. Let enumeration
4279 constants have the type of their values until the enumeration type
4281 * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
4283 * parse.c: Regenerated.
4284 * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
4286 Wed Nov 10 12:43:21 1999 Philippe De Muyter <phdm@macqel.be>
4287 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4289 * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
4291 1999-11-09 Mark Mitchell <mark@codesourcery.com>
4293 * cp-tree.h (language_function): Remove x_last_dtor_insn and
4294 x_last_parm_cleanup_insn.
4295 * decl.c (last_dtor_insn): Remove.
4296 (last_parm_cleanup_insn): Likewise.
4297 (expand_start_early_try_stmts): Don't set them.
4298 (store_parm_decls): Likewise.
4299 (save_function_data): Or save them.
4300 (mark_lang_function): Or mark them.
4302 1999-11-08 Mark Mitchell <mark@codesourcery.com>
4304 * decl.c (store_parm_decls): Generate cleanup code at
4305 semantic-analysis time. Destroy objects in the correct order.
4307 1999-11-07 Mark Mitchell <mark@codesourcery.com>
4309 * cp-tree.h (begin_new_placement): Remove.
4310 (finish_new_placement): Likewise.
4311 * class.c (finish_struct_1): Don't suspend_momentary or
4313 * decl.c (grokdeclarator): Likewise.
4314 (maybe_build_cleanup_1): Likewise.
4315 * except.c (push_eh_cleanup): Likewise.
4316 (build_terminate_handler): Likewise.
4317 * init.c (build_new_1): Likewise.
4318 * parse.y (parse_decl): Change prototype.
4319 (initdecls, notype_initdecls, initdcl): Don't return int.
4320 (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
4321 (.begin_new_placement): Remove.
4322 (.finish_new_placement): Likewise.
4323 (nonmomentary_expr): Likewise.
4324 (suspend_mom): Likewise.
4325 (condition): Don't suspend_momentary, resume_momentary, or keep
4326 track of need to resume.
4327 (unary_expr): Likewise.
4328 (new_placement): Likewise.
4330 (structsp): Likewise.
4331 (new_type_id): Likewise.
4332 (maybe_parmlist): Likewise.
4333 (direct_after_type_declaration): Likewise.
4334 (direct_new_declarator): Likewise.
4335 (direct_abstract_declaration): Likewise.
4336 * parse.c: Regenerated.
4337 * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
4338 * semantics.c (begin_new_placement): Remove.
4339 (finish_new_placement): Likewise.
4341 1999-11-05 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4343 * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
4344 (DECL_TEMPLATE_INFO): Use it.
4345 * decl.c (warn_extern_redeclared_static): Do nothing for
4347 * decl2.c (mark_used): Explicitly check for function or variable.
4348 * semantics.c (finish_unary_op_expr): Check whether result is also
4351 1999-11-05 Mark Mitchell <mark@codesourcery.com>
4353 * Makefile.in (typeck2.o): Depend on output.h.
4354 * typeck2.c: Include output.h.
4356 * decl.c (flag_ansi): Remove declaration.
4358 * pt.c (tinst_level_tick): Make it static.
4359 (last_template_error_tick): Likewise.
4361 * cp-tree.h (mapcar): Remove declaration.
4362 (search_tree): Likewise.
4363 (walk_tree_fn): New typedef.
4364 (walk_tree): New function.
4365 * tree.c (bot_manip): Change prototype. Adjust to be called via
4367 (bot_replace): Likewise.
4368 (no_linkage_helper): Likewise.
4369 (copy_tree_r): New function.
4370 (search_tree): Rename, and adjust, to become ...
4371 (walk_tree): New function.
4373 (target_remap): Remove.
4374 (target_remap_count): Likewise.
4375 (break_out_target_exprs): Use walk_tree.
4376 * decl.c (local_variable_p): Change prototype.
4377 (check_default_argument): Use walk_tree.
4378 * pt.c (for_each_template_parm_r): New function, split out from ...
4379 (for_each_template_parm): Here. Use it, via walk_tree.
4381 1999-11-03 Mark Mitchell <mark@codesourcery.com>
4383 * class.c (check_bitfield_decl): New function, split out from
4385 (check_field_decl): Likewise. Recursively examine members of
4387 (finish_struct_1): Use them.
4388 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
4390 1999-11-02 Mark Mitchell <mark@codesourcery.com>
4392 * decl.c (grokfndecl): Remove dead code.
4394 * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
4396 1999-11-02 Scott Snyder <snyder@fnal.gov>
4398 * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
4400 * pt.c (tsubst_copy): Likewise.
4402 1999-11-01 Jason Merrill <jason@yorick.cygnus.com>
4404 * decl2.c (maybe_make_one_only): Always make things comdat on
4407 1999-10-31 Mark Mitchell <mark@codesourcery.com>
4409 * decl.c (finish_function): Call free_after_parsing for functions
4410 we are not immediately turning into RTL.
4412 1999-10-31 Brendan Kehoe <brendan@cygnus.com>
4414 * cp-tree.h (flag_dump_translation_unit): Add decl.
4416 Sat Oct 30 22:42:50 1999 Stephen L Moshier <moshier@mediaone.net>
4418 * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
4420 1999-10-30 Mark Mitchell <mark@codesourcery.com>
4422 * decl.c (pop_cp_function_context): Don't call free on a NULL
4424 * semantics.c: Include ggc.h.
4425 (expand_body): Do garbage-collection after processing a template
4426 function. Clear DECL_SAVED_TREE after generating RTL for a
4428 * Makefile.in (semantics.o): Depend on ggc.h.
4430 1999-10-29 Mark Mitchell <mark@codesourcery.com>
4432 * cp-tree.h (make_typename_type): Change prototype.
4433 * decl.c (make_typename_type): Only complain if so requested.
4434 * parse.y (nested_name_specifier): Adjust calls.
4435 (typename_sub0): Likewise.
4436 (typename_sub1): Likewise.
4437 * parse.c: Regenerated.
4438 * pt.c (convert_template_argument): Pass complain to
4442 1999-10-28 Mark Mitchell <mark@codesourcery.com>
4444 * semantics.c (finish_handler): End the scope of the handler
4445 before attaching it to the statement-tree.
4447 1999-10-28 Ian Lance Taylor <ian@zembu.com>
4449 * rtti.c (build_dynamic_cast_1): Give a better error message for
4450 an attempt to dynamic_cast from a non-polymorphic type.
4452 1999-10-27 Mark Mitchell <mark@codesourcery.com>
4454 * cp-tree.h (make_temp_vec): Remove.
4455 (make_scratch_vec): Likewise.
4456 * call.c (add_function_candidate): Use make_tree_vec.
4457 (add_conv_candidate): Likewise.
4458 (build_builtin_candidate): Likewise.
4459 (add_template_candidate_real): Likewise.
4460 * class.c (resolve_address_of_overloaded_function): Likewise.
4461 * decl.c (start_function): Don't fool with the momentary obstack.
4462 (finish_function): Likewise.
4463 * init.c (expand_direct_vtbls_init): Likewise.
4464 (begin_init_stmts): Likewise.
4465 (finish_init_stmts): Likewise.
4466 * pt.c (add_to_template_args): Use make_tree_vec.
4467 (check_explicit_specialization): Likewise.
4468 (coerce_template_parms): Likewise.
4469 (lookup_template_class): Don't fool with the momentary obstack.
4470 (instantiate_class_template): Likewise.
4471 (tsubst_template_arg_vector): Use make_tree_vec.
4472 (tsubst_aggr_type): Don't fool with the momentary obstack.
4473 (tsubst_decl): Likewise. Use make_tree_vec.
4474 (try_one_overload): Likewise.
4475 (try_class_unification): Don't fool with the momentary obstack.
4476 (get_bindings_real): Use make_tree_vec.
4477 (set_mangled_name_for_template_decl): Likewise.
4478 * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
4479 * semantics.c (finish_expr_stmt): Likewise.
4480 (finish_do_stmt): Likewise.
4481 (finish_for_expr): Likewise.
4482 (finish_switch_cond): Likewise.
4483 (do_pushlevel): Likewise.
4484 (do_poplevel): Likewise.
4485 * tree.c (make_temp_vec): Remove.
4487 * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs. Dump
4488 CLEANUP_P for a TRY_BLOCK.
4489 * ir.texi: Document SAVE_EXPR.
4491 Tue Oct 26 23:29:56 1999 Jeffrey A Law (law@cygnus.com)
4493 * call.c (build_over_call): Check that the built-in function is
4494 of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
4495 * typeck.c (build_function_call_real): Similarly.
4497 1999-10-26 Mark Mitchell <mark@codesourcery.com>
4499 * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS. Don't call
4502 1999-10-24 Mark Mitchell <mark@codesourcery.com>
4504 * decl.c (push_overloaded_decl_1): Use pushdecl.
4506 * decl.c (auto_function): Replace #ifdef'd __inline with just
4508 * lex.c (my_get_run_time): Likeise.
4509 (yyprint): Likewise.
4510 (identifier_type): Likewise.
4511 * method.c (start_squangling): Likewise.
4512 (end_squangling): Likewise.
4514 (old_backref_index): Likewise.
4515 (flush_repeats): Likewise.
4516 (issue_ktype): Likewise.
4517 * parse.y (empty_parms): Likewise.
4518 * parse.c: Regenerated.
4520 1999-10-21 Mark Mitchell <mark@codesourcery.com>
4522 * dump.c (dequeue_and_dump): Replace several uses of
4523 queue_and_dump_index with dump_child.
4525 1999-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4527 * expr.c: Include tm_p.h.
4529 1999-10-21 Mark Mitchell <mark@codesourcery.com>
4531 * cp-tree.h (SCOPE_PARTIAL_P): New macro.
4532 (pushlevel_temporary): Remove.
4533 (add_scope_stmt): New function.
4534 * decl.c (pushlevel_temporary): Remove.
4535 (poplevel): Use add_scope_stmt.
4536 (start_decl_1): Likewise.
4537 * semantics.c (add_scope_stmt): New function.
4538 (do_pushlevel): Use it.
4539 (do_poplevel): Use it.
4540 (expand_stmt): Check SCOPE_PARTIAL_P.
4542 * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
4543 * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
4544 * expr.c (cplus_expand_expr): Expand it.
4545 * ir.texi: Document EMPTY_CLASS_EXPR.
4547 1999-10-20 Mark Mitchell <mark@codesourcery.com>
4549 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
4550 parameters as having namespace scope.
4552 1999-10-19 Mark Mitchell <mark@codesourcery.com>
4554 * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
4555 (mangling_flags): New type.
4556 (build_overload_int): Change prototype.
4557 (build_overload_value): Likewise.
4558 (numeric_output_need_bar): Improve comment.
4559 (mangle_expression): New function, broken out from ...
4560 (build_overload_int): Here.
4561 (build_overload_value): Adjust for use of mangling flags. Don't
4562 warn about real-valued template parameters here. Do handle
4563 complex expressions involving real-valued template parameters.
4564 (build_template_parm_names): Encase non-type template parameters
4565 in underscores, if necessary.
4566 (process_overload_item): Remove conditional on
4567 PARM_CAN_BE_ARRAY_TYPE.
4569 1999-10-17 Mark Mitchell <mark@codesourcery.com>
4571 * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
4573 * ir.texi: Clean up documentation of RETURN_INIT.
4575 1999-10-15 Greg McGary <gkm@gnu.org>
4577 * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
4578 (lang_init): Set default for flag_bounds_check if still "unspecified".
4580 1999-10-13 Andrew Haley <aph@cygnus.com>
4582 * class.c (finish_struct_1): Force alignment of non-bitfields to
4585 Wed Oct 13 22:01:35 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
4587 * typeck2.c (process_init_constructor): Handle empty constructors.
4589 1999-10-13 Jason Merrill <jason@yorick.cygnus.com>
4591 * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
4593 * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
4596 1999-10-13 Mark Mitchell <mark@codesourcery.com>
4598 * decl.c (make_rtl_for_local_static): Don't create register RTL
4599 for addressable constants.
4601 1999-10-13 Nathan Sidwell <nathan@acm.org>
4603 * cp-tree.h (build_x_va_arg): Prototype new function.
4604 * call.c (build_x_va_arg): Define it.
4605 * parse.y (unary_expr): Call build_x_va_arg.
4607 * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
4608 * call.c (convert_type_from_ellipsis): Define it.
4609 * decl.c (init_decl_processing): Set lang_type_promotes_to.
4611 * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
4613 1999-10-11 Jason Merrill <jason@yorick.cygnus.com>
4615 * class.c (fixed_type_or_null): Always set *nonnull.
4617 1999-10-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4619 * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
4620 __GNUC__ and __GNUC_MINOR__.
4622 1999-10-09 Mark Mitchell <mark@codesourcery.com>
4624 * cp-tree.h (make_rtl_for_local_static): New function.
4625 * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
4627 (make_rtl_for_local_static): Here.
4628 * semantics.c (expand_stmt): Use make_rtl_for_local_static.
4630 1999-10-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4632 * method.c: Include tm_p.h.
4634 1999-10-7 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
4636 * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
4637 * lex.c (cp_make_lake_type): Likewise.
4638 * tree.c (init_tree): Init make_lang_type_fn.
4640 1999-10-07 Mark Mitchell <mark@codesourcery.com>
4642 * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
4645 * semantics.c (expand_stmt): Don't pretend to have asmspecs for
4646 local statics if we don't really have them.
4648 * ir.texi: Improve documentation for STMT_EXPR. Describe
4651 1999-10-07 Jason Merrill <jason@yorick.cygnus.com>
4653 * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
4655 1999-10-07 Greg McGary <gkm@gnu.org>
4657 * class.c (finish_struct_1): Use simpler method of
4658 removing elements of a singly-linked list which doesn't
4659 lose for classes without data members.
4661 1999-10-07 Mark Mitchell <mark@codesourcery.com>
4663 * friend.c (make_friend_class): Robustify.
4665 * semantics.c (finish_object_call_expr): Reject calls to template
4668 1999-10-06 Mark Mitchell <mark@codesourcery.com>
4670 * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
4672 * cp-tree.h (CLASSTYPE_VFIELD): Remove.
4673 * call.c (build_vfield_ref): Use TYPE_VFIELD, not
4675 * class.c (get_vfield_offset): Likewise.
4676 (finish_base_struct): Likewise.
4677 (modify_one_vtable): Likewise.
4678 (fixup_vtable_deltas): Likewise.
4679 (finish_struct_1): Likewise.
4680 * init.c (expand_virtual_init): Likewise.
4681 * search.c (lookup_field_1): Likewise.
4682 (expand_upcast_fixups): Likewise.
4683 * typeck.c (build_component_ref): Likewise.
4684 (build_binary_op_nodefault): Likewise.
4686 * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
4687 * ir.texi: Document TYPE_VFIELD.
4689 1999-10-06 Brendan Kehoe <brendan@cygnus.com>
4691 * decl.c (grokdeclarator): Only warn about non-zero arrays if
4692 !in_system_header (linux socketbits.h can give this for
4693 __cmsg_data, which is using a GNU extension).
4695 1999-10-05 Mark Mitchell <mark@codesourcery.com>
4697 * decl2.c (start_static_storage_duration_function): Push the
4698 function declaration so it ends up in namespace scope.
4700 * dump.c (DUMP_CHILDREN): Remove.
4701 (DUMP_BINFO): Adjust.
4702 (struct dump_node_info): Remove dump_children_p.
4703 (queue_and_dump_type): Remove dump_children_p parameter.
4704 (queue): Don't set dump_children_p.
4705 (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
4706 queue_and_dump_index.
4707 (dequeue_and_dump): Unconditionally print children. Adjust calls
4708 to functions mentioned above.
4709 (dump_node): Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
4711 * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
4712 * dump.c (dequeue_and_dump): Dump them.
4714 * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
4716 * decl.c (start_function): Set current_in_charge_parm for
4717 constructors, too, where appropriate.
4718 * search.c (fixup_all_virtual_upcast_offsets): New function.
4719 (expand_indirect_vtbls_init): Use it.
4721 1999-10-04 Nathan Sidwell <nathan@acm.org>
4723 * decl2.c (grok_alignof): Don't decay lvalues.
4725 * init.c (build_new): Remove unused variable.
4727 1999-10-04 Mark Mitchell <mark@codesourcery.com>
4729 * cp-tree.h (struct language_function): Remove static_labelno.
4730 (static_labelno): Remove macro.
4731 * method.c (build_overload_nested_name): Make static_labelno
4734 * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
4735 to decide whether or not a function is defined.
4737 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
4738 situations where make_node will do it automatically.
4739 * decl.c (grok_reference_init): Likewise.
4740 (expand_static_init): Likewise.
4741 (do_static_initialization): Likewise.
4742 * init.c (perform_member_init): Likewise.
4743 (expand_aggr_init_1): Likewise.
4744 (build_new_1): Likewise.
4745 * method.c (do_build_copy_constructor): Likewise.
4746 (do_build_assign_ref): Likewise.
4747 * search.c (expand_upcast_fixups): Likewise.
4748 * semantics.c (finish_stmt_expr): Likewise.
4749 * typeck.c (build_unary_op): Likewise.
4750 (check_return_expr): Likewise.
4752 1999-10-04 Jason Merrill <jason@yorick.cygnus.com>
4754 * init.c (build_vec_delete_1): Fold COND_EXPRs.
4756 1999-10-03 Mark Mitchell <mark@codesourcery.com>
4758 * cp-tree.def (VEC_INIT_EXPR): Remove.
4759 * cp-tree.h (struct stmt_tree): New type.
4760 (struct saved_scope): Remove firstobj. Add x_saved_tree,
4762 (class_cache_firstobj): Remove.
4763 (struct language_function): Remove stmts_are_full_exprs_p,
4764 x_last_tree, and x_last_expr_type. Add x_stmt_tree.
4765 (current_stmt_tree): New macro.
4766 (last_tree): Adjust.
4767 (last_expr_type): Likewise.
4768 (doing_semantic_analysis_p): Simplify.
4769 (stmts_are_full_exprs_p): Adjust.
4770 (begin_tree): Remove prototype.
4771 (end_tree): Likewise.
4772 (begin_stmt_tree): Change prototype.
4773 (finish_stmt_tree): Likewise.
4774 (building_stmt_tree): Simplify.
4775 * decl.c (mark_stmt_tree): New function.
4776 (mark_saved_scope): Use it.
4777 (start_function): Rearrange slightly to call begin_stmt_tree
4779 (save_function_data): Tweak.
4780 (finish_function): Adjust call to finish_stmt_tree.
4781 (mark_lang_function): Use mark_stmt_tree.
4782 * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
4783 * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
4784 (build_vec_init): Remove creation of stand-in intializer.
4785 * pt.c (begin_tree): Remove.
4786 (end_tree): Likewise.
4787 * semantics.c (SET_LAST_STMT): New macro. Use it throughout.
4788 (begin_compound_stmt): Handle a compound-statement outside of a
4790 (begin_stmt_expr): Handle a statement-expression outsidef of a
4792 (finish_stmt_expr): Likewise.
4793 (begin_class_definition): Don't call begin_tree.
4794 (finish_inline_definitions): Don't call end_tree.
4795 (begin_stmt_tree): Take a pointer to tree, not a function as input.
4796 (finish_stmt_tree): Likewise.
4797 * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
4800 * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
4801 * parse.c: Regenerated.
4803 * dump.c (dqueue_and_dump): Dump bitfieldness.
4805 * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
4806 bitfields, rather than DECL_BIT_FIELD.
4807 * ir.texi: Document how to tell whether or not a field is a
4810 * lex.c (make_lang_type): Fix typo in comment.
4812 1999-10-01 Jason Merrill <jason@yorick.cygnus.com>
4814 * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
4816 1999-10-01 Mark Mitchell <mark@codesourcery.com>
4818 * pt.c (tsubst_decl): If the type of a template instantiation is
4819 bogus, so is the whole instantiation.
4821 1999-09-30 Mark Mitchell <mark@codesourcery.com>
4823 * decl.c (initialize_local_var): Handle static variables here.
4824 (cp_finish_decl): Tweak handling of function-scope static
4826 * semantics.c (expand_stmt): Handle DECL_STMTs for static
4829 * method.c (emit_thunk): Don't crash when -fsyntax-only.
4831 * cp-tree.h (lang_decl_flags): Add global_ctor_p and
4832 global_dtor_p. Add init_priority.
4833 (DECL_ACCESS): Adjust accordingly.
4834 (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
4835 (GLOBAL_INIT_PRIORITY): Likewise.
4836 * decl.c (lang_mark_tree): Adjust accordingly.
4837 (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P,
4838 and GLOBAL_INIT_PRIORITY.
4839 * dump.c (dequeue_and_dump): Print them.
4840 * ir.texi: Document them.
4842 * decl2.c (struct priority_info_s): Remove initialization_sequence
4843 and destruction_sequence.
4844 (start_static_storage_duration_function): Return the body of the
4845 function. Convert for function-at-a-time mode.
4846 (generate_inits_for_priority): Remove.
4847 (finish_static_storage_duration_function): Change prototype.
4848 Adjust for function-at-a-time mode.
4849 (do_static_initialization): Likewise.
4850 (do_static_destruction): Likewise.
4851 (do_static_initialization_and_destruction): Remove.
4852 (start_static_initialization_or_destruction): New function.
4853 (finish_static_initialization_or_destruction): Likewise.
4854 (get_priority_info): Don't manipulation initialization_sequence or
4855 destruction_sequence.
4856 (prune_vars_needing_no_initialization): New function.
4857 (write_out_vars): Likewise.
4858 (finish_file): Use the various new functions instead of the old.
4860 Thu Sep 30 00:13:27 1999 Dirk Zoller <duz@rtsffm.com>
4862 * cp-tree.h (warn_float_equal): Declare.
4863 * decl2.c (warn_float_equal): Define.
4864 (lang_decode_option): Recognize -W[no-]float-equal.
4865 * typeck.c (build_binary_op_nodefault): Conditionally warn
4866 about equality tests of floating point types.
4868 1999-09-29 Jason Merrill <jason@yorick.cygnus.com>
4870 Support normal type_info-based EH mechanisms with -fno-rtti.
4871 * except.c (build_eh_type_type): Remove special -fno-rtti handling.
4872 (build_eh_type_type_ref): Likewise.
4873 (build_eh_type): Remove.
4874 (expand_throw): Call build_eh_type_type, not build_eh_type.
4875 * decl2.c (import_export_decl): Don't associate the tinfo fn with
4876 the vtable if -fno-rtti.
4877 * decl.c (init_decl_processing): Always init_rtti_processing.
4879 * rtti.c (get_typeid): Don't complain about -fno-rtti.
4881 * class.c (class_cache_obstack, class_obstack): Remove.
4882 (init_class_processing): Don't initialize class_obstack.
4883 (push_cache_obstack): Remove.
4884 (pushclass): Don't call it.
4885 * cp-tree.h: Remove prototype for push_cache_obstack.
4886 * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
4887 (pushlevel_class): Don't push_decl_level.
4888 (poplevel_class): Don't pop_stack_level.
4889 (push_class_level_binding): Don't push_cache_obstack.
4890 (init_decl_processing): Don't intialize decl_obstack.
4891 * search.c (push_class_decls): Don't push_cache_obstack.
4892 * tree.c (list_hash_add): Put hash node on permanent_obstack.
4893 (hash_tree_cons): Don't mess with obstacks.
4894 (print_lang_statistics): Don't print stats for class_obstack and
4897 1999-09-29 Mark Mitchell <mark@codesourcery.com>
4899 * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
4900 * ir.texi: Document DECL_EXTERNAL.
4902 * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
4903 * ir.texi: Document THUNK_DECLs.
4905 * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
4906 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
4907 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
4908 * error.c (dump_template_bindings): Remove unused parameter.
4909 Handle multiple levels of template parameters.
4910 (dump_template_decl): Use `parms', not `args', for template
4911 parameters. Fix thinko.
4912 (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION. Don't pass
4913 flags to dump_template_bindings.
4914 * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
4915 (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
4916 (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
4917 (tsubst_copy): Clarify variable name.
4918 (most_general_template): Robustify.
4920 1999-09-29 Nathan Sidwell <nathan@acm.org>
4922 * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
4923 to change primary template rendering.
4925 1999-09-29 Mark Mitchell <mark@codesourcery.com>
4927 * cp-tree.h (UPT_TEMPLATE): Remove.
4928 (UPT_PARMS): Likewise.
4929 (DECL_NEEDED_P): New macro.
4930 * decl2.c (finish_vtable_vardecl): Use it.
4931 (finish_objects): Don't crash with -fsyntax-only.
4932 (finish_file): Use DECL_NEEDED_P. Don't prune vtables when
4934 * pt.c (tsubst_friend_function): Remove FIXME that talks about
4936 (tsubst_expr): Correct handling of function try-blocks.
4937 * semantics.c: Include flags.h.
4938 (expand_body): Don't do RTL generation if -fsyntax-only.
4939 * Makefile.in (semantics.o): Depends on flags.h.
4941 1999-09-28 Gabriel Dos Reis <gdr@codesourcery.com>
4943 * pt.c (most_general_template): Adjust declaration.
4945 * cp-tree.h: (most_general_template): Declare.
4947 * error.c (dump_template_value): Rename to ...
4948 (dump_template_argument): This.
4949 (dump_template_argument_list): New function.
4950 (dump_type): Use it.
4951 (dump_template_parameter): New function.
4952 (dump_template_decl): Use it.
4953 (dump_template_bindings): New function.
4954 (dump_function_decl): Use it. Pretty print function template
4957 1999-09-28 Nathan Sidwell <nathan@acm.org>
4959 * decl.c (grokdeclarator): Distinguish parameter context for
4960 diagnostics. Tidy up missing type diagnostic.
4961 Diagnose `explicit' in one place. Diagnose `mutable' in one place.
4963 1999-09-28 Mark Mitchell <mark@codesourcery.com>
4965 * ir.texi: Improve documentation for TARGET_EXPR.
4967 1999-09-27 Nathan Sidwell <nathan@acm.org>
4969 Augment stringification of trees.
4970 * cp-tree.h (tree_string_flags): New error stringifying enumeration.
4971 (fndecl_as_string, type_as_string_real, args_as_string,
4972 code_as_string, language_as_string, parm_as_string,
4973 op_as_string, assop_as_string, cv_as_string): Remove.
4974 (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
4975 (context_as_string): Declare new function.
4976 * error.c (cp_printers): Move definition.
4978 (OB_END_TEMPLATE_ID): Adjust.
4979 (interesting_scope_p): Remove.
4980 (dump_scope): New static function.
4981 (dump_qualifiers): Adjust prototype, reimplement.
4982 (dump_template_value): Use tree_string_flags.
4983 (dump_type_real): Move back to dump_type.
4984 (dump_type): Adjust prototype. Use tree_string_flags.
4985 (dump_aggr_type): Likewise. Use dump_template_parms.
4986 (dump_type_prefix): Adjust prototype. Use tree_string_flags.
4988 (dump_type_suffix): Adjust prototype. Use tree_string_flags.
4989 (dump_simple_decl): Likewise.
4990 (dump_decl): Likewise. Use dump_template_decl.
4991 (dump_template_decl): New static function broken out of dump_decl.
4992 (dump_function_decl): Adjust prototype. Use tree_string_flags.
4993 (dump_parameters): Likewise. Prefix space.
4994 (dump_exception_spec): Adjust prototype. Use tree_string_flags.
4995 (dump_function_name): Likewise. Use dump_template_parms.
4996 (dump_template_parms): New static function broken out of
4998 (dump_expr_list): Adjust prototype. Use tree_string_flags.
4999 (dump_expr): Likewise.
5000 (fndecl_as_string): Removed
5001 (type_as_string_real): Removed
5002 (dump_binary_op): Adjust prototype. Use tree_string_flags.
5003 (dump_unary_op): Likewise.
5004 (type_as_string): Likewise.
5005 (expr_as_string): Likewise.
5006 (decl_as_string): Likewise.
5007 (context_as_string): New function.
5008 (lang_decl_name): Adjust.
5009 (decl_to_string): New static print callback.
5010 (expr_to_string): Likewise.
5011 (fndecl_to_string): Likewise.
5012 (code_as_string): Renamed to ...
5013 (code_to_string): ... here. Adjust.
5014 (language_as_string): Renamed to ...
5015 (language_to_string): ... here. Adjust.
5016 (parm_as_string): Renamed to ...
5017 (parm_to_string): ... here.
5018 (op_as_string): Renamed to ...
5019 (op_to_string): ... here.
5020 (assop_as_string): Renamed to ...
5021 (assop_to_string): ... here.
5022 (type_to_string): New static print callback.
5023 (args_as_string): Renamed to ...
5024 (args_to_string): ... here. Adjust.
5025 (cv_as_string): Renamed to ...
5026 (cv_to_string): ... here. Adjust.
5027 * pt.c (mangle_class_name_for_template): Use tree_string_flags.
5028 (print_template_context): Likewise.
5030 1999-09-26 Mark Mitchell <mark@codesourcery.com>
5032 * cp-tree.h (expand_throw): Remove prototype.
5033 * except.c (expand_throw): Make it static. Use tree-generation
5034 functions, rather than RTL-generation functions.
5035 (build_throw): Use it.
5036 * expr.c: Include except.h.
5037 (cplus_expand_expr): Don't call expand_throw here.
5038 * Makefile.in (expr.o): Depend on except.h.
5039 * ir.texi: Update documentation for THROW_EXPR.
5041 * decl.c (start_function): Set x_dont_save_pending_sizes rather
5042 than calling get_pending_sizes.
5043 * init.c (build_new): Don't save and restore
5044 immediate_size_expand; instead, assert that it has the expected
5047 1999-09-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5049 * lex.c (compiler_error): Add missing call to va_end().
5051 1999-09-25 Mark Mitchell <mark@codesourcery.com>
5053 * dump.c (dequeue_and_dump): Handle RESULT_DECL.
5054 * ir.texi: Document RESULT_DECL and DECL_RESULT.
5056 * cp-tree.h (check_return_expr): New function.
5057 * decl.c (finish_constructor_body): New function.
5058 (pushdecl): Put global friend functions in namespace binding
5059 level, not the class binding level.
5060 (finish_destructor_body): Make sure the dtor_label is always
5061 defined. Fix typo in comment.
5062 (finish_function): Move generation of constructor-termination code
5063 to semantic-analysis time. Move generation of implicit `main'
5064 return value to semantic-analysis time.
5065 * semantics.c (finish_return_stmt): Generate goto's to
5066 ctor_label/dtor_label here. Use check_return_expr to do semantic
5067 analysis on the returned expression.
5068 * typeck.c (maybe_warn_about_returning_address_of_local): New
5069 function split out from c_expand_return.
5070 (check_return_expr): Likewise.
5071 (c_expand_return): Just generate the RTL for the return.
5073 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5075 * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
5076 (cleanup_type): Likewise.
5077 (search_tree): Change prototype.
5078 * decl.c (local_variable_p): Adjust for new interface to
5080 (check_default_argument): Likewise.
5081 * error.c (dump_expr): Handle INIT_EXPR.
5082 * except.c (expand_throw): Don't make cleanup_type a local static.
5083 * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
5084 * init.c (build_new): Call build_new_1 directly, rather than
5085 building a NEW_EXPR.
5086 (build_new_1): Tidy. Don't build a VEC_INIT_EXPR except when
5087 processing file-scope initializers.
5088 * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
5089 * tree.c: Include splay-tree.h
5090 (no_linkage_helper): Adjust for new interface to search_tree.
5091 (search_tree): Pass around pointers to tree nodes, rather than the
5092 nodes themselves. Handle VEC_INIT_EXPR.
5093 (no_linkage_check): Adjust for new interface to search_tree.
5094 (mapcar): Handle VEC_INIT_EXPR.
5095 (target_remap): New variable.
5096 (bot_manip): Use it.
5097 (bot_replace): New function.
5098 (break_out_target_exprs): Use it to remap all variables used in a
5099 default argument expression.
5100 * typeck.c (build_modify_expr): Don't crash when outside a
5101 function and presented with an INIT_EXPR assignment
5102 * Makefile.in (tree.o): Depend on splay-tree.h.
5104 Fri Sep 24 10:48:10 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5106 * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
5108 (builtin_function): New arg CLASS. Arg CODE now of type int. All
5110 Set the builtin's DECL_BUILT_IN_CLASS.
5112 1999-09-24 Mark Mitchell <mark@codesourcery.com>
5114 * decl.c (pushdecl): Don't make local declarations of extern
5115 variables give the variable a DECL_CONTEXT for the function.
5116 (make_rtl_for_nonlocal_decl): Don't fuss with obstacks. Simplify.
5117 Don't accidentally make RTL for local declarations.
5118 (emit_local_var): Handle declarations with asm-specifiers here.
5120 1999-09-23 Mark Mitchell <mark@codesourcery.com>
5122 * ir.texi: Improve documentation for TARGET_EXPRs. Discuss
5123 STMT_IS_FULL_EXPR_P.
5125 * cp-tree.h (language_function): Add cannot_inline.
5126 * decl.c (start_function): Restore current_function_cannot_inline
5127 from the saved value.
5128 (save_function_data): Save current_function_cannot_inline.
5129 * decl2.c (start_objects): Change prototype. Build the function
5130 in function-at-a-time mode.
5131 (finish_objects): Likewise.
5132 (generate_ctor_or_dtor_function): Adjust accordingly.
5134 * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
5135 * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
5136 Don't call expand_anon_union_decl here
5137 * semantics.c (exapnd_stmt): Call it here, instead.
5138 * typeck.c (mark_addressable): Addressed variables are implicitly
5141 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5143 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
5144 (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
5145 (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
5146 * cp-tree.h: Add tree checking macros to various tree access
5148 * ptree.c (print_lang_decl): Test for function or variable
5149 before accessing template info.
5151 1999-09-23 Jason Merrill <jason@yorick.cygnus.com>
5153 * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
5154 * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
5155 * decl2.c (lang_f_options): Add -fshort-wchar.
5156 * cp-tree.h: Declare flag_short_wchar.
5157 * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned
5160 1999-09-23 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5162 * ir.texi: Fix formatting errors and typos.
5164 1999-09-22 Mark Mitchell <mark@codesourcery.com>
5166 * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
5168 * decl.c (pushdecl): Do create a binding for extern "C" functions,
5169 but not for their DECL_ASSEMBLER_NAMEs.
5170 (lookup_name_current_level): Fix formatting.
5171 (xref_tag): Likewise.
5172 * decl2.c (start_objects): Mark static constructors and
5173 destructors as used.
5175 1999-09-22 Jason Merrill <jason@yorick.cygnus.com>
5177 * decl.c (define_case_label): Don't crash if we're not in a switch.
5179 * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
5180 * lang-options.h: Restore -fthis-is-variable. Remove help strings
5181 for unsupported flags.
5183 1999-09-21 Jason Merrill <jason@yorick.cygnus.com>
5185 * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
5186 Accept and warn about -fthis-is-variable.
5188 1999-09-21 Mark Mitchell <mark@codesourcery.com>
5190 * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
5191 CLEANUP_STMT, and SCOPE_STMT.
5193 * decl2.c (lang_decode_option): Adjust, in the wake of recent
5194 changes to option processing.
5196 1999-09-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5198 * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
5199 function pointer from pmfs with no object given.
5200 (convert_for_assignment): Do not return error when converting
5203 1999-09-21 Alex Samuel <samuel@codesourcery.com>
5205 * lex.c (internal_filename): New variable.
5206 (INTERNAL_FILENAME): New macro.
5207 (init_parse): Allocate internal_filename and mark as root. Use it
5208 instead of a string constant.
5210 1999-09-21 Nathan Sidwell <nathan@acm.org>
5212 Reimplement dynamic cast and catch matching.
5213 * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
5214 * search.c (dynamic_cast_base_recurse): New function.
5215 (get_dynamic_cast_base_type): New function for dynamic cast.
5216 * rtti.c (build_dynamic_cast_1): Determine source and target
5217 class relationship. Call __dynamic_cast_2.
5218 * tinfo.h (__user_type_info::upcast): New catch dispatcher.
5219 (__user_type_info::dyncast): New dynamic cast dispatcher.
5220 (__user_type_info::sub_kind): New nested enumeration.
5221 (__user_type_info::contained_p): sub_kind predicate.
5222 (__user_type_info::contained_public_p): Likewise.
5223 (__user_type_info::contained_nonpublic_p): Likewise.
5224 (__user_type_info::contained_nonvirtual_p: Likewise.
5225 (__user_type_info::upcast_result): New nested struct.
5226 (__user_type_info::dyncast_result): New nested struct.
5227 (*::do_upcast): New catch function.
5228 (*::do_dyncast): New dynamic cast function.
5229 (__user_type_info::find_public_subobj): New dynamic cast
5231 (*::do_find_public_subobj): New dynamic cast helper function.
5232 * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
5233 (__user_type_info::dyncast): Define dynamic cast dispatcher.
5234 (*::do_upcast): Define catch function.
5235 (*::do_dyncast): Define dynamic cast function.
5236 (*::do_find_public_subobj): Define dynamic cast helper function.
5237 * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
5238 (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
5239 (__dynamic_cast_2): New dynamic cast runtime.
5241 1999-09-20 Mark Mitchell <mark@codesourcery.com>
5243 * cp-tree.h (finish_stmt_expr): Change prototype.
5244 * expr.c (cplus_expand_expr): Adjust call accordingly.
5245 * init.c (finish_init_stmts): Likewise.
5246 * parse.y (primary): Likewise.
5247 * pt.c (tsubst_copy): Likewise.
5248 * semantics.c (finish_stmt_expr): Don't take two parameters.
5249 Don't remove generated BLOCKs from the block-tree.
5251 Remove support for assigning to `this'.
5252 * NEWS: Note that fact.
5253 * class.c (build_vbase_path): Don't check flag_this_is_variable.
5254 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
5255 (language_function): Remove assigns_this, just_assigned_this, and
5256 x_base_init_expr. Add x_vcalls_possible_p. Add vtbls_set_up_p.
5257 (base_init_expr): Remove.
5258 (current_vcalls_possible_p): New macro.
5259 (vtbls_set_up_p): Likewise.
5260 (emit_base_init): Change prototype.
5261 * decl.c (finish_destructor_body): New function, split out from
5263 (current_function_assigns_this): Remove.
5264 (current_function_just_assigned_this): Likewise.
5265 (start_function): Don't set them.
5266 (finish_function): Don't check them. Don't emit
5267 base-initialization code here. Generate code for destructors when
5268 doing semantic analysis.
5269 (finish_stmt): Don't check current_function_just_assigned_this.
5270 * decl2.c (lang_f_options): Remove this-is-variable.
5271 (lang_decode_option): Likewise.
5272 (grokclassfn): Don't check flag_this_is_variable.
5273 * init.c (emit_base_init): Return the expression generated.
5274 (construct_virtual_bases): Don't push/pop obstacks. Fix
5276 (build_new_1): Don't check flag_this_is_variable.
5277 (get_temp_regvar): Don't set DECL_REGISTER.
5278 (build_vec_init): Don't call use_variable.
5279 * lang-options.h: Remove "-fthis-is-variable" and
5280 "-fno-this-is-variable".
5281 * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
5282 * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
5284 * semantics.c (finish_expr_stmt_real): Rename to ...
5285 (finish_expr_stmt): This. Remove assigned_this parameter.
5286 (begin_if_stmt): Call do_pushlevel before starting the statement.
5287 (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
5289 (setup_vtbl_ptr): Emit initialization code for bases and members
5290 at semantic-analysis time. Emit code to initialize vtables in
5292 (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
5293 Don't handle CTOR_INITIALIZER any more.
5294 * typeck.c (build_modify_expr): Don't check for assignments to
5296 (c_expand_return): Don't suggest assigning to `this'.
5298 * Makefile.in (decl.o): Depend on RTL_H.
5299 (decl2.o): Likewise.
5300 (class.o): Likewise.
5302 (method.o): Likewise.
5303 (search.o): Likewise.
5307 * decl.c (duplicate_decls): When a builtin function is redeclared
5308 as static, make sure it is mangled correctly.
5310 * ir.texi (CTOR_INITIALIZER): Remove mention. Fix typo. Add
5311 detail about the statement-tree.
5313 1999-09-20 Nathan Sidwell <nathan@acm.org>
5315 * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
5317 1999-09-20 Nick Clifton <nickc@cygnus.com>
5319 * decl2.c (lang_decode_option): Extend comment.
5321 Mon Sep 20 10:49:05 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5323 * typeck.c: Include "tm_p.h".
5325 1999-09-19 Mark Mitchell <mark@codesourcery.com>
5327 * ir.texi: New file.
5329 1999-09-19 Paul Burchard <burchard@pobox.com>
5331 * semantics.c (expand_stmt): Initialize return value.
5333 1999-09-18 Paul Burchard <burchard@pobox.com>
5335 * gxxint.texi: G++ now implements namespaces.
5337 1999-09-18 Mark Mitchell <mark@codesourcery.com>
5339 * decl.c (pop_label): Don't warn about unused labels more than
5341 * semantics.c (finish_goto_stmt): Always marked used labels as
5344 * decl.c (layout_var_decl): Change prototype. Call layout_decl
5345 even when the declaration is external.
5346 (cp_finish_decl): Adjust call to layout_var_decl.
5347 * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
5349 1999-09-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5351 * typeck.c (get_member_function_from_ptrfunc): Always consider
5352 virtuality inside member pointer.
5354 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5356 Turn on function-at-a-time processing.
5357 * cp-tree.h (doing_semantic_analysis_p): New macro.
5358 (SF_DEFAULT): Define to zero, not SF_EXPAND.
5359 (start_handler_parms): Change prototype.
5360 (expand_start_catch_block): Likewise.
5361 (expand_end_catch_block): Likewise.
5362 (expand_start_eh_spec): Likewise.
5363 (expand_end_eh_spec): Declare.
5364 (finish_handler_parms): Change prototype.
5365 (begin_catch_block): Declare.
5366 (finish_handler): Change prototype.
5367 (do_pushlevel): Declare.
5368 (do_poplevel): Likewise.
5369 * decl.c (pushlevel): Don't create
5370 binding levels when not doing semantic analysis.
5371 (poplevel): Don't pop them.
5372 (pushdecl): Assert that we are never called when not doing
5374 (pushdecl_top_level): Use push_to_top_level.
5375 (make_label_decl): Don't fiddle with obstacks. Make RTL For the
5376 label when expanding.
5377 (cp_finish_decl): Only inject for-scope variables when doing
5378 semantic analysis. Add comments.
5379 (start_handler_parms): Return the handler parm.
5380 (start_function): Reorganize. Don't clear DECL_INITIAL if it is
5381 already set. Reinitialize from saved function data if available.
5382 Don't pushlevel when not doing semantic analysis.
5383 (store_parm_decls): Only generate RTL when expanding. Only
5384 pushdecl when doing semantic analysis. Set
5385 current_eh_spec_try_block if appropriate.
5386 (finish_function): Simplify. Use do_pushlevel and do_poplevel.
5387 Combine common code. Don't poplevel when not doing semantic
5389 (push_cp_function_context): Don't expand functions without an
5390 explicit call to expand_body.
5391 (mark_lang_function): Make eh_spec_try_block and
5393 * except.c (expand_end_eh_spec): Don't
5395 (process_start_catch_block): Likewise.
5396 (push_eh_cleanup): Use finish_decl_cleanup.
5397 (initialize_handler_parm): New function.
5398 (expand_start_catch_block): Use it.
5399 (expand_end_catch_block): Use tree-generation functions, not
5400 RTL-generation functions.
5401 (expand_start_eh_spec): Likewise.
5402 (expand_end_eh_spec): Likewise.
5403 (expand_exception_blocks): Simplify.
5404 (start_anon_func): Use do_pushlevel.
5405 (end_anon_func): Use do_poplvel. Call expand_body for the
5407 * expr.c (do_case): Don't call define_case_label.
5408 * init.c (create_temporary_var): Set DECL_CONTEXT for local
5410 * method.c (emit_thunk): Call expand_body for the
5412 (sythesize_method): Likewise.
5413 * parse.y (handler_args): Give it ttype.
5414 (eat_saved_input): Call expand_body.
5415 (base_init): Use do_pushlevel.
5416 (pending_inline): Call expand_body.
5417 (handler): Adjust calls to finish_handler_parms and
5419 (handler_args): Don't call expand_start_catch_block. Return the
5420 catch parameter. * pt.c (tsubst_expr): Adjust HANDLER handling.
5421 * parse.c: Regenerated.
5422 * rtti.c (synthesize_tinfo_fn): Call finish_function.
5423 * semantics.c (do_pushlevel): Give it external linkage. Build
5425 (do_poplevel): Likewise.
5426 (finish_case_label): Call define_case_label when doing semantic
5428 (finish_goto_stmt): Create RTL for labels.
5429 (finish_function_try_block): Set in_function_try_handler
5431 (finish_function_handler_sequence): Unset it.
5432 (finish_handler_parms): Use expand_start_catch_block even when
5433 building a statement-tree.
5434 (begin_catch_block): New function.
5435 (finish_handler): Move a little RTL-generation logic here.
5436 (finish_decl_cleanup): Allow cleanups for empty declarations.
5437 (finish_named_return_value): Don't pushdecl when not doing
5439 (expand_stmt): Don't do semantic analysis for variable
5440 declarations. Handle START_CATCH_STMT. Call expand_label
5441 directly for a LABEL_STMT. Tweak handling of GOTO_STMT. Adjust
5442 HANDLERs. Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
5443 (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
5444 RETURN_INIT and function try blocks.
5446 * cp-tree.h (language_function): Add x_eh_spec_try_block. Add
5447 x_scope_stmt_stack. Add x_in_charge_parm.
5448 (current_eh_spec_try_block): New macro.
5449 (current_scope_stmt_stack): Likewise.
5450 (current_in_charge_parm): Likewise.
5451 * decl.c (start_function): Initialize current_in_charge_parm.
5452 (finish_function): Use current_in_charge_parm rather than looking
5454 * search.c (expand_indirect_vtbls_init): Likewise.
5456 * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
5457 (TRY_BLOCK): Likewise.
5458 (HANDLER): Likewise.
5459 (START_CATCH_STMT): New tree node.
5460 (SCOPE_STMT): Likewise.
5461 * cp-tree.h (SCOPE_BEGIN_P): New macro.
5462 (SCOPE_NULLIFIED_P): Likewise.
5463 (struct lang_decl_flags): Add pending_inline_p. Adjust dummy.
5464 (struct lang_decl): Add saved_language_function.
5465 (DECL_PENDING_INLINE_INFO): Adjust documentation.
5466 (DECL_PENDING_INLINE_P): New macro.
5467 (TYPE_TI_ARGS): Fix typo in comment.
5468 (DECL_SAVED_TREE): Add to documentation.
5469 (DECL_SAVED_FUNCTION_DATA): New macro.
5470 (START_CATCH_TYPE): Likewise.
5471 (SCOPE_END_P): New macro.
5472 (declare_parm_level): Don't declare.
5473 * decl.c (mark_lang_function): New function, split out from
5474 mark_cp_function_context.
5475 (save_function_data): New function.
5476 (declare_parm_level): Remove.
5477 (finish_function): Use save_function_data to squirrel away
5478 important stuff for later use.
5479 (mark_cp_function_context): Use mark_function_data.
5480 (lang_mark_tree): Likewise.
5481 * lex.c (begin_definition_of_inclass_inline): Set
5482 DECL_PENDING_INLINE_P.
5483 (store_pending_inline): Clear it.
5484 * pt.c (tsubst_decl): Likewise.
5486 1999-09-17 Nathan Sidwell <nathan@acm.org>
5488 * call.c (perform_implicit_conversion): Deal with error_mark_node.
5490 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5492 * decl.c (warn_extern_redeclared_static): Don't get confused by
5493 static member functions.
5494 (duplicate_decls): Merge DECL_THIS_STATIC.
5496 * decl.c (expand_static_init): Make sure assignments to local
5497 statics actually occur.
5499 1999-09-17 Mark Mitchell <mark@codesourcery.com>
5501 * cp-tree.h (poplevel_class): Declare.
5502 * class.c (popclass): Use poplevel_class, not poplevel.
5503 * decl.c (poplevel_class): Don't make it static. Don't return a
5505 (poplevel): Don't call poplevel_class; abort in a class
5506 binding level is seen.
5507 * semantics.c (finish_translation_unit): Use pop_everything.
5508 * parse.y (member_init): Allow errors.
5509 (pending_inline): Call finish_function.
5510 * parse.c: Regenerated.
5511 * Makefile.in (CONFLICTS): Adjust.
5513 1999-09-17 Gabriel Dos Reis <gdr@codesourcery.com>
5515 * error.c: Reduce code duplication.
5516 (dump_template_value): New function.
5517 (dump_type_real): Use it.
5518 (dump_decl): Likewise.
5519 (dump_function_name): Likewise.
5520 (dump_function_decl): Don't be too talkative about function return
5523 1999-09-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5525 * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
5527 * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
5529 1999-09-16 Jason Merrill <jason@yorick.cygnus.com>
5531 * decl2.c (finish_file): Also call check_global_declarations for
5532 the pending_statics list.
5534 1999-09-15 Jason Merrill <jason@yorick.cygnus.com>
5536 * lex.c (cp_pragma_implementation): Allow #pragma implementation
5539 1999-09-15 Richard Henderson <rth@cygnus.com>
5541 * lex.c (mark_impl_file_chain): Follow the next chain.
5543 1999-09-15 Mark Mitchell <mark@codesourcery.com>
5545 * decl.c (warn_extern_redeclared_static): Simplify. Catch
5546 problems with extern "C" functions redeclared as static.
5547 (duplicate_decls): When a builtin is redeclared static, make the
5548 new function have internal linkage.
5550 1999-09-15 Mark Mitchell <mark@codesourcery.com>
5552 * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
5553 * pt.c (tsubst_copy): Likewise.
5554 * tree.c (search_tree): Likewise.
5557 1999-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5559 * typeck2.c (ack): Don't declare progname.
5561 1999-09-14 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
5563 * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
5564 filenames with ggc_alloc_string.
5566 1999-09-14 Mark Mitchell <mark@codesourcery.com>
5568 * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the
5570 * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
5572 * cvt.c (build_up_reference): Likewise.
5573 * tree.c (build_cplus_new): Likewise.
5574 (get_target_expr): Likewise.
5576 Tue Sep 14 01:45:10 1999 Marc Espie <espie@cvs.openbsd.org>
5578 * Makefile.in: Prepend $(SHELL) to move-if-change calls.
5580 1999-09-13 Mark Mitchell <mark@codesourcery.com>
5582 * cp-tree.h (build_target_expr): New function.
5583 * call.c (build_conditional_expr): Use build_target_expr.
5584 (convert_like): Likewise.
5585 (build_over_call): Likewise.
5586 * cvt.c (build_up_reference): Likewise.
5587 * decl.c (build_cleanup_on_safe_obstack): Fold into ...
5588 (destroy_local_var): Here.
5589 (build_target_expr): New function.
5590 * tree.c (build_cplus_new): Use it.
5591 (get_target_expr): Likewise.
5593 1999-09-13 Nathan Sidwell <nathan@acm.org>
5595 * typeck.c (expr_sizeof): Don't decay arrays and functions.
5596 Remove misleading comment.
5597 (build_compound_expr): Don't decay arrays.
5599 1999-09-13 Jason Merrill <jason@yorick.cygnus.com>
5601 * call.c (build_conditional_expr): Always use a TARGET_EXPR for
5602 class rvalues again.
5604 Sun Sep 12 23:29:07 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5606 * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
5608 * g++spec.c: Include gcc.h.
5609 (lang_specific_driver): Constify a char*. Call xcalloc, not
5610 xmalloc/bzero. All calls to the function pointer parameter now
5611 explicitly call `fatal'.
5613 1999-09-12 Mark Mitchell <mark@codesourcery.com>
5615 * call.c (implicit_conversion): Robustify. Handle OFFSET_REFs.
5616 * cvt.c (ocp_convert): Complete the from and destination types.
5617 Adjust warning about functions always being `true' in conditionals.
5618 * decl.c (duplicate_decls): Don't play funny games with abort.
5619 * error.c (dump_expr): Handle OVERLOADs.
5620 * spew.c (probe_obstack): Remove.
5621 * typeck.c (condition_conversion): Use perform_implicit_conversion.
5623 1999-09-12 Bernd Schmidt <bernds@cygnus.co.uk>
5625 * cp-tree.h (auto_function, define_function): Adjust prototypes.
5626 * decl.c (define_function): Lose FUNCTION_CODE arg. All callers
5628 (auto_function): Likewise, for CODE arg.
5629 Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
5630 (builtin_function): ... here.
5632 1999-09-11 Mark Mitchell <mark@codesourcery.com>
5634 * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
5635 (init_decl_processing): Don't set TREE_PERMANENT for the
5637 (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
5638 (grokdeclarator): Likewise.
5639 (grokparms): Don't check TREE_PERMANENT when building up lists.
5640 * decl2.c (grokfield): Don't assert TREE_PERMANENT.
5641 (mark_inline_for_output): Likewise.
5642 * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
5643 * init.c (build_offset_ref): Don't check TREE_PERMANENT.
5644 * lex.c (check_newline): Don't check ggc_p; it is always one.
5645 * pt.c (process_template_parm): Don't check TREE_PERMANENT.
5646 * spew.c (yylex): Don't copy_node or probe_obstacks for
5647 non-permanent CONSTANTs and STRINGs.
5648 * tree.c (build_cplus_array_type_1): Don't fuss with
5649 TREE_PERMANENT on ARRAY_TYPEs.
5651 * cp-tree.def (CLEANUP_STMT): New node.
5652 * cp-tree.h (language_function): Add name_declared.
5653 (current_function_name_declared): New macro.
5654 (CLEANUP_DECL): New macro.
5655 (CLEANUP_EXPR): Likewise.
5656 (emit_local_var): Likewise.
5657 (finish_decl_cleanup): New function.
5658 * cvt.c (build_up_reference): Simplify.
5659 (ocp_convert): Remove dead code.
5660 * decl.c (start_decl): Remove call to add_decl_stmt.
5661 (grok_reference_init): Adjust, to handle bindings temporaries to
5662 references. Remove dead code.
5663 (initialize_local_var): Don't generate RTL for
5664 declarations here, or build cleanups here. Don't fuss with
5665 obstacks. Replace expand_start_target_temps calls with explicit
5666 setting of stms_are_full_exprs_p.
5667 (destroy_local_var): New function.
5668 (emit_local_var): Likewise.
5669 (cp_finish_decl): Use them, as appropriate.
5670 (start_function): Announce template functions.
5671 (store_parm_decls): Don't call declare_function_name here.
5672 (finish_stmt): Don't start emit base-initialization code when just
5673 building the statement-tree.
5674 * init.c (create_temporary_var): Move add_decl_stmt call ...
5675 (get_temp_regvar): Here.
5676 * pt.c (tsubst_expr): Make DECL_INITIAL look like what
5677 cp_finish_decl would expect. Don't call add_decl_stmt.
5678 * semantics.c (begin_compound_stmt): Call declare_function_name,
5680 (finish_decl_cleanup): New function.
5681 (expand_stmt): Use emit_local_var to output variables.
5682 (expand_body): Set current_funtion_name_declared.
5684 1999-09-10 Mark Mitchell <mark@codesourcery.com>
5686 * cp-tree.h (finish_cleanup_try_block): New function.
5687 * semantics.c (finish_cleanup_try_block): Add comment.
5689 Fri Sep 10 10:32:32 1999 Bernd Schmidt <bernds@cygnus.co.uk>
5691 * cp-tree.h: Delete declarations for all tree nodes now moved to
5693 * decl.c: Delete their definitions.
5694 (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
5695 FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
5697 (init_decl_processing): Call build_common_tree_nodes and
5698 build_common_tree_nodes_2 instead of building their nodes here.
5699 Don't add gc roots for them.
5701 1999-09-10 Mark Mitchell <mark@codesourcery.com>
5703 * cp-tree.h (language_function): Rename expanding_p to
5704 x_expanding_p. Rename named_label_uses to x_named_label_uses.
5705 (expanding_p): Adjust accordingly.
5706 (TREE_VIA_PRIVATE): Fix typo in comment.
5707 (DECL_REFERENCE_SLOT): Remove.
5708 (SET_DECL_REFERENCE_SLOT): Likewise.
5709 * decl.c (named_label_uses): Adjust. Remove chicken comment.
5710 (push_overloaded_decl): Don't truncate the chain of bindings when
5711 adding an overloaded function.
5712 (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
5713 (initialize_local_var): Fix typo in comment.
5714 (store_parm_decls): Don't set DECL_REFERENCE_SLOT. Tidy up.
5715 * decl2.c (start_objects): Make the fact that we are expanding
5716 the generated function right away explicit.
5717 (start_static_storage_duration_function): Likewise.
5718 (finish_file): Fix typo in comment.
5719 * init.c (build_vec_init): Correct bugs in handling cleanups.
5720 * semantics.c (maybe_convert_cond): New function.
5721 (FINISH_COND): Always store the condition, even if there's
5723 (finish_if_stmt_cond): Use maybe_convert_cond.
5724 (finish_while_stmt_cond): Likewise.
5725 (finish_do_stmt): Likewise.
5726 (finish_for_cond): Likewise.
5727 (expand_cond): Adjust.
5729 * cp-tree.h (FN_TRY_BLOCK_P): New macro.
5730 * init.c (perform_member_init): Remove obstack machinations.
5731 (expand_cleanup_for_base): Likewise.
5732 (finish_init_stmts): Mark the statement-expression as used.
5733 * method.c (emit_thunk): Use tree-generating functions, not
5735 (do_build_copy_constructor): Likewise.
5736 (do_build_assign_ref): Likewise.
5737 (synthesize_method): Likewise. Keep track of line numbers.
5738 * pt.c (tsubst_expr): Handle various kinds of try blocks.
5739 * semantics.c (expand_stmts): Remove.
5740 (begin_function_try_block): Set FN_TRY_BLOCK_P.
5741 (finish_function_try_block): Be careful rechaining
5742 function try blocks.
5743 (expand_stmt): Loop through all the statements at a given level.
5744 (exapnd_body): Be careful with line-numbers here too. Prepare for
5745 being called directly from the parser.
5747 * cp-tree.h (finish_function): Adjust prototype.
5748 * decl.c (finish_function): Return the function compiled.
5749 * pt.c (instantiate_decl): Don't play games with obstacks.
5750 * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
5751 (search_tree): Likewise.
5752 * typeck.c: Fix typo in comment.
5753 * typeck2.c (store_init_value): Add comment.
5755 * cp-tree.h (CPTI_ATEXIT): New macro.
5756 (atexit_node): Likewise.
5757 * decl.c (destroy_local_static): New function, broken out from ...
5758 (expand_static_init): Here.
5760 * rtti.c (get_tinfo_var): These should always be global
5761 (expand_si_desc): Use tree, not RTL, functions to generate code.
5762 (expand_class_desc): Likewise.
5763 (expand_ptr_desc): Likewise.
5764 (expand_attr_desc): Likewise.
5765 (expand_generic_desc): Likewise.
5766 (synthesize_tinfo_fn): Likewise.
5768 1999-09-09 Mark Mitchell <mark@codesourcery.com>
5770 * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
5771 (RECHAIN_STMTS_FROM_LAST): Remove. Replace all uses with
5773 (RECHAIN_STMST_FROM_CHAIN): Likewise.
5775 * parse.y (simple_stmt): Fix typo in last change.
5777 * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
5778 (STMT_IS_FULL_EXPR_P): Likewise.
5779 (STMT_LINENO_FOR_FN_P): Likewise.
5780 (prep_stmt): New function.
5781 (building_stmt_tree): Tweak for safety.
5782 * pt.c (tsubst_expr): Use prep_stmt throughout.
5783 (add_tree): Move it to semantics.c
5784 * semantics.c (add_tree): Move it here.
5785 (finish_expr_stmt_real): New function.
5786 (finish_expr_stmt): Use it.
5787 (finish_if_stmt_cond): Use FINISH_COND.
5788 (finish_while_stmt_cond): Likewise.
5789 (finish_for_cond): Likewise.
5790 (finish_stmt_tree): Tweak line-number handling.
5791 (prep_stmt): New function.
5792 (expand_stmt): Use it.
5794 * cp-tree.h (begin_switch_stmt): Adjust prototype.
5795 (finish_switch_cond): Likewise.
5796 * parse.y (simple_stmt): Adjust accordingly.
5797 * parse.c: Regenerated.
5798 * pt.c (tsubst_expr): Adjust accordingly.
5799 * semantics.c (expand_cond): New function.
5800 (FINISH_COND): New macro.
5801 (begin_switch_stmt): Build the SWITCH_STMT here.
5802 (finish_switch_stmt_cond): Not here.
5803 (expand_stmt): Adjust calls to begin_switch_stmt and
5804 finish_switch_cond. Use expand_cond throughout.
5806 * dump.c (dequeue_and_dump): Dump types for constants.
5807 Describe DECL_ARG_TYPE more intuitively.
5810 * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
5811 (lang_cleanup_tree): Remove.
5812 * lex.c (make_lang_type): Use ggc_alloc to allocate
5815 Reorganize per-function data.
5816 * cp-tree.h (saved_scope): Add function_decl, bindings.
5817 (language_function): Rename binding_level to bindings.
5818 (cp_function_chain): Use the current_function, not the
5819 outer_function_chain.
5820 (current_class_ptr): Make it work, even when there's no
5822 (current_class_ref): Likewise.
5823 (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New
5825 (clear_temp_name): Remove.
5826 * decl.c (check_function_type): New function, broken out from
5828 (current_binding_level): Adjust definition.
5829 (pushlevel): Simplify.
5830 (poplevel): Don't use named_label_uses when we're outside
5832 (mark_saved_scope): Mark function_decl and bindings.
5833 (maybe_push_to_top_level): Don't unconditionally push a new
5834 function context. Save bindings and the current_function_decl.
5835 Don't clear named_labels.
5836 (pop_from_top_level): Pop function context if appropriate.
5837 (init_decl_processing): Set init_lang_status and free_lang_status,
5838 rather than save_lang_status and restore_lang_status.
5839 (start_function): Take SF_* flags. Don't clear per-function data.
5840 Reorder and simplify to use new per-function data code. Add
5842 (store_parm_decls): Don't call init_function_start here.
5843 (finish_function): Adjust for new handling of per-function data.
5844 (push_cp_function_context): Simplify.
5845 (mark_cp_function_context): Change binding_level to bindings.
5846 * decl2.c (clear_temp_name): Remove.
5847 (start_objects): Use SF flags to start_function.
5848 (start_static_storage_duration_function): Likewise.
5849 * except.c (start_anon_func): Remove redundant calls to
5850 push_function_context_to. Use SF flags to start function.
5851 (end_anon_func): Remove redundant call to pop_function_context
5853 * lex.c (reinit_parse_for_function): Don't initialize per-function
5855 * method.c (emit_thunk): Clear current_function after calling
5856 assemble_end_function. Use SF flags for start_function.
5857 (synthesize_method): Use SF flags for start_function.
5858 * parse.c: Regenerated.
5859 * parse.y (fn.defpen): Likewise.
5860 (pending_inline): Clear current_function, even if something goes
5862 * pt.c (instantiate_decl): Use SF flags to start_function.
5863 Don't save and restore expanding_p.
5864 (add_tree): Handle the case where we are outside any function.
5865 (end_tree): Likewise.
5866 * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
5867 * semantics.c (begin_function_definition): Likewise.
5868 (expand_body): Likewise.
5870 1999-09-09 Nathan Sidwell <nathan@acm.org>
5872 * cp-tree.h (convert_to_void): Prototype new function.
5873 (require_complete_type_in_void): Remove prototype.
5874 * cvt.c (convert_to_void): New function.
5875 (ocp_convert): Use convert_to_void.
5876 * decl.c (cplus_expand_expr_stmt): Likewise, for complete
5878 * typeck.c (require_complete_type_in_void): Remove function.
5879 (build_compound_expr): Use convert_to_void.
5880 (build_static_cast): Likewise.
5881 (build_c_cast): Likewise.
5882 * semantics.c (finish_expr_stmt): Do not decay full expressions.
5884 * typeck.c (build_x_compound_expr): Add FIXME.
5886 1999-09-08 Mark Mitchell <mark@codesourcery.com>
5888 * cp-tree.h (scratch_tree_cons): Remove.
5889 * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
5890 and perm_tree_cons with plain tree_cons.
5891 * class.c: Likewise.
5893 * decl2.c: Likewise.
5894 * except.c: Likewise.
5898 * method.c: Likewise.
5899 * parse.y: Likewise.
5903 * search.c: Likewise.
5904 * typeck.c: Likewise.
5905 * parse.c: Regenerated.
5906 * tree.c (build_srcloc): Simplify.
5908 1999-09-08 Bruce Korb autogen@linuxbox.com
5910 * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
5912 1999-09-08 Mark Mitchell <mark@codesourcery.com>
5914 * cp-tree.h (lang_decl_flags): Remove permanent_attr.
5916 (LANG_DECL_PERMANENT): Remove.
5917 * decl.c (duplicate_decls): Don't mess about with obstacks trying
5919 (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
5920 * lex.c (free_lang_decl_chain): Remove.
5921 (build_lang_decl): Don't use obstacks.
5922 (retrofit_lang_decl): Likewise.
5923 (copy_lang_decl): Likewise.
5925 * cp-tree.h (saved_scope): Remove old_binding_level and
5926 function_decl. Tidy up.
5927 * decl.c (mark_saved_scope): Don't set them.
5928 (maybe_push_to_top_level): Clear memory.
5930 * decl.c (layout_var_decl): Change prototype. Don't complete
5931 types for external objects.
5932 (check_initializer): Likewise. Tidy.
5933 (initialize_local_var): Complete types here.
5934 (cp_finish_decl): Not here. Reorganize a little.
5935 (grokvardecl): Don't complete types here.
5937 * decl.c (start_function): Clear last_dtor_insn and
5938 last_parm_cleanup_insn.
5939 (push_cp_function_context): Just copy over a little of
5940 the old context, not all of it.
5942 * cp-tree.h (copy_to_permanent): Remove.
5943 (permanent_p): Likewise.
5944 * decl.c (building_typename_type): Don't use copy_to_permanent.
5945 (start_decl): Likewise.
5946 (grok_reference_init): Likewise.
5947 (cp_finish_decl): Likewise.
5948 * init.c (build_new_1): Don't use mapcar.
5949 (build_vec_delete_1): Don't use copy_to_permanent.
5950 (build_vec_init): Likewise.
5951 * parse.y (primary): Likewise.
5952 * parse.c: Regenerated.
5953 * pt.c (push_template_decl_real): Don't use copy_to_permanent.
5954 (lookup_template_class): Likewise.
5955 (tsubst_friend_function): Likewise.
5956 (instantiate_class_template): Likewise.
5957 (tsubst_decl): Likewise.
5959 (instantiate_template): Likewise.
5961 * rtti.c (get_tinfo_fn): Likewise.
5962 (build_dynamic_cast): Likewise.
5963 * semantics.c (finish_if_stmt_cond): Likewise.
5964 (finish_while_stmt_cond): Likewise.
5965 (finish_do_stmt): Likewise.
5966 (finish_for_cond): Likewise.
5967 (finish_for_expr): Likewise.
5968 (finish_cleanup): Likewise.
5969 (add_decl_stmt): Likewise.
5970 (finish_named_return_value): Likewise.
5971 (finish_qualified_call_expr): Likewise.
5972 * tree.c (perm_manip): Remove.
5973 (build_exception_variant): Don't use copy_to_permanent.
5974 (permanent_p): Remove.
5975 (copy_to_permament): Remove.
5976 (build_min_nt): Don't use copy_to_permanent.
5977 (build_min): Likewise.
5978 (min_tree_cons): Likewise.
5979 * typeckc.c (build_static_cast): Likewise.
5980 (build_reinterpret_cast): Likewise.
5981 (build_const_cast): Likewise.
5983 1999-09-07 Mark Mitchell <mark@codesourcery.com>
5985 * decl.c (ggc_p): Set it to 1.
5986 (mark_saved_scope): Add prototype.
5988 1999-09-07 Richard Henderson <rth@cygnus.com>
5990 * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
5991 * typeck.c (self_promoting_args_p): Delete.
5993 1999-09-07 Jason Merrill <jason@yorick.cygnus.com>
5995 * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
5996 (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
5998 1999-09-07 Mark Mitchell <mark@codesourcery.com>
6000 * Makefile.in (tree.o): Depend on ggc.h.
6001 * class.c (make_method_vec): Remove.
6002 (free_method_vec): Likewise.
6003 (free_method_vecs): Remove.
6004 (add_method): Don't use them.
6005 * cp-tree.def (PTRMEM_CST): Make it longer.
6006 (TEMPLATE_PARM_INDEX): Make it shorter.
6007 * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
6008 (template_parm_index): Remove RTL field.
6009 (ptrmem_cst): Add RTL field.
6010 (finish_function): Removed parameter.
6011 (process_next_inline): Change prototype.
6012 (init_cplus_unsave): Rename to init_tree.
6013 (binding_init): Remove.
6014 * decl.c (free_binding_nodes): Remove.
6015 (push_binding): Don't use them. Set BINDING_HAS_LEVEL_P.
6016 (pop_binding): Don't use free_binding_nodes.
6017 (free_binding_vecs): Remove.
6018 (store_bindings): Don't use them.
6019 (pop_from_top_level): Likewise.
6020 (lookup_namespace_name): Simplify.
6021 (build_typename_type): Don't use obstack_free.
6022 (unqualified_namespace_lookup): Simplify.
6023 (lookup_name_real): Simplify.
6024 (start_function): Remove comment about leaks.
6025 (finish_function): Removed nested parameter. Call
6026 expand_end_bindings even when building_stmt_tree.
6027 Call ggc_push_context and ggc_pop_context around
6028 rest_of_compilation, if necessary.
6029 (mark_cp_function_context): Handle a NULL language-context.
6030 (lang_mark_false_label_stack): Fix typo.
6031 (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
6032 TEMPLATE_PARM_INDEX. Handle the funny TYPE_LANG_SPECIFIC on
6033 pointer to method types.
6034 (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
6035 * decl2.c (finish_objects): Adjust call to finish_function.
6036 (finish_static_store_duration_function): Likewise.
6037 (do_nonmember_using_decl): Remove call to binding_init.
6038 * except.c (end_anon_func): Adjust call to finish_function.
6039 * lex.c (mark_impl_file_chain): New function.
6040 (init_parse): Call init_tree, not init_cplus_unsave.
6042 (cp_pramga_interface): Use xmalloc, not permalloc.
6043 (cp_pragma_implementation): Likewise.
6044 (begin_definition_of_inclass_inline): Simplify.
6045 (process_next_inline): Adjust prototype.
6046 (do_scoped_id): Don't call binding_init.
6047 (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
6048 * method.c (emit_thunk): Adjust call to finish_function.
6049 (synthesize_method): Likewise.
6050 * parse.y (%union): Add a new `pi' variant.
6051 (PRE_PARSED_FUNCTION_DECL): Use it.
6052 (fn.defpen): Likewise.
6053 (fndef): Adjust call to finish_function.
6054 * pt.c (instantiate_decl): Likewise.
6055 * rtti.c (syntheisze_tinfo_fn): Likewise.
6056 * semantics.c (expand_body): Likewise.
6057 * tree.c: Include ggc.h.
6058 (mark_list_hash): New function.
6059 (binding_init): Remove.
6060 (init_cplus_unsave): Rename to ...
6061 (init_tree): This. Add GC roots.
6063 1999-09-05 Mark Mitchell <mark@codesourcery.com>
6065 Get ready for garbage collection.
6066 * Makefile.in (CXX_TREE_H): Add varray.h
6067 (lex.o): Depend on ggc.h.
6069 (decl2.o): Likewise.
6070 (method.o): Likewise.
6071 (search.o): Likewise.
6074 * class.c: Include ggc.h.
6075 (current_class_name): Remove.
6076 (current_class_type): Likewise.
6077 (current_access_specifier): Likewise.
6078 (previous_class_type): Likewise.
6079 (previous_class_values): Likewise.
6080 (class_cache_firstobj): Likewise.
6081 (current_lang_base): Likewise.
6082 (current_lang_stack): Likewise.
6083 (current_lang_stacksize): Likewise.
6084 (lang_name_c): Likewise.
6085 (lang_name_cplusplus): Likewise.
6086 (lang_name_java): Likewise.
6087 (current_lang_name): Likewise.
6088 (base_layout_decl): Likewise.
6089 (access_default_node): Likewise.
6090 (access_public_node): Likewise.
6091 (access_protected_node): Likewise.
6092 (access_private_node): Likewise.
6093 (access_default_virtual_node): Likewise.
6094 (access_public_virtual_node): Likewise.
6095 (access_protected_virtual_node): Likewise.
6096 (access_private_virtual_node): Likewise.
6097 (signed_zero_node): Likewise.
6098 (init_class_processing): Don't build base_layout_decl.
6099 (push_lang_context): Adjust now that current_lang_base is a varray.
6100 (pop_lang_context): Likewise.
6101 * cp-tree.h: Include varray.h.
6102 (cp_global_trees): Add access_default, access_public,
6103 access_protected, access_private, access_default_virtual,
6104 access_public_virtual, access_protected_virtual,
6105 access_private_virtual, ctor_identifier, delta2_identifier,
6106 delta_identifier, dtor_identifier, in_charge_identifier,
6107 index_identifier, nelts_identifier, this_identifier,
6108 pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
6109 lang_name_c, lang_name_cplusplus, lang_name_java,
6110 empty_except_spec, null, jclass, minus_one, terminate.
6111 (saved_scope): Move here from decl.c. Define globals in terms of
6112 saved_scope: current_namespace, current_class_name,
6113 current_class_type, current_access_specifier, current_lang_stack,
6114 current_lang_base, current_lang_name, current_function_parms,
6115 current_template_parms, processing_template_decl,
6116 processing_specialization, processing_explicit_instantiation,
6117 previous_class_type, previous_class_values, class_cache_firstobj.
6118 (scope_chain): New variable.
6119 (init_pt): New function.
6120 * decl.c (current_namespace): Remove.
6121 (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
6122 (dtor_identifier, pfn_identifier, index_identifier): Likewise.
6123 (delta_identifier, delta2_identifier): Likewise.
6124 (pfn_or_delta2_identifier, tag_identifier): Likewise
6125 (vt_off_identifier, empty_except_spec, null_node): Likewise.
6126 (current_function_parms, current_lang_base): Remove.
6127 (current_lang_stack, previous_class_values): Remove.
6128 (class_binding_level): Macroize.
6129 (saved_scope): Remove.
6130 (current_saved_scope): Rename to scope_chain.
6131 (mark_saved_scope): Adjust for new scope structure.
6132 (maybe_push_to_top_level): Likewise.
6133 (pop_from_top_level): Likewise.
6134 (duplicate_decls): Adjust now that current_lang_base is a varray.
6135 (build_typename_type): Call ggc_add_tree_hash_table_root.
6136 (init_decl_processing): Call init_pt. Call push_to_top_level to
6137 set up globals. Add GC roots.
6138 (xref_basetypes): Adjust now that current_lang_base is a varray.
6139 * decl.h (this_identifier): Remove.
6140 (in_charge_identifier): Likewise.
6141 * decl2.c: Don't include varray.h.
6142 (current_namespace): Remove.
6143 (init_decl2): Add GC roots.
6144 * except.c (Terminate): Remove.
6145 (init_exception_processing): Use terminate_node instead.
6146 (build_terminate_handler): Likewise.
6147 * init.c (nc_nelts_field_id): Remove.
6148 (minus_one): Likewise.
6149 (init_init_processing): Use minus_one_node and nelts_identifier
6150 instead. Add GC roots.
6151 (jclass_node): Remove.
6152 (build_new_1): Use nelts_identifier.
6153 (build_vec_init): Likewise.
6154 (build_vec_delete): Likewise.
6155 * lex.c: Include ggc.h.
6156 (defarg_fn): Move declaration early.
6157 (defarg_parms): Likewise.
6158 (init_parse): Add GC roots.
6159 (handle_cp_pragma): Remove redundant declaration of
6161 * method.c: Include ggc.h.
6162 (btypelist): Make it a varray. All uses changed.
6163 (ktypelist): Likewise.
6164 (init_method): Add GC roots.
6165 * pt.c: Don't include varray.h. Include ggc.h.
6166 (current_template_parms): Remove.
6167 (processing_template_decl): Likewise.
6168 (processing_specialization): Likewise.
6169 (processing_explicit_instantiation): Likewise.
6170 (init_pt): New function.
6171 * repo.c: Include ggc.h.
6172 (init_repo): Add GC roots.
6173 * search.c: Don't include varray.h.
6174 (_vptr_name): Remove.
6175 (lookup_field_1): Use vtpr_identifier instead.
6176 (expand_indirect_vtbls_init): Remove redundant declaration of
6177 in_charge_identifier.
6178 (init_search_processing): Use vptr_identifier.
6180 1999-09-05 Richard Henderson <rth@cygnus.com>
6181 Bernd Schmidt <bernds@cygnus.co.uk>
6182 Mark Mitchell <mark@codesourcery.com>
6184 * Makefile.in (parse.o): Depend on ggc.h.
6185 (decl2.o): Depend on ggc.h.
6186 (init.o): Depend on ggc.h.
6187 * cp-tree.h (init_decl2): Declare.
6188 (cp_parse_init): Likewise.
6189 * decl.c (ggc_p): Define to zero.
6190 (mark_saved_scope): New function.
6191 (init_decl_processing): Call cp_parse_init, and cp_decl2.
6193 (expand_static_init): Add GC roots.
6194 * decl2.c: Include ggc.h.
6195 (init_decl2): New function.
6196 * init.c: Include ggc.h.
6197 (init_init_processing): Add GC roots.
6198 * parse.y: Include ggc.h.
6199 (cp_parse_init): New function.
6201 1999-09-04 Mark Mitchell <mark@codesourcery.com>
6203 * decl.c (init_decl_processing): Set mark_lang_status.
6204 (lang_mark_false_label_stack): Adjust prototype.
6205 * decl2.c (grok_function_init): Remove extraneous declaration of
6208 * Make-lang.in (cc1plus): Remove dependency on GGC.
6209 * Makefile.in (OBJS): Don't mention ggc-simple.o.
6210 (OBJDEPS): Don't mention ggc-simple.o.
6212 * Make-lang.in (cc1plus): Depend on $(GGC).
6213 * Makefile.in (OBJS): Add ggc-simple.o.
6214 (OBJDEPS): Likewise.
6215 * cp-tree.h (language_function): Rename members to `x_' versions;
6216 we now have x_named_labels, x_ctor_label, x_dtor_label,
6217 x_base_init_list, x_member_init_list, x_base_init_expr,
6218 x_current_class_ptr, x_current_class_ref, x_last_tree,
6219 x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
6221 (dtor_label, ctor_label, current_base_init_list,
6222 current_member_init_list, base_init_expr, current_class_ptr,
6223 current_class_ref, last_tree, last_expr_type): Adjust accordingly.
6224 * decl.c: Include ggc.h.
6225 (last_dtor_insn): Adjust to use x_ names.
6226 (last_parm_cleanup_insn): Likewise.
6227 (original_result_rtx): Likewise.
6228 (named_labels): Likewise.
6229 (mark_binding_level): New function.
6230 (mark_cp_function_context): Likewise.
6231 (mark_false_label_stack): Likewise.
6232 (lang_mark_tree): Likewise.
6233 (lang_cleanup_tree): Likewise.
6235 1999-09-03 Mark Mitchell <mark@codesourcery.com>
6237 * Makefile.in (CXX_TREE_H): Include function.h.
6238 (decl.o): Don't depend on function.h.
6239 (decl2.o): Likewise.
6240 (typeck.o): Likewise.
6242 (method.o): Likewise.
6243 * cp-tree.h: Include function.h.
6244 (cp_function): Rename to language_function. Remove next.
6245 (cp_function_chain): Make it a macro, not a variable.
6246 (push_cp_function_context): Don't declare.
6247 (pop_cp_function_context): Likewise.
6248 * decl.c: Don't include function.h.
6249 (push_cp_function_context): Make it static. Make it suitable for
6250 a save_lang_status callback.
6251 (pop_cp_function_context): Likewise.
6252 (maybe_push_to_top_level): Call push_function_context_to, not
6253 push_cp_function_context.
6254 (pop_from_top_level): Call pop_function_context_from, not
6255 pop_cp_function_context.
6256 (init_decl_processing): Set save_lang_status and
6257 restore_lang_status. Call push_function_context_to, not
6258 push_cp_function_context.
6259 (cp_function_chain): Remove.
6260 * decl2.c: Don't include function.h.
6261 * except.c: Don't include function.h.
6262 (start_anon_func): Call push_function_context_to, not
6263 push_cp_function_context.
6264 (end_anon_func): Call pop_function_context_from, not
6265 pop_cp_function_context.
6266 * init.c: Don't include function.h.
6267 * lex.c (begin_definition_of_inclass_inline): Call
6268 push_function_context_to, not push_cp_function_context.
6269 (process_next_inline): Call pop_function_context_from, not
6270 pop_cp_function_context.
6271 * method.c: Don't include function.h.
6272 (synthesize_method): Call push_function_context_to, not
6273 push_cp_function_context. Call pop_function_context_from, not
6274 pop_cp_function_context.
6275 * typeck.c: Don't include function.h.
6277 * decl.c (expand_static_init): Tweak handling of static
6278 initializations for objects without constructors.
6280 1999-09-03 Nathan Sidwell <nathan@acm.org>
6282 * typeck.c (build_indirect_ref): Reject dereference of pointer to
6285 1999-09-02 Mark Mitchell <mark@codesourcery.com>
6287 * cp-tree.h (cp_function): Move here, from decl.c.
6288 (cp_function_chain): Declare.
6289 (dtor_label): New macro, instead of variable.
6290 (ctor_label): Likewise.
6291 (current_base_init_list): Likewise.
6292 (current_member_init_list): Likewise.
6293 (base_init_expr): Likewise.
6294 (current_class_ptr): Likewise.
6295 (current_class_ref): Likewise.
6296 (last_tree): Likewise.
6297 (last_expr_type): Likewise.
6298 (current_function_returns_value): Likewise.
6299 (current_function_returns_null): Likewise.
6300 (current_function_just_assigned_this): Likewise.
6301 (current_function_parms_stored): Likewise.
6302 (temp_name_counter): Likewise.
6303 (static_labelno): Likewise.
6304 (expanding_p): Likewise.
6305 (stmts_are_full_exprs_p): Likewise.
6306 (in_function_try_handler): Likewise.
6307 (lang_type): Remove nested type_flags. All uses changed.
6308 * call.c (ctor_label): Remove.
6309 (dtor_label): Likewise.
6310 * class.c (current_class_ptr): Remove.
6311 (current_class_ref): Likewise.
6312 * decl.c (static_labelno): Remove.
6313 (dtor_label): Likewise.
6314 (last_dtor_insn): New macro, instead of variable.
6315 (last_parm_cleanup_insn): Likewise.
6316 (original_result_rtx): Likewise.
6317 (in_function_try_handler): Remove.
6318 (named_label_uses): New macro, instead of variable.
6319 (named_labels): Likewise.
6320 (current_function_returns_value): Remove.
6321 (current_function_returns_null): Likewise.
6322 (current_function_assigns_this): New macro, instead of variable.
6323 (current_function_just_assigned_this): Likewise.
6324 (current_binding_level): Likewise.
6325 (init_decl_processing): Call push_cp_function_context.
6326 (cp_function): Move to cp-tree.h
6327 (cp_function_chain): Make it global.
6328 (temp_name_counter): Remove.
6329 (push_cp_function_context): Simplify.
6330 (pop_cp_function_context): Likewise.
6331 * decl2.c (temp_name_counter): Remove.
6332 * init_c (current_base_init_list): Likewise.
6333 (current_member_init_list): Likewise.
6334 (base_init_expr): Likewise.
6335 * method.c (static_labelno): Likewise.
6336 * pt.c (last_tree): Likewise.
6337 * semantics.c (expanding_p): Likewise.
6338 (stmts_are_full_exprs_p): Likewise.
6339 (last_expr_type): Likewise.
6340 * typeck.c (dtor_label): Likewise.
6341 (ctor_label): Likewise.
6343 1999-09-01 Alex Samuel <samuel@codesourcery.com>
6345 * decl2.c (arg_assoc_template_arg): New prototype. New function.
6346 (arg_assoc_class): Use arg_assoc_template_arg for template
6348 (arg_assoc): Likewise.
6349 * pt.c (mangle_class_name_for_template): Allow member template
6352 1999-09-02 Nathan Sidwell <nathan@acm.org>
6354 * call.c (build_conditional_expr): Warn on enum mismatches.
6355 (convert_arg_to_ellipsis): Move non-pod check to after
6358 1999-09-01 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6360 * gxx.gperf (hash, is_reserved_word): Add prototypes.
6362 * init.c (build_vec_init): Initialize variable `try_block'.
6364 * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
6365 Likewise for bzero/memset.
6366 (token_getch, token_put_back): Add static prototypes. Remove
6367 `inline' from the definitions.
6368 (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
6370 1999-09-01 Mark Mitchell <mark@codesourcery.com>
6372 * cp-tree.h (lang_type): Move align into type_flags.
6373 (CLASSTYPE_ALIGN): Adjust accordingly.
6374 * call.c (direct_reference_binding): Remove misleading comment.
6376 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6378 * parse.y (language_string): Constify.
6380 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6382 * repo.c (getpwd): Don't prototype.
6383 * xref.c (getpwd): Likewise
6385 1999-08-30 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6387 * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
6388 Remove hacks for stuff which now comes from libiberty.
6390 1999-08-30 Jason Merrill <jason@yorick.cygnus.com>
6392 * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
6394 1999-08-30 Mark Mitchell <mark@codesourcery.com>
6396 * cp-tree.h (begin_init_stmts): Declare.
6397 (finish_init_stmts): Likewise.
6398 * cvt.c (build_up_reference): Wrap the declaration of a temporary
6399 in a statement-expression so that we will see it when expanding
6400 tree structure later.
6401 * init.c (begin_init_stmts): Don't make it static.
6402 (finish_init_stmts): Likewise.
6404 * cp-tree.h (start_handler_parms): New function.
6405 (expand_start_catch_block): Take only one parameter.
6406 (start_handler_parms): New function.
6407 * decl.c (start_handler_parms): Define it.
6408 * except.c (process_start_catch_block): Take only one parameter.
6409 Don't call grokdeclarator here.
6410 (expand_start_catch_block): Don't call grokdeclarator here,
6412 * parse.y (handler_args): Adjust call to
6413 expand_start_catch_block. Use start_handler_parms.
6414 * pt.c (push_template_decl_real): Make permanent lists have
6416 (tsubst_expr): Adjust calls to expand_start_catch_block
6418 * semantics.c (expand_stmt): Likewise.
6420 1999-08-29 Alex Samuel <samuel@codesourcery.com>
6422 * pt.c (push_template_decl_real): Use template declaration from
6423 class type if it exists.
6425 1999-08-29 Mark Mitchell <mark@codesourcery.com>
6427 * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
6428 (maybe_inject_for_scope_var): Declare it.
6429 (initialize_local_var): Likewise.
6430 * decl.c (maybe_inject_for_scope_var): Make it global.
6431 (initialize_local_var): Likewise. Move cleanup handling here,
6432 from cp_finish_decl.
6433 (make_rtl_for_nonlocal_decl): Use
6434 push_obstacks_nochange/pop_obstacks, rather than
6435 end_temporary_allocation/resume_temporary_allocation.
6436 (cp_finish_decl): Try to complete the type of a variable when it
6437 is declared. Move cleanup-handling to initialize_local_var.
6438 (expand_static_init): Use tree-building code, rather than
6440 * decl2.c (get_temp_name): Assert non-initializedness of
6442 * init.c (create_temporary_var): Move RTL-assigning code to ...
6443 (get_temp_regvar): Here.
6444 * pt.c (tsbust_expr): Fix indentation. Call cp_finish_decl here.
6445 * semantics.c (expand_stmt): Don't call cp_finish_decl here. Just
6446 call initialize_local_var to generate initialization code.
6448 1999-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6450 * cp-tree.h (fndecl_as_string, type_as_string,
6451 type_as_string_real, args_as_string, decl_as_string,
6452 expr_as_string, code_as_string, language_as_string,
6453 parm_as_string, op_as_string, assop_as_string, cv_as_string,
6454 lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
6456 * errfn.c (cp_printer): Likewise.
6458 * error.c (cp_printer, fndecl_as_string, type_as_string_real,
6459 type_as_string, expr_as_string, decl_as_string, lang_decl_name,
6460 cp_file_of, code_as_string, language_as_string, parm_as_string,
6461 op_as_string, assop_as_string, args_as_string, cv_as_string):
6464 * tree.c (lang_printable_name): Likewise.
6466 1999-08-28 Richard Henderson <rth@cygnus.com>
6468 * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
6470 1999-08-28 Mark Mitchell <mark@codesourcery.com>
6472 * cp-tree.h (strip_array_types): New function.
6473 * decl.c (maybe_deduce_size_from_array_init): New function, split
6474 out from cp_finish_decl.
6475 (layout_var_decl): Likewise.
6476 (maybe_commonize_var): Likewise.
6477 (maybe_inject_for_scope_var): Likewise.
6478 (initialize_local_var): Likewise.
6479 (build_cleanup_on_safe_obstack): Likewise.
6480 (check_initializer): Likewise.
6481 (make_rtl_for_nonlocal_decl): Likewise.
6482 (cp_finish_decl): Use them.
6483 * typeck.c (strip_array_types): New function.
6485 * cp-tree.def (LABEL_STMT): New tree node.
6486 * cp-tree.h (LABEL_STMT_LABEL): New macro.
6487 (shadow_label): Remove.
6488 (declare_local_label): New function.
6489 (finish_label_decl): Likewise.
6490 * decl.c (make_label_decl): New function, split out from
6492 (shadowed_labels): Remove.
6493 (binding_level): Add shadowed_labels.
6494 (clear_binding_level): Remove.
6495 (push_binding_level): Just bzero the new binding level.
6496 (pushlevel): Fix indentation.
6497 (pop_label): New function.
6498 (pop_labels): Likewise, split out from poplevel.
6499 (poplevel): Pop local labels. Use pop_labels.
6500 (maybe_push_to_top_level): Don't clear shadowed_labels.
6501 (lookup_label): Use make_label_decl.
6502 (shadow_label): Remove.
6503 (declare_local_label): New function.
6504 (define_label): Simplify.
6505 (start_function): Don't clear shadowed_labels.
6506 (cp_function): Remove shadowed_labels.
6507 (push_cp_function_context): Don't save shadowed_labels.
6508 (pop_cp_function_context): Don't restore it.
6509 * dump.c (dequeue_and_dump): Handle LABEL_STMT.
6510 * parse.y (label_decl): Use finish_label_decl.
6511 * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
6513 * semantics.c (finish_label_stmt): Add a LABEL_STMT when
6515 (finish_label_decl): New function.
6516 (expand_stmt): Handle LABEL_STMTs and local label declarations.
6518 1999-08-26 Mark Mitchell <mark@codesourcery.com>
6520 * decl.c (lookup_label): Build labels on the permanent obstack
6521 when building statement trees. Don't build RTL for labels when
6522 building statement trees.
6523 * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
6524 building statement trees.
6525 (finish_label_stmt): Likewise.
6526 (expand_stmt): Adjust accordingly.
6527 * pt.c (tsubst_expr); Likewise.
6528 (do_decl_instantiation): Robustify.
6530 * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
6531 * tree.c (build_cplus_new): Set it.
6532 * expr.c (cplus_expand_expr): Use it.
6533 * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
6535 * decl.c (store_parm_decls): Reset immediate_size_expand.
6536 (finish_function): Likewise.
6538 * tree.c (cplus_unsave_expr_now): Don't return a value.
6540 * semantics.c (do_poplevel): Always initialize the return value.
6542 1999-08-26 Gavin Romig-Koch <gavin@cygnus.com>
6544 * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
6545 * tree.h (cplus_unsave_expr_now) : Same.
6547 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6549 * decl.c (grokdeclarator): Amend comment.
6550 * except.c (expand_start_catch_block): Call push_template_decl for
6551 catch-block parameters.
6552 * method.c (synthesize_method): Build an empty compound statement
6553 for the body of a constructor.
6555 1999-08-25 Jason Merrill <jason@yorick.cygnus.com>
6557 * tree.c (cp_build_qualified_type_real): If we're asking for the
6558 same quals we already have, just return.
6560 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6562 * cp-tree.def (SUBOBJECT): New tree node.
6563 * cp-tree.h (CLEANUP_P): New macro.
6564 (SUBOBJECT_CLEANUP): Likewise.
6565 (keep_next_level): Add parameter.
6566 (get_temp_regvar): Don't declare.
6567 (emit_base_init): Remove parameter.
6568 (expand_aggr_init): Rename to build_aggr_init.
6569 (expand_vec_init): Rename to build_vec_init.
6570 (do_pushlevel): Remove.
6571 (do_poplevel): Likewise.
6572 (finish_cleanup): New function.
6573 (finish_subobject): Likewise.
6574 (stmts_are_full_exprs_p): New variable.
6575 * decl.c (keep_next_level): Add parameter.
6576 (cp_finish_decl): Use build_aggr_init, not
6577 expand_aggr_init. Use finish_expr_stmt to expand the code.
6578 (expand_static_init): Use tree-generating, not RTL-generating,
6579 functions to handle the initialization.
6580 (start_function): Remove dead code. Always have a momentary
6581 obstack inside the function, even before hitting the first curly
6583 (cplus_expand_expr_stmt): Move calls to
6584 expand_{start,end}_target_temps into semantics.c.
6585 (cp_function): Add stmts_are_full_exprs_p.
6586 (push_cp_function_context): Save it.
6587 (pop_cp_function_context): Restore it.
6588 * decl2.c (get_temp_regvar): Move to init.c.
6589 (do_static_initialization): Use build_{aggr,vec}_init.
6590 (do_static_destruction): Fix typo in comment.
6591 * dump.c (dequeue_and_dump): Handle INIT_EXPR.
6592 * except.c (expand_throw): Use create_temporary_var.
6593 * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
6594 * init.c (expand_vec_init_try_block): Remove.
6595 (expand_vec_init_catch_clause): Likewise.
6596 (get_temp_regvar): New function.
6597 (begin_init_stmts): Likewise.
6598 (finish_init_stmts): Likewise.
6599 (perform_member_init): Use build_{aggr,vec}_init. Build up tree
6601 (emit_base_init): Likewise. Remove unused parameter.
6602 (expand_virtual_init): Likewise.
6603 (expand_cleanup_for_base): Use finish_subobject.
6604 (expand_aggr_vbase_init_1): Simplify.
6605 (construct_virtual_bases): Use tree-generating functions to build
6607 (expand_aggr_init): Likewise. Rename to build_aggr_init.
6608 (expand_default_init): Likewise.
6609 (expand_aggr_init_1): Likewise.
6610 (expand_vec_init): Rename to build_vec_init.
6611 * method.c (do_build_copy_constructor): Use tree-generating
6612 functions. Don't call clear_last_expr.
6613 (do_build_assign_ref): Likewise.
6614 (synthesize_method): Call clear_last_expr here.
6615 * parse.y (base_init): Don't call clear_last_expr here.
6616 (nodecls): Likewise.
6617 * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
6618 * semantics.c (do_pushlevel): Move to here.
6619 (do_poplevel): Likewise.
6620 (stmts_are_full_exprs_p): New variable.
6621 (finish_expr_stmt): Handle logic for temoprary cleanup here.
6622 (finish_for_stmt): Use finish_expr_stmt.
6623 (finish_cleanup): New function.
6624 (finish_function_try_block): Fix indentation.
6625 (finish_subobject): New function.
6626 (setup_vtbl_ptr): Call keep_next_level here.
6627 (finish_stmt_expr): Handle a block with no scope inside the
6628 statement-expression.
6629 (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set. Handle
6631 * tree.c (search_tree): Handle INIT_EXPR.
6633 * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
6634 * typeck2.c (store_init_value): Change expand_aggr_init to
6635 build_aggr_init in comment.
6637 1999-08-25 Mark Mitchell <mark@codesourcery.com>
6639 * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
6641 1999-08-25 Nathan Sidwell <nathan@acm.org>
6643 * decl2.c (handle_class_head): Be graceful about additional
6644 scope qualifiers. Adjust comments to reflect reality.
6646 1999-08-24 Jason Merrill <jason@yorick.cygnus.com>
6648 * call.c (build_conditional_expr): Fix typo.
6649 * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
6650 lvalue before trying to mess with the sides.
6652 * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
6654 Mon Aug 23 22:17:20 1999 Mumit Khan <khan@xraylith.wisc.edu>
6656 * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
6658 1999-08-23 Jason Merrill <jason@yorick.cygnus.com>
6660 * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
6661 Return arbitrary pointer or NULL.
6662 (check_eh_spec): Call __throw_type_match_rtti_2.
6663 * tinfo.h (*::dcast): Return int. Add valp parm.
6664 * tinfo.cc (*::dcast): Likewise. Adjust to allow for null pointers.
6665 * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
6666 (__throw_type_match_rtti): Now just a wrapper.
6668 * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
6669 (init_exception_processing): Don't initialize them.
6671 1999-08-23 Paul Burchard <burchard@pobox.com>
6673 * decl.c (check_default_argument): Fix typo.
6675 1999-08-22 Mark Mitchell <mark@codesourcery.com>
6677 * cp-tree.def (STMT_EXPR): Fix typo in node name.
6679 * dump.c (dump_next_stmt): New function.
6680 (dequeue_and_dump): Use it.
6682 * pt.c (tsubst_copy): Make sure to initialize return value for a
6683 STMT_EXPR, even when processing_template_decl.
6684 * semantics.c (finish_stmt_expr): A statement-expression whose
6685 last statement is not an expression-statement has type `void'.
6687 1999-08-20 Mark Mitchell <mark@codesourcery.com>
6689 * semantics.c (finish_stmt_expr): Fix typo in comment.
6690 * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
6692 * init.c (build_vec_delete_1): Make the children of a permanent
6693 BIND_EXPR permanent.
6694 * pt.c (register_specialization): Don't register a specialization
6697 1999-08-18 Andrew Haley <aph@cygnus.com>
6699 * method.c (process_overload_item): Call build_mangled_C9x_name ()
6700 for all integer parameter types larger than long long.
6702 1999-08-19 Mark Mitchell <mark@codesourcery.com>
6704 * pt.c (redeclare_class_template): Merge default template
6705 arguments in both directions.
6707 * typeck.c (common_type): Undo 1999-08-18 change. Remove
6708 compiler_error message.
6710 1999-08-19 Jason Merrill <jason@yorick.cygnus.com>
6712 * cp-tree.h: Declare flag_use_repository.
6713 * pt.c (do_decl_instantiation): Don't complain about duplicate
6714 instantiation with -frepo.
6715 (do_type_instantiation): Likewise.
6717 * pt.c (push_template_decl_real): Complain about everything
6718 that isn't a valid template.
6720 * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
6723 1999-08-19 Mark Mitchell <mark@codesourcery.com>
6725 * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
6726 * decl2.c (build_expr_from_tree): Handle it.
6727 * error.c (dump_expr): Likewise.
6728 * pt.c (for_each_template_parm): Likewise.
6729 (tsubst_copy): Likewise.
6730 * tree.c (search_tree): Likewise.
6731 * semantics.c (finish_pseudo_destructor_call): Create it.
6733 1999-08-18 Mark Mitchell <mark@codesourcery.com>
6735 * search.c (setup_class_bindings): Robustify.
6736 * typeck.c (common_type): Use same_type_p, not pointer equality,
6739 * cp-tree.h (build_lang_field_decl): Remove.
6740 * class.c (build_vtable): Replace calls to build_lang_field_decl
6741 with build_lang_decl.
6742 (prepare_fresh_vtable): Likewise.
6743 (finish_struct_1): Likewise.
6744 (init_class_processing): Likewise.
6745 * decl.c (push_using_decl): Likewise.
6746 (init_decl_processsing): Likewise.
6747 (grokvardecl): Likewise.
6748 (build_ptrmemfunc_type): Likewise.
6749 (grokdeclarator): Likewise.
6750 (build_enumerator): Likewise.
6751 * decl2.c (grok_x_components): Likewise.
6752 (do_class_using_decl): Likewise.
6753 * except.c (call_eh_info): Likewise.
6754 * init.c (init_init_processing): Likewise.
6755 * rtti.c (expand_class_decl): Likewise.
6756 * tree.c (build_base_fields): Likewise.
6757 (build_vbase_pointer_fields): Likewise.
6758 * lex.c (build_lang_decl): Build declarations on the permanent
6759 obstack if we're building statmeent trees.
6760 (retrofit_lang_decl): Handle both the full lang_decl and also the
6761 smaller lang_decl_flags here.
6762 (build_lang_field_decl): Remove.
6763 * pt.c (push_template_decl_real): Issue errors for variable
6764 declarations that are not static members.
6766 1999-08-18 Richard Henderson <rth@cygnus.com>
6768 * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
6771 1999-08-17 Mark Mitchell <mark@codesourcery.com>
6773 * cp-tree.h (back_end_hook): New variable.
6774 * decl2.c (back_end_hook): Define it.
6775 (finish_file): If it's non-NULL, call it.
6777 * decl.c (add_decl_to_level): New function.
6778 (push_local_binding): Use it.
6779 (find_binding): Fix typo in comment.
6780 (pushdecl): Use add_decl_to_level. Put templates on the
6781 corresponding namespace-scope binding levels.
6782 * dump.c (dequeue_and_dump): Print the specializations of a
6784 * pt.c (push_template_decl_real): Don't push a template multiple
6787 1999-08-17 Mark Mitchell <mark@codesourcery.com>
6789 * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
6790 (CALL_DECLARATOR_QUALS): Likewise.
6791 (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
6792 * decl.c (grokdeclarator): Adjust to use them.
6793 * decl2.c (grokfield): Likewise.
6794 (reparse_absdcl_as_casts): Likewise.
6795 * lex.c (make_call_declarator): Likewise.
6796 (set_quals_and_spec): Likewise.
6797 * pt.c (tsubst): Likewise.
6798 * tree.c (mapcar): Remove special hack to handle third operand of
6801 1999-08-16 Mark Mitchell <mark@codesourcery.com>
6803 * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
6804 * class.c (build_vtable): Use build_lang_field_decl to build the
6805 VAR_DECLs for vtables.
6806 (prepare_fresh_vtable): Likewise.
6807 * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
6808 CAN_HAVE_FULL_LANG_DECL_P.
6809 (push_using_decl): Use build_lang_decl to build USING_DECLs.
6810 (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
6811 * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
6812 (build_lang_field_decl): Likewise.
6813 (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
6816 * cp-tree.def (STMT_EXPR): New tree node.
6817 * cp-tree.h (STMT_EXPR_STMT): New macro.
6818 (store_return_init): Change prototype.
6819 (finish_named_return_value): New function.
6820 (expand_stmt): Likewise.
6821 (expand_body): Likewise.
6822 (begin_stmt_tree): Likewise.
6823 (finish_stmt_tree): Likewise.
6824 (expanding_p): New variable.
6825 (last_expr_type): Likewise.
6826 (building_stmt_tree): New macro.
6827 * decl.c (start_function): Use building_stmt_tree, not
6828 processing_template_decl, where appropriate.
6829 (store_parm_decls): Likewise.
6830 (store_return_init): Move most of the body to semantics.c.
6831 (finish_function): Use building_stmt_tree.
6832 (finish_stmt): Clear last_expr_type here.
6833 (cp_function): Add expanding_p, last_tree, last_expr_type.
6834 (push_cp_function_context): Save them.
6835 (pop_cp_function_context): Restore them.
6836 * decl2.c (setup_vtbl_ptr): Move to semantics.c.
6837 * error.c (dump_expr): Handle STMT_EXPR.
6838 * except.c (expand_start_catch_block): Use building_stmt_tree.
6840 * expr.c (cplus_expand_expr): Handle STMT_EXPR.
6841 (do_case): Move add_tree call to semantics.c.
6842 * parse.y (return_init): Use finish_named_return_value.
6843 (for.init.statement): Use finish_expr_stmt.
6844 * parse.c: Regenerated.
6845 * pt.c (do_pushlevel): Move to semantics.c.
6846 (do_poplevel): Likewise.
6847 (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
6848 (tsubst_expr): Don't expand all the way to RTL here. Handle
6849 RETURN_INIT and CTOR_INITIALIZER.
6850 (instantiate_decl): Call expand_body after tsubst'ing into
6852 * semantics.c (expand_stmts): New function.
6853 (expanding_p): New variable.
6854 (last_expr_type): Likewise.
6855 (finish_expr_stmt): Use building_stmt_tree.
6856 (begin_if_stmt): Likewise.
6857 (finish_if_stmt_cond): Likewise.
6858 (finish_then_clause): Likewise.
6859 (begin_else_clause): Likewise.
6860 (finish_else_clause): Likewise.
6861 (begin_while_stmt): Likewise.
6862 (finish_while_stmt_cond): Likewise.
6863 (finish_while_stmt): Likewise.
6864 (finish_do_body): Likewise.
6865 (finish_do_stmt): Likewise.
6866 (finish_return_stmt): Likewise.
6867 (begin_for_stmt): Likewise.
6868 (fnish_for_init_stmt): Likewise.
6869 (finish_for_cond): Likewise.
6870 (finish_for_expr): Likewise.
6871 (finish_for_stmt): Likewise.
6872 (finish_break_stmt): Likewise.
6873 (finish_continue_stmt): Likewise.
6874 (finish_switch_cond): Likewise.
6875 (finish_switch_stmt): Likewise.
6876 (finish_case_label): Call add_tree here if necessary.
6877 (finish_goto_statement): Use building_stmt_tree.
6878 (begin_try_block): Likewise.
6879 (begin_function_try_block): Likewise.
6880 (finish_try_block): Likewise.
6881 (finish_function_try_block): Likewise.
6882 (finish_handler_sequence): Likewise.
6883 (finish_function_handler_sequence): Likewise.
6884 (begin_handler): Likewise.
6885 (finish_handler_parms): Likewise.
6886 (finish_handler): Likewise.
6887 (begin_compound_stmt): Likewise.
6888 (finish_compound_stmt): Likewise.
6889 (finish_asm_stmt): Likewise.
6890 (finish_label_stmt): Likewise.
6891 (finish_named_return_value): New function.
6892 (setup_vtbl_ptr): Moved here from decl2.c.
6893 (do_pushlevel): Moved here from pt.c.
6894 (do_poplevel): Likewise.
6895 (begin_stmt_expr): Use building_stmt_tree.
6896 (finish_stmt_expr): Likewise. Build a STMT_EXPR, not a BIND_EXPR,
6897 when building_stmt_tree.
6898 (begin_stmt_tree): New function.
6899 (finish_stmt_tree): Likewise.
6900 (expand_stmt): Likewise.
6901 (expand_body): Likewise.
6902 * tree.c (build_cplus_method_type): Make sure the argument types
6903 end up on the same obstack as the METHOD_TYPE.
6904 (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
6905 THROW_EXPR, STMT_EXPR.
6906 (mapcar): Break out common cases. Handle COMPOUND_EXPR,
6907 MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR. Abort, rather than
6908 sorry, if an unsupported node is encountered.
6909 * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
6910 (c_expand_return): Don't call add_tree here.
6912 1999-08-15 Mark Mitchell <mark@codesourcery.com>
6914 * pt.c (check_default_tmpl_args): Don't check in local scopes.
6915 (tsubst_decl): Make sure the declaration is on a saveable
6916 obstack. Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
6918 (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
6920 1999-08-14 Jason Merrill <jason@yorick.cygnus.com>
6922 Speed up Koenig lookup.
6923 * decl.c (unqualified_namespace_lookup): Nonstatic. Add spacep parm
6924 to return namespaces we've looked at.
6925 * decl2.c (lookup_using_namespace): Likewise.
6926 (add_function): Don't call ovl_member.
6927 (lookup_arg_dependent): Initialize k.namespaces to the list of
6928 namespaces seen in unqualified lookup.
6929 * call.c (equal_functions): Move here from tree.c.
6930 (joust): Use it to handle duplicate candidates.
6931 * tree.c (ovl_member): Use ==.
6933 1999-08-13 Mark Mitchell <mark@codesourcery.com>
6935 * cp-tree.def (DECL_STMT): Make it smaller.
6936 * cp-tree.h (lang_decl_flags): Move saved_tree to ...
6937 (lang_decl): ... here. Add next.
6938 (DECL_SAVED_TREE): Adjust accordingly.
6939 (DECL_IMPLICIT_TYPEDEF_P): New macro.
6940 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
6941 (DECL_STMT_DECL): Likewise.
6942 (create_implicit_typedef): New function.
6943 (maybe_push_decl): Likewise.
6944 (tsubst_default_argument): New function.
6945 (at_function_scope_p): Likewise.
6946 (add_decl_stmt): Likewise.
6947 (push_permanent_obstack): Likewise.
6948 * call.c (convert_default_arg): Use tsubst_default_argument.
6949 * class.c (add_method): Use push_permanent_obstack.
6950 (build_self_reference): Create a TEMPLATE_DECL for the
6951 self-reference, if necessary.
6952 * decl.c (pseudo_global_level_p): Only look at the current binding
6954 (push_binding): Use push_permanent_obstack.
6955 (create_implicit_typedef): New function.
6957 (duplicate_decls): Use push_permanent_obstack.
6958 (maybe_push_decl): New function.
6959 (start_decl): Use it. Remove dead code. Use add_decl_stmt.
6960 (start_decl_1): Remove dead code.
6961 (cp_finish_decl): Remove DECL_STMT handling here. Don't use
6962 pseudo_global_level_p.
6963 (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
6965 (grokdeclarator): Likewise, for TYPE_DECLs. Don't use
6966 pseudo_global_level_p.
6967 * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
6969 (get_sentry): Use push_permanent_obstack.
6970 * dump.c (dequeue_and_dump): Enable DECL_STMT.
6971 * except.c (call_eh_info): Use push_permanent_obstack.
6972 (build_eh_type_ref): Likewise.
6973 (do_pop_exception): Likewise.
6974 (expand_eh_spec): Likewise.
6975 (alloc_eh_object): Likewise.
6976 (expand_throw): Likewise.
6977 * init.c (build_java_class_ref): Likewise.
6978 * lex.c (get_time_identifier): Likewise.
6979 (free_lang_decl_chain): Correct type.
6980 (retrofit_lang_decl): Adjust accordingly.
6981 (build_lang_field_decl): Likewise.
6982 * lex.h (free_lang_decl_chain): Likewise.
6983 * parse.y (lang_extdef): Don't use pseudo_global_level_p.
6984 * parse.c: Regenerated.
6985 * pt.c (tsubst_default_arguments): New function.
6986 (retrieve_local_specialization): Likewise.
6987 (register_local_specialization): Likewise.
6988 (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P. Just use
6989 pseudo_global_level_p to determine whether or not a template is
6991 (lookup_template_class): Likewise. Use create_implicit_typedef.
6992 (instantiate_class_template): Call tsubst_default_arguments for
6993 member functions, if appropriate.
6994 (tsubst_default_argument): New function.
6995 (tsubst_decl): Use it. Change TYPE_DECL handling to match VAR_DECLs.
6996 * search.c (at_function_scope_p): New function.
6997 * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
6998 (finish_label_stmt): Likewise.
6999 (add_decl_stmt): New function.
7000 (begin_class_definition): Likewise.
7001 (finish_typeof): Likewise.
7002 * tree.c (copy_template_template_parm): Likewise.
7003 (copy_to_permanent): Likewise.
7004 (push_permanent_obstack): Define.
7005 (mark_addressable): Use it.
7006 * typeck.c (mark_addressable): Likewise.
7008 1999-08-13 Gavin Romig-Koch <gavin@cygnus.com>
7010 * cp-tree.h (init_cplus_unsave): New.
7011 (cplus_unsave_expr_now): New.
7012 * lex.c (init_parse): Call init_cplus_unsave.
7013 * tree.c (init_cplus_unsave): New.
7014 (cplus_unsave_expr_now): New.
7016 1999-08-13 Mark Mitchell <mark@codesourcery.com>
7018 * pt.c (tsubst): Back out 1999-08-06 patch. Use fold and
7019 decl_constant_value to simplify array bounds.
7021 1999-08-11 Jason Merrill <jason@yorick.cygnus.com>
7023 * lang-options.h: Add -fms-extensions.
7024 * cp-tree.h: Declare flag_ms_extensions.
7025 * decl2.c: Define it.
7026 * class.c (instantiate_type): Don't complain about taking the address
7027 of a bound member function if -fms-extensions.
7028 * typeck.c (build_unary_op): Likewise.
7029 * decl.c (grokdeclarator): Or about implicit int.
7030 * init.c (resolve_offset_ref): Or about implicit '&'.
7032 1999-08-11 Mark Mitchell <mark@codesourcery.com>
7034 * cp-tree.h (minimal_parse_mode): Remove.
7035 (finish_label_stmt): New function.
7036 * decl.c (saved_scope): Remove minimal parse mode.
7037 (maybe_push_to_top_level): Don't save it.
7038 (pop_from_top_level): Don't restore it.
7039 (define_label): Split out template-handling code to semantics.c.
7040 (start_decl): Don't use minimal_parse_mode.
7041 (cp_finish_decl): Likewise.
7042 (start_function): Don't increment it.
7043 (store_return_init): Don't use it.
7044 (finish_function): Don't decrement it.
7045 * parse.y (label_colon): Use finish_label_stmt throughout.
7046 * parse.c: Regenerated.
7047 * pt.c (minimal_parse_mode): Don't define it.
7048 (tsubst_expr): Use finish_label_stmt.
7049 * semantics.c (finish_label_stmt): New function.
7051 * dump.c (queue): Be careful when computing bitmasks.
7052 (dequeue_and_dump): Describe binfos as binfos, not as
7055 * parse.y (pedantic): Give it itype. Adjust usage accordingly
7057 * parse.c: Regenerated.
7059 * Make-lang.in (CXX_SRCS): Remove sig.c.
7060 * Makefile.in (CXX_OBJS): Remove sig.o.
7062 * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
7063 (CPTI_SIGNATURE_TYPE): Likewise.
7064 (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
7065 (opaque_type_node): Likewise.
7066 (signature_type_node): Likewise.
7067 (sigtable_entry_type): Likewise.
7068 (flag_handle_signatures): Likewise.
7069 (lang_type): Remove is_signature, is_signature_pointer,
7070 is_signature_reference, has_opaque_typedecls,
7071 sigtables_has_been_generated. Adjust dummy. Remove signature,
7072 signature_pointer_to, signature_reference_to.
7073 (IS_SIGNATURE): Remove.
7074 (SET_SIGNATURE): Remove.
7075 (CLEAR_SIGNATURE): Remove.
7076 (IS_SIGNATURE_POINTER): Remove.
7077 (IS_SIGNATURE_REFERENCE): Remove.
7078 (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
7079 (SIGTABLE_HAS_BEEN_GENERATED): Remove.
7080 (CLASSTYPE_SIGNATURE): Remove.
7081 (SIGNATURE_TYPE): Remove.
7082 (SIGNATURE_METHOD_VEC): Remove.
7083 (SIGNATURE_POINTER_TO): Remove.
7084 (SIGNATURE_REFERENCE_TO): Remove.
7085 (lang_decl_flags): Remove is_default_implementation. Rename
7086 memfunc_pointer_to to saved_tree.
7087 (IS_DEFAULT_IMPLEMENTATION): Remove.
7088 (DECL_MEMFUNC_POINTER_TO): Remove.
7089 (DECL_MEMFUNC_POINTING_TO): Remove.
7090 (DECL_SAVED_TREE): Adjust definition.
7091 (tag_types): Remove signature_type_node.
7092 (SIGNATURE_FIELD_NAME): Remove.
7093 (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
7094 (SIGNATURE_OPTR_NAME): Likewise.
7095 (SIGNATURE_SPTR_NAME): Likewise.
7096 (SIGNATURE_POINTER_NAME): Likewise.
7097 (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
7098 (SIGNATURE_REFERENCE_NAME): Likewise.
7099 (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
7100 (SIGTABLE_PTR_TYPE): Likewise.
7101 (SIGTABLE_NAME_FORMAT): Likewise.
7102 (SIGTABLE_NAME_FORMAT_LONG): Likewise.
7103 (SIGTABLE_TAG_NAME): Likewise.
7104 (SIGTABLE_VB_OFF_NAME): Likewise.
7105 (SIGTABLE_VT_OFF_NAME): Likewise.
7106 (finish_base_specifiers): Change prototype.
7107 (build_signature_pointer_type): Remove.
7108 (build_signature_reference_type): Remove.
7109 (build_signature_pointer_constructor): Remove.
7110 (build_signature_method_call): Remove.
7111 (build_optr_ref): Likewise.
7112 (append_signature_fields): Likewise.
7113 (signature_error): Likewise.
7114 * call.c (build_this): Remove signature support.
7115 (build_over_call): Likewise.
7116 (build_new_method_call): Likewise.
7117 * class.c (add_implicitly_declared_members): Likewise.
7118 (finish_struct_1): Likewise.
7119 (finish_struct): Likewise.
7120 * cvt.c (cp_convert_to_pointer): Likewise.
7121 (convert_to_pointer_force): Likewise.
7122 (ocp_convert): Likewise.
7123 * decl.c (sigtable_decl_p): Remove.
7124 (init_decl_processing): Remove support for signatures.
7125 (cp_finish_decl): Likewise.
7126 (grokdeclarator): Likewise.
7127 (grokparms): Likewise.
7128 (xref_tag): Likewise.
7129 (start_function): Likewise.
7130 (start_method): Likewise.
7131 * decl2.c (finish_sigtable_vardecl): Remove.
7132 (flag_handle_signatures): Remove.
7133 (lang_f_options): Remove handle-signatures.
7134 (grokfield): Remove support for signatures.
7135 (grokbitfield): Likewise.
7136 (finish_file): Likewise.
7137 (reparse_absdcl_as_casts): Likewise.
7138 * error.c (dump_type_real): Likewise.
7139 (dump_function_decl): Likewise.
7140 * friend.c (make_friend_class): Likewise.
7141 * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
7142 * hash.h: Regenerated.
7143 * init.c (build_new_1): Remove support for signatures.
7144 * lang-options.h: Remove -fhandle-signatures,
7145 -fno-handle-signatures.
7146 * lex.c (init_parse): Remove support for signatures.
7147 (yyprint): Likewise.
7148 * lex.h (rid): Remove RID_SIGNATURE.
7149 * method.c (build_decl_overload_real): Remove support for
7151 (hack_identifier): Likewise.
7152 * parse.y (base_class): Likewise.
7153 (base_class.1): Likewise.
7154 (access_specifier): Likewise.
7155 * search.c (lookup_member): Likewise.
7156 * semantics.c (finish_qualified_object_call_expr): Likewise.
7157 (finish_template_type_parm): Likewise.
7158 (begin_class_definition): Likewise.
7159 (finish_base_specifier): Likewise.
7161 * tree.c (build_cplus_method_type): Remove support for signatures.
7162 * typeck.c (require_complete_type): Likewise.
7163 (c_sizeof): Likewise.
7164 (c_alignof): Likewise.
7165 (build_object_ref): Likewise.
7166 (build_component_ref): Likewise.
7167 (build_indirect_ref): Likewise.
7168 (build_c_cast): Likewise.
7169 (build_modify_expr): Likewise.
7170 (convert_for_initialization): Likewise.
7171 * typeck2.c (signature_error): Remove.
7172 (store_init_value): Remove support for signatures.
7173 (digest_init): Likewise.
7174 (build_x_arrow): Likewise.
7175 (build_functional_cast): Likewise.
7176 * xref.c (GNU_xref_decl): Likewise.
7178 1999-08-10 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7180 * lex.c (do_identifier): Remove unnecessary lookup of class field.
7182 1999-08-09 Martin v. Loewis <martin@mira.isdn.cs.tu-berlin.de>
7184 * decl2.c (set_decl_namespace): Do not complain about non-matching
7185 decls if processing a template.
7187 1999-08-09 Mark Mitchell <mark@codesourcery.com>
7189 * decl.c (build_ptrmemfunc_type): Handle qualified
7190 pointer-to-member types here.
7191 * tree.c (cp_build_qualified_type_real): Simplify handling here.
7193 1999-08-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7195 * lex.c (lang_identify): Likewise.
7197 1999-08-09 Bernd Schmidt <bernds@cygnus.co.uk>
7199 * Makefile.in: Update dependencies.
7200 * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
7202 * decl.c: Include "function.h"
7203 (cleanup_label, return_label): Delete declarations.
7204 (store_parm_decls): Don't initialize DECL_SAVED_INSNS with NULL_RTX.
7205 (finish_function): Rename last_parm_insn variable to
7206 fn_last_parm_insn. Don't compare DECL_SAVED_INSNS to NULL_RTX.
7207 * decl2.c: Include "function.h".
7208 (rtl_expr_chain): Delete declaration.
7209 * method.c: Include "function.h"
7210 * tree.c (build_vbase_pointer_fields): Don't initialize
7211 DECL_SAVED_INSNS with NULL_RTX.
7212 * typeck.c: Include "function.h"
7214 1999-08-09 Jason Merrill <jason@yorick.cygnus.com>
7216 * semantics.c (begin_function_try_block, finish_function_try_block,
7217 finish_function_handler_sequence): New fns.
7218 * parse.y (function_try_block): Use them.
7219 * pt.c (instantiate_decl): Likewise.
7221 * cp-tree.h: Declare in_function_try_handler.
7222 * decl.c: Define it.
7223 (start_function): Clear it.
7224 (struct cp_function, push_cp_function_context): Save it.
7225 (pop_cp_function_context): Restore it.
7226 * parse.y (function_try_block): Set and clear it.
7227 * except.c (expand_end_catch_block): Rethrow if we reach the end
7228 of a function-try-block handler in a ctor or dtor.
7229 * typeck.c (c_expand_return): Complain about returning from a
7230 function-try-block handler of a ctor.
7232 * parse.y (function_try_block): Call end_protect_partials
7233 before expand_start_all_catch.
7235 1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
7237 * decl.c (struct binding_level): Add eh_region field.
7238 (push_binding_level): Set it.
7239 (define_label): Complain about jumping into an EH block.
7241 * ptree.c (print_lang_type): Print the real type of a PMF.
7242 Print what exceptions a fn type throws.
7244 1999-08-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7246 * class.c (count_fields, add_fields_to_vec): Add static prototype.
7248 * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
7249 get_id_2, composite_pointer_type, dump_node_to_file): Constify a
7252 * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
7255 * decl2.c (finish_static_data_member_decl, grokfield): Constify a
7258 * dump.c (queue_and_dump_index, dump_int, dump_string,
7259 dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
7261 (dump_stmt): Add static prototype.
7263 * errfn.c (cp_thing): Constify a char*.
7265 * error.c (dump_unary_op, dump_binary_op, aggr_variety,
7266 dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
7267 dump_expr): Constify a char*.
7269 * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
7270 read_line_number): Add static prototype.
7271 (opname_tab, assignop_tab, operator_name_string): Constify a char*.
7272 (real_yylex): Move label `letter' into the scope where it is used.
7274 * method.c (build_mangled_template_parm_index, build_overload_int,
7275 build_decl_overload_real, get_id_2): Constify a char*.
7277 * search.c (check_final_overrider): Make static.
7279 * typeck.c (composite_pointer_type): Constify a char*.
7281 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7283 * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
7284 we're looking at a class.
7286 * decl.c (lookup_name_real): Set the complain flag if we're
7287 looking for a namespace member.
7289 * lex.c (real_yylex): We can have a number with no digits.
7291 * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
7293 * search.c (binfo_from_vbase): New fn.
7294 * cp-tree.h: Declare it.
7295 * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
7296 from pointer to member of virtual base.
7297 * typeck.c (get_delta_difference): Likewise.
7299 1999-08-06 Alexandre Oliva <oliva@dcc.unicamp.br>
7301 * pt.c (tsubst): Use build_index_type to build in-template array
7302 index type. Fixes g++.oliva/dwarf1.C.
7303 * decl.c (grokdeclarator): Likewise, just for consistency, as it
7304 doesn't seem to trigger the bug without it.
7306 1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
7308 * typeck2.c (add_exception_specifier): Use complete_type.
7310 1999-08-06 Mark Mitchell <mark@codesourcery.com>
7312 * error.c (dump_expr): Handle EXACT_DIV_EXPR.
7313 (dump_binary_op): Bulletproof.
7314 * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
7315 * tree.c (search_tree): Don't enumerate all the nodes of classes
7316 `1', `2', and `<'; handle them generically. Don't be sorry about
7317 "unrecognized tree codes"; just abort.
7318 (no_linkage_check): Don't do linkage checks for templates.
7320 * tree.c (cp_build_qualified_type_real): Handle
7321 pointer-to-member-function types correctly.
7323 1999-08-05 Jason Merrill <jason@yorick.cygnus.com>
7325 * decl.c (pushdecl): Only give an error for shadowing a parm
7326 from *this* function.
7328 Thu Aug 5 02:40:42 1999 Jeffrey A Law (law@cygnus.com)
7330 * typeck2.c: Update URLs and mail addresses.
7332 1999-08-04 Nathan Sidwell <nathan@acm.org>
7334 * cp-tree.h (empty_except_spec): New global var.
7335 (compexcepttypes): Remove prototype.
7336 (comp_except_specs): Prototype new global function.
7337 (add_exception_specifier): Prototype new global function.
7338 * decl.c (empty_except_spec): Define new global var.
7339 (duplicate_decls): Use comp_except_specs, reword error message.
7340 (init_decl_processing): Initialize empty_except_spec.
7341 Adjust build_exception_variant calls.
7342 * parse.y (exception_specification_opt): Use empty_except_spec.
7343 (ansi_raise_identifier): Call check_for_new_type.
7344 (ansi_raise_identifiers): Use add_exception_specifier.
7345 * pt.c (tsubst): Use add_exception_specifier to build exception
7347 * search.c (check_final_overrider): New static function, broken
7348 out of get_matching_virtual. Check throw specifiers, reword
7350 (get_matching_virtual): Use check_final_overrider.
7351 * tree.c (build_exception_variant): Use comp_except_specs.
7352 * typeck.c (compexcepttypes): Remove.
7353 (comp_except_types): New static function, helper for
7354 comp_except_specs. Compare two types as exception specifiers.
7355 (comp_except_specs): New global function, compare two exception
7357 (comptypes): Adjust for comp_except_specs.
7358 * typeck2.c (add_exception_specifier): New global function.
7360 * class.c (check_for_override): Reword error message.
7362 1999-08-03 Nathan Sidwell <nathan@acm.org>
7364 * call.c (convert_arg_to_ellipsis): Use pod_type_p.
7365 * cp-tree.h (struct lang_type): Added non_pod_class flag.
7366 (CLASSTYPE_NON_POD_P): New macro to access it.
7367 * class.c (finish_struct_1): Determine non-PODness.
7368 Check for arrays of pointers (-Weffc++).
7369 Remove array inspection duplicated code.
7370 * tree.c (pod_type_p): Detect non-pod non-aggregate types.
7371 Use CLASSTYPE_NON_POD_P.
7373 1999-08-03 Nathan Sidwell <nathan@acm.org>
7375 * class.c (duplicate_tag_error): Preserve template information.
7377 1999-08-03 Nathan Sidwell <nathan@acm.org>
7379 * decl.c (start_enum): Show location of previous definition.
7380 * parse.y (enumlist_opt): New reduction.
7381 (structsp): Simplify enum rules to use enumlist_opt.
7383 1999-08-03 Jason Merrill <jason@yorick.cygnus.com>
7385 * lex.c (yyprint): Handle PFUNCNAME.
7387 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
7388 build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
7390 1999-08-03 Mumit Khan <khan@xraylith.wisc.edu>
7392 * decl.c (start_decl): Set attributes before duplicate_decls call.
7394 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7396 * Make-lang.in (CXX_SRCS): Add dump.c.
7397 * Makefile.in (CXX_OBJS): Add dump.o.
7398 (dump.o): New target.
7399 * cp-tree.h (DECL_CONV_FN_P): Document.
7400 (DECL_OVERLOADED_OPERATOR_P): New function.
7401 (TYPE_PTRMEM_CLASS_TYPE): New macro.
7402 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
7403 (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
7404 (ASM_VOLATILE_P): New macro.
7405 (STMT_LINENO): Likewise.
7406 (cp_namespace_decls): New function.
7407 (dump_node_to_file): New function.
7408 * decl.c (cp_namespace_decls): New function.
7409 (walk_namespaces_r): Use it.
7410 (wrapup_globals_for_namespace): Likewise.
7411 * decl2.c (flag_dump_translation_unit): New variable.
7412 (lang_decode_option): Handle -fdump-translation-unit.
7413 (finish_file): If flag_dump_translation_unit is set, dump the
7416 * lang-options.h: Add -fdump-translation-unit.
7417 * pt.c (tsubst_template_parms): Robustify.
7418 (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
7419 (tsubst_expr): Use STMT_LINENO.
7420 * semantics.c (finish_asm_stmt): Eliminate duplicate code. Check
7421 for invalid cv-qualifiers even while building templates.
7423 1999-08-02 Richard Henderson <rth@cygnus.com>
7425 * call.c: Include defaults.h instead of expr.h.
7428 * typeck.c: Include defaults.h.
7430 1999-08-02 Mark Mitchell <mark@codesourcery.com>
7432 * lex.c (errorcount, sorrycount): Don't declare.
7433 * repo.c (errorcount, sorrycount): Likewise.
7434 * typeck2.c (errorcount, sorrycount): Likewise.
7436 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
7438 * call.c (convert_default_arg, build_over_call): Change all uses of
7439 PROMOTE_PROTOTYPES, so that it tests it as a C expression.
7440 Ensure expr.h is included.
7441 * decl.c (grokparams): Ditto.
7442 * pt.c (tsubst_decl): Ditto.
7443 * typeck.c (convert_arguments): Ditto.
7445 1999-08-02 Jason Merrill <jason@yorick.cygnus.com>
7447 * class.c (mark_overriders): Fix order of args to overrides.
7448 (warn_hidden): Likewise. Fix for having virtual and non-virtual
7449 functions with the same name.
7451 1999-08-02 Richard Henderson <rth@cygnus.com>
7453 * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
7455 1999-08-01 Mark Mitchell <mark@codesourcery.com>
7457 * call.c (build_conditional_expr): Fix typo in comment.
7459 1999-08-01 Bernd Schmidt <bernds@cygnus.co.uk>
7461 * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
7462 case_stack; use in_control_zone_p.
7463 * typeck.c (c_expand_return): Likewise.
7465 1999-07-31 Bernd Schmidt <bernds@cygnus.co.uk>
7467 * except.c (catch_clauses): Delete declaration.
7469 1999-07-30 Mark Mitchell <mark@codesourcery.com>
7471 * call.c (build_conditional_expr): Call convert_from_reference to
7472 avoid reference/non-reference type confusion. Fix typo.
7474 1999-07-30 Richard Henderson <rth@cygnus.com>
7476 * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
7477 * cp-tree.h (initializer_constant_valid_p): Remove.
7479 1999-07-28 Mark Mitchell <mark@codesourcery.com>
7481 * call.c (conditional_conversion): Don't build BASE_CONVs for
7482 conversions between things that have the same type.
7483 (build_conditional_expr): Tweak.
7484 (convert_like): Some BASE_CONVs really do require the generation
7487 * init.c (perform_member_init): Don't go through build_modify_expr
7488 for simple initializations.
7490 1999-07-27 Jason Merrill <jason@yorick.cygnus.com>
7492 * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
7493 * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
7494 virtual functions and MI. Simplify.
7496 * method.c: Remove prototype for largest_union_member.
7497 * pt.c (determine_specialization): Fix uninitialized warning.
7498 * lex.c (real_yylex): Likewise.
7500 1999-07-27 Mark Mitchell <mark@codesourcery.com>
7502 * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
7505 * cp-tree.h (BINFO_VIRTUALS): Document new format.
7506 * class.c (modify_one_vtable): Change prototype accordingly.
7507 (modify_all_vtables): Likewise.
7508 (modify_all_direct_vtables): Likewise.
7509 (modify_all_indirect_vtables): Likewise.
7510 (build_vtable_entry_for_fn): New function.
7511 (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
7512 (modify_vtable_entry): Likewise.
7513 (add_virtual_function): Likewise.
7514 (build_vtbl_initializer): New function.
7515 (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
7516 (fixup_vtable_deltas1): Likewise.
7517 (fixup_vtable_deltas): Likewise.
7518 (override_one_vtable): Likewise.
7519 (finish_struct_1): Likewise.
7521 * error.c (dump_expr): Likewise.
7522 * search.c (get_abstract_virtuals_1): Likewise.
7523 (get_abstract_virtuals): Likewise.
7524 (expand_upcast_fixups): Likewise.
7525 * tree.c (debug_binfo): Likewise.
7526 * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
7527 __pure_virtual here.
7529 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7531 * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
7532 as per 1999-07-26 change.
7534 * typeck.c (c_sizeof): Don't allow non-static data members.
7535 (expr_sizeof): Likewise.
7537 1999-07-26 Jason Merrill <jason@yorick.cygnus.com>
7539 * input.c (feed_input): Only touch lineno and input_filename
7540 if !USE_CPPLIB. Save the old values before setting the new ones.
7542 * input.c (feed_input): Add file, line parms.
7543 * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
7544 (real_yylex): Check linemode before input_redirected().
7546 * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
7547 from op new to warning.
7549 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7551 * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
7552 * call.c: All uses changed.
7553 * typeck.c: Likewise.
7555 1999-07-26 Nathan Sidwell <nathan@acm.org>
7557 * exception.cc (__cplus_type_matcher): Match __eh_matcher
7560 1999-07-26 Mark Mitchell <mark@codesourcery.com>
7562 * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
7563 (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
7564 (strip_top_quals): Declare.
7565 (ncp_convert): Likewise.
7566 (type_after_usual_arithmetic_converions): Likewise.
7567 (composite_pointer_type): Likewise.
7568 * call.c (strip_top_quals): Don't make it static.
7569 (promoted_arithmetic_type_p): New function.
7570 (conditional_conversion): Likewise.
7571 (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
7572 (standard_conversion): Use same_type_p. Don't build BASE_CONVs
7573 for converting a type to itself.
7574 (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
7575 (implicit_conversion): Make sure the from and to types are
7577 (add_builtin_candidate): Correct handling of ?: operator.
7578 (add_builtin_candidates): Improve documentation.
7579 (build_conditional_expr): New function.
7580 (can_convert): Implement in terms of can_convert_arg.
7581 (ncp_convert): New function.
7582 * typeck.c (type_after_usual_arithmetic_conversions): New
7583 function, split out from common_type.
7584 (composite_pointer_type): New function, split out from
7585 build_conditional_expr.
7586 (common_type): Use type_after_usual_arithmetic_conversions.
7587 Remove redundant attribute merging.
7588 (comptypes): Tidy. Handle COMPLEX_TYPE.
7589 (build_binary_op_nodefault): Use null_ptr_cst_p.
7590 (build_conditional_expr): Remove.
7591 (convert_for_assignment): Use new conversion functions.
7593 * cp-tree.h (abstract_virtuals_error): Change declaration.
7594 * typeck2.c (abstract_virtuals_error): Check to see if an error
7595 ocurred, and return a boolean value accordingly.
7596 (build_functional_cast): Adjust accordingly.
7597 * class.c (finish_struct_1): Likewise.
7598 * cvt.c (ocp_convert): Likewise.
7599 * decl.c (cp_finish_decl): Likewise.
7600 (grokparams): Likewise.
7601 (grok_op_properties): Likewise.
7602 (start_function): Likewise.
7603 * init.c (build_new_1): Likewise.
7605 * pt.c (unify): Don't get confused by pointers-to-member functions.
7607 * search.c (build_cplus_new): Robustify.
7609 1999-07-24 Richard Henderson <rth@cygnus.com>
7611 * gxx.gperf (__builtin_va_arg): New.
7612 * parse.y (VA_ARG): New token.
7613 (unary_expr): Recognize it.
7615 Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
7617 * g++FAQ.texi: Deleted per Joe Buck's request.
7618 * Makefile.in: Corresponding changes.
7620 1999-07-23 Jason Merrill <jason@yorick.cygnus.com>
7622 * lex.c: Sync with C frontend.
7623 (whitespace_cr): New fn.
7624 (skip_white_space): Use it.
7625 (init_parse): Reorder.
7626 (yyprint): Support CONSTANT.
7627 (pragma_getc, pragma_ungetc): Bring back.
7628 (read_line_number): Change in_system_header directly.
7629 (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
7630 (parse_float): Update to C version.
7631 (yylex): Handle '$' under the letter case.
7632 Remove looking_for_typename handling.
7633 Support hex floating point constants.
7634 Follow C's lead for choosing type of integer constants.
7635 Rearrange stuff to match C frontend.
7636 (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
7637 * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
7639 1999-07-23 Mark Mitchell <mark@codesourcery.com>
7641 * call.c (reference_binding): Tweak.
7642 (mayble_handle_implicit_object): Use direct_reference_binding to
7643 create the right implicit conversion sequence.
7645 1999-07-22 Mark Mitchell <mark@codesourcery.com>
7647 * pt.c (convert_nontype_argument): Don't call decl_constant_value
7648 if we're converting to a reference type.
7650 * call.c (NEED_TEMPORARY_P): New macro.
7651 (standard_conversion): Set it, for derived-to-base conversions.
7652 (reference_related_p): New function.
7653 (reference_compatible_p): Likewise.
7654 (convert_class_to_reference): Likewise.
7655 (direct_reference_binding): Likewise.
7656 (reference_binding): Rework for standards-compliance.
7657 (convert_like): Adjust accordingly.
7658 (maybe_handle_ref_bind): Simplify; the right conversion sequences
7659 are now built up in reference_binding.
7660 (initialize_reference): New function.
7661 * cp-tree.h (ICS_USER_FLAG): Document.
7662 (ICS_THIS_FLAG): Likewise.
7663 (ICS_BAD_FLAG): Likewise.
7664 (NEED_TEMPORARY_P): Likewise.
7665 (cp_lvalue_kind): New type.
7666 (real_lvalue_p): Return it.
7667 * error.c (dump_expr): Provide more accurate representation for
7669 * init.c (expand_default_init): Do not try to perform implicit
7670 conversions for a brace-enclosed initializer.
7671 * search.c (lookup_conversions): Document.
7672 * tree.c (lvalue_p_1): Return a cp_lvalue_kind. Calculate
7674 (real_lvalue_p): Adjust accordingly.
7675 (lvalue_p): Likewise.
7676 (build_cplus_new): Don't allow the creation of an abstract class.
7677 * typeck.c (convert_for_initialization): Use initialize_reference.
7679 1999-07-21 Gavin Romig-Koch <gavin@cygnus.com>
7681 * lex.c (real_yylex) : Correct the test for overflow when lexing
7684 1999-07-20 Jason Merrill <jason@yorick.cygnus.com>
7686 * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
7687 not DECL_BUILT_IN, to determine if a function is internally declared.
7688 (duplicate_decls): Likewise. Improve handling of builtins.
7689 (push_overloaded_decl): Remove special handling of builtins.
7691 * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
7693 * decl.c (grokdeclarator): Pull out decl_constant_value in
7696 * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
7697 * cp-tree.h, pt.c, semantics.c: Adjust.
7698 * method.c (largest_union_member): Remove.
7700 * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
7702 * lex.c (token_getch, token_put_back): New fns.
7703 (real_yylex): Use them.
7705 * lex.c (lang_init): Generalize.
7706 (lang_init_options): Tell cpplib this is C++.
7707 (nextchar): Remove. Replace uses with put_back.
7708 (skip_white_space): Handle linemode here. Optimize for cpplib.
7709 (extend_token_buffer_to): New fn.
7710 (extend_token_buffer): Use it.
7711 (read_line_number, check_newline): Just deal with tokens.
7712 (real_yylex): More cpplib optimizations. Simplify. Don't produce
7713 EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
7714 * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
7715 * parse.y (PAREN_STAR_PAREN): Remove.
7716 * input.c: Don't use the putback machinery with cpplib.
7717 (sub_getch): Fold back into getch.
7718 (getch): Don't handle linemode here.
7719 (feed_input): Unget any text in the token buffer.
7721 * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
7722 nextyychar, nextyylval): Remove.
7724 1999-07-20 Michael Tiemann <tiemann@holodeck.cygnus.com>
7725 Jason Merrill <jason@yorick.cygnus.com>
7727 * lex.c (indent_level): New variable.
7728 (init_parse): Set cpp_token to CPP_DIRECTIVE.
7729 (consume_string): Make this smart about USE_CPPLIB.
7730 (yyungetc): Use put_back function.
7731 (pragma_getc, pragma_ungetc): Functions deleted.
7732 (check_newline): Rewrite to be intelligent about USE_CPPLIB.
7733 Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
7735 (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
7736 Also, clean up cases where we redundantly set token_buffer[0].
7737 (read_line_number): New fn.
7738 * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
7739 (end_input): Call cpp_pop_buffer if USE_CPPLIB.
7740 (sub_getch): Conditionalize out code that's not appropriate if
7742 (put_back): Rewrite in case USE_CPPLIB is defined.
7743 (input_redirected): Ditto.
7745 Tue Jul 20 11:24:19 1999 Bernd Schmidt <bernds@cygnus.co.uk>
7747 * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
7748 c_global_trees and accessor macros defined in c-common.h.
7749 (cp_tree_index): New enumeration.
7750 (cp_global_trees): Declare new array. Add accessor macros for it, and
7751 delete declarations of tree nodes replaced by it.
7752 (builtin_function): Delete macro, add declaration for new function.
7754 * decl.c: Delete definitions for tree nodes that were replaced by
7755 cp_global_trees and c_global_trees.
7756 (init_decl_processing): Call c_common_nodes_and_builtins; delete code
7757 to generate the common builtins here.
7758 (builtin_function): New function.
7759 * decl2.c (abort_fndecl): Delete declaration.
7760 * except.c (expand_builtin_return_address): Delete declaration.
7761 (builtin_return_address_fndecl): Delete variable.
7762 (const_ptr_type_node): Delete declaration.
7763 * lex.c (cons_up_default_function): Delete declaration of
7765 * parse.y (void_list_node): Delete declaration.
7766 * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
7768 (const_string_type_node): Delete declaration.
7769 * search.c (abort_fndecl): Delete declaration.
7770 * Makefile.in: Update dependencies.
7772 1999-07-19 Mark Mitchell <mark@codesourcery.com>
7774 * pt.c (check_default_tmpl_args): Move test for missing default
7775 arguments here, from ...
7776 (end_template_parm_list): Here.
7778 1999-07-18 Mark Mitchell <mark@codesourcery.com>
7780 * decl.c (lookup_nested_type): Remove.
7781 (pushtag): Don't call it.
7783 Sat Jul 17 23:51:30 1999 Jeffrey A Law (law@cygnus.com)
7785 * Makefile.in (INTERFACE): Bump to 2.
7787 1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
7789 * typeck2.c (my_friendly_abort): Updated URL with bug reporting
7790 instructions to gcc.gnu.org. Removed e-mail address.
7792 1999-07-17 Mark Mitchell <mark@codesourcery.com>
7794 * pt.c (determine_specialization): Tighten error-checking.
7795 (end_template_parm_list): Likewise.
7797 1999-07-14 Mark Mitchell <mark@codesourcery.com>
7799 * pt.c (check_default_tmpl_args): Handle friends defined in the
7800 class just like member functions defined in the class.
7802 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
7803 Jason Merrill <jason@yorick.cygnus.com>
7805 * cp-tree.h (struct lang_decl): Added field for storing sorted
7806 FIELD_DECLs (used in TYPE_DECLs).
7807 (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
7808 (DECL_SORTED_FIELDS): New macro.
7809 * class.c (method_name_cmp): New function.
7810 (finish_struct_methods): Modified to support sorting and searching
7812 (finish_struct_anon): Changed code in inner loop to use ELT rather
7813 than UELT (which required an extra indirection for every reference).
7814 (field_decl_cmp): New function to support sorting FIELD_DECLs.
7815 (finish_struct_1): Sort fields.
7816 * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
7817 (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
7818 Also, switch to using array indexing rather than a changing pointer.
7819 * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
7822 1999-07-09 Jason Merrill <jason@yorick.cygnus.com>
7824 * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
7825 casts in system headers or extern "C" blocks.
7827 * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
7830 1999-07-09 Michael Tiemann <tiemann@happy.cygnus.com>
7832 * decl2.c (write_virtuals): Deleted declaration.
7833 * cp-tree.h (write_virtuals): Deleted extern declaration.
7834 * class.c (finish_struct_1): Removed #if 0'd code that mentions
7836 * semantics.c (begin_class_definition): Rewrite code to not depend
7839 * lex.c (cp_pragma_interface): New function.
7840 (cp_pragma_implementation): Likewise.
7841 (handle_cp_pragma): Call them.
7843 * typeck.c (comptypes): Simplify C code in look_hard.
7845 * xref.c (PALLOC): Use xcalloc, not calloc.
7846 (SALLOC): Use xmalloc, not malloc.
7848 * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
7850 * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
7853 * decl.c (duplicate_decls): If a redeclaration doesn't match the
7854 initial declaration, then don't save the inline info and by all
7855 means don't mark the function as a builtin function.
7857 * decl.c (lookup_name_real): Set NONCLASS to 1 if
7858 CURRENT_CLASS_TYPE is 0.
7860 * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
7863 * ptree.c (print_lang_type): Added vtable-needs-writing.
7865 Wed Jul 7 01:26:47 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
7867 * decl2.c (mark_vtable_entries): Fix check for rtti offset.
7869 1999-07-06 Gavin Romig-Koch <gavin@cygnus.com>
7871 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7872 Merged into c-common.
7874 1999-07-05 Dave Brolley <brolley@cygnus.com>
7876 * lex.c (errorcount): Declare it.
7877 (finish_parse): Update errorcount for when using CPPLIB.
7879 1999-07-05 Mark Mitchell <mark@codesourcery.com>
7881 * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
7883 (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
7884 * decl.c (push_class_binding): Use it.
7885 (lookup_name_real): Likewise.
7887 1999-07-02 Gavin Romig-Koch <gavin@cygnus.com>
7889 * cp-tree.h (widest_integer_literal_type_node,
7890 widest_unsigned_literal_type) : New.
7891 * decl.c (widest_integer_literal_type_node,
7892 widest_unsigned_literal_type) : New.
7893 (init_decl_processing): Handle/use the two new types.
7894 * lex.c (real_yylex): Same.
7895 * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
7898 1999-07-01 Mark Mitchell <mark@codesourcery.com>
7900 * decl.c (grokdeclarator): Don't give names "for linkage purposes"
7901 to anonymous cv-qualified types.
7903 1999-07-01 Gavin Romig-Koch <gavin@cygnus.com>
7905 * lex.c (real_yylex) : Change integer literal overflow handling to
7908 * lex.c (real_yylex): Improve 'integer constant out of range' messages.
7910 1999-06-28 Richard Henderson <rth@cygnus.com>
7912 * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
7914 1999-06-28 Jason Merrill <jason@yorick.cygnus.com>
7916 * error.c (dump_type_real): Handle TREE_LIST again.
7918 * typeck.c (comp_target_parms): Don't complain about
7919 converting from () to (...) if !flag_strict_prototype.
7921 * decl.c (grokdeclarator): Update the names of all variants when
7924 1999-06-21 Mark Mitchell <mark@codesourcery.com>
7926 * init.c (expand_aggr_vbase_init): Rename to
7927 construct_virtual_bases. Conditionalize construction here,
7929 (emit_base_init): Here.
7931 1999-06-19 Mark Mitchell <mark@codesourcery.com>
7933 * semantics.c (finish_asm_stmt): Apply decay conversions to
7936 * decl.c (expand_static_init): When building an anonymous function
7937 for use with atexit, compute its body before and after entering
7940 * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
7943 1999-06-18 Mark Mitchell <mark@codesourcery.com>
7945 * init.c (expand_aggr_vbase_init): Add flag parameter.
7946 (build_partial_cleanup_for): Remove, inlining into ..
7947 (expand_cleanup_for_base): ... here. Take flag parameter.
7948 (emit_base_init): Pass the in_chrg parameter to
7949 emit_aggr_vbase_init.
7950 (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
7952 1999-06-16 Mark Mitchell <mark@codesourcery.com>
7954 * decl2.c (import_export_decl): Use same_type_p, rather than
7955 relying on pointer-equality for types.
7957 * method.c (do_build_copy_constructor): Simplify.
7959 * call.c (build_method_call): Remove bogus code for two-argument
7961 * init.c (build_new_1): Expand on comment, and remove dead code.
7963 * init.c (expand_cleanup_for_base): New function, split out
7965 (emit_base_init): Here.
7966 (expand_aggr_vbase_init): Use it.
7968 1999-06-15 Mark Mitchell <mark@codesourcery.com>
7970 * cp-tree.h (class_cache_firstobj): Declare.
7971 (maybe_push_cache_obstack): Rename to push_cache_obstack.
7972 * class.c (permanent_obstack): Remove declaration.
7973 (class_cache_firstobj): Make it global.
7974 (add_method): Don't use permanent_obstack directly.
7975 (pushclass): Only free the class_cache_obstack if we know how far
7977 (maybe_push_cache_obstack): Rename to push_cache_obstack.
7978 * decl.c: Remove dead comment.
7979 (saved_scope): Add class_cache_firstobj.
7980 (push_to_top_level): Save it.
7981 (pop_from_top_level): Restore it.
7982 (push_class_level_binding): Use push_cache_obstack, not
7983 maybe_push_cache_obstack.
7984 * search.c (push_class_decls): Likewise.
7986 1999-06-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
7988 * pt.c (tsubst_friend_function): Push into namespace of friend
7989 function before pushdecl'ing it.
7991 1999-06-14 Nathan Sidwell <nathan@acm.org>
7993 * call.c (build_new_op): Remove REF_BIND from all operands.
7995 1999-06-13 Alexandre Oliva <oliva@dcc.unicamp.br>
7997 * init.c (build_new_1): Look up operator delete even if there was
7998 no explicit new placement.
8000 1999-06-08 Nathan Sidwell <nathan@acm.org>
8002 * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
8004 (build_throw): ... here. Call it.
8005 (process_start_catch_block): Call it.
8007 1999-06-07 Mark Mitchell <mark@codesourcery.com>
8009 * search.c (convert_pointer_to_single_level): Reimplement without
8012 1999-06-06 Mark Mitchell <mark@codesourcery.com>
8014 * method.c (is_back_referenceable_type): Back-reference bools when
8017 1999-06-07 Dave Brolley <brolley@cygnus.com>
8019 * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
8020 * input.c (putback_buffer): New structure type.
8021 (putback): Replaces putback_char member.
8022 (putback): Replaces putback_char static variable.
8023 (feed_input): Use putback.
8024 (end_input): Use putback.
8025 (sub_getch): Use putback.
8026 (put_back): Use putback.
8028 1999-06-05 Mark Mitchell <mark@codesourcery.com>
8030 * decl.c (grokdeclarator): Fix typo in last change.
8032 1999-06-04 Jason Merrill <jason@yorick.cygnus.com>
8034 * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
8035 (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
8037 1999-06-04 Nathan Sidwell <nathan@acm.org>
8039 * except.c (build_throw): Check throw expression validity.
8041 1999-06-03 Mark Mitchell <mark@codesourcery.com>
8043 * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
8044 just because flag_signed_bitfields is false.
8046 1999-06-03 Nathan Sidwell <nathan@acm.org>
8048 * semantics.c (begin_class_definition): Update the struct's
8050 * class.c (finish_struct): ... rather than here.
8052 * decl.c (make_typename_type): Don't rely on uninitialized
8055 1999-05-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8057 * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
8059 1999-05-31 Mark Mitchell <mark@codesourcery.com>
8061 * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
8062 and friends rather than messing with current_obstack directly.
8063 (cp_build_qualified_type_real): Rework ARRAY_TYPE
8064 allocation to match practice throughout the rest of the
8067 1999-05-30 Mark Mitchell <mark@codesourcery.com>
8069 * lex.c (make_lang_type): Create TYPE_BINFO for
8070 TEMPLATE_TYPE_PARMs just like for non-template types.
8072 * decl.c (start_decl): Move checks on initialization to ...
8073 (cp_finish_decl): Here. Tidy formatting slightly.
8075 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8077 * decl.c (add_binding): Don't complain about a redeclaration of a
8078 semantically identical typedef in a local scope.
8080 1999-05-28 Nathan Sidwell <nathan@acm.org>
8082 * decl.c (complete_array_type): Allocate off same obstack. Fix
8083 DO_DEFAULT comment to match reality.
8085 * friend.c (make_friend_class): Fix diagnostic typo.
8087 1999-05-28 Mark Mitchell <mark@codesourcery.com>
8089 * decl.c (lookup_namespace_name): Handle getting a
8091 (expand_static_init): Don't call pushdecl for implicitly declared
8092 `atexit' used to register destructors.
8094 1999-05-25 Mark Mitchell <mark@codesourcery.com>
8096 * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
8099 * cp-tree.h (NAMESPACE_LEVEL): Reformat.
8100 (lang_decl_flags): Document MEMFUNC_POINTER_TO. Save four bytes
8101 by combining TEMPLATE_INFO and LEVEL into a single union.
8102 (DECL_TEMPLATE_INFO): Reformat.
8103 (DECL_SAVED_TREE): Document.
8104 (DECL_TEMPLATE_INJECT): Remove.
8105 * class.c (finish_struct): Remove code to deal with
8106 DECL_TEMPLATE_INJECT.
8108 * decl.c (maybe_process_template_type_declaration): Handle all new
8109 types in templates uniformly.
8110 * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
8112 * pt.c (lookup_template_class): Inject template instantiations of
8113 forward-declarations.
8114 (instantiate_class_template): Remove code processing
8115 DECL_TEMPLATE_INJECT.
8117 * pt.c (lookup_template_class): Tweak lookup to find member
8120 * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
8122 * semantics.c (finish_asm_stmt): Make strings permanent if they're
8125 1999-05-25 Jason Merrill <jason@yorick.cygnus.com>
8127 * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
8128 parts of pointer to data member types.
8130 1999-05-24 Mark Mitchell <mark@codesourcery.com>
8132 * decl2.c (mark_vtable_entries): Don't make a copy of a function,
8133 and then make it look like `abort'. Just use `abort' instead.
8135 * typeck.c (build_static_cast): Don't allow static_casts that cast
8137 (casts_away_constness_r): New function.
8138 (casts_away_constness): Likewise.
8140 * decl.c (lookup_tag): Remove code no longer needed after
8141 name-lookup improvements.
8142 * decl2.c (handle_class_head): Make error-recovery more robust.
8143 * friend.c (make_friend_class): Reject templated typename types.
8144 * lex.c (is_global): A template parameter isn't global.
8145 * parse.y (class_head): Robustify.
8146 * parse.c: Regenerated.
8148 1999-05-22 Mark Mitchell <mark@codesourcery.com>
8150 * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
8151 INDIRECT_REFs, and COMPONENT_REFs. Handle FIELD_DECLs.
8153 * cp-tree.h (push_nested_namespace): Declare.
8154 (pop_nested_namespace): Likewise.
8155 * decl.c (push_nested_namespace): New function.
8156 (pop_nested_namespace): Likewise.
8157 * pt.c (instantiate_class_template): Use them.
8159 * tree.c (mapcar): Handle NON_LVALUE_EXPR.
8161 * cp-tree.h (cplus_expand_constant): Declare.
8162 * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
8163 converted from one pointer-to-object type to another.
8164 * expr.c (cplus_expand_constant): Don't make it static.
8165 * typeck.c (build_component_ref): Don't crash when presented with
8166 a component which is a TEMPLATE_DECL.
8167 (build_ptrmemfunc): Tidy. Clarify comment. Make sure that even a
8168 cast from a pointer-to-member constant to its own type does not
8169 result in a valid non-type template argument.
8171 1999-05-21 Mark Mitchell <mark@codesourcery.com>
8172 Nathan Sidwell <nathan@acm.org>
8174 * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
8175 * cp-tree.h: Fix typo in documentation on pointers-to-members.
8176 (cp_build_qualified_type): Make it a macro.
8177 (cp_build_qualified_type_real): Declare.
8178 * decl.c (grokdeclarator): Remove misleading comment. Avoid
8179 problem with template parameters and restrict-qualification.
8180 * gxx.gperf: Replace NORID with RID_UNUSED throughout.
8181 * hash.h: Regenerated.
8182 * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
8184 (NORID): Remove definition.
8185 * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
8186 (tsubst): Likewise. Remove special handling for FUNCTION_TYPEs.
8187 (fn_type_unification): Check that the function type resulting from
8188 the deduction is legal.
8189 (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
8190 (unify): Use cp_build_qualified_type_real.
8191 * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
8192 (cp_build_qualified_type): Rename to ...
8193 (cp_build_qualified_type_real): Add additional COMPLAIN parameter
8194 and modify appropriately.
8196 * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
8197 reveal optimization opportunities.
8199 * pt.c (tsubst): Don't issue error messages when we're not
8200 complaining, even if we see a qualified function type.
8201 (check_cv_quals_for_unify): Don't allow a qualified function
8204 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8206 * class.c (instantiate_type): Downgrade errors for object-dependent
8207 memfn refs to pedwarn.
8209 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8211 * decl.c (grokdeclarator): Don't treat [] as indicating a
8212 zero-sized array in a typedef.
8214 * call.c (build_object_call): Don't look at DECL_NAME for a type.
8215 (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
8216 (typeck.c): Or TYPE_MAIN_VARIANT for a type.
8218 * pt.c (for_each_template_parm): Rework to match documentation.
8219 Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
8221 1999-05-20 Jason Merrill <jason@yorick.cygnus.com>
8223 * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
8225 * class.c (finish_base_struct): Allow non-COM bases for COM classes
8226 except at the leftmost position.
8227 (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
8228 Pass the binfo's class, not the most derived, to skip_rtti_stuff.
8229 * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
8231 * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
8232 (build_cplus_new): Make sure that what we return is of the right type.
8234 1999-05-20 Mark Mitchell <mark@codesourcery.com>
8236 * cp-tree.h (make_ptrmem_cst): New function.
8237 * expr.c (cplus_expand_constant): Split out from ...
8238 (cplus_expand_expr): Here. Use cplus_expand_constant.
8239 (init_cplus_expand): Set lang_expand_constant.
8240 * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
8242 * tree.c (make_ptrmem_cst): Define.
8243 * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
8244 * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
8246 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8248 * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
8250 * decl2.c (start_static_storage_duration_function): Fix comment.
8251 (finish_file): Create static storage duration functions lazily.
8253 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8255 Implement anonymous structs.
8256 * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
8257 * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
8258 * class.c (finish_struct_1): Remove redundant check for anon struct.
8259 * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
8260 (check_tag_decl): Check for anonymous struct here.
8261 * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
8262 * init.c (sort_member_init, emit_base_init): Handle getting fields
8263 as well as names in current_member_init_list.
8264 (perform_member_init): Handle getting an anon aggr.
8265 * method.c (do_build_assign_ref): Don't descend into anon aggrs.
8266 (do_build_copy_constructor): Likewise.
8268 1999-05-19 Mark Mitchell <mark@codesourcery.com>
8270 * tree.c (cp_build_qualified_type): Don't allow qualified function
8273 Wed May 19 02:50:53 1999 Arvind Sankar <arvinds@mit.edu>
8275 * gxxint.texi: Fix typo.
8277 1999-05-19 Jason Merrill <jason@yorick.cygnus.com>
8279 * call.c (find_scoped_type, resolve_scope_to_name): Lose.
8280 * class.c (finish_struct_1): Use CLASS_TYPE_P.
8281 * ptree.c (print_lang_type): Likewise.
8282 * typeck.c (build_modify_expr, c_expand_asm_operands): Use
8284 * typeck2.c (digest_init): Likewise.
8286 1999-05-18 Jason Merrill <jason@yorick.cygnus.com>
8288 * call.c (joust): Compare the types of the conv ops, not the
8289 target types of the conversions.
8291 Tue May 18 00:21:34 1999 Zack Weinberg <zack@rabi.phys.columbia.edu>
8293 * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
8296 1999-05-17 Mark Mitchell <mark@codesourcery.com>
8298 * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
8299 * decl.c (grokfndecl): Don't allow inline declarations of friend
8300 template specializations, or friend template specializations with
8302 * pt.c (tsubst): Handle substitution into array types that does
8303 not yield a fixed upper bound, even when not processing a
8305 (tsubst_copy): Deal with the fact that the second operand to a
8306 TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
8307 * search.c (marked_pushdecls_p): Don't descend into
8308 TEMPLATE_TYPE_PARMs and the like.
8309 (unmarked_pushdecls_p): Likewise.
8311 * call.c (build_over_call): Don't throw away
8312 initializations/copies of empty classes; use MODIFY_EXPR and
8313 INIT_EXPR as for non-empty classes.
8314 * class.c (finish_struct_1): Put the padding byte for an empty
8315 class on the TYPE_NONCOPIED_PARTS list for the class.
8317 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8319 * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
8320 indicate a reference to a field that is a qualified name.
8322 1999-05-16 Jason Merrill <jason@yorick.cygnus.com>
8324 * decl2.c (finish_objects): Don't use .?tors.* if we don't have
8325 ASM_OUTPUT_CONSTRUCTOR.
8327 * friend.c (do_friend): Add attrlist arg. Remove support for
8328 getting a non-decl as 'decl'.
8329 * decl.c (grokfndecl): Remove attrlist arg. Don't set attrs or
8331 (grokdeclarator): Adjust.
8332 * cp-tree.h: Adjust.
8334 1999-05-16 Mark Mitchell <mark@codesourcery.com>
8336 * cp-tree.h (permanent_p): New function.
8337 * init.c (build_new_1): Use mapcar, not copy_node, to copy a
8338 possibly complex tree node.
8339 * tree.c (mapcar): Adjust comments, and follow coding standards in
8341 (permanent_p): New function.
8343 1999-05-13 Per Bothner <bothner@cygnus.com>
8345 * class.c (push_lang_context): Turn off DECL_IGNORED_P for
8346 primitive Java types, if we actually see `extern "Java"'.
8348 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.phys.columbia.edu>
8350 * lang-specs.h: Pass -$ to the preprocessor.
8352 1999-05-10 Jason Merrill <jason@yorick.cygnus.com>
8354 * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
8355 Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
8356 (resolve_offset_ref): Don't handle a raw baselink.
8357 * cvt.c (build_expr_type_conversion): Likewise.
8358 * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
8359 convert_for_initialization): Likewise.
8360 * class.c (instantiate_type): Handle seeing a baselink under an
8362 * error.c (dump_expr): Likewise.
8363 * pt.c (for_each_template_parm): Likewise.
8364 (resolve_overloaded_unification): Likewise.
8365 * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
8366 * typeck.c (expr_sizeof): Also complain about other permutations
8367 of overloaded functions.
8369 1999-05-07 Jason Merrill <jason@yorick.cygnus.com>
8371 * init.c (resolve_offset_ref): Don't return a raw method.
8373 * typeck.c (decay_conversion): Don't handle a raw method.
8374 Resolve all OFFSET_REFs.
8375 (get_member_function_from_ptrfunc): 0 is a valid vtable index.
8376 (build_binary_op_nodefault): Handle resolving overloaded fns. Use
8377 same_type_p for pmf bits. Don't use build_binary_op to compare
8378 raw pointers to methods.
8379 (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
8380 to decide when to call resolve_offset_ref.
8381 (build_c_cast, convert_for_initialization): Likewise.
8382 * cvt.c (build_expr_type_conversion): Likewise.
8384 1999-05-06 Nathan Sidwell <nathan@acm.org>
8386 * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
8388 1999-05-05 Mark Mitchell <mark@codesourcery.com>
8390 * decl2.c (start_objects): Don't let static constructors and
8391 destructors get inlined.
8393 * parse.y (nested_name_specifier): Make sure ordinary types are
8394 complete, just like template types.
8395 * parse.c: Regenerated.
8397 * pt.c (check_explicit_specialization): Improve error messages.
8399 1999-05-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
8401 * typeck.c (string_conv_p): Use same_type_p to check whether we
8402 try to convert between char and wchar_t.
8404 1999-05-03 Mark Mitchell <mark@codesourcery.com>
8406 * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
8407 lookup to error_mark_node here.
8408 (lookup_member): Revise documentation. Add comments. Don't set
8409 the TREE_TYPE to error_mark_node here, and don't build up an extra
8410 TREE_LIST for ambiguous lookups.
8411 (setup_class_bindings): Adjust accordingly.
8412 (push_class_decls): Revise out-of-date comments.
8414 * typeck.c (build_const_cast): Tighten checks for legality.
8416 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8418 * init.c (build_member_call): Lookup names coming from
8419 namespace-scoped LOOKUP_EXPR.
8421 1999-05-03 Jim Blandy <jimb@zwingli.cygnus.com>
8423 * gxxint.texi: Add documentation for 'I'.
8425 1999-05-02 Martin von Löwis <loewis@informatik.hu-berlin.de>
8427 * tinfo.cc (operator==): Qualify type_info with std::.
8429 1999-05-02 Mark Mitchell <mark@codesourcery.com>
8431 * cp-tree.h (lang_decl_flags): Remove comdat. Updated dummy.
8432 (DECL_COMDAT): Remove definition.
8434 1999-05-01 Mark Mitchell <mark@codesourcery.com>
8436 * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
8439 1999-04-30 Mark Mitchell <mark@codesourcery.com>
8441 * class.c (build_vtable): Use build_lang_decl when building
8442 vtables, not just build_decl.
8443 (prepare_fresh_vtable): Likewise.
8444 * decl.c (wrapup_globals_for_namespace): Mark vtables as
8445 DECL_EXTERNAL when calling wrapup_global_declarations.
8446 * decl2.c (priority_info_s): Add initializations_p and
8447 destructions_p members.
8448 (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
8449 when deciding what vtables to write out.
8450 (ssdf_decls): New variable.
8451 (ssdf_decls_used): Likewise.
8452 (start_static_storage_duration_function): Deal with being called
8453 multiple times. Avoid inlining this function.
8454 (generate_inits_for_priority): Deal with reuse of priority map.
8455 (get_priority_info): Clear initializations_p and destructions_p.
8456 (do_static_initialization): Tweak comment.
8457 (do_static_destruction): Likewise. Fix condition on sentries for
8459 (generate_ctor_or_dtor_function): Call all of the static storage
8461 (generate_ctor_or_dtor_function_for_priority): Check
8462 initializations_p and destructions_p to see what priorities need
8463 initialization functions.
8464 (finish_file): Rework to generate multiple static storage duration
8465 functions, rather than just one.
8467 * typeck.c (build_const_cast): Tweak last change to handle
8468 templates correctly.
8470 * typeck.c (build_const_cast): Disallow use of const_cast to
8471 anything but a pointer or reference type.
8473 1999-04-30 Nathan Sidwell <nathan@acm.org>
8475 * decl.c (cp_finish_decl): Don't permit arrays of abstract or
8478 1999-04-29 Mark Mitchell <mark@codesourcery.com>
8480 * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
8481 (finish_file): Indent comments properly.
8483 1999-04-29 Richard Henderson <rth@cygnus.com>
8485 * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
8486 (do_static_destruction): Likewise.
8488 1999-04-29 Nathan Sidwell <nathan@acm.org>
8490 * cp-tree.h (TYPE_NOTHROW_P): New macro.
8491 * decl2.c (delete_sanity): Warn on deleting void *.
8492 * init.c (build_new_1): Use TYPE_NOTHROW_P.
8493 * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
8494 throwing operator new.
8496 1999-04-28 Nathan Sidwell <nathan@acm.org>
8498 * cp-tree.h (build_component_addr): Remove prototype.
8499 * typeck.c (build_component_addr): Make static. Remove MSG
8501 (build_component_addr): Remove MSG parameter, clean up
8503 (build_x_function_call): Use cp_error.
8504 (build_unary_op): Adjust call of build_component_addr.
8506 1999-04-28 Mark Mitchell <mark@codesourcery.com>
8508 * pt.c (tsubst_friend_class): Check for NULL.
8510 Wed Apr 28 11:42:22 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
8512 * search.c (binfo_for_vtable): Initialize bfvi.var.
8514 1999-04-27 Nathan Sidwell <nathan@acm.org>
8516 * rtti.c (build_x_typeid): Check rtti is enabled.
8518 1999-04-26 Mark Mitchell <mark@codesourcery.com>
8520 * search.c (is_subobject_of_p): Make sure we're looking at the
8523 1999-04-26 Marc Espie <espie@cvs.openbsd.org>
8525 * Make-lang.in (cplib2.ready): Don't depend on phony targets.
8527 1999-04-23 Mark Mitchell <mark@codesourcery.com>
8529 * decl2.c (finish_file): Tweak handling of extern inlines so that
8530 they are not unnecessarily put out.
8532 * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
8533 such as base classes.
8535 1999-04-22 Brendan Kehoe <brendan@cygnus.com>
8537 * tree.c (build_exception_variant): Fix typo: use the chain of U,
8538 not trying V, while cycling through U.
8540 1999-04-22 Mark Mitchell <mark@codesourcery.com>
8542 * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
8543 preserves_first_arg. Enlarge dummy accordingly.
8544 (DECL_TINFO_FN_P): New macro.
8545 (SET_DECL_TINFO_FN_P): Likeiwse.
8546 (DECL_RETURNS_FIRST_ARG): Remove.
8547 (DECL_PRESERVES_THIS): Likewise.
8548 (DECL_INIT_PRIORITY): New macro.
8549 (finish_struct_1): Change prototype.
8550 (cat_namespace_levels): Remove prototype.
8551 (vtable_decl_p): New prototype.
8552 (vtype_decl_p): Likewise.
8553 (sigtable_decl_p): Likewise.
8554 (walk_globals_pred): New typedef.
8555 (walk_globals_fn): Likewise.
8556 (walk_globals): New prototype.
8557 (walk_namespaces_fn): New typedef.
8558 (walk_namespaces): New prototype.
8559 (wrapup_globals_for_namespace): Likewise.
8560 (walk_vtables): Remove prototype.
8561 (walk_sigtables): Likewise.
8562 (instantiate_pending_templates): New prototype.
8563 * class.c (finish_struct_1): Don't return a value.
8564 * decl.h (pending_statics): Remove declaration.
8565 * decl.c (walk_namespaces_r): New function.
8566 (walk_globals_r): Likewise.
8567 (vtable_decl_p): Likewise.
8568 (vtype_decl_p): Likewise.
8569 (sigtable_decl_p): Likewise.
8570 (walk_namespaces): Likewise.
8571 (walk_globals_data): New type.
8572 (walk_globals): New function.
8573 (wrapup_globals_for_namespace): Likewise.
8574 (expand_static_init): Remove assertion. Remove redundancy in
8575 conditional. Don't put static data members in static_aggregates
8577 (finish_function): Remove redundancy in conditional. Don't set
8578 DECL_RETURNS_FIRST_ARG.
8579 (cat_namespace_levels): Remove.
8580 * decl2.c: Include splay-tree.h and varray.h.
8581 (priority_info_s): New structure.
8582 (finish_vtable_vardecl): Change prototype. Adjust for new calling
8584 (prune_vtable_vardecl): Likewise.
8585 (finish_sigtable_vardecl): Likewise.
8586 (setup_initp): Remove.
8589 (start_static_storage_duration_function): New function.
8590 (generate_inits_for_priority): Likewise.
8591 (finish_static_storage_duration_function): Likewise.
8592 (get_priority_info): Likewise.
8593 (do_static_initialization): Likewise.
8594 (do_static_destruction): Likewise.
8595 (do_static_initialization_and_destruction): Likewise.
8596 (generate_ctor_or_dtor_function): Likewise.
8597 (generate_ctor_and_dtor_functions_for_priority): Likewise.
8598 (pending_statics): Make it a varray.
8599 (pending_statics_used): New variable.
8600 (saved_inlines): Make it a varray.
8601 (saved_inlines_used): New variable.
8602 (finish_static_data_member): Change method of updating
8604 (mark_inline_for_output): Remove #if 0'd code. Change method of
8605 updating saved_inlines.
8606 (walk_vtables): Remove.
8607 (walk_sigtables): Likewise.
8608 (import_export_decl): Use DECL_TINFO_FN_P.
8609 (pending_templates): Remove declaration.
8610 (maybe_templates): Likewise.
8611 (static_aggregates_initp): Likewise.
8612 (setup_initp): Likewise.
8613 (finish_objects): Simplify.
8614 (INITIALIZE_P_IDENTIFIER): New macro.
8615 (PRIORITY_IDENTIFIER): New macro.
8616 (SSDF_IDENTIFIER): New macro.
8617 (initialize_p_decl): New variable.
8618 (priority_decl): Likewise.
8619 (ssdf_decl): Likewise.
8620 (priority_info_map): Likewise.
8621 (finish_file): Recode output of static intializers and other
8622 file-scope finalization tasks.
8623 * error.c (OB_END_TEMPLATE_ID): New macro.
8624 (dump_type_real): Use it.
8625 (dump_decl): Likewise.
8626 (dump_function_name): Likewise.
8627 * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
8629 (check_newline): Use walk_globals, not walk_vtables.
8630 * pt.c (pending_tempalte_expansions): Remove.
8631 (set_vardecl_interface_info): Likewise.
8632 (pending_templates): Make static.
8633 (maybe_templates): Likewise.
8634 (instantiate_class_template): Adjust call to finish_struct_1.
8635 (instantiate_pending_templates): New function.
8636 * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
8637 * tree.c (static_aggregates_initp): Remove.
8638 (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
8640 * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
8642 * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
8643 with the RTL code RETURN.
8644 * hash.h: Regenerated.
8645 * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
8646 * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
8647 * parse.c: Regenerated.
8648 * pt.c: Include varray.h. Include rtl.h since varray.h requires
8650 (inline_parm_levels): New variable.
8651 (inline_parm_levels_used): Likewise.
8652 (maybe_begin_member_template_processing): Update them.
8653 (maybe_end_member_template_processing): Use them, rather than
8654 guessing how many levels to pop.
8656 * decl.c (make_typename_type): Tighten error-checking.
8658 1999-04-20 Mark Mitchell <mark@codesourcery.com>
8660 * cp-tree.h (build_binary_op): Remove unneeded parameter.
8661 * class.c (build_vrable_entry_ref): Adjust call to
8663 * decl.c (expand_static_init): Likewise.
8664 (grokdeclarator): Likewise.
8665 (finish_function): Likewise.
8666 * decl2.c (delete_sanity): Likewise.
8667 (do_dtors): Likewise.
8668 (do_ctors): Likewise.
8669 * error.c (dump_type_suffix): Likewise.
8670 * expr.c (cplus_expand_expr): Likewise.
8671 * init.c (resolve_offset_ref): Likewise.
8672 (build_new): Likewise.
8673 (build_new_1): Likewise.
8674 (build_vec_delete_1): Likewise.
8675 (expand_vec_init_catch_clause): Likewise.
8676 (build_delete): Likewise.
8677 * pt.c (tsubst): Likewise.
8678 * rtti.c (synthesize_tinfo_fn): Likewise.
8679 * search.c (expand_upcast_fixups): Likewise.
8680 (expand_direct_vtbls_init): Likewise.
8681 * typeck.c (get_member_function_from_ptrfunc): Likewise.
8682 (build_binary_op_nodefault): Likewise.
8683 (point_int_sum): Likewise.
8684 (pointer_diff): Likewise.
8685 (build_unary_op): Likewise.
8686 (build_modify_expr): Likewise.
8687 (get_delta_difference): Likewise.
8688 (build_ptrmemfunc): Likewise.
8689 (expand_ptrmemfunc_cst): Likewise.
8691 1999-04-20 Jason Merrill <jason@yorick.cygnus.com>
8693 * decl.c (grokfndecl): Always call cplus_decl_attributes.
8694 * decl2.c (grokfield): Pass attrlist to grokdeclarator.
8696 1999-04-19 Mark Mitchell <mark@codesourcery.com>
8698 * cp-tree.h (finish_static_data_member_decl): New function.
8699 * decl2.c (finish_static_data_member_decl): Split out from ...
8701 * pt.c (instantiate_class_template): Use it here instead of
8703 (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
8704 finish_static_data_member_decl will do that. Explicit set
8705 DECL_EXTERNAL to match non-template processing.
8707 1999-04-18 Mark Mitchell <mark@codesourcery.com>
8709 * cp-tree.h (finish_class_definition): Add parameter.
8710 * parse.y (structsp): Use it. Don't call pop_scope here.
8711 * parse.c: Regenerated.
8712 * semantics.c (finish_class_definition): Pop it here.
8714 1999-04-17 Mark Mitchell <mark@codesourcery.com>
8716 * decl.c (xref_tag): Revise handling of nested template
8718 * pt.c (check_explicit_specialization): Tweak handling of friend
8719 templates in template classes.
8720 (tsubst_friend_class): Handle friend declarations for nested
8721 member template classes.
8723 1999-04-16 Mark Mitchell <mark@codesourcery.com>
8725 * class.c (finish_struct): Remove unused variable.
8726 (pushclass): Likewise.
8727 (invalidate_class_lookup_cache): Likewise.
8728 * cp-tree.def (TYPENAME_TYPE): Improve documentation.
8729 * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
8730 doesn't get obliterated.
8731 (make_typename_type): Handle template classes correctly.
8733 * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
8734 (storetags): Declare.
8735 * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
8736 (pushclass): Likewise. Use storetags to install tag declarations,
8738 (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
8739 * decl.c (storetags): Make it global.
8740 (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
8741 implicit typename declaration.
8742 (pushtag): Tidy. Don't use TREE_NONLOCAL_FLAG.
8743 * method.c (hack_identifier): Likewise.
8744 * search.c (lookup_member): Likewise.
8746 * decl.c (warn_about_implicit_typename_lookup): New function.
8747 (lookup_name_real): Use it. Rework handling of implicit typename
8750 1999-04-15 Mark Mitchell <mark@codesourcery.com>
8752 * cp-tree.h (lookup_nested_field): Remove.
8753 * class.c (push_nested_class): Handle UNION_TYPEs.
8754 (pop_nested_class): Likewise.
8755 * decl.c (lookup_name_real): Don't call lookup_nested_field.
8756 (start_decl): Use push_nested_class, not just pushclass.
8757 (cp_finish_decl): Use pop_nested_class, not just popclass.
8758 * search.c (lookup_nested_field): Remove.
8760 * cp-tree.h (lang_type): Add documentation.
8761 * decl2.c (handle_class_head): Create template declarations here,
8763 * parse.y (class_head): Return whether or not we entered a new
8764 scope, as well as the type named.
8765 (named_class_head): Likewise.
8766 (named_complex_class_head_sans_basetype): Likewise.
8767 (structsp): Adjust accordingly. Pop scope when required.
8768 * parse.c: Regenerated.
8769 * pt.c (check_default_tmpl_args): Robustify.
8770 (redeclare_class_template): Likewise.
8771 (instantiate_class_template): An instantiation of an
8772 anonymous union is itself an anonymous union.
8773 * semantics.c (begin_class_definition): Don't create template
8776 1999-04-15 Jason Merrill <jason@yorick.cygnus.com>
8778 * parse.y (after_type_declarator_intern): New nonterminal.
8779 (after_type_declarator): Use it.
8780 (direct_after_type_declarator): Likewise. Move above
8781 nonnested_type to fix reduce/reduce conflict resolution.
8782 (declmods): Reducing from just 'attributes' has EMPTY precedence.
8783 * Makefile.in (CONFLICTS): Update.
8785 * decl.c (define_label): Downgrade error for jumping over a
8786 non-POD decl to pedwarn.
8788 1999-04-14 Mark Mitchell <mark@codesourcery.com>
8790 * cp-tree.h (popclass): Change declaration.
8791 (pop_nested_class): Likewise.
8792 (poplevel_class): Remove declaration.
8793 * call.c (convert_default_argument): Pass no arguments to
8795 * class.c (finish_struct_1): Likewise.
8796 (finish_struct): Likewise.
8797 (popclass): Remove argument. Simplify code accordingly.
8798 (pop_nested_class): Likewise.
8799 * decl.c (poplevel_class): Declare it here, and make it static.
8800 (poplevel): Handle class scopes.
8801 (poplevel_class): Don't take an rgument. Simplify.
8802 (pop_everything): Pass no arguments to pop_nested_class.
8803 (cp_finish_decl): Pass no arguments to popclass.
8804 (grokdeclarator): Pass no arguments to pop_nested_class.
8805 (finish_function): Likewise.
8806 * decl2.c (grokfield): Likewise.
8807 (pop_scope): Pass no arguments to popclass.
8808 * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
8809 * pt.c (instantiate_class_template): Move call to pushclass, and
8810 document. Pass no arguments to popclass.
8811 (regenerate_decl_from_template): Likewise.
8813 1999-04-14 Jason Merrill <jason@yorick.cygnus.com>
8815 * typeck.c (build_unary_op): Handle taking the address of a unique
8816 bound non-static member function.
8818 1999-04-13 Martin von Loewis <loewis@informatik.hu-berlin.de>
8820 * lang-options.h (-Wdeprecated): New flag.
8821 * decl2.c (warn_deprecated): New flag.
8822 (lang_decode_option): Deprecated this-is-variable,
8823 external-templates, alt-external-templates.
8824 Support -Wdeprecated.
8825 * errfn.c (cp_deprecated): New function.
8827 1999-04-13 Jason Merrill <jason@yorick.cygnus.com>
8829 * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
8830 of the decls themselves.
8832 * pt.c (tsubst_function_type): Copy attributes over.
8834 * tree.c (cp_valid_lang_attribute): New fn. Handle init_priority
8836 * cp-tree.h: Add prototype.
8837 * decl.c (init_decl_processing): Set valid_lang_attribute.
8839 1999-04-13 Mark Mitchell <mark@codesourcery.com>
8841 * class.c (finish_struct_1): Look at the const-ness of the field's
8842 type, not the TREE_READONLY-ness of the declaration.
8843 * method.c (synthesize_method): Likewise.
8844 * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
8845 creating new declarations.
8847 1999-04-13 Mike Stump <mrs@wrs.com>
8849 * decl2.c (import_export_decl): Because vtables always reference
8850 virtual functions, even if they are inlined, don't allow
8851 -fno-implement-inlines to not emit them, instead, emit them with
8853 * decl.c (start_function): Likewise.
8855 1999-04-12 Jason Merrill <jason@yorick.cygnus.com>
8857 * cp-tree.h (struct lang_type): Add com_interface.
8858 (CLASSTYPE_COM_INTERFACE): New macro.
8859 * class.c (set_rtti_entry): COM interface classes have no RTTI
8860 entries in their vtables; adjust.
8861 (add_virtual_function, finish_base_struct, skip_rtti_stuff,
8862 modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
8863 finish_struct_1): Likewise.
8864 * decl2.c (mark_vtable_entries): Likewise.
8865 * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
8866 * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
8867 expand_upcast_fixups): Likewise.
8868 * tree.c (debug_binfo): Likewise.
8870 * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
8871 * typeck.c (comptypes): If we get it, ignore attributes.
8872 * class.c (instantiate_type): Use BASELINK_P. Change complain
8873 parameter to flags; 2 means ignore attributes.
8874 * call.c (build_op_delete_call): Pass it.
8876 * decl.c (xref_tag): Only complain once about using a typedef-name
8877 with 'struct'. Downgrade to pedwarn.
8879 * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
8881 * parse.y (absdcl_intern): New nonterminal.
8882 (absdcl, direct_abstract_declarator): Use it.
8884 * pt.c (lookup_template_class): Look through implict typename.
8886 1999-04-11 Mark Mitchell <mark@codesourcery.com>
8888 * friend.c (add_friend): Deal gracefully with error_mark_node.
8889 * method.c (build_overload_value): Handle pointers-to-members as
8890 template parameters.
8892 * decl.c (push_binding): Fix typo in comment.
8894 1999-04-10 Mark Mitchell <mark@codesourcery.com>
8896 * error.c (dump_type_real): If a typename is a template-id, put
8897 out the template arguments.
8898 (dump_expr): Handle TEMPLATE_ID_EXPR.
8899 * pt.c (lookup_template_class): Now that full arguments are
8900 available everywhere, remove code that tried to guess them.
8902 1999-04-09 Mark Mitchell <mark@codesourcery.com>
8904 * decl.c (make_typename_type): Complain if we don't find a type
8905 when trying to make a typename type for a non-template type.
8907 1999-04-09 Jason Merrill <jason@yorick.cygnus.com>
8909 * decl.c (start_decl): Pass attributes to grokdeclarator.
8910 (grokdeclarator): Handle attributes on constructor-syntax
8913 1999-04-08 Mark Mitchell <mark@codesourcery.com>
8915 * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
8918 * search.c (template_self_reference_p): Tweak.
8920 1999-04-07 Mark Mitchell <mark@codesourcery.com>
8922 * init.c (build_offset_ref): Don't build yet another weird data
8923 structure to describe overloaded functions.
8925 1999-04-06 Mark Mitchell <mark@codesourcery.com>
8927 * cp-tree.h (BASELINK_P): New macro.
8928 (SET_BASELINK_P): Likewise.
8929 * init.c (build_member_call): Remove needless assignment in if
8931 * search.c (lookup_field_r): Fix handling when we are looking
8932 specifically for a type; these are not hidden by functions and
8934 (lookup_member): Use SET_BASELINK_P.
8935 * tree.c (is_overloaded_fn): Use BASELINK_P.
8936 (really_overloaed_fn): Likewise.
8937 (get_first_fn): Likewise.
8939 1999-04-05 Mark Mitchell <mark@codesourcery.com>
8941 * decl.c (lookup_name_current_level): Tweak, and improve
8944 * class.c (maybe_fixup_vptrs): Remove declaration.
8945 (build_class_init_list): Likewise.
8946 * decl.c (pushdecl_class_level): Call check_template_shadow here
8948 (push_class_level_binding): ... not here.
8949 * search.c (dfs_push_type_decls): Only avoid
8950 template-self-reference TYPE_DECLs if they are from base classes.
8952 1999-04-04 Mark Mitchell <mark@codesourcery.com>
8954 * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
8957 1999-04-03 Jason Merrill <jason@yorick.cygnus.com>
8959 * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
8960 (finish_struct_1): Don't call build_class_init_list.
8962 1999-04-02 Mark Mitchell <mark@codesourcery.com>
8964 * tinfo.h (__class_type_info): Fix illegal declaration.
8966 * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
8967 * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
8968 (IDENTIFIER_CLASS_VALUE): Improve documentation.
8969 (is_properly_derived_from): Declare.
8970 (invalidate_class_lookup_cache): Likewise.
8971 (maybe_maybe_note_name_used_in_class): Likewise.
8972 (note_name_declared_in_class): Likewise.
8973 (push_using_decl): Remove duplicate declaration.
8974 (id_in_current_class): Remove declaration.
8975 (push_class_binding): Change prototype.
8976 (clear_identitifer_class_values): Declare.
8977 * call.c (is_properly_derived_from): Make it global.
8978 (build_new_function_call): Be careful about updating candidates.
8979 (build_new_method_call): Handle COMPONENT_REFs. Don't crash when
8980 asked to make illegal calls.
8981 * class.c: Include splay-tree.h.
8982 (class_stack_node): Add names_used slot.
8983 (check_member_decl_is_same_in_complete_scope): Remove.
8984 (add_method): Fix comment. Push the declaration into class
8986 (finish_struct_1): When popping the class, pop the bindings too.
8987 Remove check for data member/function member conflict.
8988 (finish_struct): Remove calls to
8989 check_member_decl_is_same_in_complete_scope. Change calls to
8991 (pushclass): Clear names_used in the class stack entry.
8992 Use invalidate_class_lookup_cache to remove cached entries, rather
8993 than magic values with popclass. Clear IDENTIFIER_CLASS_VALUE
8994 before entering a new class. Remove dead code. Don't mess with
8995 current_function_decl when pushing declarations.
8996 (invalidate_class_lookup_cache): New function, split out from ...
8997 (popclass): Here. Clean up names_used on our way out.
8998 (instantiate_type): Adjust.
8999 (build_self_reference): Don't push the declaration here.
9000 (maybe_note_name_used_in_class): New function.
9001 (note_name_declared_in_class): Likewise.
9002 * decl.c (add_binding): Change prototype.
9003 (find_class_binding_level): New function.
9004 (innermost_nonclass_level): Likewise.
9005 (current_binding_level): Update documentation.
9006 (inner_binding_level): Remove. Replace with current_binding_level
9008 (push_binding_level): Remove special handling of
9009 class_binding_level.
9010 (pop_binding_level): Likewise. Use find_class_binding_level.
9011 (suspend_binding_level): Likewise.
9012 (global_bindings_p): Use innermost_nonclass_level.
9013 (toplevel_bindings_p): Likewise.
9014 (namespace_bindings_p): Likewise.
9015 (pseudo_global_level_p): Likewise.
9016 (push_binding): Clear INHERITED_VALUE_BINDING_P.
9017 (add_binding): Check for illegal multiple declarations. Return a
9018 value indicating whether or not the new binding was legal.
9019 (push_local_binding): Skip over class binding levels. Check
9020 return value from add_binding.
9021 (push_class_binding): Set INHERITED_VALUE_BINDING_P. Call
9022 note_name_declared_in_class.
9023 (pushlevel_class): Remove "fake out the rest of the compiler"
9025 (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
9026 (clear_identifier_class_values): New function.
9027 (pop_from_top_level): Use it.
9028 (pop_everything): Tweak.
9029 (maybe_process_template_type_declaration): Don't push the
9030 declaration for the template here.
9031 (pushtag): Don't push tag declarations into class scope here.
9032 (pushdecl): Apply DeMorgan's law for readability.
9033 (pushdecl_class_level): Remove special-case code for
9034 TYPE_BEING_DEFINED. Handle OVERLOADs and anonymous unions.
9035 (push_class_level_bindng): Deal with inherited bindings.
9036 (lookup_name_real): Remove special-case code for
9037 TYPE_BEING_DEFINED, and some implicit typename magic.
9038 (grokdeclarator): Handle COMPONENT_REF for a template function.
9039 (build_enumerator): Don't call pushdecl_class_level here.
9040 (id_in_current_class): Remove.
9041 * decl2.c (grokfield): Don't call pushdecl_class_level or
9042 check_template_shadow.
9043 * errfn.c (cp_file_of): Don't declare.
9044 (cp_line_of): Likewise.
9045 * error.c (dump_decl): Handle an OVERLOAD.
9046 (cp_file_of): Likewise.
9047 (cp_line_of): Likewise.
9048 * init.c (build_member_call): Handle a COMPONENT_REF.
9049 * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
9050 pushdecl_class_level.
9051 * method.c (hack_identifier): Build COMPONENT_REFs for references
9052 to member templates as well as member functions. Remove dead
9054 * parse.y (left_curly): Remove.
9055 (nonnested_type): Call maybe_note_name_used_in_class, not
9056 pushdecl_class_level.
9057 * parse.c: Regenerated.
9058 (nested_name_specifier_1): Likewise.
9059 * pt.c (check_explicit_specialization): Adjust, for robustness.
9060 (check_template_shadow): Handle OVERLOADs.
9061 (build_template_decl): Set DECL_CONSTRUCTOR_P on the
9062 TEMPLATE_DECL, if appropriate.
9063 * search.c (envelope_add_decl): Remove.
9064 (dfs_pushdecls): Likewise.
9065 (dfs_compress_decls): Likewise.
9066 (dfs_push_decls): New function.
9067 (dfs_push_type_decls): Likewise.
9068 (setup_class_bindings): Likewise.
9069 (template_self_reference_p): Likewise.
9070 (lookup_field_r): Use it.
9071 (looup_member): Remove old comment. Deal with ambiguity.
9072 (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
9073 and remove envelope processing.
9074 * semantics.c (begin_class_definition): Let pushclass push
9075 declarations for base classes.
9076 (finish_member_declaration): Push declarations into class scope.
9077 * typeck.c (build_component_ref): Just put an OVERLOAD into the
9078 COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
9079 (build_x_function_call): Deal with OVERLOAD. Handle template-ids.
9080 * Makefile.in (class.o): Depend on splay-tree.h.
9082 Wed Mar 31 11:30:43 1999 Nathan Sidwell <nathan@acm.org>
9084 * cvt.c (convert_pointer_to_real): Use same_type_p.
9085 * typeck.c (comp_target_types): Use same_type_p.
9087 1999-03-31 Jason Merrill <jason@yorick.cygnus.com>
9089 * semantics.c (begin_inline_definitions,
9090 finish_inline_definitions): Rename from finish_default_args and
9091 begin_inline_definitions, respectively, to something that isn't a
9093 * parse.y (structsp): Adjust.
9095 * tree.c (hash_tree_cons): Remove obsolete via_* parms.
9096 (list_hash_lookup): Likewise.
9097 (hash_tree_chain): Adjust.
9098 * pt.c (tsubst): Adjust.
9099 (tsubst_arg_types): Use plain hash_tree_cons.
9100 * cp-tree.h (hash_tree_cons_simple): Lose.
9101 * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
9103 Wed Mar 31 10:48:29 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9105 * Makefile.in (hash.h): Generate using gperf language 'C', not
9106 'KR-C', so gperf uses the `const' keyword on strings.
9108 * gxx.gperf (resword): Const-ify a char*.
9110 1999-03-30 Jason Merrill <jason@yorick.cygnus.com>
9112 * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
9113 CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
9114 CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
9115 CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
9116 CLASSTYPE_BINFO_AS_LIST): Remove cruft.
9117 * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
9120 1999-03-29 Jason Merrill <jason@yorick.cygnus.com>
9122 * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
9124 1999-03-28 Jason Merrill <jason@yorick.cygnus.com>
9126 * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
9128 1999-03-27 Mark Mitchell <mark@codesourcery.com>
9130 * cp-tree.h (add_friend): Declare.
9131 (add_friends): Likewise.
9132 * friend.c (add_friend): Make it global. Don't add to
9133 DECL_BEFRIENDING_CLASSES if the befriending class is a template.
9134 (add_friends): Make it global.
9135 (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
9136 befriending class is a template.
9137 * parse.y (component_decl_1): Fix typo in comment.
9138 * parse.c: Regenerated.
9139 * pt.c (instantiate_class_template): Use add_friend and
9140 add_friends rather that duplicating some of their functionality
9143 1999-03-27 Jason Merrill <jason@yorick.cygnus.com>
9145 * call.c (build_field_call): Unify 'this' and non-'this' cases.
9147 * typeck.c (build_indirect_ref): Check for 'this' sooner.
9149 Fri Mar 26 10:20:34 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9151 * call.c (op_error): Const-ify a char*.
9152 (add_candidate, source_type, add_warning): Add static prototype.
9153 (print_z_candidates): Const-ify a char*.
9155 * class.c (resolve_address_of_overloaded_function,
9156 fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
9157 (get_vtable_name, finish_struct_1): Const-ify a char*.
9159 * cvt.c (convert_to_reference): Likewise.
9161 * decl.c (redeclaration_error_message, record_builtin_type,
9162 record_unknown_type, member_function_or_else, bad_specifiers):
9164 (find_binding, select_decl, unqualified_namespace_lookup,
9165 lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
9166 Add static prototype.
9167 (warn_extern_redeclared_static, duplicate_decls, pushdecl,
9168 implicitly_declare, record_builtin_java_type, define_function,
9169 grok_op_properties, tag_name): Const-ify a char*.
9171 * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
9172 (define_function, finish_builtin_type): Const-ify a char*.
9173 (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
9174 cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
9175 (file_name_nondirectory): Const-ify a char*.
9176 (init_filename_times): Don't prototype.
9177 (compiler_error): Prototype.
9178 (yyerror, init_repo): Const-ify a char*.
9179 (build_srcloc): Don't prototype.
9180 (build_x_indirect_ref, build_indirect_ref, build_component_addr):
9182 (warn_for_assignment): Don't prototype.
9183 (convert_for_initialization, readonly_error, check_for_new_type,
9184 GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
9187 * decl2.c (acceptable_java_type, output_vtable_inherit,
9188 setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
9189 merge_functions, decl_namespace, validate_nonmember_using_decl,
9190 do_nonmember_using_decl): Add static prototype.
9191 (lang_f_options): Const-ify a char*.
9192 (finish_builtin_type): Likewise.
9193 (add_function, arg_assoc_namespace, arg_assoc_class): Add static
9196 * errfn.c: Include cp-tree.h.
9197 (cp_thing): Add static prototype.
9198 (compiler_error): Don't protoptype.
9199 (cp_compiler_error): Cast `compiler_error' to `errorfn' before
9200 passing it to `cp_thing'.
9202 * error.c (interesting_scope_p): Add static prototype.
9204 * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
9207 * init.c (compiler_error): Don't prototype.
9208 (member_init_ok_or_else): Const-ify a char*.
9209 (build_java_class_ref): Add static prototype.
9211 * lex.c (compiler_error): Don't prototype.
9212 (get_time_identifier, interface_strcmp, extend_token_buffer,
9213 handle_cp_pragma): Const-ify a char*.
9214 (is_global, init_filename_times): Add static prototype.
9215 (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
9216 (compiler_error): Change from fixed args to variable args.
9217 (yyerror): Const-ify a char*.
9219 * parse.y (cond_stmt_keyword): Const-ify a char*.
9220 (parse_decl): Add static prototype.
9222 * pt.c (template_args_equal, print_template_context): Likewise.
9223 (print_candidates, check_default_tmpl_args): Const-ify a char*.
9224 (instantiate_class_template): Likewise.
9226 * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
9228 * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
9229 expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
9231 * search.c (lookup_field_info, lookup_member): Likewise.
9232 (lookup_member): Cast the first argument of `bzero' to a PTR.
9234 * sig.c (compiler_error): Don't prototype.
9235 (build_signature_pointer_or_reference_nam): Const-ify a char*.
9236 (get_sigtable_name, build_member_function_pointer): Likewise.
9238 * tree.c (compiler_error): Don't prototype.
9239 (no_linkage_helper, build_srcloc): Add static prototype.
9240 (build_vbase_pointer_fields): Const-ify a char*.
9241 (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
9243 * typeck.c (compiler_error): Don't prototype.
9244 (convert_for_assignment): Const-ify a char*.
9245 (comp_cv_target_types): Add static prototype.
9246 (build_x_indirect_ref, build_indirect_ref, convert_arguments,
9247 build_component_addr, build_unary_op, convert_for_initialization):
9250 * typeck2.c (ack): Add static prototype and change from fixed args
9252 (readonly_error, check_for_new_type): Const-ify a char*.
9254 * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
9255 fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
9256 (GNU_xref_file): Likewise. Also use `xmalloc' instead of `malloc'.
9257 (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
9258 gen_assign, GNU_xref_member): Const-ify a char*.
9260 1999-03-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9262 * gxxint.texi: Remove old discussion on copying virtual bases.
9264 1999-03-25 Zack Weinberg <zack@rabi.columbia.edu>
9266 * Make-lang.in: Remove all references to g++.o/g++.c.
9267 Link g++ from gcc.o.
9269 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9271 * decl2.c (comdat_linkage): Treat vtables like functions.
9273 1999-03-25 Mark Mitchell <mark@codesourcery.com>
9275 * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
9277 1999-03-25 Nathan Sidwell <nathan@acm.org>
9279 * decl.c (init_decl_processing): Add `signed' type as a synonym
9282 1999-03-25 Jason Merrill <jason@yorick.cygnus.com>
9284 * typeck.c (common_type): Handle cv-qual unification for pointers
9287 * decl.c (unqualified_namespace_lookup): Return error_mark_node
9289 (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
9290 * lex.c (do_identifier): If we got error_mark_node, call
9293 1999-03-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
9295 * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
9298 1999-03-24 Jason Merrill <jason@yorick.cygnus.com>
9300 * decl.c (lookup_name_real): Do nested field lookup regardless of
9303 1999-03-24 Mark Mitchell <mark@codesourcery.com>
9305 * cp-tree.h (lang_type): Remove has_assignment and
9306 has_real_assignment. Add befriending_classes.
9307 (TYPE_HAS_ASSIGNMENT): Remove.
9308 (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
9309 (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
9310 (lang_decl): Document.
9311 (DECL_BEFRIENDING_CLASSES): New macro.
9312 (FRIEND_NAME): Move declaration to more obvious location.
9313 (FRIEND_DECLS): Likewise.
9314 * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
9315 * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
9316 (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
9317 (grok_op_properties): Likewise.
9318 * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
9319 (add_friend): Likewise. Don't do weird things with assignment
9320 operators. Update DECL_BEFRIENDING_CLASSES.
9321 (add_friends): Don't do weird things with assignment operators.
9322 (make_friend_class): Likewise. Update
9323 CLASSTYPE_BEFRIENDING_CLASSES.
9324 * pt.c (instantiate_class_template): Don't set
9325 TYPE_HAS_ASSIGNMENT.
9326 (tsubst_copy): Substitute the TREE_TYPE for more unary
9328 * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
9329 * search.c (protected_accessible_p): New function.
9330 (friend_accessible_p): Likewise.
9331 (accessible_p): Use them.
9333 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9335 * pt.c (convert_nontype_argument): Don't create things that aren't
9336 PTRMEM_CSTs when applying a qualification conversion to a
9339 1999-03-23 Mark Mitchell <mark@codesourcery.com>
9341 * Makefile.in (OBJS): Don't mention hash.o.
9342 (OBJDEPS): Likewise.
9344 1999-03-23 Jason Merrill <jason@yorick.cygnus.com>
9346 * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
9347 * decl.c (expand_static_init): Make sure we don't add any after
9350 * decl.c (cp_finish_decl): Move intelligence about handling
9351 DECL_COMDAT for variables from here...
9352 * decl2.c (comdat_linkage): ...to here.
9353 (maybe_make_one_only): Tweak.
9354 (import_export_decl): Call comdat_linkage for variables, too.
9355 (finish_file): Handle template statics properly.
9357 1999-03-22 Mark Mitchell <mark@codesourcery.com>
9359 * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
9360 Document internals of pointer-to-member-functions.
9361 (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
9362 (PFN_FROM_PTRMEMFUNC): Likewise.
9363 (build_type_conversion): Remove unused parameter.
9364 (build_ptrmemfunc1): Declare.
9365 (expand_ptrmemfunc_cst): New function.
9366 (delta2_from_ptrmemfunc): Likewise.
9367 (pfn_from_ptrmemfunc): Likewise.
9368 * cvt.c (cp_convert_to_pointer): Remove unused parameter to
9369 build_type_conversion. Use TYPE_PTRMEM_P for readability.
9370 (convert_to_reference): Remove unused parameter to
9371 build_type_conversion.
9372 (ocp_convert): Likewise.
9373 (build_user_type_conversion): Likewise.
9374 * error.c (dump_expr): Handle NULL pointer-to-member functions.
9375 * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
9376 * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
9377 open when handling pointer-to-member functions.
9378 * pt.c (convert_nontype_argument): Clean up error messages. Be
9379 more stringent with pointers-to-members.
9380 * typeck.c (build_ptrmemfunc1): Don't declare. Make it global.
9381 (build_unary_op): Tidy ever-so-slightly.
9382 (build_conditional_expr): Remove extra parameter to
9383 build_type_conversion.
9384 (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
9386 (expand_ptrmemfunc_cst): Define.
9387 (delta2_from_ptrmemfunc): Likewise.
9388 (pfn_from_ptrmemfunc): Likewise.
9390 1999-03-19 Mark Mitchell <mark@codesourcery.com>
9392 * init.c (build_member_call): Handle template-id expressions
9394 * typeck.c (build_x_function_call): Likewise.
9396 1999-03-19 Chip Salzenberg <chip@perlsupport.com>
9398 * friend.c (make_friend_class): Avoid core dump when
9399 not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
9401 1999-03-18 Jason Merrill <jason@yorick.cygnus.com>
9403 * decl.c (start_function): Suppress normal linkage heuristics
9404 for #pragma interface under MULTIPLE_SYMBOL_SPACES.
9406 1999-03-19 Alexandre Oliva <oliva@dcc.unicamp.br>
9408 * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
9409 ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
9411 1999-03-17 Martin von Löwis <loewis@informatik.hu-berlin.de>
9413 * parse.y (named_complex_class_head_sans_basetype):
9414 Do not push a scope for error_mark_node.
9415 (maybe_base_class_list): Likewise.
9417 * decl.c (start_decl): Check for error_mark_node as a type.
9418 Detected by g++.brendan/array-refs.C.
9419 (start_decl_1): Likewise. Detected by g++.bugs/900322_01.C.
9420 (maybe_build_cleanup_1): Likewise. Detected by
9421 g++.jason/incomplete1.C.
9423 * tree.c (build_dummy_object): Use void_zero_node instead of the
9425 (is_dummy_object): Check for such a node.
9426 Detected by g++.bob/inherit1.C
9428 1999-03-16 Jason Merrill <jason@yorick.cygnus.com>
9430 * method.c (old_backref_index): Split out...
9431 (flush_repeats): From here. Rename back from try_old_backref.
9432 (build_mangled_name): Put back some old-style repeat handling.
9434 Mon Mar 15 21:57:16 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9436 * lex.c: Don't include setjmp.h.
9437 (parse_float): New static function.
9438 (pf_args): New struct.
9439 (real_yylex): Use them in call to `do_float_handler'.
9441 1999-03-15 Mark Mitchell <mark@markmitchell.com>
9443 * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
9444 * tree.c (layout_basetypes): Not here.
9445 * search.c (dfs_search): Remove; no longer used.
9447 1999-03-12 Mark Mitchell <mark@markmitchell.com>
9449 * decl2.c (validate_nonmember_using_decl): Issue sensible
9450 error-messages on bogus qualifiers.
9452 1999-03-14 Jason Merrill <jason@yorick.cygnus.com>
9454 * call.c (add_function_candidate): Fix uninitialized variable.
9456 * Makefile.in (search.o): Add dependency on varray.h.
9458 1999-03-13 Jason Merrill <jason@yorick.cygnus.com>
9460 * decl.c (duplicate_decls): Use same_type_p.
9461 * method.c (try_old_backref): Renamed from flush_repeats. Use
9462 same_type_p. Don't try to handle repeats. Return success.
9463 (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA. Support
9464 calls from old-style code, too.
9465 (check_ktype): Use same_type_p.
9466 (check_btype): Use same_type_p. Don't pull out TYPE_MAIN_VARIANT.
9467 (build_qualified_name): Simplify logic.
9468 (process_overload_item): Strip typedefs and quals at the top.
9469 (build_mangled_name_for_type_with_Gcode): Remove call to
9470 type_canonical_variant.
9471 (build_mangled_name): Likewise. Remove support for old-style
9472 repeats, which have been disabled since 2.7.2. Don't mess with
9474 (build_decl_overload_real): Don't mess with TREE_USED.
9476 1999-03-13 Nathan Sidwell <nathan@acm.org>
9478 * error.c (cp_printers): Add 'F' escape character.
9479 (dump_type_real): Remove TREE_LIST (fnargs) printing.
9480 Functionality moved to dump_parameters.
9481 (dump_type_suffix): Use dump_parameters and dump_exception_spec.
9482 (dump_function_decl): Extend meaning of V parameter. Use
9483 dump_parameters and dump_exception_spec.
9484 (dump_parameters): New static function.
9485 (dump_exception_spec): New static function.
9486 (fndecl_as_string): Change argument semantics. Use
9487 dump_function_decl directly.
9489 * sig.c (build_signature_table_constructor): Use cp_error.
9491 1999-03-13 Martin von Löwis <loewis@informatik.hu-berlin.de>
9493 * semantics.c (finish_switch_cond): Handle error cases gracefully.
9494 Detected by g++.law/enum5.C.
9496 * typeck.c (build_modify_expr): Check for errors after resolving
9497 offsets. Detected by g++.brendan/static1.C.
9499 * decl.c (complete_array_type): Ignore initial_value if it is an
9500 error. Detected by g++.benjamin/17930.C.
9502 * typeck2.c (process_init_constructor): Return error if one argument
9503 is in error. Detected by g++.benjamin/13478.C.
9505 1999-03-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
9507 * decl.c (select_decl): Allow class templates when we need types.
9508 * decl2.c (ambiguous_decl): Likewise.
9510 1999-03-12 Mark Mitchell <mark@markmitchell.com>
9512 * lex.c (do_identifier): Correct call to enforce_access.
9513 * search.c (accessible_p): Tweak comment.
9515 1999-03-10 Mark Mitchell <mark@markmitchell.com>
9517 * semantics.c (begin_class_definition): Call build_self_reference.
9518 (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
9520 * search.c (assert_canonical_unmarked): Fix typo in prototype.
9522 * search.c (dfs_canonical_queue): New function.
9523 (dfs_assert_unmarked_p): Likewise.
9524 (assert_canonical_unmarked): Likewise.
9525 (access_in_type): Use it.
9526 (accessible_p): Likewise. Walk the whole tree when umarking.
9528 * sig.c (build_signature_table_constructor): Use accessible_p
9529 instead of compute_access.
9531 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
9533 * call.c (add_builtin_candidates): Handle overloaded conversion ops.
9535 1999-03-09 Mark Mitchell <mark@markmitchell.com>
9537 * cp-tree.h (flag_access_control): Declare.
9538 (TREE_VIA_PPUBLIC): Document.
9539 (DECL_NONSTATIC_MEMBER_P): New macro.
9540 (enforce_access): Return an indication of whether or not access
9542 (build_self_reference): Change prototype.
9543 (compute_access): Replace with ...
9544 (accessible_p): New function.
9545 (dfs_walk): Change prototype.
9546 (dfs_unmark): Likewise.
9547 (markedp): Likewise.
9548 * call.c (enforce_access): Use accessible_p.
9549 * class.c (build_self_reference): Insert the declaration into the
9550 list of members for this type, and make it public.
9551 * decl.c (xref_basetypes): Avoid ill-timed recursion.
9552 * init.c (build_offset_ref): Use lookup_member, not three separate
9553 name-lookups. Call enforce_access rather than checking for
9554 illegal accesses here.
9555 (resolve_offset_ref): Likewise.
9556 * lex.c (do_identifier): Likewise.
9557 * method.c (hack_identifier): Likewise.
9558 * parse.y (self_reference): Remove.
9559 (opt_component_decl_list): Don't use it.
9560 * parse.c: Regenerated.
9561 * pt.c (print_candidates): Generalize to handle lists of
9562 overloaded functions.
9563 (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
9565 (get_template_base): Use new calling convention for dfs_walk.
9566 * search.c: Include varray.h. Add prototypes.
9567 (dfs_walk): Accept a data pointer to pass to the work functions.
9568 All callers changed. All work functions changed.
9569 (breadth_first_search): Rename to bfs_walk, and make consistent
9571 (dfs_walk_real): New function.
9572 (canonical_binfo): New function.
9573 (context_for_name_lookup): Likewise.
9574 (shared_marked_p): Likewise.
9575 (shared_unmarked_p): Likewise.
9576 (lokup_field_queue_p): Likewise.
9577 (lookup_field_r): Generalize to handle both functions and fields.
9578 (lookup_field): Just call lookup_member.
9579 (lookup_fnfields): Likewise.
9580 (lookup_member): Move body of lookup_field here and generalize.
9581 (dfs_accessible_queue_p): Likewise.
9582 (dfs_accessible_p): Likewise.
9583 (dfs_access_in_type): Likewise.
9584 (access_in_type): Likewise.
9585 (compute_access): Remove, and replace with ...
9586 (accessible_p): New function.
9587 (vbase_types): Remove.
9588 (vbase_decl_ptr_intermediate): Likewise.
9589 (vbase_decl_ptr): Likewise.
9590 (vbase_init_result): Likewise.
9591 (closed_envelopes): Likewise.
9592 (bvtable): Likewise.
9594 1999-03-09 Jason Merrill <jason@yorick.cygnus.com>
9596 * call.c (add_function_candidate): Check for proper number of args
9597 before checking the validity of those args.
9599 1999-03-06 Jason Merrill <jason@yorick.cygnus.com>
9601 * cp-tree.h (struct lang_type): Add anon_union field.
9602 (ANON_UNION_TYPE_P): Use it instead of examining type.
9603 (SET_ANON_UNION_TYPE_P): New macro.
9604 * decl.c (check_tag_decl): Use it.
9606 * search.c (compute_access): Handle non-type contexts earlier, and
9609 * tree.c (build_exception_variant): Use copy_to_permanent.
9611 * decl2.c (setup_initp): Give statics with no priority the default
9613 (do_dtors, do_ctors, finish_file): Remove special handling of
9614 non-prioritized statics.
9616 1999-03-05 Mark Mitchell <mark@markmitchell.com>
9618 * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
9619 * decl.c (make_typename_type): Don't issue an error if an
9620 immediate lookup fails; it migt be resolved later.
9621 * friend.c (is_friend): Add comment.
9622 * search.c (breadth_first_search): Add POSTFN and DATA
9623 parameters. Tidy. All callers changed.
9624 (lookup_field_queue_p): New function.
9625 (lookup_field_r): Likewise.
9626 (lookup_field_post): Likewise.
9627 (lookup_field): Use them, via breadth_first_search, instead of
9629 (compute_access): Robustify.
9630 (lookup_fnfield_info): New structure.
9632 1999-03-05 Jason Merrill <jason@yorick.cygnus.com>
9634 * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
9636 1999-03-03 Jason Merrill <jason@yorick.cygnus.com>
9638 * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
9641 * decl2.c (import_export_class): Also return if
9642 CLASSTYPE_INTERFACE_ONLY is set.
9644 1999-03-03 Martin von Löwis <loewis@informatik.hu-berlin.de>
9646 * decl.c (push_overloaded_decl): Only overwrite the old binding if
9648 * decl2.c (do_local_using_decl): Fix loop termination.
9650 1999-03-02 Mark Mitchell <mark@markmitchell.com>
9652 * cp-tree.h (determine_specialization): Don't declare.
9653 * pt.c (determine_specialization): Make it static. Eliminate
9654 complain parameter. Note that decl is always non-NULL now, and
9655 simplify accordingly.
9657 * decl.c (maybe_push_to_top_level): Always call
9658 push_cp_function_context.
9659 (pop_from_top_level): Always call pop_cp_function_context.
9661 1999-02-26 Nathan Sidwell <nathan@acm.org>
9663 * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
9665 * cp-tree.h (complete_type_or_else): Added VALUE parameter.
9666 * init.c (build_new_1): Extra arg to complete_type_or_else.
9667 (build_delete): Likewise.
9668 * typeck.c (require_complete_type): Likewise.
9669 (pointer_int_sum): Likewise.
9670 (pointer_diff): Likewise.
9671 (build_component_ref): Likewise.
9673 * typeck2.c (incomplete_type_error): Always use cp_error.
9674 Show declaration of undefined type, if appropriate.
9675 Deal with UNKNOWN_TYPE nodes.
9677 * typeck.c (require_complete_type): Use TYPE_SIZE as
9678 size_zero_node to mean incomplete type.
9679 (require_complete_type_in_void): New function.
9680 (build_compound_expr): Call complete_type_in_void for LHS.
9681 (build_c_cast): Call complete_type_in_void for void cast.
9682 * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
9683 * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
9684 require_complete_type_in_void. Call it.
9685 * cp-tree.h (require_complete_type_in_void): Prototype new function.
9687 * typeck.c (convert_arguments): Use alternative format for
9688 function decls. Don't require_complete_type here. Simplify
9689 diagnostic printing.
9690 (convert_for_initialization): Don't require_complete_type on RHS yet.
9691 * call.c (convert_arg_to_ellipsis): Call require_complete_type.
9693 * call.c (build_over_call): Cope with qualified void return type.
9694 * semantics.c (finish_call_expr): Likewise.
9695 * typeck.c (build_function_call_real): Likewise.
9696 (c_expand_return): Likewise.
9697 * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
9699 * call.c (print_z_candidates): Use alternate print format, to be
9700 consistent with (pt.c) print_candidates.
9701 * method.c (hack_identifier): List candidate members.
9702 * search.c (lookup_field): Build ambiguous list, and show it, if
9705 1999-02-26 Mark Mitchell <mark@markmitchell.com>
9707 * typeck.c (decay_conversion): Don't confuse constant array
9708 variables with their initializers.
9710 * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
9712 * pt.c (regenerate_decl_from_template): Tweak for clarity.
9713 (instantiate_decl): Mark a decl instantiated before regenerating
9714 it to avoid recursion.
9715 * tree.c (mapcar): Don't call decl_constant_value unless we know
9716 something is TREE_READONLY_DECL_P.
9718 * class.c (check_for_override): Don't stop checking when we find
9719 the first overridden function. Delete #if 0'd code.
9720 * search.c (get_matching_virtual): Likewise.
9722 1999-02-25 Richard Henderson <rth@cygnus.com>
9724 * lang-specs.h: Define __FAST_MATH__ when appropriate.
9726 1999-02-24 Mike Stump <mrs@wrs.com>
9728 * typeck.c (convert_for_assignment): Allow boolean integral constant
9729 expressions to convert to null pointer.
9731 1999-02-24 Martin von Loewis <loewis@informatik.hu-berlin.de>
9733 * decl.c (lookup_namespace_name): Resolve namespace aliases.
9735 * class.c (push_nested_class): Allow namespaces.
9737 * decl2.c (set_decl_namespace): Add friendp parameter.
9738 * decl.c (grokfndecl): Pass it.
9739 (grokvardecl): Likewise.
9740 * cp-tree.h: Change declaration.
9742 1999-02-24 Jason Merrill <jason@yorick.cygnus.com>
9744 * pt.c (tsubst): Allow an array of explicit size zero.
9746 1999-02-23 Jason Merrill <jason@yorick.cygnus.com>
9748 * errfn.c: Change varargs code to look like toplev.c.
9750 * method.c (process_modifiers): Don't prepend 'U' for char or
9753 1999-02-20 Craig Burley <craig@jcb-sc.com>
9755 * Make-lang.in (cplib2.ready): Don't consider updating
9756 cplib2 stuff if the current directory isn't writable, as
9757 it won't work (such as during a `make install').
9759 Sun Feb 21 20:38:00 1999 H.J. Lu (hjl@gnu.org)
9761 * decl2.c (start_objects): Make file scope constructors and
9762 destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
9763 ASM_OUTPUT_DESTRUCTOR are defined.
9765 1999-02-19 Mark Mitchell <mark@markmitchell.com>
9767 * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
9768 (fn_type_unification): Adjust prototype.
9769 (lookup_fnfields_1): Declare.
9770 * call.c (add_template_candidate_real): Adjust call to
9771 fn_type_unification.
9772 * class.c (add_method): Don't allow duplicate declarations of
9773 constructors or destructors.
9774 (resolve_address_of_overloaded_function): Remove unused variable.
9775 Adjust call to fn_type_unification.
9776 * decl.c (grokfndecl): Be more robust in the face of illegal
9778 * decl2.c (check_classfn): Remove hokey handling of member
9780 * pt.c (determine_specialization): Improve comments. Adjust to
9781 handle template argument deduction as per the standard.
9782 (check_explicit_specialization): Fix comment spacing. Handle
9783 type-conversion operators correctly. Improve error-recovery.
9784 (fn_type_unification): Remove EXTRA_FN_ARG parameter.
9785 (get_bindings_real): Simplify handling of static members.
9786 * search.c (lookup_fnfields_1): Make it have external linkage.
9787 * typeck.c (compparms): Fix comment.
9788 (build_unary_op): Don't try to figure out which template
9789 specialization is being referred to when when the address-of
9790 operator is used with a template function.
9792 Thu Feb 18 23:40:01 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9794 * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
9795 keyword to match an analogous change at the top level.
9797 * tree.c (lvalue_or_else): Likewise.
9799 1999-02-17 Mark Mitchell <mark@markmitchell.com>
9801 * decl.c (xref_basetypes): Comment.
9802 * pt.c (instantiate_class_template): Use xref_basetypes.
9804 1999-02-16 Mark Mitchell <mark@markmitchell.com>
9806 * cp-tree.h (tsubst): Change prototype.
9807 (tsubst_expr): Likewise.
9808 (tsubst_copy): Likewise.
9809 (type_unification): Remove prototype.
9810 * call.c (convert_default_arg): Adjust call to tsubst_expr.
9811 * class.c (resolve_address_of_overloaded_function): Just use
9812 fn_type_unification.
9813 * decl.c (grokdeclarator): Adjust call to tsubst.
9814 * method.c (build_template_parm_names): Likewise.
9815 * pt.c (GTB_VIA_VIRTUAL): New macro.
9816 (GTB_IGNORE_TYPE): Likewise.
9817 (resolve_overloaded_unification): Add `complain' parameter.
9818 (try_one_overload): Likewise.
9819 (tsubst_template_arg_vector): Likewise.
9820 (tsubst_template_parms): Likewise.
9821 (tsubst_aggr_type): Likewise.
9822 (tsubst_arg_types): Likewise.
9823 (tsubst_call_declarator_parms): Likewise.
9824 (unify): Remove explicit_mask.
9825 (type_unification_real): Likewise.
9826 (get_template_base_recursive): Likewise.
9827 (coerce_template_template_parms): Provide prototype.
9828 (tsubst_function_type): Likewise.
9829 (try_class_unification): New function.
9830 All callers changed to use new complain parameter.
9831 (get_template_base): Use try_class_unification.
9832 (unify): Adjust handling of classes derived from template types.
9833 (fn_type_unification): Substitute explicit arguments before
9836 1999-02-16 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9838 * decl.c (pushdecl): Remove dead code.
9840 1999-02-16 Jason Merrill <jason@yorick.cygnus.com>
9842 * decl2.c (finish_objects): Fix code I missed in previous change.
9844 1999-02-13 Jason Merrill <jason@yorick.cygnus.com>
9846 * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
9847 (grokdeclarator): Don't expect error_mark_node from grokfndecl.
9849 * pt.c (maybe_process_partial_specialization): Complain about
9850 'template <>' on non-specialization.
9852 1999-02-10 Jason Merrill <jason@yorick.cygnus.com>
9854 * decl.c (grokdeclarator): Catch wierd declarators.
9855 * decl2.c (finish_file): Don't abort because of namespace parsing
9857 (check_decl_namespace): Remove.
9859 1999-02-09 Mark Mitchell <mark@markmitchell.com>
9861 * cp-tree.h (get_template_base): Don't declare.
9862 (dfs_walk): Declare.
9863 (dfs_unmark): Likewise.
9864 (markedp): Likewise.
9865 * pt.c (unify): Remove duplicate declaration. Pass tparms and
9866 targs to get_template_base.
9867 (get_template_base_recursive): Move here from search.c. Check to
9868 see that the base found can be instantiated to form the desired
9870 (get_template_base): Likewise.
9871 (get_class_bindings): Simplify.
9872 * search.c (get_template_base_recursive): Move to pt.c.
9873 (get_template_base): Likewise.
9874 (markedp): Make it global.
9875 (dfs_walk): Likewise.
9876 (dfs_unmark): Likewise.
9878 1999-02-07 Jason Merrill <jason@yorick.cygnus.com>
9880 * pt.c (maybe_process_partial_specialization): Complain about
9881 specialization in wrong namespace.
9882 * tree.c (decl_namespace_context): New fn.
9884 1999-02-06 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9886 * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
9887 * pt.c (coerce_template_template_parms): Handle nested
9888 template template parameters.
9890 Sat Feb 6 18:08:40 1999 Jeffrey A Law (law@cygnus.com)
9892 * typeck2.c: Update email addresses.
9894 1999-02-04 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
9896 * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
9899 1999-02-04 Jason Merrill <jason@yorick.cygnus.com>
9901 * lex.c (retrofit_lang_decl): Split out...
9902 (build_lang_decl): From here.
9903 * decl.c (pushdecl): Call it for functions generated by the middle
9904 end that don't have DECL_LANG_SPECIFIC.
9905 * cp-tree.h: Declare it.
9907 * decl2.c: Remove flag_init_priority. Always enable initp stuff.
9908 (start_objects, finish_objects): Only use special
9909 init_priority code if the user specified a priority.
9910 (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
9913 Wed Feb 3 22:50:17 1999 Marc Espie <Marc.Espie@liafa.jussieu.fr>
9915 * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
9916 mkstemp.o. Get them from libiberty now.
9917 (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
9919 Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9921 * decl2.c (lang_decode_option): Use read_integral_parameter.
9923 1999-02-01 Mark Mitchell <mark@markmitchell.com>
9925 * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
9926 before calling complete_type_or_else.
9928 Mon Feb 1 09:49:52 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9930 * input.c (inline): Don't define, its handled by system.h.
9932 Sun Jan 31 20:34:29 1999 Zack Weinberg <zack@rabi.columbia.edu>
9934 * decl2.c: Don't define flag_no_ident here. Don't process
9936 * cp-tree.h: Don't declare flag_no_ident here.
9937 * lang-specs.h: Map -Qn to -fno-ident.
9939 1999-01-28 Jason Merrill <jason@yorick.cygnus.com>
9941 * cp-tree.h (struct tree_binding): Replace scope field with a union.
9942 (BINDING_SCOPE): Adjust.
9943 * decl.c (BINDING_LEVEL): Adjust.
9945 1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
9947 * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
9950 * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
9953 * tree.c (equal_functions): Fix name in prototype.
9955 * decl.c (push_local_binding): Add FLAGS argument.
9956 (pushdecl, push_overloaded_decl): Pass it.
9957 * decl2.c (do_local_using_decl): Likewise.
9958 * cp-tree.h: Adjust prototype.
9959 * decl.c (poplevel): Fix logic.
9961 * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
9962 (poplevel): Handle that. Fix logic for removing TREE_LISTs.
9963 (cat_namespace_levels): Don't loop forever.
9965 1999-01-25 Richard Henderson <rth@cygnus.com>
9967 * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
9969 1999-01-25 Jason Merrill <jason@yorick.cygnus.com>
9971 * class.c (resolve_address_of_overloaded_function): Mark the
9972 chosen function used.
9974 * call.c (build_call): Make sure that a function coming in has
9975 been marked used already.
9976 * decl.c (expand_static_init): Call mark_used instead of
9978 * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
9979 alloc_eh_object, expand_throw): Likewise.
9980 * init.c (build_builtin_delete_call): Likewise.
9981 * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
9982 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9983 expand_generic_desc): Likewise.
9985 1999-01-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
9987 * tree.c (equal_functions): New function.
9988 (ovl_member): Call it.
9990 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
9992 * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
9994 1999-01-25 Martin von Loewis <loewis@informatik.hu-berlin.de>
9996 * decl.c (decls_match): Return 1 if old and new are identical.
9997 (push_overloaded_decl): Set OVL_USED when PUSH_USING.
9999 1999-01-24 Jason Merrill <jason@yorick.cygnus.com>
10001 * decl.c (start_function): Make member functions one_only on windows.
10002 * decl2.c (import_export_decl): Likewise.
10004 * decl.c (grokdeclarator): Don't complain about implicit int in
10005 a system header. Change same-name field check to not complain in
10006 a system header instead of within extern "C".
10008 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10010 * cp-tree.h (PUSH_GLOBAL): New macro.
10011 (PUSH_LOCAL): Likewise.
10012 (PUSH_USING): Likewise.
10013 (namespace_bindings_p): Declare.
10014 (push_overloaded_decl): Likewise.
10015 * decl.c (push_overloaded_decl): Don't make it static. Check for
10016 illegal declarations after using declarations here.
10017 (namespace_bindings_p): Likewise.
10018 (duplicate_decls): Don't consider declarations from different
10019 namespaces to be the same.
10020 (pushdecl): Use symbolic PUSH_ constants in calls to
10021 push_overloaded_decl.
10022 (push_overloaded_decl_1): Likewise.
10023 * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
10024 (do_nonmember_using_decl): Check for illegal using declarations
10025 after ordinary declarations here.
10026 (do_local_using_decl): Call pushdecl to insert declarations.
10028 1999-01-21 Jason Merrill <jason@yorick.cygnus.com>
10030 * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
10032 1999-01-21 Mark Mitchell <mark@markmitchell.com>
10034 * tree.c (build_cplus_array_type_1): Don't call build_array_type
10035 for types involving template parameters.
10037 * cp-tree.h (PARM_DECL_EXPR): Delete.
10038 (convert_default_arg): Change prototype.
10039 (check_default_argument): Declare.
10040 (search_tree): Likewise.
10041 * call.c (convert_default_arg): Take the function to which the
10042 default argument belongs as a parameter, and do any necessary
10043 instantiation here, instead of ...
10044 (build_over_call): Here.
10045 * decl.c (local_variable_p): New function.
10046 (check_default_argument): Likewise, split out and tidied from ...
10048 * error.c (dump_expr): Don't set PARM_DECL_EXPR.
10049 * pt.c (tsubst_call_declarator_parms): New function.
10050 (for_each_template_parm): Handle ARRAY_REFs. Do the obvious thing
10051 with CALL_EXPRs, rather than trying to be clever.
10052 (tsubst): Use tsubst_call_declarator_parms.
10053 * tree.c (search_tree): Don't make it static.
10054 * typeck.c (convert_arguments): Use new interface to
10055 convert_default_arg.
10057 1999-01-20 Mark Mitchell <mark@markmitchell.com>
10059 * error.c (dump_function_decl): Don't print the argument types for
10060 a function when the verbosity level is negative.
10062 * call.c (build_over_call): Check format attributes at call-time.
10064 * pt.c (tsubst_copy): Fix comment.
10065 (unify): Don't allow unification with variable-sized arrays.
10067 * semantics.c (finish_stmt_expr): When processing a template make
10068 the BIND_EXPR long-lived.
10070 1999-01-19 Jason Merrill <jason@yorick.cygnus.com>
10072 * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
10073 (import_export_vtable): Not here.
10075 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10077 * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
10078 non-static member function.
10080 1999-01-18 Nathan Sidwell <nathan@acm.org>
10082 * class.c (instantiate_type): Only diagnose illegal address of member
10083 function if complaining.
10085 * decl.c (lookup_name_real): Remove duplicate code.
10087 1999-01-18 Jason Merrill <jason@yorick.cygnus.com>
10089 * tree.c (copy_template_template_parm): Use permanent_obstack.
10091 1999-01-18 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
10093 * pt.c (unify): Remove restrictions on deduction of argument
10094 of template template parameters.
10096 1999-01-18 Nathan Sidwell <nathan@acm.org>
10098 * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
10100 * class.c (resolve_address_of_overloaded_function): Show list of
10101 all candidates, when none of them match.
10103 1999-01-18 Chip Salzenberg <chip@perlsupport.com>
10105 * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
10106 definition of 'casting away const' in reinterpret_cast<>.
10108 1999-01-18 Graham <grahams@rcp.co.uk>
10110 * cvt.c: Add include for decl.h, remove extern for
10111 static_aggregates which is now provided by decl.h.
10113 * Makefile.in (cvt.o): Add dependency for decl.h and missing
10114 dependencies for convert.h and flags.h.
10116 1999-01-18 Nathan Sidwell <nathan@acm.org>
10118 * decl2.c (do_dtors): Set current location to that of the
10119 decl, for sensible diagnostics and debugging.
10120 (check_classfn): Issue `incomplete type' error, if
10121 class is not defined.
10123 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10125 * cp-tree.h: Add prototype for bound_pmf_p.
10127 1999-01-16 Jason Merrill <jason@yorick.cygnus.com>
10128 Manfred Hollstein <manfred@s-direktnet.de>
10130 * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
10133 1999-01-16 Nathan Sidwell <nathan@acm.org>
10135 * cp-tree.h (struct lang_type): Added has_mutable flag.
10136 (CLASSTYPE_HAS_MUTABLE): New macro to access it.
10137 (TYPE_HAS_MUTABLE_P): New macro to read it.
10138 (cp_has_mutable_p): Prototype for new function.
10139 * class.c (finish_struct_1): Set has_mutable from members.
10140 * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
10141 it contains a mutable.
10142 * typeck.c (cp_has_mutable_p): New function.
10144 1999-01-15 Mark Mitchell <mark@markmitchell.com>
10146 * pt.c (process_template_parm): Ignore top-level qualifiers on
10147 non-type parameters.
10149 * decl.c (start_function): Use current_function_parms in the call
10150 to require_complete_type_for_parms, not the probably empty
10153 1999-01-14 Jason Merrill <jason@yorick.cygnus.com>
10155 * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
10157 * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
10158 that we don't suppress the other copies.
10159 * lex.c (handle_cp_pragma): Likewise.
10161 1999-01-13 Mark Mitchell <mark@markmitchell.com>
10163 * decl.c (grokdeclarator): Undo 1998-12-14 change.
10164 * tree.c (build_cplus_array_type_1): Likewise.
10165 * pt.c (instantiate_class_template): Remove misleading comment.
10166 (tsubst_aggr_type): Substitute if there are template parameters,
10167 regardless of whether or not they use template arguments.
10168 (unify): Likewise, but for unification.
10170 1999-01-12 Richard Henderson <rth@cygnus.com>
10172 * cp-tree.h (flag_permissive): Declare extern.
10174 1999-01-06 Mark Mitchell <mark@markmitchell.com>
10176 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
10178 (lang_type): Add is_partial_instantiation. Decrease width of
10180 (PARTIAL_INSTANTIATION_P): New macro.
10181 (OPERATOR_TYPENAME_P): Remove.
10182 * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
10183 OPERATOR_TYPENAME_P.
10184 (grok_op_properties): Likewise.
10185 * friend.c (do_friend): Handle friends that are member functions
10187 * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
10188 * pt.c (instantiate_class_template): Rework for clarity. Avoid
10189 leaving TYPE_BEING_DEFINED set in obscure cases. Don't do
10190 any more partial instantiation than is absolutely necessary for
10191 implicit typename. Set PARTIAL_INSTANTIATION_P.
10192 (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
10193 * semantics.c (begin_class_definition): Handle partial
10194 specializations of a type that was previously partially
10197 Wed Jan 6 03:18:53 1999 Mark Elbrecht <snowball3@usa.net.
10199 * g++spec.c (LIBSTDCXX): Provide default definition.
10200 (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
10202 Tue Jan 5 22:11:25 1999 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10204 * Make-lang.in (g++.o): Depend on prefix.h.
10206 1999-01-04 Jason Merrill <jason@yorick.cygnus.com>
10208 * tree.c (bound_pmf_p): New fn.
10209 * typeck.c (build_c_cast): Use it.
10211 * decl.c (grok_op_properties): Use same_type_p.
10213 Tue Dec 22 15:09:25 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10215 * Makefile.in (cvt.o): Depend on toplev.h.
10217 * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
10219 * cvt.c: Include toplev.h.
10221 * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
10224 * init.c (expand_vec_init): Initialize variable `itype'.
10226 * lex.c (yyerror): Cast the argument passed to a ctype function to
10229 * method.c (build_mangled_C9x_name): Wrap prototype and definition
10230 in "HOST_BITS_PER_WIDE_INT >= 64".
10232 * typeck.c (build_binary_op): Mark parameter `convert_p' with
10235 1998-12-22 Mark Mitchell <mark@markmitchell.com>
10237 * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
10238 * tree.c (build_exception_variant): Don't crash on empty throw
10241 1998-12-18 DJ Delorie <dj@cygnus.com>
10243 * cvt.c (convert_to_reference): Check for both error_mark_node
10244 and NULL_NODE after call to convert_for_initialization.
10246 1998-12-17 Jason Merrill <jason@yorick.cygnus.com>
10248 * error.c (interesting_scope_p): New fn.
10249 (dump_simple_decl): Use it.
10250 (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
10251 (dump_expr, case OFFSET_REF): Print ->* if appropriate.
10253 1998-12-16 Mark Mitchell <mark@markmitchell.com>
10255 * class.c (resolve_address_of_overloaded_function): Do conversion
10256 to correct type here, rather than ...
10257 (instantiate_type): Here.
10259 * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
10260 (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
10261 (decl_template_parm_p): Remove.
10262 * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
10264 * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
10265 * pt.c (push_inline_template_parms_recursive): Set it.
10266 (decl_template_parm_p): Remove.
10267 (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
10268 (process_template_parm): Set it.
10270 Wed Dec 16 16:33:58 1998 Dave Brolley <brolley@cygnus.com>
10272 * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
10273 if configured with cpplib.
10275 1998-12-15 Mark Mitchell <mark@markmitchell.com>
10277 * decl.c (poplevel): Make sure ns_binding is initialized.
10279 * decl.c (finish_function): Undo inadvertent change in previous
10282 1998-12-14 Mark Mitchell <mark@markmitchell.com>
10284 * class.c (pushclass): Tweak handling of class-level bindings.
10285 (resolve_address_of_overloaded_function): Update pointer-to-member
10287 (instantiate_type): Likewise.
10288 * cvt.c (cp_convert_to_pointer): Likewise.
10289 * decl.c (pop_binding): Take the DECL to pop, not just the name.
10290 Deal with `struct stat' hack.
10291 (binding_level): Add to documentation.
10292 (push_binding): Clear BINDING_TYPE.
10293 (add_binding): New function.
10294 (push_local_binding): Use it.
10295 (push_class_binding): Likewise.
10296 (poplevel): Adjust calls to pop_binding.
10297 (poplevel_class): Likewise.
10298 (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
10299 declarations to current binding level.
10300 (push_class_level_binding): Likewise.
10301 (push_overloaded_decl): Adjust handling of OVERLOADs in local
10303 (lookup_namespace_name): Don't crash when confronted with a
10305 (lookup_name_real): Do `struct stat' hack in local binding
10307 (build_ptrmemfunc_type): Adjust documentation.
10308 (grokdeclarator): Don't avoid building real array types when
10309 processing templates unless really necessary.
10310 (finish_method): Adjust calls to pop_binding.
10311 * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
10312 not reparse_decl_as_expr.
10313 (build_expr_from_tree): Deal with a template-id as the function to
10314 call in a METHOD_CALL_EXPR.
10315 * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
10316 (maybe_adjust_types_For_deduction): Don't do peculiar things with
10318 (resolve_overloaded_unification): Handle COMPONENT_REFs. Build
10319 pointer-to-member types where necessary.
10320 * tree.c (build_cplus_array_type_1): Don't avoid building real
10321 array types when processing templates unless really necessary.
10322 (build_exception_variant): Compare the exception lists correctly.
10324 1998-12-13 Mark Mitchell <mark@markmitchell.com>
10326 * cp-tree.def (CPLUS_BINDING): Update documentation.
10327 * cp-tree.h (LOCAL_BINDING_P): New macro.
10328 (lang_identifier): Rename local_value to bindings.
10329 (tree_binding): Make `scope' of type `void*', not `tree'.
10330 (BINDING_SCOPE): Update documentation.
10331 (IDENTIFIER_LOCAL_VALUE): Remove.
10332 (IDENTIFIER_CLASS_VALUE): Document.
10333 (IDENTIFIER_BINDING): New macro.
10334 (IDENTIFIER_VALUE): Likewise.
10335 (TIME_IDENTIFIER_TIME): Likewise.
10336 (TIME_IDENTIFIER_FILEINFO): Likewise.
10337 (IMPLICIT_TYPENAME_P): Likewise.
10338 (set_identifier_local_value): Remove.
10339 (push_local_binding): New function.
10340 (push_class_binding): Likewise.
10341 * class.c (pushclass): Update comments; use push_class_binding.
10342 * decl.c (set_identifier_local_value_with_scope): Remove.
10343 (set_identifier_local_value): Likewise.
10344 (push_binding): New function.
10345 (pop_binding): Likewise.
10346 (binding_level): Update documentation. Remove shadowed.
10347 (BINDING_LEVEL): New macro.
10348 (free_binding_nodes): New variable.
10349 (poplevel): Adjust for new name-lookup scheme. Don't mess up
10350 BLOCK_VARs when doing for-scope extension. Remove effectively
10352 (pushlevel_class): Tweak formatting.
10353 (poplevel_class): Adjust for new name-lookup scheme.
10354 (print_binding_level): Likewise.
10355 (store_bindings): Likewise.
10356 (pushdecl): Likewise.
10357 (pushdecl_class_level): Likewise.
10358 (push_class_level_binding): Likewise.
10359 (push_overloaded_decl): Update comments. Adjust for new
10360 name-lookup scheme.
10361 (lookup_name_real): Likewise.
10362 (lookup_name_current_level): Likewise.
10363 (cp_finish_decl): Likewise.
10364 (require_complete_types_for_parms): Likewise. Remove misleading
10366 (grok_parms): Likewise. Don't call
10367 require_complete_types_for_parms here.
10368 (grok_ctor_properties): Don't treat templates as copy
10370 (grop_op_properties): Or as assignment operators.
10371 (start_function): Document. Adjust for new name-lookup scheme.
10372 (finish_function): Likewise.
10373 * decl2.c (do_local_using_decl): Use push_local_binding.
10374 * lex.c (begin_definition_of_inclass_inline): New function, split
10376 (do_pending_inlines): Here, and ...
10377 (process_next_inline): Here.
10378 (get_time_identifier): Use TIME_IDENTIFIER_* macros.
10379 (init_filename_times): Likewise.
10380 (extract_interface_info): Likewise.
10381 (ste_typedecl_interface_info): Likewise.
10382 (check_newline): Likewise.
10383 (dump_time_statistics): Likewise.
10384 (handle_cp_pragma): Likewise.
10385 (do_identifier): Adjust for new name-lookup scheme.
10386 * parse.y (function_try_block): Return ctor_initializer_opt value.
10388 (fn.defpen): Pass appropriate values to start_function.
10389 (pending_inline): Use functor_try_block value, and pass
10390 appropriate values to finish_function.
10391 * pt.c (is_member_template): Update documentation; remove handling
10392 of FUNCTION_DECLs. As per name, this function should deal only in
10394 (decl_template_parm_p): Change name of olddecl parameter to decl.
10395 (check_template_shadow): Adjust for new name-lookup scheme.
10396 (lookup_template_class): Likewise.
10397 (tsubst_decl): Tweak so as not to confuse member templates with
10398 copy constructors and assignment operators.
10399 (unify): Handle UNION_TYPEs.
10400 * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
10401 (lang_print_xnode): Adjust for new name-lookup scheme.
10402 * typeck.c (mark_addressable): Likewise.
10403 (c_expand_return): Likewise.
10405 1998-12-08 Jason Merrill <jason@yorick.cygnus.com>
10407 * decl.c (grokdeclarator): Allow field with same name as class
10410 * decl.c (lookup_name_real): Don't limit field lookup to types.
10411 * class.c (check_member_decl_is_same_in_complete_scope): No error
10412 if icv and x are the same.
10413 * lex.c (do_identifier): Tweak error message.
10415 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10417 * decl.c (start_enum): Use push_obstacks, not
10418 end_temporary_allocation.
10419 (finish_enum): Call pop_obstacks.
10421 1998-12-10 Mark Mitchell <mark@markmitchell.com>
10423 * class.c (instantiate_type): Return error_mark_node rather than
10426 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10428 * cp-tree.h (most_specialized_instantiation): New function.
10429 (print_candidates): Likewise.
10430 * class.c (validate_lhs): Remove.
10431 (resolve_address_of_overloaded_function): New function, split out
10432 and then substantially reworked, from ...
10433 (instantiate_type): Use it. Simplify.
10434 * cvt.c (convert_to_reference): Complain when caller has indicated
10435 that's the right thing to do. Don't crash if instantiate_type
10437 * pt.c: Substitute `parameters' for `paramters' throughout.
10438 (print_candidates): Don't make it static.
10439 (most_specialized_instantiation): Split out from ...
10440 (most_specialized): Here.
10442 Wed Dec 9 15:33:01 1998 Dave Brolley <brolley@cygnus.com>
10444 * lex.c (lang_init_options): Initialize cpplib.
10445 * decl2.c (parse_options,cpp_initialized): Removed.
10446 (lang_decode_option): Move initialization of cpplib to
10449 1998-12-09 Mark Mitchell <mark@markmitchell.com>
10451 * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
10452 well as the TYPE_DECL, when a typedef name is assigned to a
10453 previously anonymous type.
10455 1998-12-08 Andrew MacLeod <amacleod@cygnus.com>
10457 * cp/except.c (call_eh_info): Use __start_cp_handler instead of
10458 __cp_eh_info for getting the eh info pointer. Add table_index to
10460 (push_eh_cleanup): Don't increment 'handlers' data field.
10461 (process_start_catch_block): Don't set the 'caught' field.
10463 * cp/exception.cc (CP_EH_INFO): New macro for getting the
10464 exception info pointer within library routines.
10465 (__cp_eh_info): Use CP_EH_INFO.
10466 (__start_cp_handler): Get exception info pointer, set caught field,
10467 and increment the handlers field. Avoids this being done by handlers.
10468 (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
10469 (uncaught_exception): Use CP_EH_INFO macro.
10471 Tue Dec 8 10:48:21 1998 Jeffrey A Law (law@cygnus.com)
10473 * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
10475 Mon Dec 7 17:56:06 1998 Mike Stump <mrs@wrs.com>
10477 * lex.c (check_newline): Add support for \ as `natural'
10478 characters in file names in #line to be consistent with #include
10479 handling. We support escape processing in the # 1 "..." version of
10480 the command. See also support in cp/lex.c.
10482 1998-12-07 Zack Weinberg <zack@rabi.phys.columbia.edu>
10484 * cp/decl2.c: s/data/opts/ when initializing cpp_reader
10487 1998-12-07 Jason Merrill <jason@yorick.cygnus.com>
10489 * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
10491 * error.c (dump_simple_decl): Also print namespace context.
10492 (dump_function_decl): Likewise.
10494 * decl2.c (ambiguous_decl): Don't print old value if it's
10497 * decl.c (lookup_name_real): Fix handling of local types shadowed
10498 by a non-type decl. Remove obsolete code.
10499 * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
10501 * lang-options.h: Add -fpermissive.
10502 * decl2.c: Likewise.
10503 * cp-tree.h: Add flag_permissive.
10504 * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
10505 were specified, set flag_pedantic_errors.
10506 * call.c (build_over_call): Turn dropped qualifier messages
10507 back into pedwarns.
10508 * cvt.c (convert_to_reference): Likewise.
10509 * typeck.c (convert_for_assignment): Likewise.
10511 1998-12-05 Jason Merrill <jason@yorick.cygnus.com>
10513 * decl2.c (coerce_new_type): Use same_type_p.
10514 (coerce_delete_type): Likewise.
10516 * call.c (check_dtor_name): Return 1, not error_mark_node.
10518 1998-12-04 Jason Merrill <jason@yorick.cygnus.com>
10520 * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
10521 if MULTIPLE_SYMBOL_SPACES.
10523 * pt.c (check_template_shadow): New fn.
10524 * decl2.c (grokfield): Use it.
10525 * decl.c (pushdecl): Likewise.
10526 (pushdecl_class_level): Likewise.
10527 (start_method): Likewise.
10528 (xref_tag): Don't try to use 't' if we're defining.
10530 * call.c (check_dtor_name): Just return an error_mark_node.
10531 * pt.c (lookup_template_class): Complain about using non-template here.
10532 * parse.y (apparent_template_type): Not here.
10534 * pt.c (check_explicit_specialization): Complain about specialization
10537 * lang-options.h: Add -f{no-,}implicit-inline-templates.
10539 * pt.c (convert_nontype_argument): Don't assume that any integer
10540 argument is intended to be a constant-expression.
10542 1998-12-03 Mark Mitchell <mark@markmitchell.com>
10544 * class.c (handle_using_decl): Fix comment. Don't lookup
10545 constructors in base classes.
10546 (validate_lhs): Fix typo in comment.
10547 * search.c (lookup_field_1): Don't return a USING_DECL.
10549 * cp-tree.h (DECL_ACCESS): Improve documentation.
10551 * decl.c (expand_static_init): Don't set the initialization-done
10552 flag until the initialization is done.
10554 1998-12-02 Mark Mitchell <mark@markmitchell.com>
10556 * decl2.c (validate_nonmember_using_decl): Complain about using
10557 declarations for class members.
10559 1998-11-29 Jason Merrill <jason@yorick.cygnus.com>
10561 * typeck2.c (process_init_constructor): Use same_type_p.
10563 * decl.c (check_tag_decl): Don't warn about null decl inside a
10566 * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
10568 (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
10569 (resolve_overloaded_unification): Strip baselinks.
10571 Fri Nov 27 13:07:23 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10573 * g++spec.c: Don't prototype xmalloc.
10575 1998-11-25 Jason Merrill <jason@yorick.cygnus.com>
10577 * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
10579 * decl.c (check_tag_decl): Do complain about null friend decl at
10582 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
10584 * lex.c (make_lang_type): Clear the whole struct lang_type, not
10585 only the first multiple of sizeof (int).
10587 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
10589 * decl.c (start_decl): An explicit specialization of a static data
10590 member is only a definition if it has an initializer.
10592 * except.c (expand_throw): Use cp_finish_decl for the throw temp.
10593 * cvt.c (build_up_reference): Pass DIRECT_BIND down into
10595 * init.c (expand_default_init): Check for DIRECT_BIND instead of
10598 * call.c (build_over_call): Use build_decl.
10600 * except.c (expand_throw): Just use convert, not
10601 build_reinterpret_cast.
10603 * lex.c (handle_generic_pragma): Use token_buffer.
10605 * decl.c (check_tag_decl): Don't complain about null friend decl.
10607 1998-11-24 Dave Pitts <dpitts@cozx.com>
10609 * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
10611 * lex.c (check_newline): Use ISALPHA.
10612 (readescape): Use ISGRAPH.
10613 (yyerror): Use ISGRAPH.
10615 1998-11-24 Nathan Sidwell <nathan@acm.org>
10617 * search.c (get_abstract_virtuals): Do not use initial
10618 CLASSTYPE_ABSTRACT_VIRTUALS.
10619 * typeck2.c (abstract_virtuals_error): Show location of abstract
10621 * call.c (build_new_method_call): Use
10622 CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
10623 * class.c (finish_struct_bits): Don't bother working out whether
10624 get_abstract_virtuals will do anything, just do it.
10626 1998-11-24 Graham <grahams@rcp.co.uk>
10628 * typeck.c (build_component_ref): Remove unused statement.
10630 1998-11-24 Jason Merrill <jason@yorick.cygnus.com>
10632 * class.c (add_method): Catch invalid overloads.
10634 * class.c (add_method): Build up OVERLOADs properly for conversion ops.
10635 * search.c (lookup_conversions): Handle getting real OVERLOADs.
10636 (add_conversions): Likewise. Revert last change.
10637 * call.c (add_conv_candidate): Pass totype to add_candidate instead
10638 of fn. Don't add a new candidate if the last one was for the same
10640 (print_z_candidates): Handle getting a type as a function.
10641 (joust): If we got two conversion candidates to the same type,
10643 (build_object_call): Lose 'templates'.
10644 (build_user_type_conversion_1): Handle getting real OVERLOADs.
10646 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
10648 * typeck2.c (process_init_constructor): If there are elements
10649 that don't have initializers and they need to have constructors
10650 run, supply them with initializers.
10652 * class.c (finish_struct_1): A class with a 0-width bitfield is
10655 1998-11-23 Mark Mitchell <mark@markmitchell.com>
10657 * pt.c (instantiate_class_template): Don't try to figure out what
10658 specialization to use for a partial instantiation. Correct
10659 typos in a couple of comments. Avoid calling uses_template_parms
10662 1998-11-23 Benjamin Kosnik <bkoz@cygnus.com>
10664 * method.c (process_overload_item): Add call to
10665 build_mangled_C9x_name for intTI_type_nodes.
10666 (build_mangled_C9x_name): Add prototype, define.
10667 * decl.c (init_decl_processing): Add names for
10670 1998-11-23 Jason Merrill <jason@yorick.cygnus.com>
10672 * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
10674 * class.c (finish_struct_1): Set things up for 0-width bitfields
10675 like we do for others.
10677 * decl.c (check_tag_decl): New fn.
10678 (shadow_tag): Split out from here.
10679 * decl2.c (grok_x_components): Call it.
10681 1998-11-22 Jason Merrill <jason@yorick.cygnus.com>
10683 * decl.c: Lose warn_about_return_type.
10684 (grokdeclarator): Always complain about implicit int, except for
10687 * decl.c (tag_name): New fn.
10688 (xref_tag): Complain about using typedef-name after class-key.
10690 * init.c (expand_vec_init): Also keep going if from_array.
10692 * tree.c (is_overloaded_fn): Also handle the output of
10695 * decl.c (grokdeclarator): Use constructor_name when comparing
10696 field name against enclosing class.
10697 * class.c (finish_struct_anon): Likewise.
10699 1998-11-22 Mark Mitchell <mark@markmitchell.com>
10701 * decl.c (poplevel): Remove code to handle KEEP == 2.
10702 (finish_function): Don't confuse BLOCK-order when
10703 processing a destructor.
10705 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
10707 * decl.c (require_complete_types_for_parms): Call layout_decl
10708 after we've completed the type.
10710 1998-11-21 Martin von Löwis <loewis@informatik.hu-berlin.de>
10712 * decl2.c (validate_nonmember_using_decl): Allow using templates
10713 from the global namespace.
10715 1998-11-21 Jason Merrill <jason@yorick.cygnus.com>
10717 Handle specifying template args to member function templates.
10718 * tree.c (build_overload): Always create an OVERLOAD for a template.
10719 * search.c (add_conversions): Handle finding an OVERLOAD.
10720 * decl2.c (check_classfn): Likewise.
10721 * lex.c (identifier_type): See through a baselink.
10722 * parse.y (do_id): Don't call do_identifier if we got a baselink.
10723 * class.c (instantiate_type, case TREE_LIST): Recurse.
10725 * decl.c (grokdeclarator): Allow a boolean constant for array
10726 bounds, odd as that sounds.
10728 * pt.c (unify): Be more strict about non-type parms, except for
10730 (UNIFY_ALLOW_INTEGER): New macro.
10732 1998-11-19 Manfred Hollstein <manfred@s-direktnet.de>
10734 * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
10736 1998-11-19 Jason Merrill <jason@yorick.cygnus.com>
10738 * semantics.c (begin_class_definition): Call
10739 maybe_process_partial_specialization before push_template_decl.
10740 Don't call push_template_decl for a specialization.
10741 * search.c (lookup_field): Do return a member template class.
10742 * decl2.c (handle_class_head): Handle member template classes.
10744 * decl.c (grokdeclarator): A parm type need not be complete.
10746 * pt.c (convert_nontype_argument): Fix thinko.
10748 1998-11-18 Mark Mitchell <mark@markmitchell.com>
10750 * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
10751 (global_delete_fndecl): New variable.
10752 * decl.c (global_delete_fndecl): Define it.
10753 (init_decl_processing): Set it.
10754 * init.c (build_builtin_delete_call): Use it.
10755 * tree.c (mapcar): Recursively call mapcar for the type of EXPR
10758 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
10760 * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
10763 * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
10764 * call.c (build_object_call): Also support references to functions.
10765 * typeck.c (convert_for_initialization): Don't decay a function
10766 if the target is a reference to function.
10768 * search.c (add_conversions): Get all the overloads from a class.
10770 * decl.c (grok_ctor_properties): Complain about any constructor
10771 that will take a single arg of the class type by value.
10773 * typeck2.c (build_functional_cast): Can't create objects of
10774 abstract classes this way.
10775 * cvt.c (ocp_convert): Likewise.
10777 * decl.c (grokfndecl): Member functions of local classes are not
10780 1998-11-18 Mark Mitchell <mark@markmitchell.com>
10782 * Make-lang.in (cc1plus): Add dependency on hash.o.
10784 1998-11-18 Jason Merrill <jason@yorick.cygnus.com>
10786 * search.c (get_abstract_virtuals): Complain about virtuals with
10787 no final overrider.
10788 * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
10789 with no final overrider.
10790 * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
10791 on virtuals with no final overrider.
10793 * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
10795 * class.c (finish_struct_1): Don't remove zero-width bit-fields until
10798 * friend.c (do_friend): Don't set_mangled_name_for_decl.
10800 * class.c (finish_struct_anon): Complain about non-fields.
10801 * decl2.c (build_anon_union_vars): Likewise.
10803 * decl.c (grokdeclarator): Normal data members can't have the same
10804 name as the class, either.
10805 * class.c (finish_struct_anon): Neither can members of an
10808 1998-11-17 Mark Mitchell <mark@markmitchell.com>
10810 * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
10811 (TYPE_BINFO): Likewise.
10812 (IS_AGGR_TYPE): Tweak.
10813 (SET_IS_AGGR_TYPE): New macro.
10814 (CLASS_TYPE_P): Tweak.
10815 (lang_type): Group mark bitfields together. Remove linenum.
10816 (CLASSTYPE_SOURCE_LINE): Remove macro.
10817 (CLASSTYPE_MARKED_N): New macro.
10818 (SET_CLASSTYPE_MARKED_N): Likewise.
10819 (CLEAR_CLASSTYPE_MARKED_N): Likewise.
10820 (CLASS_TYPE_MARKED_*): Use them.
10821 (SET_CLASSTYPE_MARKED_*): Likewise.
10822 (CLEAR_CLASSTYPE_MARKED_*): Likewise.
10823 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
10824 (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
10825 (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
10826 * class.c (class_cache_obstack): New variable.
10827 (class_cache_firstobj): Likewise.
10828 (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
10829 (pushclass): Free the cache, when appropriate.
10831 (maybe_push_cache_obstack): Use class_cache_obstack.
10832 * decl.c (include hash.h).
10833 (typename_hash): New function.
10834 (typename_compare): Likewise.
10835 (build_typename_type): Check the hash table to avoid creating
10837 (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
10838 (grokdeclarator): Use CLASS_TYPE_P.
10839 (xref_basetypes): Likewise.
10840 (start_function): Likewise. Don't put current_class_ref on the
10842 * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
10844 * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
10845 (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
10846 fields for types other than class types. Do clear TYPE_ALIAS_SET
10847 for types other than class types, though.
10848 * method.c (build_overload_identifier): Use CLASS_TYPE_P and
10849 TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10850 * pt.c (process_template_parm): Don't set
10851 CLASSTYPE_GOT_SEMICOLON.
10852 (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10853 Coerce arguments on the momentary obstack.
10854 (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
10855 (instantiate_class_template): Calculate template arguments on the
10856 momentary obstack. Tidy.
10857 (tsubst_template_arg_vector): Use make_temp_vec.
10858 (tsubst_aggr_type): Put template arguments on the momentary
10860 (tsubst_decl): Likewise.
10861 (tsubst): Copy the array bounds index to the permanent obstack
10862 before building index types. Use new macros.
10863 (unify): Use new macros.
10864 (do_type_instantiation): Likewise.
10865 * search.c (lookup_fnfields_1): Use new macros.
10866 (dfs_pushdecls): Build envelopes on the cache obstack.
10867 (dfs_compress_decls): Use new macros.
10868 (push_class_decls): Build on the cache obstack.
10869 * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
10870 * sign.c (build_signature_pointer_or_reference_type): Use
10872 * tree.c (make_binfo): Check CLASS_TYPE_P.
10873 (copy_template_template_parm): Adjust.
10874 (make_temp_vec): Use push_expression_obstack.
10875 * typeck.c (complete_type): Use new macros.
10876 (comptypes): Likewise.
10878 1998-11-17 Jason Merrill <jason@yorick.cygnus.com>
10880 * pt.c (tsubst): Add diagnostics for invalid array, reference
10881 and pointer to member types.
10883 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
10885 * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
10887 * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
10890 * parse.y (structsp): Fix cut-and-paste error.
10892 * init.c (build_new): Complain about non-integral size.
10894 * parse.y (unary_expr): Complain about defining types in sizeof.
10896 * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
10898 * rtti.c (build_x_typeid): Complain about typeid without
10899 including <typeinfo>.
10900 (get_typeid): Likewise. Complain about typeid of incomplete type.
10901 (get_tinfo_fn_dynamic): Likewise.
10902 (get_typeid_1): Not static anymore.
10903 * except.c (build_eh_type_type): Use get_typeid_1.
10905 * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
10906 ambiguous or private bases. Fix warning for reference cast.
10908 1998-11-16 Mark Mitchell <mark@markmitchell.com>
10910 * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
10911 * decl.c (duplicate_decls): Remove special-case code to deal with
10912 template friends, and just do the obvious thing.
10913 * pt.c (register_specialization): Tweak for clarity, and also to
10914 clear DECL_INITIAL for an instantiation before it is merged with a
10916 (check_explicit_specialization): Fix indentation.
10917 (tsubst_friend_function): Handle both definitions in friend
10918 declaration and outside friend declarations.
10919 (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
10920 (regenerate_decl_from_template): Tweak accordingly.
10921 (instantiate_decl): Likewise.
10923 1998-11-16 Jason Merrill <jason@yorick.cygnus.com>
10925 * decl.c (cplus_expand_expr_stmt): Promote warning about naked
10926 member function reference to error.
10927 * cvt.c (ocp_convert): Complain about converting an overloaded
10930 * init.c (build_offset_ref): Just return a lone static member
10933 * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
10936 * typeck.c (build_binary_op_nodefault): Improve error handling.
10938 * decl.c (grokfndecl): Complain about making 'main' a template.
10940 * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
10942 * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
10943 TYPE_DECL in a template.
10945 1998-11-15 Jason Merrill <jason@yorick.cygnus.com>
10947 * typeck2.c (my_friendly_abort): Add URL in the other case, too.
10949 * decl.c (struct cp_function): Add named_label_uses.
10950 (push_cp_function_context): Save it.
10951 (pop_cp_function_context): Restore it.
10952 (define_label): Also complain about jumping into the scope of
10953 non-POD objects that don't have constructors.
10954 * tree.c (pod_type_p): New fn.
10956 * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
10957 * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
10958 (get_tinfo_fn): Not here.
10959 * repo.c (repo_get_id): Abort if we get called for an incomplete
10962 1998-11-13 Mark Mitchell <mark@markmitchell.com>
10964 * except.c (expand_throw): Make sure first argument to
10965 __cp_push_exception is of type `void*' to avoid spurious error
10968 1998-11-11 Jason Merrill <jason@yorick.cygnus.com>
10970 * pt.c (try_one_overload): Take orig_targs again. Only check for
10971 mismatches against them; we don't care what a previous call found.
10972 (resolve_overloaded_unification): Adjust.
10974 * search.c (lookup_field): Don't return anything for a non-type
10975 field from a dependent type.
10976 * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
10977 in an array declarator.
10978 (start_decl): Push into the class before looking for the field.
10980 1998-11-08 Mark Mitchell <mark@markmitchell.com>
10982 * method.c (build_overload_value): Handle REFERENCE_TYPE.
10984 1998-11-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
10986 * decl.c (grokdeclarator): Allow namespace-scoped members if they
10989 1998-11-08 Jason Merrill <jason@yorick.cygnus.com>
10991 * pt.c (tsubst_decl): Don't mess with the global value of an
10992 un-mangled DECL_ASSEMBLER_NAME.
10994 1998-11-03 Christopher Faylor <cgf@cygnus.com>
10996 * decl.c (init_decl_processing): Remove CYGWIN conditional
10997 since CYGWIN is now able to deal with trapping signals.
10999 Sat Nov 7 15:48:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11001 * cp-tree.h: Don't include gansidecl.h.
11002 * exception.cc: Include gansidecl.h (since we don't include config.h)
11003 * g++spec.c: Don't include gansidecl.h.
11005 1998-11-06 Mark Mitchell <mark@markmitchell.com>
11007 * cp-tree.h (lang_decl_flags): Add defined_in_class. Decrease
11009 (DECL_DEFINED_IN_CLASS_P): New macro.
11010 (TEMPLATE_PARMS_FOR_INLINE): Document.
11011 (check_static_variable_definition): New function.
11012 * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
11014 (check_static_variable_definition): Split out from ...
11015 (grokdeclarator): Here.
11016 * pt.c (check_default_tmpl_args): New function, split out from ...
11017 (push_template_decl_real): Here.
11018 (instantiate_template): Fix comment.
11020 1998-11-04 Mark Mitchell <mark@markmitchell.com>
11022 * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
11023 (CP_TYPE_VOLATILE_P): Likewise.
11024 (CP_TYPE_RESTRICT_P): Likewise.
11026 1998-11-03 Mark Mitchell <mark@markmitchell.com>
11028 * pt.c (tsubst): Use build_index_type, not build_index_2_type.
11030 1998-11-02 Jason Merrill <jason@yorick.cygnus.com>
11032 * class.c (instantiate_type): Be more helpful.
11034 * decl2.c (import_export_decl): Call import_export_class.
11036 * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
11037 * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
11038 * pt.c (tsubst_copy): Likewise.
11040 1998-11-02 Mark Mitchell <mark@markmitchell.com>
11042 * init.c (expand_vec_init): Fix off-by-one error.
11044 1998-11-02 Alexandre Oliva <oliva@dcc.unicamp.br>
11046 * parse.y (apparent_template_type): New type.
11047 (named_complex_class_head_sans_basetype): Use it.
11048 * Makefile.in (CONFLICTS): One new conflict.
11049 * parse.c: Regenerated.
11051 1998-11-01 Mark Mitchell <mark@markmitchell.com>
11053 * cp-tree.h (COMPARE_STRICT): New macro.
11054 (COMPARE_BASE): Likewise.
11055 (COMPARE_RELAXED): Likewise.
11056 (COMPARE_REDECLARATION): Likewise.
11057 (same_type_p): Likewise.
11058 (same_or_base_type_p): Likewise.
11059 * call.c (standard_conversion): Use them, in place of comptypes
11060 with numeric arguments.
11061 (reference_binding): Likewise.
11062 (convert_like): Likewise.
11063 (build_over_call): Likewise.
11064 (is_subseq): Likewise.
11065 (is_properly_derived_from): Likewise.
11066 (compare_ics): Likewise.
11068 * class.c (delete_duplicate_fields_1): Likewise.
11069 (resolves_to_fixed_type_p): Likewise.
11070 (instantiate_type): Likewise. Remove #if 0'd code.
11071 * decl.c (decls_match): Likewise. Use COMPARE_REDECLARATION here.
11072 (pushdecl): Likewise.
11073 (lookup_name_real): Likewise.
11074 (grokdeclarator): Likewise. Check for illegal array declarations.
11075 (grokparms): Likewise.
11076 (grok_op_properties): Likewise.
11077 * decl2.c (check_classfn): Likewise.
11078 * friend.c (is_friend): Likewise.
11079 (make_friend_class): Likewise.
11080 * init.c (expand_aggr_init): Likewise.
11081 (expand_vec_init): Likewise.
11082 * pt.c (is_member_template_class): Remove declaration.
11083 (is_specialization_of): Use COMPARE_* and new macros.
11084 (comp_template_parms): Likewise.
11085 (convert_nontype_argument): Likewise.
11086 (coerce_template_template_parms): Likewise.
11087 (template_args_equal): Likewise.
11088 (lookup_template_class): Likewise.
11089 (type_unification_real): Likewise.
11091 (get_bindings_real): Likewise.
11092 * search.c (covariant_return_p): Likewise.
11093 (get_matching_virtual): Likewise.
11094 * sig.c (match_method_types): Likewise.
11095 * tree.c (vec_binfo_member): Likewise.
11096 (cp_tree_equal): Likewise.
11097 * typeck.c (common_type): Likewise.
11098 (comp_array_types): Likewise. Get issues involving unknown array
11100 (comptypes): Update comments. Use new flags.
11101 (comp_target_types): Use new macros.
11102 (compparms): Likewise.
11103 (comp_target_parms): Likewise.
11104 (string_conv_p): Likewise.
11105 (build_component_ref): Likewise.
11106 (build_indirect_ref): Likewise.
11107 (build_conditional_expr): Likewise.
11108 (build_static_cast): Likewise.
11109 (build_reinterpret_cast): Likewise.
11110 (build_const_cast): Likewise.
11111 (build_modify_expr): Likewise.
11112 (convert_for_assignment): Likewise.
11113 (comp_ptr_ttypes_real): Likewise.
11114 (ptr_reasonably_similar): Likewise.
11115 (comp_ptr_ttypes_const): Likewise.
11117 1998-10-31 Jason Merrill <jason@yorick.cygnus.com>
11119 * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
11121 1998-10-30 Mark Mitchell <mark@markmitchell.com>
11123 * decl2.c (delete_sanity): Pass integer_zero_node, not
11124 integer_two_node, to build_vec_delete.
11125 * init.c (build_array_eh_cleanup): Remove.
11126 (expand_vec_init_try_block): New function.
11127 (expand_vec_init_catch_clause): Likewise.
11128 (build_vec_delete_1): Don't deal with case that auto_delete_vec
11129 might be integer_two_node anymore.
11130 (expand_vec_init): Rework for initialization-correctness and
11131 exception-correctness.
11132 * typeck2.c (process_init_constructor): Make mutual exclusivity
11133 of cases more obvious.
11135 1998-10-29 Jason Merrill <jason@yorick.cygnus.com>
11137 * decl.c (lookup_name_real): OK, only warn if not lexing.
11138 Simplify suggested fix.
11140 * cp-tree.h (IDENTIFIER_MARKED): New macro.
11141 * search.c (lookup_conversions): Use breadth_first_search.
11142 (add_conversions): Avoid adding two conversions to the same type.
11143 (breadth_first_search): Work with base binfos, rather
11144 than binfos and base indices.
11145 (get_virtual_destructor): Adjust.
11146 (tree_has_any_destructor_p): Adjust.
11147 (get_matching_virtual): Adjust.
11149 * pt.c (push_template_decl_real): Generalize check for incorrect
11150 number of template parms.
11151 (is_member_template_class): #if 0.
11153 1998-10-29 Richard Henderson <rth@cygnus.com>
11155 * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
11158 1998-10-28 Zack Weinberg <zack@rabi.phys.columbia.edu>
11160 * lex.c: Call check_newline from lang_init always. After
11161 calling cpp_start_read, set yy_cur and yy_lim to read from the
11162 cpplib token buffer.
11164 1998-10-28 Jason Merrill <jason@yorick.cygnus.com>
11166 * class.c (instantiate_type): Don't consider templates for a normal
11169 * class.c (finish_struct_1): Don't complain about non-copy
11170 assignment ops in union members.
11172 * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
11173 (prepare_fresh_vtable): Likewise.
11174 (finish_struct_1): Don't call import_export_class.
11175 * decl2.c (finish_vtable_vardecl): Do import/export stuff.
11176 (finish_prevtable_vardecl): Lose.
11177 (finish_file): Don't call it.
11178 * pt.c (instantiate_class_template): Likewise.
11179 * cp-tree.h: Remove it.
11181 * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
11182 * decl.c (finish_function): Not here.
11183 (start_function): Do set DECL_INITIAL.
11185 * pt.c (push_template_decl_real): Complain about default template
11186 args for enclosing classes.
11188 * call.c (add_function_candidate): Treat conversion functions
11189 as coming from the argument's class.
11190 * cp-tree.h (DECL_CONV_FN_P): New fn.
11191 (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
11192 * class.c (add_method): Use DECL_CONV_FN_P.
11193 * decl2.c (check_classfn): Likewise.
11194 * error.c (dump_function_name): Likewise.
11195 (dump_function_decl): Likewise.
11196 * pt.c (fn_type_unification): Likewise.
11197 * search.c (add_conversions): Likewise.
11199 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11201 * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
11202 * method.c (hack_identifier): Also check for using RESULT_DECL
11203 from outer context.
11205 1998-10-27 Mark Mitchell <mark@markmitchell.com>
11207 * decl.c (grokdeclarator): Use type_quals, rather than constp,
11210 1998-10-27 Jason Merrill <jason@yorick.cygnus.com>
11212 * call.c (standard_conversion): instantiate_type here.
11213 (reference_binding): And here.
11214 (implicit_conversion): Not here.
11215 (build_op_delete_call): No need to cons up an OVERLOAD.
11216 * cvt.c (cp_convert_to_pointer): instantiate_type here.
11217 (convert_to_reference): And here.
11218 * decl.c (grok_reference_init): Not here.
11219 (grokparms): Or here.
11220 * typeck2.c (digest_init): Or here.
11221 * typeck.c (decay_conversion): Take the address of overloaded
11223 (require_instantiated_type): Lose.
11224 (convert_arguments): Don't handle unknown types here.
11225 (build_c_cast): Likewise.
11226 (build_binary_op): Gut.
11227 (build_conditional_expr): Don't require_instantiated_type.
11228 (build_modify_expr): Likewise.
11229 (build_static_cast): Don't instantiate_type.
11230 (build_reinterpret_cast): Likewise.
11231 (build_const_cast): Likewise.
11232 (convert_for_initialization): Likewise.
11233 (build_ptrmemfunc): Use type_unknown_p.
11234 (convert_for_assignment): Also do default_conversion on overloaded
11235 functions. Hand them off to ocp_convert.
11237 1998-10-26 Mark Mitchell <mark@markmitchell.com>
11239 * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
11240 VAR_DECLs. Handle vtables whose DECL_CONTEXT is not a type.
11242 * class.c (finish_struct_1): Use build_cplus_array_type to build
11244 * decl.c (init_decl_processing): Likewise.
11245 * except.c (expand_end_eh_spec): Likewise.
11246 * search.c (expand_upcast_fixups): Simplify very slightly.
11248 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11250 * decl.c (grokdeclarator): Complain about a variable using
11251 constructor syntax coming back null from start_decl.
11253 * friend.c (make_friend_class): Complain about trying to make
11254 a non-class type a friend.
11256 * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
11257 (start_function): Not here.
11259 1998-10-26 Brendan Kehoe <brendan@cygnus.com>
11261 * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
11263 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11265 * typeck2.c (process_init_constructor): Only skip anonymous fields
11266 if they are bitfields.
11268 * cp-tree.def (TYPEOF_TYPE): New code.
11269 * error.c (dump_type_real): Handle it.
11270 * pt.c (tsubst): Likewise.
11271 * tree.c (search_tree): Likewise.
11272 * semantics.c (finish_typeof): New fn.
11273 * parse.y (typespec): Use it.
11274 * cp-tree.h: Declare it.
11276 1998-10-26 Manfred Hollstein <manfred@s-direktnet.de>
11278 * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
11280 1998-10-26 Jason Merrill <jason@yorick.cygnus.com>
11282 * typeck.c (convert_arguments): Don't handle pmf references
11285 * init.c (build_member_call): Don't try to convert to the base type
11286 if it's ambiguous or pedantic.
11288 * typeck2.c (check_for_new_type): Only depend on pedantic for
11291 1998-10-25 Mark Mitchell <mark@markmitchell.com>
11293 * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
11294 non-converting constructors.
11296 1998-10-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
11298 * gxxint.texi: Correct documentation for n, N, Q, and B.
11300 1998-10-23 Martin von Löwis <loewis@informatik.hu-berlin.de>
11302 * parse.y (condition): Convert VAR_DECL from reference to indirect
11305 1998-10-23 Andrew MacLeod <amacleod@cygnus.com>
11307 * exception.cc (__cp_pop_exception): Free the original exception
11308 value, not the potentially coerced one.
11310 1998-10-23 Mark Mitchell <mark@markmitchell.com>
11312 * Makefile.in (hash.h): Run gperf when necessary.
11314 * cp-tree.h (CP_TYPE_READONLY): Remove.
11315 (CP_TYPE_VOLATILE): Likewise.
11316 (CP_TYPE_QUALS): New macro.
11317 (CP_TYPE_CONST_P): Likewise.
11318 (CP_TYPE_VOLATILE_P): Likewise.
11319 (CP_TYPE_RESTRICT_P): Likewise.
11320 (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
11321 (cp_build_type_variant): Rename to ...
11322 (cp_build_qualified_type): New function.
11323 (c_apply_type_quals_to_decl): Declare.
11324 (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
11325 (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
11326 (cp_type_qual_from_rid): New function.
11327 (compparms): Remove unused parameter. All callers changed.
11328 (cp_type_quals): New function.
11329 (at_least_as_qualified_p): Likewise.
11330 (more_qualified_p): Likewise.
11332 * call.c (standard_conversion): Replace calls to
11333 cp_build_type_variant with cp_build_qualified_type. Use
11334 CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
11335 compare them. Use CP_TYPE_* macros to check qualifiers.
11336 (reference_binding): Likewise.
11337 (implicit_conversion): Likewise.
11338 (add_builtin_candidates): Likewise.
11339 (build_over_call): Likewise.
11340 * class.c (overrides): Compare all qualifiers, not just `const',
11341 on method declarations.
11342 * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
11343 (convert_pointer_to_real): Likewise.
11344 (type_promotes_to): Likewise.
11345 * decl.c (check_for_uninitialized_const_var): New function.
11346 (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
11347 (cp_finish_decl): Use check_for_uninitialized_const_var.
11348 (grokdeclarator): More CP_TYPE_QUALS conversion, etc. Update to
11350 (grok_ctor_properties): Likewise.
11351 (grok_op_properties): Likewise.
11352 (start_function): Likewise.
11353 (rever_static_member_fn): Likewise.
11354 * decl2.c (grok_method_quals): Likewise.
11355 (grokfield): Likewise.
11356 * error.c (dump_readonly_or_volatile): Rename to ...
11357 (dump_qualifiers): New function. Handle `restrict'.
11358 (dump_type_real): Use it.
11359 (dump_aggr_type): Likewise.
11360 (dump_type_prefix): Likewise.
11361 (dump_type_suffix): Likewise.
11362 (dump_function_decl): Likewise.
11363 (cv_as_string): Likewise.
11364 * gxx.gperf: Add __restrict and __restrict__.
11365 * gxxint.texi: Document `u' as used for `__restrict', and a few
11366 other previously undocumented codes.
11367 * hash.h: Regenerated.
11368 * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
11369 (build_member_call): Likewise.
11370 (build_new_1): Likewise.
11371 * lex.c (init_parse): Add entry for RID_RESTRICT.
11372 (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
11373 (cp_type_qual_from_rid): Define.
11374 * lex.h (enum rid): Add RID_RESTRICT.
11375 * method.c (process_modifiers): Deal with `restrict'.
11376 * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
11377 * parse.c: Regenerated.
11378 * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
11379 (tsubst_aggr_type): Likewise.
11380 (tsubst): Likewise.
11381 (check_cv_quals_for_unify): Likewise.
11383 * rtti.c (init_rtti_processing): Likewise.
11384 (build_headof): Likewise.
11385 (get_tinfo_var): Likewise.
11386 (buidl_dynamic_cast_1): Likewise. Fix `volatile' handling.
11387 (expand_class_desc): Likewise.
11388 (expand_attr_desc): Likewise.
11389 (synthesize_tinfo_fn): Likewise.
11390 * search.c (covariant_return_p): Likewise. Fix `volatile' handling.
11391 (get_matching_virtual): Likewise.
11392 (expand_upcast_fixups): Likewise.
11393 * sig.c (build_signature_pointer_or_reference_name): Take
11394 type_quals, not constp and volatilep.
11395 (build_signature_pointer_or_reference_type): Likewise.
11396 (match_method_types): More CP_TYPE_QUALS conversion, etc.
11397 (build_signature_pointer_constructor): Likewise.
11398 (build_signature_method_call): Likewise.
11399 * tree.c (build_cplus_array_type): Likewise.
11400 (cp_build_type_variant): Rename to ...
11401 (cp_build_qualified_type): New function. Deal with `__restrict'.
11402 (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
11403 (build_exception_variant): Likewise.
11404 (mapcar): Likewise.
11405 * typeck.c (qualif_type): Likewise.
11406 (common_type): Likewise.
11407 (comptypes): Likewise.
11408 (comp_cv_target_types): Likewise.
11409 (at_least_as_qualified_p): Define.
11410 (more_qualified_p): Likewise.
11411 (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
11412 (compparms): Likewise.
11413 (inline_conversion): Likewise.
11414 (string_conv_p): Likewise.
11415 (build_component_ref): Likewise.
11416 (build_indirect_ref): Likewise.
11417 (build_array_ref): Likewise.
11418 (build_unary_op): Likewise.
11419 (build_conditional_expr): Likewise.
11420 (build_static_cast): Likewise.
11421 (build_c_cast): Likewise.
11422 (build_modify_expr): Likewise.
11423 (convert_For_assignment): Likewise.
11424 (comp_ptr_ttypes_real): Likewise.
11425 (cp_type_quals): New function.
11427 1998-10-23 Jason Merrill <jason@yorick.cygnus.com>
11429 * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
11430 (CP_TYPE_VOLATILE): Likewise.
11431 * decl.c (grokdeclarator): Use them.
11432 * tree.c (canonical_type_variant): Likewise.
11434 1998-10-22 Martin von Löwis <loewis@informatik.hu-berlin.de>
11436 * parse.y (named_class_head): Push into class while parsing the
11438 * decl2.c (push_scope, pop_scope): New functions.
11439 * cp-tree.h: Declare them.
11440 * init.c (build_new_1): Delay cleanup until end of full expression.
11442 1998-10-21 Jason Merrill <jason@yorick.cygnus.com>
11444 * typeck.c (build_component_ref): Use of a type here is an error.
11446 1998-10-19 Jason Merrill <jason@yorick.cygnus.com>
11448 Revamp references to member functions.
11449 * method.c (hack_identifier): Call build_component_ref for a
11450 reference to a member function.
11451 * typeck.c (build_component_ref): Only return a single function
11452 if it's static. Otherwise, return a COMPONENT_REF.
11453 (build_x_function_call): Handle a COMPONENT_REF.
11454 (build_unary_op): Handle all unknown-type things.
11455 * decl2.c (arg_assoc): Handle COMPONENT_REF.
11456 * class.c (instantiate_type): Complain if the function we get is a
11457 nonstatic member function. Remove code for finding "compatible"
11459 * pt.c (tsubst_copy): Handle NOP_EXPR.
11460 * tree.c (build_dummy_object): New fn.
11461 (maybe_dummy_object): New fn.
11462 (is_dummy_object): New fn.
11463 * cp-tree.h: Declare them.
11464 * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
11465 * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
11466 * init.c (build_member_call): Use maybe_dummy_object and
11468 (build_offset_ref): Use maybe_dummy_object.
11469 (resolve_offset_ref): Use is_dummy_object.
11470 * typeck.c (build_x_function_call): Call build_dummy_object.
11471 (unary_complex_lvalue): Call is_dummy_object.
11473 * typeck.c (build_component_addr): Make sure field is a field.
11475 * call.c (build_new_op): Delete obsolete code.
11477 * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
11479 1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de>
11481 * decl2.c (validate_nonmember_using_decl): Fix using-directives of
11482 std if std is ignored.
11484 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
11486 * decl.c (grokvardecl): Fix thinko.
11488 * decl.c (grokdeclarator): Embedded attrs bind to the right,
11491 * parse.y (fn.def2): Fix 'attrs' format.
11493 1998-10-18 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
11495 * Makefile.in (CONFLICTS): Update.
11496 * parse.y (expr_or_declarator_intern): New rule.
11497 (expr_or_declarator, direct_notype_declarator, primary,
11498 functional_cast): Use it.
11499 (notype_declarator_intern): New rule.
11500 (notype_declarator, complex_notype_declarator): Use it.
11502 1998-10-17 Jason Merrill <jason@yorick.cygnus.com>
11504 * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
11505 (grokvardecl): Likewise.
11507 Sat Oct 17 23:27:20 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11509 * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
11510 (add_method): Likewise for arguments 1 & 2 of `bcopy'.
11512 * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
11514 * pt.c (process_partial_specialization): Cast 1st argument of
11517 * tree.c (build_base_fields): Cast `base_align' to (int) when
11518 comparing against one.
11520 1998-10-16 Mark Mitchell <mark@markmitchell.com>
11522 * decl.c (lookup_name_real): Handle template parameters for member
11523 templates where said parameters have the same name as the
11526 * decl.c (expand_static_init): Build cleanups before entering the
11527 anonymous function used to do them to avoid access-checking
11530 * decl.c (grokfndecl): Add back call to cplus_decl_attributes
11531 accidentally removed by previous change, and make DECL_RTL here.
11532 * class.c (add_method): Don't make DECL_RTL here.
11534 * pt.c (for_each_template_parm): Don't examine uninstantiated
11537 1998-10-16 Dave Brolley <brolley@cygnus.com>
11539 * lex.c (real_yylex): Fix unaligned access of wchar_t.
11541 1998-10-16 Mark Mitchell <mark@markmitchell.com>
11543 * class.c (add_method): Fix documentation to reflect previous
11544 changes. Check for duplicate method declarations here.
11545 * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
11546 correctly; such things never match.
11547 (grokfndecl): Don't look for duplicate methods here.
11548 * decl2.c (check_classfn): Don't assume names are mangled.
11549 Don't add bogus member function declarations to a class before the
11550 class type is complete.
11551 (grokfield): Reformat error message.
11552 * method.c (set_mangled_name_for_decl): Don't mangle names while
11553 processing_template_decl.
11555 1998-10-16 Jason Merrill <jason@yorick.cygnus.com>
11557 * typeck.c (build_indirect_ref): Complain about a pointer to data
11559 * typeck2.c (build_m_component_ref): Don't indirect a pointer to
11561 * init.c (resolve_offset_ref): Don't undo the above.
11563 * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
11564 (struct lang_decl_flags): Add `bitfield'.
11565 * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
11567 * decl2.c (grokbitfield, grok_alignof): Likewise.
11568 * init.c (build_offset_ref): Likewise.
11569 * typeck.c (build_component_addr, expr_sizeof): Likewise.
11570 * cvt.c (build_up_reference): Don't crash if taking the address
11571 returns error_mark_node.
11573 * decl.c (grokfndecl): Also check ctype when checking for ::main().
11575 1998-10-15 Jason Merrill <jason@yorick.cygnus.com>
11577 * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
11579 (grokdeclarator): Instead of here.
11580 * friend.c (do_friend): Lose special handling of ::main and
11582 * cp-tree.h (DECL_MAIN_P): Check for C linkage.
11584 * spew.c (yylex): Clear looking_for_typename if we got
11587 1998-10-15 Mark Mitchell <mark@markmitchell.com>
11589 * class.c (maybe_warn_about_overly_private_class): Improve error
11590 messages for class with only private constructors.
11592 * cp-tree.def (TYPENAME_TYPE): Add to documentation.
11593 * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
11594 (build_typename_type): New function.
11595 * decl.c (build_typename_type): Broken out from ...
11596 (make_typename_type): Use it.
11597 * search.c (lookup_field): Likewise.
11599 1998-10-14 Benjamin Kosnik <bkoz@rhino.cygnus.com>
11601 * pt.c (convert_nontype_argument): Check against type_referred_to.
11602 * decl.c (grokvardecl): Check for declarator name before building
11603 DECL_ASSEMBLER_NAME.
11605 1998-10-14 Mark Mitchell <mark@markmitchell.com>
11607 * pt.c (lookup_template_class): Add comment.
11608 (instantiate_class_template): Don't mark the _TYPE node for
11609 member class templates as an instantiation.
11611 1998-10-14 Jason Merrill <jason@yorick.cygnus.com>
11613 * decl.c (grokfndecl): Fix my thinko.
11615 1998-10-13 Jason Merrill <jason@yorick.cygnus.com>
11617 * tinfo2.cc (fast_compare): Remove.
11618 (before): Just use strcmp.
11619 * tinfo.cc (operator==): Just use strcmp.
11621 1998-10-13 Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
11623 * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
11626 1998-10-13 Mark Mitchell <mark@markmitchell.com>
11628 * cp-tree.h (specializations_of_same_template_p): Remove.
11629 * search.c (get_template_base): Don't use it.
11630 (get_template_base_recursive): Likewise.
11631 * pt.c (specializations_of_same_template_p): Remove.
11632 (unify): Don't use it.
11633 (lookup_template_class): Find the correct parent when setting
11634 CLASSTYPE_TI_TEMPLATE.
11636 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
11638 * tinfo.cc (operator==): Always compare names.
11640 1998-10-12 Herman ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11642 * decl.c (start_function): Fix cut-and-paste error.
11644 1998-10-12 Jason Merrill <jason@yorick.cygnus.com>
11646 * inc/typeinfo: Add #pragma interface.
11647 (operator!=): Just call operator==.
11648 * tinfo.cc: Add #pragma implementation.
11649 (operator==): Move from inc/typeinfo and tinfo2.cc.
11650 Check __COMMON_UNRELIABLE instead of _WIN32.
11652 * typeck2.c (my_friendly_abort): Add URL.
11654 1998-10-12 Alastair J. Houghton <ajh8@doc.ic.ac.uk>
11656 * decl.c (start_method): Added extra parameter for attributes.
11657 * cp-tree.h (start_method): Update prototype.
11658 * parse.y (fn.def2): Update start_method parameter list.
11660 1998-10-11 Mark Mitchell <mark@markmitchell.com>
11662 * cp-tree.h (specializations_of_same_template_p): Declare.
11663 * pt.c (specializations_of_same_template_p): New function.
11665 * search.c (get_template_base): Use it.
11666 (get_template_base_recursive): Likewise.
11668 1998-10-10 Manfred Hollstein <manfred@s-direktnet.de>
11670 * decl2.c (start_objects): Add new variable `joiner' and
11671 initialize it properly.
11673 1998-10-09 Mark Mitchell <mark@markmitchell.com>
11675 * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
11676 change to vtable types.
11678 * cvt.c (ocp_convert): Avoid infinite recursion caused by
11681 1998-10-08 Jason Merrill <jason@yorick.cygnus.com>
11683 * pt.c (resolve_overloaded_unification): New fn.
11684 (try_one_overload): Likewise.
11685 (unify): Don't fail on unknown type.
11686 (type_unification_real): Likewise. Use resolve_overloaded_unification
11687 to handle an overloaded argument.
11688 (template_args_equal): Split out...
11689 (comp_template_args): From here.
11690 (determine_specialization): Also allow a template with more
11691 parms than were explicitly specified.
11692 * cp-tree.h: Add template_args_equal.
11693 * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
11695 Thu Oct 8 15:58:30 1998 Anthony Green <green@cygnus.com>
11697 * semantics.c (finish_asm_stmt): Revert my 1998-09-28
11700 Thu Oct 8 06:00:19 1998 Jeffrey A Law (law@cygnus.com)
11702 * typeck.c (unsigned_type): Only return TItype nodes when
11703 HOST_BITS_PER_WIDE_INT is >= 64 bits.
11704 (signed_type): Likewise.
11705 * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
11706 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11707 (init_decl_processing): Only create TItype nodes when
11708 HOST_BITS_PER_WIDE_INT is >= 64 bits.
11709 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
11710 when HOST_BITS_PER_WIDE_INT is >= 64 bits.
11712 Wed Oct 7 12:32:44 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11714 * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
11715 (gxx.gperf): Update comments describing invocation flags.
11716 (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
11718 1998-10-07 Mark Mitchell <mark@markmitchell.com>
11720 * class.c (finish_struct_1): Add commentary on previous change.
11722 * cp-tree.h (vtbl_ptr_type_node): New variable.
11723 * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
11724 already of the right type.
11725 (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
11726 Simplify code to grow vtable.
11727 * decl.c (vtbl_ptr_type_node): Define.
11728 (init_decl_processing): Initialize it.
11730 1998-10-06 Mark Mitchell <mark@markmitchell.com>
11732 * cp-tree.def (PTRMEM_CST): New tree node.
11733 * cp-tree.h (ptrmem_cst): New type.
11734 (lang_type): Remove local_typedecls.
11735 (dummy): Increase to 12 bits from 11.
11736 (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
11737 (PTRMEM_CST_CLASS): New macro.
11738 (PTRMEM_CST_MEMBER): Likewise.
11739 (current_access_specifier): New variable.
11740 (current_class_type): Remove duplicate declaration.
11741 (finish_struct): Change prototype.
11742 (unreverse_member_declarations): New function.
11743 (pushdecl_class_level): Change prototype.
11744 (grok_enum_decls): Remove.
11745 (fixup_anonymous_union): New function.
11746 (grok_x_components): Change prototype.
11747 (tsubst_chain): Remove.
11748 (finish_member_template_decl): Likewise.
11749 (check_explicit_specialization): Fix indentation.
11750 (finish_class_definition): Change prototype.
11751 (finish_member_class_template): Likewise.
11752 (finish_member_declaration): New function.
11753 (check_multiple_declarators): Likewise.
11754 * class.c (class_stack_node_t): New type.
11755 (current_class_base): Remove.
11756 (current_class_stack): Change type.
11757 (current_access_specifier): New variable.
11758 (grow_method): Remove.
11759 (check_member_decl_is_same_in_complete_scope): Break out from
11761 (make_method_vec): New function.
11762 (free_method_vec): Likewise.
11763 (add_implicitly_declared_members): Break out from finish_struct_1.
11764 (free_method_vecs): New variable.
11765 (add_method): Rework for direct use from parser.
11766 (handle_using_decl): Watch for NULL_TREE while iterating through
11767 CLASSTYPE_METHOD_VEC.
11768 (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
11769 just do some error-checking.
11770 (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
11771 (finish_struct_1): Simplify. Use add_implicitly_declared_members.
11772 (finish_struct): Change prototype. Simplify; fields and methods
11773 are already set up at this point.
11774 (init_class_processing): Set up current_class_stack.
11775 (pushclass): Save current_access_specifier.
11776 (popclass): Restore it.
11777 (currently_open_class): Simplify.
11778 (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
11779 * decl.c (saved_scope): Add access_specifier.
11780 (maybe_push_to_top_level): Save it.
11781 (pop_from_top_level): Restore it.
11782 (maybe_process_template_type_declaration): Use
11783 finish_member_declaration.
11784 (pushtag): Likewise.
11785 (pushdecl_class_level): Don't return a value.
11786 (fixup_anonymous_union): Break out from grok_x_components.
11787 (shadow_tag): Use it.
11788 (xref_tag): Complain about using an elaborated type specifier to
11789 reference a template type parameter or typedef name.
11790 (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11791 (current_local_enum): Remove.
11792 (build_enumerator): Call finish_member_declaration.
11793 (grok_enum_decls): Remove.
11794 * decl2.c (grok_x_components): Simplify.
11795 (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
11796 (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
11797 (merge_functions): Add to comment.
11798 (arg_assoc_type): Prototype.
11799 (arg_assoc): Pass as many arguments as there are parameters.
11800 * error.c (dump_expr): Handle PTRMEM_CST. Improve handling of
11802 * expr.c (cpls_expand_expr): Remove dead code. Handle
11804 * friend.c (do_friend): Lookup friends when in nested classes.
11806 * init.c (build_offset_ref): Do lookup even for classes that are
11807 only partially defined.
11808 (decl_constant_value): Remove dead code.
11809 * method.c (build_overload_value): Remove hack where by TYPE was
11810 not a TYPE. Handle PTRMEM_CST.
11811 (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
11813 * parse.y (components, notype_components, component_decl,
11814 component_decl_1, component_declarator, component_declarator0):
11815 Now all are itype rather than ttype. Rework to add members to
11816 classes on the fly.
11817 (typesqpecqual_reserved): Use check_multiple_declarators.
11818 (structsp): Update class to finish_class_definition.
11819 (do_xref_defn): Unsplit into named_class_head.
11820 (access_specifier): Set current_access_specifier.
11821 * pt.c (set_current_access_from_decl): New function.
11822 (finish_member_template_decl): Don't take the parameters.
11823 (comp_template_args): Make more robust.
11824 (lookup_template_class): Don't use current_local_enum.
11825 (for_each_template_parm): Handle PTRMEM_CST.
11826 (instantiate_class_template): Use set_current_access_from_decl,
11827 finish_member_declaration and unreverse_member_declarations. Set
11828 lineno/input_filename before generating implicit member functions.
11829 (type_unification_real): Don't assume back-unification happens
11830 only for the last argument.
11831 (regenerate_decl_from_template): Call pushclass a bit earlier.
11832 (tsubst_chain): Remove.
11833 (tsubst_enum): Use set_current_access_from_decl.
11834 (set_mangled_name_for_template_decl): Fix indentation.
11835 * search.c (lookup_fnfields_1): Change iteration through
11836 CLASSTYPE_METHOD_VEC.
11837 (dfs_pushdecls): Likewise.
11838 (dfs_compress_decls): Likewise.
11839 (add_conversions): Likewise.
11840 * semantics.c (finish_class_definition): Don't take components.
11841 Change call to finish_struct.
11842 (finish_member_declaration): New function.
11843 (finish_member_class_template): Don't take template parameters.
11844 Change call to grok_x_components. Call finish_member_template_decl.
11845 (check_multiple_declarators): New function.
11846 * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
11847 a passed in fieldlist.
11848 * tree.c (search_tree): Handle PTRMEM_CST.
11849 (mapcar): Likewise.
11850 * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
11851 INTEGER_CSTs, for pointer-to-data members.
11853 * call.c (resolve_args): Resolve template specializations, if
11856 Tue Oct 6 07:57:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11858 * Makefile.in (spew.o): Depend on toplev.h.
11860 * call.c (compare_ics): Initialize variables `deref_from_type2',
11861 `deref_to_type1' and `deref_to_type2'.
11863 * except.c (get_eh_type): Hide prototype and definition.
11864 (process_start_catch_block_old): Remove unused static prototype.
11866 * pt.c (tsubst_decl): Initialize variable `argvec'.
11868 * spew.c: Include toplev.h.
11870 1998-10-05 Jason Merrill <jason@yorick.cygnus.com>
11872 * pt.c (instantiate_decl): Do save and restore file position.
11874 1998-10-05 Martin von Löwis <loewis@informatik.hu-berlin.de>
11876 * method.c (build_decl_overload_real): Clear
11877 numeric_output_need_bar after __.
11879 1998-10-05 Nathan Sidwell <nathan@acm.org>
11881 * call.c (build_new_method_call): Issue 'incomplete type' error,
11882 if class is not defined.
11884 1998-10-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11886 * call.c (build_object_call): Move declaration of variable
11887 `fn' into the scope where it is used. Don't access variable
11888 `fn' when it is uninitialized, instead use `fns'.
11890 1998-10-04 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11892 * errfn.c (cp_thing): Print buf as a string not as a printf format
11893 to avoid problems with the operator%. Consequently, `%%' sequences
11894 in format are copied as `%' in buf.
11896 1998-10-04 Jason Merrill <jason@yorick.cygnus.com>
11898 * pt.c (pop_tinst_level): Call extract_interface_info.
11899 (instantiate_decl): Don't save and restore file position.
11901 * decl.c (cp_finish_decl): Make statics in extern inlines and
11902 templates common, if possible and the target doesn't support weak
11905 * decl.c (grokdeclarator): Remove redundant calls to
11906 build_type_variant and some duplicated code.
11907 * sig.c (build_signature_reference_type): Only take the type parm.
11908 (build_signature_pointer_type): Likewise.
11909 * tree.c (build_cplus_method_type): Adjust.
11910 * cp-tree.h: Update.
11912 1998-10-04 Mark Mitchell <mark@markmitchell.com>
11914 * call.c (build_over_call): Make pedwarns about dropped qualifiers
11915 into full-fledged errors.
11916 * cvt.c (convert_to_reference): Likewise.
11917 * typeck.c (convert_for_assignment): Likewise.
11919 * search.c (expand_upcast_vtables): In addition to unsetting
11920 TREE_READONLY, remove top-level const type qualifier.
11922 1998-10-03 Mark Mitchell <mark@markmitchell.com>
11924 * class.c (current_class_ptr, current_class_ref): Clarify
11926 * cvt.c (ocp_convert): Don't expect fold to remove all trivial
11927 NOP type conversions.
11928 * decl.c (decls_match): Use comptypes directly; ignore
11929 qualifiers on the DECL.
11930 (duplicate_decls): Remove qualifier checks on DECL.
11931 (grokdeclarator): Make the type built up include top-level
11933 * decl2.c (do_dtors): Fix spelling error.
11934 * error.c (dump_simple_decl): Don't look at qualifiers on the decl
11935 when printing type information.
11936 * init.c (build_new_1): Add documentation. Deal with the fact
11937 that type of allocated memory now contains qualifiers.
11938 * lex.c (is_global): Improve error-recovery.
11939 * sig.c (build_member_function_pointer): Don't cast away const
11940 on fields of sigtable_entry_type.
11941 * tree.c (lvalue_type): Don't look at top-level qualifiers on
11943 * typeck.c (decay_conversion): Likewise.
11944 (build_component_ref): Make sure the type of the COMPONENT_REF
11945 contains top-level qualifiers, as appropriate. Improve
11947 (build_indirect_ref): Simplify. Don't strip top-level qualifiers.
11948 (build_array_ref): Likewise.
11949 (build_unary_op): Improve error-recovery.
11950 (unary_complex_lvalue): Make taking the address a bound member
11951 function an error, not a sorry.
11952 (build_conditional_expr): Look at the type qualifiers, not the
11953 qualifiers on the expression itself.
11955 1998-10-03 Jason Merrill <jason@yorick.cygnus.com>
11957 * decl2.c (merge_functions): Remove duplicates.
11959 * decl2.c: Add -f{no-,}implicit-inline-templates.
11960 (import_export_decl): Check it.
11962 * decl.c (lookup_name_real): Template parms also take precedence
11963 over implicit typename. Only warn if yylex.
11965 * typeck.c (build_conditional_expr): Only fold if ifexp is an
11968 * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
11969 instead of linkage.
11971 1998-10-01 Jason Merrill <jason@yorick.cygnus.com>
11973 * cp-tree.h (FORMAT_VBASE_NAME): New macro.
11974 * class.c (build_vbase_pointer): Use it.
11975 * rtti.c (expand_class_desc): Likewise.
11976 * tree.c (build_vbase_pointer_fields): Likewise.
11978 Thu Oct 1 10:43:45 1998 Nick Clifton <nickc@cygnus.com>
11980 * decl.c (start_decl): Add invocation of
11981 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11982 (start_function): Add invocation of
11983 SET_DEFAULT_DECL_ATTRIBUTES, if defined.
11985 * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
11986 HANDLE_GENERIC_PRAGMAS.
11988 1998-09-28 Anthony Green <green@cygnus.com>
11990 * semantics.c (finish_asm_stmt): Always permit volatile asms.
11992 1998-09-28 Mark Mitchell <mark@markmitchell.com>
11994 * decl.c (grokdeclarator): Tighten checks for invalid
11995 destructors. Improve error-messages and error-recovery.
11996 * decl2.c (check_classfn): Don't assume that mangled destructor
11997 names contain type information.
11999 1998-09-25 Jason Merrill <jason@yorick.cygnus.com>
12001 * search.c (get_base_distance): Remove assert.
12003 * decl2.c (build_anon_union_vars): Don't process a field with no
12005 (finish_anon_union): Also complain about local anon unions with no
12008 1998-09-25 Martin von Löwis <loewis@informatik.hu-berlin.de>
12010 * decl.c (lookup_namespace_name): If the name is a namespace,
12011 return it immediately.
12013 Fri Sep 25 11:45:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12015 * cp-tree.h (define_case_label): Remove unused parameter.
12016 (check_java_method): Likewise.
12017 (grokclassfn): Likewise.
12018 (expand_aggr_init): Likewise.
12019 (build_x_delete): Likewise.
12020 (maybe_end_member_template_processing): Likewise.
12021 (unshare_base_binfos): Add prototype.
12022 (string_conv_p): Likewise.
12023 (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
12025 * cvt.c (build_up_reference): Remove unused parameter
12026 `checkconst', all callers changed.
12027 (build_type_conversion): Mark parameter `code' with
12029 (build_expr_type_conversion): Initialize variable `conv'.
12031 * decl.c (push_namespace): Initialize variable `d'.
12032 (define_case_label): Remove unused parameter `decl', all callers
12035 * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
12036 `argc' with ATTRIBUTE_UNUSED.
12037 (grokclassfn): Remove unused parameter `cname', all callers
12039 (check_java_method): Likewise for parameter `ctype'.
12040 (copy_assignment_arg_p): Mark parameter `virtualp' with
12042 (finish_prevtable_vardecl): Likewise for parameter `prev'.
12044 * expr.c (extract_init): Likewise for parameters `decl' and `init'.
12046 * init.c (expand_aggr_init_1): Remove unused parameter
12047 `alias_this', all callers changed.
12048 (expand_aggr_init): Likewise.
12049 (expand_default_init): Likewise.
12050 (build_new_1): Initialize variable `susp'.
12051 (build_x_delete): Remove unused parameter `type', all callers
12054 * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
12056 (readescape): Use (unsigned) value in shift.
12057 (real_yylex): Likewise. Likewise. Also cast `sizeof' to int when
12058 comparing to a signed quantity.
12060 * pt.c (maybe_end_member_template_processing): Remove unused
12061 parameter `decl', all callers changed.
12062 (check_explicit_specialization): Add braces around empty body in
12064 (current_template_args): Initialize variable `args'.
12065 (lookup_template_class): Likewise for variable `prev_local_enum'.
12066 (tsubst_decl): Likewise for variable `r'.
12067 (set_mangled_name_for_template_decl): Initialize variable
12070 * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
12071 Likewise for variable `i'.
12072 (yylex): Initialize variable `trrr'.
12074 * typeck.c (compparms): Mark variable `strict' with
12077 * xref.c (simplify_type): Cast argument of ctype function to
12080 1998-09-24 Mark Mitchell <mark@markmitchell.com>
12082 * cp-tree.h (language_lvalue_valid): Remove.
12083 * decl.c (grokdeclarator): Don't disallow references to functions.
12084 * tree.c (lvalue_p_1): New function, combining duplicated
12086 (lvalue_p): Use it.
12087 (real_lvalue_p): Likewise.
12088 * typeck.c (language_lvalue_valid): Remove.
12089 (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
12090 they don't have TREE_READONLY set.
12091 * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
12093 1998-09-24 Benjamin Kosnik <bkoz@loony.cygnus.com>
12095 * spew.c (yylex): Give diagnostic.
12096 * hash.h (is_reserved_word): Add export.
12097 * gxx.gperf: Likewise.
12098 * lex.h (rid): Add RID_EXPORT.
12099 * lex.c (init_parse): Likewise.
12101 Tue Sep 22 21:01:19 1998 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
12103 * friend.c (do_friend): Make warning a full sentence.
12105 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12107 * parse.y (component_decl_list): Improve error-recovery.
12109 1998-09-22 Benjamin Kosnik <bkoz@loony.cygnus.com>
12111 * decl.c (make_typename_type): Move error to point where name
12112 variable can be used by dump_type.
12114 1998-09-22 Mark Mitchell <mark@markmitchell.com>
12116 * decl.c (grokfndecl): Improve error-recovery.
12117 * decl2.c (grokfield): Likewise.
12118 * pt.c (finish_member_template_decl): Likewise.
12120 1998-09-20 Martin von Löwis <loewis@informatik.hu-berlin.de>
12122 * method.c (hack_identifier): Finding multiple members is always
12125 1998-09-21 Per Bothner <bothner@cygnus.com>
12127 * Make-lang.in (c++-filt): Link libiberty.a after cxxmain.o.
12129 Mon Sep 21 01:53:05 1998 Felix Lee <flee@cygnus.com>
12131 * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
12133 1998-09-20 Mark Mitchell <mark@markmitchell.com>
12135 * class.c (maybe_warn_about_overly_private_class): Reformat.
12137 1998-09-17 Andrew MacLeod <amacleod@cygnus.com>
12139 * exception.cc (__cplus_type_matcher): Realign some code.
12141 1998-09-16 Mark Mitchell <mark@markmitchell.com>
12143 * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
12144 (tinfo2.o): Likewise.
12145 (exception.o): Likewise.
12147 (opnew.o): Likewise.
12148 (opnewnt.o): Likewise.
12149 (opvnew.o): Likewise.
12150 (opvnewnt.o): Likewise.
12151 (opdel.o): Likewise.
12152 (opdelnt.o): Likewise.
12153 (opvdel.o): Likewise.
12154 (opvdelnt.o): Likewise.
12156 1998-09-16 Richard Henderson <rth@cygnus.com>
12158 * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
12160 1998-09-15 Alexandre Oliva <oliva@dcc.unicamp.br>
12162 * call.c (build_field_call): Handle static data members too.
12164 * typeck.c (comptypes): When comparing pointer types, check
12165 whether referred types match even in strictest modes.
12167 1998-09-15 Mark Mitchell <mark@markmitchell.com>
12169 * cp-tree.h: Revert previous change.
12170 (finish_struct_methods): Remove declaration.
12171 * class.c: Revert previous change.
12172 (maybe_warn_about_overly_private_class): New function.
12173 (finish_struct_methods): Declare here, and make static. Remove
12174 unnecessary parameters. Tidy slightly. Use
12175 maybe_warn_about_overly_private_class.
12176 (finish_struct_1): Adjust. Remove check for private constructors,
12177 now done elsewhere.
12178 (finish_struct): Adjust.
12180 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12182 * except.c (expand_start_catch_block): No need to check for new
12184 (process_start_catch_block_old): Deleted.
12185 (process_start_catch_block): Add call to start_decl_1().
12186 (expand_end_catch_block): Add call to end_catch_handler().
12187 * exception.cc (__cplus_type_matcher): Only check the exception
12188 language if there is an exception table.
12190 1998-09-15 Andrew MacLeod <amacleod@cygnus.com>
12192 * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
12193 as used to prevent conflicts with virtual function tables.
12195 1998-09-14 Mark Mitchell <mark@markmitchell.com>
12197 * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
12198 (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
12199 * class.c (maybe_class_too_private_p): New function.
12200 (finish_struct_methods): Use it.
12201 (finish_struct_1): Likewise.
12202 (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
12205 * pt.c (check_specialization_scope): Fix spelling error.
12206 (check_explicit_specialization): Remove code to handle explicit
12207 specializations in class scope; they are now correctly diagnosed
12210 1998-09-10 Mark Mitchell <mark@markmitchell.com>
12212 * decl.c (pushdecl): Don't copy types if the
12213 DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
12216 1998-09-09 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
12218 * class.c (get_enclosing_class): New function.
12219 (is_base_of_enclosing_class): Likewise.
12220 * cp-tree.h (get_enclosing_class): Declare.
12221 (is_base_of_enclosing_class): Likewise.
12222 * pt.c (coerce_template_parms): Use them.
12224 1998-09-09 Jason Merrill <jason@yorick.cygnus.com>
12226 * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
12227 null to decide whether to use it.
12229 * error.c (dump_type_real): Handle NAMESPACE_DECL.
12230 * parse.y (base_class.1): Avoid crash on error.
12232 1998-09-08 Martin von Löwis <loewis@informatik.hu-berlin.de>
12234 * decl.c (make_typename_type): If context is a namespace, the code
12237 1998-09-08 Mumit Khan <khan@xraylith.wisc.edu>
12239 * parse.y (nomods_initdcl0): Set up the parser stack correctly.
12241 1998-09-08 Mark Mitchell <mark@markmitchell.com>
12243 * cp-tree.h (anonymous_namespace_name): Declare.
12244 * decl.c: Define it.
12245 (push_namespace): Use anonymous_namespace_name, rather than local
12247 * error.c (dump_decl): If a namespace is named
12248 anonymous_namespace_name, call it {anonymous}.
12250 * decl.c (grokparms): Distinguish between references and pointers
12253 1998-09-08 Richard Henderson <rth@cygnus.com>
12254 Mark Mitchell <mark@markmitchell.com>
12256 * pt.c (process_partial_specialization): Consistently allocate
12257 and zero tpd.parms based on ntparms. Use tpd2.parms, not
12258 tpd.parms, where appropriate.
12260 Sun Sep 6 00:00:51 1998 Jeffrey A Law (law@cygnus.com)
12262 * Makefile.in (INCLUDES): Update after recent toplevel gcc
12265 1998-09-05 Mark Mitchell <mark@markmitchell.com>
12267 * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
12268 * class.c (finish_struct): Remove hackery to deal with explicit
12269 specializations in class scope.
12270 * decl.c (grokfndecl): Improve error-recovery.
12271 * decl2.c (grokfield): Likewise.
12272 * pt.c (check_specialization_scope): New function.
12273 (begin_specialization): Call it.
12274 (process_partial_specialization): New function, split out from
12275 push_template_decl. Check partial specializations more
12277 (push_template_decl): Call it.
12278 (check_explicit_specialization): Don't attempt to handle explicit
12279 specializations in class scope.
12280 (template_parm_data): Document. Add current_arg and
12281 arg_uses_template_parms.
12282 (mark_template_parm): Set it.
12283 (tsubst_arg_types): Remove unused variable.
12284 * semantics.c (begin_class_definition): Tweak.
12286 1998-09-04 Mark Mitchell <mark@markmitchell.com>
12288 * inc/typeinfo (type_info::type_info(const char*)): Make
12291 * cp-tree.h (hash_tree_cons_simple): New macro.
12292 * pt.c (tsubst_arg_types): New function. Use hash_tree_cons.
12293 (coerce_template_parms): Use make_temp_vec, instead of
12294 make_tree_vec. Document this behavior.
12295 (lookup_template_class): Likewise.
12296 (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
12297 Remove dead code (and add assertion to check its deadness). Fix
12298 bug w.r.t. exception specifications.
12300 1998-09-03 Jason Merrill <jason@yorick.cygnus.com>
12302 * decl2.c (import_export_vtable): Always make artificials comdat.
12303 (import_export_decl): Likewise.
12304 * pt.c (mark_decl_instantiated): Likewise.
12306 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12308 * cp-tree.h (finish_globally_qualified_member_call_expr):
12310 (finish_qualified_call_expr).
12311 * semantics.c: Likewise.
12312 * parse.y (primary): Use it.
12313 * method.c (hack_identifier): Remove redundant code.
12315 * init.c (resolve_offset_ref): Call convert_from_reference to
12316 handle members of reference type. Improve error recovery.
12318 1998-09-03 Benjamin Kosnik <bkoz@cygnus.com>
12320 * cp-tree.h: Declare warn_nontemplate_friend.
12321 * decl2.c (lang_decode_option): Set.
12322 * lang-options.h: Add -Wnon-template-friend.
12323 * friend.c (do_friend): Use to toggle non-template function warning.
12325 1998-09-03 Mark Mitchell <mark@markmitchell.com>
12327 * decl.c (finish_enum): Don't resolve CONST_DECLs to their
12328 corresponding INTEGER_CSTs when processing_template_decl.
12329 * pt.c (tsubst_enum): Tweak accordingly.
12331 1998-09-03 Benjamin Kosnik <bkoz@rhino.cygnus.com>
12333 * decl.c (pushdecl_class_level): Add warning here.
12336 1998-09-02 Jason Merrill <jason@yorick.cygnus.com>
12338 * cvt.c (convert_pointer_to_real): Tidy.
12339 * search.c (get_base_distance_recursive): Simplify.
12340 (get_base_distance): Likewise.
12342 * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
12345 Wed Sep 02 09:25:29 1998 Nick Clifton <nickc@cygnus.com>
12347 * lex.c (check_newline): Call HANDLE_PRAGMA before
12348 HANDLE_SYSV_PRAGMA if both are defined. Generate warning messages
12349 if unknown pragmas are encountered.
12350 (handle_sysv_pragma): Interpret return code from
12351 handle_pragma_token (). Return success/failure indication rather
12352 than next unprocessed character.
12353 (pragma_getc): New function: retrieves characters from the
12354 input stream. Defined when HANDLE_PRAGMA is defined.
12355 (pragma_ungetc): New function: replaces characters back into the
12356 input stream. Defined when HANDLE_PRAGMA is defined.
12358 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12360 * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
12361 * class.c (build_vtable_entry_ref): Likewise.
12363 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12365 * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
12366 * decl2.c (import_export_decl): Likewise.
12367 * pt.c (instantiate_decl): Use it.
12369 1998-09-01 Jason Merrill <jason@yorick.cygnus.com>
12371 * decl.c (lookup_name_real): Also do implicit typename thing for
12372 artificial TYPE_DECLs.
12373 * search.c (lookup_field): Likewise.
12374 (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
12375 * semantics.c (begin_constructor_declarator): Use enter_scope_of.
12376 (enter_scope_of): Extract type from implicit typename.
12377 (begin_class_definition): Likewise.
12378 * lex.c (identifier_type): Handle implicit typename when checking
12381 * cp-tree.h: Declare flag_strict_prototype.
12382 * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
12383 -fstrict-prototype.
12384 * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
12385 specified, set it to the value of pedantic.
12387 1998-09-01 Mark Mitchell <mark@markmitchell.com>
12389 * decl2.c (arg_assoc): Handle template-id expressions as arguments.
12391 1998-08-31 Mark Mitchell <mark@markmitchell.com>
12393 * decl.c (finish_enum): Handle member enums of classes declared in
12394 template functions.
12396 * decl2.c (grok_x_components): Strip attributes before calling
12399 1998-08-31 Jason Merrill <jason@yorick.cygnus.com>
12401 * cp-tree.h, decl2.c: Remove support for -fall-virtual,
12402 -fenum-int-equivalence and -fno-nonnull-objects.
12403 * class.c (check_for_override): Remove support for -fall-virtual.
12404 (finish_struct_1): Likewise.
12405 * call.c (build_new_op): Remove support for -fenum-int-equivalence.
12406 * typeck.c (build_binary_op_nodefault): Likewise.
12407 * cvt.c (ocp_convert): Likewise.
12408 * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
12409 * class.c (build_vbase_path): Likewise.
12411 Sun Aug 30 22:16:31 1998 H.J. Lu (hjl@gnu.org)
12413 * Makefile.in (INTERFACE): New, set to 1.
12415 1998-08-30 Mark Mitchell <mark@markmitchell.com>
12417 * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
12418 comparing with global_namespace.
12419 (dump_aggr_type): Likewise.
12421 * decl.c (grokfndecl): Issue error on declaration of friend
12422 templates with explicit template arguments.
12424 * pt.c (convert_template_argument): New function, split out
12426 (coerce_template_parms): Here.
12427 (tsubst): Attempt better error-recovery.
12429 1998-08-28 Benjamin Kosnik <bkoz@loony.cygnus.com>
12431 * pt.c (decl_template_parm_p): Add checks for
12432 TEMPLATE_TEMPLATE_PARM.
12434 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12436 * lex.c (do_identifier): Fix thinko in previous change.
12438 1998-08-28 Jason Merrill <jason@yorick.cygnus.com>
12440 * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
12441 * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
12443 1998-08-28 Richard Henderson <rth@cygnus.com>
12445 Add support for discarding unused virtual functions.
12446 * lang-options.h: Add -fvtable-gc.
12447 * cp-tree.h: Add flag_vtable_gc.
12448 * decl2.c (output_vtable_inherit): New fn.
12449 (finish_vtable_vardecl): Call it.
12450 * class.c (build_vtable_entry_ref): New fn.
12451 (build_vtbl_ref): Call it.
12453 1998-08-28 Mark Mitchell <mark@markmitchell.com>
12455 * cp-tree.h (build_enumerator): Take the enumeration type as a
12457 * decl.c (finish_enum): Don't set the TREE_TYPE for the
12458 enumeration constant values if we're processing_template_decls.
12459 Don't set the type for the CONST_DECLs either; that's done in
12461 (build_enumerator): Take the enumeration type as a
12463 * lex.c (do_identifier): Don't resolve enumeration constants while
12464 processing template declarations, even if they happen to be
12465 TEMPLATE_PARM_INDEXs.
12467 * parse.y (current_enum_type): New variable.
12468 (primary): Don't allow statement-expression in local classes just
12469 as we don't in global classes.
12470 (structsp): Use current_enum_type.
12471 (enum_list): Likewise.
12472 * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
12473 finish_enum; they no longer occur.
12475 * cp-tree.h (finish_base_specifier): New function.
12476 * parse.y (base_class): Use it.
12477 * semantics.c (finish_base_specifier): Define it.
12479 * parse.y (structsp): Warn on use of typename outside of template
12482 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
12484 * lex.c (handle_cp_pragma): Remove #pragma vtable.
12485 * lang-options.h: Remove +e options.
12486 * decl2.c (lang_decode_option): Likewise.
12487 (import_export_vtable): Don't check write_virtuals.
12488 (finish_vtable_vardecl, finish_file): Likewise.
12489 * search.c (dfs_debug_mark): Likewise.
12490 * semantics.c (begin_class_definition): Likewise.
12491 * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
12493 * call.c (build_over_call): Check flag_elide_constructors.
12494 * decl2.c: flag_elide_constructors defaults to 1.
12495 * typeck.c (convert_arguments): Remove return_loc parm.
12496 (build_function_call_real): Adjust.
12498 * search.c: Tear out all mi_matrix and memoize code.
12499 (lookup_field, lookup_fnfields): Use scratch_tree_cons.
12500 * lang-options.h: Remove documentation for -fhandle-exceptions,
12501 -fmemoize-lookups and -fsave-memoized.
12502 * cp-tree.h: Lose mi_matrix and memoize support.
12503 * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
12504 * class.c: Lose struct class_level.
12505 (pushclass, popclass): Lose memoize support.
12506 * init.c (build_offset_ref): Likewise.
12508 Never change BINFO_INHERITANCE_CHAIN.
12509 * init.c (emit_base_init): Change modification of
12510 BINFO_INHERITANCE_CHAIN to an assert.
12511 * search.c (get_base_distance_recursive): Likewise.
12512 (get_base_distance): Likewise.
12513 (lookup_member): Likewise.
12514 (convert_pointer_to_single_level): Likewise.
12515 (lookup_field): Likewise. Lose setting TREE_VIA_* on TREE_LISTs.
12516 (lookup_fnfields): Likewise.
12517 * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
12518 (unshare_base_binfos): Don't call propagate_binfo_offsets.
12519 (layout_basetypes): Call propagate_binfo_offsets instead of
12520 unshare_base_binfos.
12521 * decl.c (xref_basetypes): Call unshare_base_binfos.
12522 * pt.c (instantiate_class_template): Likewise.
12523 * tree.c (reverse_path): Remove 'copy' parm; always make a
12525 * class.c (build_vbase_path): Just call it.
12526 * search.c (compute_access): Likewise. Don't re-reverse.
12528 1998-08-27 Mark Mitchell <mark@markmitchell.com>
12530 * class.c (build_vbase_path): Use reverse_path.
12531 (finish_base_struct): Move warnings for inaccessible bases to
12533 (modify_one_vtable): Remove check of TREE_USED (binfo).
12534 (fixup_vtable_deltas1): Likewise.
12535 * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
12536 (xref_tag): Remove binfos parameter.
12537 (make_binfo): Remove chain parameter.
12538 (reverse_path): Add copy parameter.
12539 * decl.c (init_decl_processing): Change calls to xref_tag.
12540 (xref_tag): Remove binfos parameter.
12541 (xref_basetypes): Change calls to make_binfo.
12542 * decl2.c (grok_x_components): Change calls to xref_tag.
12543 (handle_class_head): Likewise.
12544 * friend.c (do_friend): Likewise.
12545 * lex.c (make_lang_type): Change calls to make_binfo.
12546 * parse.y (structsp): Change calls to xref_tag.
12547 (named_complex_class_head_sans_basetype): Likewise.
12548 (named_class_head): Likewise.
12549 * rtti.c (init_rtti_processing): Likewise.
12550 * search.c (compute_access): Change calls to reverse_path.
12551 (dfs_get_vbase_types): Change calls to make_binfo.
12552 (get_vbase_types): Remove dead code.
12553 * tree.c (unshare_base_binfos): Change calls to make_binfo.
12554 (layout_basetypes): Warn here about inaccessible bases.
12555 (make_binfo): Remove chain parameter.
12556 (reverse_path): Add copy parameter.
12558 1998-08-27 Jason Merrill <jason@yorick.cygnus.com>
12560 * class.c: #if 0 complete_type_p.
12561 * init.c (build_java_class_ref, build_new_1): Remove unused locals.
12562 * method.c (process_overload_item): Likewise.
12563 * typeck.c (comp_target_types): Likewise.
12565 Stop sharing binfos for indirect virtual bases.
12566 * tree.c (propagate_binfo_offsets): Unshare vbases, too.
12567 (layout_basetypes): Likewise.
12568 (unshare_base_binfos): Copy vbases, too.
12569 * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
12570 BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
12571 (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
12572 CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
12573 * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
12574 reference to BINFO_VIA_PUBLIC.
12575 (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
12576 (push_class_decls): Use them.
12577 (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
12578 (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
12580 1998-08-27 Mark Mitchell <mark@markmitchell.com>
12582 * decl.c (build_enumerator): Set DECL_CONTEXT for the
12585 1998-08-26 Mark Mitchell <mark@markmitchell.com>
12587 * cp-tree.h (finish_enum): Change prototype.
12588 * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
12589 VALUES parameter. Don't try to compute mins/maxs if
12590 processing_template_decl.
12591 * parse.y (structsp): Use new calling sequence for finish_enum.
12592 * pt.c (tsubst_enum): Likewise. Take the new type as input.
12593 (lookup_template_class): Remove unused variables. Tweak.
12594 Register enums on instantiation list before substituting
12595 enumeration constants.
12596 (tsubst_decl): Remove unused variables.
12597 (regenerate_decl_from_template): Likewise.
12599 * decl.c (duplicate_decls): Don't obliterate the
12600 DECL_TEMPLATE_INFO for a template if we're not replacing it with
12603 * lex.c (do_identifier): Fix typo in comment.
12605 Wed Aug 26 10:54:51 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12607 * errfn.c: Remove stdarg.h/varargs.h.
12608 * tree.c: Likewise.
12610 1998-08-25 Brendan Kehoe <brendan@cygnus.com>
12612 * pt.c (tsubst_copy): Only do typename overloading on an
12613 IDENTIFIER_NODE that happens to look like a typename if it actually
12614 has a type for us to use.
12616 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
12618 * typeck.c (comp_cv_target_types): Split out...
12619 (comp_target_types): From here. Don't allow cv-qual changes under
12620 a pointer if nptrs == 0. Fix OFFSET_TYPE handling.
12621 (build_ptrmemfunc): Pass 1 to nptrs.
12622 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
12624 1998-08-25 Mark Mitchell <mark@markmitchell.com>
12626 * search.c (dependent_base_p): Don't compare a binfo to
12627 current_class_type; use the TREE_TYPE of the binfo instead.
12629 * cp-tree.h (CLASS_TYPE_P): Revise definition.
12631 1998-08-25 Jason Merrill <jason@yorick.cygnus.com>
12633 * decl.c (duplicate_decls): Don't complain about different
12634 exceptions from an internal decl even if pedantic.
12636 * typeck.c (convert_for_assignment): Converting from pm of vbase
12637 to derived is an error, not a sorry.
12639 * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
12640 * class.c (fixed_type_or_null): Rename from
12641 resolves_to_fixed_type_p. Return the dynamic type of the
12642 expression, if fixed, or null.
12643 (resolves_to_fixed_type_p): Use it. Return 0 if the dynamic type
12644 does not match the static type.
12645 (build_vbase_path): Rename 'alias_this' to 'nonnull'. Use
12646 resolves_to_fixed_type_p again.
12648 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12650 * pt.c (tsubst_decl): Move special case code for dealing with
12651 tricky friend templates here from ...
12652 (regenerate_decl_from_template): Here.
12654 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12656 * decl.c (start_decl): Remove redundant linkage check.
12658 1998-08-24 Gavin Romig-Koch <gavin@cygnus.com>
12660 * typeck.c (c_expand_return): Handle the case that valtype
12661 is wider than the functions return type.
12663 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12665 * cp-tree.h (CLASS_TYPE_P): New macro.
12666 * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
12667 * pt.c (process_template_parm): Undo previous change.
12669 1998-08-24 Benjamin Kosnik <bkoz@cygnus.com>
12671 * cp-tree.h: Declare.
12672 * pt.c (decl_template_parm_p): New function.
12673 * decl.c (pushdecl): Check decls for redeclaring template parms.
12674 (xref_tag): Make redeclaration an error, print decl.
12675 * decl2.c (grokfield): Check field_decls for redeclaration as well.
12677 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12679 * parse.y (primary): Fix up the type of string constants.
12681 1998-08-24 Mark Mitchell <mark@markmitchell.com>
12683 * typeck.c (convert_for_initialization): Move check for odd uses
12684 of NULL to avoid duplicate warnings.
12686 1998-08-24 Jason Merrill <jason@yorick.cygnus.com>
12688 * tree.c (lvalue_type): Fix for arrays.
12689 * typeck.c (string_conv_p): New fn.
12690 (convert_for_assignment): Use it.
12691 (build_unary_op): Use lvalue_type.
12692 * call.c (standard_conversion, convert_like): Use string_conv_p.
12693 (add_function_candidate): Use lvalue_type.
12694 * cvt.c (convert_to_reference): Likewise.
12695 * decl2.c (lang_decode_option): Ignore -traditional.
12696 * decl.c (init_decl_processing): flag_writable_strings inhibits
12697 flag_const_strings.
12699 1998-08-24 Andrew MacLeod <amacleod@cygnus.com>
12701 * lang-options.h (lang_options): Add fconst-strings to the list
12703 * decl2.c (lang_f_options, lang_decode_option): Likewise.
12705 1998-08-24 Nathan Sidwell <nathan@acm.org>
12707 * lex.c (real_yylex): Don't warn about long long constants if
12708 we're allowing long long.
12710 1998-08-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
12712 * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
12713 accessing bindings directly.
12715 * search.c (my_tree_cons): Reimplement.
12717 * lang-specs.h: Remove __HONOR_STD.
12718 * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
12720 1998-08-23 Mark Mitchell <mark@markmitchell.com>
12722 * decl.c (grokdeclarator): Complain about in-class initialization
12723 of aggregates and/or references.
12724 * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
12725 TEMPLATE_TYPE_PARMs.
12727 * decl2.c (grok_array_decl): Add comment.
12728 (mark_used): Don't instantiate an explicit instantiation.
12729 * friend.c (make_friend_class): Remove bogus comment. Fix check
12730 for partial specializations.
12731 * pt.c (check_explicit_specialization): Don't
12732 SET_DECL_EXPLICIT_INSTANTIATION here.
12733 (mark_decl_instantiated): Or here.
12734 (do_decl_instantiation): Do it here, instead. Add checks for
12735 duplicate explicit instantiations, etc. Tidy.
12736 (do_type_instantiation): Likewise.
12737 (instantiate_decl): Improve comments. Complain about explicit
12738 instantiations where no definition is available.
12740 * cp-tree.h (ansi_null_node): Remove.
12741 * call.c (build_over_call): Warn about converting NULL to an
12743 * cvt.c (build_expr_type_conversion): Likewise. Use
12744 null_ptr_cst_p instead of expanding it inline.
12745 * decl.c (ansi_null_node): Remove.
12746 (init_decl_processing): Make null_node always have integral type.
12747 * except.c (build_throw): Warn about converting NULL to an
12749 * lex.c (init_parse): Remove handling of ansi_null_node.
12750 * pt.c (type_unification_real): Don't convert NULL to void* type.
12751 * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
12752 (convert_for_assignment): Warn about converting NULL to an
12754 (convert_for_initialization): Likewise.
12756 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
12758 * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
12759 * pt.c (coerce_template_parms): Use no_linkage_check.
12760 * decl.c (grokvardecl): Likewise.
12761 (grokfndecl): Likewise. Members of anonymous types have no linkage.
12763 * method.c (process_overload_item): Remove useless code.
12765 1998-08-20 Per Bothner <bothner@cygnus.com>
12767 Handle new'ing of Java classes.
12768 * init.c (build_class_classref): New function.
12769 (build_new_1): If type is TYPE_FOR_JAVA: Call _Jv_AllocObject;
12770 constructor does not return this; don't need to exception-protect.
12772 * pt.c (lookup_template_class): Copy TYPE_FOR_JAVA flag.
12773 * decl2.c (acceptable_java_type): Handle template-derived types.
12775 1998-08-20 Per Bothner <bothner@cygnus.com>
12777 * decl2.c (import_export_vtable): Suppress vtables for Java classes.
12779 1998-08-20 Mark Mitchell <mark@markmitchell.com>
12781 * decl.c (duplicate_decls): Always merge the old and new patterns
12782 for templates, regardless of whether or not the new one has
12783 DECL_INITIAL. Don't throw away specializations. Merge
12785 * pt.c (tsubst_decl): Use the right pattern when calculating the
12786 complete args for a new template instance.
12787 (do_decl_instantiation): Fix typo in comment.
12788 (regenerate_decl_from_template): Deal with tricky friend template
12790 (instantiate_decl): Likewise.
12792 Thu Aug 20 09:09:45 1998 Jeffrey A Law (law@cygnus.com)
12794 * init.c (build_builtin_delete_call): Add missing assemble_external
12797 1998-08-20 Jason Merrill <jason@yorick.cygnus.com>
12799 * parse.y (notype_unqualified_id): Also accept ~A<int>.
12801 1998-08-19 Mark Mitchell <mark@markmitchell.com>
12803 * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
12805 * except.c (build_throw): Warn when NULL is thrown, even with
12806 -ansi. Use ansi_null_node, rather than integer_zero_node, in the
12809 * cp-tree.h (ansi_null_node): New variable.
12810 * decl.c (ansi_null_node): New variable.
12811 (init_decl_processing): Initialize its type.
12812 * lex.c (init_parse): Initialize its value. Use ansi_null_node
12813 for null_node in non-ANSI mode.
12814 * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
12815 place of null_node to avoid spurious errors.
12817 1998-08-17 Mark Mitchell <mark@markmitchell.com>
12819 * cp-tree.h (enter_scope_of): New function.
12820 * parse.y (complex_direct_notype_declarator): Use it.
12821 * semantics.c (enter_scope_of): New function.
12823 1998-08-17 Jason Merrill <jason@yorick.cygnus.com>
12825 * decl.c (grokparms): No, here.
12827 * decl.c (grokdeclarator): Catch parm with pointer to array of
12828 unknown bound here...
12829 * method.c (process_overload_item): ...not here.
12831 * gxxint.texi: Remove obsolete documentation of overloading code.
12833 * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
12834 * class.c (finish_struct_bits): Likewise.
12836 * tree.c (lvalue_type): Fix for arrays.
12837 * typeck.c (build_unary_op): Use lvalue_type.
12838 * call.c (add_function_candidate): Likewise.
12839 * cvt.c (convert_to_reference): Likewise.
12841 * decl2.c (lang_decode_option): Ignore -traditional.
12843 * init.c (build_offset_ref): Don't mess with error_mark_node.
12844 * lex.c (do_scoped_id): Use cp_error.
12846 * rtti.c (get_tinfo_fn): Don't mess with the context for now.
12848 1998-08-17 Benjamin Kosnik <bkoz@loony.cygnus.com>
12850 * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
12852 Mon Aug 17 10:40:18 1998 Jeffrey A Law (law@cygnus.com)
12854 * cp-tree.h (set_identifier_local_value): Provide prototype.
12856 * decl2.c (do_namespace_alias): Remove unused variables `binding'
12859 Fri Aug 14 16:42:27 1998 Nick Clifton <nickc@cygnus.com>
12861 * Makefile.in: Rename BBISON to BISON so that it can be properly
12862 inherited from the parent makefile.
12864 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
12866 * lang-options.h: Add -finit-priority.
12867 * decl2.c: Likewise. Check flag_init_priority instead of
12870 * decl2.c (setup_initp): New fn.
12871 (start_objects, finish_objects, do_ctors): Handle init_priority.
12872 (do_dtors, finish_file): Likewise.
12874 1998-08-13 Jason Merrill <jason@yorick.cygnus.com>
12876 * pt.c (tsubst_copy): Hush warning.
12878 * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
12880 1998-08-12 Mark Mitchell <mark@markmitchell.com>
12882 * pt.c (print_template_context): Don't abort when instantiating a
12883 synthesized method.
12885 * decl.c (grokdeclarator): Issue errors on namespace qualified
12886 declarators in parameter lists or in class scope.
12888 1998-08-09 Mark Mitchell <mark@markmitchell.com>
12890 * pt.c (check_explicit_specialization): Don't abort on bogus
12891 explicit instantiations.
12893 1998-08-07 Mark Mitchell <mark@markmitchell.com>
12895 * typeck.c (require_complete_type): Use complete_type_or_else.
12896 (complete_type_or_else): Always return NULL_TREE on failure, as
12899 * pt.c (tsubst_aggr_type): Prototype.
12900 (tsubst_decl): New function, split out from tsubst. Set
12901 input_filename and lineno as appropriate.
12902 (pop_tinst_level): Restore the file and line number saved in
12904 (instantiate_class_template): Set input_filename and lineno as
12906 (tsubst): Move _DECL processing to tsubst_decl. Make sure the
12907 context for a TYPENAME_TYPE is complete.
12909 * decl2.c (grokbitfield): Issue errors on bitfields declared with
12911 (do_dtors): As in do_ctors, pretend to be a member of the same
12912 class as a static data member while generating a call to its
12915 * cvt.c (cp_convert_to_pointer): Handle NULL pointer
12916 conversions, even in complex virtual base class hierarchies.
12918 1998-08-06 Mark Mitchell <mark@markmitchell.com>
12920 * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
12921 (TYPE_TEMPLATE_INFO): Likewise.
12922 (SET_TYPE_TEMPLATE_INFO): Likewise.
12923 (ENUM_TI_TEMPLATE): Likewise.
12924 (ENUM_TI_ARGS): Likewise.
12925 (lookup_nested_type_by_name): Remove.
12926 * decl.c (maybe_process_template_type_declaration): Handle enums.
12927 (start_enum): Don't check for primary-template enum declarations
12929 (finish_enum): Clean up, document. Make sure template enum
12930 constants get the correct type.
12931 (build_enumerator): Copy initializers for template enumerations,
12933 (grok_enum_decls): Document.
12934 * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
12935 better. Build LOOKUP_EXPRs for local variables, even if they are
12937 * pt.c (tsubst_enum): Remove field_chain parameter.
12938 (template_class_depth): Include the depth of surrounding function
12940 (push_template_decl): Check for primary-template enum declarations
12941 here. Deal with enumeration templates.
12942 (lookup_template_class): Likewise.
12943 (for_each_template_parm): Likewise.
12944 (instantiate_class_template): Don't call tsubst_enum directly,
12945 call tsubst instead, to instantiate enums. Deal with all
12946 field_chain issues here, not in tsubst_enum.
12947 (lookup_nested_type_by_name): Remove.
12948 (tsubst_aggr_type): Revise handling of enumeration types.
12949 (tsubst): Likewise.
12950 (tsubst_copy): Likewise.
12951 (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
12953 1998-08-04 Mark Mitchell <mark@markmitchell.com>
12955 * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
12956 uses template parameters.
12957 * method.c (build_template_parm_names): Use the full set of
12958 template arguments for tsubst'ing.
12959 (build_overload_identifier): Pass the full set of template
12960 arguments to build_template_parm_names, not just the
12962 * pt.c (TMPL_ARGS_DEPTH): Define using
12963 TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
12964 (NUM_TMPL_ARGS): New macro.
12965 (add_outermost_template_args): Deal with the case where the outer
12966 args will be completely discarded.
12967 (coerce_template_parms): Use the full set of template arguments
12968 for tsubst'ing. Simplify. Add some asserts. Improve
12970 (lookup_template_class): Pass the full set of template arguments
12971 to coerce_template_parms.
12972 (tsubst): Add assertion.
12973 (do_type_instantiation): Don't instantiate member template
12976 * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
12977 name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
12979 1998-08-03 Jason Merrill <jason@yorick.cygnus.com>
12981 * method.c (set_mangled_name_for_decl): Change return type to void.
12983 * decl.c (lookup_name_real): A namespace-level decl takes priority
12984 over implicit typename. Avoid doing the same lookup twice.
12986 * search.c (dependent_base_p): New fn.
12987 (dfs_pushdecls, dfs_compress_decls): Use it.
12989 * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
12990 virtual functions if the type doesn't have any.
12992 1998-08-03 Mark Mitchell <mark@markmitchell.com>
12994 * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
12995 uses template parameters.
12997 1998-08-02 Mark Mitchell <mark@markmitchell.com>
12999 * cp-tree.def (LOOKUP_EXPR): Document. Remove second argument.
13000 * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
13001 * lex.c (do_identifier): Don't use a second argument, or a type,
13002 when building LOOKUP_EXPRs.
13003 (do_identifier): Likewise.
13004 (do_scoped_id): Likewise.
13005 * method.c (hack_identifier): Improve error message.
13006 * pt.c (lookup_template_function): Don't needlessly call
13007 copy_to_permanent or build_min.
13008 (tsubst_copy): Remove #if 0'd code. tsubst into LOOKUP_EXPRs if
13010 (do_decl_instantiation): Improve error message.
13011 * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
13012 (build_min): Copy the type to the permanent obstack, too.
13014 1998-08-01 Jason Merrill <jason@yorick.cygnus.com>
13016 * init.c (init_init_processing): Remove BI* handling.
13017 (build_builtin_call): Remove.
13018 (build_builtin_delete_call): New fn.
13019 (build_delete): Use it.
13021 1998-07-31 Mark Mitchell <mark@markmitchell.com>
13023 * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
13024 (maybe_check_template_type): New function.
13025 * decl.c (maybe_process_template_type_declaration): New function,
13026 split out from pushtag Call maybe_check_template_type.
13027 (pushtag): Use it. Use PROCESSING_REAL_TEMPLATE_DECL_P.
13028 (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13029 * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
13030 * pt.c (template_class_depth_real): Generalization of ...
13031 (template_class_depth): Use it.
13032 (register_specialization): Use duplicate_decls for duplicate
13033 declarations of specializations.
13034 (maybe_check_template_type): New function.
13035 (push_template_decl_real): Fix comment.
13036 (convert_nontype_argument): Likewise.
13037 (lookup_template_class): Likewise. Avoid an infinite loop on
13039 (tsubst_friend_function): Fix comment.
13040 (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
13041 an IDENTIFIER_NODE.
13042 * semantics.c (begin_function_definition): Use
13043 reset_specialization to note that template headers don't apply
13044 directly to declarations after the opening curly for a function.
13046 1998-07-29 Jason Merrill <jason@yorick.cygnus.com>
13048 * decl.c (push_overloaded_decl): Use current_namespace instead of
13049 DECL_CONTEXT (decl) to determine where we go.
13051 * decl.c (lookup_name_real): Fix typo.
13053 1998-07-28 Mark Mitchell <mark@markmitchell.com>
13055 * friend.c (is_friend): Be lenient with member functions to deal
13056 with nested friends.
13058 1998-07-28 Jason Merrill <jason@yorick.cygnus.com>
13060 * class.c (finish_struct_1): Convert integer_zero_node to
13061 ssizetype before passing it to set_rtti_entry.
13062 * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
13063 of any size to a pointer.
13065 1998-07-27 Mark Mitchell <mark@markmitchell.com>
13067 * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
13068 (build_template_decl_overload): Remove.
13069 (set_mangled_name_for_decl): New function.
13070 (innermost_args): Remove is_spec parameter.
13071 (most_specialized, most_specialized_class): Remove declarations.
13072 (lookup_template_class): Add entering_scope parameter.
13073 (maybe_process_partial_specialization): New function.
13074 (finish_template_decl): Likewise.
13075 (finish_template_type): Likewise.
13076 * class.c (finish_struct): Clean up processing of member template
13078 * decl.c (pushtag): Fix formatting.
13079 (lookup_tag): Improve handling of pseudo-global levels.
13080 (make_typename_type): Adjust call to lookup_template_class.
13081 (shadow_tag): Use maybe_process_partial_specialization.
13082 (xref_tag): Improve handling of member friends.
13083 (start_function): Call push_nested_class before
13084 push_template_decl. Don't call push_template_decl for
13086 * decl2.c (grok_x_components): Don't call xref_tag for
13087 template instantiations. Handle UNION_TYPEs like RECORD_TYPEs.
13088 (grokclassfn): Use set_mangled_name_for_decl.
13089 (arg_assoc_class): Adjust call to innermost_args.
13090 (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
13091 * error.c (dump_function_name): Improve printing of template
13093 * friend.c (is_friend): Don't compare types of decls to determine
13094 friendship, unless flag_guiding_decls.
13095 (make_friend_class): Partial specializations cannot be friends.
13096 (do_friend): Use set_mangled_name_for_decl. Call
13097 push_template_decl_real instead of push_template_decl.
13098 * method.c (build_decl_overload_real): Remove prototype. Give it
13100 (build_overload_identififer): Adjust call to innermost_args.
13101 (build_template_decl_overload): Remove.
13102 (set_mangled_name_for_decl): New function.
13103 * parse.y (.finish_template_type): New non-terminal.
13104 (template_def): Use finish_template_decl. Use template_extdef
13106 (template_extdef, template_datadef): New non-terminals, containing
13107 only those rules for things which can be templates.
13109 (template_type, self_template_type): Use .finish_template_type.
13110 (named_class_head): Use maybe_process_partial_specialization.
13111 * pt.c (mangle_class_name_for_template): Remove context parameter.
13112 (get_class_bindings): Remove outer_args parameter.
13113 (complete_template_args): Remove.
13114 (add_outermost_template_args): New function.
13115 (register_specialization): Return the specialization.
13116 (unregister_specialization): New function.
13117 (tsubst_template_parms): Likewise.
13118 (most_specialized, most_specialized_class): Prototype here as
13120 (original_template): Rename to most_general_template.
13121 (tsubst_template_parms): New function.
13122 (set_mangled_name_for_template_decl): Likewise.
13123 (TMPL_ARGS_DEPTH): New macro.
13124 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
13125 (TMPL_ARGS_LEVEL): New macro.
13126 (SET_TMPL_ARGS_LEVEL): Likewise.
13127 (TMPL_ARG): Likewise.
13128 (SET_TMPL_ARG): Likewise.
13129 (TMPL_ARGS_DEPTH): Likewise.
13130 (finish_member_template_decl): Use finish_template_decl.
13131 (maybe_process_partial_specialization): New function, split out
13133 (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
13134 (maybe_begin_member_template_processing): Use new macros.
13135 (is_member_template): Likewise.
13136 (is_member_template_class): Likewise.
13137 (add_to_template_args): Likewise. Deal with multiple levels of
13139 (maybe_process_partial_specialization): New function.
13140 (retrieve_specialization): Add consistency check.
13141 (determine_specialization): Return full argument list.
13142 (check_explicit_specialization): Tweak friend handling. Use full
13143 argument lists. Simplify.
13144 (current_template_args): Use new macros.
13145 (push_template_decl_real): Change ill-named mainargs to specargs.
13146 Check that a partial specialization actually specializes at least
13147 one parameter. Improve friend handling. Modify for full
13148 template arguments.
13149 (classtype_mangled_name): Don't mangle the names of
13151 (lookup_template_class): Add entering_scope parameter. Use it to
13152 avoid finding a template type when an instantiation is required.
13153 Simplify. Use full template arguments.
13154 (tsubst_friend_function): Use unregister_specialization. Use new
13155 macros. Use full template arguments.
13156 (tsubst_friend_class): Substitute, using tsubst_template_parms,
13157 into the template parameters before passing them to
13158 redeclare_class_template.
13159 (instantiate_class_template): Simplify. Use full template
13160 arguments. Adjust calls to get_class_bindings. Use
13161 SET_IDENTIFIER_TYPE_VALUE where needed. Improve friend handling.
13162 (innermost_args): Use new macros.
13163 (tsubst_aggr_type): New function, split out from tsubst.
13164 (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
13165 conventions for lookup_template_class. Refine handling of partial
13166 instantiations. Remove calls to complete_template_args.
13167 Simplify. Add consistency checks. Use set_mangled_name_for_decl
13168 and set_mangled_name_for_template_decl.
13169 (tsubst_copy): Use tsubst_aggr_type.
13170 (instantiate_template): Use full template arguments.
13171 (more_specialized): Improve formatting.
13172 (more_specialized_class): Adjust calls to get_class_bindings.
13173 (get_bindings_real): Don't call complete_template_args.
13174 (most_specialized): Don't overwrite input; create a new list.
13175 (most_specialized_class): Use most_general_template.
13176 (regenerate_decl_from_template): Use unregister_specialization.
13177 Use full template arguments.
13178 (instantiate_decl): Use full template arguments.
13179 (set_mangled_name_for_template_decl): New function.
13180 * semantics.c (begin_class_definition): Use
13181 maybe_process_partial_specialization.
13182 (finish_member_class_template): New function.
13183 (finish_template_decl): Likewise.
13184 (finish_template_type): Likewise.
13185 (typeck.c): Don't crash after issuing a compiler_error.
13186 * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
13188 1998-07-27 Jason Merrill <jason@yorick.cygnus.com>
13190 * typeck2.c (build_functional_cast): Handle default-initialization.
13192 * call.c (build_over_call): Pass 1 to popclass.
13194 * parse.y (direct_notype_declarator): Add precedence declaration
13195 to notype_unqualified_id case.
13196 * Makefile.in (EXPECT): Adjust.
13198 * tree.c (ovl_member): Fix for single function in OVL.
13200 1998-07-27 Dave Brolley <brolley@cygnus.com>
13202 * c-lex.c (yylex): Fix boundary conditions in character literal and
13203 string literal loops.
13205 1998-07-24 Jason Merrill <jason@yorick.cygnus.com>
13207 * decl.c (lookup_name_real): OK, do return the from_obj value
13208 unless got_object depends on template parms.
13210 * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
13212 * pt.c (coerce_template_parms): Also complain about local enums.
13214 * cp-tree.h: Add prototype for set_identifier_local_value.
13215 * decl.c (set_identifier_local_value_with_scope): Make static,
13217 * search.c (covariant_return_p): Likewise.
13218 * except.c (build_terminate_handler, alloc_eh_object): Likewise.
13220 * call.c (build_method_call): Only pull out the type of a destructor
13221 if it's a template type parm.
13222 * decl.c (lookup_name_real): Never return the from_obj value.
13224 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13226 * except.c (process_start_catch_block_old): Call start_decl_1 for
13228 * decl.c (start_decl_1): Avoid duplicate error.
13230 * init.c (expand_default_init): Only perform the initialization if
13231 it will do something.
13233 1998-07-23 H.J. Lu (hjl@gnu.org)
13235 * parse.y (base_class): Check for invalid base class.
13237 1998-07-23 Jason Merrill <jason@yorick.cygnus.com>
13239 * decl2.c (import_export_template): Fold in...
13240 (import_export_class): ...to here. Handle dllimport/export.
13242 * class.c (build_vtable): Pass at_eof to import_export_vtable.
13243 (prepare_fresh_vtable): Likewise.
13244 * decl2.c (import_export_class): Split out...
13245 (finish_prevtable_vardecl): From here.
13246 * class.c (finish_struct_1): Call import_export_class if at_eof.
13248 * decl.c (start_function): #if 0 mysterious code I wrote and have
13250 * rtti.c (get_tinfo_fn): If this is for a class type, set
13253 1998-07-22 Jason Merrill <jason@yorick.cygnus.com>
13255 * inc/exception: Change terminate and unexpected to ().
13257 * parse.y (named_class_head_sans_basetype_defn): A
13258 named_class_head_sans_basetype followed by '{' or ':' is a defn.
13260 1998-07-21 Jason Merrill <jason@yorick.cygnus.com>
13262 * tree.c (canonical_type_variant): New fn to handle arrays.
13263 * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
13264 * pt.c (unify, default case): Also fold arg. Fix array bounds case.
13265 * method.c (process_overload_item): Use build_overload_value for
13268 1998-07-20 Dave Brolley <brolley@cygnus.com>
13270 * lex.c (mbchar.h): #include it.
13271 (GET_ENVIRONMENT): New macro.
13272 (init_parse): Set character set based on LANG environment variable.
13273 (real_yylex): Handle multibyte characters in character literals.
13274 (real_yylex): Handle multibyte characters in string literals.
13276 1998-07-19 Jason Merrill <jason@yorick.cygnus.com>
13278 * lex.c (do_identifier): Look for class value even if we don't
13279 have a global value. Do implicit declaration if parsing is 2.
13280 * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
13283 1998-07-19 Mark Mitchell <mark@markmitchell.com>
13285 * decl.c (pushtag): Revert previous change.
13286 * pt.c (lookup_template_class): Don't put out debugging
13287 information for types that use template parameters.
13289 * decl.c (pushtag): Don't put out debugging information for
13290 compiler-generated typedefs.
13292 * error.c (dump_type_real): Don't crash when presented with
13293 intQI_type_node or the like.
13295 * semantics.c (finish_translation_unit): Fix spelling error in
13298 1998-07-17 Jason Merrill <jason@yorick.cygnus.com>
13300 * decl.c (lookup_name_real): Pull out single function here.
13301 (select_decl): Not here.
13302 (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
13304 * decl.c (qualify_lookup): Tweak again.
13306 * pt.c (lookup_template_class): Don't mess with the context of the
13308 * decl2.c (current_decl_namespace): Remove special handling for
13311 * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
13312 a member template specialization.
13314 * tree.c (ovl_member): Use decls_match to compare functions.
13315 * decl.c (decls_match): Check the context of a function.
13317 * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
13318 in Koenig lookup support rules.
13319 * semantics.c (finish_call_expr): Handle the new cases.
13321 * typeck.c (build_x_function_call): Handle overloaded methods.
13323 * decl.c (grokvardecl): Don't call build_static_name for extern "C".
13325 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13327 * semantics.c (finish_object_call_expr): Revert previous change.
13328 * call.c (build_new_method_call): Likewise. Instead, convert
13329 TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
13331 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13333 * decl.c (qualify_lookup): Handle templates.
13335 * decl2.c (do_using_directive): Don't pass ancestor.
13336 * decl.c (push_using_directive): Calculate ancestor.
13338 * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
13339 * decl.c (pushdecl): Move type shadowing handling from here...
13340 (duplicate_decls): ...to here.
13341 * decl.c (set_identifier_local_value_with_scope): New fn.
13342 (pushdecl): Use it.
13343 (set_identifier_local_value, lookup_type_current_level): New fns.
13344 * decl2.c (do_local_using_decl): Handle types and binding level
13347 * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
13348 * decl.c (select_decl): Extract a lone function from an OVERLOAD.
13349 (lookup_namespace_name): Likewise.
13350 * typeck.c (build_unary_op): Not here anymore.
13352 * decl2.c (do_class_using_decl): Make sure we get an identifier.
13353 * class.c (handle_using_decl): Ignore TYPE_DECLs.
13355 * decl.c (qualify_lookup): New fn.
13356 (lookup_name_real): Use it.
13358 1998-07-16 Martin v. Loewis <loewis@informatik.hu-berlin.de>
13360 * decl2.c (add_using_namespace): When directly using a namespace
13361 that was indirect before, promote it.
13363 * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
13364 LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
13365 LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
13366 * decl.c (select_decl): Replace two flag parameters by one.
13367 (unqualified_namespace_lookup): Likewise, pass flag.
13368 (lookup_flags): New function.
13369 (lookup_name_real): Compute flags, pass them.
13370 (lookup_namespace_name): Call with zero-flag.
13371 * decl2.c (ambiguous_decl): Add flag parameter, complain only
13372 according to flags.
13373 (lookup_using_namespace, qualified_lookup_using_namespace):
13374 Add flag parameter, pass them through.
13375 * lex.c (do_scoped_id): Call with zero-flag.
13377 1998-07-16 Jason Merrill <jason@yorick.cygnus.com>
13379 * typeck.c (convert_for_assignment): Use comptypes.
13381 1998-07-16 Mark Mitchell <mark@markmitchell.com>
13383 * semantics.c (finish_object_call_expr): Move test for the
13384 function called being a TYPE_DECL to ...
13385 * call.c (build_new_method_call): Here.
13387 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13389 * decl2.c (arg_assoc_class): Also look at template arguments, if any.
13390 (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
13392 * lex.c (looking_for_typename): Don't initialize.
13394 * decl2.c (ambiguous_decl): Clarify error message.
13396 * decl.c (push_using_directive): Iterate over namespaces used
13399 1998-07-15 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13401 * decl2.c (add_using_namespace): Iterate over namespaces used
13404 * decl.c (lookup_name_real): Accept namespace aliases as locals.
13405 (cat_namespace_levels): Ignore aliases.
13406 (duplicate_decls): Ignore duplicate aliases.
13407 * decl2.c (do_namespace_alias): Process block level namespace
13408 aliases. Store alias with pushdecl. Remove odr errors.
13409 * parse.y (namespace_alias): New non-terminal.
13412 1998-07-15 Jason Merrill <jason@yorick.cygnus.com>
13414 * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
13415 Handle TEMPLATE_TYPE_PARM.
13416 (arg_assoc): Rewrite.
13418 * pt.c (complete_template_args): Don't look at the context unless
13421 * method.c (build_decl_overload_real): Fix namespace handling.
13423 * typeck.c (build_unary_op): Extract a lone function from an
13426 * call.c (build_scoped_method_call): Handle getting a namespace
13427 for basetype in a destructor call.
13428 (check_dtor_name): Handle enums.
13430 * parse.y (using_directive): New nonterminal.
13431 (extdef, simple_stmt): Use it.
13433 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13435 * decl2.c (add_function): Move error message ...
13436 (arg_assoc_namespace): ... from here.
13438 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13440 * parse.y (namespace_qualifier): Fix multiple level handling.
13441 * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
13442 (arg_assoc): Don't skip the first argument of a function.
13444 Tue Jul 14 20:09:22 1998 Jeffrey A Law (law@cygnus.com)
13446 * search.c (my_tree_cons): Clean up.
13448 1998-07-14 Jason Merrill <jason@yorick.cygnus.com>
13450 * call.c (joust): Don't warn about "confusing" conversions to the
13453 1998-07-14 Martin von Löwis <loewis@informatik.hu-berlin.de>
13455 * class.c (push_nested_class): Complain about namespaces.
13456 * decl.c (start_decl): Enter the object's namespace.
13457 (cp_finish_decl): Leave it.
13458 (grokdeclarator): Likewise.
13459 * decl2.c (check_decl_namespace): New function.
13460 (finish_file): Call it.
13461 * parse.y (complex_direct_notype_declarator): Set complexity
13462 of namespace-qualified ids to -1, enter the namespace.
13464 * method.c (build_template_decl_overload): Expect _DECL as first
13465 parameter. Put context temporarily into current_namespace.
13466 * pt.c (check_explicit_specialization): Change caller.
13467 (tsubst): Likewise.
13469 * init.c (build_offset_ref): Call mark_used and
13470 convert_from_reference for namespace members.
13472 Mon Jul 13 23:25:28 1998 Martin von Löwis <loewis@informatik.hu-berlin.de>
13474 * search.c (my_tree_cons): The bitfield is at index 2.
13476 Mon Jul 13 17:21:01 1998 Nick Clifton <nickc@cygnus.com>
13478 * lang-options.h: Format changed to work with new --help support
13481 1998-07-12 Martin von Löwis <loewis@informatik.hu-berlin.de>
13483 * decl2.c (build_expr_from_tree): Change calls of do_identifier.
13484 Do Koenig lookup in CALL_EXPR.
13485 (arg_assoc): Handle error_mark.
13486 * lex.c (is_global): New function.
13487 (do_identifier): Expect arguments for Koenig lookup.
13488 * parse.y (primary): Add rules for calls of unqualified function calls.
13489 (do_id): Change call of do_identifier.
13490 * pt.c (finish_stmt_expr): Likewise.
13491 * semantics.c (finish_id_expr): Likewise.
13492 (finish_call_expr): Add integer parameter to indicate
13493 argument-dependent lookup.
13495 * decl.c (struct binding_level): New field using_directives.
13496 (push_using_decl): Not sorry anymore.
13497 (push_using_directive): New function.
13498 (lookup_tag): Use CP_DECL_CONTEXT to iterate.
13499 (unqualified_namespace_lookup): New function, code from ...
13500 (lookup_name_real): ... here.
13501 * decl2.c (lookup_using_namespace): Pass using list instead of
13503 (validate_nonmember_using_decl): New function.
13504 (do_nonmember_using_decl): New function.
13505 (do_toplevel_using_decl): Use them.
13506 (do_local_using_decl): New function.
13507 (do_using_directive): Support block-level directives.
13508 * parse.y (simple_stmt): Support using declarations and
13510 (namespace_qualifier, namespace_using_decl): New non-terminals.
13512 * xref.c (classname): New function.
13513 (GNU_xref_hier): Change class and base parameters to tree.
13514 * decl.c (xref_baseypes): Change caller.
13515 * friend.c (make_friend_class): Likewise.
13517 1998-07-12 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
13519 * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
13522 * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
13523 template template parameter, record its use.
13524 (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
13525 its template arguments if exists.
13527 * pt.c (coerce_template_template_parms): New function equivalent
13528 to coerce_template_parms when IS_TMPL_PARM is true.
13529 (coerce_template_parms): Use it. Remove the IS_TMPL_PARM parameter,
13530 all callers changed.
13532 (coerce_template_parms): Access ARGLIST properly when creating a
13533 new vector. Only accept implicit TYPE_DECL as valid argument for
13534 a template template parameter when it is a base class of
13535 current_class_type. Don't display error message when COMPLAIN is
13538 1998-07-12 Klaus Kaempf (kkaempf@progis.de)
13540 * repo.c (get_base_filename): Use file_name_nondirectory.
13541 (open_repo_file): Likewise.
13542 * cp-tree.h (file_name_nondirectory): Add prototype.
13544 1998-07-12 Jason Merrill <jason@yorick.cygnus.com>
13546 * friend.c (do_friend): Pull the identifier out of declarator.
13547 Use cp_error and friends.
13548 * decl2.c (qualified_lookup_using_namespace): Fix call to
13550 * decl.c (lookup_name_real): Don't call complete_type on a namespace.
13551 (grokvardecl): Use DECL_CLASS_SCOPE_P.
13552 * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
13553 * class.c (warn_hidden): Fix for OVERLOAD.
13554 From grahams@rcp.co.uk:
13555 * cp-tree.h (DEFARG_NODE_CHECK): New macro.
13556 (DEFARG_LENGTH, DEFARG_POINTER): Use it.
13558 Sun Jul 12 01:20:57 1998 Jeffrey A Law (law@cygnus.com)
13560 * g++.1 (-traditional): Remove duplicated documentation.
13562 1998-07-11 Mark Mitchell <mark@markmitchell.com>
13564 * method.c (flush_repeats): Add nrepeats parameter.
13565 (issue_nrepeats): Likewise.
13566 (is_back_referenceable_type): New function. Don't back-reference
13567 TEMPLATE_TYPE_PARMs as well as simple types like integers.
13568 (build_mangled_name_for_type): Likewise.
13569 (build_mangled_name_for_type_with_Gcode): Likewise.
13570 (lasttype): Remove.
13571 (nrepeats): Likewise.
13572 (Nrepeats): Likewise.
13573 (start_squangling): Don't clear the variables removed above.
13574 (end_squangling): Likewise.
13575 (flush_repeats): Tidy. Use nrepeats parameter rather than
13577 (issue_nrepeats): Likewise, but with nrepeats global. Use
13578 is_backreferenceable_type.
13579 (build_overload_nested_name): Tidy. Add comment. Use
13580 build_mangled_name_for_type.
13581 (build_underscore_int): Comment.
13582 (build_overload_scope_ref): Use build_mangled_name_for_type.
13583 (build_overload_int): Likewise.
13584 (build_template_template_parm_names): Tidy.
13585 (build_template_parm_names): Use build_mangled_name_for_type.
13586 (build_overload_identifier): Add comments.
13587 (build_mangled_name_for_type_with_Gcode): Split out from
13588 build_mangled_name.
13589 (build_mangled_name_for_type): Use it.
13590 (build_mangled_name): Rework to use build_mangled_name_for_type
13591 and to not use global nrepeats/Nrepeats. Tidy.
13592 (process_modifiers): Tidy.
13593 (check_btype): Use is_backreferenceable_type. Add comment.
13594 Rename `node' to `type'.
13595 (process_overload_item): Set numeric_output_need_bar here.
13596 Use build_mangled_name_for_type. Tidy.
13597 (build_decl_overload_real): Tidy. Don't use Nrepeats. Use
13598 build_mangled_name_for_type.
13600 * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
13603 1998-07-08 Vladimir N. Makarov <vmakarov@cygnus.com>
13605 * cp-tree.h (warn_long_long): Define.
13606 * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
13607 warning "ANSI C++ does not support `long long'".
13608 * decl2.c (warn_long_long): Define.
13609 (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
13611 1998-07-07 Jason Merrill <jason@yorick.cygnus.com>
13613 * decl.c (xref_tag): Handle attributes between 'class' and name.
13614 * parse.y (aggr): Likewise.
13615 * semantics.c (finish_class_definition): Likewise.
13616 * Makefile.in (EXPECTED): Adjust.
13618 * cp-tree.h: Declare flag_optional_diags and warn_multichar.
13619 * decl2.c: Define them.
13620 (lang_decode_option): Handle them.
13621 * lang-options.h: Add -foptional-diags.
13622 * class.c (finish_struct): Don't complain about multiple meanings of
13623 name if -fno-optional-diags.
13624 * decl.c (pushdecl_class_level): Likewise.
13625 * lex.c (real_yylex): Check warn_multichar.
13627 1998-07-06 Jason Merrill <jason@yorick.cygnus.com>
13629 * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
13631 * tree.c (make_binfo): Fix length.
13633 1998-06-30 Benjamin Kosnik <bkoz@bliss.nabi.net>
13635 * decl2.c (lang_decode_option): Remove warn_template_debugging.
13636 * lang-options.h: Likewise.
13638 Mon Jun 29 20:17:40 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13640 * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
13641 (process_start_catch_block): Likewise for variables
13642 `false_label_rtx', `call_rtx' and `return_value_rtx'.
13644 1998-06-29 Brendan Kehoe <brendan@cygnus.com>
13646 * tree.c (build_srcloc): Make sure we allocate this node on the
13649 Sat Jun 27 23:34:18 1998 Fred Fish <fnf@ninemoons.com>
13651 * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
13652 (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
13653 (lang_specific_driver): Only add -lm automatically if need_math is
13656 Sat Jun 27 12:22:56 1998 Jeffrey A Law (law@cygnus.com)
13658 * Make-lang.in (g++): Depend on mkstemp.o. Link in mkstemp.o
13660 Sat Jun 27 07:36:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13662 * Makefile.in (EXPR_H): New dependency variable.
13663 (decl2.o): Depend on $(EXPR_H).
13664 (typeck.o): Likewise.
13665 (init.o): Likewise.
13666 (expr.o): Likewise.
13668 1998-06-25 Benjamin Kosnik <bkoz@lisa.cygnus.com>
13670 * decl.c (start_enum): Put local enums on permanent_obstack.
13672 1998-06-25 Mark Mitchell <mark@markmitchell.com>
13674 * cp-tree.h (c_get_alias_set): Declare.
13675 * decl.c (init_decl_processing): Set lang_get_alias_set.
13677 1998-06-25 Andrew MacLeod <amacleod@cygnus.com>
13679 * cp-tree.h (mark_all_runtime_matches): Add function prototype.
13680 * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
13681 flag for all function decls which are in the exception table.
13682 * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
13683 * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
13684 code is emitted for any referenced rtti function.
13686 1998-06-25 Dave Brolley <brolley@cygnus.com>
13688 * lang-specs.h: Use new | syntax to eliminate
13689 string concatenation.
13691 1998-06-25 Jason Merrill <jason@yorick.cygnus.com>
13693 * cp-tree.h (CP_DECL_CONTEXT): New macro.
13694 * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
13695 * method.c (build_overload_nested_name): Likewise.
13696 * sig.c (build_signature_pointer_or_reference_type): Don't set
13699 1998-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
13701 Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
13702 * cp-tree.h (FROB_CONTEXT): New macro.
13703 (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
13704 * decl.c (namespace_binding): Replace NULL_TREE with
13706 (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
13707 * decl2.c (is_namespace_ancestor, lookup_using_namespace):
13709 * decl.c (pushtag): Use FROB_CONTEXT.
13710 (pushdecl, make_typename_type, define_function, grokdeclarator):
13712 * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
13713 * pt.c (push_template_decl_real, lookup_template_class, tsubst):
13715 * decl2.c (decl_namespace): Return global_namespace if no context.
13716 * method.c (build_overload_nested_name): Expect null as context.
13717 * pt.c (mangle_class_name_for_template): Do nothing for null
13719 (lookup_template_class): Allow for null id_context.
13721 1998-06-25 Richard Henderson <rth@cygnus.com>
13723 * method.c (emit_thunk): Set current_function_is_thunk for the
13724 ASM_OUTPUT_MI_THUNK case as well.
13726 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
13728 * exception.cc (__cplus_type_matcher): Get a match_info pointer
13729 instead of an exception table entry as a parameter.
13731 1998-06-23 Andrew MacLeod <amacleod@cygnus.com>
13733 * parse.y (function_try_block): Don't call start_catch_handler.
13734 * except.c (call_eh_info): Remove coerced field from declaration.
13735 (build_eh_type_type_ref): New function to create an address of a
13736 rtti function for the new style exception tables.
13737 (expand_start_catch_block): Split function, this contains the
13739 (process_start_catch_block_old): New function to perform the rest
13740 of expand_start_catch_block under old style exceptions.
13741 (process_start_catch_block_old): New function to perform the rest
13742 of expand_start_catch_block under new style exceptions.
13743 (expand_end_catch_block): Only pop the false label off the stack under
13744 the old style of exceptions.
13745 * semantics.c (finish_try_block): Don't call start_catch_handler.
13746 * exception.cc (struct cp_eh_info): Add original_value field.
13747 (__cplus_type_matcher): Perform type matching on the original exception
13748 value, and if we have a match, set the current value.
13749 (__cp_push_exception): Set the original exception value.
13751 1998-06-23 Jason Merrill <jason@yorick.cygnus.com>
13753 * call.c (joust): Fix confusing conversion warning.
13755 * call.c (build_op_delete_call): Add placement parm. Check
13756 LOOKUP_SPECULATIVELY.
13757 * cp-tree.h, decl2.c, init.c: Adjust.
13758 * decl.c (finish_function): Use it.
13760 * pt.c (tsubst): Diagnose creating void fields or variables.
13762 Mon Jun 22 08:50:26 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13764 * call.c (build_scoped_method_call): Remove unused variable `tmp'.
13766 * cp-tree.h (check_dtor_name): Add prototype.
13768 * init.c (expand_member_init): Remove unused variables
13769 `ptr_type_node', `parm' and `rval'.
13771 * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
13772 in call to fprintf.
13773 (lang_print_xnode): Likewise.
13775 * typeck2.c (enum_name_string): Cast argument to sprintf to long
13776 and use %ld specifier.
13778 * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
13779 specifier in call to fprintf.
13780 (GNU_xref_member): Cast argument to sprintf to int.
13782 Fri Jun 19 23:22:42 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
13784 * typeck2.c (pop_init_level): Warn about implicit zero initialization
13787 Thu Jun 18 09:32:32 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13789 * cp-tree.h: Prototype function `check_java_method'.
13791 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13793 * class.c (finish_struct): Make conflicting use of id a pedwarn.
13794 * decl.c (pushdecl_class_level): Likewise.
13796 1998-06-17 Mark Mitchell <mark@markmitchell.com>
13798 * pt.c (convert_nontype_argument): Issue an error when presented
13799 with an integer (real) constant that cannot be simplified to an
13800 INT_CST (REAL_CST).
13802 * cp-tree.h (c_get_alias_set): Remove declaration added in
13803 1998-06-13 change that should never have been checked in.
13805 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13807 * typeck.c (build_binary_op_nodefault): Change % in format strings
13810 * decl.c (grokvardecl): Don't build_static_name for decls that
13811 aren't at namespace scope.
13813 * init.c (perform_member_init): Catch default-initialization of
13816 1998-06-17 Mark Mitchell <mark@markmitchell.com>
13818 * errfn.c (cp_thing): Handle the `%%' formatting sequence.
13820 1998-06-17 Jason Merrill <jason@yorick.cygnus.com>
13822 * method.c (hack_identifier): Complain about getting a namespace
13824 * typeck.c (decay_conversion): Remove check for namespaces.
13825 * typeck2.c (incomplete_type_error): Likewise.
13826 * parse.y (template_arg): Add PTYPENAME expansion.
13828 1998-06-16 Andrew MacLeod <amacleod@cygnus.com>
13830 * decl.c (grokvardecl): Don't build external assembler names for
13831 TYPENAMEs in other namespaces as there is no declarator.
13832 * error.c (cp_file_of, cp_line_of): Don't extract file or line number
13833 info from DECL_CONTEXT if it is NULL.
13835 1998-06-16 Jason Merrill <jason@yorick.cygnus.com>
13837 * call.c (check_dtor_name): Split out.
13838 (build_scoped_method_call): Use it.
13839 (build_method_call): Use it.
13840 * init.c (build_offset_ref): Use it.
13842 * typeck.c (build_static_cast): Fix handling of pointers to members.
13844 * decl.c (finish_function): Just return nothing from a constructor.
13845 * typeck.c (c_expand_return): Complain about returning a void
13846 expression from a destructor.
13848 1998-06-13 Mark Mitchell <mark@markmitchell.com>
13850 * class.c (alter_access): Accept a BINFO explaining how to get
13851 from the entity whose accessed is being altered to the type doing
13853 (handle_using_decl): New function containing code split out from ...
13854 (finish_struct_1): Here.
13856 * cp-tree.h (complete_type_or_else): Declare.
13857 * init.c (build_new_1, build_delete): Use it.
13858 * typeck.c (require_complete_type): Use complete_type, rather than
13859 expanding it inline.
13860 (complete_type_or_else): New function.
13861 (build_component_ref): Use it.
13862 (pointer_int_sum): Make sure the type pointed to is complete.
13863 (pointer_diff): Likewise.
13865 * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
13868 * search.c (get_matching_virtual): Note that member templates
13869 cannot override virtual functions.
13871 1998-06-12 Brendan Kehoe <brendan@cygnus.com>
13873 * pt.c (check_explicit_specialization): If DECLARATOR turned into
13874 an error_mark_node from lookup_template_function, return the same.
13875 (determine_specialization): Also make sure TEMPLATE_ID isn't an
13876 error_mark_node, before we try to read its operands.
13877 * decl.c (grokdeclarator): If we got an error_mark_node from
13878 check_explicit_specialization, just return it right back.
13880 1998-06-12 Mark Mitchell <mark@markmitchell.com>
13882 * class.c (instantiate_type): Don't treat template-ids that don't
13883 specify any template arguments as equivalent to ordinary
13884 identifiers. Use OFFSET_REF instead of SCOPE_REF to refer to
13885 pointer-to-members for member templates. Tidy slightly.
13886 * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
13887 * init.c (build_offset_ref): Handle template-ids like ordinary
13888 identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
13889 offset part of the OFFSET_REF.
13890 * typeck.c (build_unary_op): Change check for unknown types to
13891 look for OFFSET_REFs, not SCOPE_REFs.
13893 1998-06-11 Mark Mitchell <mark@markmitchell.com>
13895 * pt.c (is_member_template_class): New function.
13896 (push_template_decl_real): Use it.
13898 1998-06-11 Benjamin Kosnik <bkoz@elmo.cygnus.com>
13900 * friend.c (do_friend): Add support for nested classes using
13901 member functions of the enclosing class as friends.
13903 1998-06-10 Mark Mitchell <mark@markmitchell.com>
13905 * call.c (convert_default_arg): Make global, not static.
13906 (convert_arg_for_ellipsis): Split out from ...
13907 (build_over_call): Here.
13908 * cp-tree.h (convert_default_arg); Declare.
13909 (convert_arg_to_ellipsis): Likewise.
13910 (do_member_init): Remove.
13911 * init.c (do_member_init): Remove; this code is dead.
13912 (expand_member_init): Remove much of this code; it is dead.
13913 * typeck.c (convert_arguments): Use convert_default_arg and
13914 convert_arg_for_ellipsis, rather than duplicating here.
13916 * call.c (convert_like): Don't fail silently if
13917 build_user_type_conversion fails. Always return error_mark_node
13920 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
13922 * search.c (covariant_return_p): Complain about ambiguous base.
13924 * typeck.c (build_component_ref): Diagnose ref to nested type.
13926 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
13928 * decl.c (grokparms): Check that INIT isn't an error_mark_node
13929 before giving error about invalid type for default arg.
13931 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
13933 * call.c (build_method_call): Fix thinko.
13935 1998-06-10 Dave Brolley <brolley@cygnus.com>
13937 * decl2.c (lang_decode_option): New argc/argv interface.
13938 * cp-tree.h (lang_decode_option): New argc/argv interface.
13939 * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
13940 specified for cpplib-enabled compilers.
13941 * lex.c (lang_init): Don't check_newline for cpplib.
13942 (init_parse): Don't initialize cpplib here.
13944 1998-06-10 Brendan Kehoe <brendan@cygnus.com>
13946 * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
13947 piece before checking DECL_MUTABLE_P.
13949 1998-06-10 John Carr <jfc@mit.edu>
13951 * tree.c (debug_binfo): Make printf format match arguments.
13953 * error.c (OB_PUTI): Make printf format match arguments.
13955 1998-06-10 Jason Merrill <jason@yorick.cygnus.com>
13957 * init.c (perform_member_init): Handle default-initialization.
13959 * except.c (build_throw): Handle throwing NULL.
13961 * typeck.c (build_x_function_call): Use resolve_offset_ref.
13963 * search.c (compute_access): Only strip an anonymous union
13966 * call.c (add_builtin_candidates): Tweak.
13968 * cvt.c (build_expr_type_conversion): Restore code for conversion
13970 * decl2.c (delete_sanity): Use it. Clean up.
13972 * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
13974 1998-06-10 Branko Cibej <branko.cibej@hermes.si>
13976 * typeck.c (c_expand_return): Don't warn about void expressions on
13977 return statements in functions returning void.
13979 1998-06-09 Mark Mitchell <mark@markmitchell.com>
13981 * pt.c (fn_type_unification): Revise documentation. Tidy.
13982 (type_unification): Likewise.
13984 1998-06-09 Andrew MacLeod <amacleod@cygnus.com>
13986 * semantics.c (finish_try_block): Rename expand_start_catch, and delete
13988 * parse.y (function_try_block): Rename expand_start_catch, and delete
13990 * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
13993 1998-06-09 Jason Merrill <jason@yorick.cygnus.com>
13995 * search.c (lookup_member): New fn.
13996 * class.c (finish_struct_1): Use it.
13997 * decl.c (lookup_name_real): Use it.
13999 Mon Jun 8 20:45:52 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14001 * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
14003 * cp-tree.h: Add prototype for `maybe_print_template_context' and
14004 `maybe_make_one_only'.
14006 * decl.c (auto_function): Remove unused variable `decl'.
14008 * decl2.c: Include dwarf2out.h and dwarfout.h.
14010 * lex.c: Remove redundant declarations of `set_float_handler' and
14013 1998-06-08 Andrew MacLeod <amacleod@cygnus.com>
14015 * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
14016 time flag. Call __cp_eh_info instead of __cp_exception_info.
14017 * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
14018 (__cp_exception_info): Return offset into cp_eh_info structure to
14019 match what use to be the start of this structure.
14020 (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
14021 (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
14023 (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
14024 __cp_eh_info instead of __cp_exception_info.
14026 1998-06-08 Jason Merrill <jason@yorick.cygnus.com>
14028 * decl.c (cp_finish_decl): Disable inlining of extern inlines
14029 with static variables.
14031 1998-06-08 Mark Mitchell <mark@markmitchell.com>
14033 * init.c (build_offset_ref): Correct previous change to use build,
14036 1998-06-07 Mark Mitchell <mark@markmitchell.com>
14038 * class.c (instantiate_type): Handle pointer-to-members where the
14039 member is a template.
14040 * init.c (build_offset_ref): Likewise.
14041 * typeck.c (build_unary_op): Likewise.
14043 1998-06-07 Richard Henderson <rth@cygnus.com>
14045 * lex.c (lang_init_options): New function.
14046 (lang_init): Remove flag_exceptions == 2 hack.
14048 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14050 * search.c (envelope_add_decl): Tweak for implicit typename.
14052 * call.c (joust): Also warn about confusing conversion op/constructor
14053 overload resolution.
14055 * spew.c (yylex): Also return the TYPE_DECL if got_object.
14056 Don't clear got_object after '~'.
14057 * call.c (build_scoped_method_call): Tweak destructor handling.
14058 (build_method_call): Likewise.
14059 * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
14060 TYPE_MAIN_VARIANT for destructors.
14061 * semantics.c (finish_object_call_expr): Complain about calling a
14064 1998-06-05 Per Bothner <bothner@cygnus.com>
14066 * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
14067 Define - update needed by gcc.c change.
14069 1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
14071 * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
14073 1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14075 * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
14076 * decl.c (lookup_name_real): Add namespaces_only parameter.
14077 If set, return only NAMESPACE_DECLs.
14078 (select_decl): Likewise.
14079 (identifier_type_value): Give additional parameter.
14080 (lookup_name_nonclass): Likewise.
14081 (lookup_name): Likewise.
14082 (find_binding): Skip namespace aliases.
14083 (binding_for_name): Likewise.
14084 (push_namespace): Check for namespace aliases.
14085 (lookup_name_namespace_only): New function.
14086 (begin_only_namespace_names, end_only_namespace_names): New functions.
14087 * decl2.c (set_decl_namespace): Skip namespace aliases.
14088 (do_using_directive): Likewise.
14089 (do_namespace_alias): Produce namespace aliases, fix alias
14091 * error.c (dump_decl): Support SCOPE_REF.
14092 * parse.y (extdef): Wrap lookup with namespace_only for namespace
14093 aliases and using declarations.
14095 1998-06-04 Jason Merrill <jason@yorick.cygnus.com>
14097 * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
14099 * error.c (dump_expr): Clean up NEW_EXPR case.
14101 1998-06-04 Martin von Löwis <loewis@informatik.hu-berlin.de>
14103 Suggested by Brendan Kehoe
14104 * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
14105 treat it as using ::decl.
14107 * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
14109 * tree.c (mapcar): Support NEW_EXPR.
14111 * error.c (dump_expr): Support NEW_EXPR.
14113 1998-06-03 Jason Merrill <jason@yorick.cygnus.com>
14115 * method.c (make_thunk): Use overload machinery to make name.
14116 * search.c (covariant_return_p): New fn.
14117 (get_matching_virtual): Use it.
14119 * init.c (build_new_1): Fix check for void.
14121 1998-06-01 Per Bothner <bothner@cygnus.com>
14123 * cp-tree.h (TYPE_FOR_JAVA): New macro.
14124 * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
14125 java_int_type_node, java_long_type_node, java_float_type_node,
14126 java_double_type_node, java_char_type_node, java_boolean_type_node):
14127 New "primitive" types, with predefined names __java_byte etc.
14128 (record_builtin_java_type): New function.
14129 (init_decl_processing): Make Java types with record_builtin_java_type.
14130 (pushtag, grokdeclarator): Set TYPE_FOR_JAVA if in extern "JAVA".
14131 (xref_baseypes): If base class was TYPE_FOR_JAVA, so is this class.
14132 (grokfndecl): Call check_java_method for Java classes.
14133 * method.c (is_java_type): Removed. Replaced with TYPE_FOR_JAVA.
14134 (process_overload_item): Match types against specific
14135 java_XX_type_node types, rather than using is_java_type.
14136 * class.c (finish_struct_1): Don't add default copy constructor
14137 or operator= if TYPE_FOR_JAVA.
14138 (pop_lang_conext): Restore strict_prototyp proper if Java.
14139 * decl2.c (acceptable_java_type, check_java_method): New functions.
14140 * pt.c (instantiate_class_template): Copy TYPE_FOR_JAVA from pattern.
14141 (tsubst): Move common statement after if statement.
14142 * typeck.c (comptypes): If strict, TYPE_FOR_JAVA must match.
14144 1998-06-01 Jason Merrill <jason@yorick.cygnus.com>
14146 * pt.c (for_each_template_parm): Use first_rtl_op.
14148 * tree.c (build_cplus_array_type_1): Also check index_type for
14151 1998-05-31 Jason Merrill <jason@yorick.cygnus.com>
14153 * pt.c (tsubst): Always copy BINFO_BASETYPES.
14155 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov>
14157 * tree.c (layout_basetypes): If we change TYPE_SIZE, change
14158 TYPE_SIZE_UNIT too.
14160 1998-05-29 Mark Mitchell <mark@markmitchell.com>
14162 * decl.c (grokdeclarator): Don't complain about in-class
14163 initialization of static consts if we don't really know the type
14166 1998-05-29 Jason Merrill <jason@yorick.cygnus.com>
14168 * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
14169 * method.c (build_destructor_name): New fn.
14170 * decl2.c (maybe_retrofit_in_chrg): Split out...
14171 (grokclassfn): From here. Reorganize.
14172 * decl.c (grok_ctor_properties): Make sure ctors for types with
14173 vbases have the in_chrg parm.
14174 * pt.c (instantiate_class_template): Update
14175 TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases. Don't call
14177 (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
14179 1998-05-28 Mark Mitchell <mark@markmitchell.com>
14181 * pt.c (instantiate_decl): Make test for whether or not static
14182 variables should be instantiated early match its comment.
14184 1998-05-28 Jason Merrill <jason@yorick.cygnus.com>
14186 * decl.c (start_decl): Always pedwarn about vacuously redeclaring
14188 (start_function): Call check_default_args.
14189 * decl2.c (grokfield): Don't call check_default_args.
14190 (check_default_args): Use cp_error_at.
14191 * lex.c (do_pending_defargs): Call check_default_args.
14193 1998-05-27 Brendan Kehoe <brendan@cygnus.com>
14195 * call.c (build_method_call): Make sure get_type_value returns
14196 something before we try to use its TYPE_MAIN_VARIANT.
14197 (build_scoped_method_call): Likewise.
14199 1998-05-27 Jason Merrill <jason@yorick.cygnus.com>
14201 * typeck2.c (digest_init): Complain about getting a TREE_LIST to
14202 initialize an array.
14204 * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
14207 * friend.c (do_friend): Clarify template warning.
14209 1998-05-27 Mark Mitchell <mark@markmitchell.com>
14211 * decl.c (shadow_label): Don't treat decls as identifiers.
14212 (maybe_push_to_top_level): Clear shadowed_labels.
14214 * pt.c (instantiate_decl): Reset lineno and filename after calling
14215 regenerate_decl_from_template.
14217 * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
14220 1998-05-27 Kevin Buhr <buhr@stat.wisc.edu>
14222 * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
14224 1998-05-26 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
14226 * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
14227 (convert_nontype_argument): Handle cases when nontype template
14228 parameters become classes after substitution.
14230 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14232 * friend.c (is_friend): Use comptypes, rather than == to compare
14233 types. Modify for new representation of template friends.
14234 (make_friend_class): Likewise.
14235 * pt.c (tsubst_friend_class): Undo 1998-05-21 change. Tweak.
14236 (instantiate_class_template): Deal with template friends.
14238 * decl.c (store_parm_decls): Remove redundant call to
14239 expand_main_function.
14241 1998-05-26 Benjamin Kosnik <bkoz@loony.cygnus.com>
14243 * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
14246 1998-05-26 Per Bothner <bothner@cygnus.com>
14248 * language_as_string: Handle lang_java.
14250 1998-05-26 Jason Merrill <jason@yorick.cygnus.com>
14252 * decl.c (pushdecl): Don't copy the type_decl.
14254 1998-05-26 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14256 * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
14257 current_class_type.
14258 * decl.c (grokdeclarator): Put typedefs on the type's obstack.
14260 * parse.y (complex_direct_notype_declarator): Use $1 to access
14261 scope of notype_qualified_id.
14263 1998-05-26 Dave Brolley <brolley@cygnus.com>
14265 * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
14266 (init_parse): Initialize cpplib interface.
14268 * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
14269 empty continuation.
14271 1998-05-26 Mark Mitchell <mark@markmitchell.com>
14273 * decl.c (pushtag): Avoid crashing on erroneous input.
14275 1998-05-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
14277 * decl.c (push_namespace): Only produce one unique name for
14278 anonymous namespaces.
14279 (get_unique_name): Remove.
14281 1998-05-25 Mark Mitchell <mark@markmitchell.com>
14283 * call.c (tourney): Don't do any extra comparisons.
14285 * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
14287 * cp-tree.h (processing_template_parmlist): Declare.
14288 * decl.c (pushtag): Don't call push_template_decl when we
14290 * pt.c (processing_template_parmlist): New variable.
14291 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
14292 (complete_template_args): Use it.
14293 (add_to_template_args): Likewise.
14294 (innermost_args): Likewise.
14295 (tsubst): Likewise.
14296 (begin_template_parm_list): Use processing_template_parmlist.
14297 (end_template_parm_list): Likewise.
14299 * cp-tree.h (ANON_UNION_TYPE_P): New macro.
14300 * decl.c (grokdeclarator): Use it.
14301 * decl2.c (grok_x_components): Likewise.
14302 * init.c (initializing_context): Likewise.
14303 * method.c (do_build_copy_constructor): Likewise.
14304 (do_build_assign_ref): Likewise.
14305 * search.c (compute_access): Likewise.
14306 * typeck.c (build_component_ref): Likewise.
14308 * decl.c (grokdeclarator): Don't give a cv-qualified version of an
14309 unnamed type a typedef name "for linkage purposes".
14311 * pt.c (lookup_template_class): Don't look at
14312 IDENTIFIER_CLASS_VALUE when there's no current_class_type.
14314 * method.c (build_overload_int): Handle error cases gracefully.
14316 * pt.c (instantiate_decl): Handle static member variables
14319 * pt.c (tsubst): Use the tsubst'd type when producing new
14320 TEMPLATE_PARM_INDEX nodes.
14322 1998-05-24 Mark Mitchell <mark@markmitchell.com>
14324 * tree.c (cp_tree_equal): Handle pointers to member functions.
14326 * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs. Make
14327 sure the type of the REF_BIND is a reference type.
14328 (maybe_handle_ref_bind, compare_ics): Rename reference_type to
14329 target_type for clarity.
14331 * parse.y (xcond): Move call to condition_conversion ...
14332 * semantics.c (finish_for_cond): Here.
14333 * parse.c: Regenerated.
14335 1998-05-24 Jason Merrill <jason@yorick.cygnus.com>
14337 * decl.c (push_namespace): Namespaces have type void.
14338 * typeck2.c (incomplete_type_error): Complain about namespace
14339 used as expression.
14340 * typeck.c (decay_conversion): Likewise.
14342 1998-05-24 Martin von Löwis <loewis@informatik.hu-berlin.de>
14344 * error.c (dump_expr): Support namespaces.
14346 1998-05-23 Jason Merrill <jason@yorick.cygnus.com>
14348 * cp-tree.def: Add SRCLOC.
14349 * cp-tree.h: Add struct tree_srcloc and accessor macros.
14350 * tree.c (build_srcloc, build_srcloc_here): New fns.
14351 * pt.c (add_pending_template): Use build_srcloc_here.
14352 (push_tinst_level): Update last_template_error_tick before erroring.
14353 (instantiate_decl): Restore lineno and input_filename before
14354 calling add_pending_template.
14355 * decl2.c (finish_file): Set up lineno and input_filename for
14358 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14360 * decl.c (lang_print_error_function): New fn.
14361 (init_decl_processing): Set print_error_function to use it.
14362 * errfn.c (cp_thing): Don't call maybe_print_template_context here.
14364 * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
14367 * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
14368 copy-initialization.
14370 * class.c (build_vtable_entry): Use int_fits_type_p.
14371 (build_vtable): Pass a signed offset to build_vtable_entry.
14372 (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
14373 set_rtti_entry): Likewise.
14375 1998-05-22 Per Bothner <bothner@cygnus.com>
14377 * cp-tree.h: Add comments documenting which LANG_FLAGS are used.
14378 (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE): Removed, not used.
14380 1998-05-22 Jason Merrill <jason@yorick.cygnus.com>
14382 * pt.c (print_template_context): Use fprintf instead of cp_error.
14384 * pt.c (determine_specialization): Just return an error_mark_node.
14385 Also print the decl we want in error messages. If we complain,
14386 return error_mark_node.
14387 (tsubst_friend_function): Set lineno and input_filename so
14388 error messages will be useful.
14389 (instantiate_template): Just return an error_mark_node.
14390 (check_explicit_specialization): Don't mess with a returned
14393 * pt.c (print_template_context): Add new argument.
14394 (maybe_print_template_context): New fn.
14395 (push_tinst_level): Increment tinst_level_tick.
14396 (pop_tinst_level): Likewise.
14397 * errfn.c (cp_thing): Call maybe_print_template_context. Use
14398 xrealloc instead of xmalloc.
14400 * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
14402 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14404 * pt.c (tsubst_friend_class): Don't call redeclare_class_template
14405 if the template we looked up is the same as the one we already
14408 Thu May 21 11:54:44 1998 Dave Brolley <brolley@cygnus.com>
14410 * lex.c: (handle_sysv_pragma): FILE* parameter not used.
14411 (cpp_reader,parse_in): Add for cpplib.
14412 (check_newline): Call handle_sysv_pragma with new interface.
14413 (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
14415 * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
14416 (sub_getch): Call GETC for cpplib.
14418 * cp-tree.h: (get_directive_line): Different prototype for cpplib.
14419 (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
14421 * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
14423 1998-05-21 Jason Merrill <jason@yorick.cygnus.com>
14425 * decl2.c (maybe_make_one_only): New fn.
14426 (import_export_vtable): Use it.
14427 (import_export_decl): Likewise.
14428 * pt.c (mark_decl_instantiated): Likewise.
14430 1998-05-21 Mark Mitchell <mmitchell@usa.net>
14432 * decl2.c (find_representative_member): Rename to ...
14433 (build_anon_union_vars): New function.
14434 (finish_anon_union): Fix stupidity of previous change.
14436 1998-05-20 Jason Merrill <jason@yorick.cygnus.com>
14438 * decl.c (grokfndecl): Handle definition of specialization in
14439 friend declaration.
14441 * error.c (dump_decl): Fix LOOKUP_EXPR handling.
14443 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14445 * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
14446 to look for type declarations.
14447 (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
14448 * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
14449 (finish_member_class_template): Declare.
14450 * decl.c (pushtag): Put member class templates on the
14451 CLASSTYPE_TAGS list, just as for ordinary member classes.
14452 (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
14453 (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
14454 IDENTIFIER_NAMESPACE_VALUEs.
14455 * parse.y (component_decl): Move code to ...
14456 * semantics.c (finish_member_class_template): New function.
14457 Don't put member class templates on the list of components for a
14459 * parse.c: Regenerated.
14460 * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
14461 In fact, don't use DECL_CONTEXT at all here.
14463 1998-05-20 Martin von Loewis <loewis@informatik.hu-berlin.de>
14465 * decl.c (record_unknown_type): New function.
14466 (init_decl_processing): Call it for the unknown and global type
14469 1998-05-20 Mark Mitchell <mmitchell@usa.net>
14471 * decl2.c (find_representative_member): New function.
14472 (finish_anon_union): Use it.
14474 * cp-tree.h (MAIN_NAME_P): New macro.
14475 (DECL_MAIN_P): Likwise.
14476 * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
14477 (grokfndecl): Use the new macros.
14478 (grokdeclarator): Likewise.
14479 (start_function): Likewise.
14480 (store_parm_decls): Likewise.
14481 (finsh_function): Likewise.
14482 * friend.c (do_friend): Likewise.
14483 * typeck.c (build_function_call_real): Likewise.
14484 (build_unary_op): Likewise.
14486 Wed May 20 02:16:01 1998 Jason Merrill <jason@yorick.cygnus.com>
14488 * decl2.c (start_objects, finish_objects, do_dtors,
14489 do_ctors): Split out from...
14490 (finish_file): ...here.
14492 Tue May 19 20:36:23 1998 Jason Merrill <jason@yorick.cygnus.com>
14494 * tree.c (is_overloaded_fn): Don't abort on placeholders from
14497 Tue May 19 15:16:22 1998 Brendan Kehoe <brendan@cygnus.com>
14499 * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
14501 * error.c (dump_expr): Handle an ARROW_EXPR.
14503 Tue May 19 15:13:39 1998 Mark Mitchell <mmitchell@usa.net>
14505 * decl.c (saveable_obstack): Declare.
14506 (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
14507 declare, if necessary.
14509 Tue May 19 14:50:27 1998 Mark Mitchell <mmitchell@usa.net>
14511 * call.c (compare_qual): Remove.
14512 (is_subseq): Tweak.
14513 (is_properly_derived_from): New function.
14514 (maybe_handle_ref_bind): Likewise.
14515 (maybe_handle_implicit_object): Likewise.
14516 (compare_ics): Modify substantially to bring into conformance with
14518 * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
14519 (comp_cv_qualification): Declare.
14520 (comp_cv_qual_signature): Likewise.
14521 * typeck.c (comp_cv_qualification): Likewise.
14522 (comp_cv_qual_signature): Likewise.
14524 Tue May 19 10:05:02 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14526 * Makefile.in (parse.o): Depend on toplev.h.
14528 * class.c (typecode_p): Remove prototype and definition.
14530 * cp-tree.h (currently_open_class, is_empty_class, member_p):
14533 * decl.c (push_overloaded_decl_top_level): Remove prototype and
14536 * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
14537 in call to `cp_thing'.
14538 (cp_warning): Likewise for function pointer `warning'.
14540 * except.c (do_function_call): Remove prototype and definition.
14541 (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
14543 * method.c (is_java_type): Add prototype and make it static.
14545 * parse.y: Include toplev.h.
14547 * pt.c (type_unification): Remove unused variable `arg'.
14548 (instantiate_decl): Likewise for `save_ti'.
14550 * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
14552 Tue May 19 02:43:25 1998 Jason Merrill <jason@yorick.cygnus.com>
14554 * init.c (build_member_call): Handle template_ids.
14555 * parse.y (primary): Add global_scope template_id.
14557 Mon May 18 23:22:52 1998 Jason Merrill <jason@yorick.cygnus.com>
14559 * decl2.c (get_sentry): Use end_temporary_allocation.
14560 Don't declare permanent_obstack.
14562 Mon May 18 12:28:44 1998 Mark Mitchell <mmitchell@usa.net>
14564 * parse.y (.finish_new_placement): New non-terminal.
14565 (unary_expr, new_type_id): Use it.
14566 * parse.c: Regenerated.
14568 Mon May 18 12:20:27 1998 Brendan Kehoe <brendan@cygnus.com>
14570 * pt.c (redeclare_class_template): Say where the original definition
14571 of the template-parameter's default argument appeared.
14573 Mon May 18 03:00:57 1998 Jason Merrill <jason@yorick.cygnus.com>
14575 * call.c (build_over_call): Tweak empty class handling.
14577 * decl.c (make_typename_type): Use currently_open_class.
14579 * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
14581 Mon May 18 01:43:01 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14583 * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
14584 for a type unless it is one.
14586 * class.c (finish_struct_1): Use OVL_CURRENT in error message.
14588 Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
14590 * Makefile.in (program_transform_name, objdir): Define.
14592 * Makefile.in (BISON): Use bison from the build tree if it exists.
14595 Sun May 17 14:52:08 1998 Martin v. Loewis <loewis@informatik.hu-berlin.de>
14597 * typeck.c (type_unknown_p): Return true for TREE_LIST also.
14599 * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
14601 Sun May 17 14:51:41 1998 Jason Merrill <jason@yorick.cygnus.com>
14603 * call.c (build_scoped_method_call): Likewise.
14605 Sun May 17 13:53:48 1998 Mark Mitchell <mmitchell@usa.net>
14607 * init.c (build_new_1): Call suspend_momentary around the creation
14608 of values that must be saved for exception handling.
14609 * parse.y (.build_new_placement): New non-terminal.
14610 (unary_expr, new_placement): Use it.
14611 * parse.c: Regenerated.
14613 Sun May 17 12:32:08 1998 Jason Merrill <jason@yorick.cygnus.com>
14615 * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
14618 * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
14621 * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
14623 Fri May 15 20:28:00 1998 Jason Merrill <jason@yorick.cygnus.com>
14625 * decl.c (start_decl): Revert problem change.
14627 * Makefile.in (CONFLICTS): Fix.
14629 Fri May 15 15:34:02 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
14631 * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
14633 Fri May 15 00:46:05 1998 Jason Merrill <jason@yorick.cygnus.com>
14635 * class.c (finish_struct_1): Use BINFO_SIZE.
14637 * decl.c (start_decl): Use 'tem'.
14639 Thu May 14 16:30:47 1998 Andrew MacLeod <amacleod@cygnus.com>
14641 * exception.cc: Include eh-common.h.
14642 (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
14643 (__cplus_type_matcher): First stab at new C++ runtime type matcher.
14644 (__cp_push_exception): Initialize eh_info struct as well.
14645 * except.c: Remove local structs and include eh-common.h.
14646 (init_exception_processing): Set language and version codes.
14647 (call_eh_info): Add presence of eh_info to runtime description of
14649 (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
14650 * semantics.c (finish_try_block): Call start_catch_block() and
14652 * parse.y (function_try_block): Call start_catch_block() and
14655 Thu May 14 12:27:34 1998 Brendan Kehoe <brendan@cygnus.com>
14657 * typeck.c (original_type): New function.
14658 (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
14659 to see if they're actually the same.
14660 * cp-tree.h (original_type): Declare.
14662 Wed May 13 12:54:30 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14664 * Makefile.in (lex.o): Depend on output.h.
14666 * call.c (add_function_candidate): Remove unused variable `cand'.
14667 (add_conv_candidate): Likewise.
14668 (build_builtin_candidate): Likewise.
14670 * cp-tree.h: Add prototype for `types_overlap_p'.
14672 * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
14674 * decl2.c (merge_functions): Remove unused variables `tmp' and
14677 * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
14678 (code_as_string): Likewise.
14679 (language_as_string): Likewise.
14680 (parm_as_string): Likewise.
14681 (op_as_string): Likewise.
14682 (assop_as_string): Likewise.
14683 (cv_as_string): Likewise.
14685 * lex.c: Include output.h.
14687 * pt.c (type_unification): Cast first argument of `bzero' to a char*.
14689 * search.c (dfs_no_overlap_yet): Mark parameter `t' with
14692 * tinfo.cc (__class_type_info::dcast): Change the type of variable
14693 `i' from int to size_t.
14695 * typeck.c (language_lvalue_valid): Mark parameter `exp' with
14698 Tue May 12 21:37:49 1998 Jason Merrill <jason@yorick.cygnus.com>
14700 * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
14701 DECL_NAMESPACE_SCOPE_P.
14702 (lang_decl_name): Likewise.
14703 * pt.c (tsubst_friend_function, tsubst): Likewise.
14704 * decl.c (pushdecl, redeclaration_error_message, start_decl,
14705 cp_finish_decl, start_function): Likewise.
14706 * class.c (finish_struct_1): Likewise.
14707 * call.c (build_over_call): Likewise.
14708 (compare_ics): Use DERIVED_FROM_P.
14710 Tue May 12 07:24:18 1998 Mark Mitchell <mmitchell@usa.net>
14712 * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
14713 * method.c (build_mangled_name): Use it.
14714 (build_decl_overload_real): Likewise.
14716 * error.c (dump_simple_decl): New function, broken out from ...
14717 (dump_decl): Use it.
14719 Mon May 11 11:38:07 1998 Mark Mitchell <mmitchell@usa.net>
14721 * ptree.c (lang_print_xnode): Add missing `break'.
14723 * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
14725 * call.c (add_template_candidate): Adjust for changes to
14726 fn_type_unification.
14727 (add_template_candidate_real): Likewise.
14728 (add_template_conv_candidate): Likewise.
14729 (build_user_type_conversion_1): Likewise.
14730 (build_new_function_call): Likewise.
14731 (build_object_call): Likewise.
14732 (build_new_op): Likewise.
14733 (build_new_method_call): Likewise.
14734 * class.c (instantiate_type): Likewise.
14735 * cp-tree.h (unification_kind_t): New type.
14736 (fn_type_unification): Adjust prototype.
14737 (type_unificaiton): Likewise.
14738 * pt.c (UNIFY_ALLOW_NONE): New macro.
14739 (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
14740 (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
14741 (UNIFY_ALLOW_DERIVED): Likewise.
14742 (unify): Change prototype.
14743 (maybe_adjust_types_for_deduction): New function.
14744 (check_cv_quals_for_unify): Likewise.
14745 (determine_specialization): Adjust.
14746 (fn_type_unification): Likewise.
14747 (type_unification): Likewise.
14748 (type_unification_real): Likewise. Use
14749 maybe_adjust_types_for_deduction. Fix mishandling of
14750 back-unification of template functions passed as arguments. Pass
14751 appropriate combination of UNIFY_ALLOW_* to unify.
14752 (unify): Remove unused NTPARMS parameter. Use
14753 check_cv_quals_for_unify. Remove bogus code that allowed
14754 too-generous unification in order to adhere more closely to standard.
14755 (get_bindings_real): Adjust.
14756 (get_class_bindings): Likewise.
14758 * method.c (build_overload_identifier): Only use the innermost
14759 template arguments when mangling.
14760 * pt.c (tsubst_template_argument_vector): New function.
14761 (complete_template_args): Deal with the situation where the
14762 extra_args contain more than one level of arguments.
14763 (lookup_template_class): Deal with member template classes, which
14764 may have more than one level of arguments.
14765 (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
14766 Improve handling of member template classes. Use
14767 DECL_PRIMARY_TEMPLATE instead of inline expansion. Use
14768 tsubst_template_argument_vector where appropriate.
14769 (regenerate_decl_from_template): Break out from ...
14770 (instantiate_decl): Here.
14772 * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
14773 * parse.h: Regenerated.
14774 * parse.c: Really regenerated.
14776 * cp-tree.h (finish_unary_op_expr): New function.
14777 (finish_id_expr): Likewise.
14778 (begin_new_placement): Likewise.
14779 (finish_new_placement): Likewise.
14780 (finish_declarator): Likewise.
14781 (finish_translation_unit): Likewise.
14782 (finish_parmlist): Likewise.
14783 (begin_class_definition): Likewise.
14784 (finish_class_definition): Likewise.
14785 (finish_default_args): Likewise.
14786 (finish_inline_definitions): Likewise.
14787 * parse.y (GCC_ASM_KEYWORD): Remove.
14788 (TYPENAME_ELLIPSIS): Likewise.
14789 * parse.c: Regenerated.
14790 Use new functions in semantics.c in the actions for many rules.
14791 * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
14792 * hash.h: Regenerated.
14793 * semantics.c (finish_expr_stmt): Allow NULL expr.
14794 (finish_unary_op_expr): New function, containing
14795 code previously in parse.y.
14796 (finish_id_expr): Likewise.
14797 (begin_new_placement): Likewise.
14798 (finish_new_placement): Likewise.
14799 (finish_declarator): Likewise.
14800 (finish_translation_unit): Likewise.
14801 (finish_parmlist): Likewise.
14802 (begin_class_definition): Likewise.
14803 (finish_class_definition): Likewise.
14804 (finish_default_args): Likewise.
14805 (finish_inline_definitions): Likewise.
14807 Sun May 10 23:43:13 1998 Mark Mitchell <mmitchell@usa.net>
14809 * typeck.c (build_c_cast): Don't decay arrays and functions to
14810 pointer type when converting to a class type.
14812 Sun May 10 22:53:56 1998 Jason Merrill <jason@yorick.cygnus.com>
14814 * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
14815 (DECL_CLASS_SCOPE_P): Likewise.
14817 Sun May 10 22:48:22 1998 H.J. Lu (hjl@gnu.org)
14819 * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
14820 * decl2.c (constructor_name_full): Likewise.
14822 Sun May 10 22:48:12 1998 Mike Stump <mrs@wrs.com>
14824 * tree.c (mapcar): Add OVERLOAD support.
14826 * init.c (resolve_offset_ref): We must use basetype_path before we
14827 destroy it with a call to convert_pointer_to.
14829 Sat May 9 14:44:37 1998 Jason Merrill <jason@yorick.cygnus.com>
14831 * class.c (currently_open_class): New fn.
14832 * decl.c (lookup_name_real): Use it.
14833 * search.c (lookup_field): Likewise.
14835 Fri May 8 23:32:42 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
14837 * cp-tree.def (OVERLOAD): New node.
14838 * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
14839 SET_IDENTIFIER_NAMESPACE_VALUE): Define.
14840 (NAMESPACE_BINDING): Remove.
14841 (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
14843 (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
14845 (tree_overload): New struct.
14846 (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
14847 (REAL_IDENTIFIER_TYPE_VALUE): Define.
14848 (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
14849 (lang_decl_flags): Remove in_namespace.
14850 (lang_decl): Remove chain.
14851 (DECL_CHAIN, DECL_NAMESPACE): Remove.
14852 (flag_honor_std): Declare extern.
14853 (identifier_type_value, pushdecl_namespace_level, push_using_decl,
14854 namespace_binding, set_namespace_binding,
14855 lookup_function_nonclass, cat_namespace_levels,
14856 set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
14857 scratch_ovl_cons, ovl_member, build_overload): Declare.
14858 (decl_list_length, get_namespace_id, current_namespace_id,
14859 overloaded_globals_p): Remove.
14860 (lookup_using_namespace, qualified_lookup_using_namespace): Change
14862 (push_scratch_obstack): New macro.
14863 * call.c (add_function_candidate): Special-case type of OVERLOAD node.
14864 (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
14866 (build_new_function_call): Iterate using OVL_CHAIN.
14867 Print DECL_NAME in when reporting ambiguities.
14868 (build_object_call): Iterate using OVL_NEXT for fns, convs.
14869 (build_new_op): Call lookup_function_nonclass.
14870 Iterate using OVL_NEXT.
14871 (build_op_delete_call): Change detection of members.
14872 Do not wrap TREE_LIST around fields and single global functions.
14873 (build_over_call): Don't push a class level if the context is a
14875 (build_new_method_call): Iterate using OVL_NEXT.
14876 * class.c (add_method): Chain overloaded members using
14877 build_overload. Remove copying of method.
14878 (grow_method): When iterating through the obstack, expect OVERLOAD
14879 nodes. Chain overload members.
14880 (finish_struct_methods): Chain overload members. Unpack OVERLOAD
14881 nodes in call to get_baselinks.
14882 (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
14883 (finish_struct_1): Iterate over ctor using OVL_NEXT. Handle
14884 fdecls that are OVERLOAD nodes.
14885 (validate_lhs): New function.
14886 (instantiate_type): Do not copy OVERLOAD nodes. Remove dead
14887 code. Use DECL_NAME in error messages. Split code between global
14888 and member function processing.
14889 * decl.c (global_type_node): New static variable.
14890 (in_std): New global.
14891 (struct binding_level): New field usings.
14892 (resume_binding_level): Assert that we are not in a class.
14893 (toplevel_bindings_p): Just check for namespace_p or
14895 (resume_level): Remove.
14896 (find_binding): New function.
14897 (binding_for_name): Call it.
14898 (namespace_binding, set_namespace_binding): New functions.
14899 (push_namespace): Associate binding level with new namespace,
14900 resume_binding_level for existing namespace. Remove old code.
14901 Fake std by counting.
14902 (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
14903 (maybe_push_to_top_level): Save current namespace.
14904 (pop_from_top_level): Restore saved namespace.
14905 (pop_namespace): Call suspend_binding_level. Remove old code.
14906 (cat_namespace_levels): New function.
14907 (set_identifier_type_value_with_scope): For namespace bindings,
14908 set BINDING_TYPE, and use global_type_node.
14909 Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
14910 (identifier_type_value): New function.
14911 (pushtag): If no context, use current_namespace.
14912 (duplicate_decls): Don't process DECL_CHAIN.
14913 (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
14914 already set. Never reset it to NULL_TREE. Lookup global variables
14915 in their namespace. Push overloaded templates if they are on
14917 (pushdecl_namespace_level): New function.
14918 (pushdecl_top_level): Implement using pushdecl_namespace_level.
14919 (pushdecl_using_decl): New function.
14920 (overloaded_globals_p): Remove.
14921 (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
14922 them. Use namespace_binding and set_namespace_value.
14923 (redeclaration_error_message): Complain if the declarations come
14924 from different namespaces.
14925 (lookup_tag): On namespace level, look in the BINDING_TYPE.
14926 (lookup_namespace_name): Pass tree_bindings from stack. Remove
14928 (select_decl): New function.
14929 (lookup_name_real): Call it for qualified and unqualified lookup.
14930 Pass tree_bindings from the stack.
14931 If prefer_type is 1, also accept namespaces.
14932 (lookup_function_nonclass): New function.
14933 (init_decl_processing): Set the binding level of the global
14934 namespace to global_binding_level.
14935 Build a proper type list for __builtin_apply.
14936 Initialize std_node to "fake std" if flag_honor_std is set.
14937 Initialize global_type_node.
14938 Allocated bad_alloc in namespace std if flag_honor_std.
14939 (define_function): Set the DECL_CONTEXT to the current_namespace.
14940 (start_decl): A namespace is not considered as a context here. If
14941 the DECL_CONTEXT is a namespace, push the decl.
14942 (cp_finish_decl): Check for namespaces used as initializers.
14943 (grokfndecl): Add namespace parameter. Remove processing of
14945 (grokvardecl): Add namespace parameter.
14946 (grokdeclarator): Process SCOPEs that are namespaces. For
14947 mangling, temporarily set the DECL_CONTEXT on anonymous structs.
14948 (start_function): Check for contexts that are namespaces.
14949 Set context for declarations that have not been pushed.
14950 (store_parm_decls): Check for ::main only.
14951 (finish_function): Likewise.
14952 (start_method): Check for contexts that are namespaces.
14953 (start_method): Remove DECL_CHAIN processing.
14954 * decl2.c (flag_honor_std): Declare.
14955 (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
14956 (decl_namespace_list): New static global.
14957 (grok_x_components): Ignore namespaces as type contexts.
14958 (check_classfn): Expect OVERLOAD nodes.
14959 (grokfield): Remove DECL_CHAIN processing.
14960 (finish_file): Call cat_namespace_levels.
14961 (merge_functions): New function.
14962 (ambiguous_decl): Rewrite.
14963 (lookup_using_namespace): Produce tree_bindings.
14964 (qualified_lookup_using_namespace): Likewise.
14965 (set_decl_namespace, decl_namespace, current_decl_namespace,
14966 push_decl_namespace, pop_decl_namespace): New functions.
14967 (arg_lookup): New struct.
14968 (add_function, arg_assoc_namespace, arg_assoc_class,
14969 arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
14971 (get_namespace_id, current_namespace_id): Remove.
14972 (do_toplevel_using_decl): Rewrite.
14973 (do_class_using_decl): Complain about namespace qualifiers.
14974 (do_using_directive): Sorry if not on namespace level. Complain
14975 about unknown namespaces.
14976 * error.c (dump_aggr_type): Check for namespace contexts.
14977 * except.c (init_exception_processing): Push terminate into std.
14978 * friend.c (is_friend): A namespace is not a context, here.
14979 * init.c (expand_member_init): Remove DECL_CHAIN processing.
14980 (build_offset_ref): Process OVERLOAD nodes.
14981 * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
14982 * lex.c (identifier_type): Loop using OVL_CHAIN.
14983 (see_typename): Set looking_for_typename to 2.
14984 (real_yylex): Likewise.
14985 (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
14986 (do_scoped_id): Expect OVERLOAD nodes.
14987 Change calling convention for qualified_lookup_using_namespace.
14988 (build_lang_decl): Don't set in_namespace anymore.
14989 * method.c (typevec_size): New global.
14990 (build_overload_nested_name): Return if global_namespace.
14991 Otherwise, always expect a declaration context.
14992 (build_qualified_name): Likewise.
14993 Make sure we don't write beyond typevec_size.
14994 (build_decl_overload_real): Likewise.
14995 Allocate one extra slot for the namespace.
14996 (hack_identifier): Mark code dead.
14997 Process OVERLOAD and NAMESPACE_DECL nodes.
14998 * parse.y (program): Pop namespaces until in global namespace.
14999 (extdef): In a using-declaration, don't discard the identifier if
15000 there is no declaration.
15001 (left_curly): Ignore type contexts which are namespaces.
15002 (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
15004 * pt.c (template_class_depth): Expect types to be namespaces.
15005 (determine_specialization): Simplify by expecting OVERLOAD nodes.
15006 (push_template_decl): Push into namespace level.
15007 Reset ctx if it is a namespace.
15008 Set DECL_CONTEXT to current_namespace if not set already.
15009 Ignore real contexts that are namespaces.
15010 (mangle_class_name_for_template): Skip global_namespace.
15011 Mangle other namespaces as declarations.
15012 (lookup_template_function): Set type of OVERLOAD nodes to unknown.
15013 (lookup_template_class): Push into namespace of context.
15014 If the context is a namespace, set it to global_namespace.
15015 Use id_context for mangling.
15016 (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
15017 (tsubst_friend_function): Ignore namespace contexts.
15018 Push into namespace level.
15019 (tsubst): Handle NAMESPACE_DECL nodes.
15020 Remove DECL_CHAIN processing.
15021 (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
15022 * ptree.c (print_lang_identifier): Print bindings.
15023 (lang_print_xnode): Print OVERLOAD nodes.
15024 * rtti.c (init_rtti_processing): Push type_info into std.
15025 * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
15026 (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
15027 dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
15028 lookup_fnfields_here): Likewise.
15029 Process all nodes, instead of going through TREE_CHAIN.
15030 * sig.c (build_signature_pointer_or_reference_type): Set context
15031 to global_namespace.
15032 (build_signature_table_constructor): Expect OVERLOAD nodes.
15033 * spew.c (yylex): Save old setting of looking_for_typename.
15034 * tree.c (decl_list_length): Remove.
15035 (binding_init): New function.
15036 (count_functions): Rewrite.
15037 (is_overloaded_fn): Expect OVERLOAD nodes.
15038 (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
15039 (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
15040 ovl_member): New functions.
15041 * typeck.c (require_complete_type): Expect OVERLOAD nodes.
15042 (type_unknown_p): Likewise.
15043 (require_instantiated_type): Likewise.
15044 (build_component_ref): Declare code dead.
15045 (build_x_function_call): Create and expect OVERLOAD nodes.
15046 (build_function_call_real): Check for ::main only.
15047 (build_unary_op): Likewise. Expect OVERLOAD nodes.
15048 (convert_for_assignment): Check for TREE_LIST before accessing
15050 * decl.c (duplicate_decls): Check for namespace bindings instead
15051 of global bindings.
15052 (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
15053 lookup_name_current_level, start_decl, xref_tag,
15054 finish_enum): Likewise.
15055 * init.c (build_offset_ref): Likewise.
15056 * search.c (lookup_field): Likewise.
15057 (lookup_fnfields): Likewise.
15058 (dfs_debug_mark): Likewise.
15059 * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
15060 (poplevel_class, pop_from_top_level): Likewise.
15061 * decl2.c (finish_method): Likewise.
15062 * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
15063 * decl.c (record_builtin_type): Likewise.
15064 (init_decl_processing, grokfndecl): Likewise.
15065 * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
15066 (make_lang_type): Likewise.
15067 * parse.y (make_thunk): Likewise.
15068 * pt.c (tsubst): Likewise.
15069 * tree.c (debug_binfo): Likewise.
15070 * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
15071 tinfo2.cc, inc/new.h: Add std qualifications.
15072 * inc/new: Wrap with namespace std if __HONOR_STD.
15073 * inc/typeinfo: Likewise.
15075 Fri May 8 00:43:50 1998 Jason Merrill <jason@yorick.cygnus.com>
15077 * call.c (build_user_type_conversion_1): Handle second_conv
15078 properly for templates.
15080 Thu May 7 17:09:25 1998 Andrew MacLeod <amacleod@cygnus.com>
15082 * method.c (build_decl_overload_real): Set TREE_USED flag to
15083 zero for build_type_variants nodes as well.
15085 Wed May 6 19:27:09 1998 Jason Merrill <jason@yorick.cygnus.com>
15087 * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
15089 Wed May 6 16:49:48 1998 Jim Wilson <wilson@cygnus.com>
15091 * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
15092 except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
15093 rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
15094 xref.o): Add toplev.h dependencies.
15096 Wed May 6 16:44:58 1998 Jeffrey A Law (law@cygnus.com)
15098 * errfn.c (cp_error, cp_warning): Remove declarations for
15099 error and warning respectively.
15101 Wed May 6 14:28:18 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15103 * error.c: Convert to using ctype macros defined in system.h.
15104 * method.c: Likewise.
15105 * xref.c: Likewise.
15106 * lex.c: Likewise. Also remove redundant system header stuff.
15108 Wed May 6 06:36:41 1998 Robert Lipe <robertl@dgii.com>
15110 * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
15111 expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
15112 search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
15113 xref.c: Add include of toplev.h.
15115 Wed May 6 02:33:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15117 * tree.c (perm_manip): Also regenerate the RTL of an extern.
15118 (copy_to_permanent): Use end_temporary_allocation.
15120 Tue May 5 23:54:04 1998 Jason Merrill <jason@yorick.cygnus.com>
15122 * init.c (expand_vec_init): The initialization of each array
15123 element is a full-expression.
15125 Tue May 5 18:24:13 1998 Andrew MacLeod <amacleod@cygnus.com>
15127 * method.c (build_mangled_name): Add a call to build_type_variant
15128 to get the right type.
15130 Tue May 5 01:25:03 1998 Jason Merrill <jason@yorick.cygnus.com>
15132 * Makefile.in: Add .SUFFIXES.
15134 * cp-tree.def: Remove NAMESPACE_DECL.
15136 Sun May 3 01:32:14 1998 Jason Merrill <jason@yorick.cygnus.com>
15138 * call.c (build_over_call): Do evaluate arg even if it has empty
15140 * decl.c (start_function): Don't push a member function.
15142 Thu Apr 30 18:59:23 1998 Jim Wilson <wilson@cygnus.com>
15144 * Makefile.in (g++FAQ.info): Put -o option before input file.
15146 Thu Apr 30 13:05:33 1998 Andrew MacLeod <amacleod@cygnus.com>
15148 * gxxint.texi: Add info for squangling codes K and B.
15150 Tue Apr 28 13:22:01 1998 Mark Mitchell <mmitchell@usa.net>
15152 * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
15153 the expression in templates.
15154 (finish_stmt_expr): Likewise.
15156 1998-04-28 Brendan Kehoe <brendan@cygnus.com>
15158 * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
15160 Mon Apr 27 13:58:10 1998 Mark Mitchell <mmitchell@usa.net>
15162 * decl.c (maybe_push_to_top_level): Always clear
15163 current_template_parms and processing_template_decl.
15164 (pushtag): Remove check of current_class_type and some comments,
15165 since maybe_push_to_top_level no longer creates confusion.
15167 Sun Apr 26 12:10:18 1998 Mark Mitchell <mmitchell@usa.net>
15169 * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
15170 (DECL_CLASS_TEMPLATE_P): Likewise.
15171 (DECL_PRIMARY_TEMPLATE): Likewise.
15172 (PRIMARY_TEMPLATE_P): Use it.
15173 (push_template_decl_real): New function.
15174 (redeclare_class_template): Take new template parameters as
15176 (is_specialization_of): New function.
15177 (comp_template_args): Declare.
15178 * decl.c (pushtag): Handle friend template classes.
15179 (xref_tag): Likewise. Use new calling convention for
15180 redeclare_class_template.
15181 * decl2.c (grok_x_components): Handle friend templates.
15182 * friend.c (is_friend): Use is_specialization_of where
15183 appropriate. Deal with friend class templates.
15184 (make_friend_class): Let a class template be friends with itself.
15185 * pt.c (comp_template_args): Remove declaration.
15186 (tsubst_friend_class): New function.
15187 (push_template_decl_real): New function.
15188 (push_template_decl): Use it.
15189 (redeclare_class_template): Adjust for new calling convention.
15190 (comp_template_args): Give it external linkage.
15191 (instantiate_class_type): Use tsubst_friend_class to deal
15192 with friend templates.
15193 * typeck.c (comptypes): Use comp_template_args, rather than
15194 expanding it inline.
15195 * parse.y (component_decl): Handle a nested template type
15196 like other component type declarations.
15198 * pt.c (check_explicit_specialization): Handle overloaded
15199 constructors correctly.
15201 * pt.c (mabybe_get_template_decl_from_type_decl): New function.
15202 (lookup_template_class): Use it.
15204 Thu Apr 23 21:19:06 1998 Jason Merrill <jason@yorick.cygnus.com>
15206 * cp-tree.def: Add WRAPPER. USER_CONV now only has two ops.
15207 * cp-tree.h: Add WRAPPER support.
15208 * call.c (add_candidate): Split out from add_*_candidate fns.
15209 (build_over_call): Take the candidate instead of function and args.
15210 Enforce access control here. Emit overload warnings here.
15211 (add_warning): New fn.
15212 (joust): Add WARN parm. If not set, call add_warning instead of
15213 printing a warning. Re-enable some warnings.
15214 (tourney): Pass it.
15215 (convert_like): Adjust.
15216 (build_new_op): Adjust.
15217 (build_new_function_call): Adjust.
15218 (build_user_type_conversion_1): Adjust.
15219 (USER_CONV_FN): Adjust.
15220 * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
15221 build_int_wrapper): New fns.
15223 Thu Apr 23 18:27:53 1998 Mark P. Mitchell <mmitchell@usa.net>
15225 * pt.c (unify): Fix typo in previous change.
15227 Thu Apr 23 09:32:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15229 * error.c (dump_type_real): Declare canonical_name.
15231 * typeck.c (comp_target_types): Fix PMFs.
15233 Wed Apr 22 13:24:48 1998 Mark Mitchell <mmitchell@usa.net>
15235 * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
15236 the DECL_RESULTs of a member TEMPLATE_DECL, not just the
15239 * pt.c (tsubst): Decrease the template-level of
15240 TEMPLATE_TEMPLATE_PARMS. Likewise for the DECL_INITIAL of a
15241 TEMPLATE_PARM_INDEX.
15242 (template_decl_level): New function.
15243 (unify): Make sure to record unifications for template
15244 parameters, even when the parameters exactly match the arguments.
15245 Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
15246 TEMPLATE_TYPE_PARMS. Don't try to unify template parameters that
15247 aren't from the level we're currently working on.
15249 Tue Apr 21 22:00:04 1998 Mark Mitchell <mmitchell@usa.net>
15251 * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
15253 * decl2.c (check_member_template): Set DECL_IGNORED for member
15254 class templates, too.
15256 * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
15258 Tue Apr 21 18:59:11 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
15260 * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
15262 Tue Apr 21 14:22:00 1998 Jeffrey A Law (law@cygnus.com)
15264 * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
15265 * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
15266 (init_decl_processing): Handle TI types.
15267 * typeck.c (unsigned_type, signed_type): Handle TI types.
15269 Sat Apr 18 15:25:21 1998 Jim Wilson <wilson@cygnus.com>
15271 * g++spec.c (lang_specific_driver): New argument in_added_libraries.
15272 New local added_libraries. Increment count when add library to
15275 Fri Apr 17 21:25:00 1998 Mark Mitchell <mmitchell@usa.net>
15277 * cp-tree.h (type_as_string_real): New function.
15278 * pt.c (mangle_class_name_for_template): Use it.
15279 * error.c (dump_aggr_type): Change prototype.
15280 (dump_type_prefix): Likewise.
15281 (dump_type_suffix): Likewise.
15282 (dump_type_real): Convert from dump_type. If desired, the
15283 "canonica" name of a typedef, i.e., the name of the underlying
15284 type, can be printed.
15285 (dump_type): Call dump_type_real.
15287 Fri Apr 17 14:30:45 1998 Jason Merrill <jason@yorick.cygnus.com>
15289 * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
15291 * typeck.c (comp_target_types): Tweak pedantic case.
15292 (comp_target_parms): Tweak pedantic case. Clean up somewhat.
15293 Return -1 or 1 instead of 1 or 2.
15294 (compparms): Remove STRICT handling.
15295 (convert_for_assignment): Fix handling of pmfs.
15297 Fri Apr 17 14:04:16 1998 Mark Mitchell <mmitchell@usa.net>
15299 * typeck.c (comp_target_types): Handle references like pointers.
15300 (comp_target_parms): Note that return code from comp_target_types
15301 can be negative to indicate failure.
15303 Fri Apr 17 09:10:52 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15305 * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
15306 which requires a working target compiler to build.
15308 Fri Apr 17 08:57:35 1998 Jeffrey A Law (law@cygnus.com)
15310 * tree.c (avoid_overlap): Add prototype.
15312 * spew.c (num_tokens): Add prototype.
15313 (nth_noken, add_token, consume_token, debug_yychar): Likewise.
15315 * search.c (dfs_check_overlap): Add prototype.
15316 (dfs_no_overlap_yet): Likewise.
15318 * pt.c (original_template): Add prototype.
15319 (inline_needs_template_parms): Likewise.
15320 (push_inline_template_parms_recursive): Likewise.
15321 (retrieve_specialization, register_specialization): Likewise.
15322 (print_candidates, reduce_template_parm_level): Likewise.
15323 (build_template_decl, mark_template_parm): Likewise.
15324 (tsubst_friend_function, get_bindings_real): Likewise.
15326 * method.c (start_squangling): Add prototype.
15327 (end_squangling, check_ktype, issue_ktype): Likewise.
15328 (build_overloaded_scope_ref, check_btype): Likewise.
15329 (build_mangled_template_parm_index): Likewise.
15331 * lex.c (init_cpp_parse): Add prototype.
15332 (handle_cp_pragma, handle_sysv_pragma): Likewise.
15333 (reduce_cmp, token_cmp): Likewise.
15335 * except.c (call_eh_info): Add prototype.
15336 (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
15337 (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
15339 * decl2.c (is_namespace_ancestor): Add prototype.
15340 (namespace_ancestor, add_using_namespace): Likewise.
15341 (ambiguous_decl): Likewise.
15343 * decl.c (indent): Add prototype.
15345 * call.c (add_template_candidate_real): Add prototype.
15347 Fri Apr 17 01:57:12 1998 Jason Merrill <jason@yorick.cygnus.com>
15349 * decl2.c (build_expr_from_tree): Just return a PMF.
15351 Fri Apr 17 00:45:12 1998 Mark Mitchell <mmitchell@usa.net>
15353 * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
15354 when doing initializations.
15356 * pt.c (unify): Use comptypes to compare type args.
15358 Fri Apr 17 00:24:22 1998 Jason Merrill <jason@yorick.cygnus.com>
15360 * decl.c (duplicate_decls): Fix check for when it's safe to free
15363 * pt.c (mangle_class_name_for_template): Don't pass a typedef type
15366 Thu Apr 16 17:47:30 1998 Jeffrey A Law (law@cygnus.com)
15368 * pt.c (build_template_parm_index): Add prototype.
15370 * search.c (my_tree_cons): Don't clear words outside the
15371 newly allocated node.
15373 Wed Apr 15 15:34:44 1998 Dave Brolley <brolley@cygnus.com>
15375 * lex.c (init_parse): Now returns char* containing the filename.
15377 Wed Apr 15 13:20:06 1998 John Carr <jfc@mit.edu>
15378 Jeff Law <law@cygnus.com>
15380 * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
15383 Sun Apr 12 22:31:19 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
15385 * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
15387 Fri Apr 10 12:16:49 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15389 * decl.c (duplicate_decls): Don't warn for redundant decls if
15390 friend: let add_friend take care of it.
15392 Thu Apr 9 02:40:48 1998 Jason Merrill <jason@yorick.cygnus.com>
15394 * sig.c (build_signature_pointer_constructor): Don't set
15395 TREE_HAS_CONSTRUCTOR for a signature pointer.
15396 * cvt.c (ocp_convert): Don't force a temporary for internal structs.
15397 * init.c (resolve_offset_ref): Warn about implicit & on pmfs
15399 * typeck.c (build_unary_op): Only allow taking the address of a
15401 * typeck2.c (digest_init): Simplify.
15402 (store_init_value): Don't pedwarn about using { } for pmfs.
15404 Thu Apr 9 22:16:57 1998 Per Bothner <bothner@cygnus.com>
15406 * cp-tree.h (start_decl): Update prototype.
15407 * decl.c (start_decl): Like the C version, new parameters
15408 for the attributes. Call cplus_decl_attributes here,
15409 (pushdecl): Like C version, do build_type_copy if TYPE_DECL,
15410 (grokdeclarator): Pass NULL for new start_decl arguments.
15411 * pt.c (tsubst_expr): Likewise.
15412 * parse.y: Merge cplus_decl_attribute calls into start_decl calls.
15413 * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
15414 * lex.c (build_lang_decl): Add lang_name_java.
15415 * class.c (push_lang_context): Add lang_name_java.
15416 * method.c (build_mangled_name): Check for is_java_type.
15418 Thu Apr 9 22:16:57 1998 Benjamin Kosnik <bkoz@loony.cygnus.com>
15420 * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
15421 * call.c (build_scoped_method_call): Check for TREE_CODE for
15422 VOID_TYPE instead of type == void_type_node.
15423 (build_method_call): Likewise.
15424 * decl.c (lookup_name_real): Likewise.
15425 (grokdeclarator): Likewise.
15426 (start_decl): Likewise.
15427 (grokparms): Likewise.
15428 (start_function): Likewise.
15429 (finish_function): Likewise.
15430 (start_method): Likewise.
15432 Thu Apr 9 00:18:44 1998 Dave Brolley (brolley@cygnus.com)
15434 * lex.c (finput): New variable.
15435 (init_cpp_parse): Renamed from init_parse.
15436 (init_parse): Handle !USE_CPPLIB. Call init_cpp_parse when finished.
15437 (finish_parse): New function.
15438 * cp-tree.h (init_lex, init_parse): Remove declarations.
15440 Mon Apr 6 02:25:05 1998 Jason Merrill <jason@yorick.cygnus.com>
15442 * call.c (build_call): Still evaluate the actual argument.
15443 * class.c (is_empty_class): Update for -fnew-abi.
15445 * decl2.c: -fnew-abi implies -fsquangle.
15447 * method.c (do_build_assign_ref): Don't do anything to copy
15449 (do_build_copy_constructor): Likewise.
15450 * call.c (build_over_call): Likewise.
15452 Sat Apr 4 18:43:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15454 * tree.c (avoid_overlap): Return a value.
15456 Sat Apr 4 12:52:35 1998 Jeffrey A Law (law@cygnus.com)
15458 * method.c (check_btype): Add missing argument to xrealloc.
15459 (check_ktype): Likewise.
15461 Fri Apr 3 02:22:59 1998 Jason Merrill <jason@yorick.cygnus.com>
15463 Implement empty base optimization.
15464 * class.c (finish_struct_1): Add vbase fields earlier. Set
15465 CLASSTYPE_SIZE of an empty base to 0. Types with bases can be empty.
15466 * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
15467 (types_overlap_p): New fn.
15468 * tree.c (avoid_overlap): New fn.
15469 (build_base_fields): Use it to avoid overlapping empty bases.
15470 * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
15472 * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
15474 Re-implement allocation of base class subobjects.
15475 * tree.c (unshare_base_binfos): New fn.
15476 (layout_basetypes): Use it. Now handles offsets of both virtual and
15477 non-virtual bases, after layout_type.
15478 (layout_vbasetypes): Remove.
15479 (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
15480 (build_vbase_pointer_fields): Split out from old layout_basetypes.
15481 * class.c (finish_base_struct): Lose offset handling code.
15482 Move nonvdtor warning here. Don't mess with t_binfo anymore.
15483 (finish_struct_1): Don't mess with t_binfo anymore. Use fns above.
15484 * cp-tree.h: Adjust.
15486 Thu Apr 2 14:25:13 1998 Jason Merrill <jason@yorick.cygnus.com>
15488 * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
15489 * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
15490 * class.c (duplicate_tag_error): Likewise.
15491 (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
15492 * tree.c (layout_vbasetypes): Update from layout_record, remove
15493 var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
15494 (layout_basetypes): Likewise.
15496 Wed Apr 1 18:22:25 1998 Jeffrey A Law (law@cygnus.com)
15498 * class.c, Make sure system.h is included just after config.h.
15499 Delete lingering stdio and errno references too.
15500 * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
15502 Wed Apr 1 15:38:36 1998 Jason Merrill <jason@yorick.cygnus.com>
15504 * friend.c (is_friend): Fix access control for local classes.
15506 * class.c (is_empty_class): New fn.
15507 * call.c (build_call): Don't pass empty class objects to a function.
15509 Wed Apr 1 14:58:35 1998 Mark Mitchell <mmitchell@usa.net>
15511 * call.c (build_over_call): Do name resolution for default
15512 arguments of function templates in the scope of the templates.
15514 Tue Mar 31 13:43:57 1998 Jeffrey A Law (law@cygnus.com)
15516 * call.c: Include system.h. Remove includes, declarations and
15517 defines provided by system.h.
15518 * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
15519 * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
15520 * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
15521 * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
15522 * typeck2.c, xref.c: Likewise.
15523 * Makefile.in: Dependencies updated as appropriate.
15524 * Make-lang.in: Likewise.
15526 Mon Mar 30 12:15:00 1998 Mark Mitchell <mmitchell@usa.net>
15528 * pt.c (fn_type_unification): Allow incomplete unification without
15529 an immediate error message.
15531 Mon Mar 30 08:55:42 1998 Jason Merrill <jason@yorick.cygnus.com>
15533 * tree.c (member_p): New fn.
15534 * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
15535 initializing class members.
15537 * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
15538 * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
15540 * call.c (build_method_call): Handle non-scoped destructors, too.
15541 * pt.c (tsubst_copy): Likewise.
15543 * pt.c (print_template_context): Split out...
15544 (push_tinst_level): ...from here.
15546 * friend.c (is_friend): Don't pass a type to decl_function_context.
15548 * typeck.c (convert_for_initialization): Always hand off
15549 conversions to class type.
15551 Sun Mar 29 20:01:59 1998 Jason Merrill <jason@yorick.cygnus.com>
15553 * friend.c (is_friend): Local classes have the same access as the
15554 enclosing function.
15556 Sun Mar 29 00:47:32 1998 Jeffrey A Law (law@cygnus.com)
15558 * typeck.c (expand_target_expr): Delete dead function.
15560 * search.c: Put various prototypes inside #ifdef MI_MATRIX.
15562 * repo.c (save_string): Delete dead function.
15564 * method.c (thunk_printable_name): Delete dead function.
15566 * lex.c (yynextch): Delete dead function.
15568 * expr.c (tree_extract_aggr_init): #if 0 out.
15570 * except.c (do_unwind): Delete dead function.
15571 (easy_expand_asm): Likewise.
15573 * cvt.c (build_conversion_type_1): Delete dead function.
15575 * cp-tree.h (push_expression_obstack): Declare.
15577 * call.c (source_type): #if 0 out.
15579 * class.c (alter_access): Remove unused label. Add braces
15580 around empty else clause.
15582 * lex.c (yyprint): Fix argument to printf.
15584 Sat Mar 28 17:43:52 1998 Mark Mitchell <mmitchell@usa.net>
15586 * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
15588 * pt.c (instantiate_class_template): Make sure template
15589 arguments are permanent.
15590 * init.c (resolve_offset_ref): Don't go looking around in
15593 * semantics.c: Add routines to handle expressions, and some
15594 declaration processing.
15595 * parse.y: Use them.
15596 (current_class_depth): Move declaration to cp-tree.h.
15597 * parse.c: Regenerated.
15598 * cp-tree.h: Use them.
15599 (current_class_depth): Declare.
15600 * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
15602 Fri Mar 27 20:23:18 1998 Mark Mitchell <mmitchell@usa.net>
15604 * error.c (dump_decl): Be a bit more explicit with template
15605 type arguments, when verbose.
15607 Fri Mar 27 18:16:40 1998 Jason Merrill <jason@yorick.cygnus.com>
15609 * inc/exception: Reorder closing braces.
15611 Fri Mar 27 13:22:18 1998 Mark Mitchell <mmitchell@usa.net>
15613 * pt.c (redeclare_class_template): New function.
15614 * cp_tree.h (redeclare_class_template): Declare it.
15615 * decl.c (xref_tag): Use it.
15617 Thu Mar 26 11:16:30 1998 Jason Merrill <jason@yorick.cygnus.com>
15619 * call.c (build_over_call): Check IS_AGGR_TYPE, not
15620 TYPE_LANG_SPECIFIC.
15621 * typeck.c (convert_arguments): Likewise.
15623 * decl.c (grokdeclarator): Remove const and volatile from type after
15624 setting constp and volatilep.
15626 * class.c (finish_struct_1): Don't warn about bool bitfield larger
15629 Thu Mar 26 10:25:52 1998 Mark Mitchell <mmitchell@usa.net>
15631 * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
15633 Thu Mar 26 10:24:05 1998 Mark Mitchell <mmitchell@usa.net>
15635 * call.c (build_object_call): Complain about ambiguous operator(),
15636 rather that crashing.
15637 (build_new_op): Likewise.
15638 (build_op_delete_call): Likewise.
15640 Thu Mar 26 10:23:24 1998 Mark Mitchell <mmitchell@usa.net>
15642 * cvt.c (perform_qualification_conversions): Use comp_target_types
15643 instead of comp_ptr_ttypes.
15645 Wed Mar 25 16:10:50 1998 Mark Mitchell <mmitchell@usa.net>
15647 * cp-tree.h (enforce_access): Declare.
15648 * call.c (enforce_access): Make it extern, not static.
15649 * class.c (alter_access): Use enforce_access; modify code for ISO
15650 compliance, rather than ARM rules.
15652 Wed Mar 25 12:10:45 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15654 * cp-tree.h: Fix typo.
15656 Wed Mar 25 02:01:02 1998 Jason Merrill <jason@yorick.cygnus.com>
15658 * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
15659 if (aggregate_value_p (type)).
15661 * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
15663 Tue Mar 24 16:12:01 1998 Mark Mitchell <mmitchell@usa.net>
15665 * tree.c (mapcar): When dealing with a DECL, use it's constant
15667 * pt.c (lookup_template_class): Don't mangle the names of template
15668 classes whose arguments are unknown.
15670 * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
15672 Tue Mar 24 12:21:55 1998 Benjamin Kosnik <bkoz@lisa.cygnus.com>
15674 * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
15676 Tue Mar 24 12:21:48 1998 Jim Wilson <wilson@cygnus.com>
15678 * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
15679 boolean_type_node to 1.
15681 Tue Mar 24 10:23:47 1998 Mark Mitchell <mmitchell@usa.net>
15683 * error.c (dump_expr): Remove unused variable `l'.
15685 * pt.c (for_each_template_parm): New function, created by
15686 converting uses_template_parms.
15687 (tree_fn_t): New typedef.
15688 (uses_template_parms): Use it.
15689 (mark_template_parm): New function.
15690 (push_template_decl): Check that the argument list of a partial
15691 specialization uses all the template parameters.
15693 * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
15694 with it; we might want it for debugging.
15695 * cp-tree.h (type_unification): Change interface.
15696 * class.c (finish_struct_1): Skip nested template types, just like
15697 ordinary nested types.
15698 (instantiate_type): Use new interface to type_unification.
15699 * lex.c (init_lex): Add __sz as opname for sizeof.
15700 * method.c (build_overload_scope_ref): New function.
15701 (build_overload_int): Handle complex expressions. Set
15702 numeric_output_need_bar if necessary.
15703 (build_overload_value): Handle non-PARM_DECL nodes; this
15704 routine is now used by build_overload_int. Remove some
15705 assignments to numeric_output_need_bar. Use
15706 build_overload_scope_ref.
15707 (build_qualified_name): Note that some template mangled names end
15708 with digits, and set numeric_output_need_bar appropriately. Use
15709 build_underscore_int.
15710 * pt.c (unify): Change interface.
15711 (type_unification_real): Likewise.
15712 (determine_specialization): Use new interfaces.
15713 (tsubst): Deal gracefully with situations in which the argument
15714 vector is not fully filled.
15715 (fn_type_unification): Use new interfaces.
15716 (type_unification): Likewise. Remove NOP_EXPR hack.
15717 (type_unification_real): Likewise.
15718 (unify): Likewise. Deal with unification of complex expressions.
15720 Mon Mar 23 12:24:37 1998 Jason Merrill <jason@yorick.cygnus.com>
15722 * pt.c (complete_template_args): Initialize skip properly.
15724 * decl.c (make_typename_type): Revert.
15725 (make_implicit_typename): Remove.
15726 (lookup_name_real): Don't call it. Call lookup_field if we see a
15727 TYPE_DECL from a template base.
15728 * search.c (lookup_field): Do implicit typename stuff.
15730 Sun Mar 22 00:50:42 1998 Nick Clifton <nickc@cygnus.com>
15731 Geoff Noer <noer@cygnus.com>
15733 * Makefile.in: Various fixes for building cygwin32 native toolchains.
15734 * Make-lang.in: Likewise.
15736 Fri Mar 20 18:07:39 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15738 * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
15740 Fri Mar 20 10:42:07 1998 Jason Merrill <jason@yorick.cygnus.com>
15742 * decl.c (make_implicit_typename): Rewrite removed code.
15743 (make_typename_type): Call it if the type we look up comes from
15744 a base that uses template parms.
15746 * pt.c (complete_template_args): Rewrite.
15747 (tsubst, FUNCTION_DECL): Use it.
15749 Fri Mar 20 08:12:43 1998 H.J. Lu (hjl@gnu.org)
15751 * semantics.c (finish_asm_stmt): Fix combine strings. Call
15752 c_expand_asm_operands () if output_operands, input_operands or
15753 clobbers is not NULL_TREE.
15755 Fri Mar 20 00:10:19 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15757 * pt.c (complete_template_args): New function.
15758 (get_bindings): Deal with specializations of function templates
15759 with return type containing parameters from outer class
15761 (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
15762 substitute arguments and compose a new type.
15764 Thu Mar 19 19:01:48 1998 Mark Mitchell <mmitchell@usa.net>
15766 * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
15769 Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com>
15771 * decl.c (make_implicit_typename): Lose useless code.
15773 * call.c (standard_conversion): Handle A* -> const A* properly.
15775 * pt.c (get_bindings_real): Rename from get_bindings. Add
15776 check_rettype parm.
15777 (get_bindings): Pass 1.
15778 (get_bindings_overload): Pass 0.
15780 Wed Mar 19 09:08:12 1998 Mark Mitchell <mmitchell@usa.net>
15782 * pt.c (check_explicit_specialization): When reverting a static
15783 member function, also remove the `this' parameter from
15784 last_function_parms.
15786 Thu Mar 19 02:27:48 1998 Jason Merrill <jason@yorick.cygnus.com>
15788 * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
15789 a function context.
15791 * decl.c (store_bindings): Use free_binding_vecs.
15792 (pop_from_top_level): Likewise.
15794 Wed Mar 18 12:41:43 1998 Jason Merrill <jason@yorick.cygnus.com>
15796 * decl.c (make_implicit_typename): Only change the type of a
15799 Wed Mar 18 10:09:51 1998 Mark Mitchell <mmitchell@usa.net>
15801 * semantics.c: New file, containing routines to perform the
15802 semantic phase of parsing.
15804 * pt.c (tsubst_expr): Likewise.
15805 * cp-tree.h: Declare the various functions in semantics.c.
15806 Provide macros to access _STMT tree nodes.
15807 * cp-tree.def: Add ASM_STMT tree node.
15808 * Makefile.in, Make-lang.in: Add dependencies on and for
15811 Wed Mar 18 00:24:10 1998 Jason Merrill <jason@yorick.cygnus.com>
15813 * pt.c (push_template_decl): Only check primary templates.
15815 * pt.c (check_explicit_specialization): Complain about default args
15816 in explicit specialization.
15818 * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
15819 constructor_declarator.
15821 Tue Mar 17 14:44:54 1998 Mark Mitchell <mmitchell@usa.net>
15823 * typeck2.c (build_x_arrow): Don't crash when an aggregate type
15824 has no overloaded operator ->.
15826 * call.c (build_field_call): Don't crash when presented with a
15827 field that is actually a nested type.
15829 * decl.c (pushtag): Deal with friend class injection in local
15832 * call.c (build_object_call): Don't crash if OBJ is a
15833 pointer-to-member-function.
15835 Tue Mar 17 11:40:26 1998 Jason Merrill <jason@yorick.cygnus.com>
15837 * pt.c (push_template_decl): Complain about template with C linkage,
15838 anonymous template class.
15840 Mon Mar 16 12:10:39 1998 Jason Merrill <jason@yorick.cygnus.com>
15842 * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
15843 * search.c: Likewise.
15845 * lex.c (do_pending_defargs): Only call
15846 maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
15848 * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
15850 Mon Mar 16 10:47:22 1998 Mark Mitchell <mmitchell@usa.net>
15852 * parse.y: Deal with CONSTRUCTORS in new_initializers.
15854 Mon Mar 16 10:54:21 1998 Mark Mitchell <mmitchell@usa.net>
15856 * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
15857 closely mimics the behavior in parse.y.
15858 (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
15859 into a compound statement.
15861 Sun Mar 15 02:07:26 1998 Jason Merrill <jason@yorick.cygnus.com>
15863 * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
15864 * pt.c (inline_needs_template_parms): New fn.
15865 (original_template): New fn.
15866 (push_inline_template_parms_recursive): New fn.
15867 (maybe_begin_member_template_processing): Use them.
15868 (maybe_end_member_template_processing): Likewise.
15869 (is_member_or_friend_template): Rename to is_member_template.
15870 Member functions of local classes are never member templates.
15872 Sun Mar 15 01:14:22 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
15874 * lex.c (do_identifier): Handle TEMPLATE_DECL that was
15875 added in the class scope to catch redefinition error.
15877 * pt.c (reduce_template_parm_level): Also copy
15878 the DECL_TEMPLATE_PARMS field.
15880 Sun Mar 15 10:54:08 1998 Mark Mitchell <mmitchell@usa.net>
15882 * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
15883 reduced-level template type parameter.
15885 Sun Mar 15 12:26:02 1998 Manfred Hollstein <manfred@s-direktnet.de>
15887 * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
15888 (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
15889 * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
15890 * decl.c (duplicate_decls): Propagate it.
15891 * typeck2.c (abstract_virtuals_error): Use two loops to emit
15892 abstract virtual functions and virtual functions which need a
15893 final overrider separately.
15895 Thu Mar 12 09:39:40 1998 Manfred Hollstein <manfred@s-direktnet.de>
15897 * lang-specs.h: Properly put brackets around array elements in
15900 * typeck.c (build_binary_op_nodefault): Correctly place parens around
15901 && and || in expression.
15903 Thu Mar 12 09:26:04 1998 Manfred Hollstein <manfred@s-direktnet.de>
15905 * call.c (default_parm_conversions): Remove prototype definition.
15906 (build_method_call): Remove unused variable result.
15908 * cvt.c (ocp_convert): Remove unused variable conversion.
15910 * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
15912 * except.c (do_unwind): #if 0 definition of unused variables fcall
15915 * expr.c (extract_scalar_init): #if 0 prototype and function
15918 * init.c (expand_aggr_init_1): Remove unused variable init_type.
15919 (build_new_1): Remove unused variable t.
15921 * pt.c (instantiate_class_template): Remove unused variable newtag;
15922 cast called function return value to void.
15923 (do_decl_instantiation): Remove unused variables name and fn.
15925 * tree.c (get_type_decl): Add default return to shut up compiler from
15926 complaining control reaches end of non-void function.
15928 * typeck.c (build_x_conditional_expr): Remove unused variable rval.
15930 Thu Mar 12 09:12:15 1998 Manfred Hollstein <manfred@s-direktnet.de>
15932 * call.c (default_parm_conversions): Remove prototype definition.
15933 (build_method_call): Remove unused variable result.
15934 (build_over_call): Add default case in enumeration switch.
15936 Thu Mar 12 08:39:13 1998 Manfred Hollstein <manfred@s-direktnet.de>
15938 * decl2.c (lang_decode_option): Change j's type to size_t.
15940 * tree.c (layout_vbasetypes): record_align and desired_align are of
15941 type unsigned int; const_size and nonvirtual_const_size likewise.
15943 Wed Mar 11 07:25:20 1998 Mark Mitchell <mmitchell@usa.net>
15945 * parse.y (new_initializer): Make sure all initializers are
15948 Tue Mar 10 07:32:36 1998 Mark Mitchell <mmitchell@usa.net>
15950 * decl2.c (import_export_decl): Mark tinfo functions for
15951 cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
15953 Fri Mar 6 23:27:35 1998 Jeffrey A Law (law@cygnus.com)
15955 * method.c: Fix typo.
15957 Fri Mar 6 10:06:59 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15959 * method.c: Include "system.h" to get stdlib.h, stdio.h,
15960 ctype.h, string.h, etc.
15961 (issue_nrepeats): Add default case in enumeration switch.
15962 (check_btype): Likewise.
15963 (process_overload_item): Likewise.
15965 * Makefile.in (method.o): Depend on system.h.
15967 Wed Mar 4 22:26:53 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
15969 * lex.c (do_scoped_id): Fix parenthesizing.
15971 Wed Mar 4 12:11:53 1998 Michael Tiemann <tiemann@axon.cygnus.com>
15973 * rtti.c (get_tinfo_fn_dynamic): If this function is called an
15974 FLAG_RTTI is unset, initialize type info machinery and continue
15975 with FLAG_RTTI enabled.
15976 (get_typeid): Likewise.
15978 Wed Mar 4 11:47:55 1998 Jason Merrill <jason@yorick.cygnus.com>
15980 * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
15983 Wed Mar 4 11:28:08 1998 Mark Mitchell <mmitchell@usa.net>
15985 * pt.c (finish_member_template_decl): Deal more gracefully with
15986 invalid declarations.
15988 Tue Mar 3 01:38:17 1998 Jason Merrill <jason@yorick.cygnus.com>
15990 * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
15991 cp-tree.h: Clean up more old overloading code, old RTTI code, and
15992 some formatting quirks.
15994 * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
15995 method.c, pt.c, ptree.c, typeck.c: Remove support for
15996 -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
15998 * Makefile.in: Adjust.
16000 * pt.c (unify): Don't allow reduced cv-quals when strict.
16002 * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
16003 *type_unification* and unify.
16005 Mon Mar 2 12:11:06 1998 Jason Merrill <jason@yorick.cygnus.com>
16007 * parse.y (explicit_template_type): Remove TEMPLATE keyword.
16008 (nested_name_specifier): And add it before this use.
16009 (typename_sub0): And this use. Also add use without the keyword.
16010 (typename_sub1): Likewise.
16011 * pt.c (instantiate_class_template): Don't actually instantiate
16012 anything if our type uses template parms.
16014 Mon Mar 2 11:04:59 1998 Jim Wilson <wilson@cygnus.com>
16016 * decl.c (start_function): Don't call temporary_allocation for a
16019 Sun Mar 1 21:06:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16021 * pt.c (instantiate_class_template): Don't mess with friends if
16022 our type uses template parms.
16024 Sat Feb 28 12:06:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16026 * parse.y (nested_name_specifier): Use explicit_template_type.
16027 (typename_sub): Allow a template_type, an explicit_template_type,
16028 or an implicit template type at the end.
16029 * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
16030 * decl.c (make_typename_type): Handle template-id where the name
16031 is a TEMPLATE_DECL.
16032 * call.c (build_scoped_method_call): Handle member template
16034 * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
16035 destructor is represented by the type.
16037 * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
16038 * parse.y (nested_name_specifier): Add 'template' case.
16039 (explicit_template_type): New rule.
16040 (typename_sub): Use it.
16041 * decl.c (make_typename_type): Handle getting a template-id for NAME.
16042 * pt.c (tsubst): Likewise.
16044 Fri Feb 27 11:17:50 1998 Jason Merrill <jason@yorick.cygnus.com>
16046 * pt.c (add_to_template_args): Fix thinko.
16047 (instantiate_class_template): Call it later.
16049 * pt.c (get_class_bindings): Add outer_args parm.
16050 (most_specialized_class): Likewise.
16051 (instantiate_class_template): Pass it.
16052 (more_specialized_class): Likewise.
16053 (lookup_template_class): Get context from template if none
16055 (finish_member_template_decl): Don't do anything with a
16056 partial specialization.
16057 * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
16059 * class.c (finish_struct): Member class templates have already been
16060 checked for name clashes.
16061 * decl.c (pushdecl_with_scope): Handle pushing at class level.
16063 Fri Feb 27 02:25:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16065 * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
16066 (tsubst, *_PARM): Support multiple levels of template classes.
16067 (instantiate_class_template): Look up the pattern from the
16069 (lookup_template_class): Handle getting a template for d1.
16070 (push_template_decl): Correct setting of 'primary'.
16071 (reduce_template_parm_level): Add 'levels' parm.
16072 (finish_member_template_decl): Support member class templates.
16073 (template_class_depth): Handle multiple levels.
16074 * parse.y (component_decl_1, fn.def2): Remove member template case.
16075 (component_decl): Add member template cases.
16076 * decl2.c (check_member_template): We now handle member template
16078 * decl.c (pushtag): Handle member templates.
16079 * method.c (do_inline_function_hair): Don't touch
16080 IDENTIFIER_GLOBAL_VALUE.
16081 * init.c (build_offset_ref): If name isn't an identifier, just
16083 * spew.c (yylex): Handle PTYPENAME like TYPENAME.
16085 * typeck.c (get_delta_difference): Do adjust for conversions to
16086 and from virtual base.
16088 Wed Feb 25 09:51:29 1998 Jason Merrill <jason@yorick.cygnus.com>
16090 * typeck.c (get_delta_difference): Give hard error for conversion
16093 * cp-tree.h: Tweak formatting.
16095 Wed Feb 25 00:35:33 1998 Jason Merrill <jason@yorick.cygnus.com>
16097 * decl.c (push_namespace): Handle redeclaration error.
16099 * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
16100 (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
16101 (NAMESPACE_BINDING): New macro.
16102 (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
16105 * pt.c (push_template_decl): Use innermost_args.
16107 * decl.c (get_unique_name): Tweak from earlier in the name.
16109 Tue Feb 24 22:15:04 1998 Martin von Loewis <loewis@informatik.hu-berlin.de>
16111 * cp-tree.def: Add CPLUS_BINDING node.
16112 * cp-tree.h (tree_binding): New struct.
16113 (BINDING_SCOPE, BINDING_VALUE): New macros.
16114 (current_namespace, global_namespace): Declare extern.
16115 (struct lang_decl_flags): New field in_namespace.
16116 (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
16117 (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
16118 (TREE_INDIRECT_USING): New macro.
16119 * decl2.c (current_namespace, global_namespace): Declare. The
16120 value is a NAMESPACE_DECL now, not a TREE_LIST.
16121 (is_namespace_ancestor, namespace_ancestor): New static functions.
16122 (add_using_namespace, ambiguous_decl): Likewise.
16123 (lookup_using_namespace): New support function for lookup_name.
16124 (qualified_lookup_using_namespace): New support function for
16125 do_scoped_id and lookup_namespace_name.
16126 (get_namespace_id): Mark as obsolete.
16127 (current_namespace_id): Likewise.
16128 (do_namespace_alias): Implement.
16129 (do_using_directive): Implement as call to add_using_namespace.
16130 * decl.c (binding_for_name): New function.
16131 (push_namespace, pop_namespace): Implement.
16132 (push_decl): Don't install a FUNCTION_DECL in the global branch.
16133 (lookup_namespace_name): Implement using qualified lookup.
16134 (lookup_name_real): For global scoping, lookup in
16135 global_namespace. For namespace scoping, lookup in given
16136 namespace. For unscoped lookup, iterate over namespace,
16137 considering using directives.
16138 (init_decl_processing): Initialize global_namespace.
16139 (grokvardecl): Build assembler name as static name for globals.
16140 (grokdeclarator): Remove old namespace mangling.
16141 (xref_tag): When installing a global binding for the
16142 tag, make sure we have an identifier.
16143 * method.c (build_overload_nested_name): Mangle namespaces.
16144 (build_qualified_name): Likewise.
16145 (build_decl_overload_real): Likewise.
16146 * lex.c (build_lang_decl): Set namespace for new declaration to
16148 (do_scoped_id): Find global names in global or current
16149 namespace, or using qualified namespace lookup, depending on
16151 * init.c (build_member_call): When scope is namespace, use
16152 build_x_function_call instead.
16153 (build_offset_ref): When scope is namespace, collapse processing
16154 to lookup_namespace_name instead.
16155 * error.c (dump_decl): Support NAMESPACE_DECL.
16156 * decl.c (pushdecl): Bind globals to current namespace.
16157 (push_overloaded_decl): Likewise.
16158 (lookup_tag): Likewise.
16159 (lookup_name_current_level): Likewise.
16160 (xref_tag): Likewise.
16161 (start_function): Likewise.
16162 * lex.c (do_identifier): Likewise.
16163 (identifier_typedecl_value): Likewise.
16164 (real_yylex): Likewise.
16165 * method.c (do_inline_function_hair): Likewise.
16166 * parse.y (unscoped): Likewise.
16167 * pt.c (check_explicit_specialization): Likewise.
16168 (lookup_template_class): Likewise.
16169 * rtti.c (call_void_fn): Likewise.
16170 * sig.c (build_sigtable): Likewise.
16171 * ptree.c (lang_print_xnode): New function.
16173 Tue Feb 24 01:40:24 1998 Jason Merrill <jason@yorick.cygnus.com>
16175 * pt.c (instantiate_class_template): Don't instantiate if pedantic
16176 and the args use template parms.
16178 * pt.c (push_tinst_level): If the instantiation uses template parms,
16180 * decl.c (xref_basetypes): Do call complete_type for basetypes
16181 that involve template parameters.
16183 Tue Feb 24 00:36:43 1998 Jason Merrill <jason@yorick.cygnus.com>
16185 * typeck2.c (process_init_constructor): Fix labeled init check.
16187 Mon Feb 23 05:08:55 1998 Jason Merrill <jason@yorick.cygnus.com>
16189 * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
16190 argument to tsubst and friends.
16192 * pt.c (tsubst, FUNCTION_DECL): Tidy.
16194 * typeck.c (build_x_function_call): Handle static member function
16195 templates like non-templates. Handle friend templates like normal
16196 function templates.
16197 * pt.c (tsubst, *_PARM): Don't use orig_level.
16198 (get_bindings): Don't call add_to_template_args.
16199 (instantiate_template): Likewise.
16200 (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
16201 * ptree.c (print_lang_type): Print index/level for template parms.
16203 Mon Feb 23 02:52:29 1998 Mark Mitchell <mmitchell@usa.net>
16205 * Make-lang.in (cc1plus): Note that cc1plus depends on
16206 cp/cp-tree.h and cp/cp-tree.def.
16208 * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
16209 (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
16210 position in a template parameter list.
16211 * cp-tree.h (template_parm_index): New structure, used as the tree
16212 structure for a TEMPLATE_PARM_INDEX.
16213 (TEMPLATE_PARM_IDX): New macro.
16214 (TEMPLATE_PARM_LEVEL): Likewise.
16215 (TEMPLATE_PARM_DESCENDANTS): Likewise.
16216 (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
16217 (TEMPLATE_PARM_DECL): Likewise.
16218 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
16219 (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
16220 (TEMPLATE_TYPE_DECL): Likewise.
16221 (TEMPLATE_CONST_IDX): Remove.
16222 (TEMPLATE_CONST_LEVEL): Likewise.
16223 (TEMPLATE_CONST_SET_INFO): Likewise.
16224 (TEMPLATE_TYPE_SET_INFO): Likewise.
16225 (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
16227 (TEMPLATE_TYPE_LEVEL): Likewise.
16228 * decl.c (decls_match): Call comp_template_parms, rather than
16229 expanding it inline.
16230 (duplicate_decls): If two template declarations are being merged,
16231 then their TEMPLATE_INFOs should be merged as well.
16232 (grokfndecl): Save template-id information when declaring a friend
16233 with explicit template arguments. Pass arguments to
16234 check_explicit_specialization via correct convention; at some
16235 point check_explicit_specialization changed, but these call-sites
16237 (grokdeclarator): Tidy up slightly.
16238 * decl2.c (check_classfn): Tidy up slightly. Don't assume that
16239 two template functions with the same DECL_ASSEMBLER_NAME the same,
16240 since the names are not yet mangled.
16241 * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
16242 TEMPLATE_CONST_PARM.
16243 (dump_expr): Likewise. Use the TEMPLATE_PARM_DECL to get at the
16244 decl for a non-type parameter, rather than printing `<tparm ...>'.
16245 * friend.c (is_friend): Handle TEMPLATE_DECL friends.
16246 (do_friend): Deal with template friends.
16247 * lex.c (do_pending_inlines): Call
16248 maybe_begin_member_template_processing, rather than
16249 conditionally calling begin_member_template_processing.
16250 (process_next_inline): Likewise. Call
16251 maybe_end_member_template_processing, rather than
16252 conditionally calling end_member_template_processing.
16253 (do_pending_defargs): Likewise.
16254 (do_identifier): Use TEMPLATE_PARM_INDEX instead of
16255 TEMPLATE_CONST_PARM.
16256 * method.c (build_mangled_template_parm_index): New function.
16257 (build_overload_value): Use it.
16258 (build_overload_name): Likewise.
16259 * pt.c (finish_member_template_decl): Allow friend declarations.
16260 (template_class_depth): New function.
16261 (is_member_template): Rename, and modify, to become...
16262 (is_member_or_friend_template): New function.
16263 (end_member_template_processing): Rename, and modify, to become...
16264 (maybe_end_member_template_processing).
16265 (build_template_parm_index): New function.
16266 (reduce_template_parm_level): New function.
16267 (process_template_parm): Modify to use build_template_parm_index.
16268 (push_template_decl): Deal with friend templates.
16269 (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
16270 TEMPLATE_CONST_PARM.
16271 (tsubst_friend_function): New function.
16272 (instantiate_class_template): Generate the DECL_FRIENDLIST
16273 for a new instantiation by using tsubst_friend_function rather
16275 (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
16276 Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
16277 appropriate new macros. Use reduce_template_parm_level to
16278 generate lower-level template parameters. Handle tsubst'ing into
16279 TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS. Don't forget
16280 to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
16281 templates. Similarly for the template parameters for a new
16283 (tsubst_copy): Tidy up slightly. Use TEMPLATE_PARM_INDEX instead
16284 of TEMPLATE_CONST_PARM. Handle TYPE_DECLs by tsubsting into them.
16285 (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
16286 (get_bindings): Call add_to_template_args if necessary.
16287 (instantiate_decl): Handle instantiations of friend templates.
16288 * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
16289 TEMPLATE_TYPE_PARM as a list of fields; it's not!
16290 * spew.c (yylex): Do a little manual constant propagation to
16293 Sun Feb 22 19:53:29 1998 Jeffrey A Law (law@cygnus.com)
16295 * error.c: Include sys/types.h.
16297 Thu Feb 19 14:49:09 1998 Jeffrey A Law (law@cygnus.com)
16299 * method.c (build_mangled_name): Start CPP directives in column zero.
16301 Thu Feb 19 10:36:48 1998 Jason Merrill <jason@yorick.cygnus.com>
16303 * typeck2.c (process_init_constructor): Sorry about non-trivial
16304 labeled initializers.
16305 * parse.y (initlist): Re-enable labeled initializers.
16307 Thu Feb 19 10:15:55 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16309 * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
16310 all callers changed. Rely on the new parameter instead of arg
16311 being a TREE_LIST when determine whether we are working inside
16312 template template parameter. Clean up is_type test.
16314 Thu Feb 19 10:04:12 1998 Jason Merrill <jason@yorick.cygnus.com>
16316 * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
16317 * typeck2.c (initializer_constant_valid_p): Allow conversions
16318 between pointers and references.
16320 1998-02-19 Brendan Kehoe <brendan@cygnus.com>
16322 * typeck.c (build_unary_op): Only warn about incr/decr a pointer
16323 if pedantic || warn_pointer_arith.
16325 Thu Feb 19 09:37:21 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16327 * pt.c (unify): Handle TEMPLATE_DECL.
16329 1998-02-18 Brendan Kehoe <brendan@cygnus.com>
16331 * cp-tree.h (strip_attrs): Remove decl.
16333 1998-02-18 Doug Evans <devans@cygnus.com>
16335 * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
16336 Update olddecl's attributes too.
16337 (strip_attrs): Remove function.
16338 * typeck.c (common_type): Call merge_machine_type_attributes.
16340 Tue Feb 17 14:07:52 1998 Mark Mitchell <mmitchell@usa.net>
16342 * parse.y (initdcl0_innards): New grammar symbol.
16343 (nomods_initdecls, nomods_initdcl0): Change type from itype to
16344 none, since the resulting value is never used.
16345 (parse_decl): New function.
16346 (datadef): Remove redundant actions.
16347 (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
16348 * parse.c: Regenerated.
16350 Tue Feb 17 11:54:16 1998 Jason Merrill <jason@yorick.cygnus.com>
16352 * parse.y (simple_stmt): Use getdecls() to check for decl.
16354 Sat Feb 14 11:50:51 1998 Manfred Hollstein <manfred@s-direktnet.de>
16356 * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
16358 (c++.install-common): Install c++filt properly as native or as cross
16360 (c++.uninstall): Add c++filt.
16362 Fri Feb 13 14:55:37 1998 Jason Merrill <jason@yorick.cygnus.com>
16364 * call.c (standard_conversion): Fix multi-level ptr conversions.
16366 Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
16368 * init.c (build_new): Propagate error_mark_node up.
16370 Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com>
16372 * parse.y (simple_stmt): If the condition isn't a declaration,
16373 start the controlled block after the test.
16375 Fri Feb 13 02:26:10 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
16377 * call.c (build_over_call): Convert builtin abs, labs and fabs to
16379 * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
16382 Fri Feb 13 01:36:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16384 * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
16386 Fri Feb 13 00:21:59 1998 Jason Merrill <jason@yorick.cygnus.com>
16388 * cp-tree.h: Add access_protected_virtual_node.
16389 * class.c (init_class_processing): Initialize it.
16390 * decl.c (xref_basetypes): Use it.
16391 * parse.y (base_class_access_list): Likewise.
16393 * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
16394 (c++.install-common): Install c++filt.
16396 Thu Feb 12 12:46:51 1998 Benjamin Kosnik <bkoz@rhino.cygnus.com>
16398 * decl.c (shadow_tag): Give error for typedef-ing built-in types.
16400 Wed Feb 11 23:28:05 1998 Mark Mitchell <mmitchell@usa.net>
16402 * call.c (reference_binding): Use comptypes when comparing
16403 TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
16405 Wed Feb 11 16:42:04 1998 Mark Mitchell <mmitchell@usa.net>
16407 * tree.c (is_overloaded_fn): Use really_overloaded_fn.
16408 (really_overloaded_fn): Move check here from is_overloaded_fn.
16409 (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
16411 Wed Feb 11 15:54:18 1998 Mark Mitchell <mmitchell@usa.net>
16413 * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
16416 Mon Feb 9 22:23:31 1998 Mark Mitchell <mmitchell@usa.net>
16418 * cp-tree.h (push_template_decl): Return the decl passed in, or an
16419 equivalent duplicate.
16420 * decl.c (pushtag): Use the return value from push_template_decl.
16421 (duplicate_decls): When duplicating a template declaration, merge
16422 the DECL_TEMPLATE_RESULTs as well.
16423 (make_implicit_typename): Don't try to dive into typename types to
16424 find a context for making a new implicit typename.
16425 (start_decl): Use the return value from push_template_decl.
16426 (grokdeclarator): Complain about declarations list `const operator
16427 int'. Since we don't correctly handle in-class initializations of
16428 non-static data members, complain about this (now illegal)
16429 practice. Issue an error for initializations of non-const statics
16430 since that is illegal as well, and since we don't handle that case
16432 (start_function): Use the return value from push_template_decl.
16433 (start_method): Likewise.
16434 * decl2.c (grokfield): Likewise. Since the change to
16435 grokdeclarator ensures that all initialized fields are in fact
16436 static, remove a redundant test for TREE_PUBLIC.
16437 * parse.y (initlist): Disable labeled initializers since they do
16438 not work as per the documentation, and since they do not use the
16439 same syntax as the C front end.
16440 * pt.c (push_template_decl): Return the decl passed in, or an
16441 equivalent duplicate.
16442 (lookup_template_class): When searching in a nested context,
16443 use the right arguments.
16444 (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
16445 * typeck.c (build_component_ref): Assign the correct type to the
16446 result of build_vfn_ref.
16448 Tue Feb 10 23:56:46 1998 Jason Merrill <jason@yorick.cygnus.com>
16450 * pt.c (convert_nontype_argument): Fix typo.
16451 (check_explicit_specialization): Allow old-style specialization
16452 of class template members.
16454 Tue Feb 10 20:36:52 1998 Jason Merrill <jason@yorick.cygnus.com>
16455 Manfred Hollstein <manfred@s-direktnet.de>
16457 * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
16458 when deciding to override DECL_ASSEMBLER_NAME.
16460 Tue Feb 10 15:30:55 1998 Andrew MacLeod <amacleod@torpedo.to.cygnus.com>
16462 * decl2.c (lang_f_options): Add -fsquangle to option processing list.
16463 * cp-tree.h (flag_do_squangling): Add declaration.
16464 * lang-options.h: Add -fsquangle and -fno-squangle.
16465 * method.c: Add macros and static variables for squangling.
16466 (build_overload_name): Rename to build_mangled_name, add logic for B
16467 compression, and split into process_modifiers and
16468 process_overload_item.
16469 (process_modifiers): New function, to handle constant, reference,
16471 (process_overload_item): New function, handles issue of type codes.
16472 (build_overload_name): New function, start squangling and call
16473 build_mangled_name.
16474 (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
16475 (start_squangling): New function to initialize squangling structs.
16476 (end_squangling): New function to destroy squangling structs.
16477 (nrepeats): Rename variable to Nrepeats.
16478 (issue_nrepeats): New function for issuing 'n' type repeats.
16479 (check_ktype): New function to check for type K name compression.
16480 (build_overload_nested_name): Add a check for K name compression.
16481 (build_qualified_name): Add a check for K name compression and don't
16482 use DECL_ASSEMBLER_NAME when squangling is on.
16483 (check_btype): New function, checks for B type compression.
16484 (build_static_name, build_decl_overload_real): Initiate squangling.
16485 (build_typename_overload, build_overload_with_type): Initiate
16488 Sun Feb 8 23:47:38 1998 scott snyder <sss@d0linux01.fnal.gov>
16490 * method.c (make_thunk): Avoid name buffer overflow.
16492 Sat Feb 7 16:48:54 1998 Jason Merrill <jason@yorick.cygnus.com>
16494 * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
16495 don't define them yet.
16497 * parse.y (nomods_initdcl0): Add constructor_declarator case.
16499 Fri Feb 6 21:32:25 1998 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16501 * config-lang.in (diff_excludes): Use basename only.
16503 Thu Feb 5 19:10:40 1998 Jason Merrill <jason@yorick.cygnus.com>
16505 * tinfo2.cc: Add tinfo for signed char.
16507 Thu Feb 5 14:38:23 1998 Mike Stump <mrs@wrs.com>
16509 * search.c (compute_access): Handle protected constructors in derived
16510 classes as accessible.
16512 Wed Feb 4 01:26:49 1998 Jason Merrill <jason@yorick.cygnus.com>
16514 * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
16515 Call convert_from_reference sooner.
16517 Tue Feb 3 23:50:52 1998 Mark Mitchell <mmitchell@usa.net>
16519 * cvt.c (ocp_convert): Obtain the constant values from constant
16520 decls even if the destination type is the same as the type of the
16523 * decl2.c (finish_file): Make sure that static inlines with
16524 definitions are not marked DECL_EXTERNAL before returning.
16526 Tue Feb 3 22:43:42 1998 Jason Merrill <jason@yorick.cygnus.com>
16528 * decl.c: Lose arg_looking_for_template.
16529 (lookup_name_real): Likewise.
16530 * parse.y: Lose processing_template_arg, template_arg1.
16531 (primary): Likewise.
16532 * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
16534 Tue Feb 3 22:04:01 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16536 * error.c (dump_decl): Fix type of default arguments for template
16537 template parameters and nontype template parameters.
16538 * parse.y (template_parm): Handle invalid default template
16539 template arguments here.
16541 * parse.y (template_parm): Use template_arg instead of PTYPENAME
16542 for default template template argument.
16543 * pt.c (coerce_template_parms): Merge default template argument
16544 codes. Can treat RECORD_TYPE as template name if it is implicitly
16545 created. Fix argument index in error message.
16546 * typeck.c (comptypes): Merge template argument comparison codes in
16547 TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
16549 Tue Jan 6 01:42:44 1998 Mumit Khan <khan@xraylith.wisc.edu>
16551 * lex.c (file_name_nondirectory): Also check for '/'.
16553 Mon Feb 2 11:24:22 1998 Mark Mitchell <mmitchell@usa.net>
16555 * parse.y (primary): Deal with statement-expressions in
16557 * pt.c (tsubst_copy): Handle BIND_EXPR.
16558 * tree.c (mapcar): Likewise.
16560 * call.c (add_template_candidate_real): Pass extra parameter to
16561 fn_type_unification.
16562 * cp-tree.h (fn_type_unification): Add parameter.
16563 * pt.c (fn_type_unification): Add additional parameter to deal with
16564 static member functions.
16565 (get_bindings): Deal with static member functions.
16567 * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
16568 (revert_static_member_fn): Declare.
16569 * decl.c (revert_static_member_fn): Remove declaration. Change
16570 linkage from internal to external.
16571 (cp_finish_decl): Deal with virtual functions in classes local to
16572 template functions.
16573 * decl2.c (finish_file): Don't forget to emit increment/decrement
16574 expressions in initializers for file-scope variables.
16575 * parse.y (typename_sub2): If the typename doesn't names a
16576 template, rather than a type, issue an error message.
16577 * pt.c (check_explicit_specialization): Handle specializations of
16578 static member functions.
16579 (coerce_template_parms): Handle offset references to lists of
16581 * search.c (note_debug_info_needed): Don't crash when handed a
16582 type which is being defined.
16583 * typeck.c (complete_type): Don't crash when handed NULL_TREE;
16584 that can happen with some illegal code.
16586 Mon Feb 2 00:57:38 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16588 * call.c (user_harshness): Initialize `code' to 0.
16589 (build_method_call): Initialize `candidates', `cp' and `len' to 0.
16590 (null_ptr_cst_p): Add parentheses around && within ||.
16591 (standard_conversion): Likewise.
16592 (z_candidate): Likewise.
16593 (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
16594 (build_object_call): Likewise for `mem_args'.
16595 (build_new_op): Likewise for `mem_arglist'. Add `return' from
16596 default case in enumeration switch.
16598 * class.c (build_vtable_entry): Add explicit braces to avoid
16600 (build_class_init_list): Likewise.
16601 (finish_struct_1): Initialize `width' to 0.
16602 (instantiate_type): Initialize `name' to NULL_TREE. Add
16603 explicit braces to avoid ambiguous `else'.
16605 * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
16608 * decl.c (grok_reference_init): Eliminate unused parameter, all
16610 (record_builtin_type): Initialize `tdecl' to NULL_TREE.
16611 (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
16612 (cp_finish_decl): Initialize `ttype' to NULL_TREE.
16613 (grokdeclarator): Add parentheses around && within ||. Add
16614 explicit braces to avoid ambiguous `else'.
16615 (grokparms): Initialize `type' to NULL_TREE.
16616 (xref_tag): Remove unused label `just_return'.
16617 (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
16618 (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
16619 (hack_incomplete_structures): Add parentheses around assignment
16620 used as truth value.
16622 * decl2.c (coerce_delete_type): Hide definition of `e3'.
16624 * error.c: Include <stdlib.h>.
16625 (dump_expr): Change the type of `i' to size_t. Remove unused
16628 * except.c (init_exception_processing): Remove unused variable `d'.
16629 (expand_throw): Likewise for `label'.
16631 * friend.c (add_friends): Add explicit braces to avoid ambiguous
16634 * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
16635 (sort_base_init): Likewise for `binfo'.
16636 (expand_member_init): Likewise for `rval'.
16637 (build_member_call): Add parentheses around assignment used as
16639 (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
16640 (build_new): Initialize `nelts' to NULL_TREE. Initialize
16641 `old_immediate_size_expand' to 0.
16642 (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
16643 (build_vec_delete_1): Remove unused variable `block'.
16644 (expand_vec_init): Initialize `itype' to NULL_TREE.
16646 * lex.c: Include <strings.h> if we don't have <string.h>. Protect
16647 declaration of `index' and `rindex' with autoconf macros.
16648 (reinit_parse_for_expr): Remove unused variables
16649 `look_for_semicolon' and `look_for_lbrac'.
16650 (cons_up_default_function): Initialize `args' to NULL_TREE.
16651 (readescape): Initialize `firstdig' to 0.
16652 (real_yylex): Add parentheses around assignment used as truth value.
16654 * method.c: Include <strings.h> if we don't have <string.h>.
16655 Protect declaration of `index' with autoconf macro.
16657 * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
16658 Initialize `type' to NULL_TREE.
16659 (structsp): Remove unused variable `id'.
16661 * pt.c (coerce_template_parms): Add explicit braces to avoid
16663 (lookup_template_class): Initialize `template' to NULL_TREE.
16664 (instantiate_class_template): Remove unused variable `name' and `e'.
16665 (tsubst): Likewise for `i'. Initialize `last' to NULL_TREE.
16666 (do_poplevel): Initialize `saved_warn_unused' to 0.
16667 (type_unification): Remove unused varable `parm'.
16668 (unify): Likewise for `j'.
16670 * repo.c (init_repo): Add parentheses around assignment used as
16672 (finish_repo): Remove unused varable `p'.
16674 * search.c (get_binfo): Initialize `type' to NULL_TREE.
16675 (get_base_distance): Likewise.
16676 (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
16677 and `new_v' to NULL_TREE.
16678 (lookup_fnfields): Likewise for `rval_binfo_h'.
16679 (breadth_first_search): Add parentheses around assignment used as
16681 (get_template_base): Initialize `type' to NULL_TREE.
16683 * sig.c (append_signature_fields): Initialize `last_mfptr' to
16685 (build_signature_table_constructor): Likewise for
16686 `last_rhs_field', `pfn' and `vt_off'.
16687 (build_sigtable): Likewise for `init'.
16689 * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
16690 (propagate_binfo_offsets): Likewise for `delta'.
16691 (hash_tree_cons): Initialize hashcode to 0.
16692 (can_free): Likewise for `size'.
16693 (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
16695 * typeck.c (convert_sequence): Hide prototype.
16696 (common_type): Add explicit braces to avoid ambiguous `else'.
16697 (comp_target_types): Likewise.
16698 (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
16699 (build_function_call_real): Add explicit braces to avoid ambiguous
16701 (convert_arguments): Initialize `called_thing' to 0.
16702 (convert_for_initialization): Initialize `savew' and `savee' to 0.
16704 * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
16705 (digest_init): Initialize `old_tail_contents' to NULL_TREE.
16706 (build_x_arrow): Likewise for `last_rval'.
16708 * xref.c (GNU_xref_decl): Initialize `cls' to 0.
16710 Sun Feb 1 12:45:34 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
16712 * decl.c (init_decl_processing): Use set_sizetype.
16713 * decl2.c (sizetype): Don't declare.
16714 * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
16715 (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
16716 (build_component_addr, unary_complex_lvalue): Likewise.
16717 * rtti.c (expand_class_desc): Likewise.
16718 * class.c (get_vfield_offset): Likewise.
16720 Thu Jan 29 10:39:30 1998 Mark Mitchell <mmitchell@usa.net>
16722 * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
16723 early to avoid bogus error. Handle overloaded function
16724 names provided as template arguments correctly.
16725 (coerce_template_parms): Don't mishandle overloaded functions when
16726 dealing with template template parameters.
16727 (lookup_template_class): Issue an error message, rather than
16728 crashing, when the TYPE_DECL provided is not a template type.
16730 Wed Jan 28 23:14:44 1998 Jason Merrill <jason@yorick.cygnus.com>
16732 * class.c (instantiate_type): Don't just return a known type if
16735 Wed Jan 28 11:04:07 1998 Mark Mitchell <mmitchell@usa.net>
16737 * class.c (instantiate_type): Remove handling of FUNCTION_DECL
16738 since that code could never be reached.
16740 * error.c (dump_decl): Avoid aborting in the midst of printing an
16741 error message about an illegal template declaration.
16743 * parse.y (structsp): Print an error message, rather than crashing,
16744 when a class-head does not name a class.
16746 * pt.c (convert_nontype_argument): Allow REAL_TYPE and COMPLEX_TYPE
16747 template arguments as a g++ extension.
16749 * cp-tree.def (ALIGNOF_EXPR): New tree code.
16750 * decl2.c (grok_alignof): If processing_template_decl, just store
16752 * typeck.c (c_alignof): Likewise.
16753 * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
16754 * error.c (dump_expr): Likewise.
16755 * pt.c (tsubst_copy): Likewise.
16756 * tree.c (cp_tree_equal): Likewise.
16757 * pt.c (uses_template_parms): Correctly determine whether or not a
16758 SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
16759 folding can be done.
16761 * cp-tree.h (grok_enum_decls): Remove type parameter.
16762 * decl.c (grok_enum_decls): Likewise.
16763 * decl2.c (grok_x_components): Call grok_enum_decls
16764 unconditionally, since it will do nothing if there is no
16765 current_local_enum. Use the new calling sequence.
16766 * pt.c (tsubst_enum): Use the new calling sequence for
16769 * decl.c (start_function): Make member functions of local classes
16770 in extern inline functions have comdat linkage here...
16771 (grokdeclarator): Rather than here.
16773 Wed Jan 28 10:55:47 1998 Jason Merrill <jason@yorick.cygnus.com>
16775 * pt.c (convert_nontype_argument): Use decl_constant_value.
16777 Tue Jan 27 16:42:21 1998 Mark Mitchell <mmitchell@usa.net>
16779 * call.c (add_template_candidate_real): New function.
16780 (add_template_candidate): Use it.
16781 (add_template_conv_candidate): Likewise.
16782 (joust): Pass extra argument to more_specialized.
16783 * class.c (instantiate_type): Handle a single FUNCTION_DECL.
16784 (is_local_class): Remove.
16785 (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
16786 * cp-tree.h (is_local_class): Remove.
16787 (perform_array_to_pointer_conversion): Likewise.
16788 (finish_member_template_decl): Add.
16789 (check_explicit_specialization): Return a tree, not an int.
16790 (more_specialized): Take additional argument.
16791 (get_bindings): Likewise.
16792 (TI_PENDING_SPECIALIZATION_FLAG): New macro.
16793 * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
16794 (perform_array_to_pointer_conversion): Remove.
16795 * decl.c (saved_scope): Add processing_specialization,
16796 processing_explicit_instantiation fields.
16797 (maybe_push_to_top_level): Save them.
16798 (pop_from_top_level): Restore them.
16799 (grokfndecl): Use new return value from
16800 check_explicit_specialization.
16801 (start_decl): Don't check flag_guiding_decls before pushing
16803 (cp_finish_decl): Remove previous (bogus) change.
16804 (grok_declarator): Use decl_function_context rather than
16806 * decl2.c (finish_file): Pass extra argument to get_bindings.
16807 (build_expr_from_tree): Let build_x_component_ref check
16808 validity of arguments rather than doing it here.
16809 * lex.c (cons_up_default_function): Remove code fooling with
16810 processing_specialization, processing_explicit_instantiation
16811 flags, as that is now done in {maybe_push_top,pop_from}_top_level.
16812 * method.c (build_overload_identifier): Mangle local classes in
16813 template functions correctly.
16814 * parse.y (finish_member_template_decl): Move to pt.c.
16815 * pt.c (finish_member_template_decl): Moved here from parse.y.
16816 (print_candidates): New function.
16817 (determine_specialization): Change interface. Properly look for
16818 most specialized versions of template candidates.
16819 (check_explicit_specialization): Fully process explicit
16821 (push_template_decl): Avoid looking at CLASSTYPE fields in
16823 (determine_overloaded_function): Remove.
16824 (convert_nontype_argument): Change name from
16825 convert_nontype_parameter. Use determine_overloaded_function
16826 instead of instantiate_type.
16827 (mangle_class_name_for_template): Handle type contexts as well as
16829 (classtype_mangled_name): Likewise.
16830 (lookup_template_class): Likewise.
16831 (tsubst): Likewise.
16832 (more_specialized): Take explict template arguments as a
16834 (most_specialized): Likewise.
16835 (get_bindings): Likewise. Check that return types match before
16836 proclaiming a function a match.
16837 (do_decl_instantiation): Remove code searching for function to
16838 instantiate; that is now done in check_explicit_specialization.
16839 (add_maybe_template): Pass extra argument to get_bindings.
16840 * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
16842 * typeck.c (build_component_ref): Check for invalid arguments.
16844 Tue Jan 27 01:44:02 1998 Jason Merrill <jason@yorick.cygnus.com>
16846 * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
16847 return_target and call_target are equivalent.
16849 * pt.c (type_unification_real): Just accept function parms that
16850 don't use any template parms.
16852 Sun Jan 25 03:30:00 1998 Jason Merrill <jason@yorick.cygnus.com>
16854 * decl.c (cp_finish_decl): When bailing on a comdat variable, also
16855 unset DECL_NOT_REALLY_EXTERN.
16857 * parse.y (typename_sub*): Fix std::.
16859 Sat Jan 24 12:13:54 1998 Jason Merrill <jason@yorick.cygnus.com>
16861 * error.c (dump_decl): Fix type default template args.
16862 (dump_type): Hand TEMPLATE_DECL off to dump_decl.
16864 Fri Jan 23 18:34:37 1998 Mumit Khan <khan@xraylith.wisc.edu>
16866 * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
16867 (file_name_nondirectory): Use.
16869 Wed Jan 21 10:29:57 1998 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
16871 * pt.c (coerce_template_parms): Don't access elements of ARGLIST
16872 that are not really present. Substitute default arguments in
16873 template template arguments. Correctly convert TEMPLATE_DECL to
16874 TEMPLATE_TEMPLATE_PARM.
16875 (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
16876 are no longer treated specially here.
16877 * parse.y (template_template_parm): Fix copy error.
16878 * decl.c (grokdeclarator): Warn about missing `typename' for nested
16879 type created from template template parameters.
16880 * parse.y (bad_parm): Likewise
16882 * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
16883 (push_nested_class): Likewise.
16884 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
16885 * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
16886 (copy_template_template_parm): Declare.
16887 * decl.c (arg_looking_for_template): New variable.
16888 (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
16889 Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
16890 node if arg_looking_for_template is nonzero.
16891 (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
16892 (grok_op_properties, xref_tag, xref_basetypes): Likewise.
16893 (grokdeclarator): Handle TEMPLATE_DECL.
16894 * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
16895 * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
16896 (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
16897 (dump_decl): Handle unnamed template type parameters.
16898 Handle template template parameters.
16899 (dump_function_name): Handle template template parameters.
16900 * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
16901 Handle TEMPLATE_TEMPLATE_PARM.
16902 * method.c (build_template_template_parm_names): New function.
16903 (build_template_parm_names): Handle TEMPLATE_DECL.
16904 (build_overload_nested_name, build_overload_name):
16905 Handle TEMPLATE_TEMPLATE_PARM.
16906 * parse.y (maybe_identifier): New nonterminal.
16907 (template_type_parm): Use it.
16908 (template_template_parm, template_arg1): New nonterminal.
16909 (template_parm): Add template_template_parm rules.
16910 (template_arg): Set processing_template_arg.
16911 (template_arg1): Rules moved from template_arg.
16912 (primary, nonnested_type): Set arg_looking_for_template if we are
16913 processing template arguments.
16914 * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
16915 (process_template_parm): Handle template template parameters.
16916 (coerce_template_parms, comp_template_args): Likewise.
16917 (mangle_class_name_for_template, lookup_template_class): Likewise.
16918 (uses_template_parms): Handle TEMPLATE_DECL and
16919 TEMPLATE_TEMPLATE_PARM.
16920 (current_template_args): Handle TEMPLATE_DECL.
16921 (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
16922 * search.c (dfs_walk, dfs_record_inheritance):
16923 Handle TEMPLATE_TEMPLATE_PARM.
16924 * tree.c (copy_template_template_parm): New function.
16925 (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
16926 * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
16928 Mon Jan 19 22:40:03 1998 Mark Mitchell <mmitchell@usa.net>
16930 * decl.c (start_decl): Don't allow duplicate definitions of static
16933 * call.c (build_user_type_conversion_1): Handle user-defined
16934 template conversion operators correctly.
16936 * decl2.c (build_expr_from_tree): Issue an error message if the
16937 object in a COMPONENT_REF is a TEMPLATE_DECL.
16939 * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
16941 * class.c (is_local_class): New function.
16942 * cp-tree.h (is_local_class): Declare it.
16943 (last_tree): Likewise.
16944 (begin_tree): Likewise.
16945 (end_tree): Likewise.
16946 (lookup_template_class): Change prototype.
16947 * decl.c (cp_finish_decl): Check for NULL where necessary.
16948 Consider FUNCTION_DECLS to declare objects with top-level binding,
16949 when calling make_decl_rtl.
16950 (grokdeclarator): Give members of local classes internal linkage.
16951 (start_function): Remove declaration of last_tree.
16952 (finish_function): Set flag_keep_inline_functions around call to
16953 rest_of_compilation if we are processing a member function in a
16955 (start_method): Call push_template_decl for member functions of
16956 local classes in template functions.
16957 * decl2.c (import_export_decl): Don't give external linkage to
16958 instantiations of templates with internal linkage.
16959 * parse.y (last_tree): Remove declaration.
16960 (template_type): Pass extra parameter to lookup_template_class.
16961 (self_template_type): Likewise.
16962 (structsp): Move call to reset_specialization into left_curly.
16963 (left_curly): Call reset_specialization, and begin_tree.
16964 * pt.c (saved_trees): New variable.
16965 (mangle_class_name_for_template): Change prototype. Use
16966 additional function context to name local classes in templates
16968 (classtype_mangled_name): Pass the context.
16969 (push_template_decl): Handle local classes and templates, and
16970 member functions for such classes.
16971 (convert_nontype_parameter): Fix handling of pointer-to-member
16973 (lookup_template_class): Handle local classes in templates.
16974 (tsubst): Likewise. Don't assume that template instantiations
16975 have external linkage; pay attention to the template declaration.
16976 (mark_decl_instantiated): Likewise.
16977 (begin_tree): New function.
16978 (end_tree): Likewise.
16980 * decl.c (xref_basetypes): Don't call complete_type for basetypes
16981 that involve template parameters; that can lead to infinite
16982 recursion unnecessarily.
16984 * pt.c (register_specialization): Do not register specializations
16985 that aren't ready to be registered yet.
16986 (check_explicit_specialization): Handle explicit specialization of
16987 constructors and destructors.
16988 (build_template_decl): New function.
16989 (push_template_delc): Handle out-of-class specializations of
16992 * pt.c (check_explicit_specialization): Set up the template
16993 information before registering the specialization.
16994 (coerce_template_parms): Fix thinko.
16995 (tsubst): Handle specializations of member templates correctly.
16997 * class.c (finish_struct_methods): Remove calls to
16998 check_explicit_specialization from here.
16999 (finish_struct): And insert them here.
17000 * cp-tree.h (perform_qualification_conversions): New function.
17001 (perform_array_to_pointer_conversion): Likewise.
17002 (begin_explicit_instantiation): Likewise.
17003 (end_explicit_instantiation): Likewise.
17004 (determine_specialization): Renamed from
17005 determine_explicit_specialization.
17006 (comp_template_parms): New function.
17007 (processing_explicit_instantiation): New variable.
17008 * cvt.c (perform_qualification_conversions): New function.
17009 (perform_array_to_pointer_conversion): Likewise.
17010 * decl.c (duplicate_decls): Don't consider template functions
17011 alike unless they have the same parameters. Refine handling of
17012 instantiation/specialization mismatches.
17013 (start_decl): Don't call pushdecl for template specializations,
17014 since they don't affect overloading.
17015 (start_function): Likewise.
17016 (grokfndecl): Call check_explicit_specialization a little later.
17017 Don't call duplicate_decls for memberm template specializations.
17018 (grokdeclarator): Don't update template_count for classes that are
17019 themselves specializations. Remove use of `2' as parameter to
17020 grokfndecl since that value isn't used.
17021 * lex.c (cons_up_default_function): Save and restore
17022 processing_explicit_instantiation around calls to grokfield.
17023 * parse.y (finish_member_template_decl): New function.
17024 (component_decl_1): Use it.
17025 (fn.def2): Likewise.
17026 (template_arg_list_opt): New nonterminal.
17027 (template_type): Use it.
17028 (self_template_type): Likewise.
17029 (template_id): Likewise.
17030 (object_template_id): Likewise.
17031 (notype_template_declarator): Likwise.
17032 (begin_explicit_instantiation): Likewise.
17033 (end_explicit_instantiation): Likewise.
17034 (explicit_instantiation): Use them.
17035 * pt.c (coerce_template_parms): Add parameters.
17036 (processing_explicit_instantiation): New variable.
17037 (convert_nontype_parameter): New function.
17038 (determine_overloaded_function): Likewise.
17039 (begin_explicit_instantiation): Likewise.
17040 (end_explicit_instantiation): Likewise.
17041 (retrieve_specialization): Likewise.
17042 (register_specialization): Likewise.
17043 (processing_explicit_specialization): Removed.
17044 (determine_specialization): Handle specializations of member
17045 functions of template class instantiations.
17046 (check_explicit_specialization): Refine to conform to standard.
17047 (comp_template_parms): New function.
17048 (coerce_template_parms): Call convert_nontype_parameter.
17049 (tsubst): Refine handling of member templates. Use
17050 register_specialization.
17051 (instantiate_template): Use retrieve_specialization.
17052 (do_decl_instantiation): Likewise.
17053 (instantiate_decl): Likewise.
17054 (type_unification): Improve handling of explict template
17056 * tree.c (mapcar): Return error_mark_node, rather than aborting,
17057 on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
17058 * typeck.c (build_unary_op): Call determine_specialization, rather
17059 than determine_explicit_specialization.
17061 Mon Jan 19 13:18:51 1998 Jason Merrill <jason@yorick.cygnus.com>
17063 * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
17065 Fri Jan 16 11:40:50 1998 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17067 * error.c (dump_decl): For enum tags, output the tag, not its value.
17069 1998-01-13 Brendan Kehoe <brendan@cygnus.com>
17071 * decl.c (init_decl_processing): Only call init_rtti_processing
17074 Mon Jan 12 01:35:18 1998 Jason Merrill <jason@yorick.cygnus.com>
17076 * init.c (build_new_1): Split out from build_new.
17077 (build_new): Just return a NEW_EXPR.
17078 * expr.c (cplus_expand_expr): Handle NEW_EXPR.
17080 * decl2.c (get_temp_regvar): Tweak.
17082 * cp-tree.h (TREE_CALLS_NEW): Comment out.
17083 * class.c (resolves_to_fixed_type_p): Remove use.
17084 * method.c (build_opfncall): Likewise.
17085 * call.c (build_new_op): Likewise.
17087 Wed Jan 7 23:47:13 1998 Jason Merrill <jason@yorick.cygnus.com>
17089 * exception.cc (__eh_alloc, __eh_free): New fns.
17090 (__cp_push_exception, __cp_pop_exception): Use them.
17091 (__uncatch_exception): Call terminate here if no exception.
17092 * except.c (build_terminate_handler): New fn.
17093 (expand_start_catch_block): Use it.
17094 (expand_exception_blocks): Likewise.
17095 (alloc_eh_object): New fn.
17096 (expand_throw): Use it. Protect exception init with terminate.
17097 * typeck.c (build_modify_expr): Remove code that ignores trivial
17100 Mon Dec 22 11:36:27 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
17102 * call.c (add_builtin_candidate): Add default case in enumeration
17104 (build_new_op): Likewise.
17105 (convert_like): Likewise.
17106 * cvt.c (build_expr_type_conversion): Likewise.
17107 * tree.c (real_lvalue_p): Likewise.
17108 (lvalue_p): Likewise.
17109 (cp_tree_equal): Likewise.
17110 * typeck.c (comptypes): Likewise.
17111 (build_component_ref): Likewise.
17112 (build_function_call_real): Likewise.
17113 (build_binary_op_nodefault): Likewise.
17114 (build_unary_op): Likewise.
17115 (build_modify_expr): Likewise.
17116 * typeck2.c (initializer_constant_valid_p): Likewise.
17118 Sun Dec 21 15:59:00 1997 Nick Clifton <nickc@cygnus.com>
17120 * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
17122 Thu Dec 18 14:51:50 1997 Mark Mitchell <mmitchell@usa.net>
17124 * pt.c (coerce_template_parms): Make sure to digest_init if
17127 * decl.c (duplicate_decls): Make the newdecl virtual if the
17128 olddecl was, just as is done with other attributes of olddecl.
17130 Thu Dec 18 14:43:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17132 * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
17133 address of an OFFSET_REF.
17135 * cp-tree.def: Add AGGR_INIT_EXPR.
17136 * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
17137 AGGR_INIT_EXPR where appropriate.
17138 * expr.c (cplus_expand_expr): Likewise. Simplify.
17140 * decl2.c (finish_file): Remove call to register_exception_table.
17142 Wed Dec 17 17:08:52 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17144 * pt.c (instantiate_class_template): Don't do injection when
17145 processing_template_decl is true, as pollutes current_binding_level
17148 Wed Dec 17 21:17:39 1997 Peter Schmid <schmid@ltoi.iap.physik.tu-darmstadt.de>
17150 * pt.c (maybe_fold_nontype_arg): Add prototype.
17152 Tue Dec 16 10:31:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17154 * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
17155 * error.c (dump_expr): Likewise.
17157 Mon Dec 15 12:22:04 1997 Jason Merrill <jason@yorick.cygnus.com>
17159 * typeck.c (build_function_call_real): Remove "inline called before
17160 definition" pedwarn.
17162 * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
17164 Sun Dec 14 22:34:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17166 * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
17168 * pt.c (type_unification_real): Change __null to type void* with
17171 Sun Dec 14 20:38:35 1997 Mark Mitchell <mmitchell@usa.net>
17173 * call.c (implicit_conversion): Don't call
17174 build_user_type_conversion_1 with a NULL expr, since it will
17177 * pt.c (unify): Don't try to unify array bounds if either array is
17180 Fri Dec 12 16:09:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17182 * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
17183 Replace extern decls with casts.
17185 * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
17186 Update last_parm_cleanup_insn.
17187 (store_after_parms): Remove.
17188 * cp-tree.h: Adjust.
17190 Thu Dec 11 22:18:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17192 * decl2.c (comdat_linkage): Also set DECL_COMDAT.
17193 (finish_file): Check DECL_COMDAT instead of weak|one_only.
17194 (import_export_vtable): Use make_decl_one_only instead of
17195 comdat_linkage for win32 tweak.
17196 (import_export_decl): Likewise.
17197 * pt.c (mark_decl_instantiated): Likewise.
17199 * decl2.c (finish_file): Lose handling of templates in pending_statics.
17201 Thu Dec 11 21:12:09 1997 Jason Merrill <jason@yorick.cygnus.com>
17203 * decl2.c (finish_file): Lose call to expand_builtin_throw.
17204 * except.c (expand_builtin_throw): Remove.
17205 * cp-tree.h: Remove ptr_ptr_type_node.
17206 * decl.c: Likewise.
17208 Thu Dec 11 20:43:33 1997 Teemu Torma <tot@trema.com>
17210 * decl.c (ptr_ptr_type_node): Define.
17211 (init_decl_processing): Initialize it.
17212 * cp-tree.h: Declare it.
17213 * exception.cc (__cp_exception_info): Use __get_eh_info.
17214 (__cp_push_exception): Likewise.
17215 (__cp_pop_exception): Likewise.
17217 From Scott Snyder <snyder@d0sgif.fnal.gov>:
17218 * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
17220 (init_exception_processing): Removed saved_pc initialization.
17222 Wed Dec 10 11:04:45 1997 Jason Merrill <jason@yorick.cygnus.com>
17224 * pt.c (instantiate_decl): Defer all templates but inline functions.
17226 Mon Dec 8 23:17:13 1997 Jason Merrill <jason@yorick.cygnus.com>
17228 * init.c (expand_vec_init): Don't fold a list of parameters.
17230 * decl.c (copy_args_p): Handle copy elision for types with virtual
17232 * call.c (build_over_call): Likewise.
17234 Sun Dec 7 22:38:12 1997 Mark Mitchell <mmitchell@usa.net>
17236 * pt.c (lookup_template_function): Copy the template arguments,
17237 not just the list containing them, to the permanent obstack.
17239 Sun Dec 7 15:53:06 1997 Jason Merrill <jason@yorick.cygnus.com>
17241 * except.c (expand_start_catch_block): suspend_momentary for the
17244 * error.c (dump_decl): Handle LOOKUP_EXPR.
17246 Sun Dec 7 15:45:07 1997 Mark Mitchell <mmitchell@usa.net>
17248 * rtti.c (build_dynamic_cast): Copy the cast-to type to the
17249 permanent obstack if we are processing a template decl.
17250 * typeck.c (build_static_cast): Likewise.
17251 (build_const_cast): Likewise.
17252 (build_reinterpret_cast): Likewise.
17254 * pt.c (coerce_template_parms): Coerce some expressions, even
17255 when processing_template_decl.
17257 Sun Dec 7 01:46:33 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17259 * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
17260 handling of pointer difference expressions.
17262 * typeck.c (comp_target_types): Comparison of function/method types
17263 is independent of nptrs.
17265 Sun Dec 7 01:40:27 1997 Mark Mitchell <mmitchell@usa.net>
17267 * pt.c (tsubst): Avoid creating pointer to reference and
17268 reference to reference types.
17270 Sat Dec 6 01:29:37 1997 Jason Merrill <jason@yorick.cygnus.com>
17272 * parse.y (do_id): New nonterminal.
17273 (template_id): Use it.
17275 Fri Dec 5 01:17:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17277 * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
17278 * spew.c (yylex): Don't do_identifier here.
17279 * decl2.c (build_expr_from_tree): Revert last change.
17281 * decl2.c (build_expr_from_tree): Expand the name for a method call.
17282 * parse.y (object_template_id): Don't try to take the DECL_NAME.
17284 Wed Dec 3 20:02:39 1997 Jason Merrill <jason@yorick.cygnus.com>
17286 * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
17288 * call.c (build_op_delete_call): Adjust.
17290 * except.c (expand_end_catch_block): Lose rethrow region.
17291 (expand_start_catch_block): Likewise.
17292 (expand_end_catch_block): Don't expand_leftover_cleanups.
17294 Wed Dec 3 13:24:04 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17296 * pt.c (tsubst): Remove tree_cons call (places redundant info into
17297 DECL_TEMPLATE_INSTANTIATION).
17299 Wed Dec 3 11:44:52 1997 Jason Merrill <jason@yorick.cygnus.com>
17301 * tree.c (is_overloaded_fn): Handle getting a fn template.
17302 (really_overloaded_fn): Likewise.
17303 * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
17304 * pt.c (check_explicit_specialization): Tweak.
17305 (determine_explicit_specialization): Tweak.
17307 * tree.c, cp-tree.h (get_target_expr): New fn.
17309 Wed Dec 3 08:47:27 1997 Paul Eggert <eggert@twinsun.com>
17311 * pt.c (check_explicit_specialization): Fix misspelling in
17312 diagnostic: `preceeded'.
17313 * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
17316 1997-12-02 Mark Mitchell <mmitchell@usa.net>
17318 * pt.c (determine_explicit_specialization): Avoid an internal
17319 error for bad specializations.
17321 * method.c (build_overload_value): Handle SCOPE_REF.
17323 Tue Dec 2 19:18:50 1997 Mike Stump <mrs@wrs.com>
17325 * class.c (prepare_fresh_vtable): Enable even more complex MI
17328 Tue Dec 2 01:37:19 1997 Jason Merrill <jason@yorick.cygnus.com>
17330 * exception.cc (__check_eh_spec): Optimize a bit.
17332 * exception.cc (__cp_pop_exception): Lose handler arg.
17333 * except.c (do_pop_exception): Likewise.
17334 (push_eh_cleanup): Let the cleanup mechanism supply the handler.
17335 (expand_end_catch_block): Likewise.
17337 Fri Nov 28 01:58:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17339 * pt.c (check_explicit_specialization): Complain about using a
17340 template-id for a non-specialization.
17342 Fri Nov 28 12:35:19 1997 Scott Christley <scottc@net-community.com>
17344 * repo.c: Prototype rindex only if needed.
17345 * xref.c: Likewise.
17347 Fri Nov 28 01:56:35 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17349 * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
17351 Thu Nov 27 00:59:46 1997 Jason Merrill <jason@yorick.cygnus.com>
17353 * typeck.c (build_const_cast): Handle references here instead of
17354 handing off to convert_to_reference.
17356 * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
17357 TerminateFunctionCall.
17358 (init_exception_processing): Likewise. Terminate et al are now
17359 the fns, not ADDR_EXPRs.
17360 (various): Lose redundant assemble_external calls.
17361 (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
17363 * cp-tree.h (struct lang_decl_flags): Add comdat.
17364 (DECL_COMDAT): New macro.
17365 * decl.c (duplicate_decls): Propagate it.
17366 (cp_finish_decl): Handle it.
17367 * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
17369 * class.c: Remove static pending_hard_virtuals.
17370 (add_virtual_function): Take pointers to pending_virtuals
17371 and pending_hard_virtuals.
17372 (finish_struct_1): Pass them. Declare pending_hard_virtuals.
17374 Wed Nov 26 20:28:49 1997 Jason Merrill <jason@yorick.cygnus.com>
17376 * decl2.c (import_export_vtable): If we support one_only but not
17377 weak symbols, mark instantiated template vtables one_only.
17378 (import_export_decl): Likewise for tinfo functions.
17379 (finish_vtable_vardecl): Also write out vtables from explicitly
17380 instantiated template classes.
17381 * pt.c (mark_class_instantiated): Revert last change.
17383 * except.c (expand_throw): Call mark_used on the destructor.
17385 Wed Nov 26 15:13:48 1997 Jeffrey A Law (law@cygnus.com)
17387 * lex.c (lang_init): Enable flag_exceptions by default if no
17388 command line switch was specified.
17390 1997-11-26 Mark Mitchell <mmitchell@usa.net>
17392 * pt.c (unify): Handle `void' template parameters in
17395 Wed Nov 26 01:11:24 1997 Jason Merrill <jason@yorick.cygnus.com>
17397 * rtti.c (build_dynamic_cast): Handle template case here.
17398 (build_dynamic_cast_1): Not here.
17400 * typeck2.c (digest_init): Make copies where appropriate.
17402 * decl2.c (delete_sanity): resolve_offset_ref.
17404 * except.c: Call terminate without caching so many bits.
17406 * except.c (expand_start_catch_block): Fix catching a reference
17409 Tue Nov 25 11:28:21 1997 Jason Merrill <jason@yorick.cygnus.com>
17411 * init.c (build_new): Copy size to the saveable obstack.
17413 * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
17414 TRY_CATCH_EXPR for now.
17416 Mon Nov 24 12:15:55 1997 Jason Merrill <jason@yorick.cygnus.com>
17418 * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
17419 has DECL_LANG_SPECIFIC.
17421 * exception.cc (struct cp_eh_info): Add handlers field.
17422 (__cp_push_exception): Initialize it.
17423 (__cp_pop_exception): Decrement it. Don't pop unless it's 0.
17424 (__throw_bad_exception): Remove.
17425 * except.c (call_eh_info): Add handlers field.
17426 (get_eh_handlers): New fn.
17427 (push_eh_cleanup): Increment handlers.
17429 Fri Nov 21 12:22:07 1997 Jason Merrill <jason@yorick.cygnus.com>
17431 * except.c (expand_start_eh_spec): Use the try/catch code.
17432 (expand_end_eh_spec): Likewise. Call __check_eh_spec instead of
17433 doing everything inline.
17434 (init_exception_processing): throw_type_match now takes
17435 const void pointers.
17436 * exception.cc (__check_eh_spec): New fn.
17437 * inc/exception: Neither terminate nor unexpected return.
17438 * decl.c: Make const_ptr_type_node public.
17439 * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
17441 * except.c (expand_start_catch_block): We only need the rethrow
17442 region for non-sjlj exceptions.
17443 (expand_end_catch_block): Likewise. Use outer_context_label_stack.
17445 Thu Nov 20 14:40:17 1997 Jason Merrill <jason@yorick.cygnus.com>
17447 * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
17448 (various.o): Likewise.
17449 * inc/new: Add placement deletes. Add throw specs for default new.
17450 * new.cc (set_new_handler): Move here from libgcc2.
17451 * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
17452 (new): Move from libgcc2. Throw bad_alloc.
17453 * new2.cc: Move the rest of the op news and op deletes from libgcc2.
17454 * decl.c (init_decl_processing): Update exception specs on new and
17457 * method.c (build_decl_overload_real): Don't mess with global
17460 * init.c (build_new): Check for null throw spec, not nothrow_t.
17462 * decl.c (duplicate_decls): Don't complain about different exceptions
17463 from an internal declaration.
17465 * call.c (build_op_delete_call): Fix check for member fns again.
17467 * decl2.c (import_export_decl): Interface hackery affects
17468 virtual synthesized methods.
17470 Wed Nov 19 18:24:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17472 * decl.c (start_decl): Don't just complain about a mismatched
17475 * decl.c (make_implicit_typename): Handle case where t is not
17476 actually from context.
17477 * tree.c (get_type_decl): Lose identifier case.
17478 * spew.c (yylex): Lose useless call to identifier_typedecl_value.
17479 * parse.y (nonnested_type): Just use lookup_name.
17480 (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
17482 Wed Nov 19 11:45:07 1997 Michael Tiemann <tiemann@axon.cygnus.com>
17484 * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
17485 T was built in C language context (for example, by
17486 output_func_start_profiler).
17488 Wed Nov 19 10:39:27 1997 Jason Merrill <jason@yorick.cygnus.com>
17490 * decl.c (make_implicit_typename): New fn.
17491 (lookup_name_real): Use it. Use current_class_type as the context.
17493 Mon Nov 17 23:42:03 1997 Bruno Haible <haible@ilog.fr>
17495 * pt.c (do_poplevel): Don't prohibit jumps into this contour.
17497 Mon Nov 17 02:01:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17499 * friend.c (do_friend): Warn about non-template friends in templates.
17501 * call.c (build_op_delete_call): Fix handling of inherited delete.
17503 * search.c (dfs_record_inheritance): Ignore template type parms.
17505 Sat Nov 15 00:30:51 1997 Jason Merrill <jason@yorick.cygnus.com>
17507 * call.c (build_new_op): Fix copy error.
17508 (build_op_new_call): New fn.
17509 (build_op_delete_call): New fn.
17510 * cp-tree.h: Declare them.
17511 * init.c (build_new): Use them. Support placement delete.
17512 (build_x_delete): Use build_op_delete_call.
17513 (build_delete): Likewise.
17514 * decl2.c (delete_sanity): Likewise.
17515 (coerce_delete_type): Don't complain about placement delete.
17517 Thu Nov 13 01:52:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17519 * call.c (build_new_function_call): Remove unused 'obj' parm.
17520 * cp-tree.h, typeck.c: Adjust.
17522 * init.c (build_new): Make the cleanup last longer.
17523 (expand_vec_init): Call do_pending_stack_adjust.
17525 Wed Nov 12 11:04:33 1997 Jason Merrill <jason@yorick.cygnus.com>
17527 * pt.c (do_type_instantiation): Fix typo.
17528 (mark_class_instantiated): If we support one_only but not weak
17529 symbols, don't mark this as known.
17531 * init.c (build_new): Handle vec delete in EH cleanup.
17533 Wed Nov 12 08:11:55 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17535 * call.c (build_method_call): Call complete_type before checking
17538 Sun Nov 9 01:29:55 1997 Jim Wilson (wilson@cygnus.com)
17540 * decl.c (add_block_current_level): Delete.
17541 * init.c (build_vec_delete_1): Delete build_block and
17542 add_block_current_level calls.
17544 Wed Nov 12 00:48:16 1997 Jason Merrill <jason@yorick.cygnus.com>
17546 * init.c (build_new): Handle freeing allocated memory when the
17547 constructor throws.
17549 * call.c (build_new_method_call): Fix flags arg.
17551 * pt.c (do_type_instantiation): Don't try to instantiate
17553 (mark_decl_instantiated): If we support one_only but not
17554 weak symbols, mark this one_only.
17555 * decl2.c (import_export_vtable): Don't defer handling of vtables
17556 if MULTIPLE_SYMBOL_SPACES.
17558 Tue Nov 11 12:02:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17560 * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
17562 Tue Nov 11 02:53:44 1997 Jason Merrill <jason@lasher.cygnus.com>
17564 * except.c (do_pop_exception): Return a value.
17566 Mon Nov 10 20:25:31 1997 Jason Merrill <jason@yorick.cygnus.com>
17568 * call.c (build_new_method_call): Handle getting a
17569 TEMPLATE_ID_EXPR around a TEMPLATE_DECL. Don't look for a field
17570 if we got template parms.
17571 * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
17573 * decl2.c (build_expr_from_tree): Tweak last change.
17574 * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
17575 (maybe_fold_nontype_arg): Split out from tsubst_copy.
17576 * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
17578 Mon Nov 10 20:08:38 1997 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
17580 * pt.c (tsubst_copy): Handle explicit template arguments in
17582 * typeck.c (build_x_function_call): Likewise.
17583 * decl2.c (build_expr_from_tree): Lookup function name if it
17586 * pt.c (tsubst): Instantiate template functions properly when
17587 template parameter does not appear in function arguments and return
17589 (comp_template_args): Handle member templates required by tsubst.
17591 Mon Nov 10 20:08:38 1997 Jason Merrill <jason@yorick.cygnus.com>
17593 * decl.c (grokdeclarator): Tweak conditions for pedwarn in
17596 Mon Nov 10 20:08:29 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17598 * pt.c (coerce_template_parms): Tweak error message.
17600 * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
17601 return type defaults to `int', even if there are storage-class
17604 Mon Nov 10 03:04:20 1997 Jason Merrill <jason@yorick.cygnus.com>
17606 Complete nested exception support.
17607 * except.c (do_pop_exception): Split out...
17608 (push_eh_cleanup): From here. Handle the EH region by hand.
17609 (expand_start_catch_block): Add a new level for the catch parm.
17610 Move the rethrow region outside the two cleanup regions.
17611 Protect the initializer for the catch parm with terminate.
17612 (expand_end_catch_block): Likewise. End the region for the eh_cleanup.
17613 * exception.cc (__cp_pop_exception): Now takes two parms. Handle
17614 popping off the middle of the stack.
17615 * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
17616 WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
17617 (build_cplus_new): Only wrap CALL_EXPRs.
17618 * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
17619 the constructor call.
17621 Sun Nov 9 18:00:26 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17623 * Make-lang.in (c++.distdir): Make inc subdirectory.
17625 Fri Nov 7 11:57:28 1997 Jason Merrill <jason@yorick.cygnus.com>
17627 * decl2.c (finish_file): Put back some code.
17629 Thu Nov 6 11:28:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17631 * decl2.c (finish_file): Remove redundant code.
17632 * method.c (emit_thunk): Don't let the backend defer generic thunks.
17634 Wed Nov 5 23:52:50 1997 Jason Merrill <jason@yorick.cygnus.com>
17636 * except.c (call_eh_info): Split out...
17637 (push_eh_info): From here.
17638 (expand_builtin_throw): Use it.
17639 (expand_start_catch_block): Move region start back.
17641 Tue Nov 4 13:45:10 1997 Doug Evans <devans@canuck.cygnus.com>
17643 * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
17644 (real_yylex): Record wide strings using target endianness, not host.
17646 1997-11-03 Brendan Kehoe <brendan@lisa.cygnus.com>
17648 * repo.c (rindex): Add decl unconditionally.
17649 (get_base_filename, open_repo_file): Don't cast rindex.
17650 * xref.c (rindex): Add decl unconditionally.
17651 (index): Remove unused decl.
17652 (open_xref_file): Don't cast rindex.
17654 Sun Nov 2 15:04:12 1997 Jason Merrill <jason@yorick.cygnus.com>
17656 * class.c (build_vbase_path): Propagate the result type properly.
17658 1997-11-01 Brendan Kehoe <brendan@lisa.cygnus.com>
17660 * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
17661 remaining use of saved_throw_type with a call to get_eh_type.
17663 1997-10-31 Brendan Kehoe <brendan@lisa.cygnus.com>
17665 * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
17666 (file_name_nondirectory): New function, doing the same as the macro.
17667 (set_typedecl_interface_info): Use it instead of the macro.
17668 (check_newline): Likewise.
17669 (handle_cp_pragma): Likewise.
17671 * repo.c (get_base_filename): Cast result of rindex to char*.
17672 (open_repo_file): Likewise.
17673 * xref.c (open_xref_file): Likewise.
17674 * error.c (dump_char): Make its arg int, not char.
17676 * except.c (push_eh_info): Pass the number of fields - 1 down, not
17677 the exact number of fields.
17679 Fri Oct 31 01:47:57 1997 Jason Merrill <jason@yorick.cygnus.com>
17681 Support for nested exceptions.
17682 * tinfo2.cc (__is_pointer): New fn.
17683 * exception.cc (struct cp_eh_info): Define.
17684 (__cp_exception_info, __uncatch_exception): New fns.
17685 (__cp_push_exception, __cp_pop_exception): New fns.
17686 * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
17688 (init_exception_processing): Likewise. __eh_pc is now external.
17689 (push_eh_info): New fn.
17690 (get_eh_{info,value,type,caught}): New fns.
17691 (push_eh_cleanup): Just call __cp_pop_exception.
17692 (expand_start_catch_block): Use push_eh_info. Start the eh region
17694 (expand_end_eh_spec): Use push_eh_info.
17695 (expand_throw): Call __cp_push_exception to set up the exception info.
17696 Just pass the destructor or 0 as the cleanup. Call __uncatch_exception
17698 (expand_builtin_throw): Don't refer to empty_fndecl.
17700 Thu Oct 23 02:01:30 1997 Jason Merrill <jason@yorick.cygnus.com>
17702 * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
17704 1997-10-22 Brendan Kehoe <brendan@cygnus.com>
17706 * method.c (build_template_parm_names, build_decl_overload_real):
17707 Add static to definitions.
17708 * pt.c (add_to_template_args, note_template_header,
17709 processing_explicit_specialization, type_unification_real): Likewise.
17710 ({determine,check}_explicit_specialization): Use a single string for
17713 Mon Oct 20 12:06:34 1997 Jason Merrill <jason@yorick.cygnus.com>
17715 * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
17716 (expand_end_catch_block): Likewise.
17717 (expand_end_eh_spec): Likewise.
17719 Mon Oct 20 11:44:20 1997 Mark Mitchell <mmitchell@usa.net>
17721 * decl.c (duplicate_decls): Handle template specializations
17723 * error.c (dump_function_name): Fix printing of specializations of
17724 member functions that are not member templates.
17725 * cp-tree.h (processing_specialization): Make global.
17726 * pt.c (processing_specialization): Likewise.
17727 * lex.c (cons_up_default_function): Save and restore
17728 processing_specialization to avoid confusion.
17730 Mon Oct 20 10:52:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17732 * decl.c (init_decl_processing): Give null_node unknown* type.
17733 * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
17734 (common_type): Likewise.
17735 * error.c (args_as_string): Recognize null_node.
17737 Sun Oct 19 09:13:01 1997 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
17739 * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
17740 (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
17742 * decl.c (init_decl_processing): Call using_eh_for_cleanups.
17744 * Make-lang.in (g++): Include prefix.o.
17746 Thu Oct 16 15:31:09 1997 Judy Goldberg <judygold@sanwafp.com>
17748 * pt.c (determine_explicit_specialization): Initialize "dummy"
17749 to keep Purify quiet.
17751 Thu Oct 16 00:14:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17753 * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
17754 (build_overload_int): Not here.
17756 Wed Oct 15 00:35:28 1997 Mike Stump <mrs@wrs.com>
17758 * class.c (build_type_pathname): Remove.
17759 (prepare_fresh_vtable): Fix problem with complex MI vtable names.
17761 1997-10-14 Brendan Kehoe <brendan@lisa.cygnus.com>
17763 * parse.y (unary_expr): Give a pedwarn if someone tries to use the
17764 &&label GNU extension.
17766 Tue Oct 14 12:01:00 1997 Mark Mitchell <mmitchell@usa.net>
17768 * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
17769 so as to avoid incorrect manglings.
17770 * method.c (build_decl_overload_real): Don't mangle return types
17773 Tue Oct 14 11:46:14 1997 Jason Merrill <jason@yorick.cygnus.com>
17775 * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
17776 scratch_tree_cons): Define as macros for now.
17777 * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
17778 lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
17779 typeck2.c: Use them and the expression_obstack variants.
17781 Mon Oct 13 17:41:26 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17783 * decl.c (store_return_init): Allow classes with explicit ctors to
17784 be used with the named return values extension.
17786 Fri Oct 10 12:21:11 1997 Jason Merrill <jason@yorick.cygnus.com>
17788 * pt.c (instantiate_decl): Fix previous change.
17790 Thu Oct 9 12:08:21 1997 Jason Merrill <jason@yorick.cygnus.com>
17792 * pt.c (tsubst): Fix thinko.
17793 (instantiate_decl): Really use the original template.
17795 * call.c (build_new_method_call): Use simple constructor_name for
17798 Wed Oct 8 22:44:42 1997 Jeffrey A Law <law@cygnus.com>
17800 * method.c (build_underscore_int): Don't use ANSI specific
17803 Wed Oct 8 00:18:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17805 * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
17806 for our key method; it might have been inlined by -O3.
17808 Tue Oct 7 23:00:12 1997 Mark Mitchell <mmitchell@usa.net>
17810 * decl.c (make_typename_type): Do not try to call lookup_field for
17811 non-aggregate types.
17813 Tue Oct 7 22:52:10 1997 Jason Merrill <jason@yorick.cygnus.com>
17815 * typeck.c (build_reinterpret_cast): Tweak.
17817 Tue Oct 7 22:45:31 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
17819 * typeck.c (build_reinterpret_cast): Converting a void pointer
17820 to function pointer with a reinterpret_cast produces a warning
17821 if -pedantic is issued.
17823 Tue Oct 7 22:43:43 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
17825 * typeck.c (c_expand_return): Don't warn about returning a
17826 reference-type variable as a reference.
17828 Tue Oct 7 21:11:22 1997 Jason Merrill <jason@yorick.cygnus.com>
17830 * method.c (build_static_name): Fix typo.
17832 1997-10-07 Brendan Kehoe <brendan@lisa.cygnus.com>
17834 * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
17835 OLDDECL before we try to do DECL_USE_TEMPLATE.
17837 Tue Oct 7 00:48:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17839 * decl.c (duplicate_decls): Don't warn about template instances.
17841 * typeck.c (mark_addressable): Lose ancient code that unsets
17844 * pt.c (do_decl_instantiation): Lose support for instantiating
17847 * call.c (build_new_function_call): Fix handling of null explicit
17849 (build_new_method_call): Likewise.
17851 Mon Oct 6 23:44:34 1997 Mark Mitchell <mmitchell@usa.net>
17853 * method.c (build_underscore_int): Fix typo.
17855 1997-10-06 Brendan Kehoe <brendan@lisa.cygnus.com>
17857 * tree.c (print_lang_statistics): #if 0 call to
17858 print_inline_obstack_statistics until its definition is checked in.
17860 Mon Oct 6 09:27:29 1997 Jason Merrill <jason@yorick.cygnus.com>
17862 * decl2.c (finish_file): Move dump_tree_statistics to end.
17864 * pt.c (instantiate_decl): Look for the original template.
17865 (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
17866 of member templates.
17868 Wed Oct 1 08:41:38 1997 Jason Merrill <jason@yorick.cygnus.com>
17870 * Makefile.in (g++FAQ.*): New rules.
17871 (CONFLICTS): Update.
17872 * g++FAQ.texi: Moved from libg++.
17874 * parse.y (PFUNCNAME): Only specify the type once.
17876 1997-10-01 Brendan Kehoe <brendan@lasher.cygnus.com>
17878 * lex.c (real_yylex): Clean up the code to fully behave the way
17879 the c-lex.c parser does for complex and real numbers.
17881 Tue Sep 30 08:51:36 1997 Jason Merrill <jason@yorick.cygnus.com>
17883 * method.c (build_decl_overload_real): Reformat.
17885 Tue Sep 30 00:18:26 1997 Jason Merrill <jason@yorick.cygnus.com>
17887 * method.c (synthesize_method): If at_eof, determine our linkage.
17889 1997-09-29 Paul Eggert <eggert@twinsun.com>
17891 * lex.c (real_yylex): Treat `$' just like `_', except issue a
17892 diagnostic if !dollars_in_ident or if pedantic.
17894 * lang-specs.h (@c++): -ansi no longer implies -$.
17896 * decl2.c (lang_decode_option):
17897 -traditional and -ansi now do not mess with
17900 Mon Sep 29 19:57:51 1997 H.J. Lu <hjl@gnu.ai.mit.edu>
17902 * Makefile.in (parse.o, decl.o): Also depend on
17903 $(srcdir)/../except.h $(srcdir)/../output.h.
17904 (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
17905 $(srcdir)/../except.h $(srcdir)/../output.h.
17906 (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
17909 * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
17911 * expr.c (cplus_expand_expr): Make it static.
17913 * decl2.c, init.c, typeck.c: Include "expr.h".
17914 (expand_expr): Use proper values when calling the function.
17916 Mon Sep 29 11:05:54 1997 Alexandre Oliva <oliva@dcc.unicamp.br>
17918 * lang-options.h: New -Wold-style-cast flag.
17919 * cp-tree.h (warn_old_style_cast): New variable.
17920 * decl2.c (warn_old_style_cast): Likewise.
17921 (lang_decode_option): Support -Wold-style-cast.
17922 (reparse_absdcl_as_casts): Produce old-style-cast warning.
17924 Mon Sep 29 09:20:53 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
17926 * decl.c (cp_finish_decl): Allow expand_aggr_init to set
17927 TREE_USED, reset value based on already_used.
17929 * init.c (expand_member_init): Revert change.
17931 Mon Sep 29 08:57:53 1997 Jason Merrill <jason@yorick.cygnus.com>
17933 * cp-tree.h, decl.c, decl2.c, pt.c:
17934 Lose DECL_C_STATIC and DECL_PUBLIC. Don't pretend statics are public.
17936 * decl2.c (lang_decode_option): Add missing ;.
17938 Sat Sep 27 16:22:48 1997 Jason Merrill <jason@yorick.cygnus.com>
17940 * friend.c (do_friend): Disable injection for all template-derived
17942 * decl2.c (lang_decode_option): Handle -fguiding-decls.
17943 * parse.y (notype_template_declarator): New nonterminal.
17944 (direct_notype_declarator): Use it.
17945 (complex_direct_notype_declarator): Likewise.
17946 (object_template_id): Accept any kind of identifier after TEMPLATE.
17947 (notype_qualified_id): Don't add template declarators here.
17949 Sat Sep 27 16:21:58 1997 Mark Mitchell <mmitchell@usa.net>
17951 * call.c (add_template_candidate): Add explicit_targs parameter.
17952 (build_scoped_method_call): Use it.
17953 (build_overload_call_real): Likewise.
17954 (build_user_type_conversion_1): Likewise.
17955 (build_new_function_call): Likewise.
17956 (build_object_call): Likewise.
17957 (build_new_op): Likewise.
17958 (build_new_method_call): Likewise.
17959 (build_new_function_call): Handle TEMPLATE_ID_EXPR.
17960 (build_new_method_call): Likewise.
17962 * class.c (finish_struct_methods): Add specialization pass to
17963 determine which methods were specializing which other methods.
17964 (instantiate_type): Handle TEMPLATE_ID_EXPR.
17966 * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
17968 * cp-tree.h (name_mangling_version): New variable.
17969 (flag_guiding_decls): Likewise.
17970 (build_template_decl_overload): New function.
17971 (begin_specialization): Likewise.
17972 (reset_specialization): Likewise.
17973 (end_specialization): Likewise.
17974 (determine_explicit_specialization): Likewise.
17975 (check_explicit_specialization): Likewise.
17976 (lookup_template_function): Likewise.
17977 (fn_type_unification): Add explicit_targs parameter.
17978 (type_unification): Likewise.
17980 * decl.c (duplicate_decls): Add smarts for explicit
17982 (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
17984 (grokfndecl): Call check_explicit_specialization.
17986 * decl2.c (lang_decode_option): Handle -fname-mangling-version.
17987 (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
17988 (check_classfn): Handle specializations.
17990 * error.c (dump_function_name): Print specialization arguments.
17992 * friend.c (do_friend): Don't call pushdecl for template
17995 * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
17997 * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
17998 and -fno-guiding-decls.
18000 * lex.c (identifier_type): Return PFUNCNAME for template function
18003 * method.c (build_decl_overload_real): New function.
18004 (build_template_parm_names): New function.
18005 (build_overload_identifier): Use it.
18006 (build_underscore_int): New function.
18007 (build_overload_int): Use it. Add levels for template
18009 (build_overload_name): Likewise. Also, handle TYPENAME_TYPEs.
18010 (build_overload_nested_names): Handle template type parameters.
18011 (build_template_decl_overload): New function.
18013 * parse.y (YYSTYPE): New ntype member.
18014 (nested_name_specifier): Use it.
18015 (nested_name_specifier_1): Likewise.
18016 (PFUNCNAME): New token.
18017 (template_id, object_template_id): New non-terminals.
18018 (template_parm_list): Note specializations.
18019 (template_def): Likewise.
18020 (structsp): Likewise.
18021 (fn.def2): Handle member template specializations.
18022 (component_decl_1): Likewise.
18023 (direct_notype_declarator): Handle template-ids.
18024 (component_decl_1): Likewise.
18025 (direct_notype_declarator): Handle template-ids.
18026 (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
18028 * pt.c (processing_specializations): New variable.
18029 (template_header_count): Likewise.
18030 (type_unification_real): New function.
18031 (processing_explicit_specialization): Likewise.
18032 (note_template_header): Likewise.
18033 (is_member_template): Handle specializations.
18034 (end_template_decl): Call reset_specialization.
18035 (push_template_decl): Handle member template specializations.
18036 (tsubst): Likewise.
18037 (tsubst_copy): Handle TEMPLATE_ID_EXPR.
18038 (instantiate_template): Handle specializations.
18039 (instantiate_decl): Likewise.
18040 (fn_type_unification): Handle explicit_targs.
18041 (type_unification): Likewise. Allow incomplete unification
18042 without an error message, if allow_incomplete.
18043 (get_bindings): Use new calling sequence for fn_type_unification.
18045 * spew.c (yylex): Handle PFUNCNAME.
18047 * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
18048 (really_overloaded_fn): Likewise.
18049 (get_first_fn): Handle function templates.
18051 * typeck.c (build_x_function_call): Use really_overloaded_fn.
18052 Handle TEMPLATE_ID_EXPR.
18053 (build_x_unary_op): Likewise.
18054 (build_unary_op): Likewise.
18055 (mark_addressable): Templates whose address is taken are marked
18058 1997-09-25 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18060 * decl.c (init_decl_processing): Declare __builtin_constant_p as
18061 accepting any kind of type, not only int.
18063 Fri Sep 26 00:22:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18065 * search.c (get_matching_virtual): Notice virtual bases when sorrying
18066 about covariant returns.
18068 * parse.y (member_init): Also imply typename here. Remove ancient
18069 extension for initializing base members.
18071 Thu Sep 25 11:11:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18073 Handle multi-level typenames and implicit typename in base list.
18074 * parse.y (typename_sub{,[0-2]}): New rules.
18075 (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
18076 (nonnested_type): New rule.
18077 (complete_type_name): Use it.
18078 (base_class.1): Use typename_sub and nonnested_type.
18079 (nested_name_specifier): Don't elide std:: here.
18080 * decl.c (make_typename_type): Handle getting a type for NAME.
18081 (lookup_name_real): Turn std:: into :: here.
18083 Rvalue conversions were removed in London.
18084 * call.c (is_subseq): Don't consider lvalue transformations.
18085 (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
18086 (joust): Re-enable ?: kludge.
18088 1997-09-22 Brendan Kehoe <brendan@lisa.cygnus.com>
18090 * decl.c (start_function): Up warning of no return type to be a
18093 Mon Sep 22 14:15:34 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18095 * init.c (expand_member_init): Don't set TREE_USED.
18096 * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
18097 set,don't clear TREE_USED wholesale.
18099 Sat Sep 20 15:31:00 1997 Jason Merrill <jason@yorick.cygnus.com>
18101 * call.c (build_over_call): Do require_complete_type before
18104 Thu Sep 18 16:47:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18106 * search.c (lookup_field): Call complete_type in all cases.
18108 * decl.c (finish_function): Just warn about flowing off the end.
18110 Wed Sep 17 10:31:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18112 * decl.c (grokparms): Don't bash a permanent list node if we're
18115 1997-09-17 Brendan Kehoe <brendan@lisa.cygnus.com>
18117 * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
18119 Tue Sep 16 14:06:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18121 * call.c (build_new_op): Give better error for syntactically
18122 correct, but semantically invalid, use of undeclared template.
18124 * call.c (compare_qual): Handle pmfs.
18126 * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
18127 after the exception spec.
18129 Mon Sep 15 11:52:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18131 * call.c (null_ptr_cst_p): Integer type, not integral type.
18133 * call.c (joust): Disable warnings until they can be moved to the
18136 Fri Sep 12 16:11:13 1997 Per Bothner <bothner@cygnus.com>
18138 * Makefile.in, config-lang.in: Convert to autoconf.
18140 Thu Sep 11 17:14:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18142 * decl.c (lookup_name_real): Add implicit 'typename' to types from
18145 * pt.c (most_specialized_class): Fix typo.
18146 (tsubst): Move constant folding to TREE_VEC case.
18148 Thu Sep 11 10:08:45 1997 Mark Mitchell <mmitchell@usa.net>
18150 * pt.c (do_poplevel): Don't warn about unused local variables
18151 while processing_template_decl since we don't always know whether
18152 or not they will need constructing/destructing.
18154 * pt.c (uses_template_parms): Check the values of an enumeration
18155 type to make sure they don't depend on template parms.
18157 * decl.c (make_typename_type): Don't lookup the field if the
18158 context uses template parms, even if we're not
18159 processing_template_decl at the moment.
18161 * pt.c (coerce_template_parms): Avoid looking at the
18162 TYPE_LANG_DECL portion of a typename type, since there won't be
18164 (tsubst): Do constant folding as necessary to make sure that
18165 arguments passed to lookup_template_class really are constants.
18167 Wed Sep 10 11:21:55 1997 Jason Merrill <jason@yorick.cygnus.com>
18169 * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
18170 * decl2.c (finish_file): Only register exception tables if we
18173 * decl.c (init_decl_processing): Add __builtin_[fs]p.
18175 Tue Sep 9 19:49:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18177 * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
18179 Tue Sep 9 17:57:25 1997 Mark Mitchell <mmitchell@usa.net>
18181 * error.c (dump_decl): Avoid crashing when presented with a
18182 uninitialized constant, as can occur with a template parameter.
18183 (dump_expr): Make sure that there are enough levels of
18184 current_template_parms before we start diving through them.
18186 1997-09-09 Brendan Kehoe <brendan@lisa.cygnus.com>
18188 * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
18191 Tue Sep 9 09:36:39 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18193 * except.c (expand_throw): Call build_delete for all
18194 exception types, not just objects with destructors.
18196 Mon Sep 8 02:33:20 1997 Jody Goldberg <jodyg@idt.net>
18198 * decl.c (current_local_enum): Remove static.
18199 * pt.c (tsubst_enum): Save and restore value of current_local_enum
18200 in case template is expanded in enum decl.
18201 (instantiate_class_template): Use new tsubst_enum signature.
18202 (tsubst_expr): Likewise.
18204 Mon Sep 8 01:21:43 1997 Mark Mitchell <mmitchell@usa.net>
18206 * pt.c (begin_member_template_processing): Take a function as
18207 argument, not a set of template arguments. Use the template
18208 parameters, rather than the arguments. Handle non-type parameters
18209 correctly. Push a binding level for the parameters so that multiple
18210 member templates using the same parameter names can be declared.
18211 (end_member_template_processing): Pop the binding level.
18212 (push_template_decl): Mark member templates as static when
18215 * lex.c (do_pending_inlines): Pass the function, not its template
18216 arguments, to begin_member_template_processing.
18217 (process_next_inline): Likewise.
18218 (do_pending_defargs): Likewise.
18220 * error.c (dump_expr): Obtain the correct declaration for a
18221 TEMPLATE_CONST_PARM.
18223 * call.c (add_template_conv_candidate): New function.
18224 (build_object_call): Handle member templates, as done in the other
18227 Sat Sep 6 10:20:27 1997 Mark Mitchell <mmitchell@usa.net>
18229 * decl.c (replace_defag): Undo previous change.
18230 * lex.c (do_pending_defargs): Deal with member templates.
18232 * pt.c (is_member_template): Avoid crashing when passed a
18233 non-function argument.
18235 Fri Sep 5 17:27:38 1997 Jason Merrill <jason@yorick.cygnus.com>
18237 * class.c (grow_method): Remove check for redeclaration.
18239 Fri Sep 5 01:37:17 1997 Mark Mitchell <mmitchell@usa.net>
18241 * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
18242 (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
18243 (PRIMARY_TEMPLATE_P): Use it.
18244 * call.c (build_overload_call_real): Use it.
18245 * class.c (instantiate_type): Likewise.
18246 * decl.c (decls_match): Likewise.
18247 * method.c (build_overload_identifier): Likewise.
18248 * pt.c (push_template_decl): Likewise.
18249 (classtype_mangled_name): Likewise.
18250 (lookup_template_class): Likewise.
18252 * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
18253 DECL_NTPARMS to conform to usage elsewhere.
18254 * call.c (add_template_candidate): Likewise.
18255 * class.c (instantiate_type): Likewise.
18256 * pt.c (instantiate_template): Likewise.
18257 (get_bindings): Likewise.
18259 * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
18260 is_member_template.
18262 * pt.c (unify): Undo changes to allow multiple levels of template
18264 (type_unification): Likewise.
18265 (fn_type_unification): Likewise.
18266 (get_class_bindings): Likewise.
18267 * cp-tree.h (Likewise).
18269 * decl.c (replace_defarg): Check that the type of the default
18270 parameter does not invlove a template type before complaining
18271 about the initialization.
18273 * error.c (dump_expr): Deal with template constant parameters in
18274 member templates correctly.
18276 * pt.c (is_member_template): Deal with class specializations
18278 (tsubst): Handle "partial instantiation" of member templates
18281 Wed Sep 3 12:30:24 1997 Mark Mitchell <mmitchell@usa.net>
18283 * pt.c (type_unification): Change calling sequence to allow for
18284 multiple levels of template parameters.
18285 (tsubst_expr): Likewise.
18286 (tsubst): Likewise.
18287 (tsubst_copy): Likewise.
18288 (instantiate_template): Likewise.
18290 * call.c (build_overload_call_real): Use it.
18291 (add_builtin_candidate): Use it.
18292 (build_new_method_call): Use it.
18293 * class.c (instantiate_type): Use it.
18294 * decl.c (grokdeclarator): Use it.
18295 * decl2.c (finish_file): Use it.
18296 * method.c (build_overload_identifier): Use it.
18298 * call.c (add_template_candidate): Add additional parameter for
18299 the function return type. Call fn_type_unification istead of
18301 (build_user_type_conversion_1): Handle member templates.
18302 (build_new_function_call): Likewise.
18303 (build_new_op): Likewise.
18304 (build_new_method_call): Likewise.
18306 * class.c (grow_method): Don't give an error message indicating
18307 that two member templates with the same name are ambiguous.
18308 (finish_struct): Treat member template functions just like member
18311 * cp-tree.h (check_member_template): Add declaration.
18312 (begin_member_template_processing): Likewise.
18313 (end_member_template_processing): Likewise.
18314 (fn_type_unification): Likewise.
18315 (is_member_template): Likewise.
18316 (tsubst): Change prototype.
18317 (tsubst_expr): Likewise.
18318 (tsubst_copy): Likewise.
18319 (instantiate_template): Likewise.
18320 (get_bindings): Likewise.
18322 * decl.c (decls_match): Handle multiple levels of template
18324 (pushdecl): Handle template type params just like other type
18326 (push_class_level_binding): Return immediately if the
18327 class_binding_level is NULL.
18328 (grokfndecl): If check_classfn() returns a member_template, use
18329 the result of the template, not the template itself.
18331 * decl2.c (check_member_template): New function. Check to see
18332 that the entity declared to be a member template can be one.
18333 (check_classfn): Allow redeclaration of member template functions
18334 with different types; the new functions can be specializations or
18335 explicit instantiations.
18337 * error.c (dump_decl): Handle multiple levels of template
18339 (dump_function_decl): Update to handle function templates.
18341 * lex.c (do_pending_inlines): Set up template parameter context
18342 for member templates.
18343 (process_next_inline): Likewise.
18345 * method.c (build_overload_identifier): Adjust for multiple levels
18346 of template parameters.
18348 * parse.y (fn.def2): Add member templates.
18349 (component_decl_1): Likewise.
18351 * pt.c (begin_member_template_processing): New function.
18352 (end_member_template_processing): Likewise.
18353 (is_member_template): Likewise.
18354 (fn_type_unification): Likewise.
18355 (current_template_parms): Return a vector of all the template
18356 parms, not just the innermost level of parms.
18357 (push_template_decl): Deal with the possibility of member
18359 (lookup_template_class): Likewise.
18360 (uses_template_parms): Likewise.
18361 (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
18362 TEMPLATE_CONST_PARM to deal with multiple levels of template
18363 arguments. Add processing of TEMPLATE_DECL to produce new
18364 TEMPLATE_DECLs from old ones.
18365 (do_decl_instantiation): Handle member templates.
18367 * search.c (lookup_fnfields_1): Handle member template conversion
18370 * tree.c (cp_tree_equal): Check the levels, as well as the
18371 indices, of TEMPLATE_CONST_PARMs.
18373 * typeck.c (comptypes): Check the levels, as well as the indices,
18374 fo TEMPLATE_TYPE_PARMs.
18375 (build_x_function_call): Treat member templates like member
18378 Wed Sep 3 11:09:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18380 * typeck.c (c_expand_return): Always convert_for_initialization
18381 before checking for returning a pointer to local.
18383 * pt.c (type_unification): If strict and the function parm doesn't
18384 use template parms, just compare types.
18386 Wed Sep 3 10:35:49 1997 Klaus Espenlaub <kespenla@student.informatik.uni-ulm.de>
18388 * method.c (build_overloaded_value): Replace direct call
18389 to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
18391 Wed Sep 3 00:02:53 1997 Jason Merrill <jason@yorick.cygnus.com>
18393 * typeck.c (convert_arguments): Don't arbitrarily choose the first
18394 of a set of overloaded functions.
18396 Tue Sep 2 12:09:13 1997 Jason Merrill <jason@yorick.cygnus.com>
18398 * lex.c (real_yylex): Don't elide __FUNCTION__.
18400 * method.c (build_overload_value): Add in_template parm.
18401 (build_overload_int): Likewise.
18402 (build_overload_identifier): Pass it.
18404 * decl.c (duplicate_decls): Don't bash a previous template
18405 definition with a redeclaration.
18407 * pt.c (unify): float doesn't match double.
18409 * pt.c (do_type_instantiation): Handle getting a _TYPE or a
18410 TYPE_DECL. Handle getting non-template types.
18411 * parse.y (explicit_instantiation): Use typespec instead of
18412 aggr template_type.
18414 Tue Sep 2 10:27:08 1997 Richard Henderson <rth@cygnus.com>
18416 * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
18418 Mon Sep 1 13:19:04 1997 Eugene Mamchits <eugin@ips.ras.ru>
18420 * call.c (add_builtin_candidate): Add missing TREE_TYPE.
18421 (compare_ics): Likewise.
18423 Mon Sep 1 13:19:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18425 * call.c (joust): Warn about choosing one conversion op over
18426 another because of 'this' argument when the other return type is
18428 (source_type): New fn.
18430 * call.c (build_new_op): Strip leading REF_BIND from first operand
18431 to builtin operator.
18433 * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
18436 Thu Aug 28 09:45:23 1997 Jason Merrill <jason@yorick.cygnus.com>
18438 * call.c (null_ptr_cst_p): Remove support for (void*)0.
18440 Wed Aug 27 02:03:34 1997 Jeffrey A Law <law@cygnus.com>
18442 * typeck.c (expand_target_expr): Make definition match declaration.
18444 * class.c (get_basefndecls): Make definition match declaration.
18446 Mon Aug 25 14:30:02 1997 Jason Merrill <jason@yorick.cygnus.com>
18448 * input.c (sub_getch): Eventually give up and release the input file.
18450 * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
18453 * call.c (joust): Tweak message.
18455 Sat Aug 23 18:02:59 1997 Mark Mitchell <mmitchell@usa.net>
18457 * error.c (type_as_string): Put const/volatile on template type
18458 parameters where appropriate.
18460 Sat Aug 23 17:47:22 1997 Jeffrey A Law <law@cygnus.com>
18462 * call.c (strictly_better): Make arguments unsigned ints.
18464 Thu Aug 21 18:48:44 1997 Jason Merrill <jason@yorick.cygnus.com>
18466 * lex.c (real_yylex): Refer to __complex instead of complex.
18468 Thu Aug 21 22:25:46 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
18470 * lex.c (real_yylex): Don't use getc directly.
18472 Wed Aug 20 17:25:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18474 * call.c (is_subseq): Don't try to be clever.
18476 Wed Aug 20 03:13:36 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
18478 * parse.y, pt.c: Include "except.h".
18479 * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
18480 error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
18481 lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
18482 sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
18485 Wed Aug 20 01:34:40 1997 Jason Merrill <jason@yorick.cygnus.com>
18487 * decl2.c (mark_vtable_entries): Instead of replacing pure
18488 virtuals with a reference to __pure_virtual, copy the decl and
18491 Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18493 * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
18495 * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
18497 * pt.c (instantiate_class_template): Call repo_template_used
18498 before finish_prevtable_vardecl.
18500 * call.c (is_subseq): New fn.
18501 (compare_ics): Use it.
18503 * repo.c (finish_repo): Don't crash on no args.
18505 * parse.y (named_complex_class_head_sans_basetype): Handle
18506 explicit global scope.
18507 * decl2.c (handle_class_head): New fn.
18509 * pt.c (unify): Add CONST_DECL case.
18511 Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18513 * rtti.c (permanent_obstack): Fix decl to not be a pointer.
18515 * cp-tree.h (report_type_mismatch): Add prototype.
18516 * call.c (build_overload_call_real): Remove erroneous fourth
18517 argument to report_type_mismatch.
18518 (build_user_type_conversion_1): Remove erroneous second arg to
18520 (build_new_function_call): Likewise.
18521 (build_object_call): Likewise.
18522 (build_new_op): Likewise.
18523 (build_new_method_call): Likewise.
18525 Wed Aug 13 19:19:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18527 * error.c (dump_decl): Don't bother processing a function with no
18528 DECL_LANG_SPECIFIC.
18530 * method.c (emit_thunk): Call init_function_start in the macro case.
18532 Wed Aug 13 10:46:19 1997 H.J. Lu (hjl@gnu.ai.mit.edu)
18534 * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
18535 defined and used to set flag_vtable_thunks.
18537 Tue Aug 12 20:13:57 1997 Jason Merrill <jason@yorick.cygnus.com>
18539 * parse.y: Don't clear the inlines from their obstack until they've
18540 all been processed.
18542 * decl.c (duplicate_decls): Don't complain about exception
18543 specification mismatch if flag_exceptions is off.
18545 Mon Aug 11 15:01:56 1997 Marc Lehmann <pcg@goof.com>
18547 * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
18549 Sun Aug 10 12:06:09 1997 Paul Eggert <eggert@twinsun.com>
18551 * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
18552 * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
18553 Include <stdio.h> before include files that formerly used STDIO_PROTO.
18555 * decl.c, g++spec.c, lex.c, method.c, repo.c:
18556 Include "config.h" first, as per autoconf manual.
18558 Fri Aug 8 11:47:48 1997 Jason Merrill <jason@yorick.cygnus.com>
18560 * decl.c (duplicate_decls): Tweak wording.
18561 * lex.c (do_pending_defargs): Don't die if we see a default arg
18562 that isn't a DEFAULT_ARG.
18563 * error.c (dump_expr): Handle DEFAULT_ARG.
18565 * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
18566 * lang-options.h: Add -fhandle-exceptions.
18568 * class.c (build_vtable): Vtables are artificial.
18569 (prepare_fresh_vtable): Likewise.
18571 Wed Aug 6 11:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18573 * cvt.c (ocp_convert): After converting to the target type, set
18574 LOOKUP_NO_CONVERSION.
18576 * call.c (joust): Warn about potentially confusing promotion rules
18578 * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
18580 Tue Aug 5 15:15:07 1997 Michael Meissner <meissner@cygnus.com>
18582 * exception.cc: Declare __terminate_func with noreturn attribute.
18584 Fri Aug 1 03:18:15 1997 Jason Merrill <jason@yorick.cygnus.com>
18586 * parse.y: Break out eat_saved_input, handle errors.
18587 (function_try_block): Use compstmt instead of compstmt_or_error.
18589 Thu Jul 31 17:14:04 1997 Jason Merrill <jason@yorick.cygnus.com>
18591 * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
18593 Fri Jul 4 01:45:16 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18595 * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
18596 existence of cc1plus check whether $(LANGUAGES) contains C++.
18598 Wed Jul 30 13:04:21 1997 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
18600 * method.c (do_build_copy_constructor): When copying an anonymous
18601 union member loop around to handle nested anonymous unions. Use
18602 the offset of the member relative to the outer structure, not the
18605 Tue Jul 29 21:17:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18607 * call.c (resolve_args): New fn.
18608 (build_new_function_call): Use it.
18609 (build_object_call): Likewise.
18610 (build_new_method_call): Likewise.
18612 Mon Jul 28 16:02:36 1997 Jason Merrill <jason@yorick.cygnus.com>
18614 * call.c (build_over_call): tsubst all default parms from templates.
18616 Wed Jul 23 13:36:25 1997 Jason Merrill <jason@yorick.cygnus.com>
18618 * decl.c (struct cp_function): Add static_labelno.
18619 (push_cp_function_context): Save it.
18620 (pop_cp_function_context): Restore it.
18622 Tue Jul 22 14:43:29 1997 Jason Merrill <jason@yorick.cygnus.com>
18624 * typeck.c (build_component_ref_1): Convert from reference.
18626 Tue Jul 22 11:06:23 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18628 * parse.y (current_declspecs, prefix_attributes): Initialize to
18631 * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
18632 before we try to force it to be a TREE_LIST.
18633 (decl): Make sure $1.t is non-nil.
18635 Sun Jul 20 11:53:07 1997 Jason Merrill <jason@yorick.cygnus.com>
18637 * pt.c (uses_template_parms): Handle template first-parse codes.
18639 * decl.c (cp_finish_decl): Only warn about user-defined statics.
18641 Fri Jul 18 17:56:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18643 * pt.c (unify): Handle BOOLEAN_TYPE.
18645 * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
18646 * pt.c (tsubst): Don't set it.
18647 * call.c (build_over_call): Use uses_template_parms.
18649 Thu Jul 17 18:06:30 1997 Jason Merrill <jason@yorick.cygnus.com>
18651 * method.c (build_overload_nested_name): Use static_labelno
18652 instead of var_labelno.
18653 (build_qualified_name): New fn.
18654 (build_overload_name): Split out from here.
18655 (build_static_name): Use build_qualified_name.
18656 * decl.c (cp_finish_decl): Statics in extern inline functions
18657 have comdat linkage.
18658 (start_function): Initialize static_labelno.
18660 Thu Jul 17 11:20:17 1997 Benjamin Kosnik <bkoz@rhino.cygnus.com>
18662 * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
18663 before "all member functions in class [] are private".
18665 Wed Jul 16 23:47:08 1997 Jason Merrill <jason@yorick.cygnus.com>
18667 * lex.c (do_scoped_id): convert_from_reference.
18668 * init.c (build_offset_ref): Likewise.
18670 Wed Jul 16 12:34:29 1997 Benjamin Kosnik <bkoz@lisa.cygnus.com>
18672 * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
18674 Mon Jul 14 03:23:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18676 * typeck.c (get_member_function_from_ptrfunc): Promote index
18679 Sun Jul 13 00:11:52 1997 Jason Merrill <jason@yorick.cygnus.com>
18681 * tree.c (layout_basetypes): Move non-virtual destructor warning.
18682 * decl.c (xref_basetypes): Remove non-virtual destructor warning.
18684 Sat Jul 12 12:47:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18686 * decl.c (grokdeclarator): Call add_defarg_fn for the function
18688 * lex.c (add_defarg_fn): Adjust.
18689 (do_pending_defargs): Adjust. Don't skip the first parm.
18691 Fri Jul 11 01:39:50 1997 Jason Merrill <jason@yorick.cygnus.com>
18693 * decl.c (build_enumerator): Global enumerators are also readonly.
18695 * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
18696 (build_dynamic_cast): Call it and convert_from_reference.
18698 * lex.c (add_defarg_fn): New fn.
18699 (snarf_defarg): Don't add to defarg_types.
18700 (do_pending_defargs): Lose defarg_types. All fns we process now
18702 * decl.c (grokfndecl): Call add_defarg_fn.
18704 * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
18705 * cp-tree.def: Add DEFAULT_ARG.
18706 * spew.c (yylex): Call snarf_defarg as appropriate.
18707 * parse.y: New tokens DEFARG and DEFARG_MARKER.
18708 (defarg_again, pending_defargs, defarg, defarg1): New rules.
18709 (structsp): Use pending_defargs.
18710 (parms, full_parm): Use defarg.
18711 * lex.c (init_lex): Initialize inline_text_firstobj.
18712 (do_pending_inlines): Never pass the obstack to feed_input.
18713 (process_next_inline): Call end_input instead of restore_pending_input.
18714 (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
18715 finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
18716 * input.c (end_input): New fn.
18717 (sub_getch): At the end of some fed input, just keep returning EOF
18718 until someone calls end_input.
18719 Remove 'obstack' field from struct input_source.
18720 * decl.c (grokparms): Handle DEFAULT_ARG.
18721 (replace_defarg): New fn.
18722 * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
18724 Wed Jul 9 13:44:12 1997 Jason Merrill <jason@yorick.cygnus.com>
18726 * call.c (implicit_conversion): If nothing else works, try binding
18727 an rvalue to a reference.
18729 Wed Jul 9 13:04:38 1997 Geoffrey Noer <noer@cygnus.com>
18731 * decl.c (init_decl_processing): Fix Jun 30 patch -- move
18732 ifndef for Cygwin32 to include SIGSEGV.
18734 Thu Jul 3 01:44:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18736 * class.c (finish_struct_1): Only complain about pointers without
18737 copy stuff if there are any constructors.
18739 * rtti.c (build_dynamic_cast): Call complete_type on the types.
18741 * decl.c (grokfndecl): If the function we chose doesn't actually
18744 * decl2.c (grokclassfn): Don't specify 'const int' for the
18745 artificial destructor parm.
18747 * pt.c (type_unification): If we are called recursively, nothing
18750 Mon Jun 30 17:53:21 1997 Geoffrey Noer <noer@cygnus.com>
18752 * decl.c (init_decl_processing): Stop trying to catch signals
18753 other than SIGABRT since the Cygwin32 library doesn't support
18754 them correctly yet. This fixes a situation in which g++ causes
18755 a hang on SIGSEGVs and other such signals in our Win32-hosted
18758 Mon Jun 30 14:50:01 1997 Jason Merrill <jason@yorick.cygnus.com>
18760 * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
18762 Fri Jun 27 15:18:49 1997 Jason Merrill <jason@yorick.cygnus.com>
18764 * typeck2.c (store_init_value): Always return the value if our
18765 type needs constructing.
18767 * method.c (hack_identifier): Convert class statics from
18770 Thu Jun 26 11:44:46 1997 Jason Merrill <jason@yorick.cygnus.com>
18772 * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
18774 Thu Jun 19 16:49:28 1997 Mike Stump <mrs@cygnus.com>
18776 * typeck.c (c_expand_return): Make sure we clean up temporaries at
18777 the end of return x;
18779 Thu Jun 19 12:28:43 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18781 * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
18783 Tue Jun 17 18:35:57 1997 Mike Stump <mrs@cygnus.com>
18785 * except.c (expand_builtin_throw): Add support
18786 -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
18788 Mon Jun 16 01:24:37 1997 Jason Merrill <jason@yorick.cygnus.com>
18790 * repo.c (extract_string): Null-terminate.
18792 * cp-tree.h (TI_SPEC_INFO): New macro.
18793 (CLASSTYPE_TI_SPEC_INFO): New macro.
18794 * pt.c (push_template_decl): Correctly determine # of template parms
18797 * call.c (compare_ics): Really fix 'this' conversions.
18799 * pt.c (do_decl_instantiation): Don't crash on explicit inst of
18802 * pt.c (push_template_decl): Complain about mismatch in # of
18803 template parms between a class template and a member template.
18805 Sun Jun 15 02:38:20 1997 Jason Merrill <jason@yorick.cygnus.com>
18807 * method.c (synthesize_method): You can't call
18808 function_cannot_inline_p after finish_function.
18809 * decl.c (finish_function): Turn on flag_inline_functions and turn
18810 off DECL_INLINE before handing a synthesized method to the
18813 Thu Jun 12 17:35:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18815 * method.c (synthesize_method): Remove July 30 change to never set
18816 DECL_INLINE if at_eof.
18818 Thu Jun 12 15:25:08 1997 Mike Stump <mrs@cygnus.com>
18820 * xref.c (GNU_xref_member): Ensure that the node has a
18821 decl_lang_specific part before checking DECL_FRIEND_P.
18823 Thu Jun 12 12:36:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18825 * pt.c (instantiate_class_template): Diagnose non-class types used
18828 Wed Jun 11 17:33:40 1997 Jason Merrill <jason@yorick.cygnus.com>
18830 * typeck.c (build_conditional_expr): Use convert_for_initialization
18831 instead of convert_and_check.
18833 Wed Jun 11 12:31:33 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18835 * parse.y (typespec): Don't pedwarn for typeof.
18837 Tue Jun 10 00:22:09 1997 Jason Merrill <jason@yorick.cygnus.com>
18839 * repo.c (finish_repo): Only check changes if we would write a
18842 * call.c (compare_ics): Fix handling of 'this' conversions.
18844 * pt.c (do_decl_instantiation): Support static data too. Rename
18845 from do_function_instantiation.
18846 * cp-tree.h: Adjust.
18849 * repo.c (extract_string): New fn.
18850 (get_base_filename): Use it.
18851 (init_repo): Compare old args with current args.
18853 Mon Jun 9 14:25:30 1997 Mike Stump <mrs@cygnus.com>
18855 * Makefile.in, Make-lang.in: Protect C-ls with a comment
18856 character, idea from Paul Eggert <eggert@twinsun.com>.
18858 Mon Jun 9 01:52:03 1997 Jason Merrill <jason@yorick.cygnus.com>
18860 * typeck.c (c_expand_return): Be more persistent in looking for
18863 * cvt.c (build_up_reference): Use NOP_EXPR for switching from
18864 pointer to reference.
18866 * class.c (build_vbase_path): Don't do anything if PATH has no steps.
18868 Sun Jun 8 03:07:05 1997 Jason Merrill <jason@yorick.cygnus.com>
18870 * init.c (build_member_call, build_offset_ref):
18871 Use do_scoped_id instead of do_identifier.
18873 * cvt.c (convert): Remove bogosity.
18875 Sat Jun 7 20:50:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18877 * cvt.c (build_up_reference): Do checks of ARGTYPE and
18878 TARGET_TYPE before trying to use get_binfo.
18880 Fri Jun 6 17:36:39 1997 Jason Merrill <jason@yorick.cygnus.com>
18882 * cvt.c (build_up_reference): Call get_binfo to get access control.
18884 * decl2.c (import_export_decl): If we don't support weaks, leave
18887 Fri Jun 6 15:55:49 1997 Mike Stump <mrs@cygnus.com>
18889 * except.c (expand_builtin_throw): Add support for machines that
18890 cannot access globals after throw's epilogue when
18891 -fno-sjlj-exceptions is used.
18893 Thu Jun 5 16:28:43 1997 Jason Merrill <jason@yorick.cygnus.com>
18895 * parse.y: 'std::' becomes '::'.
18896 * lex.c (real_yylex): Remove 'namespace' warning.
18897 * init.c (build_member_call): Ignore 'std::'.
18898 (build_offset_ref): Likewise.
18899 * decl2.c (do_using_directive): Ignore 'using namespace std;'.
18900 (do_toplevel_using_decl): Ignore 'using std::whatever'.
18901 * decl.c (push_namespace): Just sorry.
18902 (pop_namespace): Nop.
18903 (init_decl_processing): Declare std namespace.
18905 Tue Jun 3 18:08:23 1997 Jason Merrill <jason@yorick.cygnus.com>
18907 * search.c (push_class_decls): A name which ambiguously refers to
18908 several instantiations of the same template just refers to the
18911 Tue Jun 3 12:30:40 1997 Benjamin Kosnik <bkoz@cirdan.cygnus.com>
18913 * decl.c (build_enumerator): Fix problem with unsigned long
18914 enumerated values being smashed to ints, causing overflow
18915 when computing next enumerated value (for enum values around
18918 Mon Jun 2 17:40:56 1997 Jason Merrill <jason@yorick.cygnus.com>
18920 * typeck.c (build_component_ref): Only call mark_used on a decl.
18922 Thu May 29 15:54:17 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18924 * typeck.c (build_c_cast): Make the check for a ptr to function
18925 more specific before possible default_conversion call.
18927 Thu May 29 13:02:06 1997 Mike Stump <mrs@cygnus.com>
18929 * except.c (expand_exception_blocks): Simplify and fix and make
18930 sure we don't end a region in a sequence, as expand_end_bindings
18933 Wed May 28 17:08:03 1997 Mike Stump <mrs@cygnus.com>
18935 * except.c (init_exception_processing): Mark terminate as not
18936 returning so that the optimizer can optimize better.
18938 Tue May 27 19:49:19 1997 Mike Stump <mrs@cygnus.com>
18940 * cvt.c (convert): Don't do any extra work, if we can avoid it
18943 Tue May 27 18:21:47 1997 Mike Stump <mrs@cygnus.com>
18945 * *.[chy]: Change cp_convert to ocp_convert, change convert to
18946 cp_convert. convert is now reserved for the backend, and doesn't
18947 have the semantics a frontend person should ever want.
18949 Fri May 23 10:58:31 1997 Jason Merrill <jason@yorick.cygnus.com>
18951 * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
18952 Lose -traditional support.
18954 Thu May 22 15:41:28 1997 Jason Merrill <jason@yorick.cygnus.com>
18956 * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
18958 * parse.y (self_reference): Do it for templates, too.
18959 * class.c (pushclass): Don't overload_template_name; the alias
18960 generated by build_self_reference serves the same purpose.
18962 * tree.c (list_hash): Make static, take more args.
18963 (list_hash_lookup): Likewise.
18964 (list_hash_add): Make static.
18965 (list_hash_canon): Lose.
18966 (hash_tree_cons): Only build a new node if one isn't already in the
18968 (hash_tree_chain): Use hash_tree_cons.
18969 * cp-tree.h: Adjust.
18970 * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
18971 of calling lookup_name.
18973 Wed May 21 18:24:19 1997 Jason Merrill <jason@yorick.cygnus.com>
18975 * pt.c (instantiate_class_template): TYPE_VALUES for an enum
18976 doesn't refer to the CONST_DECLs.
18978 Tue May 20 21:09:32 1997 Bob Manson <manson@charmed.cygnus.com>
18980 * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
18982 (expand_class_desc): Convert the last argument to a sizetype.
18984 Tue May 20 13:55:57 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
18986 * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
18987 __real__): Add reswords.
18988 * hash.h: Regenerate.
18989 * lex.h (rid): Add RID_COMPLEX.
18990 (RID_LAST_MODIFIER): Set to RID_COMPLEX.
18991 * lex.c (init_lex): Add building of RID_COMPLEX.
18992 (real_yylex): General cleanup in line with what c-lex.c also has,
18993 sans the cruft for traditional; add handling of SPEC_IMAG, complex
18994 types, and imaginary numeric constants.
18995 * parse.y (REALPART, IMAGPART): Add tokens.
18996 (unary_expr): Add REALPART and IMAGPART rules.
18997 * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
18998 * decl.c (complex_{integer,float,double,long}_type_node): Define
19000 (init_decl_processing): Set up the types.
19001 (grokdeclarator): Add handling of RID_COMPLEX. Set and use
19002 DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
19003 * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19004 * cvt.c (cp_convert): Handle COMPLEX_TYPE.
19005 * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
19007 * method.c (build_overload_name): Add handling of the different
19008 COMPLEX_TYPEs, prefixing them with `J'.
19009 * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
19010 as a template parm.
19011 (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
19012 * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
19013 (mapcar): Handle COMPLEX_CST.
19014 * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
19015 (common_type): Add code for complex types.
19016 (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
19017 (convert_for_assignment): Likewise.
19018 (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
19020 Mon May 19 12:26:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19022 * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
19023 tsubst_expr, as it might try to do overload resolution.
19025 Sat May 17 10:48:31 1997 Jason Merrill <jason@yorick.cygnus.com>
19027 * pt.c (instantiate_class_template): Oops.
19029 Fri May 16 14:23:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19031 * cp-tree.def: Add TAG_DEFN.
19032 * pt.c (tsubst_enum): New fn.
19033 (instantiate_class_template): Use it.
19034 (tsubst_expr): Support TAG_DEFN.
19035 (tsubst): Support local enums.
19036 (tsubst_copy): Likewise.
19037 * decl.c (finish_enum): Likewise.
19038 (start_enum): If this is a local enum, switch to permanent_obstack.
19040 Wed May 14 19:08:28 1997 Mike Stump <mrs@cygnus.com>
19042 * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
19043 (finish_function): Put the base init code for constructors just
19044 after the parm cleanup insns.
19045 (struct cp_function): Add last_parm_cleanup_insn.
19046 (push_cp_function_context): Likewise.
19047 (pop_cp_function_context): Likewise.
19049 Tue May 13 15:51:20 1997 Jason Merrill <jason@yorick.cygnus.com>
19051 * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
19053 Wed May 7 11:17:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19055 * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
19056 for THUNK_FNDECL before we switch to temporary allocation.
19058 Mon May 5 14:46:53 1997 Jason Merrill <jason@yorick.cygnus.com>
19060 * call.c (build_new_op): Handle null arg2 for ?:.
19062 Thu May 1 18:26:37 1997 Mike Stump <mrs@cygnus.com>
19064 * except.c (expand_exception_blocks): Ensure that we flow through
19065 the end of the exception region for the exception specification.
19066 Move exception region for the exception specification in, so that
19067 it doesn't protect the parm cleanup. Remove some obsolete code.
19068 * decl.c (store_parm_decls): Likewise.
19069 (finish_function): Likewise.
19071 Tue Apr 29 15:38:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19073 * init.c (build_new): Fix nothrow handling.
19075 Tue Apr 29 14:29:50 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19077 * init.c (emit_base_init): Don't warn about the initialization
19078 list for an artificial member.
19080 Fri Apr 25 17:47:59 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19082 * expr.c (do_case): Handle !START case for the error msg.
19084 Fri Apr 25 11:55:23 1997 Jason Merrill <jason@yorick.cygnus.com>
19086 * decl2.c, lang-options.h: New option -Weffc++.
19087 * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
19090 * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
19091 to MULTIPLE_SYMBOL_SPACES.
19093 Wed Apr 23 18:06:50 1997 Jason Merrill <jason@yorick.cygnus.com>
19095 * method.c (emit_thunk, generic case): Set current_function_is_thunk.
19097 * method.c (emit_thunk, macro case): Set up DECL_RESULT.
19099 * typeck.c (c_expand_return): Don't complain about returning void
19100 to void in an artificial function.
19101 * method.c (make_thunk): Change settings of READONLY/VOLATILE,
19102 don't set DECL_RESULT, set DECL_ARTIFICIAL.
19103 (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
19105 Wed Apr 23 14:43:06 1997 Mike Stump <mrs@cygnus.com>
19107 * init.c (init_decl_processing): Add support for setjmp/longjmp based
19108 exception handling.
19109 * except.c (init_exception_processing): Likewise.
19110 (expand_end_catch_block): Likewise.
19111 (expand_exception_blocks): Likewise.
19112 (expand_throw): Likewise.
19113 * exception.cc (__default_terminate): Likewise.
19115 * init.c (perform_member_init): Use new method of expr level
19116 cleanups, instead of cleanups_this_call and friends.
19117 (emit_base_init): Likewise.
19118 (expand_aggr_vbase_init_1): Likewise.
19119 (expand_vec_init): Likewise.
19120 * decl.c (cp_finish_decl): Likewise.
19121 (expand_static_init): Likewise.
19122 (store_parm_decls): Likewise.
19123 (cplus_expand_expr_stmt): Likewise.
19124 * decl2.c (finish_file): Likewise.
19126 * Make-lang.in (exception.o): Ok to compile with -O now.
19128 * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
19129 we know it will be done later by the backend.
19131 * decl2.c (lang_f_options): Remove support for short temps.
19132 * lang-options.h: Likewise.
19134 Wed Apr 23 04:12:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19136 * tree.c (varargs_function_p): New fn.
19137 * method.c (emit_thunk): Replace broken generic code with code to
19138 generate a heavyweight thunk function.
19140 Tue Apr 22 02:45:18 1997 Jason Merrill <jason@yorick.cygnus.com>
19142 * pt.c (process_template_parm): pedwarn about floating-point parms.
19144 * decl.c (grokdeclarator): inline no longer implies static.
19146 * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
19148 Mon Apr 21 15:42:27 1997 Jason Merrill <jason@yorick.cygnus.com>
19150 * class.c (check_for_override): The signature of an overriding
19151 function is not changed.
19153 * call.c (build_over_call): Move setting of conv into the loop.
19154 Note: this change, along with the related changes of the 18th thru
19155 the 20th of April, fix an infinite loop problem in conversions.
19157 Sun Apr 20 16:24:29 1997 Jason Merrill <jason@yorick.cygnus.com>
19159 * call.c (build_user_type_conversion_1): Really ignore rvalue
19160 conversions when looking for a REFERENCE_TYPE.
19162 * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
19163 * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
19164 * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
19165 (build_unary_op): Likewise.
19166 * call.c (build_over_call): See through a CONVERT_EXPR around the
19167 ADDR_EXPR for on a temporary.
19168 * typeck.c (c_expand_return): See through a CONVERT_EXPR around
19169 the ADDR_EXPR for a local variable.
19171 Fri Apr 18 12:11:33 1997 Jason Merrill <jason@yorick.cygnus.com>
19173 * call.c (build_user_type_conversion_1): If we're trying to
19174 convert to a REFERENCE_TYPE, only consider lvalue conversions.
19175 (build_new_function_call): Print candidates.
19176 (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
19177 (reference_binding): Binding a temporary of a reference-related type
19180 Thu Apr 17 14:37:22 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19182 * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
19183 * tinfo2.cc (type_info::before): Likewise.
19185 Mon Apr 14 12:38:17 1997 Jason Merrill <jason@yorick.cygnus.com>
19187 * call.c (implicit_conversion): Oops.
19189 Fri Apr 11 02:18:30 1997 Jason Merrill <jason@yorick.cygnus.com>
19191 * call.c (implicit_conversion): Try to find a reference conversion
19192 before binding a const reference to a temporary.
19194 Wed Apr 2 12:51:36 1997 Mike Stump <mrs@cygnus.com>
19196 * exception.cc (__default_unexpected): Call terminate by default,
19197 so that if the user overrides terminate, the correct function will
19200 Wed Mar 19 14:14:45 1997 Mike Stump <mrs@cygnus.com>
19202 * parse.y (left_curly): Avoid trying to use any fields of
19203 error_mark_node, as there aren't any.
19205 Thu Mar 13 16:33:22 1997 Jason Merrill <jason@yorick.cygnus.com>
19207 * lex.c (do_identifier): Avoid breaking on overloaded methods
19208 as default arguments.
19210 Wed Mar 12 13:55:10 1997 Hans-Peter Nilsson <Hans-Peter.Nilsson@axis.se>
19212 * call.c (add_template_candidate): Initialize the variable "dummy".
19214 Mon Mar 10 15:13:14 1997 Brendan Kehoe <brendan@canuck.cygnus.com>
19216 * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
19217 before we try to use TYPE_SIZE and TREE_CONSTANT on it.
19219 Fri Mar 7 13:19:36 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19221 * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
19222 (debug_binfo): Delete decl, not needed.
19224 * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
19225 promotes_to_aggr_type): Delete fns.
19226 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
19227 SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
19228 PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
19230 * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
19232 * friend.c (is_friend_type): Delete fn.
19233 * cp-tree.h (is_friend_type): Delete decl.
19235 * decl.c (original_result_rtx, double_ftype_double,
19236 double_ftype_double_double, int_ftype_int, long_ftype_long,
19237 float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
19238 * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
19240 * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
19242 * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
19244 * decl.c (pushdecl_nonclass_level): #if 0, unused.
19245 * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
19247 * lex.c (reinit_lang_specific): #if 0, unused.
19248 * cp-tree.h (reinit_lang_specific): #if 0 decl.
19250 * decl.c (revert_static_member_fn): Make static, adding fwd decl.
19251 * cp-tree.h (revert_static_member_fn): Delete decl.
19253 * class.c (root_lang_context_p): Delete fn.
19254 * cp-tree.h (root_lang_context_p): Delete decl.
19256 * decl.c (set_current_level_tags_transparency): #if 0, unused.
19257 * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
19259 * lex.c (set_vardecl_interface_info): Make static.
19260 * cp-tree.h (set_vardecl_interface_info): Delete decl.
19262 * call.c (find_scoped_type): Make static.
19263 * cp-tree.h (find_scoped_type): Delete decl.
19265 * search.c (convert_pointer_to_vbase): Make static.
19266 * cp-tree.h (convert_pointer_to_vbase): Delete decl.
19268 * decl.c (const_ptr_type_node): Likewise.
19269 * cp-tree.h (const_ptr_type_node): Delete decl.
19271 * typeck.c (common_base_type): Make static.
19272 * cp-tree.h (common_base_types): Delete erroneous decl.
19274 * pt.c (classtype_mangled_name): Make static.
19275 * cp-tree.h (classtype_mangled_name): Delete decl.
19277 * lex.c (check_newline): Make static.
19278 * cp-tree.h (check_newline): Delete decl.
19280 * typeck.c (build_x_array_ref): Delete fn, same idea as
19282 * cp-tree.h (build_x_array_ref): Delete decl.
19284 * lex.c (copy_decl_lang_specific): Delete fn, same idea as
19286 * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
19288 * class.c (build_vtable_entry): Make static.
19289 * cp-tree.h (build_vtable_entry): Delete decl.
19291 * class.c (build_vbase_pointer): Make static.
19292 * cp-tree.h (build_vbase_pointer): Delete decl.
19294 * sig.c (build_sptr_ref): Add forward decl and make static.
19295 * cp-tree.h (build_sptr_ref): Delete decl.
19297 * call.c (build_new_method_call): Add forward decl and make static.
19298 * cp-tree.h (build_new_method_call): Delete decl.
19300 * call.c (build_object_call): Make static.
19301 * class.c (check_for_override, complete_type_p, mark_overriders):
19303 * decl.c (cp_function_chain): Likewise.
19304 * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
19306 * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
19308 * tree.c (build_cplus_array_type_1): Likewise.
19309 * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
19310 (comp_target_parms): Likewise.
19312 * init.c (build_builtin_call): Make static.
19313 * cp-tree.h (build_builtin_call): Delete decl.
19315 * typeck.c (binary_op_error): Delete decl.
19316 * cp-tree.h (binary_op_error): Likewise.
19318 Thu Mar 6 16:13:52 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19320 * call.c (build_method_call): Compare against error_mark_node
19321 directly, rather than the ERROR_MARK tree code.
19322 * cvt.c (cp_convert): Likewise.
19323 * decl.c (print_binding_level): Likewise.
19324 (duplicate_decls): Likewise.
19325 (grokdeclarator): Likewise.
19326 (grokdeclarator): Likewise.
19327 * init.c (expand_aggr_init_1): Likewise.
19328 (decl_constant_value): Likewise.
19329 * method.c (build_opfncall): Likewise.
19330 (hack_identifier): Likewise.
19331 * typeck.c (build_modify_expr): Likewise.
19333 * typeck.c (build_c_cast): Don't decl TYPE as register tree.
19335 Sun Mar 2 02:54:36 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19337 * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
19339 * pt.c (coerce_template_parms): Add new error message.
19341 * method.c (build_overload_value): Implement name mangling for
19342 floating-point template arguments.
19344 * method.c (build_overload_int, icat, dicat): Fix mangling of template
19345 arguments whose absolute value doesn't fit in a signed word.
19347 Mon Mar 3 12:14:54 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19349 * friend.c: New file; put all of the friend stuff in here.
19350 * init.c: Instead of here.
19351 * Makefile.in (CXX_OBJS): Add friend.o.
19352 (friend.o): Add dependencies.
19353 * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
19355 Sun Mar 2 11:04:43 1997 Jason Merrill <jason@yorick.cygnus.com>
19357 * call.c (build_scoped_method_call): Complain if the scope isn't a
19360 Wed Feb 26 11:31:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19362 * parse.y (left_curly): Don't crash on erroneous type.
19364 * init.c (build_delete): Fix type of ref.
19366 Tue Feb 25 12:41:48 1997 Jason Merrill <jason@yorick.cygnus.com>
19368 * search.c (get_vbase_1): Renamed from get_vbase.
19369 (get_vbase): Wrapper, now non-static.
19370 (convert_pointer_to_vbase): Now static.
19372 * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
19373 * init.c (build_delete): Pass one.
19374 (build_partial_cleanup_for): Use build_scoped_method_call.
19375 * decl.c (finish_function): Pass a binfo.
19377 Mon Feb 24 15:00:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19379 * call.c (build_over_call): Only synthesize non-trivial copy ctors.
19381 * typeck.c (build_c_cast): Lose other reference to flag.
19383 * call.c (build_field_call): Don't look for [cd]tor_identifier.
19384 * decl2.c (delete_sanity): Remove meaningless use of
19385 LOOKUP_HAS_IN_CHARGE.
19386 * decl.c (finish_function): Use build_scoped_method_call instead
19387 of build_delete for running vbase dtors.
19388 * init.c (build_delete): Call overload resolution code instead of
19389 duplicating it badly.
19391 Thu Feb 20 15:12:15 1997 Jason Merrill <jason@yorick.cygnus.com>
19393 * call.c (build_over_call): Call mark_used before trying to elide
19396 * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
19398 Wed Feb 19 11:18:53 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19400 * typeck.c (build_modify_expr): Always pedwarn for a cast to
19401 non-reference used as an lvalue.
19403 Wed Feb 19 10:35:37 1997 Jason Merrill <jason@yorick.cygnus.com>
19405 * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
19407 Tue Feb 18 15:40:57 1997 Jason Merrill <jason@yorick.cygnus.com>
19409 * parse.y (handler): Fix template typo.
19411 Sun Feb 16 02:12:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19413 * error.c (lang_decl_name): New fn.
19414 * tree.c (lang_printable_name): Use it.
19416 Fri Feb 14 16:57:05 1997 Mike Stump <mrs@cygnus.com>
19418 * g++spec.c: Include config.h so that we can catch bzero #defines
19419 from the config file.
19421 Tue Feb 11 13:50:48 1997 Mike Stump <mrs@cygnus.com>
19423 * new1.cc: Include a declaration for malloc, to avoid warning, and
19424 avoid lossing on systems that require one (ones that define malloc
19427 Mon Feb 10 22:51:13 1997 Bruno Haible <bruno@linuix.mathematik.uni-karlsruhe.de>
19429 * decl2.c (max_tinst_depth): New variable.
19430 (lang_decode_option): Parse "-ftemplate-depth-NN" command line
19432 * pt.c (max_tinst_depth): Variable moved.
19433 * lang-options.h: Declare "-ftemplate-depth-NN" command line option
19436 Fri Feb 7 15:43:34 1997 Jason Merrill <jason@yorick.cygnus.com>
19438 * decl.c (xref_basetypes): Allow a base class that depends on
19439 template parms to be incomplete.
19441 * decl2.c (build_expr_from_tree): Support typeid(type).
19442 * rtti.c (get_typeid): Support templates.
19443 (expand_si_desc, expand_class_desc): Fix string length.
19444 (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
19446 Tue Feb 4 11:28:24 1997 Jason Merrill <jason@yorick.cygnus.com>
19448 * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
19450 * pt.c (tsubst): Put it back for -fno-ansi-overloading.
19452 Mon Feb 3 18:41:12 1997 Jason Merrill <jason@yorick.cygnus.com>
19454 * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
19455 smashes together template and non-template decls of the same
19458 Thu Jan 30 19:18:00 1997 Jason Merrill <jason@yorick.cygnus.com>
19460 * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
19462 Wed Jan 29 11:40:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19464 * decl.c (duplicate_decls): Next route, pedwarn about different
19465 exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
19467 Tue Jan 28 20:43:29 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19469 * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
19470 (struct lang_type): Delete has_default_implementation member.
19471 Increase dummy to 21.
19472 * decl.c (start_method): Delete usage.
19474 * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
19475 store_after_parms, start_decl_1, auto_function): Add decls.
19476 (get_arglist_len_in_bytes, declare_implicit_exception,
19477 have_exceptions_p, make_type_decl, typedecl_for_tag,
19478 store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
19479 build_component_type_expr, cplus_exception_name,
19480 {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
19481 * call.c (build_this): Make static.
19482 (is_complete): Likewise.
19483 (implicit_conversion): Likewise.
19484 (reference_binding): Likewise.
19485 (standard_conversion): Likewise.
19486 (strip_top_quals): Likewise.
19487 (non_reference): Likewise.
19488 (build_conv): Likewise.
19489 (user_harshness): Likewise.
19490 (rank_for_ideal): Likewise.
19491 * decl.c (start_decl_1): Delete forward decl.
19492 (push_decl_level): Make static.
19493 (resume_binding_level): Make static.
19494 (namespace_bindings_p): Make static.
19495 (declare_namespace_level): Make static.
19496 (lookup_name_real): Make static.
19497 (duplicate_decls): Make static. Take register off NEWDECL and
19498 OLDDECL parm decls.
19499 * decl2.c (get_sentry): Make static.
19500 (temp_name_p): Delete fn.
19501 * except.c (auto_function): Delete decl.
19502 * lex.c (handle_{cp,sysv}_pragma): Make static.
19503 (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
19504 * method.c (do_build_{copy_constructor,assign_ref}): Make static.
19505 * pt.c (tsubst_expr_values): Make static.
19506 * rtti.c (combine_strings): Delete decl.
19508 Tue Jan 28 16:40:40 1997 Jason Merrill <jason@yorick.cygnus.com>
19510 * pt.c (push_template_decl): Handle getting a typedef.
19512 * call.c (build_new_function_call): Complain about void arg.
19514 Tue Jan 28 15:25:09 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19516 * decl.c (duplicate_decls): Give pedwarn of different exceptions
19517 if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
19519 Mon Jan 27 19:21:29 1997 Mike Stump <mrs@cygnus.com>
19521 * except.c (expand_throw): Don't expand the cleanup tree here,
19522 since we are not going to write the rtl out. Fixes problem with
19525 Mon Jan 27 16:24:35 1997 Sean McNeil <sean@mcneil.com>
19527 * Make-lang.in: Add $(exeext) as necessary.
19529 Mon Jan 27 13:20:39 1997 Mike Stump <mrs@cygnus.com>
19531 * parse.y (handler_seq): Must have at least one catch clause.
19533 Sat Jan 25 12:00:05 1997 Jason Merrill <jason@yorick.cygnus.com>
19535 * call.c (add_builtin_candidate): Restore ?: hack.
19537 * decl.c (grok_op_properties): More warnings.
19539 Sat Jan 25 08:50:03 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19541 * decl.c (duplicate_decls): On second thought, do it as a pedwarn
19542 still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
19544 * decl.c (duplicate_decls): Scale back to a warning, and only do
19547 Fri Jan 24 17:52:54 1997 Mike Stump <mrs@cygnus.com>
19549 * decl.c (duplicate_decls): pedwarn mismatched exception
19552 Thu Jan 23 18:18:54 1997 Mike Stump <mrs@cygnus.com>
19554 * call.c (build_new_method_call): Don't display the invisible
19555 argument for controlling virtual bases.
19557 Thu Jan 23 16:48:10 1997 Mike Stump <mrs@cygnus.com>
19559 * new: Add nothrow new and delete, bad_alloc and throw specifications
19561 * decl.c (init_decl_processing): Add throw specification for delete.
19562 * new.cc (nothrow): Define.
19563 * lex.c (real_yylex): Removing warning that throw and friends are
19565 * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
19566 * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
19567 * Make-lang.in: Add new{1,2}.{cc,o}.
19569 Thu Jan 23 16:39:06 1997 Jason Merrill <jason@yorick.cygnus.com>
19571 * lex.c (cons_up_default_function): Fix return type of synth op=.
19573 * init.c (emit_base_init): Add warnings for uninitialized members
19576 * decl.c (xref_basetypes): Add warning for non-polymorphic type
19577 with destructor used as base type.
19579 * decl.c (grok_op_properties): Add warning for op= returning void.
19580 * typeck.c (c_expand_return): Add warning for op= returning anything
19583 * class.c (finish_struct_1): Add warning for class with pointers
19584 but not copy ctor or copy op=.
19586 * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
19587 * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
19588 (instantiate_template): If -fexternal-templates, add this
19589 instantiation to pending_templates.
19591 * decl2.c (copy_assignment_arg_p): Disable old hack to support
19594 Tue Jan 21 18:32:04 1997 Mike Stump <mrs@cygnus.com>
19596 * cvt.c (cp_convert): pedwarn enum to pointer conversions.
19598 Mon Jan 20 17:59:51 1997 Jason Merrill <jason@yorick.cygnus.com>
19600 * call.c (standard_conversion): Handle getting references. Tack
19601 on RVALUE_CONV here. Do it for non-class types, too.
19602 (reference_binding): Pass references to standard_conversion.
19603 (implicit_conversion): Likewise.
19604 (add_builtin_candidate): Disable one ?: kludge.
19605 (convert_like): Handle RVALUE_CONVs for non-class types.
19606 (joust): Disable the other ?: kludge.
19608 Mon Jan 20 14:53:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19610 * decl.c (init_decl_processing): Add code to build up common
19611 function types beforehand, to avoid creation then removal of
19612 things already in the hash table.
19614 Mon Jan 20 14:43:49 1997 Jason Merrill <jason@yorick.cygnus.com>
19616 * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
19619 * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
19620 current_template_parms.
19622 Fri Jan 17 10:25:42 1997 Jason Merrill <jason@yorick.cygnus.com>
19624 * search.c (lookup_field): Don't return a function, check want_type.
19626 Thu Jan 16 18:14:35 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19628 * init.c (build_new): Make sure PLACEMENT has a type.
19630 Thu Jan 16 17:40:28 1997 Jason Merrill <jason@yorick.cygnus.com>
19632 * init.c (build_new): Support new (nothrow).
19634 Wed Jan 15 12:38:14 1997 Jason Merrill <jason@yorick.cygnus.com>
19636 * pt.c (instantiate_decl): Also do push_to_top_level before setting
19639 * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
19640 * pt.c (tsubst): Defer instantiation of default args.
19641 * call.c (build_over_call): Until here.
19643 Wed Jan 15 10:08:10 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19645 * search.c (lookup_field): Make sure we have an
19646 IDENTIFIER_CLASS_VALUE before we try to return it.
19648 Thu Jan 9 07:19:01 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
19650 * call.c (build_method_call): Delete unused var PARM.
19651 (build_overload_call_real): Likewise.
19652 (build_object_call): Delete unused var P.
19653 (build_new_op): Likewise.
19654 * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
19655 var definitions, which are never used.
19656 (shadow_tag): Delete unused var FN.
19657 * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
19658 * init.c (build_new): Delete unused var ALLOC_TEMP.
19659 * method.c (hack_identifier): Delete unused var CONTEXT.
19660 (do_build_copy_constructor): Delete unused var NAME.
19661 (synthesize_method): Delete unused var BASE.
19662 * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
19663 * rtti.c (build_headof): Delete unused var VPTR.
19664 (get_typeid): Delete unused var T.
19665 * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
19667 (build_ptrmemfunc): Delete unused vars U and NINDEX.
19668 * typeck2.c (build_functional_cast): Delete unused var BINFO.
19670 Wed Jan 8 13:09:54 1997 Jason Merrill <jason@yorick.cygnus.com>
19672 * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
19673 things in a type being defined.
19674 * decl.c (finish_enum): Reverse the values so that they are in
19677 * pt.c (instantiate_class_template): Don't initialize
19678 BINFO_BASETYPES until the vector is filled out.
19679 (unify): Don't abort on conflicting bindings, just fail.
19680 (instantiate_decl): Do push_tinst_level before any tsubsting.
19682 * method.c (build_overload_value): Handle getting a
19683 TEMPLATE_CONST_PARM for a pointer.
19685 Tue Jan 7 14:00:58 1997 Jason Merrill <jason@yorick.cygnus.com>
19687 * init.c (expand_member_init): Don't give 'not a base' error for
19690 * pt.c (instantiate_decl): Call import_export_decl later.
19692 * pt.c (instantiate_class_template): Return a value.
19694 * parse.y (extension): New rule for __extension__.
19695 (extdef, unary_expr, decl, component_decl): Use it.
19697 Tue Jan 7 09:20:28 1997 Mike Stump <mrs@cygnus.com>
19699 * class.c (base_binfo): Remove unused base_has_virtual member.
19700 (finish_base_struct): Likewise.
19701 (finish_struct_1): Likewise.
19703 Tue Dec 31 20:25:50 1996 Mike Stump <mrs@cygnus.com>
19705 * search.c (expand_upcast_fixups): Fix bogus code generation
19706 problem where the generated code uses the wrong index into the
19707 runtime built vtable on the stack. Old code could clobber random
19710 Tue Dec 31 15:16:56 1996 Mike Stump <mrs@cygnus.com>
19712 * init.c (perform_member_init): Make sure the partial EH cleanups
19713 live on the function_obstack.
19715 Fri Dec 27 10:31:40 1996 Paul Eggert <eggert@twinsun.com>
19717 * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
19718 this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
19720 Tue Dec 24 10:24:03 1996 Jeffrey A Law <law@cygnus.com>
19722 * decl.c (grokvardecl): Avoid ANSI style initialization.
19724 Sun Dec 22 04:22:06 1996 Jason Merrill <jason@yorick.cygnus.com>
19726 * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
19728 Fri Dec 20 17:09:25 1996 Jason Merrill <jason@yorick.cygnus.com>
19730 * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
19732 Fri Dec 20 12:17:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19734 * g++spec.c (lang_specific_driver): Put missing hyphen in front of
19735 arguments we compare against. Start the count of I at 1, not 0,
19736 since argv[0] is still the command.
19738 Thu Dec 19 11:53:57 1996 Stan Shebs <shebs@andros.cygnus.com>
19740 * lang-specs.h: Accept .cp as an C++ extension.
19742 Mon Dec 16 22:43:31 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19744 * cp-tree.h (ptr_reasonably_similar): Add decl.
19746 Thu Dec 12 15:00:35 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19748 * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
19749 pointer. New local SPECBITS with the parm's value.
19750 (grokdeclarator): Pass &specbits down.
19752 * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
19753 before we try to do C_SET_EXP_ORIGINAL_CODE on it.
19755 * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
19756 CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
19758 * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
19759 not an error_mark_node.
19761 Sat Dec 7 17:20:22 1996 Jason Merrill <jason@yorick.cygnus.com>
19763 * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
19764 * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
19766 Fri Dec 6 14:40:09 1996 Jason Merrill <jason@yorick.cygnus.com>
19768 * decl.c (grokdeclarator): When giving an anonymous struct a name,
19769 replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
19772 * typeck2.c (build_m_component_ref): If component is a pointer
19773 to data member, resolve the OFFSET_REF now.
19775 * call.c (convert_like): Don't go into infinite recursion.
19777 * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
19779 * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
19780 * tree.c (layout_basetypes): And on the vbase ptr.
19782 Thu Dec 5 02:11:28 1996 Jason Merrill <jason@yorick.cygnus.com>
19784 * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
19785 CHAR_TYPE_SIZE so bool is always the same size as another type.
19787 * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
19789 Tue Dec 3 23:18:37 1996 Jason Merrill <jason@yorick.cygnus.com>
19791 * decl2.c (grok_x_components): Remove synthesized methods from
19792 TYPE_METHODS of an anonymous union, complain about member
19794 * decl.c (shadow_tag): Wipe out memory of synthesized methods in
19796 (finish_function): Just clear the DECL_RTL of our arguments.
19798 Fri Nov 29 21:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19800 * decl2.c (finish_file): Emit DWARF debugging info for static data
19803 * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
19805 Wed Nov 27 14:47:15 1996 Bob Manson <manson@charmed.cygnus.com>
19807 * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
19810 Wed Nov 27 16:05:19 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19812 * Make-lang.in (g++-cross$(exeext)): Fix typo.
19814 Wed Nov 27 08:14:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19816 Make the g++ driver now be a standalone program, rather than one
19817 that tries to run the gcc driver after munging up the options.
19818 * Make-lang.in (g++.c, g++spec.o): New rules.
19819 (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
19821 (g++$(exeext)): New rule, based on xgcc rule.
19822 (g++-cross$(exeext)): Now just copies g++$(exeext) over.
19823 * g++spec.c: New file.
19824 * g++.c: Removed file.
19826 Tue Nov 26 19:01:09 1996 Mike Stump <mrs@cygnus.com>
19828 * cvt.c (build_up_reference): Arrange for any temporary values
19829 that have been keep in registers until now to be put into memory.
19831 Mon Nov 25 15:16:41 1996 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
19833 * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
19834 that make -j3 bootstrap works better.
19836 Sun Nov 24 02:09:39 1996 Jason Merrill <jason@yorick.cygnus.com>
19838 * decl.c (pushtag): Do pushdecl for anon tags.
19840 Thu Nov 21 16:30:24 1996 Jason Merrill <jason@yorick.cygnus.com>
19842 * typeck.c (c_expand_return): Fix logic.
19843 (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
19845 Wed Nov 20 18:47:31 1996 Bob Manson <manson@charmed.cygnus.com>
19847 * g++.c (main): Make sure arglist has a final NULL entry. Add
19848 PEXECUTE_LAST to the flags passed to pexecute, as otherwise
19849 stdin/stdout of the invoked program are redirected to
19852 Tue Nov 19 16:12:44 1996 Jason Merrill <jason@yorick.cygnus.com>
19854 * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
19856 Tue Nov 19 15:48:19 1996 Mike Stump <mrs@cygnus.com>
19858 * init.c (resolve_offset_ref): Handle obj.vfn better.
19859 * typeck.c (build_component_ref): Set TREE_TYPE on result from
19862 Tue Nov 19 13:14:33 1996 Mike Stump <mrs@cygnus.com>
19864 * typeck.c (convert_for_assignment): Also handle anachronistic
19865 implicit conversions from (::*)() to cv void*.
19866 * cvt.c (cp_convert_to_pointer): Likewise.
19868 Mon Nov 18 17:05:26 1996 Jason Merrill <jason@yorick.cygnus.com>
19870 * lex.c (handle_cp_pragma): Fix bogus warning.
19872 Mon Nov 18 16:10:43 1996 Mike Stump <mrs@cygnus.com>
19874 * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
19875 (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
19877 Thu Nov 14 23:18:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19879 * class.c (finish_struct_1): Support DWARF2_DEBUG.
19880 * search.c (dfs_debug_mark): Likewise.
19881 * decl2.c (finish_vtable_vardecl): Likewise.
19882 * decl.c (pushtag, finish_enum): Likewise.
19883 * lex.c (check_newline): Use debug_* instead of calling *out
19884 functions directly.
19886 Thu Nov 14 15:21:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19888 * Make-lang.in (cplib2.ready): Add else clause to avoid problems
19889 on some picky hosts.
19891 Wed Nov 13 12:32:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19893 * class.c (finish_struct_1): A class has a non-trivial copy
19894 constructor if it has virtual functions.
19896 * cvt.c (cp_convert): Always call a constructor.
19898 * call.c (reference_binding): Still tack on a REF_BIND
19899 for bad conversions.
19900 (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
19902 * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
19903 (c_expand_return): Likewise.
19904 * typeck2.c (digest_init): Likewise for { }.
19905 * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
19906 * cvt.c (cp_convert): Handle failure better.
19908 Wed Nov 13 11:51:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19910 * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
19911 of GCC be path-relative.
19913 Wed Nov 13 11:27:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
19915 * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
19916 it does need choose-temp.o and pexecute.o.
19918 Wed Nov 13 07:53:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19920 * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
19921 that we still use it.
19922 (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
19924 Wed Nov 13 02:00:26 1996 Jason Merrill <jason@yorick.cygnus.com>
19926 * init.c (expand_default_init): Avoid calling constructors to
19927 initialize reference temps.
19929 * cvt.c (convert_to_reference): Fix.
19931 Tue Nov 12 19:10:07 1996 Jason Merrill <jason@yorick.cygnus.com>
19933 * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
19934 (convert_to_reference): Likewise.
19935 * typeck.c (convert_for_initialization): Likewise.
19936 * init.c (expand_default_init): Likewise.
19937 (expand_aggr_init_1): Likewise.
19938 * cp-tree.h (CONV_NONCONVERTING): Lose.
19939 * typeck.c (build_c_cast): Lose allow_nonconverting parm.
19941 * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
19943 Tue Nov 12 16:29:04 1996 Brendan Kehoe <brendan@canuck.cygnus.com>
19945 * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
19947 Tue Nov 12 15:26:17 1996 Jason Merrill <jason@yorick.cygnus.com>
19949 * init.c (expand_aggr_init_1): Don't crash on non-constructor
19952 Tue Nov 12 14:00:50 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
19954 * g++.c: Include gansidecl.h.
19955 (VPROTO, PVPROTO, VA_START): Delete.
19956 (choose_temp_base_try, choose_temp_base, perror_exec,
19957 run_dos) [__MSDOS__]: Delete fns.
19958 (pfatal_with_name): Delete fn.
19959 (temp_filename): Declare like in gcc.c.
19960 (pexecute, pwait, choose_temp_base): Declare from gcc.c.
19961 (error_count, signal_count): Define.
19962 (error): Delete both definitions.
19963 (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
19964 (pfatal_pexecute): Add fn from gcc.c.
19965 (main): Rename local VERBOSE var to VERBOSE_FLAG. Rewrite the
19966 code to use the pexecute stuff also used by gcc.c.
19967 (MIN_FATAL_STATUS): Define.
19968 * Make-lang.in (g++): Add dependency on and linking with
19969 choose-temp.o and pexecute.o.
19971 * cp-tree.h: Include gansidecl.h.
19972 (STDIO_PROTO): Delete #undef/#define.
19973 * cvt.c (NULL): Delete #undef/#define.
19974 * expr.c (NULL): Likewise.
19975 * init.c (NULL): Likewise.
19976 * rtti.c (NULL): Likewise.
19977 * xref.c (NULL): Likewise.
19979 * cp-tree.h (build_user_type_conversion): Add prototype.
19980 * call.c (build_user_type_conversion): Delete prototype. Correct
19981 decl of FLAGS arg to be an int.
19982 * cvt.c (build_user_type_conversion): Likewise.
19984 Tue Nov 12 12:16:20 1996 Jason Merrill <jason@yorick.cygnus.com>
19986 * cp-tree.def: Add TRY_BLOCK and HANDLER.
19987 * except.c (expand_start_catch_block): Support templates.
19988 * parse.y (try_block, handler_seq): Likewise.
19989 * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
19991 Mon Nov 11 13:57:31 1996 Jason Merrill <jason@yorick.cygnus.com>
19993 * pt.c (current_template_args): New fn.
19994 (push_template_decl): Use it.
19995 * decl.c (grokdeclarator): Use it.
19997 * decl2.c (build_expr_from_tree): Dereference ref vars.
19999 * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
20000 the decl-specifier-seq.
20002 * decl.c (grok_op_properties): Don't force the type of a conversion
20003 op to be complete. Don't warn about converting to the same type
20004 for template instantiations.
20006 * decl2.c (finish_file): Don't call instantiate_decl on synthesized
20009 Mon Nov 11 13:20:34 1996 Bob Manson <manson@charmed.cygnus.com>
20011 * typeck.c (get_delta_difference): Remove previous bogusness.
20012 Don't give errors if force is set.
20014 Fri Nov 8 17:38:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20016 * decl2.c (finish_file): Don't emit debug info.
20017 * decl.c (pushdecl): Lose obsolete code.
20018 (grokdeclarator): Still do the long long thing after complaining.
20019 * search.c (note_debug_info_needed): Don't do anything if we're in a
20021 * method.c (synthesize_method): For non-local classes,
20022 push_to_top_level first.
20024 Fri Nov 8 11:52:28 1996 Bob Manson <manson@charmed.cygnus.com>
20026 * typeck.c (get_delta_difference): Add no_error parameter.
20027 (build_ptrmemfunc): Call get_delta_difference with no_error set;
20028 we don't want error messages when converting unrelated
20029 pointer-to-member functions.
20031 Thu Nov 7 11:16:24 1996 Mike Stump <mrs@cygnus.com>
20033 * error.c (dump_expr): Improve the wording on error messages that
20034 involve pointer to member functions.
20036 Tue Nov 5 17:12:05 1996 Mike Stump <mrs@cygnus.com>
20038 * cvt.c (cp_convert_to_pointer): Move code for conversions from
20039 (::*)() to void* or (*)() up a bit, so that we can convert from
20040 METHOD_TYPEs as well.
20042 Tue Nov 5 14:54:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20044 * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
20045 There are no 'member' types.
20046 (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
20047 (build_x_typeid): Handle errors.
20049 Mon Nov 4 17:43:12 1996 Mike Stump <mrs@cygnus.com>
20051 * typeck.c (convert_for_assignment): Handle anachronistic implicit
20052 conversions from (::*)() to void* or (*)().
20053 * cvt.c (cp_convert_to_pointer): Likewise.
20054 (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
20055 conversions from here.
20056 * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
20057 * lang-options.h: Likewise.
20058 * decl2.c (warn_pmf2ptr): Define.
20059 * cp-tree.h: Declare it.
20060 * typeck2.c (digest_init): Allow pmfs down into
20061 convert_for_initialization.
20063 Sun Nov 3 09:43:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20065 * typeck.c (c_expand_return): Fix for returning overloaded fn.
20067 Fri Nov 1 08:53:17 1996 Jason Merrill <jason@yorick.cygnus.com>
20069 * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
20070 * decl.c (grok_reference_init): Pass DIRECT_BIND.
20071 * cvt.c (build_up_reference): Don't mark 'this' addressable. Use
20073 * call.c (convert_like): Don't pass INDIRECT_BIND.
20074 * typeck.c (convert_arguments): Likewise.
20075 * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
20077 Thu Oct 31 17:08:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20079 * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
20080 similar code in build_up_ref.
20081 * cvt.c (build_up_reference): Drastically simplify.
20083 Mon Oct 28 12:45:05 1996 Jeffrey A Law <law@cygnus.com>
20085 * typeck.c (signed_or_unsigned_type): If the given type already
20086 as the correct signedness, then just return it.
20088 * typeck.c ({un,}signed_type): If can't do anything, call
20089 signed_or_unsigned_type.
20091 Thu Oct 24 14:21:59 1996 Bob Manson <manson@charmed.cygnus.com>
20093 * decl2.c (copy_assignment_arg_p): Don't buy the farm if
20094 current_class_type is NULL.
20096 Wed Oct 23 00:43:10 1996 Jason Merrill <jason@gerbil.cygnus.com>
20098 * class.c (finish_struct_1): Avoid empty structs by adding a field
20099 so layout_type gets the mode right.
20101 * typeck.c (c_expand_return): Drastically simplify.
20103 Mon Oct 21 22:34:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20105 * typeck.c (decay_conversion): Handle overloaded methods.
20107 Fri Oct 18 16:03:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20109 * call.c (build_over_call): A TARGET_EXPR has side-effects.
20111 Thu Oct 17 11:31:59 1996 Mike Stump <mrs@cygnus.com>
20113 * cvt.c (convert_to_pointer_force): Add code to support pointer to
20114 member function to pointer to function conversions.
20115 * init.c (resolve_offset_ref): Add code to allow faked up objects,
20116 ignoring them if they are not used, and giving an error, if they
20118 * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
20119 code, and so that we can give an error, if we needed an object,
20120 and one was not provided.
20121 (build_c_cast): Don't call default_conversion when we want to
20122 convert to pointer to function from a METHOD_TYPE.
20124 Mon Oct 14 00:28:51 1996 Jason Merrill <jason@yorick.cygnus.com>
20126 * Make-lang.in (cplib2.ready): Fix logic.
20128 * decl.c (shadow_tag): Only complain about non-artificial function
20131 * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
20133 Fri Oct 11 16:12:40 1996 Jason Merrill <jason@yorick.cygnus.com>
20135 * expr.c (cplus_expand_expr): Pre-tweak call_target like
20136 expand_inline_function would.
20138 * pt.c (mark_decl_instantiated): If extern_p, call
20139 mark_inline_for_output.
20141 Thu Oct 10 15:58:08 1996 Mike Stump <mrs@cygnus.com>
20143 * typeck.c (unary_complex_lvalue): Add code to handle intermediate
20146 * typeck.c (get_delta_difference): Fix wording, as we can be used
20147 for pointer to data members.
20149 Tue Oct 8 12:43:51 1996 Bob Manson <manson@charmed.cygnus.com>
20151 * pt.c (tsubst): If the function decl isn't a member of this
20152 template, return a copy of the decl (including copying the
20153 lang-specific part) so we don't hose ourselves later.
20155 Thu Oct 3 16:24:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20157 * class.c (finish_struct): Remove DWARF-specific tag handling.
20158 * decl.c (pushtag): Likewise.
20159 (finish_function): Always clear DECL_ARGUMENTS on function decls with
20161 * decl2.c (finish_file): Emit DWARF debugging info for static data
20164 Wed Oct 2 21:58:01 1996 Bob Manson <manson@charmed.cygnus.com>
20166 * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
20167 isn't the same as the new one before we whack it.
20169 Mon Sep 30 13:38:24 1996 Jason Merrill <jason@yorick.cygnus.com>
20171 * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
20172 lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
20173 warn_traditional and warn_strict_prototypes; remove ancient
20174 'overload' code; remove references to flag_traditional.
20176 Mon Sep 30 12:58:40 1996 Mike Stump <mrs@cygnus.com>
20178 * input.c (sub_getch): Handle 8-bit characters in string literals.
20180 Sun Sep 29 03:12:01 1996 Jason Merrill <jason@yorick.cygnus.com>
20182 * tree.c (mapcar): Handle CONSTRUCTORs.
20183 (copy_to_permanent): Handle expression_obstack properly.
20185 * Make-lang.in (cplib2.txt): Also depend on the headers.
20187 * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
20189 (expand_class_desc): Use USItype for offset field.
20190 * tinfo.h (struct __class_type_info): Likewise.
20192 * method.c (build_overload_int): TYPE_PRECISION should be applied
20195 Sat Sep 28 14:44:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20197 * call.c (build_new_op): A COND_EXPR involving void must be a
20200 Fri Sep 27 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20202 * typeck.c (build_x_component_ref): New fn.
20203 (build_object_ref): Use it.
20204 * parse.y (primary): Use it.
20205 * decl2.c (build_expr_from_tree): Use it.
20206 * cp-tree.h: Declare it.
20208 * decl.c (start_decl): Variable-sized arrays cannot be initialized.
20209 * error.c (dump_type_suffix): Handle variable arrays.
20211 Fri Sep 27 13:14:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20213 * Make-lang.in (exception.o): Put back compiling it with -fPIC.
20215 Fri Sep 27 03:00:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20217 * decl.c (lookup_name_real): Don't try to look up anything in a
20220 * tinfo2.cc (__throw_type_match_rtti): Oops.
20222 Thu Sep 26 22:11:05 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20224 * Make-lang.in (exception.o): Use -fno-PIC for now.
20226 Thu Sep 26 10:59:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20228 * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
20230 (get_tinfo_fn_dynamic): Extracted from build_typeid.
20231 * tinfo2.cc (__dynamic_cast): Adjust.
20233 * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
20234 (build_x_typeid): Likewise.
20236 * parse.y: Call build_x_typeid instead of build_typeid.
20237 * cp-tree.def: Add TYPEID_EXPR.
20238 * pt.c (tsubst_copy): Handle typeid.
20239 * decl2.c (build_expr_from_tree): Likewise.
20240 * rtti.c (build_x_typeid): Throw bad_typeid from here.
20241 (build_typeid): Not here.
20242 * cp-tree.h: Declare build_x_typeid.
20244 Wed Sep 25 17:26:16 1996 Jason Merrill <jason@yorick.cygnus.com>
20246 * call.c (convert_like): Pull out constant values.
20248 * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
20250 Wed Sep 25 17:28:53 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20252 * decl.c (init_decl_processing): Create short int types before
20253 creating size_t in case a machine description needs to use
20254 unsigned short for size_t.
20256 Tue Sep 24 18:18:44 1996 Jason Merrill <jason@yorick.cygnus.com>
20258 * Make-lang.in (exception.o): Turn off pic.
20260 * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
20261 type, multi-level ptr conversions.
20263 * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
20264 (throw_bad_cast): Use it.
20265 (throw_bad_typeid): New fn.
20266 (build_typeid): Throw bad_typeid as needed.
20268 (synthesize_tinfo_fn): Handle functions and arrays before checking
20271 * Remove .h from standard C++ headers, add new.h, move into inc
20274 * exception*: Remove pointer from object, constructors. Add
20275 default exception::what that uses type_info::name. Add
20276 __throw_bad_typeid.
20278 * init.c (build_new): Don't add a cookie to new (void *) T[2].
20280 Mon Sep 23 15:21:53 1996 Jason Merrill <jason@yorick.cygnus.com>
20282 * Make-lang.in: Building C++ code depends on cc1plus.
20284 Mon Sep 23 12:38:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20286 * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
20287 a HOST_WIDE_INT, not a tree.
20289 Mon Sep 23 12:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
20291 * exception.cc: Don't include <stdlib.h>.
20293 * Make-lang.in (c++.clean): Remove cplib2.*.
20295 Mon Sep 23 09:42:19 1996 Doug Evans <dje@canuck.cygnus.com>
20297 * parse.y (component_decl_1, component_costructor_declarator case):
20298 Pass attributes/prefix_attributes in tree list.
20300 Mon Sep 23 01:18:50 1996 Jason Merrill <jason@yorick.cygnus.com>
20302 * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
20304 Sun Sep 22 05:31:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20306 * lex.c (do_identifier): Don't do deferred lookup in a template
20309 * typeck2.c (store_init_value): Oops.
20311 * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
20312 New files for C++ lang-support library.
20313 * Make-lang.in (CXX_EXTRA_HEADERS): Define.
20314 (CXX_LIB2FUNCS): Define.
20315 And rules for building the C++ lang-support code.
20316 * config-lang.in (headers): Define.
20317 (lib2funcs): Define.
20319 Sat Sep 21 19:17:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20321 * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
20323 * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
20324 * typeck2.c (store_init_value): Check for initializing pmf with { }
20326 (process_init_constructor): Not here.
20328 Thu Sep 19 16:41:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20330 * pt.c (begin_template_parm_list): Increment
20331 processing_template_decl here.
20332 (end_template_parm_list): Not here.
20333 (process_template_parm): No need to add 1 to it now.
20334 * *.c: Use processing_template_decl instead of current_template_parms
20335 to check for being in a template.
20337 * pt.c (uses_template_parms): Handle SCOPE_REF. Fix CONSTRUCTOR.
20338 (tsubst_copy): Handle CONSTRUCTOR.
20339 (instantiate_decl): Set up context properly for variables.
20340 * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
20341 * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
20343 Wed Sep 18 13:30:20 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20345 * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
20347 Wed Sep 18 04:24:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20349 * method.c (make_thunk): Call comdat_linkage before setting the
20352 * decl2.c (comdat_linkage): Use make_decl_one_only.
20353 (import_export_decl): Likewise.
20354 * decl.c (init_decl_processing): Check supports_one_only instead of
20357 Sat Sep 14 08:34:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20359 * decl2.c (grokfield): Tighten checking for access decls.
20361 * decl.c (make_typename_type): Resolve references to
20362 current_class_type. Set CLASSTYPE_GOT_SEMICOLON.
20363 (lookup_name_real): Types that depend on a template parameter get
20364 an implicit 'typename' unless they're in the current scope.
20365 (start_decl_1): We don't care about incomplete types that depend
20366 on a template parm.
20367 (grokdeclarator): Resolve 'typename's in the type specifier that
20368 refer to members of the current scope.
20370 * call.c (build_over_call): Remove 'inline called before
20371 definition' diagnostic.
20372 (build_method_call): Likewise.
20373 * decl.c (duplicate_decls): Downgrade 'used before declared
20374 inline' to a warning, only with -Winline.
20376 Fri Sep 13 17:31:40 1996 Stan Shebs <shebs@andros.cygnus.com>
20378 * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
20380 Wed Sep 11 22:38:13 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20382 * call.c (build_method_call): When calling a signature
20383 default implementation, as in other cases, let instance_ptr simply
20386 Wed Sep 11 22:14:44 1996 Mike Stump <mrs@cygnus.com>
20388 * parse.y (simple_stmt): Cleanup and use do_poplevel ().
20390 Wed Sep 11 22:10:48 1996 Mike Stump <mrs@cygnus.com>
20392 * except.c (expand_start_catch_block): Add a pushlevel so that -g
20393 works on hppa and SPARC.
20395 Wed Sep 11 10:18:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20397 * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
20399 Mon Sep 9 19:51:14 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20401 * call.c (build_over_call): Check first whether DECL_CONTEXT exists
20402 before testing whether it's a signature.
20404 Sun Sep 8 16:06:57 1996 Gerald Baumgartner <gb@cs.purdue.edu>
20406 * call.c (build_new_method_call): Don't complain about signature
20407 pointers and references not being an aggr type.
20408 (build_this): If a signature pointer or reference was passed in,
20410 (build_new_method_call): If instance is a signature pointer, set
20411 basetype to the signature type of instance.
20412 * sig.c (build_signature_method_call): Deleted basetype and
20413 instance parameters, they can be found as the DECL_CONTEXT of
20414 function and as the first argument passed in.
20415 * cp-tree.h: Changed declaration of build_signature_method_call.
20416 * call.c (build_method_call): Deleted first two arguments in call
20417 of build_signature_method_call.
20418 (build_over_call): Added call to build_signature_method_call.
20420 Thu Sep 5 16:51:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20422 * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
20425 Thu Sep 5 10:05:38 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20427 * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
20429 Wed Sep 4 17:16:09 1996 Bob Manson <manson@charmed.cygnus.com>
20431 * except.c (expand_start_try_stmts): Move to except.c in the backend.
20432 (expand_end_try_stmts): Remove.
20434 * init.c (perform_member_init): Use add_partial_entry () instead
20435 of directly manipulating lists.
20436 (emit_base_init): Likewise.
20438 Wed Sep 4 12:14:36 1996 Mike Stump <mrs@cygnus.com>
20440 * except.c (expand_exception_blocks): Always make sure USE and
20441 CLOBBER insns that came at the end still do, the backend relies
20444 Wed Sep 4 07:44:48 1996 Jason Merrill <jason@yorick.cygnus.com>
20446 * call.c (build_over_call): We can only use a TARGET_EXPR of the
20449 Tue Sep 3 19:26:05 1996 Jason Merrill <jason@yorick.cygnus.com>
20451 * cvt.c (convert_to_reference): Revert last change, don't complain
20452 about temp without target decl.
20454 Tue Sep 3 10:22:56 1996 Mike Stump <mrs@cygnus.com>
20456 * decl.c (grokdeclarator): Don't core dump when void() is given.
20458 Tue Sep 3 02:38:56 1996 Jason Merrill <jason@yorick.cygnus.com>
20460 * decl.c (copy_args_p): Don't crash.
20462 Fri Aug 30 14:26:57 1996 Mike Stump <mrs@cygnus.com>
20464 * pt.c (tsubst): And support template args inside the exception
20467 * pt.c (tsubst): Add support for exception specifications in
20468 template functions.
20470 Fri Aug 30 10:01:55 1996 Mike Stump <mrs@cygnus.com>
20472 * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
20474 * cp-tree.h (start_decl): Eliminate the throw spec parameter.
20475 (start_function): Likewise.
20476 (start_method): Likewise.
20477 (grokfield): Likewise.
20478 (make_call_declarator): Add throw spec parameter.
20479 (set_quals_and_spec): Add routine.
20480 * lex.c (set_quals_and_spec): Likewise.
20481 * decl.h (grokdeclarator): Eliminate the throw spec parameter.
20482 * decl.c (shadow_tag): Eliminate the throw spec parameter to
20484 (groktypename): Likewise.
20485 (start_decl): Eliminate the throw spec parameter. Eliminate the
20486 throw spec parameter to grokdeclarator. Eliminate the throw spec
20487 field in DECL_STMT.
20488 (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
20489 (grokfndecl): Remove useless set of raises.
20490 (grokdeclarator): Eliminate the throw spec parameter. Eliminate
20491 the throw spec parameter to start_decl. Pull the throw spec out
20492 of the call declarator.
20493 (grokparms): Eliminate the throw spec parameter to grokdeclarator.
20494 (start_function): Eliminate the throw spec parameter. Eliminate
20495 the throw spec parameter to grokdeclarator.
20496 (start_method): Likewise.
20497 * decl2.c (grokfield): Likewise.
20498 (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
20499 (grokoptypename): Likewise.
20500 (finish_file): Eliminate the throw spec parameter to
20501 start_function. Add throw spec to make_call_declarator.
20502 * except.c (init_exception_processing): Add throw spec to
20503 make_call_declarator. Eliminate the throw spec parameter to
20505 (expand_start_catch_block): Eliminate the throw spec parameter to
20507 (expand_builtin_throw): Add throw spec to make_call_declarator.
20508 Eliminate the throw spec parameter to start_function.
20509 (start_anon_func): Likewise.
20510 * lex.c (make_call_declarator): Add throw spec parameter.
20511 (set_quals_and_spec): New routine.
20512 (cons_up_default_function): Add throw spec to make_call_declarator.
20513 Eliminate the throw spec parameter to grokfield.
20514 * method.c (synthesize_method): Eliminate the throw spec parameter
20516 * pt.c (process_template_parm): Eliminate the throw spec parameter
20518 (tsubst): Add throw spec to make_call_declarator.
20519 (tsubst_expr): Eliminate the throw spec parameter to start_decl.
20520 (do_function_instantiation): Eliminate the throw spec parameter to
20521 grokdeclarator. Eliminate the throw spec parameter to
20523 * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
20525 * parse.y (datadef): Remove non-winning optimization.
20527 (fndef): Remove ambiguous error productions uncovered by grammar
20529 (constructor_declarator): Add exception_specification_opt here.
20530 (component_constructor_declarator): Likewise.
20531 (direct_after_type_declarator): Likewise.
20532 (complex_direct_notype_declarator): Likewise.
20533 (direct_abstract_declarator): Likewise.
20534 (fn.def1): Remove exception_specification_opt.
20535 (fn.def2): Likewise.
20536 (condition): Likewise.
20537 (initdcl0): Likewise.
20538 (initdcl): Likewise.
20539 (notype_initdcl0): Likewise.
20540 (nomods_initdcl0): Likewise.
20541 (component_decl_1): Likewise.
20542 (component_declarator): Likewise.
20543 (after_type_component_declarator0): Likewise.
20544 (after_type_component_declarator): Likewise.
20545 (notype_component_declarator): Likewise.
20547 Wed Aug 28 01:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
20549 * call.c (build_over_call): Also use an INIT_EXPR when
20550 initializing anything from an rvalue.
20552 * call.c (build_over_call): Call stabilize_reference when building
20553 an INIT_EXPR instead of calling the copy ctor.
20555 * call.c (joust): Extend the previous change to all comparisons.
20557 * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
20558 NO_LINKAGE_HEURISTICS.
20560 * decl2.c (finish_file): Emit any statics that weren't already.
20562 * typeck.c (build_static_cast): Implement.
20563 * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
20564 * decl.c (grokparms): Use can_convert_arg instead of
20565 implicit_conversion directly.
20566 (copy_args_p): New fn.
20567 * cvt.c (convert_to_reference): Don't complain about temp with
20569 (build_up_reference): Handle TARGET_EXPRs.
20570 * call.c (build_over_call): Elide unnecessary temps.
20571 (can_convert*): Use new overloading code.
20573 Tue Aug 27 13:12:21 1996 Jason Merrill <jason@yorick.cygnus.com>
20575 * call.c: Move TYPE_PTR*_MACROS ...
20576 * cp-tree.h: To here.
20577 * typeck.c (build_reinterpret_cast): Implement.
20579 * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
20581 (joust): If we're comparing a function to a builtin and the worst
20582 conversion for the builtin is worse than the worst conversion for the
20583 function, take the function.
20585 * typeck.c (build_const_cast): Implement.
20586 (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
20587 (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
20589 Tue Aug 27 13:14:58 1996 Bob Manson <manson@charmed.cygnus.com>
20591 * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
20592 too early. Make sure we explode if exprtype turns out to be a
20593 NULL_TREE when it shouldn't be.
20595 Tue Aug 27 10:56:21 1996 Mike Stump <mrs@cygnus.com>
20597 * cp-tree.h: New routine make_call_declarator.
20598 * lex.c (make_call_declarator): Define it.
20599 * except.c (init_exception_processing): Use it.
20600 (expand_builtin_throw): Likewise.
20601 (start_anon_func): Likewise.
20602 * decl2.c (finish_file): Likewise.
20603 * lex.c (cons_up_default_function): Likewise.
20604 * parse.y: Likewise.
20605 * pt.c (tsubst): Likewise.
20607 Mon Aug 26 17:40:03 1996 Mike Stump <mrs@cygnus.com>
20609 * decl2.c (groktypefield): Remove unused code.
20611 Mon Aug 26 17:00:33 1996 Mike Stump <mrs@cygnus.com>
20613 * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
20614 * parse.y: Likewise. Change maybe_type_qual into maybe_cv_qualifier.
20615 Change type_quals into cv_qualifiers. Change nonempty_type_quals into
20616 nonempty_cv_qualifiers.
20619 * lex.c (make_pointer_declarator): Change type_quals into
20621 (make_reference_declarator): Likewise.
20623 Thu Aug 22 01:09:22 1996 Jason Merrill <jason@yorick.cygnus.com>
20625 * decl.c (start_function): Only check interface_* for templates
20626 with flag_alt_external_templates.
20628 * call.c (build_new_op): Check for comparison of different enum types.
20629 (build_over_call): Fix arg # output.
20631 * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
20633 Wed Aug 21 00:13:15 1996 Jason Merrill <jason@yorick.cygnus.com>
20635 * call.c (build_new_op): Check for erroneous args.
20637 * call.c (build_new_method_call): Add missing args to cp_error.
20639 * tree.c (error_type): Don't print reference-to-array.
20641 * typeck.c (convert_for_assignment): Don't say contravariance for
20644 Tue Aug 20 13:23:00 1996 Jason Merrill <jason@yorick.cygnus.com>
20646 * call.c (build_over_call): Diagnose bad convs for `this'.
20648 * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
20651 * call.c (convert_like): Handle bad convs.
20652 (build_over_call): Handle bad convs better.
20654 * decl2.c: -fansi-overloading is now the default.
20656 * call.c (build_new_method_call): Check for erroneous args.
20658 * pt.c (instantiate_class_template): Propagate
20659 TYPE_USES_MULTIPLE_INHERITANCE.
20661 Tue Aug 20 13:09:57 1996 Mike Stump <mrs@cygnus.com>
20663 * call.c (enforce_access): Add static to routine.
20665 Sun Aug 18 14:35:54 1996 Jason Merrill <jason@yorick.cygnus.com>
20667 * call.c (build_user_type_conversion_1): Fix bad handling.
20668 (compare_ics): Likewise.
20670 Sat Aug 17 21:54:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20672 * call.c (standard_conversion): Oops.
20674 Sat Aug 17 16:28:11 1996 Geoffrey Noer <noer@cygnus.com>
20676 * g++.c: Update test for win32 (&& ! cygwin32).
20678 Sat Aug 17 03:45:31 1996 Jason Merrill <jason@yorick.cygnus.com>
20680 * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
20681 (ptr_reasonably_similar): New fn.
20682 * call.c (BAD_RANK): New rank.
20683 (ICS_BAD_FLAG): New macro.
20684 (standard_conversion): Handle almost-right pointer conversions.
20685 (reference_binding): Handle bad rvalue bindings.
20686 (add_*_candidate): Stuff.
20687 (build_over_call): Pass bad conversions to convert_for_initialization.
20688 (compare_ics): Handle bad convs.
20691 Fri Aug 16 15:02:19 1996 Bob Manson <manson@charmed.cygnus.com>
20693 * init.c (expand_vec_init): Use ptrdiff_type_node instead of
20694 integer_type_node when computing pointer offsets.
20696 Fri Aug 16 01:28:32 1996 Jason Merrill <jason@yorick.cygnus.com>
20698 * tree.c (lvalue_type): New fn.
20699 (error_type): New fn.
20700 * call.c (op_error): Use error_type.
20701 (add_conv_candidate): Use lvalue_type.
20702 (add_builtin_candidates): Likewise.
20703 * error.c (args_as_string): Use error_type.
20705 Thu Aug 15 17:27:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20707 * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
20708 (tsubst): Not here.
20710 * decl.c (init_decl_processing): With -ansi, __null's type is the
20711 signed integral type with the same number of bits as a pointer.
20712 Introduce a new variable null_node for it.
20713 * cp-tree.h: Adjust.
20714 * call.c (null_ptr_cst_p): Adjust.
20716 Thu Aug 15 17:09:54 1996 Mike Stump <mrs@cygnus.com>
20718 * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
20721 Thu Aug 15 01:36:49 1996 Jason Merrill <jason@yorick.cygnus.com>
20723 * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
20724 fns of classes without virtual functions.
20726 * call.c (add_function_candidate): Handle `this' specially.
20727 (compare_ics): Likewise.
20729 Tue Aug 13 12:16:10 1996 Jason Merrill <jason@yorick.cygnus.com>
20731 * typeck.c (build_conditional_expr): Fix handling of __null.
20733 * decl2.c (comdat_linkage): New fn.
20734 (import_export_vtable): Use it.
20735 (import_export_decl): Use it.
20736 * method.c (make_thunk): Use it.
20738 Mon Aug 12 00:09:18 1996 Jason Merrill <jason@yorick.cygnus.com>
20740 * pt.c (end_template_decl): If we don't actually have parms, return.
20741 * parse.y (template_header): Accept 'template <>'.
20743 * errfn.c: Allow 5 args.
20745 Sun Aug 11 15:20:58 1996 Jason Merrill <jason@yorick.cygnus.com>
20747 * tree.c (make_temp_vec): New fn.
20748 * pt.c (push_template_decl): Handle partial specs.
20749 (instantiate_class_template): Likewise.
20750 (more_specialized): Use get_bindings.
20751 (more_specialized_class): New fn.
20752 (get_class_bindings): New fn.
20753 (most_specialized_class): New fn.
20754 (do_function_instantiation): List candidates for ambiguous case.
20755 * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
20756 (shadow_tag): Call push_template_decl for partial specializations.
20757 * parse.y: Likewise.
20758 * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
20759 DECL_TEMPLATE_MEMBERS.
20760 * call.c (print_z_candidates): Reduce duplication.
20762 Fri Aug 9 14:36:08 1996 Jason Merrill <jason@yorick.cygnus.com>
20764 * decl2.c (lang_decode_option): Allow -fansi-overloading.
20766 Thu Aug 8 17:04:18 1996 Jason Merrill <jason@yorick.cygnus.com>
20768 * pt.c (get_bindings): New fn.
20769 (most_specialized): Likewise.
20770 (do_function_instantiation): Use them.
20771 (add_maybe_template): New fn.
20772 * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
20773 * call.c (build_new_op): Handle guiding decls.
20774 (build_new_function_call): Likewise.
20775 * decl2.c (finish_file): Likewise.
20777 * decl2.c (mark_used): Do synthesis here.
20778 * call.c (build_method_call): Not here.
20779 (build_over_call): Or here.
20780 * typeck.c (build_function_call_real): Or here.
20781 * tree.c (bot_manip): Call mark_used on functions used in default
20784 Thu Aug 8 17:48:16 1996 Michael Meissner <meissner@tiktok.cygnus.com>
20786 * decl2.c (import_export_vtable): Delete code that disabled vtable
20787 heuristic on systems with ASM_OUTPUT_EXTERNAL.
20789 Wed Aug 7 12:44:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20791 * typeck.c (build_x_function_call): Handle static call context
20794 * decl.c (finish_function): Set the DECL_CONTEXT of the result to
20795 the function, not its outer block.
20797 * call.c (build_field_call): Pass fields on to build_opfncall
20798 regardless of TYPE_OVERLOADS_CALL_EXPR.
20799 (build_method_call): Pass on to build_new_method_call sooner.
20801 * typeck.c (build_ptrmemfunc): Just return what instantiate_type
20803 * class.c (instantiate_type): Don't put a POINTER_TYPE to
20804 METHOD_TYPE on an expression. Also make a copy of rhs instead of
20807 Tue Aug 6 12:58:46 1996 Jason Merrill <jason@yorick.cygnus.com>
20809 * call.c (compare_ics): Handle qual_conv after lvalue_conv.
20810 (add_builtin_candidate): Don't take enums for ++.
20811 (build_new_method_call): Handle non-aggregates and field calls.
20812 Move new overloading code from...
20815 * decl.c (grokparms): Don't check default args in templates.
20817 Mon Aug 5 17:17:06 1996 Jason Merrill <jason@yorick.cygnus.com>
20819 * cvt.c (build_new_op): Fix args to build_unary_op.
20820 (add_builtin_candidates): Don't call type_promotes_to on float.
20822 * decl.c (grokparms): Check the type of the default arg.
20824 * cvt.c (build_new_op): Pass non-overloaded cases on rather than
20825 returning NULL_TREE.
20827 * typeck.c (build_x_binary_op): Avoid doing extra work.
20828 (build_x_unary_op): Likewise.
20829 (build_x_conditional_expr): Likewise.
20830 * cvt.c (build_over_call): Return.
20831 (add_builtin_candidate): Fix MEMBER_REF.
20832 (build_new_op): Likewise.
20834 Mon Aug 5 17:07:47 1996 Mike Stump <mrs@cygnus.com>
20836 * method.c (build_overload_name): Put bug fix into code but leave
20837 disabled for now so we can be bug compatible with older releases
20838 that do repeats incorrectly. In the future, we can enable it.
20840 Mon Aug 5 13:46:28 1996 Jason Merrill <jason@yorick.cygnus.com>
20842 * cvt.c (convert_like): Don't call build_cplus_new twice.
20844 * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
20845 Control new overloading code with -fansi-overloading.
20847 Sun Aug 4 15:29:11 1996 Jason Merrill <jason@yorick.cygnus.com>
20849 * cvt.c (build_over_call): Call build_cplus_new.
20850 * call.c (build_method_call): Likewise.
20851 * typeck.c (build_function_call_real): Likewise.
20852 (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
20853 the COND_EXPR in a TARGET_EXPR so they use the same slot.
20855 * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
20857 * typeck.c (complete_type): Propagate
20858 TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
20860 Sat Aug 3 14:05:07 1996 Jason Merrill <jason@yorick.cygnus.com>
20862 * cvt.c (joust): More ?: kludging. Sigh.
20863 (build_over_call): Don't try to synthesize global fns.
20865 * search.c (lookup_conversions): Use binfo marking.
20867 Sat Aug 3 12:33:42 1996 Bob Manson <manson@charmed.cygnus.com>
20869 * search.c (build_mi_matrix): Use the correct value of cid
20870 when determining the new mi_size.
20872 Sat Aug 3 01:27:41 1996 Jason Merrill <jason@yorick.cygnus.com>
20874 * cvt.c (add_builtin_candidates): Do consider type conversion ops
20875 for the first parms of += et al.
20876 (strip_top_quals): New fn.
20877 (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
20878 (implicit_conversion): Likewise.
20879 (add_builtin_candidates): Be careful about arrays.
20880 (build_new_method_call): Handle vtable optimization.
20882 Fri Aug 2 01:26:59 1996 Jason Merrill <jason@yorick.cygnus.com>
20884 * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
20885 * cvt.c (reference_binding): Use it.
20886 (implicit_conversion): Use it.
20887 (add_builtin_candidate, COND_EXPR): Use it.
20889 * cvt.c (build_new_function_call): Check for error args.
20891 * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
20893 * gxx.gperf: Add __null.
20894 * hash.h: Regenerate.
20895 * lex.h: Add RID_NULL.
20896 * lex.c (init_lex): Create null_pointer_node here, stick it in
20898 * decl.c (init_decl_processing): Still set its type here.
20899 * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
20900 (convert_to_pointer_force): Likewise.
20901 (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
20903 * call.c (convert_harshness): Use null_ptr_cst_p.
20904 * typeck.c (convert_for_assignment): Likewise. Don't produce
20907 * error.c (args_as_string): Handle lists of actual args, too.
20908 * cvt.c (null_ptr_cst): Support (void*)0 for now.
20909 (build_user_type_conversion_1): Improve diagnostics.
20910 (build_new_function_call): Likewise.
20911 (build_object_call): Likewise.
20912 (build_new_method_call): Likewise. Move call before def diagnostic...
20913 (build_over_call): Here.
20915 * cvt.c (build_new_method_call): Don't complain about no match if
20916 LOOKUP_SPECULATIVELY.
20917 (build_over_call): Fix 'this' for virtual fn.
20918 (build_new_method_call): Add diagnostic.
20920 Thu Aug 1 16:45:09 1996 Jason Merrill <jason@yorick.cygnus.com>
20922 * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
20923 constructors to be passed in.
20924 (build_over_call): Likewise.
20925 (build_user_type_conversion_1): Pass them in.
20926 (convert_like): Likewise.
20927 (build_object_call): Handle overloaded conversions.
20928 (build_over_call): Pass the right args to build_vfn_ref.
20929 (standard_conversion): Fix pmf convs.
20930 (joust): Handle comparing statics and non-statics.
20931 (build_new_method_call): New fn.
20932 * call.c (build_method_call): Call it if NEW_OVER.
20934 Thu Aug 1 16:06:14 1996 Mike Stump <mrs@cygnus.com>
20936 * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
20939 Thu Aug 1 15:24:02 1996 Mike Stump <mrs@cygnus.com>
20941 * except.c (expand_throw): Use maybe_build_cleanup_and_delete
20942 instead of just maybe_build_cleanup so that we deallocate the
20945 Thu Aug 1 15:18:00 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
20947 * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
20948 * cp-tree.h (finish_prevtable_vardecl): Add decl.
20950 Thu Aug 1 11:53:51 1996 Bob Manson <manson@charmed.cygnus.com>
20952 * pt.c (instantiate_class_template): Call complete_type. Also, if
20953 we're at the end of the file and we just instantiated a template
20954 class with a vtable, call finish_prevtable_vardecl.
20956 * error.c (dump_decl): Don't explode (or explode more gracefully
20957 as appropriate) if the object being dumped has a null type.
20958 (dump_expr): Likewise.
20960 * search.c (build_mi_matrix): Ensure that mi_size is large enough,
20961 by counting the number of nodes that we'll need before allocating
20963 (lookup_fnfields): Fix comment.
20964 (breadth_first_search): Fix comment.
20966 Wed Jul 31 09:57:05 1996 Jason Merrill <jason@yorick.cygnus.com>
20968 * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
20970 * class.c (finish_struct): Call cplus_decl_attributes here.
20971 (finish_struct_1): Not here.
20972 * cp-tree.h: Adjust.
20974 * pt.c (type_unification): New parameter STRICT.
20975 (unify): If STRICT, don't allow cv addition or base deduction.
20976 * call.c, class.c, cvt.c, cp-tree.h: Adjust.
20978 Tue Jul 30 13:06:13 1996 Jason Merrill <jason@yorick.cygnus.com>
20980 * search.c (get_template_base{_recursive}): New fns.
20981 * pt.c (more_specialized): New fn.
20982 (do_function_instantiation): Use it.
20983 (unify): Handle base deduction.
20984 * cvt.c (joust): Use more_specialized.
20985 Don't arbitrarily choose between non-builtin candidates.
20986 (build_over_call): Call require_complete_type.
20988 * decl.c (start_function): Statics are static even in a #pragma
20991 * decl2.c (import_export_vtable): Disable vtable heuristic on
20992 systems with ASM_OUTPUT_EXTERNAL.
20994 * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
20995 (standard_conversion): No std conv to enum type.
20997 * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
21000 * cvt.c (reference_binding): Bind directly to a base subobject of
21003 * cvt.c (build_new_op): Enforce access control.
21005 Tue Jul 30 09:22:53 1996 Bob Manson <manson@charmed.cygnus.com>
21007 * typeck2.c (process_init_constructor): When scanning the
21008 union for a named field, skip things that aren't FIELD_DECLs.
21010 * method.c (synthesize_method): Don't scan fndecl's rtl if
21011 we're at the end of the file; just assume the function can't
21014 Mon Jul 29 15:48:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21016 * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
21019 * cvt.c (build_user_type_conversion_1): Handle overloaded
21022 * cvt.c (add_builtin_candidates): Don't consider type conversion
21023 operators for the first parameter of operator=.
21025 Mon Jul 29 15:33:55 1996 Bob Manson <manson@charmed.cygnus.com>
21027 * typeck.c (complete_type): Only call layout_type if we're not
21028 expanding a template.
21030 Mon Jul 29 14:40:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21032 * cvt.c (compare_ics): Oops.
21034 * cvt.c (op_error): Oops.
21036 * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
21037 * cvt.c: Add IDENTITY_RANK before others. Use real_lvalue_p.
21038 (build_conv): Use them.
21039 (implicit_conversion): Use them.
21040 (convert_like): Handle them.
21041 (build_new_op): Handle builtin COND_EXPR again.
21042 (add_builtin_candidates): Strip cv-quals. Fix oops. Include enums
21043 in lists of types for COND_EXPR.
21044 (add_builtin_candidate): Add enum candidates for COND_EXPR.
21046 Mon Jul 29 12:05:40 1996 Bob Manson <manson@charmed.cygnus.com>
21048 * typeck.c (build_modify_expr): Always attempt to build a call to
21049 the assignment operator, even if we're using a default one.
21050 (convert_for_initialization): Call complete_type.
21052 Mon Jul 29 11:25:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21054 * cvt.c (reference_binding): A REF_BIND gets the reference type.
21055 (implicit_conversion): Likewise.
21056 (convert_like): Likewise.
21057 (compare_ics): Likewise.
21058 (compare_qual): Likewise.
21059 (print_z_candidates): Handle no candidates.
21060 (build_new_op): Don't handle builtin COND_EXPR for now.
21062 Sat Jul 27 11:27:47 1996 Stan Shebs <shebs@andros.cygnus.com>
21064 * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
21066 Fri Jul 26 01:07:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21068 * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
21070 * cvt.c (build_builtin_candidate): Oops.
21071 (build_new_op): Oops.
21073 * method.c (build_opfncall): Pass COND_EXPR on.
21074 * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
21075 (add_builtin_candidate{,s}): Likewise.
21076 (add_builtin_candidates): Likewise.
21077 (print_z_candidates, op_error, build_new_op): Likewise.
21078 (type_decays_to): New fn.
21079 * lex.c (init_lex): Just say ?: for COND_EXPR.
21081 Thu Jul 25 09:33:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21083 * typeck.c (complete_type): Call layout_type rather than building
21086 * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
21087 only use ptrdiff_t.
21089 Wed Jul 24 12:45:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21091 * cvt.c: Always compile the new overloading code (but don't use it).
21092 (implicit_conversion): Add a BASE_CONV when converting to
21093 the same class type.
21094 (convert_like): Handle BASE_CONV.
21096 Tue Jul 23 12:46:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21098 * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
21099 (add_builtin_candidate): Likewise.
21102 * typeck.c (build_x_function_call): Try an operator function
21103 whenever we call an object of class type.
21104 * method.c (build_opfncall): Pass CALL_EXPRs through.
21105 * cvt.c (implicit_conversion): Do const-ref case first.
21106 (add_conv_candidate, build_object_call, op_error): New fns.
21107 (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
21108 ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
21109 builtin candidates.
21110 (build_new_op): Handle CALL_EXPR. Don't try to decay void.
21111 Fall back on preincrement handling. Use op_error.
21113 (convert_like): Pass INDIRECT_BIND. Don't try to do anything with
21114 an error_mark_node.
21115 (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
21118 Mon Jul 22 16:21:55 1996 Bob Manson <manson@charmed.cygnus.com>
21120 * pt.c (tsubst_expr): Handle CONTINUE_STMT.
21122 Mon Jul 22 15:38:58 1996 Mike Stump <mrs@cygnus.com>
21124 * typeck.c (build_component_ref_1): Use build_component_ref
21125 instead of open coding it here.
21127 Mon Jul 22 12:18:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21129 * g++.c (main): Don't link with -lg++.
21132 * cvt.c (convert_to_reference): Don't use convert_from_reference on
21133 result of build_type_conversion.
21134 (cp_convert): Only call build_method_call for ctors if
21135 build_type_conversion failed.
21136 (ptr_complete_ob): New function.
21137 (TYPE_PTR{,OB,MEM}_P): New macros.
21138 ({add,build}_builtin_candidate{,s}): New functions.
21139 (print_z_candidates): Handle builtins.
21140 (build_user_type_conversion_1): Don't use conversion fns for
21141 converting to a base type.
21142 (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
21143 (build_user_type_conversion): Use convert_from_reference.
21144 (build_new_op): New function.
21145 (build_over_call): Fix handling of methods.
21146 (compare_ics): Handle AMBIG_CONV properly.
21147 * typeck2.c: Increment abort count.
21148 * method.c (build_opfncall): Forward most requests to build_new_op.
21149 * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
21151 Fri Jul 19 17:59:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21153 * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
21154 invalid second argument to dump_expr_list.
21156 Fri Jul 19 14:04:05 1996 Mike Stump <mrs@cygnus.com>
21158 * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
21160 Thu Jul 18 14:48:23 1996 Bob Manson <manson@charmed.cygnus.com>
21162 * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
21165 Mon Jul 15 17:48:43 1996 Mike Stump <mrs@cygnus.com>
21167 * typeck2.c (process_init_constructor): New pedwarn for using { }
21168 to initialize a pointer to member function.
21169 * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
21170 we can avoid the new error.
21172 Mon Jul 15 15:42:03 1996 Mike Stump <mrs@cygnus.com>
21174 * typeck.c (build_ptrmemfunc1): New function to hide details of
21175 pointer to member functions better.
21177 Mon Jul 15 14:23:02 1996 Mike Stump <mrs@cygnus.com>
21179 * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
21180 methods into the actual method, as we know the implied object is
21183 Mon Jul 15 13:08:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21185 * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
21186 inside a system header.
21188 Fri Jul 12 16:30:05 1996 Bob Manson <manson@charmed.cygnus.com>
21190 * call.c (build_method_call): Call complete_type on the
21193 Thu Jul 11 17:16:40 1996 Mike Stump <mrs@cygnus.com>
21195 * typeck.c (build_component_ref): Always build up an OFFSET_REF
21196 for obj_ptr->func so that we can know which object to use in a
21199 Wed Jul 10 19:36:37 1996 Mike Stump <mrs@cygnus.com>
21201 * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
21202 around things. Also improve maintainability.
21204 Wed Jul 10 18:20:11 1996 Bob Manson <manson@charmed.cygnus.com>
21206 * decl.c (grokdeclarator): Check for overflow when evaluating an
21209 Wed Jul 10 17:26:19 1996 Jason Merrill <jason@yorick.cygnus.com>
21211 * cvt.c (cp_convert): Don't check for ambiguity with constructor
21214 * typeck.c (build_x_function_call): Pass function overload
21215 questions to new overloading code if NEW_OVER.
21216 * init.c (expand_aggr_init_1): Only check for type conversion ops
21217 if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
21218 Don't check for ambiguity with constructor if NEW_OVER.
21219 * cvt.c (convert_to_reference): Dereference the result of a type
21220 conversion operator.
21221 (build_conv): Propagate ICS_USER_FLAG.
21222 (implicit_conversion): Call instantiate_type.
21223 Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
21224 (add_function_candidate): Fix cv-quals on argtype.
21225 (print_z_candidates): New function.
21226 (build_new_function_call): Call it.
21227 (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
21228 consider non-converting constructors.
21229 Call print_z_candidates.
21230 Return an AMBIG_CONV for an ambiguous conversion.
21231 (build_user_type_conversion): Handle AMBIG_CONV.
21232 (convert_like): Fix test for building TARGET_EXPR.
21233 Call instantiate_type.
21234 Handle AMBIG_CONV and LVALUE_CONV.
21235 (build_over_call): Handle 0 args and ellipsis.
21236 * cp-tree.def: Add AMBIG_CONV.
21238 Tue Jul 9 17:48:48 1996 Mike Stump <mrs@cygnus.com>
21240 * decl.c (lookup_name_real): If we find mem in obj when parsing
21241 `obj->mem', make sure we return the right value.
21243 Tue Jul 9 16:11:28 1996 Bob Manson <manson@charmed.cygnus.com>
21245 * search.c (get_base_distance): Call complete_type.
21247 Tue Jul 9 12:46:34 1996 Mike Stump <mrs@cygnus.com>
21249 * decl.c (store_bindings): Make static.
21251 Mon Jul 8 16:42:31 1996 Jason Merrill <jason@yorick.cygnus.com>
21253 * init.c (expand_aggr_init_1): Don't check type conversions if
21256 * cvt.c (z_candidate): Put back template field.
21257 (add_function_candidate): Set it.
21258 (add_template_candidate): Likewise.
21260 (compare_qual): Handle references and pointers to members.
21261 (compare_ics): Handle reference bindings.
21263 * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
21265 Mon Jul 8 16:18:56 1996 Bob Manson <manson@charmed.cygnus.com>
21267 * call.c (compute_conversion_costs): Call complete_type.
21269 * tree.c (vec_binfo_member): Use comptypes instead of comparing
21270 pointers, so we can handle template parameters.
21272 Fri Jul 5 16:51:53 1996 Bob Manson <manson@charmed.cygnus.com>
21274 * cvt.c (cp_convert_to_pointer): We have to call complete_type
21275 here; let's make it explicit instead of a side effect of an
21278 Wed Jul 3 16:29:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21280 * cvt.c (z_candidate): Remove template field.
21281 (reference_binding): Handle binding to temporary.
21282 (implicit_conversion): Likewise.
21283 (add_function_candidate): Handle artificial constructor parms.
21284 Handle functions with too few parms.
21285 (add_template_candidate): New function.
21286 (build_user_type_conversion_1): Handle constructors.
21287 (convert_like): Likewise.
21288 (build_over_call): Likewise.
21289 (build_new_function_call): Support templates.
21290 (compare_ics): Fix reference, inheritance handling.
21292 Mon Jul 1 22:58:18 1996 Bob Manson <manson@charmed.cygnus.com>
21294 * decl.c: Add signed_size_zero_node.
21295 (init_decl_processing): Build it.
21296 * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
21297 when we're trying to make a negative delta.
21299 Mon Jul 1 17:56:19 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21301 Stop doing this damn index==strchr variable name confusion.
21302 * class.c (add_virtual_function): Change local var INDEX to be
21304 (add_method): Likewise.
21305 * lex.c (print_parse_statistics): Likewise.
21306 * search.c (make_memoized_table_entry): Likewise.
21307 (lookup_fnfields_here): Likewise.
21308 (lookup_field): Likewise.
21309 (lookup_fnfields): Likewise.
21310 (get_baselinks): Likewise.
21311 * sig.c (build_signature_table_constructor): Likewise.
21312 (build_signature_method_call): Likewise.
21313 * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
21314 (get_member_function_from_ptrfunc): Likewise.
21315 (build_ptrmemfunc): Change local var INDEX to be IDX.
21316 (c_expand_start_case): Likewise.
21318 Sat Jun 29 14:05:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21320 * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
21321 handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
21322 (convert_to_reference): Use build_type_conversion to convert to
21323 the reference type directly.
21324 (standard_conversion): Fix void* case, non-conversions.
21325 (reference_binding): Fix expr == 0 case, non-conversions.
21326 (convert_like): Support REF_BIND.
21327 (compare_qual): Split out from compare_ics.
21328 (compare_ics): Use it, handle icses with only a qual_conv.
21330 * init.c (expand_vec_init): Don't crash if decl is NULL.
21332 Fri Jun 28 11:52:51 1996 Stan Shebs <shebs@andros.cygnus.com>
21334 * mpw-config.in: New file, configury for Mac MPW.
21335 * mpw-make.sed: New file, makefile editing for MPW.
21337 Thu Jun 27 15:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21339 * pt.c (instantiate_class_template): Call repo_template_used.
21341 * search.c (lookup_conversions): Only lookup conversions in
21344 Thu Jun 27 12:59:53 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21346 * cp-tree.def: Renamed from tree.def, to avoid confusion with
21348 * cp-tree.h, lex.c: Include cp-tree.def.
21349 * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
21351 Wed Jun 26 18:29:47 1996 Bob Manson <manson@charmed.cygnus.com>
21353 * init.c (build_vec_delete_1): Call complete_type.
21355 Mon Jun 24 17:17:32 1996 Mike Stump <mrs@cygnus.com>
21357 * except.c (start_anon_func): Make sure anonymous functions are
21360 Fri Jun 21 15:10:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21362 * decl.c (finish_function): If function_depth > 1, set nested.
21364 * decl2.c (grokbitfield): Revert Bob's change.
21365 * class.c (finish_struct_1): Fix handling of named bitfield widths.
21367 Thu Jun 20 23:35:38 1996 Jason Merrill <jason@yorick.cygnus.com>
21369 * pt.c (add_pending_template): Handle types.
21370 (lookup_template_class): With -fexternal-templates, just add the class
21371 to pending_templates instead of instantiating it now.
21372 * decl2.c (finish_file): Handle types in pending_templates.
21374 Thu Jun 20 14:08:40 1996 Bob Manson <manson@charmed.cygnus.com>
21376 * decl2.c (grokbitfield): Handle constant decls appropriately.
21377 Give an appropriate error message now instead of spewing core
21380 Thu Jun 20 13:01:51 1996 Jason Merrill <jason@yorick.cygnus.com>
21382 * decl2.c: Don't turn on thunks by default for now.
21384 Wed Jun 19 11:37:04 1996 Jason Merrill <jason@yorick.cygnus.com>
21386 * typeck.c (complete_type): Handle error_mark_node.
21387 (common_type, OFFSET_TYPE): Handle template_type_parms.
21389 Tue Jun 18 10:02:15 1996 Jason Merrill <jason@yorick.cygnus.com>
21391 * pt.c (instantiate_decl): If at_eof, call import_export_decl
21392 regardless of DECL_INLINE.
21394 * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
21396 * class.c (finish_struct_bits): Copy TYPE_SIZE.
21398 * rtti.c (build_dynamic_cast): Support templates.
21399 * tree.def: Support DYNAMIC_CAST_EXPR.
21400 * pt.c (tsubst_copy): Likewise.
21401 * decl2.c (build_expr_from_tree): Likewise.
21403 Mon Jun 17 15:23:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21405 * typeck.c (build_static_cast): Support templates.
21406 (build_const_cast): Likewise.
21407 * tree.def: Support CONST/STATIC_CAST_EXPR.
21408 * pt.c (tsubst_copy): Likewise.
21409 * decl2.c (build_expr_from_tree): Likewise.
21411 Sun Jun 16 12:33:57 1996 Jason Merrill <jason@yorick.cygnus.com>
21413 * decl2.c (finish_vtable_vardecl): Don't trust
21414 TREE_SYMBOL_REFERENCED for vtables of local classes.
21416 Fri Jun 14 18:13:36 1996 Jason Merrill <jason@yorick.cygnus.com>
21418 * pt.c (tsubst_copy): Handle operator T.
21420 Wed Jun 12 17:52:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21422 * init.c (build_delete): Move creation of PARMS inside test of
21423 TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
21425 Tue Jun 11 15:09:18 1996 Bob Manson <manson@charmed.cygnus.com>
21427 * typeck.c (build_conditional_expr): Don't assume that
21428 the arguments to ?: are always pointers or records.
21430 Tue Jun 11 13:56:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21432 * decl2.c (import_export_decl): Still emit static/weak/comdat
21433 copies of inline template functions with -fno-implicit-templates.
21435 Tue Jun 11 11:42:13 1996 Bob Manson <manson@charmed.cygnus.com>
21437 * init.c (build_delete): Determine the complete basetype
21438 path to the destructor we're calling.
21440 Fri Jun 7 15:30:10 1996 Bob Manson <manson@charmed.cygnus.com>
21442 * decl.c (build_enumerator): Always copy the INTEGER_CST used to
21443 initialize the enum, because we really and truly don't know where
21445 (start_enum): Don't copy integer_zero_node because
21446 build_enumerator will do it.
21448 Fri Jun 7 11:11:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21450 * decl.c (finish_function): Do access control on base destructors.
21452 * pt.c (tsubst, case FUNCTION_DECL): Set up
21453 IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
21456 Fri Jun 7 10:37:33 1996 Mike Stump <mrs@cygnus.com>
21458 * cvt.c (build_up_reference): If we have already extended the
21459 lifetime of the temporary, don't try it again.
21460 * typeck.c (c_expand_return): Don't try and convert the return
21461 value twice when we want a reference, once is enough.
21463 Tue Jun 4 15:41:45 1996 Jason Merrill <jason@yorick.cygnus.com>
21465 * pt.c (tsubst_expr, case DECL_STMT): Don't pass
21466 LOOKUP_ONLYCONVERTING at all for now.
21468 * search.c (add_conversions): Put the conversion function in
21469 TREE_VALUE, the basetype in TREE_PURPOSE.
21470 * cvt.c (build_type_conversion): Adjust.
21471 * cvt.c (build_expr_type_conversion): Adjust.
21472 * call.c (user_harshness): Adjust.
21474 Mon Jun 3 15:30:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21476 * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
21479 Mon Jun 10 18:58:19 1996 Mike Stump <mrs@cygnus.com>
21481 * except.c (expand_start_catch_block): Add a dummy region, if we
21482 get an error, so that we can avoid core dumping later.
21484 Fri May 31 14:56:13 1996 Mike Stump <mrs@cygnus.com>
21486 * cp-tree.h (OFFSET_REF): Remove.
21487 * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
21488 * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
21489 * init.c (expand_aggr_init_1): Likewise.
21490 (build_new): Likewise.
21491 * typeck.c (expand_target_expr): Likewise.
21493 Fri May 31 14:22:08 1996 Jason Merrill <jason@yorick.cygnus.com>
21495 * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
21498 Wed May 29 17:04:33 1996 Mike Stump <mrs@cygnus.com>
21500 * cvt.c (build_up_reference): Redo how and when temporaries are
21502 * decl.c (grok_reference_init): Don't try and be smart about
21505 Wed May 29 16:02:08 1996 Mike Stump <mrs@cygnus.com>
21507 * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
21508 (TARGET_EXPR...), now that it has 4 arguments.
21509 * tree.c (build_cplus_new): Likewise.
21511 Thu May 23 16:40:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21513 * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
21515 * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
21516 * decl.c (struct saved_scope): Remove named_labels,
21517 {base,member}_init_list.
21518 (maybe_push_to_top_level): Don't set them. Call
21519 push_cp_function_context if appropriate.
21520 (pop_from_top_level): Likewise.
21522 * method.c (do_build_assign_ref): Remove obsolete check of
21523 TYPE_HAS_ASSIGN_REF (basetype).
21525 * decl.c (grokfndecl): Diagnose user definition of
21526 implicitly-declared methods.
21528 Thu May 23 12:13:08 1996 Bob Manson <manson@charmed.cygnus.com>
21530 * method.c (do_build_copy_constructor): Add code to give
21531 meaningful error messages instead of crashing.
21532 (do_build_assign_ref): Don't synthesize assignment operators for
21533 classes containing reference or const members.
21535 * class.c (struct base_info): Remove cant_synth_copy_ctor
21536 and cant_synth_asn_ref.
21537 (finish_base_struct): Remove the code that tries to conditionalize
21538 synthesis of copy constructors & assignment operators based on
21539 access permissions. Instead, let it fail when it tries to
21540 synthesize the copy constructor. This will give meaningful error
21541 messages instead of silently generating code to perform a bitcopy.
21543 Wed May 22 11:45:19 1996 Bob Manson <manson@charmed.cygnus.com>
21545 * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
21546 determining types for constant values.
21548 * decl.c (struct named_label_list): Use instead of stuffing
21549 random items into a TREE_LIST node.
21550 (named_label_uses): Use the new struct.
21551 (poplevel): Likewise.
21552 (lookup_label): Likewise.
21553 (define_label): Add an error message to tell the user the line
21554 where the goto is located in addition to the destination of the
21556 (init_decl_processing): Use NULL instead of NULL_TREE to initialize
21558 (finish_function): Likewise.
21560 (start_decl): Complain about defining a static data member
21561 in a different type from which it was declared.
21563 Wed May 22 09:33:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21565 * cvt.c (build_expr_type_conversion): Adjust.
21567 Tue May 21 11:21:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21569 * call.c (build_method_call): Always convert 'this' to the
21572 * search.c (add_conversions): Put the conversion function in
21573 TREE_VALUE, the type in TREE_PURPOSE.
21574 * cvt.c (build_type_conversion): Adjust.
21575 * call.c (user_harshness): Adjust.
21577 * method.c (emit_thunk): Call temporary_allocation and
21578 permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
21580 * tree.c (build_cplus_array_type): Handle tweaking of
21581 TYPE_MAIN_VARIANT here.
21582 * typeck.c (common_type): Not here.
21584 * typeck.c (complete_type): Only try to complete an array type if
21587 Mon May 20 14:55:59 1996 Jason Merrill <jason@yorick.cygnus.com>
21589 * decl.c (grokvardecl): Call complete_type.
21590 (grokdeclarator): Call complete_type for PARM_DECLs.
21592 Fri May 17 16:41:17 1996 Jason Merrill <jason@yorick.cygnus.com>
21594 * pt.c (instantiate_class_template): Re-set
21595 CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
21597 Fri May 17 14:56:55 1996 Mike Stump <mrs@cygnus.com>
21599 * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
21600 smart enough to do it right.
21601 * tree.c (cp_expand_decl_cleanup): Likewise.
21602 * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
21603 cp_expand_decl_cleanup.
21604 (store_parm_decls): Likewise.
21605 (hack_incomplete_structures): Likewise.
21606 * except.c (push_eh_cleanup): Likewise.
21608 Fri May 17 13:13:51 1996 Mike Stump <mrs@cygnus.com>
21610 * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
21611 frontend to the backend where it belongs.
21612 * tree.c (unsave_expr): Likewise.
21613 (unsave_expr_now): Likewise.
21614 * tree.def (UNSAVE_EXPR): Likewise.
21615 * cp-tree.h (unsave_expr): Likewise.
21616 (unsave_expr_now): Likewise.
21618 Fri May 17 11:02:41 1996 Mike Stump <mrs@cygnus.com>
21620 * init.c (emit_base_init): Make sure the partial EH cleanups live
21621 on the function_obstack.
21623 Thu May 16 15:29:33 1996 Bob Manson <manson@charmed.cygnus.com>
21625 * expr.c (do_case): Don't try to dereference null TREE_TYPEs
21626 when checking for pointer types.
21628 Thu May 16 13:38:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21630 * pt.c (instantiate_class_template): Remove obsolete check for
21631 access declarations.
21633 Thu May 16 13:34:15 1996 Mike Stump <mrs@cygnus.com>
21635 * call.c (build_overload_call): Simplify calls to
21636 build_overload_call by removing last parameter.
21637 (build_method_call): Likewise.
21638 * cp-tree.h: Likewise.
21639 * method.c (build_opfncall): Likewise.
21640 * typeck.c (build_x_function_call): Likewise.
21642 Thu May 16 13:15:43 1996 Mike Stump <mrs@cygnus.com>
21644 * call.c (default_parm_conversions): Factor out common code.
21645 (build_method_call): Use it.
21646 (build_overload_call_real): Use it.
21648 Wed May 15 14:46:14 1996 Mike Stump <mrs@cygnus.com>
21650 * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
21651 but pedwarn as the code is bogus.
21652 * typeck.c (decay_conversion): Likewise.
21653 (build_function_call_real): Use build_addr_func instead of
21654 default_conversion. Don't allow pointer-to-method functions down
21656 (build_unary_op): Use real pointer-to-member functions instead of
21658 (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
21659 (convert_for_assignment): Removed some obsolete code.
21660 * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
21661 build_x_function_call instead of current_class_ptr. Only call
21662 digest_init once on an initializer, we do this just checking
21664 (build_expr_from_tree): Pass current_class_ref to
21665 build_x_function_call instead of current_class_ptr.
21666 * init.c (build_member_call): Likewise.
21667 * pase.y: Likewise.
21668 * error.c (dump_expr): Handle OFFSET_REFs better.
21669 * pt.c (unify): Handle pointer-to-member functions better.
21670 * decl.c (finish_function): Clear out current_class_ref just like
21671 we do for current_class_ptr.
21673 * typeck.c (get_delta_difference): Handle virtual bases better.
21675 Tue May 14 16:37:37 1996 Jason Merrill <jason@yorick.cygnus.com>
21677 * sig.c (build_signature_table_constructor): Use the delta for
21678 the original basetype for this virtual function with thunks.
21679 (build_signature_method_call): We still need to adjust 'this'
21682 Tue May 14 16:27:25 1996 Mike Stump <mrs@cygnus.com>
21684 * call.c (build_addr_func): New routine. Used to get the `real'
21685 address of a function or a method. Needed to avoid getting a
21686 pointer-to-member function.
21687 (build_call): New routine to build CALL_EXPRs.
21688 (build_method_call): Use it.
21689 * cvt.c (convert_to_aggr): Likewise.
21690 * typeck.c (build_function_call_real): Likewise.
21691 * sig.c (build_signature_table_constructor): Use build_addr_func.
21692 * cp-tree.h (build_call, build_addr_func): Declare them.
21694 Tue May 14 12:47:47 1996 Mike Stump <mrs@cygnus.com>
21696 * cp-tree.h (LOOKUP_AGGR): Remove, unused.
21697 * parse.y: Remove uses of LOOKUP_AGGR.
21699 Tue May 14 12:07:51 1996 Mike Stump <mrs@cygnus.com>
21701 * *.[chy]: Rename current_class_decl to current_class_ptr, and
21702 C_C_D to current_class_ref.
21704 Mon May 13 16:55:23 1996 Jason Merrill <jason@yorick.cygnus.com>
21706 * call.c (convert_harshness): Tighten up pointer conversions.
21708 Sat May 11 04:33:50 1996 Doug Evans <dje@canuck.cygnus.com>
21710 * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
21711 (finish_file): Likewise.
21713 Fri May 10 11:09:57 1996 Jason Merrill <jason@yorick.cygnus.com>
21715 * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
21717 * method.c (emit_thunk): Set flag_omit_frame_pointer in default
21720 Thu May 9 18:18:30 1996 Jason Merrill <jason@yorick.cygnus.com>
21722 * decl2.c: Turn on thunks by default where supported.
21724 Tue May 7 20:39:57 1996 Mike Stump <mrs@cygnus.com>
21726 * cp-tree.h (build_overload_call_maybe): Removed.
21727 * call.c (build_overload_call_real): Invert meaning of last arg to
21728 be require_complete.
21729 (build_overload_call): Likewise.
21730 * typeck.c (build_x_function_call): Use build_overload_call_real
21731 instead of build_overload_call_maybe.
21733 Mon May 6 01:23:32 1996 Jason Merrill <jason@yorick.cygnus.com>
21735 * decl2.c (finish_file): Don't try to emit functions that haven't
21738 Fri May 3 09:30:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21740 * decl2.c (finish_vtable_vardecl): Oops.
21742 * decl.c (maybe_push_to_top_level): Do save previous_class_*.
21743 Also store the bindings from previous_class_values.
21744 (pop_from_top_level): Restore them.
21746 Thu May 2 21:56:49 1996 Jason Merrill <jason@yorick.cygnus.com>
21748 * decl2.c (finish_vtable_vardecl): Only write out vtable if its
21749 symbol has been referenced.
21750 (finish_file): Re-join synthesis/vtable loop with inline emission
21751 loop, disable inlining when an inline is output.
21753 Thu May 2 17:20:02 1996 Mike Stump <mrs@cygnus.com>
21755 * except.c (init_exception_processing): Setup saved_in_catch.
21756 (push_eh_cleanup): Reset __eh_in_catch.
21757 (expand_start_catch_block): Set __eh_in_catch.
21759 Thu May 2 16:21:17 1996 Mike Stump <mrs@cygnus.com>
21761 * except.c (push_eh_cleanup): Add tracking for whether or not we
21762 have an active exception object.
21763 (expand_builtin_throw): Use it to make sure a rethrow without an
21764 exception object is caught.
21766 Thu May 2 11:26:41 1996 Jason Merrill <jason@yorick.cygnus.com>
21768 * decl.c (maybe_push_to_top_level): Clear out class-level bindings
21771 Wed May 1 11:26:52 1996 Jason Merrill <jason@yorick.cygnus.com>
21773 * decl2.c (finish_file): Also use sentries for vars with
21774 DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
21777 * lex.c (handle_cp_pragma): Disable #pragma
21778 interface/implementation if SUPPORTS_ONE_ONLY > 1.
21780 Tue Apr 30 11:25:46 1996 Jason Merrill <jason@yorick.cygnus.com>
21782 * method.c (emit_thunk): Wrap default case in
21783 temporary/permanent_allocation.
21785 * method.c (make_thunk): Use DECL_ONE_ONLY.
21786 (emit_thunk): Call assemble_end_function.
21788 Mon Apr 29 15:38:29 1996 Jason Merrill <jason@yorick.cygnus.com>
21790 * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
21791 (import_export_decl): Likewise.
21792 (finish_prevtable_vardecl): Disable vtable hack if
21793 SUPPORTS_ONE_ONLY > 1.
21795 Mon Apr 29 14:32:47 1996 Mike Stump <mrs@cygnus.com>
21797 * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
21798 PREDECREMENT_EXPRs take two arguments, not one.
21800 Mon Apr 29 00:27:53 1996 Jason Merrill <jason@yorick.cygnus.com>
21802 * class.c (build_vtable_entry): Don't build thunks for abstract
21805 * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
21808 Sat Apr 27 16:45:35 1996 Jason Merrill <jason@yorick.cygnus.com>
21810 * class.c (set_rtti_entry): Use size_zero_node.
21811 (build_vtable): Likewise.
21813 Sat Apr 27 14:48:57 1996 Jason Merrill <jason@phydeaux.cygnus.com>
21815 * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
21816 (prepare_fresh_vtable): Likewise.
21818 Fri Apr 26 13:14:14 1996 Jason Merrill <jason@yorick.cygnus.com>
21820 * method.c (emit_thunk): Call mark_used on the target function.
21822 * call.c (build_method_call): Don't warn about pending templates.
21824 Thu Apr 25 14:55:44 1996 Jason Merrill <jason@yorick.cygnus.com>
21826 * decl2.c (finish_file): Fix list walking logic.
21828 * typeck2.c (check_for_new_type): Only warn if -pedantic.
21830 Wed Apr 24 15:41:15 1996 Bob Manson <manson@charmed.cygnus.com>
21832 * class.c (finish_struct_1): Remove old code for
21833 dont_allow_type_definitions.
21834 * cp-tree.h: Likewise.
21835 * spew.c: Make sure cp-tree.h is included before parse.h, so the
21836 definition of flagged_type_tree is found before it is used.
21838 * parse.y: Added the ftype member to the type union, and changed a
21839 number of rules to use it instead of ttype. Added calls to
21840 check_for_new_type() as appropriate.
21841 * typeck2.c (check_for_new_type): New function for checking
21842 if a newly defined type appears in the specified tree.
21843 * cp-tree.h: Add new type flagged_type_tree. Add a prototype
21844 for check_for_new_type().
21846 Wed Apr 24 00:36:21 1996 Jason Merrill <jason@yorick.cygnus.com>
21848 * decl2.c (finish_file): Only use a sentry if the decl is public.
21850 * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
21851 don't pass LOOKUP_ONLYCONVERTING.
21853 Tue Apr 23 17:18:47 1996 Bob Manson <manson@charmed.cygnus.com>
21855 * typeck.c (common_type): Fix the ARRAY_TYPE case so it
21856 properly keeps track of const and volatile type modifiers.
21858 Tue Apr 23 10:52:56 1996 Jason Merrill <jason@yorick.cygnus.com>
21860 * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
21861 * pt.c (comp_template_args): Use it.
21863 * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
21864 assemble_external for artificial function decls.
21866 * decl.c (cp_finish_decl): Oops.
21868 Mon Apr 22 17:28:27 1996 Jason Merrill <jason@yorick.cygnus.com>
21870 * decl2.c (import_export_decl): Put static data member templates
21871 into common storage, or make them weak, depending on whether they
21872 are dynamically or statically initialized.
21873 (get_sentry): New function.
21874 (finish_file): Do import_export_decl for static data members before
21875 building the init/fini functions. Don't init/fini a variable that's
21876 EXTERNAL. Use a sentry for variables in common. Fix mismatching
21877 push/pop_temp_slots.
21878 * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
21879 expand_static_init thang.
21880 * method.c (get_id_2): New function.
21882 Mon Apr 22 15:32:45 1996 Bob Manson <manson@charmed.cygnus.com>
21884 * parse.y (empty_parms): Make sure we use C++-style prototypes
21885 when we're declaring member functions.
21887 Sun Apr 21 10:08:22 1996 Jason Merrill <jason@yorick.cygnus.com>
21889 * Makefile.in (CONFLICTS): 16 s/r conflicts.
21890 * parse.y (self_template_type): New nonterminal.
21892 Thu Apr 18 08:56:54 1996 Jason Merrill <jason@yorick.cygnus.com>
21894 * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
21896 * parse.y (base_class.1): Allow 'typename foo::bar'.
21898 * lex.c (check_newline): Remove #pragma code that plays with the
21899 input stream, since we now deal with tokens. Clear nextchar when
21901 (handle_cp_pragma): Use real_yylex.
21902 (handle_sysv_pragma): Don't do skipline here. Only call real_yylex
21905 * lex.c (check_for_missing_semicolon): Handle SELFNAME.
21907 * lex.c (handle_cp_pragma): Fix "#pragma implementation".
21909 Wed Apr 17 16:51:33 1996 Jason Merrill <jason@yorick.cygnus.com>
21911 * parse.y: New token SELFNAME for potential constructor.
21912 * spew.c (yylex): Handle it.
21913 * lex.c (identifier_type): Produce it.
21915 * parse.y (complete_type_name): In :: case, don't push class binding.
21916 (complex_type_name): Likewise.
21918 Wed Apr 17 15:02:40 1996 Mike Stump <mrs@cygnus.com>
21920 * typeck.c (build_reinterpret_cast): Handle pointer to member
21923 Wed Apr 17 12:28:26 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
21925 * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
21927 (check_newline): Put the vtable/unit/implementation/interface pragma
21928 code into handle_cp_pragma, replacing it with a call.
21929 (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
21930 args. Get the next token after handling the pragma token.
21932 Wed Apr 17 10:28:34 1996 Jason Merrill <jason@yorick.cygnus.com>
21934 * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
21935 (convert_to_pointer_force): Likewise.
21937 * init.c (build_new): Fix array new without -fcheck-new.
21939 Tue Apr 16 13:44:58 1996 Jason Merrill <jason@yorick.cygnus.com>
21941 * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
21942 tree.c: Lose TYPE_NESTED_NAME.
21944 * parse.y (nested_name_specifier_1): Don't treat non-identifiers
21947 * tree.def: Add VEC_INIT_EXPR.
21948 * expr.c (cplus_expand_expr): Handle it.
21949 * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
21950 the extra file-scope symbol nastiness.
21952 Mon Apr 15 16:21:29 1996 Jason Merrill <jason@yorick.cygnus.com>
21954 * method.c (make_thunk): Thunks are static.
21955 (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
21957 * decl2.c (mark_vtable_entries): Emit thunks as needed.
21958 (finish_file): Don't emit them here.
21960 Sun Apr 14 11:34:39 1996 Jason Merrill <jason@yorick.cygnus.com>
21962 * rtti.c (build_dynamic_cast): Handle null pointers.
21963 (ifnonnull): New function.
21965 Fri Apr 12 09:08:27 1996 Bob Manson <manson@charmed.cygnus.com>
21967 * call.c (build_method_call): Remember the original basetype we
21968 were called with. Give an error message instead of trying
21969 (incorrectly) to call a non-static member function through a
21970 non-inherited class.
21972 * search.c (expand_upcast_fixups): Mark the new fixup as
21975 Thu Apr 11 03:57:09 1996 Jason Merrill <jason@yorick.cygnus.com>
21977 * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
21979 * class.c (set_rtti_entry): Fix for thunks.
21981 * decl2.c (import_export_decl): Still emit typeinfo fns for
21982 cv-variants of builtin types.
21984 * rtti.c (expand_class_desc): Set up base_info_type_node here.
21985 (init_rtti_processing): Instead of here.
21987 Wed Apr 10 14:17:13 1996 Jason Merrill <jason@yorick.cygnus.com>
21989 * rtti.c (init_rtti_processing): Do init regardless of -frtti.
21990 (build_typeid): Only complain about taking dynamic typeid without
21993 * decl2.c: flag_rtti defaults to 1.
21995 * rtti.c (get_tinfo_var): The general class case is now smaller.
21996 (init_rtti_processing): Pack the latter three fields of base_info
21999 Wed Apr 10 13:50:14 1996 Mike Stump <mrs@cygnus.com>
22001 * init.c (expand_member_init): Don't dump if name is NULL_TREE.
22003 Wed Apr 10 12:56:02 1996 Mike Stump <mrs@cygnus.com>
22005 * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
22006 (push_memoized_context): Split out code to undefer pop_type_level to
22007 (clear_memoized_cache): here.
22008 (pop_memoized_context): We can only handle one layer of deferral of
22009 pop_type_level so clear the cache, if there was a previous level.
22011 Tue Apr 9 23:06:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22013 * rtti.c (init_rtti_processing): Build up base_info_type_node.
22014 (expand_class_desc): Use one pointer to an array of base_info
22015 structs, passed using a CONSTRUCTOR.
22017 Tue Apr 9 14:20:57 1996 Mike Stump <mrs@cygnus.com>
22019 * class.c (build_vbase_path): Remove block extern for
22020 flag_assume_nonnull_objects here.
22021 (build_vfn_ref): Split out functionality into build_vtbl_ref.
22022 (build_vtbl_ref): New routine.
22023 (build_vtable): Set up rtti info here.
22024 (add_virtual_function): Note in CLASSTYPE_RTTI the best
22025 place where we can get the rtti pointers from to avoid having to
22026 search around for a place.
22027 (finish_base_struct): Likewise.
22028 (finish_struct_1): Likewise. Never create totally new vtables
22029 with totally new vtable pointers for rtti. Disable code to layout
22030 vtable pointers better until we want to break binary
22032 * rtti.c (build_headof_sub): New routine to convert down to a
22033 sub-object that has an rtti pointer in the vtable.
22034 (build_headof): Use it. Also, use build_vtbl_ref now to be more
22036 (build_dynamic_cast): Make sure we have saved it, if we need to.
22037 * search.c (dfs_init_vbase_pointers): Disable code that deals with
22038 a more efficient vtable layout, enable later.
22039 * call.c (flag_assume_nonnull_objects): Moved declaration to
22040 * cp-tree.h: here. Declare build_vtbl_ref.
22041 * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
22042 function calls that want a tree.
22044 Tue Apr 9 12:10:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22046 * rtti.c (build_dynamic_cast): Handle downcasting to X* given
22047 other X subobjects in the most derived type. Ack.
22049 * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
22050 get_typeid will do it for us.
22051 (get_typeid_1): Break out call-building for expand_*_desc to use.
22052 (get_typeid): Call it.
22053 (expand_*_desc): Likewise.
22054 * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
22056 (init_decl_processing): Lose builtin_type_tdescs lossage.
22057 * decl2.c (finish_vtable_vardecl): Remove obsolete code.
22059 Mon Apr 8 17:23:23 1996 Bob Manson <manson@charmed.cygnus.com>
22061 * pt.c (tsubst): When calling set_nested_typename, use
22062 TYPE_NESTED_NAME (current_class_type) instead of
22063 current_class_name.
22065 * decl.c (pushdecl): Likewise.
22066 (pushdecl_class_level): Likewise.
22067 (grokdeclarator): Use NULL_TREE instead of 0 in the call to
22068 set_nested_typename.
22070 Sun Apr 7 10:44:31 1996 Jason Merrill <jason@yorick.cygnus.com>
22072 * rtti.c (synthesize_tinfo_fn): Handle arrays.
22074 * cp-tree.h (DECL_REALLY_EXTERN): New macro.
22076 Sat Apr 6 13:56:27 1996 Jason Merrill <jason@yorick.cygnus.com>
22078 * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
22079 (init_rtti_processing): Lose bad_cast_type.
22080 (build_dynamic_cast): Use throw_bad_cast.
22082 * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
22084 * decl2.c (finish_file): Don't synthesize artificial functions
22085 that are external and not inline.
22087 * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
22089 * decl2.c (finish_file): Handle having new inlines added to
22090 saved_inlines by synthesis.
22092 * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
22094 Fri Apr 5 17:02:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22096 RTTI rewrite to initialize nodes as needed, not require that
22097 users #include <typeinfo>, complete functionality and reduce wasted
22099 * rtti.c (init_rtti_processing): New fn.
22100 (build_typeid): The vtable entry is now a function.
22101 (get_tinfo_var): New fn.
22102 (get_tinfo_fn): Likewise.
22103 (get_typeid): Use it.
22104 (build_dynamic_cast): Declare and use entry point __dynamic_cast.
22105 (build_*_desc): Rename to expand_*_desc and rewrite to use entry
22107 (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
22108 (synthesize_tinfo_fn): New fn.
22109 * method.c (build_t_desc_overload): Lose.
22110 (build_overload_with_type): More generic.
22111 * decl.c (init_decl_processing): Call init_rtti_processing.
22112 * class.c (set_rtti_entry): Use get_tinfo_fn.
22113 * decl2.c (mark_vtable_entries): Mark the rtti function.
22114 (finish_prevtable_vardecl): Don't build_t_desc.
22115 (import_export_decl): Handle tinfo functions.
22116 (finish_file): Likewise.
22117 * typeck.c (inline_conversion): New fn.
22118 (build_function_call_real): Use it.
22119 * cp-tree.h: Add decls.
22121 * method.c (hack_identifier): Also convert component_refs from
22124 * lex.c (cons_up_default_function): Use the type, not the name, in
22127 * decl2.c (import_export_vtable): Fix weak vtables.
22129 Fri Apr 5 13:30:17 1996 Bob Manson <manson@charmed.cygnus.com>
22131 * search.c (get_base_distance_recursive): Fix access checks for
22134 Fri Apr 5 11:02:06 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22136 * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
22138 (convert_harshness): Add prototypes wrapped by PROTO.
22139 * decl2.c (grok_function_init): Likewise.
22140 (do_toplevel_using_decl): Change to void return type.
22141 * class.c (build_vtable_entry): Remove decl of make_thunk.
22142 (merge_overrides): Fix order of arg definitions.
22143 (finish_vtbls): Likewise.
22144 (fixup_vtable_deltas): Likewise.
22145 (modify_all_direct_vtables): Likewise.
22146 (modify_all_indirect_vtables): Likewise.
22147 * search.c (get_base_distance_recursive): Likewise.
22148 (get_abstract_virtuals_1): Likewise.
22149 (fixup_virtual_upcast_offsets): Likewise.
22150 (lookup_fnfields_1): Add prototypes wrapped by PROTO.
22151 * init.c (perform_member_init): Fix order of arg definitions.
22152 (expand_aggr_init_1): Add prototypes wrapped by PROTO.
22153 * cp-tree.h (make_thunk): Add decl.
22154 (overload_template_name, push_template_decl): Add decls.
22155 (do_toplevel_using_decl): Change to void return type.
22156 (vec_binfo_member): Add decl.
22158 Thu Apr 4 13:33:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22160 * typeck.c (mark_addressable, convert_for_assignment,
22161 convert_for_initialization, pointer_int_sum, pointer_diff,
22162 unary_complex_lvalue): Add prototypes wrapped by PROTO.
22163 (convert_sequence): #if 0 fn decl, since definition also is.
22165 Thu Apr 4 11:00:53 1996 Mike Stump <mrs@cygnus.com>
22167 * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
22168 cast to pointer types for type searching.
22170 Wed Apr 3 17:10:57 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22172 * typeck.c (get_delta_difference): Use cp_error, not error, in the
22173 case where BINFO == 0.
22175 Wed Apr 3 12:01:02 1996 Mike Stump <mrs@cygnus.com>
22177 * call.c (build_method_call): Fix wording of error messages so
22178 constructors come out right.
22180 Tue Apr 2 16:06:59 1996 Bob Manson <manson@charmed.cygnus.com>
22182 * decl.c (push_overloaded_decl): Don't warn about hidden
22183 constructors when both the type and the function are declared
22184 in a system header file.
22186 Mon Apr 1 09:03:13 1996 Bob Manson <manson@charmed.cygnus.com>
22188 * class.c (finish_struct_1): Propagate the TYPE_PACKED
22189 flag for the type to the type's fields.
22191 Sat Mar 30 12:14:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22193 * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
22195 Fri Mar 29 15:51:36 1996 Bob Manson <manson@charmed.cygnus.com>
22197 * class.c (base_info, finish_base_struct): Replace
22198 needs_virtual_dtor with base_has_virtual.
22200 (finish_struct_1): Remove the old code that tried to make default
22201 destructors virtual. Use base_has_virtual when checking if we need
22202 to add a vtable entry for the rtti code.
22204 Fri Mar 29 14:02:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22206 * pt.c (push_template_decl): Complain about template decl with
22207 inappropriate declaration.
22209 Fri Mar 29 12:15:35 1996 Bob Manson <manson@charmed.cygnus.com>
22211 * typeck.c (build_x_unary_op): Remove bogus check for taking
22212 the address of a member function.
22214 Fri Mar 29 11:56:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22216 * parse.y (constructor_declarator): Only push the class if
22217 we are not already in the class.
22219 Fri Mar 29 09:41:02 1996 Jeffrey A. Law <law@cygnus.com>
22221 * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
22222 Add additional argument to INIT_CUMULATIVE_ARGS.
22224 Thu Mar 28 16:41:39 1996 Jason Merrill <jason@yorick.cygnus.com>
22226 * decl.c (shadow_tag): Fix error about anon union with methods.
22228 * parse.y (self_reference): Only generate a self-reference if this
22229 is a non-template class.
22230 (opt.component_decl_list): Only use it if it was generated.
22232 * parse.y (component_decl_1): Use constructor_declarator.
22233 (fn.def2): Likewise.
22234 (notype_component_declarator0): Likewise.
22236 Thu Mar 28 15:11:35 1996 Bob Manson <manson@charmed.cygnus.com>
22238 * typeck.c (build_x_unary_op): Add checks for taking the address
22239 of a TARGET_EXPR or of a member function, and give appropriate
22242 Thu Mar 28 14:49:26 1996 Jason Merrill <jason@yorick.cygnus.com>
22244 * pt.c (process_template_parm): Allow template type parms to be
22245 used as types for template const parms.
22247 Wed Mar 27 15:51:19 1996 Mike Stump <mrs@cygnus.com>
22249 * init.c (expand_vec_init): Ensure the eh cleanups are on the
22252 Wed Mar 27 10:14:30 1996 Jason Merrill <jason@yorick.cygnus.com>
22254 * decl.c (lookup_name_real): Be even more picky about the
22255 ambiguous lookup warning.
22256 (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
22257 * parse.y (constructor_declarator): Rather than here.
22259 * parse.y (constructor_declarator): New nonterminal.
22261 (explicit_instantiation): Likewise.
22263 Tue Mar 26 13:41:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22265 Add implicit declaration of class name at class scope.
22266 * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
22267 * parse.y (self_reference): New nonterminal.
22268 (opt.component_decl_list): Use it.
22269 (fn.def1): Add nested_name_specifier type_name cases.
22270 * class.c (build_self_reference): New function.
22271 (finish_struct): Handle access_default later, move self-reference
22273 * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
22274 * cp-tree.h: Adjust.
22276 * pt.c (do_function_instantiation): Separate handling of member
22277 functions and non-member functions properly.
22279 Mon Mar 25 14:23:22 1996 Jason Merrill <jason@yorick.cygnus.com>
22281 * pt.c (process_template_parm): Improve error for 'volatile class K'.
22283 * class.c (finish_struct_1): Check the right slot for destructors.
22285 * decl.c (start_enum): Complain about enum templates.
22287 Mon Mar 25 13:25:31 1996 Mike Stump <mrs@cygnus.com>
22289 * init.c (resolve_offset_ref): Offset pointers to member data by one.
22290 * typeck.c (unary_complex_lvalue): Likewise.
22292 Mon Mar 25 13:30:42 1996 Bob Manson <manson@charmed.cygnus.com>
22294 * typeck.c (c_expand_return): Check for a returned local
22295 array name, similar to the check for an ADDR_EXPR.
22297 Mon Mar 25 13:07:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22299 * decl.c (cp_finish_decl): Don't build cleanups for static
22302 Fri Mar 22 17:57:55 1996 Mike Stump <mrs@cygnus.com>
22304 * typeck.c (build_modify_expr): Fix error messages to be more
22306 * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
22307 assignment operators.
22308 * error.c (assop_as_string): Likewise. Add support for `%Q' for
22309 assignment operators.
22311 Fri Mar 22 13:48:29 1996 Jason Merrill <jason@yorick.cygnus.com>
22313 * decl.c (grokdeclarator): Call bad_specifiers for typedefs. Also
22314 give an error if initialized. pedwarn about nested type with the
22315 same name as its enclosing class.
22317 * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
22319 * typeck.c (require_complete_type): Be sure to instantiate the
22320 MAIN_VARIANT of the type.
22322 * decl2.c (finish_file): Instantiate pending templates before
22323 processing static constructors and destructors.
22325 * pt.c (instantiate_decl): Don't instantiate functions at toplevel
22328 Fri Mar 22 09:30:17 1996 Bob Manson <manson@beauty.cygnus.com>
22330 * decl2.c (delete_sanity): If error_mark_node is passed
22331 in as an expression, quit while we're ahead.
22333 * decl.c (grokdeclarator): Give an error message if `friend'
22334 is combined with any storage class specifiers.
22336 Wed Mar 20 14:51:55 1996 Jason Merrill <jason@yorick.cygnus.com>
22338 * parse.y (named_complex_class_head_sans_basetype): Don't crash on
22339 definition of nonexistent nested type.
22341 * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
22342 not to say 'typedef'.
22344 Wed Mar 20 00:11:47 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22346 * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
22347 * search.c (dfs_walk, dfs_init_vbase_pointers,
22348 expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
22349 (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
22351 Tue Mar 19 17:56:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22353 * except.c (build_throw): Support minimal parse.
22354 * pt.c (tsubst_copy): Support THROW_EXPR.
22355 * decl2.c (build_expr_from_tree): Likewise.
22357 * pt.c (mangle_class_name_for_template): Always allocate
22360 Tue Mar 19 16:34:31 1996 Bob Manson <manson@beauty.cygnus.com>
22362 * cvt.c (cp_convert_to_pointer): Give an appropriate error
22363 when trying to cast from an incomplete type.
22365 Tue Mar 19 16:00:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22367 * pt.c (instantiate_class_template): Don't bother setting up
22368 CLASSTYPE_TAGS explicitly, as the nested types will add
22371 Tue Mar 19 15:48:43 1996 Bob Manson <manson@beauty.cygnus.com>
22373 * decl.c (shadow_tag): Remove old error check for usage of
22374 an enum without a previous declaration.
22375 (xref_tag): Add error message about usage of enums without a
22376 previous declaration.
22378 Tue Mar 19 09:21:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22380 * lex.c (do_identifier): Only do name consistency check if we're
22383 * pt.c (push_template_decl): Don't crash if we get a member defn
22384 that doesn't match.
22386 * decl.c (xref_tag_from_type): New function to do an xref without
22387 always having to figure out code_type_node.
22388 * cp-tree.h: Declare it.
22389 * pt.c (instantiate_class_template): Use it for friend classes.
22390 (lookup_template_class): Use it.
22392 * typeck2.c (build_functional_cast): Pull out a single parm before
22393 passing it to build_c_cast.
22395 Tue Mar 19 09:07:15 1996 Bob Manson <manson@beauty.cygnus.com>
22397 * expr.c (do_case): Give an error message if a pointer is
22398 given as a case value.
22400 Mon Mar 18 21:57:54 1996 Jason Merrill <jason@yorick.cygnus.com>
22402 * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
22405 * lex.c (cons_up_default_function): Really, now, interface hackery
22406 does not apply to synthesized methods.
22408 Mon Mar 18 18:20:57 1996 Mike Stump <mrs@cygnus.com>
22410 * call.c (build_method_call): Ctors and dtors now have special names
22411 with respect to lookups.
22412 * class.c (add_method): Likewise.
22413 (grow_method): Likewise.
22414 (finish_struct_methods): Likewise.
22415 (warn_hidden): Likewise.
22416 (finish_struct_1): Likewise.
22417 * cvt.c (convert_to_reference): Likewise.
22418 (convert_to_aggr): Likewise.
22419 (cp_convert): Likewise.
22420 * decl2.c (check_classfn): Likewise.
22421 * init.c (expand_member_init): Likewise.
22422 (expand_default_init): Likewise.
22423 (expand_aggr_init_1): Likewise.
22424 (build_offset_ref): Likewise.
22425 (build_new): Likewise.
22426 (build_delete): Likewise.
22427 * lex.c (do_inline_function_hair): Likewise.
22428 * search.c (lookup_field_1): Likewise.
22429 (lookup_fnfields_here): Likewise.
22430 (lookup_field): Likewise.
22431 (lookup_fnfields): Likewise.
22432 (get_virtual_destructor): Likewise.
22433 (dfs_debug_mark): Likewise.
22434 (dfs_pushdecls): Likewise.
22435 (dfs_compress_decls): Likewise.
22436 * tree.c (layout_basetypes): Likewise.
22437 * typeck.c (build_component_ref): Likewise.
22438 (build_x_function_call): Likewise.
22439 (build_modify_expr): Likewise.
22440 (convert_for_initialization): Likewise.
22441 (build_functional_cast): Likewise.
22442 * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
22445 * decl.c (ctor_identifier): New.
22446 (dtor_identifier): New.
22447 (init_decl_processing): Set them.
22449 Mon Mar 18 18:00:51 1996 Mike Stump <mrs@cygnus.com>
22451 * typeck.c (build_component_ref): Don't get confused by fields whose
22452 context has no type name, like pointer to member functions.
22454 Mon Mar 18 13:19:03 1996 Jason Merrill <jason@yorick.cygnus.com>
22456 * decl.c (grokdeclarator): Handle typedef without declarator.
22458 * pt.c (tsubst): Handle SCOPE_REF in declarator.
22460 * parse.y (bad_parm): Catch another case of missing `typename'.
22462 * lex.c (yyprint): Handle TYPE_DECLs.
22464 * decl.c (start_function): Don't try to be clever.
22466 * lex.c: Lose compiler_error_with_decl.
22467 * typeck2.c: Lose error_with_aggr_type.
22468 (incomplete_type_error): Use cp_* instead of old functions.
22469 (readonly_error): Likewise.
22470 * typeck.c (convert_arguments): Likewise.
22471 * search.c (lookup_nested_field): Likewise.
22472 * method.c (make_thunk): Likewise.
22473 * decl.c (grokparms): Likewise.
22474 * cp-tree.h: Update.
22476 * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
22479 Mon Mar 18 11:25:52 1996 Bob Manson <manson@beauty.cygnus.com>
22481 * method.c (build_opfncall): When deleting a pointer to an
22482 array, build a new pointer to the tree past any ARRAY_TYPE
22485 Mon Mar 18 10:11:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22487 * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
22489 Fri Mar 15 11:03:57 1996 Jason Merrill <jason@yorick.cygnus.com>
22491 * pt.c (instantiate_decl): Only call import_export_decl if at_eof
22494 * decl.c (finish_function): Don't set nested based on
22495 hack_decl_function_context.
22496 * parse.y (function_try_block): Check for nested function.
22497 (pending_inlines): Likewise.
22499 * decl2.c (build_expr_from_tree): If a unary op already has a
22500 type, just return it.
22502 * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
22504 * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
22505 (finish_file): Check the return value of walk_vtables.
22506 (finish_prevtable_vardecl): Return int.
22507 (finish_vtable_vardecl): Likewise.
22508 (prune_vtable_vardecl): Likewise.
22509 * lex.c (set_vardecl_interface_info): Likewise.
22510 * cp-tree.h: Adjust return types.
22512 * class.c (delete_duplicate_fields_1): Don't complain about
22513 duplicate nested types if they're the same type.
22514 (finish_struct): Remove check for duplicate.
22515 * decl2.c (grokfield): Don't check for typedef of anonymous type.
22517 Thu Mar 14 10:00:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22519 * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
22521 * decl.c (grokdeclarator): Lose special handling of class-level
22522 typedef. Lose SIGNATURE_GROKKING_TYPEDEF. Set
22523 SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
22525 * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
22527 * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
22529 * search.c (compute_access): Fix handling of anonymous union
22531 * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
22532 from anonymous unions to their members.
22534 * typeck.c (build_x_function_call): For static member functions,
22535 hand off to build_member_call.
22537 Wed Mar 13 14:03:34 1996 Jason Merrill <jason@yorick.cygnus.com>
22539 * typeck.c (build_component_ref): Handle OFFSET_REFs.
22541 * init.c (expand_vec_init): Fix init == 0 case.
22543 Tue Mar 12 14:36:02 1996 Jason Merrill <jason@yorick.cygnus.com>
22545 * init.c (build_new): pedwarn about init and array new.
22546 (expand_vec_init): Handle lists, use convert_for_initialization.
22548 * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
22549 when converting to an aggregate type.
22550 * cvt.c (cp_convert): Pass it through.
22552 * typeck.c (build_conditional_expr): Handle user-defined
22553 conversions to slightly different types.
22555 * decl.c (grokdeclarator): Force an array type in a parm to be
22558 * decl2.c (do_using_directive): Sorry.
22559 (do_namespace_alias): Likewise.
22560 * lex.c (real_yylex): Warn about using the `namespace' keyword.
22562 Sun Mar 10 22:26:09 1996 Jason Merrill <jason@yorick.cygnus.com>
22564 * parse.y (datadef): Move call to note_list_got_semicolon up.
22566 Fri Mar 8 11:47:26 1996 Mike Stump <mrs@cygnus.com>
22568 * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
22570 Fri Mar 8 11:29:06 1996 Mike Stump <mrs@cygnus.com>
22572 * decl.c (cp_finish_decl): The exception regions have to be
22573 nested, not overlapping. We start the exception region for a
22574 decl, after it has been fully built, and all temporaries for it
22575 have been cleaned up.
22577 Thu Mar 7 17:46:06 1996 Mike Stump <mrs@cygnus.com>
22579 * tree.c (vec_binfo_member): Don't core dump if we have no bases.
22581 Thu Mar 7 14:11:49 1996 Jason Merrill <jason@yorick.cygnus.com>
22583 * tree.def: Add RETURN_INIT.
22584 * pt.c (instantiate_decl): Handle RETURN_INIT.
22585 * decl.c (store_return_init): Handle minimal_parse_mode.
22587 * tree.c (cp_build_type_variant): Just return an error_mark_node.
22588 * decl.c (make_typename_type): Don't try to get the file and line
22590 * typeck.c (comptypes): Handle TYPENAME_TYPE.
22592 Wed Mar 6 18:47:50 1996 Per Bothner <bothner@kalessin.cygnus.com>
22594 * decl.c (poplevel): Make sure we clear out and restore old local
22595 non-VAR_DECL values by default when they go out of scope.
22597 Wed Mar 6 09:57:36 1996 Jason Merrill <jason@yorick.cygnus.com>
22599 * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
22600 referring to addresses of variables and functions.
22602 * error.c (dump_expr): Support SIZEOF_EXPR.
22604 * init.c (do_friend): Use the return value of check_classfn.
22606 * typeck.c (convert_arguments): Call complete_type.
22608 * method.c (hack_identifier): After giving an error, set value to
22611 Tue Mar 5 16:00:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22613 * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
22614 lossage for local classes.
22615 * cp-tree.h: Declare it.
22616 * decl.c (lookup_name_real): Evil, painful hack for local classes.
22617 (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
22618 Use hack_decl_function_context.
22619 (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
22620 (start_function): Use hack_decl_function_context.
22621 (finish_function): Likewise.
22622 * method.c (synthesize_method): Likewise.
22623 * lex.c (process_next_inline): Likewise.
22624 (do_pending_inlines): Likewise.
22625 * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
22628 Mon Mar 4 22:38:39 1996 Gerald Baumgartner <gb@alexander.cs.purdue.edu>
22630 * sig.c (build_signature_pointer_or_reference_type): Align
22631 signature pointers/references on 8-byte boundaries so they can be
22632 grabbed 2 words at a time on a Sparc.
22634 Tue Mar 5 10:21:01 1996 Jason Merrill <jason@yorick.cygnus.com>
22636 * method.c (hack_identifier): Requiring a static chain is now a
22638 * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
22641 Mon Mar 4 20:03:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22643 * init.c (build_offset_ref): Call complete_type.
22645 * decl.c (pop_from_top_level): Always pop previous_class_type.
22647 * parse.y: Handle multiple decls in a for-init-statement.
22648 * pt.c (tsubst_expr): Likewise.
22650 * pt.c (tsubst): Use tsubst_expr for the second operand of an
22653 * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
22654 (poplevel_class): Set it here.
22655 (pop_from_top_level): Pop it here if we're returning to class scope.
22656 * class.c (pushclass): Don't set it here.
22658 * decl.c (maybe_push_to_top_level): Save current_template_parms,
22659 and clear it if !pseudo.
22660 (pop_from_top_level): Restore it.
22662 * decl2.c (finish_file): Push the dummy each time we walk the list
22665 * error.c (dump_expr): Support LOOKUP_EXPR and actually do
22666 something for CAST_EXPR.
22668 Mon Feb 19 14:49:18 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22670 * cvt.c (cp_convert): Warn about implicit conversion of the
22671 address of a function to bool, as it is always true.
22673 Fri Feb 23 23:06:01 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
22675 * typeck.c (c_expand_return): Fix warning for local externs returned.
22677 Mon Mar 4 15:03:11 1996 Jason Merrill <jason@yorick.cygnus.com>
22679 * tree.c (mapcar): Propagate const and volatile properly.
22681 * typeck.c (complete_type): Be sure to instantiate the
22682 MAIN_VARIANT of the type.
22684 * method.c (synthesize_method): Class interface hackery does not
22685 apply to synthesized methods.
22687 Mon Mar 4 14:05:23 1996 Jason Merrill <jason@yorick.cygnus.com>
22689 * pt.c (comp_template_args): Use comptypes rather than just
22690 checking for TEMPLATE_TYPE_PARM equivalence.
22692 * typeck.c (build_x_function_call): Call complete_type before
22693 checking TYPE_OVERLOADS_CALL_EXPR.
22695 Mon Mar 4 18:48:30 1996 Manfred Hollstein <manfred@lts.sel.alcatel.de>
22697 * g++.c (main): Check also for new define ALT_LIBM.
22699 Fri Mar 1 13:09:33 1996 Jason Merrill <jason@yorick.cygnus.com>
22701 * pt.c (instantiate_class_template): If we don't have a pattern
22703 (coerce_template_parms): If we see a local class, bail.
22705 * decl.c (grok_reference_init): Make sure there's a type before
22708 * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
22709 (push_template_decl): Likewise.
22711 * parse.y (named_class_head): Set
22712 CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
22714 * decl.c (xref_tag): Diagnose redeclaration of template
22715 type-parameter name.
22717 * error.c (dump_type): Handle anonymous template type parms.
22719 * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
22721 (coerce_template_parms): Likewise.
22723 Thu Feb 29 16:26:01 1996 Mike Stump <mrs@cygnus.com>
22725 * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
22726 case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
22728 Thu Feb 29 08:20:25 1996 Jason Merrill <jason@yorick.cygnus.com>
22730 * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
22731 before trying to get its STUB_DECL.
22732 (coerce_template_parms): Likewise.
22734 * parse.y (template_type_parm): If they didn't use 'class',
22735 pretend they did after giving an error.
22737 * pt.c (coerce_template_parms): Diagnose use of local class.
22739 * decl.c (grok_reference_init): Use instantiate_type.
22741 * error.c (dump_expr): Handle TEMPLATE_DECLs.
22743 * parse.y (named_class_head): Diagnose mismatching types and tags.
22745 * decl.c (pushdecl): Type decls and class templates clash with
22746 artificial type decls, not hide them.
22748 * decl.c (redeclaration_error_message): Diagnose redefinition of
22749 templates properly.
22750 (duplicate_decls): Diagnose disallowed overloads for template
22753 * decl.c (start_decl): Call complete_type before checking for a
22756 * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
22758 * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
22760 Wed Feb 28 09:28:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22762 * decl.c (grok_op_properties): Don't check for operator++(int) in
22765 * tree.c (perm_manip): Return a copy of variable and function
22766 decls with external linkage.
22768 * tree.def: Change some of the min tree codes to type "1".
22769 * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
22770 * method.c (build_overload_int): Emit something arbitrary for
22771 anything but an INTEGER_CST if we're in a template.
22773 * decl.c (cp_finish_decl): Call complete_type before deciding
22774 whether or not to lay out the decl.
22776 * lex.c (do_identifier): Check for DECL_INITIAL before using it.
22778 Tue Feb 27 16:35:32 1996 Jason Merrill <jason@yorick.cygnus.com>
22780 * typeck2.c (build_x_arrow): Call complete_type.
22782 * pt.c (add_pending_template): Broken out.
22783 (lookup_template_class): If -fexternal-templates, call it for all
22784 the methods of implemented types.
22785 (instantiate_class_template): Instead of instantiating them here.
22786 (instantiate_decl): Handle -fexternal-templates earlier.
22788 Tue Feb 27 15:51:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22790 * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
22791 memoized lookup stuff inside GATHER_STATISTICS.
22793 Tue Feb 27 10:38:08 1996 Jason Merrill <jason@yorick.cygnus.com>
22795 * decl.c (start_decl): Complain about array of incomplete type
22797 (grokdeclarator): Not here.
22799 * parse.y (template_parm): Expand full_parm inline so we can set
22800 the rule's precedence.
22802 * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
22803 (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
22804 * decl2.c (grokbitfield): Don't check for integer constant here.
22805 * class.c (finish_struct_1): Check here.
22807 * decl.c (define_label): Make the min decl go on permanent_obstack.
22809 * pt.c (unify): Don't handle CONST_DECLs.
22810 (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
22811 (tsubst_copy): Likewise.
22813 * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
22814 CONST_DECL for a template parm.
22816 Mon Feb 26 12:48:18 1996 Jason Merrill <jason@yorick.cygnus.com>
22818 * decl.c (grokdeclarator): Complain about array of incomplete type
22820 (start_decl_1): Not here.
22822 * pt.c (tsubst): Handle pointer-to-function declarators.
22824 * method.c (hack_identifier): If pedantic, diagnose local class
22825 methods that require a static chain.
22827 * decl.c (grok_op_properties): No longer static.
22828 * cp-tree.h: Declare it.
22829 * pt.c (tsubst): Call it for operators.
22830 Use tsubst_copy for TREE_VECs.
22832 * parse.y (template_arg): The expr has precedence like '>'.
22834 Fri Feb 23 14:51:52 1996 Jason Merrill <jason@yorick.cygnus.com>
22836 * pt.c (coerce_template_parms): Don't coerce an expression using
22838 (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
22839 (tsubst): Don't use build_index_2_type if the max_value uses template
22841 * method.c (build_overload_int): Emit something arbitrary for an
22842 expression using template parms.
22844 * parse.y (template_close_bracket): New non-terminal to catch use
22845 of '>>' instead of '> >' in template class names.
22846 (template_type): Use it.
22847 * Makefile.in (CONFLICTS): Causes one more r/r conflict.
22849 * tree.def: Add CAST_EXPR.
22850 * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
22851 CONVERT_EXPR for minimal_parse_mode.
22852 * typeck.c (build_c_cast): Likewise.
22853 * pt.c (tsubst_copy): Likewise.
22854 * decl2.c (build_expr_from_tree): Likewise.
22855 * error.c (dump_expr): Likewise.
22857 Fri Feb 23 10:36:46 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22859 * except.c (SetTerminate, SetUnexpected): Put back global vars.
22860 (init_exception_processing): Put back decl/init of
22861 set_unexpected_fndecl and set_terminate_fndecl, needed to get the
22862 fns from libstdc++.
22864 * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
22865 (declare_uninstantiated_type_level, uninstantiated_type_level_p):
22867 * cp-tree.h (declare_uninstantiated_type_level,
22868 uninstantiated_type_level_p): Delete prototypes.
22870 Thu Feb 22 19:36:15 1996 Jason Merrill <jason@yorick.cygnus.com>
22872 * pt.c (tsubst_expr): Add default return.
22874 Thu Feb 22 16:47:24 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22876 * error.c (fndecl_as_string): Delete unused arg CNAME.
22877 * sig.c (build_signature_table_constructor,
22878 build_signature_method_call): Fix calls.
22880 * class.c (the_null_vtable_entry): Delete var definition.
22881 (init_class_processing): Delete tree the_null_vtable_entry init.
22882 * decl.c (no_print_{functions, builtins}): Declare as static.
22883 (__tp_desc_type_node): #if 0 var definition.
22884 (init_type_desc): #if 0 init of __tp_desc_type_node.
22885 (vb_off_identifier): Move var decl into init_decl_processing.
22886 (current_function_assigns_this): Declare as static.
22887 (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
22888 (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
22889 Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
22890 * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
22891 * init.c (BI_header_type, BI_header_size): Declare as static.
22892 * pt.c (template_classes): Delete unused var.
22893 (add_pending_template): Delete decl for non-existent fn.
22894 (lookup_template_class): Delete vars CODE and TAG_CODE.
22895 (instantiate_template): Delete unused var TARGS.
22896 * cp-tree.h (vb_off_identifier, current_function_assigns_this):
22898 (__tp_desc_type_node): #if 0 var decl.
22899 (fndecl_as_string): Fix prototype.
22901 Thu Feb 22 15:56:19 1996 Jason Merrill <jason@yorick.cygnus.com>
22903 * tree.def: Add GOTO_STMT.
22904 * pt.c (tsubst_expr): Support goto and labels.
22905 * decl.c (define_label): Support minimal parsing.
22906 * parse.y (simple_stmt): Likewise.
22908 Thu Feb 22 15:30:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22910 * xref.c (GNU_xref_member): Only define/set var I if
22911 XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
22913 (GNU_xref_end_scope): Delete unused fifth arg TRNS.
22914 (GNU_xref_end): Fix call.
22915 * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
22916 * cp-tree.h (GNU_xref_end_scope): Fix prototype.
22918 * tree.c (build_exception_variant): Delete unused vars I, A, T,
22920 (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
22921 (mapcar): Delete unused var CODE.
22922 (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
22923 (break_out_cleanups): Fix call.
22924 (bot_manip): Likewise.
22925 * call.c (build_method_call): Likewise.
22926 * cvt.c (build_up_reference, convert_to_reference, cp_convert):
22928 * typeck.c (unary_complex_lvalue, build_modify_expr,
22929 convert_for_initialization): Likewise.
22930 * typeck2.c (build_functional_cast): Likewise.
22931 * cp-tree.h (build_cplus_new): Fix prototype.
22933 * repo.c (open_repo_file): Delete unused var Q.
22934 (repo_compile_flags, repo_template_declared,
22935 repo_template_defined, repo_class_defined, repo_inline_used,
22936 repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
22937 (repo_get_id, repo_vtable_used): Declare as static.
22938 * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
22941 Thu Feb 22 14:53:35 1996 Jason Merrill <jason@yorick.cygnus.com>
22943 * parse.y (pending_inlines): Add function_try_block case.
22945 * pt.c (unify): Fix for template const parms.
22947 Thu Feb 22 13:24:15 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22949 * lex.c (extract_interface_info): Delete forward decl.
22950 (default_copy_constructor_body, default_assign_ref_body): Delete
22951 decls for non-existent functions.
22952 (synth_firstobj, inline_text_firstobjs): Delete unused vars.
22953 (init_lex): Delete setting them.
22954 (cons_up_default_function): Delete unused vars FUNC_BUF,
22955 FUNC_LEN, and COMPLEX. Delete code setting COMPLEX. Delete old
22956 #if 0'd synth code.
22957 (toplevel, expression_obstack): Delete unused extern decls.
22958 (tree_node_kind): Delete unused enum.
22959 (tree_node_counts, tree_node_sizes): Wrap with #ifdef
22961 (tree_node_kind_names): Delete unused extern decl.
22962 (synth_obstack): Delete unused var.
22963 (init_lex): Don't set it.
22964 (init_parse): Add decl before use.
22965 (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
22966 (current_unit_{name, language}): Delete unused vars.
22967 (check_newline): Don't bother setting them, just accept the #pragma.
22968 * cp-tree.h (init_repo, peek_yylex): Add prototypes.
22969 (current_unit_{name, language}): Delete decls.
22971 * search.c: Wrap all of the memoized functions, macros, and
22972 variables inside #ifdef GATHER_STATISTICS.
22973 (lookup_field, lookup_fnfields): Likewise.
22974 (init_search_processing): Likewise.
22975 (reinit_search_statistics): Wrap whole function.
22976 * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
22978 * decl.c (finish_function): Only call pop_memoized_context if
22979 GATHER_STATISTICS is defined.
22980 (start_function): Likewise for push_memoized_context.
22981 * class.c (pushclass, popclass): Likewise.
22983 * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
22984 * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
22986 * cvt.c (cp_convert): Delete unused local var FORM.
22987 * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
22990 Thu Feb 22 13:19:44 1996 Jason Merrill <jason@yorick.cygnus.com>
22992 * pt.c (do_poplevel): Oops; really return what we get from
22993 poplevel this time.
22995 Thu Feb 22 11:41:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
22997 * cp-tree.h (is_aggr_type): Add prototype.
22999 * cp-tree.h ({push,pop}_cp_function_context): Add decls.
23000 * method.c ({push,pop}_cp_function_context): Delete decls.
23001 * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
23002 (SetUnexpected, SetTerminate): Delete unused vars.
23003 (init_exception_processing): Don't set SetUnexpected or
23004 SetTerminate. Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
23005 (output_exception_table_entry): Delete unused array LABEL.
23006 (expand_internal_throw): Delete unused var PARAMS.
23007 (expand_start_catch_block): Delete unused var CLEANUP.
23008 (emit_exception_table): Delete unused var EH_NODE_DECL.
23009 (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
23010 GOTO_UNWIND_AND_THROW. Don't set them.
23011 (end_eh_unwinder): Add top decl.
23012 (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
23013 (exception_section, push_rtl_perm, do_function_call,
23014 lang_interim_eh, push_eh_cleanup, eh_outer_context,
23015 expand_end_eh_spec, end_eh_unwinder): Declare as static.
23016 (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
23017 throw_used): Likewise.
23018 * cp-tree.h (expand_end_eh_spec): Delete prototype.
23020 * search.c (dfs_mark, dfs_mark_vtable_path,
23021 dfs_unmark_vtable_path, dfs_mark_new_vtable,
23022 dfs_unmark_new_vtable, dfs_clear_search_slot,
23023 dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
23024 bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
23025 bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
23027 (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
23028 n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
23029 n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
23030 Only define #ifdef GATHER_STATISTICS.
23031 (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
23033 (vbase_decl): Delete var definition.
23034 (init_search): Delete old decl.
23035 (init_vbase_pointers): Delete building of VBASE_DECL, since it's
23036 never actually used.
23037 (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
23038 (get_base_distance_recursive): Delete unused fourth arg
23039 BASETYPE_PATH. Fix call .
23040 (get_base_distance): Fix call.
23041 (push_class_decls): Delete unused var ID.
23042 (make_memoized_table_entry): Declare as static.
23043 (breadth_first_search): Declare as static.
23044 (tree_has_any_destructor_p): Declare as static.
23045 (pop_class_decls): Delete unused arg pop_class_decls.
23046 * class.c (popclass): Fix call to pop_class_decls.
23047 * cp-tree.h (make_memoized_table_entry, breadth_first_search,
23048 tree_has_any_destructor_p): Delete prototypes.
23050 * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
23051 (build_t_desc): Fix call. Delete unused vars ELEMS and TT.
23052 (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
23053 (build_user_desc): Delete unused var T.
23054 (build_class_desc): Delete unused vars T and OFF.
23055 (build_t_desc): Delete unused var NAME_STRING.
23056 (build_headof): Make static.
23057 (get_bad_cast_node): Likewise.
23058 (get_def_to_follow): Likewise.
23059 * cp-tree.h (init_type_desc): Add prototype.
23060 (build_headof): Remove prototype.
23062 Thu Feb 22 00:54:22 1996 Jason Merrill <jason@yorick.cygnus.com>
23064 * pt.c (tsubst): Only look for matching decls at file scope for
23065 non-member functions.
23067 * call.c (build_scoped_method_call): Handle scoped destructor
23068 calls in templates.
23070 * decl.c (*_top_level): Also save previous_class_values.
23072 * pt.c (tsubst_expr): Support do {} while loops.
23073 * parse.y (simple_stmt): Likewise.
23074 * tree.def: Likewise.
23076 * method.c (build_overload_identifier): For a class nested in a
23077 template class, don't mangle in the template parms from our
23080 * lex.c, cp-tree.h: Remove support for template instantiations in
23081 the pending_inlines code.
23082 * pt.c: Remove dead functions and unused arguments.
23083 (uses_template_parms): TYPENAME_TYPEs always use template parms.
23084 * parse.y: Stop passing anything to end_template_decl.
23085 * tree.c (print_lang_statistics): Only print tinst info #ifdef
23088 Wed Feb 21 16:57:33 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23090 * init.c (expand_recursive_init{,_1}): Delete decls.
23091 (sort_member_init): Delete unused var INIT.
23092 (emit_base_init): Delete unused var X.
23093 (build_offset_ref): Delete unused var CNAME.
23094 (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
23095 (emit_base_init): Delete unused local var BASE. Delete extern
23096 decl of IN_CHARGE_IDENTIFIER.
23097 (build_delete): Delete unused local var VIRTUAL_SIZE.
23099 * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
23100 (build_delete): Fix call.
23101 * decl2.c (delete_sanity): Likewise.
23102 * cp-tree.h (build_vec_delete): Update prototype.
23104 * typeck.c (common_base_type): Delete unused var TMP.
23105 (build_binary_op): Delete local var ARGS_SAVE.
23106 (build_array_ref): Delete unused var ITYPE.
23107 (c_expand_return): Delete unused var USE_TEMP.
23109 * typeck.c (compexcepttypes): Delete unused arg STRICT.
23110 (comptypes): Fix calls.
23111 * decl.c (duplicate_decls): Likewise.
23112 * cp-tree.h (compexcepttypes): Delete extra arg.
23114 * decl2.c (check_classfn): Delete unused second arg CNAME.
23115 * decl.c (start_decl, grokfndecl): Fix calls.
23116 * init.c (do_friend): Likewise.
23117 * cp-tree.h (check_classfn): Update prototype.
23119 * cp-tree.h (signature_error, import_export_vtable,
23120 append_signature_fields, id_in_current_class, mark_used,
23121 copy_assignment_arg_p): Add decls.
23122 * decl2.c (mark_used): Delete decl.
23124 * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
23126 * class.c (get_vtable_entry): Disable unused function.
23127 (doing_hard_virtuals): Delete unused static global var.
23128 (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
23129 (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
23130 (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
23131 (modify_one_vtable): Delete unused var OLD_RTTI.
23132 (finish_struct_anon): Delete unused vars OFFSET and X.
23133 (finish_struct_bits): Delete unused var METHOD_VEC.
23134 (get_basefndecls): Delete unused var PURPOSE. Delete unused
23135 for-scope local variable METHODS.
23137 * call.c (user_harshness): Delete unused/unneeded arg PARM.
23138 (ideal_candidate): Delete unused args BASETYPE and PARMS.
23139 (build_method_call): Delete unused args passed into ideal_candidate.
23140 (build_overload_call_real): Likewise. Delete unused var OVERLOAD_NAME.
23141 * cp-tree.h (synthesize_method): Add decl.
23143 * decl.c (note_level_for_for): Give void return type.
23144 (pushdecl_nonclass_level): Likewise.
23145 (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
23146 (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
23147 (suspend_binding_level): Delete unused var LEVEL.
23148 (duplicate_decls): Delete unused var CTYPE.
23149 (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
23150 (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
23152 (grokdeclarator): Delete unused var C.
23153 (grokdeclarator): Delete unused var SIZE_VARIES.
23154 (grokparms): Delete unused var SAW_VOID.
23155 (start_function): Delete unused var OLDDECL.
23156 (cplus_expand_expr_stmt): Delete unused var
23157 REMOVE_IMPLICIT_IMMEDIATELY.
23159 * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
23161 * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
23163 Wed Feb 21 00:06:17 1996 Jason Merrill <jason@yorick.cygnus.com>
23165 * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
23166 (build_min_nt): Likewise.
23167 * pt.c (do_pushlevel): Emit line note.
23168 (do_poplevel): Return what we get from poplevel.
23169 (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
23170 * parse.y: Use do_pushlevel and do_poplevel.
23171 * cp-tree.h: Declare do_poplevel.
23173 * cp-tree.h: Declare at_eof.
23174 * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
23175 * decl2.c (import_export_decl): Renamed from import_export_inline.
23176 (finish_file): Call it to do interface handling for statics.
23177 * pt.c (tsubst_copy): Call mark_used on variables and functions
23180 * decl2.c (finish_file): Don't emit statics we can't generate.
23181 * pt.c (instantiate_decl): Don't set interface on instantiations
23184 * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
23185 * tree.c (print_lang_statistics): Print max template depth.
23186 * pt.c (push_tinst_level): Dump entire instantiation context.
23187 (instantiate_class_template): Use it and pop_tinst_level.
23188 (instantiate_decl): Likewise.
23190 * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
23191 pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
23193 Tue Feb 20 18:21:51 1996 Jason Merrill <jason@yorick.cygnus.com>
23195 * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
23196 init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
23197 tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
23198 the new template implementation.
23200 Tue Feb 20 17:14:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23202 * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
23204 Thu Feb 15 18:44:42 1996 Mike Stump <mrs@cygnus.com>
23206 * decl.c (cp_finish_decl): Delay emitting the debug information for
23207 a typedef that has been installed as the canonical typedef, if the
23208 type has not yet been defined.
23210 Thu Feb 15 09:39:08 1996 Jason Merrill <jason@yorick.cygnus.com>
23212 * decl2.c (grokfield): Still call pop_nested_class for access decls.
23214 Wed Feb 14 17:30:04 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23216 * decl.c (lookup_label): Call label_rtx.
23218 * decl.c (make_binding_level): New function.
23219 (pushlevel, pushlevel_class): Call it instead of explicit
23220 duplicate calls to xmalloc.
23222 * decl.c (init_decl_processing): Delete useless build_pointer_type
23225 * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
23226 (sizet_ftype_string): Delete variable.
23227 (init_decl_processing): Add built-in functions fabsf, fabsl,
23228 sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl. New local
23229 variable strlen_ftype, used for strlen.
23231 Wed Feb 14 16:21:25 1996 Jason Merrill <jason@yorick.cygnus.com>
23233 * decl.c (push_to_top_level): Start from current_binding_level
23234 again for now; the stl hacks depend on g++ being broken in this
23235 way, and it'll be fixed in the template rewrite.
23237 * tree.def: Add USING_DECL.
23238 * decl2.c (do_class_using_decl): Implement.
23239 (grokfield): Pass access decls off to do_class_using_decl instead of
23241 * error.c (dump_decl): Handle USING_DECLs.
23242 * decl.c (grokdeclarator): Remove code for handling access decls.
23243 * class.c (finish_struct_1): Adjust accordingly, treat using-decls
23244 as access decls for now.
23245 (finish_struct): Don't check USING_DECLs for other uses of the name.
23247 * search.c (get_matching_virtual): Use cp_error_at.
23249 Wed Feb 14 10:36:58 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23251 * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
23253 (self_promoting_args_p): Move the check that TYPE is non-nil
23254 before trying to look at its main variant.
23255 (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
23257 * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
23259 * init.c (xref_friend, embrace_waiting_friends): Delete functions.
23260 (do_friend): Delete call to xref_friend.
23261 * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
23263 * typeck.c (convert_sequence): #if 0 unused function.
23265 * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
23266 be in decl_in_memory_p.
23267 (decl_in_memory_p): Delete decl.
23268 * expr.c (decl_in_memory_p): Delete fn.
23269 * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
23271 * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
23273 Tue Feb 13 12:51:21 1996 Jason Merrill <jason@yorick.cygnus.com>
23275 * class.c (finish_struct_1): Check for a pure-specifier on a
23276 non-virtual function here.
23278 * decl2.c (grok_function_init): Don't check whether the function
23280 (grokfield): Don't call check_for_override here.
23282 * decl.c (push_to_top_level): Start from inner_binding_level,
23283 check class_shadowed in class levels.
23285 Mon Feb 12 17:46:59 1996 Mike Stump <mrs@cygnus.com>
23287 * decl.c (resume_level): Ignore things that don't have names, instead
23290 Mon Feb 12 15:47:44 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23292 * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
23294 Sat Feb 10 17:59:45 1996 Jason Merrill <jason@yorick.cygnus.com>
23296 * class.c (finish_struct_1): Set DECL_VINDEX properly on a
23299 * parse.y (complete_type_name): Bind global_scope earlier.
23300 (complex_type_name): Likewise.
23301 (qualified_type_name): Remove.
23303 Thu Feb 8 15:15:14 1996 Jason Merrill <jason@yorick.cygnus.com>
23305 * decl.c (grokfndecl): Move code that looks for virtuals in base
23307 * class.c (check_for_override): ... to a new function.
23308 (finish_struct_1): Call it.
23310 * cp-tree.h: Declare warn_sign_compare.
23312 * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
23313 rather than extra_warnings to decide whether to warn about
23314 comparison of signed and unsigned.
23316 * decl2.c (lang_decode_option): Handle warn_sign_compare. -Wall
23317 implies -Wsign-compare. -Wall doesn't imply -W.
23319 Wed Feb 7 15:27:57 1996 Mike Stump <mrs@cygnus.com>
23321 * typeck.c (build_component_ref): Fix to handle anon unions in base
23324 Wed Feb 7 14:29:12 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23326 * class.c (resolves_to_fixed_type_p): Delete code dealing with
23327 a WITH_CLEANUP_EXPR, since we don't generate them any more.
23328 * cvt.c (build_up_reference): Likewise.
23329 * decl.c (grok_reference_init): Likewise.
23330 (cp_finish_decl): Likewise.
23331 * error.c (dump_expr): Likewise.
23332 * tree.c (real_lvalue_p): Likewise.
23333 (lvalue_p): Likewise.
23334 (build_cplus_new): Likewise.
23335 (unsave_expr_now): Likewise.
23336 * typeck.c (unary_complex_lvalue, build_modify_expr,
23337 c_expand_return): Likewise.
23339 Tue Feb 6 13:39:22 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23341 Make the C++ front-end pay attention to attributes for structures.
23342 * class.c (finish_struct): New argument ATTRIBUTES, passed down into
23344 (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
23345 Take out old round_up_size use and setting the DECL_ALIGN possibly
23346 using it. Take out setting of TYPE_ALIGN to round_up_size, which
23347 can override what the attribute set.
23348 * cp-tree.h (finish_struct): Update prototype.
23349 * parse.y (template_instantiate_once): Pass a NULL_TREE for the
23350 attributes to finish_struct.
23351 (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
23352 value down into finish_struct.
23353 * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
23355 Tue Feb 6 13:12:15 1996 Per Bothner <bothner@kalessin.cygnus.com>
23357 * decl.c (poplevel): Re-word dead for local handling.
23358 (pushdecl): Remove useless DECL_DEAD_FOR_LOCAL test.
23359 (cp_finish_decl): If is_for_scope, check for duplicates so
23360 we can disable is_for_scope. Otherwise, preserve_temp_slots.
23362 * lex.c (do_identifier): Use global binding in preference of
23363 dead for local variable.
23365 Mon Feb 5 17:46:46 1996 Mike Stump <mrs@cygnus.com>
23367 * init.c (initializing_context): Handle anon union changes, the
23368 context where fields of anon unions can be initialized now has to be
23369 found by walking up the TYPE_CONTEXT chain.
23371 Fri Feb 2 14:54:04 1996 Doug Evans <dje@charmed.cygnus.com>
23373 * decl.c (start_decl): #ifdef out code to set DECL_COMMON
23374 if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
23375 (obscure_complex_init): If bss is supported, always set
23376 DECL_INITIAL to error_mark_node.
23378 Thu Feb 1 16:19:56 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23380 * init.c (is_friend): Make sure there's a context before we see if
23383 Thu Feb 1 15:44:53 1996 Mike Stump <mrs@cygnus.com>
23385 * init.c (is_friend): Classes are not friendly with nested classes.
23387 Thu Feb 1 15:27:37 1996 Doug Evans <dje@charmed.cygnus.com>
23389 * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
23390 and record its result.
23392 Thu Feb 1 09:27:01 1996 Mike Stump <mrs@cygnus.com>
23394 * class.c (finish_struct_anon): Switch around code to not move anon
23395 union elements around, nor mess up their contexts, nor offsets,
23396 instead we now build up the right number of COMPONENT_REFs for all
23397 the anon unions that may be present at build_component_ref time.
23398 * typeck.c (lookup_anon_field): New routine to handle field lookup
23399 on fields without names. We find them, based upon their unique type
23401 * typeck.c (build_component_ref): Allow FIELD_DECL components.
23402 Handle finding components in anonymous unions, and ensure that a
23403 COMPONENT_REF is built for each level as necessary.
23405 Tue Jan 30 18:18:23 1996 Mike Stump <mrs@cygnus.com>
23407 * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
23408 code that ensures that copy ctors are used if appropriate.
23410 Tue Jan 30 17:35:14 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23412 * init.c (build_vec_delete): Only give an error if base isn't an
23415 Mon Jan 29 17:09:06 1996 Mike Stump <mrs@cygnus.com>
23417 * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
23418 (yylex): If we see `new', keep slurping.
23420 Thu Jan 25 18:31:36 1996 Mike Stump <mrs@cygnus.com>
23422 * class.c (finish_struct_1): Move code for handling anon unions...
23423 (finish_struct_anon): to here. Fixup so that we do the offset
23424 calculations right, and so that the fields are physically moved to
23425 the containers's chain.
23427 Thu Jan 25 18:27:37 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23429 * decl.c (grokdeclarator): Avoid trying to get an operand off an
23432 Wed Jan 24 11:25:30 1996 Jim Wilson <wilson@chestnut.cygnus.com>
23434 * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
23435 POINTER_SIZE to agree with expr.c.
23437 Thu Jan 25 13:01:23 1996 Mike Stump <mrs@cygnus.com>
23439 * search.c (lookup_field): Don't report ambiguities if protect is 0,
23440 instead return NULL_TREE.
23442 Wed Jan 24 13:01:26 1996 Mike Stump <mrs@cygnus.com>
23444 * class.c (finish_struct_1): Call warn_hidden if we want warnings
23445 about overloaded virtual functions.
23446 (warn_hidden): New routine to warn of virtual functions that are
23447 hidden by other virtual functions, that are not overridden.
23448 (get_basefndecls): New routine, used by warn_hidden.
23449 (mark_overriders): New routine, used by warn_hidden.
23450 * search.c (get_matching_virtual): Remove old warning that just
23453 Tue Jan 23 12:26:10 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23455 * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
23457 * typeck.c (null_ptr_cst_p): Delete unused fn.
23458 (build_function_call_maybe): Delete unused fn.
23460 * expr.c (extract_init): #if 0 the code after unconditional return 0
23463 Delete old cadillac code.
23464 * edsel.c: Remove file.
23465 * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
23466 * Makefile.in (CXX_OBJS): Delete edsel.o.
23467 (edsel.o): Delete rule.
23468 * cp-tree.h (flag_cadillac): Delete var decl.
23469 * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
23470 * decl2.c (flag_cadillac): Delete var definition.
23471 (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
23472 (grokfield): Delete code depending on flag_cadillac.
23473 (finish_anon_union): Likewise.
23474 * class.c (finish_struct_1): Likewise.
23475 (pushclass): Likewise.
23476 (popclass): Likewise.
23477 (push_lang_context): Likewise.
23478 (pop_lang_context): Likewise.
23479 * decl.c (init_decl_processing): Likewise.
23480 (start_decl): Likewise.
23481 (cp_finish_decl): Likewise.
23482 (xref_tag): Likewise.
23483 (finish_enum): Likewise.
23484 (start_function): Likewise.
23485 (finish_function): Likewise.
23486 (finish_stmt): Likewise.
23487 * lex.c (lang_init): Likewise.
23488 (check_newline): Likewise.
23490 * lex.c (do_pending_inlines): Delete synthesized method kludge.
23492 Delete defunct, ancient garbage collection implementation.
23493 * rtti.c: New file with the RTTI stuff from gc.c.
23494 * gc.c: Removed file (moved the remaining stuff into rtti.c).
23495 * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
23496 (rtti.o): New rule, replacing gc.o.
23497 * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
23498 * cp-tree.h: Delete gc-related fn decls.
23499 (DECL_GC_OFFSET): Delete macro.
23500 (flag_gc): Delete extern decl.
23501 * decl.c (current_function_obstack_index): Delete var decl.
23502 (current_function_obstack_usage): Delete var decl.
23503 (start_function): Delete clearing of current_function_obstack_index
23504 and current_function_obstack_usage.
23505 (init_decl_processing): Delete code relying on -fgc.
23506 Delete call to init_gc_processing.
23507 (cp_finish_decl): Delete calls to build_static_gc_entry and
23508 type_needs_gc_entry. Delete gc code setting DECL_GC_OFFSET.
23509 (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
23510 and to expand_expr of a __gc_main call.
23511 (maybe_gc_cleanup): Delete var decl.
23512 (finish_function): Delete call to expand_gc_prologue_and_epilogue.
23513 * decl2.c (flag_gc): Delete var decl.
23514 (lang_f_options): Delete offering of -fgc.
23515 (lang_decode_option): Delete -fgc and -fno-gc handling.
23516 (get_temp_regvar): Delete gc code.
23517 * init.c (build_new): Delete gc code.
23518 * lex.c (init_lex): Delete checking of flag_gc.
23520 * typeck.c (convert_arguments): Delete gc code.
23521 (build_component_addr): Delete -fgc warning.
23522 (build_modify_expr): Delete gc code.
23524 * decl2.c (build_push_scope): Delete fn.
23525 * cp-tree.h (build_push_scope): Delete decl.
23527 * search.c (clear_search_slots): Delete fn.
23528 * cp-tree.h (clear_search_slots): Delete decl.
23530 * search.c (tree_needs_constructor_p): Delete fn.
23531 * cp-tree.h (tree_needs_constructor_p): Delete decl.
23533 * tree.c (id_cmp): Delete fn.
23535 * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
23536 * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
23538 * tree.c (decl_value_member): Delete fn.
23539 * cp-tree.h (decl_value_member): Delete decl.
23541 * tree.c (list_hash_lookup_or_cons): Delete fn.
23542 * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
23544 * method.c (cplus_exception_name): Delete fn.
23545 (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
23547 * spew.c (shift_tokens): Delete fn.
23549 Mon Jan 22 17:49:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23551 * except.c (init_exception_processing): Pass 1 to needs_pop in calls
23553 * parse.y: Likewise.
23555 Mon Jan 22 17:34:29 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23557 * tree.c (build_cplus_staticfn_type): Delete function definition;
23559 * cp-tree.h (build_cplus_staticfn_type): Delete decl.
23561 * tree.c (virtual_member): Delete function definition; never used.
23562 * cp-tree.h (virtual_member): Delete decl.
23564 Fri Jan 19 18:03:14 1996 Mike Stump <mrs@cygnus.com>
23566 * typeck.c (build_component_ref): Handle getting vbase pointers
23567 out of complex multiple inheritance better.
23569 Fri Jan 19 16:27:40 1996 Mike Stump <mrs@cygnus.com>
23571 * typeck.c (build_object_ref): Make sure we use the real type, not
23572 any reference type.
23574 Fri Jan 19 16:01:47 1996 Mike Stump <mrs@cygnus.com>
23576 * tree.c (build_exception_variant): Don't create new types if we
23577 don't have to, also build new types on the right obstack.
23579 Fri Jan 19 14:09:44 1996 Jason Merrill <jason@yorick.cygnus.com>
23581 * decl.c (store_bindings): Split out from push_to_top_level.
23582 (push_to_top_level): Call it for b->type_shadowed on class binding
23585 Fri Jan 19 13:53:14 1996 Mike Stump <mrs@cygnus.com>
23587 * search.c (expand_upcast_fixups): Fix so that offsets stored in
23588 vbase_offsets are always right. Fixes a problem where virtual base
23589 upcasting and downcasting could be wrong during conversions on this
23590 during virtual function dispatch at ctor/dtor time when dynamic
23591 vtable fixups for deltas are needed. This only sounds easier than
23593 (fixup_virtual_upcast_offsets): Change to reflect new calling
23594 convention for expand_upcast_fixups.
23596 Fri Jan 19 12:23:08 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23598 * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
23599 check that it's usable as the bitfield width.
23601 Wed Jan 17 21:22:40 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23603 * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
23604 Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
23605 only ever used for functions in it.
23607 Wed Jan 17 12:10:38 1996 Jason Merrill <jason@yorick.cygnus.com>
23609 * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
23610 (nested_type): Likewise.
23611 (nested_name_specifier): Use lastiddecl.
23613 * decl.c (grokdeclarator): Adjust accordingly.
23614 * init.c (expand_member_init): Likewise.
23615 * parse.y (base_class): Likewise.
23616 * typeck2.c (build_functional_cast): Likewise.
23618 * typeck2.c (build_functional_cast): Fill in name after we've
23619 checked for non-aggr type.
23621 Wed Jan 17 10:18:01 1996 Mike Stump <mrs@cygnus.com>
23623 * decl2.c (warn_pointer_arith): Default to on.
23625 Tue Jan 16 12:45:38 1996 Jason Merrill <jason@yorick.cygnus.com>
23627 * lex.c (is_rid): New function.
23628 * decl.c (grokdeclarator): Diagnose reserved words used as
23631 Tue Jan 16 11:39:40 1996 Jason Merrill <jason@yorick.cygnus.com>
23633 * tree.c (get_decl_list): Don't lose cv-quals.
23635 * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
23636 typespecs used as declarator-ids.
23638 Tue Jan 16 11:09:42 1996 Mike Stump <mrs@cygnus.com>
23640 * decl.c (poplevel): When poping a level, don't give a warning for
23641 any subblocks that already exist.
23643 Tue Jan 16 00:25:33 1996 Jason Merrill <jason@yorick.cygnus.com>
23645 * typeck.c (build_object_ref): Finish what I started.
23647 * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
23649 * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
23651 * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
23654 Mon Jan 15 16:19:32 1996 Jason Merrill <jason@yorick.cygnus.com>
23656 * decl.c (xref_tag): Handle passing a type in directly.
23658 * parse.y (qualified_type_name): Pull out the type.
23659 (nested_type): Likewise.
23660 Take types directly instead of as identifiers.
23661 * call.c (build_scoped_method_call): Take types directly instead of
23663 * decl.c (xref_basetypes): Likewise.
23664 * init.c (expand_member_init): Likewise.
23665 (build_member_call): Likewise.
23666 (build_offset_ref): Likewise.
23667 * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
23668 * method.c (do_build_assign_ref): Likewise.
23669 * decl.c (grokdeclarator): Handle a type appearing as the
23670 declarator-id for constructors.
23671 * method.c (do_build_copy_constructor): current_base_init_list now
23672 uses the types directly, not their names.
23673 * init.c (sort_base_init): Likewise.
23674 (expand_member_init): Likewise.
23675 * init.c (is_aggr_type): New function, like is_aggr_typedef.
23677 Mon Jan 15 08:45:01 1996 Jeffrey A Law <law@cygnus.com>
23679 * tree.c (layout_basetypes): Call build_lang_field_decl instead
23680 of build_lang_decl if first arg is a FIELD_DECL.
23682 Thu Jan 11 14:55:07 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23684 * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
23686 * except.c (expand_start_catch_block): Set TREE_USED to avoid
23687 warnings about the catch handler.
23689 Mon Jan 8 17:35:12 1996 Jason Merrill <jason@yorick.cygnus.com>
23691 * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
23692 expand_target_expr.
23694 Thu Jan 4 12:30:32 1996 Brendan Kehoe <brendan@lisa.cygnus.com>
23696 Fix access control to use trees rather than integers.
23697 * class.c (access_{default, public, protected, private,
23698 default_virtual, public_virtual, private_virtual}_node): Add
23700 (init_class_processing): Do creation of those nodes.
23701 * cp-tree.h (access_type): Delete enum decl.
23702 (access_{default, public, protected, private, default_virtual,
23703 public_virtual, private_virtual}_node): Add decls.
23704 (compute_access): Change return type.
23705 * search.c (compute_access): Have tree return type, instead of enum.
23706 (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
23707 * lex.c (real_yylex): Use yylval.ttype for giving the value of the
23708 access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
23709 * parse.y (VISSPEC): Make ttype rather than itype.
23710 (base_class_access_list): Likewise.
23711 * *.[cy]: Change all refs of `access_public' to `access_public_node',
23713 * call.c (build_method_call): Make ACCESS be a tree.
23714 * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
23715 * cvt.c (convert_to_aggr): Likewise.
23716 * init.c (build_offset_ref, resolve_offset_ref, build_delete):
23718 * method.c (hack_identifier): Likewise.
23719 * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
23721 Thu Jan 4 11:02:20 1996 Mike Stump <mrs@cygnus.com>
23723 * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
23724 frontend, and make it more consistent with respect to
23725 warn_pointer_arith.
23727 Tue Jan 2 00:13:38 1996 Rusty Russell <rusty@adelaide.maptek.com.au>
23729 * decl.c (pushdecl): Check for duplicate parameter names.
23731 Wed Jan 3 09:25:48 1996 Mike Stump <mrs@cygnus.com>
23733 * decl.c (expand_static_init): Call assemble_external for atexit.
23735 Wed Jan 3 07:55:19 1996 Mike Stump <mrs@cygnus.com>
23737 * except.c (do_unwind): Remove some generated dead code.
23738 (eh_outer_context): New routine, factor out some common code from
23739 expand_builtin_throw and end_eh_unwinder. Add code to do return
23740 address masking for the PA.
23741 (expand_builtin_throw): Use eh_outer_context instead of open coding
23743 (end_eh_unwinder): Likewise.
23745 Tue Jan 2 17:00:56 1996 Mike Stump <mrs@cygnus.com>
23747 * except.c (expand_throw): Call assemble_external for __empty, if we
23750 Thu Dec 28 11:13:15 1995 Mike Stump <mrs@cygnus.com>
23752 * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
23753 NORMAL_RETURN_ADDR_OFFSET.
23754 (end_eh_unwinder): Likewise.
23756 Wed Dec 27 22:18:16 1995 Mike Stump <mrs@cygnus.com>
23758 * gc.c (build_dynamic_cast): Make sure we don't cast away const
23759 when dealing with references, and make sure we handle dynamic
23760 casting to a cv qualified reference.
23762 Thu Dec 21 23:50:35 1995 Mike Stump <mrs@cygnus.com>
23764 * except.c (struct eh_context): New structure top hold eh context
23766 (push_eh_context): New routine.
23767 (pop_eh_context): Likewise.
23768 * decl.c (push_cp_function_context): Use them.
23769 (pop_cp_function_context): Likewise.
23771 Wed Dec 20 12:42:51 1995 Jason Merrill <jason@yorick.cygnus.com>
23773 * decl2.c (finish_file): Also prune uninteresting functions in the
23774 inline emission loop.
23776 Wed Dec 20 02:32:07 1995 Jeffrey A Law <law@cygnus.com>
23778 * sig.c (build_signature_table_constructor): Mark functions
23779 in the signature as referenced.
23781 Tue Dec 19 22:36:56 1995 Jason Merrill <jason@yorick.cygnus.com>
23783 * decl2.c (finish_file): Do all the vtable/synthesis stuff before
23784 the inline emission stuff.
23786 Mon Dec 18 15:51:33 1995 Jason Merrill <jason@yorick.cygnus.com>
23788 * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
23790 * lang-options.h: Add -f{no-,}weak.
23791 * decl.c (init_decl_processing): If the target does not support weak
23792 symbols, don't use them.
23793 * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
23795 Sun Dec 17 21:13:23 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
23797 * init.c (expand_member_init): warning for base init after members.
23799 Fri Dec 15 15:32:18 1995 Jason Merrill <jason@yorick.cygnus.com>
23801 * cvt.c (build_expr_type_conversion): Don't convert to a reference
23804 Thu Dec 14 16:05:58 1995 Mike Stump <mrs@cygnus.com>
23806 * method.c (report_type_mismatch): Improve wording for volatile
23809 Thu Dec 14 14:16:26 1995 Mike Stump <mrs@cygnus.com>
23811 * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
23812 expand_assignment, as the later doesn't handle things that have
23813 copy constructors well. The compiler would do bitwise copying,
23814 instead of ctor calling in some cases.
23816 Wed Dec 13 17:05:54 1995 Paul Eggert <eggert@twinsun.com>
23818 * g++.c (my_strerror): Return "cannot access" if errno is 0.
23819 (pfatal_with_name, perror_exec): Don't assume that
23820 the returned value from my_strerror contains no '%'s.
23822 (sys_nerror): Declare only if HAVE_STRERROR is not defined.
23824 Wed Dec 13 16:22:38 1995 Jason Merrill <jason@yorick.cygnus.com>
23826 Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
23827 TYPE_METHODS/TREE_CHAIN mean what they used to.
23828 * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
23829 instead of TYPE_METHODS.
23830 * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
23831 * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
23832 * cp-tree.h (CLASSTYPE_METHODS): Lose.
23833 (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
23835 (struct lang_decl): Lose next_method field.
23836 (DECL_NEXT_METHOD): Lose.
23837 * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
23838 (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
23840 (finish_struct_methods): Don't mess with the TREE_CHAINs in
23843 * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
23846 * call.c (build_method_call): Synthesize here even when not inlining.
23847 * typeck.c (build_function_call_real): Likewise.
23849 Wed Dec 13 15:02:39 1995 Ian Lance Taylor <ian@cygnus.com>
23851 * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
23852 == DBX_DEBUG, call dbxout_start_new_source_file and
23853 dbxout_resume_previous_source_file when appropriate.
23855 Tue Dec 12 20:38:55 1995 Mike Stump <mrs@cygnus.com>
23857 * except.c (start_anon_func): Push to the top level.
23858 (end_anon_func): Pop from the top level.
23860 Mon Dec 11 18:56:14 1995 Mike Stump <mrs@cygnus.com>
23862 * cp-tree.h (build_cleanup): New routine to build cleanups.
23863 * decl.c (expand_static_init): Use build_cleanup to build a cleanup
23864 call at ctor time and use atexit to run it later.
23865 * decl2.c (build_cleanup): New routine, taken from finish_file.
23866 (finish_file): Use build_cleanup instead, and don't put function
23867 local statics in global dtor list.
23869 Wed Dec 6 14:34:29 1995 Mike Stump <mrs@cygnus.com>
23871 * except.c (expand_throw): Ensure that we have cleanups, if we try
23872 and expand cleanups.
23874 Wed Dec 6 11:48:21 1995 Mike Stump <mrs@cygnus.com>
23876 * except.c (expand_throw): Add logic to manage dynamic cleanups for
23878 (expand_end_catch_block): Use the magic of expand_goto, instead of
23879 emit_jump so that we get the cleanup for any catch clause parameter
23880 and the cleanup for the exception object. Update to reflect label
23882 (push_eh_cleanup): New routine to register a cleanup for an
23884 (empty_fndecl): Used to default cleanup actions to
23886 (init_exception_processing): Setup empty_fndecl. Setup
23888 (expand_start_catch_block): Update to reflect label changes. Call
23889 push_eh_object to register the cleanup for the EH object.
23890 (start_anon_func): New routine to start building lambda expressions
23892 (end_anon_func): New routine to end them.
23893 (struct labelNode): Change so that we can use tree labels, or rtx
23895 (saved_cleanup): Object to check for dynamic cleanups for the
23896 exception handling object.
23897 (push_label_entry): Change so that we can use tree labels, or rtx
23899 (pop_label_entry): Likewise.
23900 (top_label_entry): Likewise.
23901 (expand_start_all_catch): Use tree label instead of rtx label, so
23902 that we can get the magic of expand_goto.
23903 (expand_end_all_catch): Update to reflect label changes.
23905 * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
23907 * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
23908 building_cleanup logic, as we now use UNSAVE_EXPRs.
23909 * cp-tree.h (unsave_expr): Declare it.
23910 * decl.c (building_cleanup): Remove.
23911 (maybe_build_cleanup): Remove building_cleanup logic, and use
23912 UNSAVE_EXPR instead.
23914 Sun Dec 3 01:34:58 1995 Mike Stump <mrs@cygnus.com>
23916 * gc.c (build_t_desc): Update error message to say <typeinfo>.
23918 Thu Nov 30 12:30:05 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
23920 * decl.c (pushdecl): Only warn about shadowing a local variable if
23921 warn_shadow is true.
23923 Sun Nov 26 16:06:55 1995 Rusty Russell <rusty@adelaide.maptek.com.au>
23925 * typeck.c (build_binary_op_nodefault): Added warning about
23926 comparisons between different enum types with -Wall, unless
23927 -fenum-int-equiv set.
23929 Wed Nov 22 15:44:02 1995 Mike Stump <mrs@cygnus.com>
23931 * class.c (finish_struct_1): Skip down to the inner type in
23932 multidimensional arrays. Ensures ctors will be made for types that
23935 Wed Nov 22 14:19:22 1995 Mike Stump <mrs@cygnus.com>
23937 * decl.c (last_dtor_insn): New to track the last compiler generated
23939 (store_parm_decls): Set it.
23940 (finish_function): Use it to see if the dtor is empty. Avoid doing
23941 vtable setup all the time, if we can.
23942 (struct cp_function): Add last_dtor_insn.
23943 (push_cp_function_context): Save it.
23944 (pop_cp_function_context): Restore it.
23946 Wed Nov 22 11:52:19 1995 Paul Russell <Rusty.Russell@adelaide.maptek.com.au>
23948 * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
23951 Tue Nov 21 17:15:23 1995 Mike Stump <mrs@cygnus.com>
23953 * typeck.c (expand_target_expr): Make sure targets get put into the
23954 current temp_slot_level, so that the free_temp_slots call will reuse
23957 Tue Nov 21 13:32:03 1995 Mike Stump <mrs@cygnus.com>
23959 * class.c (finish_struct_1): Delay delta fixups for virtual bases
23960 until after we have done the hard virtuals, to avoid a bogus `every
23961 virtual function must have a unique final overrider' for virtual
23962 functions that are only overridden by hard virtuals.
23964 Thu Nov 9 13:35:30 1995 Jason Merrill <jason@yorick.cygnus.com>
23966 * pt.c (do_function_instantiation): Don't try to find a file-scope
23967 template for a member function.
23969 Tue Nov 14 06:20:35 1995 Mike Stump <mrs@cygnus.com>
23971 * g++.c (main): Add handling of -nodefaultlibs.
23973 Mon Nov 13 15:45:34 1995 Mike Stump <mrs@cygnus.com>
23975 * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
23976 distinguish between direct bindings of reference variables, and
23977 indirect bindings of reference variables.
23978 * cvt.c (build_up_reference): Use it.
23979 * typeck.c (convert_arguments): Use it to indicate this is an
23981 * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
23982 as they are unused.
23983 (expand_static_init): Likewise.
23984 (cplus_expand_expr_stmt): Likewise.
23985 * decl2.c (finish_file): Likewise.
23986 * init.c (perform_member_init): Likewise.
23987 (emit_base_init): Likewise.
23988 (expand_aggr_vbase_init_1): Likewise.
23990 Fri Nov 10 09:18:09 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
23992 * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
23993 get a DECL_LANG_SPECIFIC node.
23994 * cp-tree.h (lang_decl_flags): Add new member `level'.
23995 (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
23996 decl_flags level member.
23998 Mon Nov 6 18:36:13 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24000 * call.c (build_method_call): Make sure instance has a
24001 TYPE_LANG_SPECIFIC node before we dive into it.
24003 Sat Nov 4 20:01:52 1995 Jason Molenda <crash@phydeaux.cygnus.com>
24005 * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
24007 Thu Nov 2 17:56:57 1995 Mike Stump <mrs@cygnus.com>
24009 * decl.c (duplicate_decls): When smashing decls, smash staticness in
24012 Thu Nov 2 16:44:02 1995 Mike Stump <mrs@cygnus.com>
24014 * decl.c (poplevel): Handle the merging of subblocks of cleanups
24015 when finishing blocks that have already been created (usually due to
24016 the fixup goto code). Fixes bad debugging information.
24018 Wed Nov 1 12:33:53 1995 Jason Merrill <jason@yorick.cygnus.com>
24020 * method.c (hack_identifier): Don't abort when we get a TREE_LIST
24021 that's not a list of overloaded functions.
24023 Wed Nov 1 11:38:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24025 * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
24026 before trying to use DECL_ABSTRACT_VIRTUAL_P.
24028 Tue Oct 31 11:56:55 1995 Jason Merrill <jason@yorick.cygnus.com>
24030 * decl2.c (mark_used): New function for hooking into setting of
24031 TREE_USED on decls.
24032 * call.c (build_method_call): Use it.
24033 * class.c (instantiate_type): Likewise.
24034 * init.c (build_offset_ref): Likewise. Don't call assemble_external
24035 for all like-named functions.
24036 * method.c (hack_identifier): Likewise.
24037 (emit_thunk): Don't call assemble_external.
24038 (make_thunk): Create thunk as a FUNCTION_DECL so that it
24039 gets the right mode and ENCODE_SECTION_INFO works.
24041 * parse.y: Use mark_used. Pass operator names to do_identifier.
24042 * lex.c (do_identifier): Handle operator names.
24044 * decl2.c (grokclassfn): Tweak __in_chrg attributes.
24046 Thu Oct 26 16:45:58 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24048 * errfn.c: Include stdio.h.
24049 (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
24051 Wed Oct 25 18:58:41 1995 Mike Stump <mrs@cygnus.com>
24053 * typeck2.c (digest_init): Always convert initializers to the
24056 Wed Oct 25 13:25:24 1995 Mike Stump <mrs@cygnus.com>
24058 * init.c (member_init_ok_or_else): Don't allow member initializers
24059 for indirect members, as it is invalid.
24061 Wed Oct 25 11:35:28 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24063 * decl.c (grokdeclarator): Don't allow `friend signed ()'.
24065 Fri Oct 20 10:30:59 1995 Mike Stump <mrs@cygnus.com>
24067 * parse.y (for.init.statement): Catch compound statements inside for
24068 initializations, if we're being pedantic.
24070 Fri Oct 20 10:03:42 1995 Mike Stump <mrs@cygnus.com>
24072 * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
24075 Thu Oct 19 14:26:10 1995 Mike Stump <mrs@cygnus.com>
24077 * error.c (dump_expr): Don't core dump when a boolean expression is
24078 used as a default argument.
24080 Thu Oct 19 10:36:30 1995 Jason Merrill <jason@yorick.cygnus.com>
24082 * class.c (finish_struct_bits): Check aggregate_value_p instead of
24085 Wed Oct 18 18:12:32 1995 Jason Merrill <jason@yorick.cygnus.com>
24087 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
24088 BLKmode type that would otherwise be returned in registers.
24090 Mon Oct 16 12:32:19 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24092 * g++.c (WITHLIBC): New macro.
24093 (main): Declare saw_libc. Use WITHLIBC if `-lc' was used; set
24094 saw_libc and pass it at the end if it was set.
24096 Wed Oct 11 16:30:34 1995 Brendan Kehoe <brendan@lisa.cygnus.com>
24098 * parse.y (fn.def1): Call split_specs_attrs in
24099 declmods notype_declarator case.