optimize.c: Include hashtab.h.
[gcc.git] / gcc / cp / ChangeLog
1 2001-04-24 Zack Weinberg <zackw@stanford.edu>
2
3 * cp/optimize.c: Include hashtab.h.
4 (struct inline_data): Add tree_pruner.
5 (expand_call_inline, expand_calls_inline): Use it when calling
6 walk_tree.
7 (optimize_function): Initialize and free tree_pruner.
8
9 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
10
11 Lazy __FUNCTION__ generation.
12 * cp-tree.def (FUNCTION_NAME): Remove.
13 * cp-tree.h (function_name_declared_p): Remove.
14 (cp_fname_init): Prototype.
15 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
16 don't call declare_function_name. Call start_fname_decls.
17 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
18 clobber the line number.
19 (cp_fname_init): New function.
20 (start_function): Call start_fname_decls.
21 (finish_function): Call finish_fname_decls.
22 * lex.c (reswords): Add slots for __FUNCTION__ et al.
23 (rid_to_yy): Add mappings for __FUNCTION__ et al.
24 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
25 * parse.y (VAR_FUNC_NAME): New token.
26 (primary): Add VAR_FUNC_NAME.
27 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
28 generation.
29 (tsubst, FUNCTION_NAME case): Remove.
30 (tsubst_copy, FUNCTION_NAME case): Remove.
31 (tsubst_expr, DECL_STMT case): Be careful with a
32 DECL_PRETTY_FUNCTION_P.
33 (instantiate_decl): Remove function_name_declared_p.
34 * semantics.c (begin_compound_statement): Don't call
35 declare_function_name here.
36 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
37 (finish_translation_unit): Call finish_fname_decls.
38 (expand_body): Remove function_name_declared_p.
39 * typeck2.c (digest_init): Allow any ERROR_MARK.
40
41 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
42
43 * pt.c (tsubst_decl): Use VOID_TYPE_P.
44 * semantics.c: Fix some typos.
45
46 2001-04-23 Phil Edwards <pme@sources.redhat.com>
47
48 * cp/decl2.c (flag_honor_std): Always initialize to 1.
49
50 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
51
52 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
53
54 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
55
56 * except.c (build_throw): Wrap the initialization of the exception
57 object in a MUST_NOT_THROW_EXPR.
58 (do_free_exception): #if 0.
59
60 2001-04-20 Mark Mitchell <mark@codesourcery.com>
61
62 * cp-tree.h (finish_enum): Change prototype.
63 * decl.c (finish_enum): Reorganize.
64 * parse.y (structsp): Adjust calls to finish_enum.
65
66 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
67
68 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
69 't' case.
70
71 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
72
73 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
74 (layout_empty_base): Return at end flag.
75 (build_base_field): Likewise.
76 (build_base_fields): Likewise.
77 (layout_virtual_bases): Don't add 1 to eoc value.
78 (end_of_class): Use full size for empty bases.
79 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
80 empty bases. Don't add 1 to eoc value. Only add trailing padding
81 if we're an empty class with no empty bases.
82 (dump_class_hierarchy): Dump size and alignment.
83
84 2001-04-20 Jakub Jelinek <jakub@redhat.com>
85
86 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
87 ICS_BAD_FLAG.
88
89 2001-04-20 Jakub Jelinek <jakub@redhat.com>
90
91 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
92 is found, look first if name does not match the structure name.
93
94 2001-04-19 Mark Mitchell <mark@codesourcery.com>
95
96 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
97 set.
98 (SET_DECL_LANGUAGE): New macro.
99 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
100 (pushdecl): Likewise.
101 (build_library_fn_1): Likewise.
102 (build_cp_library_fn): Likewise.
103 (grokfndecl): Likewise.
104 (grokvardecl): Mark `extern "C"' variables as having C linkage.
105 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
106 * lex.c (retrofit_lang_decl): Likewise.
107 * mangle.c (mangle_decl_string): Don't mangle the names of
108 variables declared with C language linkage.
109 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
110
111 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
112
113 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
114 flag_access_control from uninitialized storage.
115
116 2001-04-15 Mark Mitchell <mark@codesourcery.com>
117
118 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
119 * mangle.c (write_pointer_to_member_type): Fix mangling of
120 pointers to cv-qualified member function types.
121
122 * init.c (build_delete): Create a SAVE_EXPR for the address if
123 we're going to use it more than once.
124
125 2001-04-13 Mark Mitchell <mark@codesourcery.com>
126
127 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
128 (expand_ptremfunc_cst): Change prototype.
129 (delta2_from_ptrmemfunc): Remove.
130 * expr.c (cplus_expand_constant): Adjust call to
131 expand_ptrmemfunc_cst.
132 * typeck.c (build_ptrmemfunc1): Simplify.
133 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
134 results in a constant.
135 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
136 (delta2_from_ptrmemfunc): Remove.
137 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
138
139 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
140
141 * cp-tree.h (decl_namespace_list): New macro.
142 (struct saved_scope): Add decl_ns_list.
143 * decl.c (mark_saved_scope): Mark it.
144 * decl2.c: Lose static decl_namespace_list.
145 (init_decl2): Don't save it.
146
147 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
148
149 * cp-tree.h (warn_return_type, yylex): Delete redundant
150 declarations.
151
152 * decl.c (current_class_depth, global_namespace): Likewise.
153
154 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
155
156 * repo.c (flag_use_repository): Likewise.
157
158 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
159
160 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
161 set_block, pushdecl, getdecls, gettags, init_decl_processing,
162 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
163 lvalue_or_else, print_lang_statistics, comp_target_types,
164 unsigned_type, signed_type, signed_or_unsigned_type,
165 build_function_call, mark_addressable, incomplete_type_error):
166 Delete redundant declarations.
167
168 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
169
170 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
171 (TYPE_ANONYMOUS_P): New macro.
172 (TAGGED_TYPE_P): New macro.
173 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
174 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
175 * tree.c (no_linkage_helper): Likewise.
176 * semantics.c (begin_class_definition): Likewise.
177 * pt.c (convert_template_argument): Likewise.
178 * lex.c (check_for_missing_semicolon): Likewise.
179
180 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
181
182 * class.c (dfs_unshared_virtual_bases): New function.
183 (mark_primary_bases): Call it.
184 (check_bases): Ignore virtual bases when determining
185 nearly-emptiness.
186
187 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
188
189 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
190
191 2001-04-11 Mark Mitchell <mark@codesourcery.com>
192
193 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
194 cloned function to the clone.
195
196 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
197
198 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
199
200 * semantics.c: Include expr.h.
201
202 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
203
204 * method.c (implicitly_declare_fn): Commonize code for copy ctor
205 and assignment op. Set TREE_USED for parameter.
206
207 2001-04-10 Mark Mitchell <mark@codesourcery.com>
208
209 * class.c (find_final_overrider_data): Add `candidates'.
210 (dfs_find_final_overrider): Don't issue error messages
211 prematurely.
212 (find_final_overrider): Issue error messages here.
213 (build_base_field): Don't warn about amgibuous direct bases here.
214 (warn_about_ambiguous_direct_bases): New function.
215 (layout_class_type): Use it.
216
217 2001-04-10 Richard Henderson <rth@redhat.com>
218
219 * typeck.c (build_array_ref): Push the array reference inside
220 COMPOUND_EXPR and COND_EXPR.
221
222 2001-04-05 Mark Mitchell <mark@codesourcery.com>
223
224 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
225 * decl.c (duplicate_decls): Adjust accordingly.
226 (maybe_commonize_var): Likewise.
227 (grokfndecl): Likewise.
228 (start_function): Likewise.
229 (start_method): Likewise.
230 * decl2.c (key_method): Likewise.
231 (import_export_decl): Likewise.
232 * method.c (implicitly_declare_fn): Likewise.
233 * optimize.c (maybe_clone_body): Likewise.
234
235 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
236
237 * lang-specs.h: Add __DEPRECATED.
238
239 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
240
241 * search.c (get_dynamic_cast_base_type): When building a new
242 constant, set its type to ssizetype.
243
244 2001-04-04 Jakub Jelinek <jakub@redhat.com>
245
246 * optimize.c (expand_call_inline): Only add newly inlined statements
247 into inlined_stmts.
248
249 2001-04-03 Mark Mitchell <mark@codesourcery.com>
250
251 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
252 (OPERATOR_FORMAT): Likewise.
253 (OPERATOR_TYPENAME_FORMAT): Likewise.
254 * operators.def: Remove old name-mangling information.
255 * decl.c (grok_op_properties): Adjust accordingly.
256 * lex.c (init_operators): Likewise.
257 * rtti.c (get_tinfo_decl): Issue error messages about types that
258 have variable size.
259
260 2001-04-03 Mark Mitchell <mark@codesourcery.com>
261
262 * decl2.c (import_export_decl): Don't call import_export_class
263 when processing an inline member function.
264 * semantics.c (expand_body): Call import_export_decl before
265 emitting inline functions.
266
267 2001-03-28 Richard Henderson <rth@redhat.com>
268
269 IA-64 ABI Exception Handling:
270 * cp-tree.def (EH_SPEC_BLOCK): New.
271 (MUST_NOT_THROW_EXPR): New.
272 * cp-tree.h: Update changed function declarations.
273 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
274 (CPTI_CALL_UNEXPECTED): New.
275 (struct cp_language_function): Rename x_eh_spec_try_block
276 to x_eh_spec_block.
277 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
278 * decl.c (current_binding_level): If no current function
279 bindings, revert to scope_chain.
280 (initialize_predefined_identifiers): Remove __cp_push_exception.
281 (store_parm_decls): Use begin_eh_spec_block.
282 (finish_function): Use finish_eh_spec_block.
283 (mark_lang_function): Update for name changes.
284 * decl2.c (finish_file): No mark_all_runtime_matches.
285 * dump.c (cp_dump_tree): Handle new tree codes.
286 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
287 * except.c (catch_language_init, catch_language): Remove.
288 (init_exception_processing): Don't set language code.
289 Initialize call_unexpected_node, protect_cleanup_actions,
290 eh_personality_libfunc, lang_eh_runtime_type.
291 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
292 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
293 (prepare_eh_type): Split out type canonicalizations ...
294 (build_eh_type_type): ... from here.
295 (build_eh_type_type_ref): Remove.
296 (mark_all_runtime_matches): Remove.
297 (build_exc_ptr): New.
298 (do_begin_catch, do_end_catch): New.
299 (do_pop_exception): Remove.
300 (build_terminate_handler): Remove.
301 (choose_personality_routine): Split out language choice from ...
302 (initialize_handler_parm): ... here.
303 Use MUST_NOT_THROW_EXPR.
304 (expand_start_catch_block): Use do_begin_catch. Simplify Java
305 exception object handling.
306 (expand_start_eh_spec, expand_end_eh_spec): Remove.
307 (expand_exception_blocks, alloc_eh_object): Remove.
308 (begin_eh_spec_block, finish_eh_spec_block): New.
309 (do_allocate_exception, do_free_exception): New.
310 (expand_throw): Merge into ...
311 (build_throw): ... here. Update for abi.
312 * expr.c (cplus_expand_expr): No expand_internal_throw.
313 Handle MUST_NOT_THROW_EXPR.
314 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
315 * semantics.c (*) Update for except.h name changes.
316 (genrtl_try_block): No protect_with_terminate.
317 (genrtl_eh_spec_block): New.
318 (genrtl_handler): Don't emit the goto here.
319 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
320 (genrtl_finish_function): Don't expand_exception_blocks.
321 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
322
323 2001-03-28 Richard Henderson <rth@redhat.com>
324
325 * decl.c (struct named_label_list): Rename eh_region to
326 in_try_scope, add in_catch_scope.
327 (struct binding_level): Rename eh_region to is_try_scope,
328 add is_catch_scope.
329 (note_level_for_try): Rename from note_level_for_eh.
330 (note_level_for_catch): New.
331 (poplevel): Copy both is_try_scope and is_catch_scope to
332 the named_label_list struct.
333 (check_previous_goto_1): Don't check for catch block via
334 DECL_ARTIFICIAL; use in_try_scope instead.
335 (check_goto): Likewise.
336 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
337 * except.c (expand_start_catch_block): Call note_level_for_catch.
338 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
339
340 2001-03-27 Richard Henderson <rth@redhat.com>
341
342 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
343 exceptions_via_longjmp.
344
345 2001-03-27 Phil Edwards <pme@sources.redhat.com>
346
347 * pt.c (check_default_tmpl_args): Make error messages clearer.
348
349 2001-03-26 Phil Edwards <pme@sources.redhat.com>
350
351 * error.c: Also undefine 'A' macro used for cp_printers definition.
352
353 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
354
355 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
356
357 2001-03-26 Mike Yang <yang@research.att.com>
358 Mark Mitchell <mark@codesourcery.com>
359
360 * dump.c (dump_access): New function.
361 (cp_dump_tree): Use it. Dump basetype information for class
362 types.
363
364 2001-03-26 Mark Mitchell <mark@codesourcery.com>
365
366 * Makefile.in (optimize.o): Depend on params.h.
367 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
368 (init_decl_processing): Set flag_no_inline when doing
369 inlining-on-trees.
370 * optimize.c: Include params.h.
371 (struct inline_data): Improve documentation of FNS. Add
372 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
373 (INSNS_PER_STMT): New macro.
374 (remap_block): Use CLONING_P.
375 (inlinable_function_p): Don't inline big functions.
376 (expand_call_inline): Keep track of how much inlining we've done.
377 (optimize_function): Set FIRST_INLINED_FN.
378 (maybe_clone_body): Set CLONING_P.
379 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
380 tree nodes.
381 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
382 rest_of_compilation. Clear DECL_RTL for local variables
383 afterwards.
384 (clear_decl_rtl): New function.
385
386 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
387
388 Implement DR 209
389 * cp-tree.h (skip_type_access_control,
390 reset_type_access_control): Prototype.
391 * decl.c (grokdeclarator): Access of friends is not checked.
392 * parse.y (component_decl_list): Reset type access control.
393 * semantics.c (decl_type_access_control): Clear
394 current_type_lookups.
395 (save_type_access_control): Don't save if not deferring.
396 (skip_type_access_control, reset_type_access_control): New
397 functions.
398 (begin_class_definition): Do type access control for basetypes.
399 Start deferred access control.
400 (finish_class_definition): Resume immediate access control if
401 this is a local class.
402
403 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
404
405 * class.c (add_method): Use memcpy/memmove, not bcopy.
406
407 * decl.c (duplicate_decls): Likewise.
408
409 2001-03-23 Jakub Jelinek <jakub@redhat.com>
410
411 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
412 not `_'.
413
414 2001-03-23 Jakub Jelinek <jakub@redhat.com>
415
416 * decl.c (local_names): Define.
417 (push_local_name): New.
418 (grok_reference_init): Return init if initializing static reference
419 variable with non-constant instead of emitting it.
420 Move expand_static_init call to cp_finish_decl.
421 (layout_var_decl): Call push_local_name.
422 (maybe_commonize_var): Allow inlining functions even if they have
423 static local variables, use comdat_linkage for them if flag_weak.
424 (check_initializer): Call obscure_complex_init if
425 grok_reference_init returned non-zero.
426 (save_function_data): Clear x_local_names.
427 (pop_cp_function_context): Free x_local_names.
428 (mark_inlined_fns): Remove.
429 (mark_lang_function): Mark x_local_names.
430 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
431 Mark inlined_fns as tree, remove call to mark_inlined_fns.
432 * class.c (alter_access): Ensure DECL_ACCESS is never set if
433 DECL_DISCRIMINATOR_P.
434 * cp-tree.h (cp_language_function): Add x_local_names.
435 (lang_decl_flags): Add discriminator into u2.
436 (lang_decl_inlined_fns): Remove.
437 (lang_decl): inlined_fns is now a TREE_VEC.
438 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
439 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
440 TREE_VEC, not a custom structure.
441 (optimize_function): Likewise.
442 * mangle.c (discriminator_for_local_entity): Discriminate among
443 VAR_DECL local entities.
444 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
445 is not valid.
446
447 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
448
449 Add support for Java interface method calls.
450 * cp-tree.h (struct lang_type): Add java_interface flag.
451 (TYPE_JAVA_INTERFACE): New macro.
452 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
453 by setting TYPE_JAVA_INTERFACE.
454 * call.c (java_iface_lookup_fn): New static.
455 (build_over_call): If calling a method declared in a
456 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
457 expression which resolves the function address.
458 (build_java_interface_fn_ref): New function.
459
460 2001-03-22 Richard Henderson <rth@redhat.com>
461
462 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
463 * except.c: Don't include it.
464
465 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
466 based on an idea from Joe Buck <jbuck@synopsys.com>
467
468 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
469 New nonterminals.
470 (data_def, component_decl): Add reductions to bad_decl.
471
472 2001-03-22 Jakub Jelinek <jakub@redhat.com>
473
474 * method.c (do_build_assign_ref): Don't use build_modify_expr for
475 anonymous aggregates, since they don't have assignment operator
476 method.
477 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
478 assignment operators for anonymous structure fields.
479
480 2001-03-21 Jason Merrill <jason@redhat.com>
481
482 * pt.c (instantiate_decl): Abort if we see a member constant
483 instantiation that doesn't already have its initializer.
484 Downgrade explicit instantiation without definition to pedwarn.
485
486 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
487 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
488 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
489
490 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
491 (pending_vtables): Remove.
492 * decl2.c (pending_vtables): Remove.
493 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
494 CLASSTYPE_VTABLE_NEEDS_WRITING.
495 (import_export_class): Likewise.
496 (init_decl2): Don't mark pending_vtables.
497 * lex.c (handle_pragma_vtable): Just sorry.
498 * pt.c (instantiate_class_template): Don't mess with
499 CLASSTYPE_VTABLE_NEEDS_WRITING.
500 (mark_class_instantiated): Likewise.
501 * ptree.c (print_lang_type): Don't print it.
502 * semantics.c (begin_class_definition): Don't set it.
503
504 * pt.c (template_tail): Replace with last_pending_template.
505 (maybe_templates, maybe_template_tail): Remove.
506 (add_pending_template): Adjust.
507 (instantiate_pending_templates): Adjust.
508
509 * cp-tree.h (struct saved_scope): Remove lang_stack field.
510 (current_lang_stack): Remove.
511 * decl.c (maybe_push_to_top_level): Don't initialize it.
512 (duplicate_decls): Use current_lang_depth.
513 (xref_basetypes): Likewise.
514 * class.c (current_lang_depth): New fn.
515 (push_lang_context): Use more varray functionality.
516 (pop_lang_context): Likewise.
517
518 * error.c (GLOBAL_THING): Always use '__'.
519
520 2001-03-21 Mark Mitchell <mark@codesourcery.com>
521
522 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
523
524 * mangle.c (mangle_decl_string): Mangle the names of overloaded
525 operators, even when they have `extern "C"' linkage.
526
527 2001-03-19 Mark Mitchell <mark@codesourcery.com>
528
529 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
530 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
531 where it's not necessary.
532 (add_method): Remove optimization involving comparison of
533 DECL_ASSEMBLER_NAME.
534 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
535 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
536 where it's not necessary.
537 (check_methods): Likewise.
538 (build_clone): Likewise.
539 (built_vtt): Likewise.
540 * cp-tree.h (DECL_NEEDED_P): Likewise.
541 * decl.c (pushtag): Likewise.
542 (duplicate_decls): Likewise.
543 (pushdecl): Likewise.
544 (builtin_function): Likewise.
545 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
546 (build_cp_library_fn): Likewise.
547 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
548 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
549 where it's not necessary.
550 (make_rtl_for_nonlocal_decl): Likewise.
551 (cp_finish_decl): Likewise.
552 (grokfndecl): Likewise.
553 (grokvardecl): Likewise.
554 (grokdeclarator): Likewise.
555 (start_function): Likewise.
556 (cp_missing_return_ok_p): Likewise.
557 * decl2.c (grokclassfn): Likewise.
558 (check_classfn): Likewise.
559 (finish_static_data_member_decl): Likewise.
560 (grokfield): Likewise.
561 * error.c (GLOBAL_IORD_P): Remove.
562 (dump_global_iord): Improve output.
563 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
564 * except.c (nothrow_libfn_p): Summarily reject any function not in
565 namespace-scope.
566 * init.c (build_java_class_ref): Don't explicitly set
567 DECL_ASSEMBLER_NAME after calling mangle_decl.
568 * mangle.c (mangle_decl_string): Handle extern "C" functions.
569 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
570 * method.c (set_mangled_name_for_decl): Don't explicitly set
571 DECL_ASSEMBLER_NAME after calling mangle_decl.
572 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
573 IDENTIFIER_GLOBAL_VALUE for the thunk.
574 * pt.c (set_mangled_name_for_template_decl): Remove.
575 (check_explicit_specialization): Don't use it.
576 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
577 (tsubst_friend_function): Likewise.
578 (tsubst_decl): Likewise.
579 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
580 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
581 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
582 where it's not necessary.
583 (tinfo_base_init): Likewise.
584 (create_real_tinfo_var): Likewise.
585 * search.c (looup_field_1): Likewise.
586 * semantics.c (finish_named_return_value): Likewise.
587 * tree.c (init_tree): Set lang_set_decl_assembler_name.
588
589 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
590
591 Correct semantics restrictions checking in throw-expression.
592 * except.c (is_admissible_throw_operand): New function.
593 (build_throw): Use it.
594
595 2001-03-14 Mark Mitchell <mark@codesourcery.com>
596
597 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
598 and its ilk.
599
600 2001-03-14 Mark Mitchell <mark@codesourcery.com>
601
602 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
603 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
604 * decl.c (duplicate_decls): Likewise.
605 (builtin_function): Likewise.
606 (build_library_fn): Likewise.
607 (build_cp_library_fn): Likewise.
608 (check_initializer): Likewise.
609 (cp_finish_decl): Likewise.
610 * decl2.c (grokfield): Likewise.
611 (grok_function_init): Remove #if 0'd code.
612 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
613 * friend.c (do_friend): Likewise.
614 * init.c (get_temp_regvar): Likewise.
615 * method.c (make_thunk): Likewise.
616 * pt.c (tsubst_friend_function): Likewise.
617 (tsubst_decl): Likewise.
618 (regenerate_decl_from_template): Likewise.
619 * semantics.c (genrtl_named_return_value): Likewise.
620 (expand_body): Likewise.
621 (genrtl_finish_function): Likewise.
622 * tree.c (cp_tree_equal): Likewise.
623
624 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
625
626 * call.c (convert_like_real): Add extra semantics to INNER
627 parameter. Don't convert to temporary if a user conversion
628 gives us an lvalue that we're about to bind to a reference.
629 Set INNER to indicate pending reference binding on recursive
630 calls.
631
632 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
633
634 * cp/lex.c: Delete duplicate pending_lang_change.
635
636 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
637
638 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
639 Similarly.
640 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
641 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
642
643 2001-03-09 Zack Weinberg <zackw@stanford.edu>
644
645 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
646
647 2001-03-08 Stan Shebs <shebs@apple.com>
648
649 * cp-tree.h (set_identifier_local_value): Remove unused decl.
650
651 2001-03-06 Zack Weinberg <zackw@stanford.edu>
652
653 * spew.c: Remove references to CPP_OSTRING.
654
655 2001-03-06 Andrew Haley <aph@redhat.com>
656
657 * typeck.c (convert_arguments): Check that we have an fndecl.
658
659 2001-03-05 Andrew Haley <aph@redhat.com>
660
661 * typeck.c (convert_arguments): Don't do ellipsis conversion for
662 __built_in_constant_p.
663
664 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
665
666 * typeck.c (build_static_cast): Allow enum to enum conversions
667 as per DR 128.
668
669 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
670
671 * class.c (check_field_decls): Pointers to member do not a
672 non-pod struct make, as per DR 148.
673
674 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
675
676 * call.c (joust): cp_pedwarn when using gnu extension concerning
677 worst conversion sequences.
678
679 2001-03-01 Zack Weinberg <zackw@stanford.edu>
680
681 * decl.c: Replace all uses of 'boolean' with 'bool'.
682
683 2001-03-01 Zack Weinberg <zackw@stanford.edu>
684
685 * lang-specs.h: Add zero initializer for cpp_spec field to
686 all array elements that need one. Don't put an #ifdef inside
687 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
688 use it.
689
690 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
691
692 Implement using decls inside template functions.
693 * decl2.c (validate_nonmember_using_decl): Don't special case
694 fake_std_node in the global namespace. Don't reject early when
695 processing a template.
696 (do_local_using_decl): Add to statement tree. Don't do further
697 processing when building a template.
698 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
699
700 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
701
702 * decl2.c (do_nonmember_using_decl): Don't complain if we find
703 same function. Do complain about ambiguating extern "C"
704 declarations.
705
706 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
707
708 Remove floating point and complex type template constant parms.
709 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
710 COMPLEX_TYPE extensions.
711 (invalid_nontype_parm_type_p): Likewise.
712
713 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
714
715 * except.c (call_eh_info): Revert "match_function"'s type.
716
717 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
718
719 Fix ctor vtable vcall offsets.
720 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
721 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
722 (get_matching_base): Remove.
723 (get_original_base): New function.
724 (build_vtbl_initializer): Initialize vid.rtti_binfo.
725 Use a virtual thunk for a ctor vtable with an index
726 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
727 primary base within a constructor vtable. Only set
728 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
729 when primary base has been lost.
730 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
731
732 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
733
734 * call.c (joust): Ensure more_specialized()'s argument length
735 parameter has correct value for constructors.
736
737 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
738
739 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
740
741 * decl.c (mark_inlined_fns): Prototype.
742
743 2001-02-22 Mark Mitchell <mark@codesourcery.com>
744
745 * spew.c (yylex): Correct handling of friends.
746
747 2001-02-22 Mark Mitchell <mark@codesourcery.com>
748
749 * mangle.c (write_encoding): Pass write_function_type the
750 FUNCTION_DECL for the function being encoded.
751 (write_function_type): Pass it along to write_bare_function_type.
752 (write_bare_function_type): Pass it along to write_method_parms.
753 (write_method_parms): Don't mangle the compiler-generated
754 parameters to a constructor or destructor.
755
756 2001-02-22 Andreas Jaeger <aj@suse.de>
757
758 * optimize.c: Include toplev.h for
759 note_deferral_of_defined_inline_function prototype.
760
761 2001-02-22 Jakub Jelinek <jakub@redhat.com>
762
763 * cp-tree.h (struct lang_decl_inlined_fns): New.
764 (struct lang_decls): Add inlined_fns.
765 (DECL_INLINED_FNS): New macro.
766 * optimize.c (struct inline_data): Add inlined_fns.
767 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
768 (inlinable_function_p): Likewise, fix typo in comment,
769 function is not inlinable if it already inlined function currently
770 being optimized.
771 (expand_call_inline): Add fn to inlined_fns if neccessary.
772 (optimize_function): Initialize inlined_fns.
773 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
774 * decl.c (mark_inlined_fns): New function.
775 (lang_mark_tree): Call it.
776
777 2001-02-21 Jason Merrill <jason@redhat.com>
778
779 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
780 (DECL_UNINLINABLE): Move to middle-end.
781
782 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
783 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
784 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
785 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
786 parms and outer BLOCK. note_deferral_of_defined_inline_function.
787
788 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
789 second parm of op=.
790
791 2001-02-19 Mark Mitchell <mark@codesourcery.com>
792
793 * decl2.c (set_decl_namespace): Allow explicit instantiations in
794 any namespace.
795
796 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
797
798 * optimize.c (expand_call_inline): Don't walk subtrees of type
799 nodes.
800
801 2001-02-18 Mark Mitchell <mark@codesourcery.com>
802
803 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
804 for a destructor.
805
806 2001-02-18 Jason Merrill <jason@redhat.com>
807
808 Do put the VTT parameter in DECL_ARGUMENTS.
809 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
810 (current_vtt_parm): New macro.
811 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
812 (DECL_HAS_VTT_PARM_P): New macro.
813 (DECL_VTT_PARM): Remove.
814 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
815 * decl.c (duplicate_decls): Only copy the operator code if
816 appropriate.
817 (start_function): Set current_vtt_parm.
818 (lang_mark_tree): Don't mark vtt_parm.
819 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
820 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
821 * class.c (build_clone): Maybe remove the VTT parm.
822 * optimize.c (maybe_clone_body): Set up the VTT parm.
823 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
824 * call.c (build_over_call): Just allow the VTT arg.
825 * method.c (make_thunk): Don't set DECL_VTT_PARM.
826 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
827 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
828 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
829 * error.c (dump_function_decl): Likewise.
830 * call.c (build_user_type_conversion_1, convert_like_real): Abort
831 if we try to call a constructor with in-charge or VTT parms.
832 * method.c (skip_artificial_parms_for): New fn.
833 * call.c (add_function_candidate, build_over_call): Call it.
834 * call.c (build_new_method_call): Use current_vtt_parm.
835 * init.c (expand_virtual_init): Likewise.
836 * class.c (same_signature_p): No longer static.
837 * cp-tree.h: Declare it.
838 * search.c (look_for_overrides_r): Use it.
839
840 2001-02-17 Mark Mitchell <mark@codesourcery.com>
841
842 * cp-tree.h (new_abi_rtti_p): Remove.
843 (name_mangling_version): Likewise.
844 (flag_do_squangling): Likewise.
845 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
846 * decl.c (grokfndecl): Likewise.
847 * decl2.c (name_mangling_version): Remove.
848 (flag_do_squangling): Likewise.
849 (lang_f_options): Remove `squangle'.
850 (unsupported_options): Add `squangle'.
851 (cxx_decode_option): Issue a warning about uses of
852 -fname-mangling-version.
853 (finish_file): Remove old ABI support.
854 * pt.c (check_explicit_specialization): Likewise.
855 (tsubst_decl): Likewise.
856 * rtti.c (init_rtti_processing): Likewise.
857 (build_headof): Likewise.
858 (get_tinfo_decl_dynamic): Likewise.
859 (tinfo_from_decl): Likewise.
860 (build_dynamic_cast_1): Likewise.
861 (synthesize_tinfo_var): Likewise.
862 * init.c (build_new): Allow enumeration types for the array-bounds
863 in a direct-new-declarator.
864
865 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
866
867 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
868 TREE_PROTECTED from the template being specialized.
869
870 2001-02-17 Jason Merrill <jason@redhat.com>
871
872 * decl2.c (build_artificial_parm): Set TREE_READONLY.
873
874 * decl.c (bad_specifiers): Allow throw specs on things with
875 pointer-to-function or -member-function type.
876 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
877 a pmf.
878
879 2001-02-17 Mark Mitchell <mark@codesourcery.com>
880
881 * call.c (check_dtor_name): Handle template names correctly.
882
883 2001-02-16 Jason Merrill <jason@redhat.com>
884
885 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
886 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
887 * optimize.c (maybe_clone_body): Don't substitute it.
888 * call.c (build_new_method_call): Check in_chrg instead.
889 * init.c (expand_virtual_init): Likewise.
890
891 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
892
893 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
894 class-type introduces at least a type-name.
895
896 2001-02-16 Jakub Jelinek <jakub@redhat.com>
897
898 * call.c (convert_like_real): Create a temporary for non-lvalue.
899
900 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
901
902 * cp-tree.h: Fix typos in comments.
903
904 2001-02-16 Jason Merrill <jason@redhat.com>
905
906 * optimize.c (remap_block): If we're compiling a clone, pass the
907 new block to insert_block.
908
909 2001-02-16 Mark Mitchell <mark@codesourcery.com>
910
911 * semantics.c (finish_asm_stmt): Robustify.
912
913 2001-02-15 Mark Mitchell <mark@codesourcery.com>
914
915 * pt.c (push_template_decl_real): Don't remangle the name of a
916 class template.
917
918 2001-02-15 Jim Meyering <meyering@lucent.com>
919
920 * Make-lang.in (c++.install-common): Depend on installdirs.
921 (c++.install-info): Likewise.
922 (c++.install-man): Likewise.
923
924 2001-02-15 Mark Mitchell <mark@codesourcery.com>
925
926 * typeck2.c (build_m_component_ref): Robustify.
927
928 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
929
930 * friend.c (do_friend): Don't take the nested [template] class
931 into account when deciding whether to warn about the friend
932 function not referring to a template function.
933
934 2001-02-14 Jakub Jelinek <jakub@redhat.com>
935
936 * typeck.c (build_unary_op): Clarify error message.
937
938 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
939
940 * parse.y (component_constructor_declarator): allow optional
941 parentheses around constructor class name.
942
943 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
944
945 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
946 section.
947 * init.c (emit_base_init): Remove incorrect comment about
948 virtual bases.
949 * method.c (make_thunk): Fix comment alignment.
950
951 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
952
953 Kill remnants of this is variable.
954 * cp-tree.h (flag_this_is_variable): Remove.
955 * decl2.c (flag_this_is_variable): Remove.
956 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
957 (build_vbase_path): The path is non-static, even in a cdtor.
958 (resolves_to_fixed_type_p): Add additional return value.
959 * search.c (init_vbase_pointers): Adjust.
960 * tree.c (lvalue_p_1): Adjust.
961 * typeck.c (mark_addressable): Adjust.
962
963 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
964
965 * pt.c (unify): Don't check cv quals of array types.
966
967 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
968
969 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
970 check whether we already have the type.
971
972 2001-02-13 Mark Mitchell <mark@codesourcery.com>
973
974 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
975 * call.c (build_op_delete_call): Simplify to remove duplicate
976 code.
977 * class.c (clone_function_decl): Don't build the deleting variant
978 of a non-virtual destructor.
979 * decl.c (finish_destructor_body): Don't call delete if this is a
980 non-virtual destructor.
981 * init.c (build_delete): Explicitly call `operator delete' when
982 deleting an object with a non-virtual destructor.
983
984 2001-02-13 Jason Merrill <jason@redhat.com>
985
986 * lang-specs.h: Add more __EXCEPTIONS.
987
988 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
989
990 * typeck2.c (process_init_constructor): Check
991 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
992
993 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
994
995 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
996 Remove spurious information in comment. Allow further
997 adjustments of REFERENCE_TYPE args.
998
999 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1000
1001 * errfn.c (cp_deprecated): Tweak diagnostic text.
1002 * parse.y (new_initializer): Deprecate initializer lists
1003 extension.
1004
1005 2001-02-12 Mark Mitchell <mark@codesourcery.com>
1006
1007 Remove old ABI support.
1008
1009 2001-02-11 Mark Mitchell <mark@codesourcery.com>
1010
1011 * decl2.c (flag_vtable_thunks): Always set it to 1.
1012 (flag_new_abi): Likewise.
1013 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
1014
1015 * Makefile.in (g++spec.o): Fix typo.
1016
1017 2001-02-09 Jason Merrill <jason@redhat.com>
1018
1019 * lang-specs.h: Restore definition of __EXCEPTIONS.
1020
1021 2001-02-08 Jason Merrill <jason@redhat.com>
1022
1023 * search.c (shared_member_p): New function.
1024 (lookup_field_r): Use it.
1025 * cp-tree.h (SHARED_MEMBER_P): Remove.
1026
1027 * method.c (process_overload_item): Handle template-dependent array
1028 bounds.
1029 * pt.c (type_unification_real): If we end up with undeduced nontype
1030 parms, try again.
1031
1032 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
1033 types.
1034
1035 * typeck2.c (friendly_abort): Don't say anything if we have
1036 earlier errors or sorries.
1037
1038 * decl.c (check_tag_decl): Notice attempts to redefine bool and
1039 wchar_t. Ignore if in_system_header.
1040
1041 * decl.c (maybe_push_cleanup_level): New fn...
1042 (start_decl_1): ...split out from here.
1043 * cvt.c (build_up_reference): Use it.
1044 * cp-tree.h: Declare it.
1045
1046 2001-02-07 Mark Mitchell <mark@codesourcery.com>
1047
1048 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
1049 spec.
1050
1051 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
1052
1053 * pt.c (lookup_template_class): Make sure it's a primary
1054 template or template_template_parm when called from the parser.
1055 (instantiate_template_class): Add assertion.
1056
1057 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
1058
1059 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
1060 from error_mark_node.
1061
1062 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
1063
1064 Fix specification and implementation bugs in V3 ABI
1065 construction vtables.
1066 * cp-tree.h (flag_dump_class_layout): New flag.
1067 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
1068 (BINFO_LOST_PRIMARY_P): New flag.
1069 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
1070 (BINFO_PRIMARY_MARKED_P): Rename to ...
1071 (BINFO_PRIMARY_P): ... here.
1072 (binfo_via_virtual): New prototype.
1073 * decl2.c (flag_dump_class_layout): New flag.
1074 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
1075 use `=' as a file name separator.
1076 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
1077 bases.
1078 (build_vtbl_address): If this is a virtual primary base, then
1079 get the vtbl of what it is ultimately primary for.
1080 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
1081 for BINFO_PRIMARY_P.
1082 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1083 (get_shared_vbase_if_not_primary): Likewise.
1084 (dfs_get_pure_virtuals): Likewise.
1085 (expand_upcast_fixups): Likewise.
1086 (fixup_virtual_upcast_offsets): Likewise.
1087 (dfs_find_vbase_instance): Likewise.
1088 (find_vbase_instance): Likewise.
1089 (binfo_from_vbase): Adjust comment to reflect reality.
1090 (binfo_via_virtual): New function.
1091 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
1092 for binfo walking during VTT construction.
1093 (dfs_mark_primary_bases): Remove.
1094 (force_canonical_binfo_r): New function.
1095 (force_canonical_binfo): New function.
1096 (mark_primary_virtual_base): New function.
1097 (mark_primary_bases): Walk in inheritance graph order, use
1098 mark_primary_virtual_base.
1099 (determine_primary_base): Use some more intermediate variables.
1100 (dfs_find_final_overrider): Don't check for overriding along a
1101 virtual path.
1102 (dfs_modify_vtables): Walk into primary virtual bases too.
1103 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
1104 (build_base_fields): Likewise.
1105 (dfs_set_offset_for_unshared_vbases): Likewise.
1106 (layout_virtual_bases): Likewise.
1107 (end_of_class): Likewise.
1108 (finish_struct_1): Call dump_class_hierarchy, if requested.
1109 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
1110 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
1111 (dump_class_hierarchy): Add file parameter. Append to file, if
1112 required.
1113 (finish_vtbls): Adjust accumulate_vtbl_inits call.
1114 Use canonical base for virtual bases.
1115 (build_vtt): Add more comments. Adjust build_vtt_inits call.
1116 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
1117 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
1118 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
1119 virtual VTTs.
1120 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
1121 from DATA. We want virtual primary bases and all bases via virtual.
1122 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
1123 virtual base when not a construction vtable.
1124 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
1125 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
1126 Use canonical bases when processing virtual bases.
1127 (accumulate_vtbl_inits): We're interested in any base via a
1128 virtual path.
1129 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
1130 within a construction vtable, determine what is being overridden.
1131 (build_vtbl_initializer): Add more comments
1132 (add_vcall_offset_vtbl_entries_1): Adjust comment.
1133 (build_rtti_vtbl_entries): Check if the base has lost its
1134 primary.
1135
1136 2001-02-05 Mark Mitchell <mark@codesourcery.com>
1137
1138 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
1139
1140 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1141
1142 * decl.c (pushdecl): Call abort instead of fatal.
1143 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
1144 * init.c (build_new_1): Likewise.
1145 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
1146 * decl.c (build_typename_type): hash_table_init now returns void.
1147 decl.c (init_decl_processing): Make an error non-fatal.
1148
1149 2001-02-04 Mark Mitchell <mark@codesourcery.com>
1150
1151 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
1152 Document.
1153 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1154 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1155 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1156 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1157 * decl.c (maybe_commonize_var): Use the new name-mangling where
1158 appropriate.
1159 * decl2.c (comdat_linkage): Enhance comments. Make all
1160 compiler-generated things static, if COMDAT is not available.
1161 (get_tinfo_decl): Do not make typeinfo objects that belong in the
1162 library COMDAT.
1163 (tinfo_base_init): Use the correct mangled name for typeinfo
1164 strings, and push them into the global scope.
1165 (typeinfo_in_lib_p): New function.
1166 (synthesize_tinfo_var): Use it.
1167 (create_real_tinfo_var): Likewise.
1168
1169 2001-02-03 Jakub Jelinek <jakub@redhat.com>
1170
1171 * decl.c (push_class_binding): Use context_for_name_lookup instead
1172 of CP_DECL_CONTEXT.
1173 * search.c (context_for_name_lookup): Remove static. Check for NULL
1174 context in the loop.
1175 * cp-tree.h (context_for_name_lookup): Add prototype.
1176
1177 2001-02-02 Jakub Jelinek <jakub@redhat.com>
1178
1179 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
1180 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
1181 Remove.
1182 * call.c (convert_class_to_reference, build_user_type_conversion_1,
1183 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
1184
1185 2001-02-02 Mark Mitchell <mark@codesourcery.com>
1186
1187 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
1188 of macros used when compiling g++spec.c.
1189 * g++spec.c (lang_specific_driver): Link with the shared
1190 libgcc by default.
1191
1192 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
1193
1194 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
1195 make_reference_declarator, make_call_declarator), method.c
1196 (implicitly_declare_fn), parse.y (namespace_using_decl,
1197 notype_unqualified_id, expr_or_declarator, new_type_id,
1198 after_type_declarator, direct_after_type_declarator,
1199 notype_declarator, complex_notype_declarator,
1200 complex_direct_notype_declarator, qualified_id,
1201 notype_qualified_id, overqualified_id, direct_new_declarator,
1202 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
1203 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
1204 instead of build_parse_node.
1205
1206 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1207
1208 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
1209 (minus_one_node): Moved to top level gcc directory. Renamed
1210 to integer_minus_one_node.
1211
1212 * init.c (init_init_processing): Don't set minus_one_node.
1213 (build_vec_init): Use integer_minus_one_node.
1214
1215 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1216
1217 2001-01-28 Jakub Jelinek <jakub@redhat.com>
1218
1219 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
1220 identical and they would be replaced with constant, remove
1221 MODIFY_EXPR from the tree.
1222
1223 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1224
1225 * Make-lang.in: Remove all dependencies on defaults.h.
1226 * call.c: Don't include defaults.h.
1227 * decl.c: Likewise.
1228 * decl2.c: Likewise.
1229 * except.c: Likewise.
1230 * pt.c: Likewise.
1231 * rtti.c: Likewise.
1232 * tree.c: Likewise.
1233 * typeck.c: Likewise.
1234
1235 2001-01-25 Jakub Jelinek <jakub@redhat.com>
1236
1237 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
1238 operators even in "C" linkage.
1239 * method.c (set_mangled_name_for_decl): Likewise.
1240 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
1241 overloaded operators in "C" linkage.
1242
1243 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1244
1245 * pt.c (tsubst_decl): Remove IN_DECL parameter.
1246 (tsubst_arg_types): Check parameter is not void.
1247 (tsubst): Adjust tsubst_decl call.
1248
1249 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
1250
1251 * call.c (add_builtin_candidate): Quote std properly, from
1252 previous change.
1253
1254 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1255
1256 * pt.c (check_explicit_specialization): Clone constructors and
1257 destructors.
1258
1259 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1260
1261 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
1262 indicates anything special about template depth. Make sure we
1263 only count the user visible template classes.
1264
1265 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
1266
1267 * call.c (build_conv): Typo in comment.
1268 (add_builtin_candidate): Add more explanation.
1269 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
1270 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
1271 when we have enumeral types.
1272 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
1273 candidates for relops and eqops.
1274 (joust): Simplify control flow. Allow a non-template user
1275 function to hide a builtin.
1276
1277 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
1278
1279 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
1280 (more_specialized): Add deduction parameter.
1281 * call.c (joust): Adjust more_specialized call.
1282 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
1283 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
1284 (get_bindings_order): Remove.
1285 (get_bindings_real): Add DEDUCE parameter.
1286 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
1287 REFERENCE_TYPE jig for DEDUCE_ORDER.
1288 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
1289 maybe_adjust_types_for_deduction.
1290 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
1291 directly.
1292 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
1293 (check_cv_quals_for_unify): Use new unify qualifier flags.
1294 (unify): Clear new unify qualifier flags.
1295 (get_bindings_real): Add DEDUCE parameter.
1296 (get_bindings): Adjust call to get_bindings_real.
1297 (get_bindings_overload): Likewise.
1298 (most_specialized_instantiation): Adjust call to
1299 more_specialized.
1300
1301 2001-01-19 Jason Merrill <jason@redhat.com>
1302
1303 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
1304
1305 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
1306 -fnew-abi.
1307
1308 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
1309
1310 * decl2.c (arg_assoc_class): Fix double iteration logic.
1311
1312 2001-01-19 Jason Merrill <jason@redhat.com>
1313
1314 * init.c (build_delete): Always call convert_force to strip cv-quals.
1315
1316 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
1317 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
1318 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
1319
1320 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1321
1322 * search.c (get_vbase_1): Count only virtual bases.
1323
1324 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1325
1326 * class.c (duplicate_tag_error): Robustify flag clearing.
1327
1328 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1329
1330 * cp-tree.h (lookup_template_class): Add complain parm.
1331 * decl.c (lookup_namespace_name): Adjust call to
1332 lookup_template_class.
1333 (make_typename_type): Likewise.
1334 * semantics.c (finish_template_type): Likewise.
1335 * pt.c (lookup_template_class): Add complain parm. Adjust.
1336 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
1337 (tsubst): Likewise.
1338
1339 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
1340
1341 * pt.c (copy_default_args_to_explicit_spec): Preserve
1342 object's CV quals. Reorganize.
1343
1344 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1345
1346 * typeck.c (build_modify_expr): Say `initialization' for
1347 INIT_EXPRs.
1348 * init.c (build_default_init): Convert to enumeral type, if
1349 needed.
1350
1351 2001-01-18 Jakub Jelinek <jakub@redhat.com>
1352
1353 * parse.y (nomods_initdcl0): Properly set things up for
1354 initdcl0_innards.
1355
1356 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1357
1358 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
1359 (type_unification_real): Set it.
1360 (unify): Use it.
1361
1362 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1363
1364 * decl.c (finish_destructor_body): Convert to vbase pointer here.
1365
1366 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1367
1368 * semantics.c (begin_class_definition): Check we're not inside a
1369 template parm list.
1370
1371 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
1372
1373 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
1374 BASELINK_P.
1375
1376 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1377
1378 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
1379 * call.c (build_over_call): Add comment.
1380
1381 2001-01-16 Daniel Berlin <dberlin@redhat.com>
1382
1383 * cvt.c (ocp_convert): Handle vector type conversion
1384 * typeck2.c (digest_init): Handle vector type initializations
1385
1386 2001-01-16 Phil Edwards <pme@sources.redhat.com>
1387
1388 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
1389 was given.
1390
1391 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1392
1393 * pt.c (check_nontype_parm): Rename to ...
1394 (invalid_nontype_parm_type_p): ... here.
1395 (process_template_parm): Adjust.
1396 (convert_template_argument): Adjust.
1397
1398 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
1399
1400 * pt.c (check_nontype_parm): New function.
1401 (process_template_parm): Use it.
1402 (convert_template_argument): Use it.
1403 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
1404 member.
1405
1406 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
1407
1408 * tree.c: Add defaults.h
1409 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
1410 * Make-lang.in (cp/tree.o): Add defaults.h.
1411
1412 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1413
1414 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
1415
1416 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1417
1418 * g++.1: Change to be ".so man1/gcc.1".
1419
1420 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
1421
1422 * Make-lang.in (c++.info, c++.install-info): Build and install g++
1423 internals info.
1424 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
1425 ($(srcdir)/cp/g++int.info): New target.
1426 * gxxint.texi: Add info directory entry. Use @@ in email address.
1427 * .cvsignore: Update.
1428
1429 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1430
1431 * typeck.c (build_c_cast): Do template processing earlier.
1432 Always pedwarn on array casts.
1433
1434 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
1435
1436 * friend.c (make_friend_class): Make sure a templated class is
1437 actually a template.
1438
1439 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1440
1441 * decl2.c (get_guard): Set linkage from guarded decl.
1442
1443 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1444
1445 * call.c (convert_default_arg): Check for unprocessed
1446 DEFAULT_ARG.
1447 * cp-tree.h (replace_defarg): Move to spew.c.
1448 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
1449 spew.c, which is where they really are.
1450 (done_pending_defargs): Declare.
1451 (unprocessed_defarg_fn): Declare.
1452 * decl.c (replace_defarg): Move to spew.c
1453 * parse.y (structsp): Call done_pending_defargs.
1454 * spew.c (defarg_fns): Rearrange list structure.
1455 (defarg_fnsdone): New static variable.
1456 (defarg_depfns): New static variable.
1457 (init_spew): Adjust.
1458 (add_defarg_fn): Store the type in TREE_TYPE.
1459 (do_pending_defargs): Detect and deal with ordering constraints
1460 and circularity.
1461 (done_pending_defargs): New function.
1462 (unprocessed_defarg_fn): New function.
1463 (replace_defarg): Moved from decl.c. Robustify. Don't save
1464 if circularity detected.
1465
1466 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1467
1468 * pt.c (unify): Check array has a domain, before checking
1469 whether it is variable sized.
1470
1471 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1472
1473 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
1474 parameters with pointers to arrays of unknown bound.
1475
1476 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
1477
1478 * parse.y (template_parm_header, template_spec_header): New
1479 reductions. Split out from ...
1480 (template_header): ... here. Use them.
1481 (template_template_parm): Use template_parm_header.
1482 * semantics.c (finish_template_template_parm): Add assert.
1483
1484 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1485
1486 * mangle.c (write_builtin_type): Fix thinko.
1487
1488 * pt.c (copy_default_args_to_explicit_spec_1): New function.
1489 (copy_default_args_to_explicit_spec): Likewise.
1490 (check_explicit_specialization): Use it.
1491
1492 * class.c (finish_struct_1): Remove last argument in call to
1493 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
1494 * decl.c (builtin_function): Likewise.
1495 (build_cp_library_fn): Likewise.
1496 (check_initializer): Likewise.
1497 (make_rtl_for_nonlocal_decl): Likewise.
1498 (cp_finish_decl): Likewise.
1499 (start_function): Likewise.
1500 * decl2.c (finish_anon_union): Likewise.
1501 * friend.c (do_friend): Likewise.
1502 * init.c (build_java_class_ref): Likewise.
1503 * method.c (make_thunk): Likewise.
1504 * pt.c (tsubst_friend_function): Likewise.
1505 * semantics.c (expand_body): Likewise.
1506
1507 2001-01-10 Mark Mitchell <mark@codesourcery.com>
1508
1509 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
1510 looking at DECL_CLONED_FUNCTION for non-functions.
1511
1512 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1513
1514 * error.c (dump_template_parameter): Use parm to determine how
1515 to print default value.
1516
1517 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1518
1519 * class.c (duplicate_tag_error): Clear more flags.
1520
1521 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
1522
1523 * call.c (build_new_method_call): Use binfo_for_vbase.
1524
1525 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
1526
1527 * cp-tree.h (flag_cond_mismatch): Don't declare.
1528 * decl2.c (flag_cond_mismatch): Don't define.
1529 (lang_f_options): Remove cond-mismatch.
1530 (unsupported_options): Add cond-mismatch.
1531
1532 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
1533
1534 * class.c (handle_using_decl): Reject using of constructor name
1535 of sourcing class. Allow injecting of a method with same name as
1536 nested class. Fixup error messages.
1537
1538 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
1539
1540 * decl2.c (lang_decode_option): Handle -Wformat=2.
1541
1542 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1543
1544 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
1545 initialized_in_class.
1546 (DECL_DEFINED_IN_CLASS_P): Rename to ...
1547 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
1548 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
1549 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
1550 * pt.c (check_default_tmpl_args): Adjust for
1551 DECL_INITIALIZED_IN_CLASS_P.
1552 (instantiate_class_template): Likewise.
1553 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
1554
1555 * class.c (finish_struct): Constify saved_filename.
1556
1557 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1558
1559 * class.c (duplicate_tag_error): Adjust diagnostic.
1560 (finish_struct): Locally set location to start of struct.
1561 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
1562
1563 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
1564
1565 * decl.c (struct binding_level): Adjust class_shadowed comments
1566 to reflect reality.
1567 (push_class_level_binding): Ajust comments to reflect reality.
1568 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
1569 Don't set TREE_VALUE on the class_shadowed list.
1570
1571 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
1572
1573 * decl2.c (acceptable_java_type): Allow references too.
1574 * init.c (build_java_class_ref): When using the new ABI, search
1575 `class$' and have it mangled with `mangle_decl.'
1576 * mangle.c (write_java_integer_type_codes): New function.
1577 (write_builtin_type): Detect and mangle Java integer and real
1578 types.
1579
1580 2001-01-07 Mark Mitchell <mark@codesourcery.com>
1581
1582 * decl2.c (grokfield): Don't accept `asm' specifiers for
1583 non-static data members.
1584
1585 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1586
1587 * expr.c (cplus_expand_expr): Don't reset `target'.
1588
1589 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
1590
1591 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
1592
1593 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1594
1595 * parse.y (template_datadef): Check for error_mark_node.
1596
1597 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
1598
1599 * cp-tree.def (DEFAULT_ARG): Make `x' class.
1600
1601 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
1602
1603 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
1604 (record_builtin_type): Make non-static.
1605 (flag_short_double): Don't declare.
1606 (init_decl_processing): Remove the creation of many tree nodes now
1607 in c_common_nodes_and_builtins.
1608 (build_void_list_node): New function.
1609 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
1610 * cp-tree.h (flag_short_wchar): Don't declare.
1611
1612 2001-01-04 Mark Mitchell <mark@codesourcery.com>
1613
1614 * call.c (build_conv): Don't use build1 for USER_CONV.
1615 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
1616
1617 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
1618
1619 * lex.c (lang_init): Call c_common_lang_init.
1620
1621 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1622
1623 * search.c (lookup_fnfields_here): Remove.
1624 (look_for_overrides_r): Use lookup_fnfields_1.
1625 Ignore functions from using declarations.
1626
1627 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
1628
1629 Implement exceptions specifiers for implicit member functions.
1630 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
1631 * method.c (synthesize_exception_spec): New function.
1632 (locate_dtor, locate_ctor, locate_copy): New functions.
1633 (implicitly_declare_fn): Generate the exception spec too.
1634 * search.c (check_final_overrider): Check artificial functions
1635 too.
1636 * typeck2.c (merge_exception_specifiers): New function.
1637
1638 2001-01-03 Jason Merrill <jason@redhat.com>
1639
1640 * init.c (build_default_init): New fn.
1641 (perform_member_init): Split out from here.
1642 (build_new_1): Use it. Simplify initialization logic.
1643 (build_vec_init): Take an array, rather than a pointer and maxindex.
1644 Speed up simple initializations. Don't clean up if we're assigning.
1645 * cp-tree.h: Adjust.
1646 * decl2.c (do_static_initialization): Remove TREE_VEC case.
1647 * parse.y (new_initializer): Return void_zero_node for ().
1648 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
1649 * typeck2.c (digest_init): Only complain about user-written
1650 CONSTRUCTORs.
1651
1652 2000-12-22 Mike Stump <mrs@wrs.com>
1653
1654 * decl2.c: (max_tinst_depth): Increase to 50.
1655
1656 2001-01-02 Mark Mitchell <mark@codesourcery.com>
1657
1658 * class.c (invalidate_class_lookup_cache): Zero the
1659 previous_class_values.
1660 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
1661 TREE_INT_CST_HIGH.
1662 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1663 * decl.c (free_bindings): New variable.
1664 (push_binding): Don't create a new binding if we have one on the
1665 free list.
1666 (pop_binding): Put old bindings on the free list.
1667 (init_decl_processing): Use size_int, not build_int_2.
1668 Register free_bindings as a GC root.
1669 (cp_make_fname_decl): Use size_int, not build_int_2.
1670 (push_inline_template_parms_recursive): Likewise.
1671 (end_template_parm_list): Likewise.
1672 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1673 (tsubst_template_parms): Use size_int, not build_int_2.
1674 (tsubst): Likewise.
1675 * rtti.c (get_vmi_pseudo_type_info): Likewise.
1676
1677 2001-01-02 Richard Henderson <rth@redhat.com>
1678
1679 * parse.y (asm): Set ASM_INPUT_P.
1680
1681 2001-01-02 Jason Merrill <jason@redhat.com>
1682
1683 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1684 for v3 ABI.
1685
1686 * typeck.c (cp_truthvalue_conversion): New fn.
1687 * cvt.c (ocp_convert): Use it.
1688
1689 * cp-tree.h: Lose c-common.c decls.
1690
1691 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1692 * cvt.c (convert_to_void): Use type_unknown_p.
1693
1694 * typeck.c (strip_all_pointer_quals): Also strip quals from
1695 pointer-to-member types.
1696
1697 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
1698 parse.y as C.
1699
1700 * call.c (build_new_method_call): Do evaluate the object parameter
1701 when accessing a static member.
1702 * typeck.c (build_component_ref): Likewise.
1703
1704 2001-01-02 Andreas Jaeger <aj@suse.de>
1705
1706 * decl.c (cp_missing_noreturn_ok_p): New.
1707 (init_decl_processing): Set lang_missing_noreturn_ok_p.
1708
1709 2000-12-29 Jakub Jelinek <jakub@redhat.com>
1710
1711 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1712
1713 2000-12-29 Mark Mitchell <mark@codesourcery.com>
1714
1715 * class.c (pushclass): Remove #if 0'd code.
1716 * cp-tree.h (overload_template_name): Remove.
1717 * decl.c (store_bindings): Simplify.
1718 (pop_from_top_level): Likewise.
1719 * pt.c (overload_template_name): Remove.
1720 (instantiate_decl): Don't call push_to_top_level if it's not
1721 needed.
1722
1723 2000-12-28 Mark Mitchell <mark@codesourcery.com>
1724
1725 * pt.c (register_local_specialization): Don't return a value.
1726 (lookup_template_class): Use move-to-front heuristic when looking
1727 up template instantiations.
1728 (instantiate_decl): Only push_to_top_level when we're actually
1729 going to instantiate the template.
1730
1731 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
1732
1733 * search.c (binfo_for_vtable): Return least derived class, not
1734 most. Handle secondary vtables.
1735
1736 2000-12-22 Jason Merrill <jason@redhat.com>
1737
1738 * pt.c (more_specialized): Don't optimize len==0.
1739 (fn_type_unification): If we're adding the return type, increase len.
1740
1741 * typeck.c (build_binary_op): Fix pmf comparison logic.
1742
1743 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
1744 DECL_STATIC_FUNCTION_P.
1745
1746 * semantics.c (genrtl_finish_function): Don't try to jump to
1747 return_label unless it exists.
1748
1749 In partial ordering for a call, ignore parms for which we don't have
1750 a real argument.
1751 * call.c (joust): Pass len to more_specialized.
1752 (add_template_candidate_real): Strip 'this', pass len.
1753 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
1754 (get_bindings_order): New fn. Pass len down.
1755 (get_bindings_real): Strip 'this', pass len.
1756 (fn_type_unification): Likewise.
1757 (type_unification_real): Succeed after checking 'len' args.
1758 (most_specialized_instantiation): Lose explicit_args parm.
1759 * class.c (resolve_address_of_overloaded_function): Strip 'this',
1760 pass len.
1761
1762 2000-12-21 Jason Merrill <jason@redhat.com>
1763
1764 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
1765 DECL_TEMPLATE_RESULT.
1766
1767 * search.c (lookup_field_r): Call lookup_fnfields_1, not
1768 lookup_fnfields_here.
1769
1770 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
1771
1772 * call.c (build_object_call): Also allow conversions that return
1773 reference to pointer to function.
1774 (add_conv_candidate): Handle totype being ref to ptr to fn.
1775 (build_field_call): Also allow members of type reference to function.
1776 Lose support for calling pointer to METHOD_TYPE fields.
1777
1778 * error.c (dump_expr): Handle *_CAST_EXPR.
1779
1780 * typeck2.c (build_scoped_ref): Always convert to the naming class.
1781
1782 * tree.c (break_out_cleanups): Lose.
1783 * cp-tree.h: Remove prototype.
1784 * typeck.c (build_component_ref): Don't break_out_cleanups.
1785 (build_compound_expr): Likewise.
1786 * semantics.c (finish_expr_stmt): Likewise.
1787
1788 2000-12-20 Richard Henderson <rth@redhat.com>
1789
1790 * cp-tree.h: Update declarations.
1791 * decl.c (finish_case_label): Return the new stmt node.
1792 * semantics.c (finish_goto_stmt): Likewise.
1793 (finish_expr_stmt, finish_return_stmt): Likewise.
1794 (finish_break_stmt, finish_continue_stmt): Likewise.
1795 (finish_asm_stmt): Likewise.
1796 * parse.y (already_scoped_stmt): Set STMT_LINENO.
1797 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
1798 (simple_if, simple_stmt): Return the new stmt node.
1799 (save_lineno): New.
1800
1801 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
1802
1803 * cp-tree.h: Don't declare warn_long_long.
1804
1805 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1806
1807 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
1808 IS_AGGR_TYPE.
1809
1810 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1811
1812 * pt.c (unify): Handle when both ARG and PARM are
1813 BOUND_TEMPLATE_TEMPLATE_PARM.
1814
1815 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1816
1817 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
1818 DECL_TEMPLATE_PARM_P.
1819
1820 2000-12-15 Jason Merrill <jason@redhat.com>
1821
1822 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
1823
1824 * init.c (build_new_1): Don't strip quals from type.
1825
1826 * decl.c (pushdecl): Don't check for linkage on a non-decl.
1827
1828 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
1829
1830 * call.c (build_new_function_call): Lose space before paren in
1831 error message.
1832 (build_new_method_call): Likewise.
1833
1834 * typeck2.c (build_m_component_ref): Propagate quals from datum.
1835
1836 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1837
1838 * pt.c (check_explicit_specialization): Propagate default
1839 function arguments to explicit specializations.
1840
1841 2000-12-13 DJ Delorie <dj@redhat.com>
1842
1843 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
1844 and <? operators.
1845
1846 2000-12-08 Jason Merrill <jason@redhat.com>
1847
1848 * error.c (dump_function_name): Don't let the user see __comp_ctor.
1849
1850 Clean up copy-initialization in overloading code.
1851 * call.c (build_user_type_conversion_1): Die if we are asked to
1852 convert to the same or a base type.
1853 (implicit_conversion): Avoid doing so. Lose reference binding code.
1854 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
1855 direct-initialization. Also do direct-init part of copy-init.
1856 (build_user_type_conversion): Don't provide context to convert_like.
1857 * cvt.c (ocp_convert): build_user_type_conversion will now provide
1858 the constructor call for copy-init.
1859
1860 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
1861 instantiation of a member template.
1862 (do_decl_instantiation): Not here.
1863
1864 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1865
1866 * class.c (check_field_decls): Don't special case anonymous
1867 fields in error messages.
1868 (note_name_declared_in_class): Use %D on diagnostic.
1869
1870 * tree.c (pod_type_p): Use strip_array_types.
1871 (cp_valid_lang_attribute): Likewise.
1872 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
1873 multiple evaluations.
1874 (cp_has_mutable_p): Use strip_array_types.
1875
1876 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
1877
1878 * cp-tree.h (sufficient_parms_p): Declare new function.
1879 * call.c (sufficient_parms_p): New function, broken out of ...
1880 (add_function_candidate): ... here. Use it.
1881 (add_conv_candidate): Use it.
1882 * decl.c (grok_ctor_properties): Use it.
1883
1884 2000-12-07 Jakub Jelinek <jakub@redhat.com>
1885
1886 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
1887
1888 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
1889
1890 * decl2.c (lang_decode_option): Handle -Wformat-security.
1891
1892 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1893
1894 * pt.c (verify_class_unification): New function.
1895 (get_class_bindings): Use it.
1896 (try_class_unification): Tidy.
1897 (unify): Handle when argument of a template-id is not
1898 template parameter dependent.
1899 (template_args_equal): Handle when TREE_CODE's do not match.
1900
1901 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
1902
1903 * lang-specs.h (c++): When invoking the stand-alone preprocessor
1904 for -save-temps, pass all relevant -Defines to it, and then don't
1905 pass them to cc1plus.
1906
1907 2000-12-05 Will Cohen <wcohen@redhat.com>
1908
1909 * decl.c (finish_case_label): Cleared
1910 more_cleanups_ok in surrounding function scopes.
1911 (define_label): Likewise.
1912
1913 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1914
1915 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
1916 (get_matching_virtual): Remove.
1917 (look_for_overrides): Declare new function.
1918 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
1919 DECL_VINDEX here.
1920 * class.c (check_for_override): Move base class iteration code
1921 to look_for_overrides.
1922 * search.c (next_baselink): Remove.
1923 (get_virtuals_named_this): Remove.
1924 (get_virtual_destructor): Remove.
1925 (tree_has_any_destructors_p): Remove.
1926 (struct gvnt_info): Remove.
1927 (check_final_overrider): Remove `virtual' from error messages.
1928 (get_matching_virtuals): Remove. Move functionality to ...
1929 (look_for_overrides): ... here, and ...
1930 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
1931 to be overriding.
1932
1933 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
1934
1935 * typeck.c (get_delta_difference): If via a virtual base,
1936 return zero.
1937 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
1938 adjustment.
1939
1940 2000-12-04 Richard Henderson <rth@redhat.com>
1941
1942 * error.c (dump_tree): Use output_add_string not OB_PUTS.
1943
1944 2000-12-04 Jason Merrill <jason@redhat.com>
1945
1946 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
1947 (write_builtin_type): Pass intSI_type_node and the like through
1948 type_for_mode.
1949 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
1950 Pass intSI_type_node and the like through type_for_mode.
1951 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
1952 * pt.c (tsubst, unify): Likewise.
1953 * tree.c (walk_tree): Likewise.
1954 * error.c (dump_type): Likewise.
1955 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
1956
1957 * Make-lang.in: Tweak top comment for emacs.
1958 (cp/TAGS): Restore.
1959
1960 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
1961
1962 * class.c (clone_function_decl): Robustify.
1963
1964 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
1965
1966 * decl.c (store_bindings): Only search in the non modified
1967 old_bindings for duplicates.
1968
1969 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
1970
1971 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
1972 TYPE_POLYMORPHIC_P.
1973
1974 * typeck.c (build_static_cast): Remove unused variable.
1975
1976 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1977
1978 * pt.c: Fix typo in comment.
1979
1980 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1981
1982 * decl2.c (warn_format): Remove definition.
1983 (lang_decode_option): Handle -Wformat-nonliteral,
1984 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
1985
1986 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
1987
1988 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
1989 (init_decl_processing): Don't create string_type_node,
1990 const_string_type_node, wint_type_node, intmax_type_node,
1991 uintmax_type_node, default_function_type, ptrdiff_type_node and
1992 unsigned_ptrdiff_type_node. Adjust position of call to
1993 c_common_nodes_and_builtins.
1994 (identifier_global_value): New function.
1995
1996 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
1997
1998 * call.c (standard_conversion): Reject pointer to member
1999 conversions from ambiguous, inaccessible or virtual bases.
2000 * typeck.c (build_static_cast): Don't check pointers to members
2001 specially.
2002
2003 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2004
2005 * method.c (do_build_copy_constructor): Preserve cv
2006 qualifications when accessing source object members.
2007 (do_build_assign_ref): Likewise. Remove separate diagnostics for
2008 unnamed fields.
2009
2010 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2011
2012 * method.c (do_build_assign_ref): Construct appropriately
2013 CV-qualified base reference. Don't allow const casts in base
2014 conversion.
2015
2016 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2017
2018 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
2019 incomplete return type.
2020
2021 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2022
2023 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
2024 * semantics.c (finish_base_specifier): Accept a _TYPE not a
2025 _DECL.
2026
2027 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2028
2029 * spew.c (yyerror): Cope if yylval.ttype is NULL.
2030
2031 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2032
2033 * decl.c (grokdeclarator): Diagnose undefined template contexts.
2034
2035 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2036
2037 * decl.c (grokdeclarator): Do type access control on friend
2038 class.
2039
2040 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2041
2042 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
2043 bison parser ickiness.
2044 * pt.c (tsubst_friend_function): Enter namespace scope when
2045 tsubsting the function name.
2046 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
2047
2048 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2049
2050 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
2051 * cvt.c (cp_convert_to_pointer): Add force parameter.
2052 Allow conversions via virtual base if forced.
2053 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
2054 (ocp_convert): Likewise.
2055 * search.c (binfo_from_vbase): Return the virtual base's binfo.
2056 * typeck.c (get_delta_difference): Adjust handling of virtual
2057 bases.
2058
2059 2000-11-26 Mark Mitchell <mark@codesourcery.com>
2060
2061 * tree.c (struct list_hash): Remove.
2062 (list_hash_table): Make it be an htab.
2063 (struct list_proxy): New type.
2064 (list_hash_eq): New function.
2065 (list_hash_pieces): Renamed from ...
2066 (list_hash): ... this.
2067 (list_hash_lookup): Remove.
2068 (list_hash_add): Remove.
2069 (hash_tree_cons): Use the generic hashtable.
2070 (mark_list_hash): Remove.
2071 (init_tree): Create the hashtable.
2072
2073 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
2074
2075 * method.c (build_mangled_C9x_name): Rename to
2076 build_mangled_C99_name. Change C9X references in comments to
2077 refer to C99.
2078
2079 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2080
2081 * parse.y (unary_expr): Move VA_ARG from here ...
2082 (primary): ... to here.
2083
2084 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2085
2086 * semantics.c (finish_id_expr): If type is error_mark, return
2087 error_mark.
2088
2089 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
2090
2091 * pt.c (lookup_template_class): Simplify loop exit constructs.
2092 Cope when there is no partial instantiation of a template
2093 template member.
2094
2095 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
2096
2097 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
2098
2099 2000-11-22 Mark Mitchell <mark@codesourcery.com>
2100
2101 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
2102 prefix.
2103
2104 * pt.c (do_decl_instantiate): Explicitly clone constructors and
2105 destructors that haven't already been cloned.
2106
2107 2000-11-20 Richard Henderson <rth@redhat.com>
2108
2109 * parse.y (yyparse_1): Rename the parser entry point.
2110
2111 2000-11-20 Alex Samuel <samuel@codesourcery.com>
2112
2113 * mangle.c (write_name): Use <unscoped-name> for names directly in
2114 function scope.
2115 (write_unscoped_name): Accept names directly in function scope.
2116
2117 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
2118
2119 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
2120 * parse.y (extdef): Add EXPORT reduction.
2121 * spew.c (yylex): Don't skip export here.
2122
2123 2000-11-19 Mark Mitchell <mark@codesourcery.com>
2124
2125 * decl.c (init_decl_processing): Correct name of pure virtual
2126 function under the new ABI.
2127 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
2128 (throw_bad_typeid): Likewise for bad typeid function.
2129
2130 2000-11-18 Mark Mitchell <mark@codesourcery.com>
2131
2132 * decl.c (grokparms): Don't even function types of `void' type,
2133 either.
2134 * mangle.c (write_type): Don't crash when confronted with the
2135 error_mark_node.
2136
2137 * decl.c (grokparms): Don't create parameters of `void' type.
2138
2139 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2140
2141 * lex.c (mark_impl_file_chain): Delete.
2142 (init_parse): Remove call to ggc_add_string_root. No need to
2143 ggc_strdup a string constant. Do not add impl_file_chain to GC
2144 roots.
2145 (handle_pragma_implementation): No need to ggc_strdup main_filename.
2146
2147 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2148
2149 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
2150
2151 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2152
2153 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
2154 * decl.c (grokdeclarator): Don't reject void parms here.
2155 (require_complete_types_for_parms): Simplify, use
2156 complete_type_or_else.
2157 (grokparms): Remove bitrot. Remove funcdef parm.
2158 Deal with ellipsis parm lists here.
2159 * semantics.c (finish_parmlist): Don't append void_list_node
2160 here. Set PARMLIST_ELLIPSIS_P.
2161
2162 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2163
2164 * typeck2.c (incomplete_type_error): Reorganise to avoid
2165 excessive diagnostics.
2166
2167 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
2168
2169 * lex.c (struct impl_files, internal_filename): Constify a char *.
2170
2171 2000-11-16 Mark Mitchell <mark@codesourcery.com>
2172
2173 * mangle.c (write_special_name_constructor): Don't generate
2174 assembler junk when confronted with an old-style constructor.
2175 (write_special_name_destructor): Likewise.
2176 (mangle_decl_string): Do it here instead.
2177
2178 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
2179
2180 * call.c (op_error): Make error messages clearer.
2181
2182 2000-11-15 Mark Mitchell <mark@codesourcery.com>
2183
2184 * decl.c (wrapup_globals_for_namespace): Don't mark things
2185 TREE_ASM_WRITTEN when they're not.
2186
2187 2000-11-15 Jason Merrill <jason@redhat.com>
2188
2189 * typeck2.c (friendly_abort): Uncount the error before handing
2190 off to fancy_abort.
2191
2192 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
2193
2194 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
2195
2196 2000-11-14 Mark Mitchell <mark@codesourcery.com>
2197
2198 * class.c (build_vtbl_initializer): Fix typo in comment.
2199 * typeck.c (expr_sizeof): Don't crash on errors.
2200
2201 2000-11-14 Jim Wilson <wilson@redhat.com>
2202
2203 * lang-specs.h: Add %2 after %(cc1_options).
2204
2205 2000-11-14 Richard Henderson <rth@redhat.com>
2206
2207 * typeck.c (c_sizeof): Be strict about casting result value
2208 back to c_size_type_node.
2209 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
2210
2211 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
2212
2213 * typeck.c (build_unary_op): Use boolean_increment from
2214 c-common.c, moving the relevant code there.
2215
2216 2000-11-11 Jason Merrill <jason@redhat.com>
2217
2218 * typeck.c (mark_addressable): Don't call put_var_into_stack.
2219
2220 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
2221 in inlines.
2222
2223 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2224
2225 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
2226 * lex.c (copy_lang_decl): Likewise.
2227
2228 2000-11-09 Mark Mitchell <mark@codesourcery.com>
2229
2230 * dump.c (cp_dump_tree): Don't dump function bodies here.
2231
2232 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
2233 (dump.o): Update dependency list.
2234 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
2235 (flag_dump_translation_unit): Likewise.
2236 (CP_TYPE_QUALS): Adjust definition.
2237 (DECL_C_BIT_FIELD): Remove.
2238 (SET_DECL_C_BIT_FIELD): Likewise.
2239 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2240 (add_maybe_template): Likewise.
2241 (strip_array_types): Likewise.
2242 (dump_node_to_file): Likewise.
2243 (cp_dump_tree): New function.
2244 * decl.c (init_decl_processing): Set lang_dump_tree.
2245 * decl2.c (flag_dump_translation_unit): Remove.
2246 * dump.c: Move most of it to ../c-dump.c.
2247 (cp_dump_tree): New function.
2248 * pt.c (add_maybe_template): Remove.
2249 * typeck.c (strip_array_types): Likewise.
2250
2251 2000-11-07 Eric Christopher <echristo@redhat.com>
2252
2253 * decl.c (init_decl_processing): Change definition of
2254 __wchar_t to wchar_t. Remove artificial declaration of
2255 wchar_t.
2256 * lex.c: Change instances of __wchar_t to wchar_t.
2257
2258 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
2259
2260 * lex.c (do_identifier): Don't lookup_name for operators.
2261 * parse.y (operator): Save looking_for_typename.
2262 (unoperator): Restore it.
2263 * spew.c (frob_opname): Use nth_token for lookahead.
2264
2265 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
2266
2267 * decl.c (grok_op_properties): Always use coerce_new_type and
2268 coerce_delete_type.
2269 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
2270 exception specification. Tidy up.
2271 (coerce_delete_type): Preserve exception specification. Tidy up.
2272
2273 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
2274
2275 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
2276 (push_binding_level), error.c (cp_tree_printer), pt.c
2277 (process_partial_specialization, tsubst_template_arg_vector),
2278 search.c (lookup_member): Use memset () instead of bzero ().
2279
2280 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
2281
2282 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
2283
2284 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
2285
2286 * Make-lang.in (c++.distdir): Remove.
2287
2288 2000-11-04 Mark Mitchell <mark@codesourcery.com>
2289
2290 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
2291 declarations from different namespaces to be combined.
2292
2293 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
2294
2295 * decl.c: Include tm_p.h.
2296
2297 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
2298
2299 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
2300
2301 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
2302
2303 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
2304 (build_overload_value), repo.c (open_repo_file), xref.c
2305 (open_xref_file): Use strchr () and strrchr () instead of index ()
2306 and rindex ().
2307
2308 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
2309
2310 * call.c (build_over_call): Call fold on the CALL_EXPR.
2311
2312 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
2313
2314 * error.c (dump_template_decl): Separate template hearders with
2315 space not comma.
2316
2317 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
2318
2319 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
2320 TS_* flags with corresponding TFF_*. Adjust prototypes of
2321 functions (which used to take a tree_string_flags) to take an int.
2322
2323 * cp-tree.h (enum tree_string_flags): Remove
2324 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
2325 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
2326 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2327 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2328 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
2329 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
2330 (type_as_string, decl_as_string, expr_as_string,
2331 context_as_string): Adjust prototype.
2332
2333 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
2334 instead of TS_PLAIN.
2335
2336 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
2337 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
2338 plain `0'.
2339
2340 2000-10-30 Mark Mitchell <mark@codesourcery.com>
2341
2342 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
2343 (linkage_kind): New enumeration.
2344 (decl_linkage): New function.
2345 * decl2.c (comdat_linkage): Extend comment.
2346 * error.c (dump_function_decl): Print the arguments used to
2347 instantiate a template, even when not printing the type of the
2348 function.
2349 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
2350 not TREE_PUBLIC, to test for external linkage.
2351 * tree.c (decl_linkage): New function.
2352
2353 2000-10-28 Mark Mitchell <mark@codesourcery.com>
2354
2355 * pt.c (instantiate_decl): Always instantiate static data members
2356 initialized in-class.
2357
2358 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
2359
2360 * Make-lang.in: Move all build rules here from Makefile.in,
2361 adapt to new context. Wrap all rules that change the current
2362 directory in parentheses. Expunge all references to $(P).
2363 When one command depends on another and they're run all at
2364 once, use && to separate them, not ;. Add OUTPUT_OPTION to
2365 all object-file generation rules. Delete obsolete variables.
2366
2367 * Makefile.in: Delete.
2368 * config-lang.in: Delete outputs= line.
2369
2370 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
2371
2372 * error.c (dump_function_decl): Print no space between
2373 `ptr-operator' the `type-specifier' of the return type.
2374 (dump_type_prefix): Make sure we put space at the appropriate
2375 place.
2376
2377 2000-10-23 Jason Merrill <jason@redhat.com>
2378
2379 * call.c (equal_functions): Also call decls_match for extern "C" fns.
2380
2381 2000-10-22 Jason Merrill <jason@redhat.com>
2382
2383 * call.c (build_conditional_expr): Use ocp_convert to force
2384 rvalue conversion.
2385
2386 2000-10-22 Mark Mitchell <mark@codesourcery.com>
2387
2388 * call.c (standard_conversion): Use RVALUE_CONVs for all
2389 expressions that satisfy lvalue_p, not just those that satisfy
2390 real_lvalue_p.
2391
2392 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
2393
2394 * typeck.c (c_sizeof): Return an expression of `size_t' type,
2395 not one with TYPE_IS_SIZETYPE set.
2396 (dubious_conversion_warnings): Remove special-case code.
2397
2398 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
2399
2400 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
2401 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
2402 (dump_type_prefix): Print vector-of-int as 'int vector'.
2403 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
2404 * tree.c (walk_tree): Handle VECTOR_TYPE.
2405
2406 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
2407
2408 2000-10-21 Jason Merrill <jason@redhat.com>
2409
2410 * parse.y (operator): Set got_object from got_scope.
2411 Set looking_for_typename.
2412 * decl.c (lookup_name_real): Clear val after setting from_obj.
2413 Reorganize diagnostic.
2414
2415 2000-10-20 Jason Merrill <jason@redhat.com>
2416
2417 * tree.c (walk_tree): Don't walk into default args.
2418
2419 * error.c (dump_expr): Use host_integerp.
2420
2421 2000-10-20 David Edelsohn <edelsohn@gnu.org>
2422
2423 * typeck2.c (abstract_virtuals_error): Use "because" instead of
2424 "since" in error message.
2425
2426 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2427
2428 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
2429
2430 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
2431
2432 * decl.c (revert_static_member_fn): Fixed typo.
2433
2434 2000-10-19 Mark Mitchell <mark@codesourcery.com>
2435
2436 * class.c (subobject_offset_fn): New type.
2437 (dfs_record_base_offsets): Remove.
2438 (record_base_offsets): Likewise.
2439 (dfs_search_base_offsets): Likewise.
2440 (record_subobject_offset): New function.
2441 (check_subobject_offset): Likewise.
2442 (walk_subobject_offsets): Likewise.
2443 (record_subobject_offsets): Likewise.
2444 (layout_conflict_p): Reimplement.
2445 (layout_nonempty_base_or_field): Correct handling of type
2446 conflicts during layout.
2447 (layout_empty_base): Likewise.
2448 (build_base_field): Adjust to handle new representation of empty
2449 base offset table.
2450 (build_base_fields): Likewise.
2451 (layout_virtual_bases): Likewise.
2452 (splay_tree_compare_integer_csts): New function.
2453 (layout_class_type): Use a splay_tree, rather than a varray, to
2454 represent the offsets of empty bases.
2455
2456 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
2457 * decl.c (select_decl): Don't return declarations that are
2458 DECL_ANTICIPATED.
2459
2460 2000-10-18 Mark Mitchell <mark@codesourcery.com>
2461
2462 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
2463 (fake_std_node): New macro.
2464 * decl.c (in_std): Rename to ...
2465 (in_fake_std): ... this.
2466 (flag_no_builtin): Remove.
2467 (flag_no_nonansi_builtin): Likewise.
2468 (walk_namespaces_r): Use fake_std_node.
2469 (push_namespace): Use std_identifier.
2470 (pop_namespace): Use in_fake_std.
2471 (lookup_name_real): Use fake_std_node.
2472 (init_decl_processing): When -fhonor-std, create the `std'
2473 namespace. Don't create a dummy fake_std_node in that case.
2474 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
2475 (builtin_function): Put builtins whose names don't begin
2476 with `_' in the std namespace.
2477 * decl2.c (flag_no_builtin): Remove.
2478 (flag_no_nonansi_builtin): Likewise.
2479 (set_decl_namespace): Use fake_std_node.
2480 (validate_nonmember_using_decl): Likewise.
2481 (do_using_directive): Likewise.
2482 (handle_class_head): Likewise.
2483 * dump.c (dequeue_and_dump): Likewise.
2484 * except.c (init_exception_processing): Use std_identifier.
2485 * init.c (build_member_call): Use fake_std_node.
2486 * rtti.c (init_rtti_processing): Use std_identifier.
2487
2488 2000-10-17 Mark Mitchell <mark@codesourcery.com>
2489
2490 * cp-tree.h (back_end_hook): Remove declaration.
2491 * decl2.c (back_end_hook): Remove definition.
2492
2493 * dump.c (dequeue_and_dump): Dump TREE_USED.
2494
2495 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
2496
2497 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
2498
2499 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2500
2501 * decl.c (WINT_TYPE): Define.
2502 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
2503 c_size_type_node, signed_size_type_node and wint_type_node.
2504
2505 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
2506
2507 * decl2.c (warn_missing_format_attribute): New variable.
2508 (lang_decode_option): Decode -Wmissing-format-attribute.
2509
2510 2000-10-16 Mark Mitchell <mark@codesourcery.com>
2511
2512 * typeck.c (qualify_type): Remove.
2513 (composite_pointer_type): Fix handling of conversions to `cv void*'.
2514
2515 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2516
2517 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
2518
2519 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2520
2521 * Makefile.in (parse.c, parse.h): Create atomically.
2522
2523 2000-10-12 Mark Mitchell <mark@codesourcery.com>
2524
2525 * class.c (current_obstack): Remove.
2526 * decl.c (ggc_p): Remove.
2527 (start_decl): Don't use decl_tree_cons.
2528 (grokdeclarator): Don't use build_decl_list.
2529 (start_function): Don't use decl_tree_cons.
2530 (finish_function): Don't mess with obstacks.
2531 * decl2.c (grok_x_components): Don't use build_decl_list.
2532 * lex.c (make_call_declarator): Don't call decl_tree_cons.
2533 (implicitly_declare_fn): Don't call build_decl_list.
2534 * parse.y (frob_specs): Don't call build_decl_list or
2535 decl_tree_cons.
2536 (expr_or_declarator_intern): Don't call decl_tree_cons.
2537 (primary): Don't call build_decl_list.
2538 (fcast_or_absdcl): Likewise.
2539 (typed_declspecs): Don't call decl_tree_cons.
2540 (reserved_declspecs): Don't call build_decl_list.
2541 (declmods): Likewise.
2542 (reserved_typespecquals): Likewise.
2543 (aggr): Likewise.
2544 (new_type_id): Likewise.
2545 (cv_qualifiers): Likewise.
2546 (after_type_declarator_intern): Likewise.
2547 (notype_declarator_intern): Likewise.
2548 (absdcl_intern): Likewise.
2549 (named_parm): Likewise.
2550 * pt.c (most_specialized_class): Likewise.
2551 * repo.c (temporary_obstack): Make it a structure, not a pointer.
2552 (init_repo): Initialize it.
2553 * search.c (current_obstack): Remove.
2554 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
2555
2556 2000-10-09 Richard Henderson <rth@cygnus.com>
2557
2558 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
2559 (c++ language support bits for libgcc): Remove.
2560 (c++.clean): Remove cplib2.txt cleanup.
2561 * config-lang.in (headers, lib2funcs): Remove.
2562
2563 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
2564 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
2565 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
2566 * inc/new.h, inc/typeinfo: Remove files.
2567
2568 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
2569
2570 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
2571 defined.
2572 (init_decl_processing): Initialize intmax_type_node and
2573 uintmax_type_node.
2574
2575 2000-10-06 Richard Henderson <rth@cygnus.com>
2576
2577 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
2578 (original_result_rtx): Remove.
2579 * decl.c (save_function_data): Don't clear x_result_rtx.
2580 (mark_lang_function): Don't mark it either.
2581 * expr.c (fixup_result_decl): Remove.
2582 * semantics.c (genrtl_named_return_value): Frob the return decl
2583 before calling emit_local_var.
2584 (genrtl_finish_function): Don't call fixup_result_decl.
2585 Always emit the jump to return_label.
2586
2587 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
2588
2589 * pt.c (lookup_template_class): Set current access for enum.
2590 (tsubst_enum): Set file & line for enum decl.
2591
2592 * spew.c (yylex): Remove unused variable.
2593
2594 2000-10-05 Richard Henderson <rth@cygnus.com>
2595
2596 * semantics.c (genrtl_finish_function): Don't init or check
2597 can_reach_end; remove noreturn and return value checks.
2598
2599 2000-10-05 Tom Tromey <tromey@cygnus.com>
2600
2601 * init.c (build_java_class_ref): Use `build_static_name' with a
2602 suffix, not a prefix, to build the class object's name.
2603
2604 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2605
2606 * cp-tree.h (access_kind): Fix comment typo.
2607 * decl2.c (grokfield): Fix diagnostic typo.
2608 * semantics.c (finish_template_type): Fix comment typo.
2609 (finish_qualified_object_call_expr): Likewise.
2610
2611 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2612
2613 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
2614 tsubsting fails.
2615
2616 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
2617
2618 * spew.c (frob_id): New static function.
2619 (frob_opname): Use it.
2620 (yylex): Use it.
2621
2622 2000-10-01 Mark Mitchell <mark@codesourcery.com>
2623
2624 * decl.c (lang_mark_false_label_stack): Remove.
2625 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
2626
2627 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
2628
2629 * gxxint.texi: Use @email for formatting email addresses.
2630
2631 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
2632
2633 * error.c: Remove direct obstack manipulation. Replace with
2634 output_buffer-based formatting. Adjust calls to removed macros.
2635 (obstack_chunk_alloc, obstack_chunk_free): Remove.
2636 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
2637 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
2638
2639 2000-09-24 Mark Mitchell <mark@codesourcery.com>
2640
2641 * ir.texi: Move to ../c-tree.texi.
2642
2643 2000-09-20 Jason Merrill <jason@redhat.com>
2644
2645 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
2646
2647 2000-09-21 Andreas Jaeger <aj@suse.de>
2648
2649 * errfn.c: Move declaration of cp_printer and cp_printers to ...
2650 * cp-tree.h: ... here.
2651
2652 * error.c: Remove declaration of cp_printer.
2653
2654 2000-09-20 Mark Mitchell <mark@codesourcery.com>
2655
2656 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
2657
2658 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
2659
2660 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
2661 users.
2662
2663 2000-09-18 Mark Mitchell <mark@codesourcery.com>
2664
2665 * decl.c (start_function): Robustify.
2666
2667 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2668
2669 * cp-tree.h (check_function_format): Accept a `status' parameter.
2670
2671 * call.c, typeck.c: Updates calls to `check_function_format'.
2672
2673 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
2674
2675 * decl2.c (handle_class_head): Always push some scope even
2676 in the error case.
2677
2678 2000-09-16 Mark Mitchell <mark@codesourcery.com>
2679
2680 * cp-tree.h (struct cp_language_function): Remove
2681 x_scope_stmt_stack and name_declared.
2682 (current_scope_stmt_stack): Remove.
2683 (function_name_declared_p): New macro.
2684 (struct lang_decl_flags): Use c_lang_decl as a base class.
2685 (context): Remove.
2686 (struct lang_decl): Replace saved_tree with context.
2687 (DECL_FRIEND_CONTEXT): Adjust accordingly.
2688 (SET_DECL_FRIEND_CONTEXT): Likewise.
2689 (DECL_VIRTUAL_CONTEXT): Likewise.
2690 (DECL_SAVED_TREE): Remove.
2691 (C_DECLARED_LABEL_FLAG): Likewise.
2692 (cplus_expand_expr_stmt): Don't declare.
2693 (add_decl_stmt): Likewise.
2694 (add_scope_stmt): Likewise.
2695 * decl.c (mark_stmt_tree): Remove.
2696 (case_compare): Likewise.
2697 (finish_case_label): Use c_add_case_label.
2698 (init_decl_processing): Set more language-specific hooks.
2699 (build_enumerator): Fix typo in comment.
2700 (cplus_expand_expr_stmt): Remove.
2701 (mark_lang_function): Use mark_c_language_function.
2702 (lang_mark_tree): Use c_mark_lang_decl.
2703 * decl2.c: Change order of inclusion.
2704 * except.c: Likewise.
2705 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
2706 back on c_expand_expr.
2707 * friend.c: Include expr.h.
2708 * init.c: Change order of inclusion.
2709 * Makefile.in: Update dependencies.
2710 * lex.h (free_lang_decl_chain): Remove.
2711 * optimize.c (maybe_clone_body): Use function_name_declared_p.
2712 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2713 it doesn't exist.
2714 (instantiate_decl): Use function_name_declared_p.
2715 * semantics.c (lang_expand_expr_stmt): Remove.
2716 (set_current_function_name_declared): Likewise.
2717 (current_function_name_declared): Likewise.
2718 (begin_compound_stmt): Use function_name_declared_p.
2719 (add_decl_stmt): Remove.
2720 (setup_vtbl_ptr): Use function_name_declared_p.
2721 (add_scope_stmt): Remove.
2722 (current_scope_stmt_stack): New function.
2723 (cp_expand_stmt): Don't handle SCOPE_STMTs.
2724 (expand_body): Use function_name_declared_p.
2725 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2726 * typeck.c: Change order of includes.
2727 (convert_sequence): Remove.
2728
2729 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
2730
2731 * lex.c (reswords): Add _Complex.
2732
2733 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2734
2735 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2736
2737 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
2738
2739 * init.c (begin_init_stmts): Don't use // comments.
2740
2741 2000-09-12 Jason Merrill <jason@redhat.com>
2742
2743 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
2744 all non-extern arrays.
2745
2746 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
2747 typenames, too. Downgrade complaint to pedwarn.
2748 (xref_tag): Warn about surprising behavior of 'friend struct T'.
2749 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
2750 'class This::Inherited'.
2751
2752 2000-09-12 Mark Mitchell <mark@codesourcery.com>
2753
2754 * decl.c (finish_case_label): Given the LABEL_DECL a
2755 DECL_CONTEXT.
2756
2757 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
2758
2759 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
2760 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
2761 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2762 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2763 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
2764 New macros.
2765 (sorry_for_unsupported_tree, print_scope_operator,
2766 print_left_paren, print_right_paren, print_left_bracket,
2767 print_right_bracket, print_whitespace): Likewise.
2768 (aggr_variety): Rename to class_key_or_enum.
2769 (print_type): Rename to print_type_id.
2770 (print_type_specifier_seq, print_simple_type_specifier,
2771 print_elaborated_type_specifier,
2772 print_rest_of_abstract_declarator,
2773 print_parameter_declaration_clause, print_exception_specification,
2774 print_nested_name_specifier, print_template_id,
2775 typedef_original_name, print_template_argument_list_start,
2776 print_template_argument_list_end): New functions.
2777
2778 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
2779
2780 * ir.texi: Add more documentation.
2781
2782 2000-09-11 Mark Mitchell <mark@codesourcery.com>
2783
2784 * cp-tree.h (struct saved_scope): Remove x_function_parms.
2785 (current_function_parms): Don't define.
2786 (struct cp_language_function): Remove parms_stored.
2787 (current_function_just_assigned_this): Don't define.
2788 (current_function_parms_stored): Likewise.
2789 (static_ctors): Declare.
2790 (static_dtors): Likewise.
2791 (SF_EXPAND): Don't define.
2792 (expand_start_early_try_stmts): Remove declaration.
2793 (store_parm_decls): Likewise.
2794 * decl.c (static_ctors): Don't declare.
2795 (static_dtors): Likewise.
2796 (struct binding_level): Remove this_block.
2797 (poplevel): Remove dead code.
2798 (set_block): Likewise.
2799 (mark_binding_level): Don't mark this_block.
2800 (mark_saved_scope): Don't mark x_function_parms.
2801 (init_decl_processing): Don't add current_function_parms as a GC
2802 root.
2803 (check_function_type): Change prototype.
2804 (start_function): Remove RTL-generation code.
2805 (expand_start_early_try_stmts): Remove.
2806 (store_parm_decls): Give it internal linkage. Remove
2807 RTL-generation code.
2808 (finish_function): Remove RTL-generation code.
2809 * decl2.c (static_ctors): Fix formatting.
2810 (static_dtors): Likewise.
2811 * method.c (use_thunk): Don't call store_parm_decls.
2812 (synthesize_method): Likewise.
2813 * optimize.c (maybe_clone_body): Likewise.
2814 * parse.y (fn.def2): Likewise.
2815 (.set_base_init): Likewise.
2816 (nodecls): Likewise.
2817 * pt.c (instantiate_decl): Likewise.
2818 * rtti.c (synthesize_tinfo_fn): Likewise.
2819 * semantics.c (genrtl_try_block): Simplify.
2820 (expand_body): Use genrtl_start_function and
2821 genrtl_finish_function.
2822 (genrtl_start_function): New function.
2823 (genrtl_finish_function): Likewise.
2824
2825 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2826
2827 * error.c (cp_tree_printer, case 'P'): Append break.
2828
2829 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
2830
2831 * cp-tree.h (frob_opname): Declare.
2832 * parse.y (saved_scopes): New static variable.
2833 (cp_parse_init): Adjust.
2834 (do_id): If lastiddecl is NULL, do do_identifier.
2835 (operator): Save scope information.
2836 (unoperator): New reduction. Restore scope information.
2837 (operator_name): Append unoperator. Call frob_opname.
2838 * spew.c (frob_opname): Define.
2839
2840 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
2841
2842 * decl.c, rtti.c: Include defaults.h if not already included.
2843 Don't define the *_TYPE_SIZE macros.
2844
2845 2000-09-09 Mark Mitchell <mark@codesourcery.com>
2846
2847 * cp-tree.h (push_switch): Change prototype.
2848 (check_cp_case_value): Remove declaration.
2849 (decl_constant_value): Likewise.
2850 * decl.c (struct cp_switch): Add switch_stmt and cases.
2851 (case_compare): New function.
2852 (push_switch): Set switch_stmt. Initialize cases.
2853 (pop_switch): Clean up cases.
2854 (define_case_label): Rename to ...
2855 (finish_case_label): ... this. Do semantic analysis for case
2856 labels here.
2857 (start_function): Correct comment.
2858 * decl2.c (check_cp_case_value): Remove.
2859 * expr.c (do_case): Remove.
2860 * pt.c (tsubst_expr): Adjust call to finish_case_label.
2861 * semantics.c (genrtl_do_poplevel): Remove declaration.
2862 (RECHAIN_STMTS): Remove.
2863 (finish_break_stmt): Use build_break_stmt.
2864 (finish_continue_stmt): Use build_continue_stmt.
2865 (finish_switch_cond): Adjust condition here, rater than in
2866 c_expand_start_case.
2867 (finish_case_label): Remove.
2868 * typeck.c (c_expand_return): Remove.
2869 (c_expand_start_case): Likewise.
2870
2871 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
2872
2873 * ir.texi: Document type nodes.
2874
2875 2000-09-06 Mark Mitchell <mark@codesourcery.com>
2876
2877 * cp-tree.h (init_cp_semantics): Declare.
2878 (genrtl_try_block): Don't declare.
2879 (genrtl_handler): Likewise.
2880 (genrtl_catch_block): Likewise.
2881 (genrtl_ctor_stmt): Likewise.
2882 (genrtl_subobject): Likewise.
2883 (genrtl_do_poplevel): Likewise.
2884 (genrtl_named_return_value): Likewise.
2885 * lex.c (init_parse): Call init_cp_semantics.
2886 * semantics.c (genrtl_try_block): Give it internal linkage.
2887 (genrtl_handler): Likewise.
2888 (genrtl_catch_block): Likewise.
2889 (genrtl_ctor_stmt): Likewise.
2890 (genrtl_subobject): Likewise.
2891 (genrtl_do_poplevel): Likewise.
2892 (genrtl_named_return_value): Likewise.
2893 (lang_expand_stmt): Rename to ...
2894 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
2895 (init_cp_semantics): Define.
2896
2897 * decl.c (initialize_local_var): Remove RTL-generating code.
2898 * semantics.c (genrtl_try_block): Fix formatting.
2899
2900 Move statement-tree facilities from C++ to C front-end.
2901 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
2902 (void_zero_node): Remove.
2903 (stmt_tree): Likewise.
2904 (scope_chain): Adjust.
2905 (language_function): Rename to cp_language_function.
2906 (cp_function_chain): Adjust.
2907 (current_stmt_tree): Remove.
2908 (last_tree): Likewise.
2909 (last_expr_type): Likewise.
2910 (struct lang_decl): Adjust.
2911 (STMT_IS_FULL_EXPR_P): Remove.
2912 (add_tree): Remove.
2913 (begin_stmt_tree): Likewise.
2914 (finish_stmt_tree): Likewise.
2915 (walk_tree_fn): Likewise.
2916 (walk_stmt_tree): Likewise.
2917 * class.c (finish_struct): Replace use of add_tree with add_stmt.
2918 * decl.c (mark_stmt_tree): Adjust type.
2919 (init_decl_processing): Don't build void_zero_node.
2920 (initialize_local_var): Adjust usage of current_stmt_tree.
2921 (finish_enum): Use add_stmt, not add_tree.
2922 (save_function_data): Adjust use of language_function.
2923 (finish_constructor_body): Use add_stmt, not add_tree.
2924 (finish_destructor_body): Likewise.
2925 (push_cp_function_context): Adjust use of language_function.
2926 (pop_cp_function_context): Likewise.
2927 (mark_lang_function): Likewise.
2928 (mark_cp_function_context): Likewise.
2929 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
2930 (build_vec_init): Likewise.
2931 * semantics.c (SET_LAST_STMT): Remove.
2932 (RECHAIN_STMTS): Don't use it.
2933 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
2934 (current_stmt_tree): Define.
2935 (add_tree): Remove.
2936 (finish_goto_stmt): Use add_stmt, not add_tree.
2937 (finish_expr_stmt): Likewise.
2938 (begin_if_stmt): Likewise.
2939 (finish_then_clause): Likewise.
2940 (begin_while_stmt): Likewise.
2941 (begin_do_stmt): Likewise.
2942 (finish_return_stmt): Likewise.
2943 (begin_for_stmt): Likewise.
2944 (finish_break_stmt): Likewise.
2945 (finish_continue_stmt): Likewise.
2946 (begin_switch_stmt): Likewise.
2947 (finish_case_label): Likewise.
2948 (begin_try_block): Likewise.
2949 (begin_function_try_block): Likewise.
2950 (begin_handler): Likewise.
2951 (begin_catch_block): Likewise.
2952 (begin_compound_stmt): Likewise.
2953 (begin_asm_stmt): Likewise.
2954 (finish_asm_stmt): Likewise.
2955 (finish_label_stmt): Likewise.
2956 (add_decl_stmt): Likewise.
2957 (finish_subobject): Likewise.
2958 (finish_decl_cleanup): Likewise.
2959 (finish_named_return_value): Likewise.
2960 (setup_vtbl_ptr): Likewise.
2961 (add_scope_stmt): Likewise.
2962 (finish_stmt_expr): Likewise.
2963 (prune_unused_decls): Remove.
2964 (begin_stmt_tree): Likewise.
2965 (finish_stmt_tree): Likewise.
2966 (prep_stmt): Adjust use of current_stmt_tree.
2967 (lang_expand_stmt): Likewise.
2968 * tree.c (statement_code_p): Remove.
2969 (cp_statement_code_p): New function.
2970 (walk_stmt_tree): Remove.
2971 (init_tree): Set lang_statement_code_p.
2972
2973 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
2974
2975 Integrated preprocessor.
2976
2977 * Make-lang.in, Makefile.in: Remove all references to input.c,
2978 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
2979 * gxx.gperf, hash.h, input.c: Delete.
2980 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
2981 initialized properly.
2982
2983 * class.c (fixup_pending_inline): Take a tree, not a
2984 struct pending_inline *. All callers changed.
2985 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
2986 RID_PROTECTED entries in ridpointers[] array here.
2987 * decl.c (duplicate_decls): Do not refer to struct
2988 pending_inline.
2989 (record_builtin_type, init_decl_processing): Use RID_MAX not
2990 CP_RID_MAX.
2991 (grokdeclarator): Use C_IS_RESERVED_WORD.
2992 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
2993 cpplib.
2994 (grok_x_components): Do not inspect pending_inlines chain.
2995
2996 * cp-tree.h (struct lang_identifier): Add rid_code entry.
2997 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
2998 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
2999 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
3000 TIME_IDENTIFIER_FILEINFO): Kill.
3001 Update prototypes.
3002 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
3003 single 32-bit word.
3004 * parse.y: Call do_pending_inlines unconditionally.
3005 reinit_parse_for_method is now snarf_method. fn.defpen is no
3006 longer necessary. Remove unnecessary <itype> annotation on
3007 SCOPE. Do not refer to end_of_file or struct pending_inline.
3008 * semantics.c (begin_inline_definitions): Call
3009 do_pending_inlines unconditionally.
3010
3011 * lex.c: Remove all code now shared with C front end.
3012 Initialize cpplib properly if USE_CPPLIB. Put reserved words
3013 into the get_identifier table. Rewrite pragma handling to
3014 work with the registry. Move code to save tokens for later
3015 processing to spew.c.
3016
3017 * spew.c: Rewrite everything in terms of token streams instead
3018 of text. Move routines here from lex.c / input.c as
3019 appropriate. GC-mark trees hanging off the pending inlines
3020 chain.
3021
3022 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3023
3024 * NEWS: Mention that the named return value extension has been
3025 deprecated.
3026 * cp-tree.h (original_result_rtx): Define.
3027 (TREE_REFERENCE_EXPR): Remove.
3028 (DECL_VPARENT): Likewise.
3029 (pushdecl_nonclass_level): Likewise.
3030 (store_return_init): Likewise.
3031 (reinit_lang_specific): Likewise.
3032 (genrtl_named_return_value): Change prototype.
3033 * decl.c (original_result_rtx): Remove.
3034 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
3035 Do not generate RTL for local variables here.
3036 (store_return_init): Remove.
3037 * semantics.c (genrtl_named_return_value): Simplify. Fold in
3038 store_return_init.
3039 (finish_named_return_value): Adjust accordingly. Warn that this
3040 extension is deprecated.
3041 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
3042
3043 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3044
3045 * pt.c (type_unification_real): Replace switch with if.
3046 (unify): Tsubst non-type parms before comparing.
3047
3048 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3049
3050 * error.c (dump_typename): New function, broken out of ...
3051 (dump_type): ... here. Use it.
3052 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
3053
3054 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3055
3056 * init.c (build_offset_ref): Deal with namespace scoped
3057 TEMPLATE_ID_EXPRs.
3058
3059 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3060
3061 * class.c (resolve_address_of_overloaded_function): Add
3062 explanation message.
3063 * decl.c (define_case_label): Reformat explanation.
3064 * decl2.c (finish_static_data_member_decl): Likewise.
3065 (grokfield): Likewise.
3066 * friend.c (do_friend): Likewise.
3067
3068 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
3069
3070 * tree.c (walk_tree): Expose tail recursion.
3071 (walk_stmt_tree): New function.
3072 * cp-tree.h: Prototype walk_stmt_tree.
3073 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
3074 the BLOCKs directly. If a BLOCK has no variables after
3075 pruning, discard it.
3076 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
3077 restore the line number.
3078
3079 2000-09-05 Mark Mitchell <mark@codesourcery.com>
3080
3081 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
3082 (pt.o): Remove dependency on HTAB_H.
3083 * cp-tree.h: Include hashtab.h.
3084 (walk_tree): Change prototype.
3085 (walk_tree_without_duplicates): New function.
3086 * decl.c (check_default_argument): Use it.
3087 * optimize.c (remap_decl): Adjust calls to walk_tree.
3088 (copy_body): Likewise.
3089 (expand_calls_inline): Likewise.
3090 (calls_setjmp_p): Use walk_tree_without_duplicates.
3091 * pt.c: Don't include hashtab.h.
3092 (for_each_template_parm): Use walk_tree_without_duplicates.
3093 * semantics.c (finish-stmt_tree): Likewise.
3094 (expand_body): Likewise.
3095 * tree.c (walk_tree): Add additional parameter.
3096 (walk_tree_without_duplicates): New function.
3097 (count_trees): Use it.
3098 (verify_stmt_tree): Adjust call to walk_tree.
3099 (find_tree): Use walk_tree_without_duplicates.
3100 (no_linkage_check): Likewise.
3101 (break_out_target_exprs): Adjust call to walk_tree.
3102 (cp_unsave): Likewise.
3103
3104 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3105
3106 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
3107 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3108 * cp-tree.h (TYPE_BINFO): Adjust comment.
3109 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
3110 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
3111 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3112 (TYPE_TEMPLATE_INFO): Likewise.
3113 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
3114 * class.c (push_nested_class): Likewise.
3115 * decl.c (lookup_name_real): Likewise.
3116 (grokdeclarator): Likewise.
3117 (grok_op_properties): Likewise.
3118 (xref_tag): Likewise.
3119 (xref_basetypes): Likewise.
3120 * decl2.c (constructor_name_full): Likewise.
3121 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
3122 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3123 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
3124 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3125 (dump_type_suffix): Likewise.
3126 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
3127 instead.
3128 (get_aggr_from_typedef): Likewise.
3129 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
3130 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3131 (write_template_parm): Likewise.
3132 (write_template_template_parm): Check tree code instead of
3133 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3134 * method.c (build_overload_nested_name): Add
3135 BOUND_TEMPLATE_TEMPLATE_PARM.
3136 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
3137 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3138 * pt.c (convert_template_argument): Check tree code instead of
3139 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3140 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
3141 (for_each_template_parm): Adjust comment.
3142 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
3143 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3144 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
3145 template_args_equal to compare template template parameter cases.
3146 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3147 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
3148 instead.
3149 * tree.c (copy_template_template_parm): Decide whether to create
3150 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
3151 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3152 (copy_tree_r): Likewise.
3153 * typeck.c (comptypes): Likewise. Check tree code instead of
3154 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3155
3156 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
3157
3158 * decl.c (finish_function): Move the code for handling functions
3159 marked with the constructor and destructor attributes inside the
3160 expand_p block.
3161
3162 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3163
3164 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
3165
3166 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3167
3168 * pt.c (lookup_template_class): Remove abort.
3169 * tree.c (get_type_decl): Allow error_mark_node.
3170
3171 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
3172
3173 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
3174 TEMPLATE_ID_EXPRs.
3175
3176 2000-09-03 Mark Mitchell <mark@codesourcery.com>
3177
3178 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
3179 new ABI mangling.
3180
3181 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3182
3183 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
3184 union tag mismatch error reporting.
3185
3186 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
3187
3188 * call.c (build_scoped_method_call): Check it is not a namespace.
3189
3190 2000-08-30 Jason Merrill <jason@redhat.com>
3191
3192 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
3193
3194 * tree.c (bot_manip): Check TREE_CONSTANT rather than
3195 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
3196 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
3197
3198 * decl.c (start_function): Always call make_function_rtl.
3199
3200 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3201
3202 * semantics.c (prune_unused_decls): New function.
3203 (finish_stmt_tree): Call it via walk_tree.
3204
3205 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
3206
3207 * class.c (build_secondary_vtable): Constify a char *.
3208 * decl.c (init_decl_processing): Initialize function_id_node,
3209 pretty_function_id_node, and func_id_node.
3210 * input.c (struct input_source): Constify 'str'.
3211 (feed_input): Constify first argument.
3212 * mangle.c (write_identifier): Constify argument.
3213 * pt.c (mangle_class_name_for_template): Constify argument.
3214
3215 2000-08-29 Mark Mitchell <mark@codesourcery.com>
3216
3217 * typeck.c (mark_addressable): Remove code that pokes around in
3218 RTL.
3219
3220 2000-08-28 Jason Merrill <jason@redhat.com>
3221
3222 * lex.c (file_name_nondirectory): Move to toplev.c.
3223
3224 * cp-tree.h (LOCAL_CLASS_P): New macro.
3225 * class.c (finish_struct_1): Use it.
3226
3227 2000-08-27 Alex Samuel <samuel@codesourcery.com>
3228
3229 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
3230 (write_encoding): Pass another argument to write_name.
3231 (write_name): Add ignore_local_scope parameter. Fix handling of
3232 local names.
3233 (write_nested_name): Use write_unqualified_name.
3234 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
3235 (write_template_prefix): Use write_unqualified_name.
3236 (write_component): Remove.
3237 (write_local_name): Add parameter. Use direct local entity to
3238 discriminator calculation.
3239 (write_class_enum_type): Pass another argument to write_name.
3240 (write_template_template_arg): Likewise.
3241 (make_guard_variable): Likewise.
3242
3243 2000-08-27 Jason Merrill <jason@redhat.com>
3244
3245 * decl.c (pushdecl): Matching decls for local externs are found in
3246 the current level. Propagate linkage information from previous
3247 declarations.
3248
3249 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
3250
3251 * ir.texi (Expressions): Fix typo.
3252
3253 2000-08-25 Greg McGary <greg@mcgary.org>
3254
3255 * tree.c (init_tree): Use ARRAY_SIZE.
3256
3257 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3258
3259 * error.c (cp_tree_printer): Rework.
3260
3261 2000-08-25 Mark Mitchell <mark@codesourcery.com>
3262
3263 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
3264 dyn-string.o.
3265 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
3266 (cp-demangle.o): Remove target.
3267 (dyn-string.o): Likewise.
3268
3269 * decl.c (grokfndecl): Require that `main' return an `int'.
3270 * mangle.c (write_encoding): Don't mangle return types for
3271 conversion functions.
3272
3273 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
3274
3275 * error.c (tree_formatting_info): New data type.
3276 (tree_being_formatted): New macro.
3277 (tree_formatting_flags): Likewise.
3278 (put_whitespace): Likewise.
3279 (print_tree_identifier): Likewise.
3280 (print_identifier): Likewise.
3281 (cp_tree_printer, print_function_argument_list, print_declaration,
3282 print_expression, print_function_declaration,
3283 print_function_parameter, print_type, print_cv_qualifier): New
3284 functions.
3285 (init_error): Initialize lang_printer.
3286
3287 2000-08-24 Jason Merrill <jason@redhat.com>
3288
3289 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
3290 adjustment necessary.
3291
3292 2000-08-24 Greg McGary <greg@mcgary.org>
3293
3294 * cp-tree.h (MAIN_NAME_P): Remove macro.
3295
3296 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
3297
3298 * error.c (print_instantiation_context): Don't forget to flush the
3299 buffer.
3300
3301 2000-08-23 Jason Merrill <jason@redhat.com>
3302
3303 * typeck.c (build_ptrmemfunc): Save the input pmf.
3304
3305 * method.c (process_modifiers): Use same_type_p.
3306
3307 2000-08-23 Mark Mitchell <mark@codesourcery.com>
3308
3309 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
3310 * mangle.c (write_function_type): Change prototype.
3311 (write_encoding): Don't mangle return types for
3312 constructors or destructors.
3313 (write_type): Adjust call to write_function_type.
3314 * pt.c (instantiate_template): Instantiate alternate entry points
3315 when instantiating the main function.
3316
3317 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3318
3319 * error.c (cp_print_error_function): Don't use embedded '\n' in
3320 output_printf.
3321
3322 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
3323
3324 * decl.c (init_decl_processing): Remove bogus initialization.
3325 * error.c (lang_print_error_function): Restore here.
3326 (init_error): Initialize print_error_function.
3327
3328 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3329
3330 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
3331
3332 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
3333
3334 * Makefile.in (error.o): Depends on diagnostic.h
3335
3336 * cp-tree.h (problematic_instantiation_changed,
3337 record_last_problematic_instantiation, current_instantiation,
3338 print_instantiation_context): Declare.
3339 (maybe_print_template_context): Remove.
3340
3341 * decl.c (init_decl_processing): Set print_error_function to NULL.
3342 (lang_print_error_function): Remove, since we're using a new
3343 machinery.
3344
3345 * error.c: #include diagnostic.h
3346 (function_category): New function.
3347 (cp_diagnostic_starter): Likewise.
3348 (cp_diagnostic_finalizer): Likewise.
3349 (cp_print_error_function): Likewise.
3350 (maybe_print_instantiation_context): Likewise.
3351 (print_instantiation_full_context): Likewise.
3352 (print_instantiation_partial_context): Likewise.
3353 (print_instantiation_context): Define.
3354 (init_error): Initialize diagnostic pager and finalizer.
3355
3356 * pt.c (problematic_instantiation_changed): Define.
3357 (record_last_problematic_instantiation): Likewise.
3358 (current_instantiation): Likewise.
3359 (maybe_print_template_context): Remove.
3360 (print_template_context): Likewise.
3361 (current_tinst_level): Make static to reflect Brendan Kehoe's
3362 change of 1995-04-13.
3363 (push_tinst_level): Call print_instantiation_context.
3364
3365 2000-08-21 Nix <nix@esperi.demon.co.uk>
3366
3367 * lang-specs.h: Do not process -o or run the assembler if
3368 -fsyntax-only.
3369
3370 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
3371
3372 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
3373 variables.
3374 * decl2.c (lang_decode_option): Disable gettext attributes for
3375 -ansi.
3376
3377 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
3378
3379 * lex.c (lang_init_options): Default diagnostic message maximum
3380 length to 80, when line-wrapping.
3381
3382 2000-08-20 Mark Mitchell <mark@codesourcery.com>
3383
3384 * class.c (build_vtbl_initializer): Clear the entire
3385 vtbl_init_data. Start keeping track of the functions for which we
3386 have created vcall offsets here.
3387 (dfs_build_vcall_offset_vtbl_entries): Remove.
3388 (build_vcall_offset_vtbl_entries): Reimplement.
3389 (add_vcall_offset_vtbl_entries_r): New function.
3390 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
3391 computing when vcall offsets are necessary.
3392
3393 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3394
3395 * decl.c (member_function_or_else): Use cp_error ... %T.
3396 (grokdeclarator): Likewise.
3397 (start_method): Likewise.
3398 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
3399
3400 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3401
3402 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
3403 TYPE_DECLs.
3404
3405 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3406
3407 * cp-tree.h (PTRMEM_OK_P): New macro.
3408 (itf_ptrmem_ok): New enumeration value.
3409 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
3410 argument. Diagnose implicit pointer to member.
3411 (instantiate_type): Don't diagnose implicit pointer to member
3412 here. Pass itf_ptrmem_ok if ok. Adjust calls to
3413 resolve_address_of_overloaded_function.
3414 * init.c (build_offset_ref): Set PTRMEM_OK_P.
3415 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
3416 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
3417 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
3418 (build_unary_op): Deal with single non-static member in
3419 microsoft-land.
3420
3421 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3422
3423 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
3424
3425 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
3426
3427 * cp-tree.h (enum_name_string): Remove prototype.
3428 (report_case_error): Remove prototype.
3429 * cp/typeck2.c (enum_name_string): Remove.
3430 (report_case_error): Remove.
3431 * error.c (dump_expr): Deal with enum values directly.
3432 Correctly negate integer constant.
3433
3434 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3435
3436 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
3437 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
3438 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
3439 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
3440 (__cxa_vec_new): Use __cxa_vec_new2.
3441 (__cxa_vec_delete): Use __cxa_vec_delete2.
3442
3443 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3444
3445 * vec.cc (__cxa_vec_new): Set "C" linkage.
3446 (__cxa_vec_ctor): Likewise.
3447 (__cxa_vec_cctor): Likewise.
3448 (__cxa_vec_dtor): Likewise.
3449 (__cxa_vec_delete): Likewise.
3450 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
3451 (__cxa_vec_ctor): Likewise.
3452 (__cxa_vec_cctor): Likewise.
3453 (__cxa_vec_dtor): Likewise.
3454 (__cxa_vec_delete): Likewise.
3455
3456 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3457
3458 * class.c (instantiate_type): Reinstate local variable
3459 deleted in previous change.
3460
3461 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
3462 itf_no_attributes.
3463
3464 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3465
3466 * cp-tree.h (instantiate_type_flags): New enumeration.
3467 (instantiate_type): Change parameter.
3468 * class.c (instantiate_type): Adjust prototype. Adjust.
3469 * call.c (standard_conversion): Adjust instantiate_type call.
3470 (reference_binding): Likewise.
3471 (build_op_delete_call): Likewise.
3472 (convert_like_real): Likewise.
3473 * cvt.c (cp_convert_to_pointer): Likewise.
3474 (convert_to_reference): Likewise.
3475 * pt.c (convert_nontype_argument): Likewise.
3476 * typeck.c (build_binary_op): Likewise.
3477 (build_ptrmemfunc): Likewise.
3478 (convert_for_assignment): Likewise.
3479
3480 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
3481
3482 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
3483 (current_aggr): Define.
3484 * decl.c (grokdeclarator): Make sure a friend class is an
3485 elaborated type specifier.
3486 * parse.y (current_aggr): Remove static definition.
3487 (cp_parse_init): Adjust.
3488 (structsp): Clear and restore current_aggr.
3489 (component_decl_list): Clear current_aggr.
3490
3491 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
3492 aggregate tag on the typename's context.
3493
3494 * pt.c (tsubst_friend_class): Return error_mark_node, if
3495 parms becomes NULL.
3496 (instantiate_class_template): Ignore error_mark_node friend types.
3497
3498 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
3499
3500 * cvt.c (warn_ref_binding): New static function, broken out of ...
3501 (convert_to_reference): ... here. Use it.
3502
3503 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
3504
3505 * parse.y (template_arg): Add rule for template qualified with
3506 global scope.
3507
3508 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3509
3510 * decl2.c (add_function): Reorganize.
3511 (arg_assoc): Do not consider function template decls.
3512
3513 2000-08-11 Jason Merrill <jason@redhat.com>
3514
3515 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
3516 looking inside.
3517
3518 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3519
3520 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
3521 (lookup_nested_tag): Likewise.
3522
3523 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
3524 can be produced.
3525
3526 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3527
3528 * parse.y (named_complex_class_head_sans_basetype): Remove
3529 always true if.
3530
3531 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3532
3533 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
3534 explicit TEMPLATE_ID_EXPR args.
3535 (build_expr_from_tree, case CALL_EXPR): Likewise.
3536
3537 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
3538
3539 * decl.c (check_tag_decl): Diagnose typename's which don't
3540 declare anything.
3541
3542 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
3543
3544 * init.c (build_aggr_init): Reject bogus array initializers
3545 early.
3546
3547 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3548
3549 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
3550 runtime.
3551 * cp/tinfo.cc (__dynamic_cast): Likewise.
3552 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
3553
3554 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
3555
3556 * cvt.c (convert_to_pointer_force): Fix error message when
3557 attempting to cast from ambiguous base.
3558
3559 2000-08-08 Jason Merrill <jason@redhat.com>
3560
3561 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
3562 (tsubst_template_arg_vector): Likewise.
3563
3564 * decl2.c (build_anon_union_vars): Choose the largest field; don't
3565 assume that one will be as large as the union.
3566
3567 2000-08-07 Kazu Hirata <kazu@hxi.com>
3568
3569 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
3570 * decl.c (pop_labels): Likewise.
3571
3572 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
3573
3574 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
3575 specifications.
3576 (__pointer_to_member_type_info): Likewise.
3577 (__base_class_info): Likewise.
3578 (__class_type_info): Likewise.
3579 (__si_class_type_info): Likewise.
3580 (__vmi_class_type_info): Likewise.
3581 * tinfo.cc (__si_class_type_info::__do_find_public_src):
3582 Changed member names to match specifications.
3583 (__vmi_class_type_info::__do_find_public_src): Likewise.
3584 (__si_class_type_info::__do_dyncast): Likewise.
3585 (__vmi_class_type_info::__do_dyncast): Likewise.
3586 (__si_class_type_info::__do_upcast): Likewise.
3587 (__vmi_class_type_info::__do_upcast): Likewise.
3588 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
3589 (__pbase_type_info::__pointer_catch): Likewise.
3590 (__pointer_type_info::__pointer_catch): Likewise.
3591 (__pointer_to_member_type_info::__pointer_catch): Likewise.
3592
3593 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
3594
3595 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
3596 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
3597 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
3598
3599 2000-08-04 Mark Mitchell <mark@codesourcery.com>
3600
3601 * cp-tree.h (add_method): Change prototype.
3602 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
3603 Don't double the size of the method vector in the error case.
3604 (handle_using_decl): Adjust call to add_method.
3605 (add_implicitly_declared_members): Likewise.
3606 (clone_function_decl): Likewise.
3607 * decl2.c (check_classfn): Likewise.
3608 * semantics.c (finish_member_declaration): Likewise.
3609
3610 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
3611
3612 * decl.c (flag_isoc94): New variable.
3613
3614 2000-08-02 Jason Merrill <jason@redhat.com>
3615
3616 * pt.c (do_type_instantiation): Add complain parm; don't complain
3617 if called recursively.
3618 * cp-tree.h, parse.y: Adjust.
3619
3620 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
3621
3622 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
3623 -Wno-strict-prototypes.
3624
3625 * g++spec.c: Adjust type of second argument to
3626 lang_specific_driver, and update code as necessary.
3627
3628 * cp-tree.h: Don't prototype min_precision here.
3629 (my_friendly_assert): Cast expression to void.
3630 * semantics.c (do_poplevel): Initialize scope_stmts.
3631
3632 2000-08-02 Mark Mitchell <mark@codesourcery.com>
3633
3634 * cp-tree.h (DECL_NEEDED_P): Tweak.
3635
3636 2000-07-28 Jason Merrill <jason@redhat.com>
3637
3638 * lang-specs.h: Use %i in rule for .ii files.
3639
3640 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
3641
3642 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
3643
3644 2000-07-30 Mark Mitchell <mark@codesourcery.com>
3645
3646 Allow indirect primary bases.
3647 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
3648 primary_base.
3649 (CLASSTYPE_VFIELD_PARENT): Remove.
3650 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
3651 (BINFO_PRIMARY_BINFO): Remove.
3652 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
3653 (BINFO_VBASE_PRIMARY_P): Likewise.
3654 (BINFO_PRIMARY_BASE_OF): New macro.
3655 (BINFO_INDIRECT_PRIMARY_P): Likewise.
3656 (get_primary_binfo): New function.
3657 * decl.c (lang_mark_tree): Make lang_type::primary_base.
3658 * class.c (vcall_offset_data_s): Rename to ...
3659 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
3660 and add ctor_vtbl_p.
3661 (get_derived_offset): Use get_primary_binfo.
3662 (dfs_mark_primary_bases): Adjust handling of virtual primary
3663 bases.
3664 (mark_primary_bases): Likewise.
3665 (set_primary_base): Take a binfo, not an integer, as a
3666 representation of the primary base.
3667 (indirect_primary_base_p): Remove.
3668 (determine_primary_base): Adjust for indirect primary bases.
3669 (dfs_find_final_overrider): Fix typo in coment.
3670 (update_vtable_entry_for_fn): Use get_primary_binfo.
3671 (layout_nonempty_base_or_field): Tweak.
3672 (build_base_fields): Adjust for new primary base semantics.
3673 (dfs_propagate_binfo_offsets): Remove.
3674 (propagate_binfo_offsets): Rewrite.
3675 (dfs_set_offset_for_shared_vbases): Remove.
3676 (layout_virtual_bases): Don't use it.
3677 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3678 ABI.
3679 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3680 CLASSTYPE_VFIELD_PARENT.
3681 (dfs_get_primary_binfo): New function.
3682 (get_primary_binfo): Likewise.
3683 (dump_class_hierarchy_r): Tweak printing of primary bases.
3684 (build_vtbl_initializer): Fix typo in comments. Use
3685 vtbl_init_data.
3686 (build_vcall_and_vbase_vtbl_entries): Likewise.
3687 (build_vbaes_offset_vtbl_entries): Likewise.
3688 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3689 BV_VCALL_INDEX to handle indirect primary bases.
3690 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3691 (build_rtti_vtbl_entries): Likewise.
3692 * search.c (get_shared_vbase_if_not_primary): Tweak.
3693 (find_vbase_instance): Likewise.
3694 (binfo_for_vtable): Simplify.
3695 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3696 (make_binfo): Make it have 11 entries.
3697
3698 2000-07-30 Alex Samuel <samuel@codesourcery.com>
3699
3700 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3701 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3702 ascertaining primaryness.
3703 (G): Remove template_args.
3704 (decl_is_template_id): New function.
3705 (write_encoding): Use decl_is_template_id.
3706 (write_name): Likewise. Handle type_decls. Get main variant of
3707 type decls.
3708 (write_nested_name): Likewise.
3709 (write_prefix): Likewise.
3710 (write_template_prefix): Likewise.
3711 (write_special_name_constructor): Remove defunct production from
3712 comment.
3713 (write_bare_function_type): Remove comment about absent parameter.
3714 (write_template_template_arg): Add missing grammar production to
3715 comment.
3716
3717 2000-07-27 Jason Merrill <jason@redhat.com>
3718
3719 * decl.c (duplicate_decls): If common_type produces a non-typedef
3720 type for a typedef, just use the old type.
3721
3722 2000-07-27 Mark Mitchell <mark@codesourcery.com>
3723
3724 * cp-tree.h (function_depth): Declare.
3725 (verify_stmt_tree): Likewise.
3726 (find_tree): Likewise.
3727 * decl.c (function_depth): Give it external linkage.
3728 * optimize.c (optimize_function): Increment and decrement it.
3729 * tree.c (verify_stmt_tree_r): New function.
3730 (verify_stmt_tree): Likewise.
3731 (find_tree_r): Likewise.
3732 (find_tree): Likewise.
3733
3734 2000-07-27 Jason Merrill <jason@redhat.com>
3735
3736 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3737 TYPE_PTRMEMFUNC_P.
3738 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3739
3740 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3741
3742 * decl.c (start_cleanup_fn): Mark the function as `inline'.
3743 * decl2.c (get_guard): Call cp_finish_decl, not
3744 rest_of_decl_compilation, for local guards.
3745 * lex.c (do_identifier): Remove unused variable.
3746
3747 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
3748
3749 * parse.y: Add missing ';'.
3750
3751 2000-07-26 Mark Mitchell <mark@codesourcery.com>
3752
3753 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
3754 of `extern "C++"'.
3755
3756 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3757
3758 Kill strict_prototype. Backwards compatibility only for
3759 non NO_IMPLICIT_EXTERN_C systems.
3760 * cp-tree.h (flag_strict_prototype): Remove.
3761 (strict_prototype): Remove.
3762 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3763 * decl.c (maybe_push_to_top_level): Adjust.
3764 (pop_from_top_level): Adjust.
3765 (decls_match): Only allow sloppy parm matching for ancient
3766 system headers.
3767 (init_decl_processing): Adjust.
3768 (grokdeclarator): Adjust.
3769 * decl2.c (flag_strict_prototype): Remove.
3770 (strict_prototype): Remove.
3771 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3772 (lang_f_options): Remove "strict-prototype".
3773 (unsupported-options): Add "strict-prototype".
3774 * lex.c (do_identifier): Adjust.
3775 (do_scoped_id): Adjust.
3776 * parse.y (empty_parms): Adjust.
3777 * class.c (push_lang_context): Adjust.
3778 (pop_lang_context): Adjust.
3779 * typeck.c (comp_target_parms): Adjust.
3780
3781 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
3782
3783 * decl.c (poplevel): Deal with anonymous variables at for scope.
3784 (maybe_inject_for_scope_var): Likewise.
3785
3786 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
3787
3788 * decl.c: Remove all signal handling code, now done in toplev.c.
3789
3790 2000-07-23 Mark Mitchell <mark@codesourcery.com>
3791
3792 * decl.c (make_rtl_for_nonlocal_decl): Rework.
3793
3794 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
3795 correctly.
3796
3797 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
3798
3799 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
3800 Define my_friendly_assert and my_friendly_abort as macros
3801 which may call friendly_abort. Prototype friendly abort, not
3802 my_friendly_abort or my_friendly_assert.
3803 * decl.c (signal_catch): Report the signal caught in the error
3804 message. Call fatal directly.
3805 * typeck2.c (ack, my_friendly_assert): Delete.
3806 (my_friendly_abort): Rename to friendly_abort. Expect file,
3807 line, and function parameters. Report the abort code, then
3808 call fancy_abort. Do not mask an abort if errors have
3809 already occurred.
3810
3811 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
3812
3813 * typeck.c (comp_target_parms): Remove obsolete parameter.
3814 (comp_target_types): Adjust.
3815
3816 2000-07-17 Jason Merrill <jason@redhat.com>
3817
3818 * typeck.c (mark_addressable): Never set TREE_USED.
3819 * call.c (build_call): Don't abort on calls to library functions
3820 that have been declared normally.
3821
3822 * typeck.c (build_binary_op): Fix grammar in warning.
3823
3824 * exception.cc (__eh_free): Fix prototype.
3825
3826 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
3827
3828 * decl.c (pushdecl): Handle seeing an OVERLOAD in
3829 IDENTIFIER_NAMESPACE_VALUE.
3830
3831 2000-07-16 Mark Mitchell <mark@codesourcery.com>
3832
3833 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
3834 * method.c (use_thunk): Correct handling of vcall offsets.
3835
3836 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
3837
3838 * .cvsignore: parse.h and parse.c have no cp- prefix.
3839
3840 2000-07-13 Mark Mitchell <mark@codesourcery.com>
3841
3842 * .cvsignore: New file.
3843
3844 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
3845
3846 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
3847
3848 2000-07-12 Mark Mitchell <mark@codesourcery.com>
3849
3850 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
3851 * parse.c: Remove.
3852 * parse.h: Likewise.
3853
3854 2000-07-11 Mark Mitchell <mark@codesourcery.com>
3855
3856 * class.c (layout_class_type): Add pointers to virtual bases after
3857 base classes under the old ABI.
3858
3859 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
3860
3861 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
3862 (finish_continue_stmt): Likewise.
3863 (begin_for_stmt): Remove call to note_level_for_for.
3864 (finish_goto_stmt): Change call from build_min_nt
3865 to build_stmt.
3866 (finish_expr_stmt): Likewise.
3867 (begin_if_stmt): Likewise.
3868 (begin_while_stmt): Likewise.
3869 (finish_while_stmt): Likewise.
3870 (finish_return_stmt): Likewise.
3871 (begin_for_stmt): Likewise.
3872 (finish_for_stmt): Likewise.
3873 (finish_break_stmt): Likewise.
3874 (begin_switch_stmt): Likewise.
3875 (finish_case_label): Likewise.
3876 (genrtl_try_block): Likewise.
3877 (begin_try_block): Likewise.
3878 (begin_handler): Likewise.
3879 (begin_compound_stmt): Likewise.
3880 (finish_asm_stmt): Likewise.
3881 (finish_label_stmt): Likewise.
3882 (add_decl_stmt): Likewise.
3883 (finish_subobject): Likewise.
3884 (finish_decl_cleanup): Likewise.
3885 (finish_named_return_value): Likewise.
3886 (setup_vtbl_ptr): Likewise.
3887 (add_scope_stmt): Likewise.
3888 * decl.c (finish_constructor_body): Likewise.
3889 (finish_destructor_body): Likewise.
3890 * optimize.c (copy_body_r): Likewise.
3891 (initialize_inlined_parameters): Likewise.
3892 (declare_return_variable): Likewise.
3893 (expand_call_inline): Likewise.
3894
3895 2000-07-10 Jakub Jelinek <jakub@redhat.com>
3896
3897 * semantics.c (expand_body): Sync interface information
3898 at the end of function body expansion.
3899
3900 2000-07-09 Jason Merrill <jason@redhat.com>
3901
3902 * init.c (build_new_1): Bail early if the call to new fails.
3903
3904 * decl.c (compute_array_index_type): Check specifically for
3905 an INTEGER_CST, not just TREE_CONSTANT.
3906
3907 * decl.c (duplicate_decls): Don't call duplicate_decls on
3908 the DECL_TEMPLATE_RESULT.
3909 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
3910 codes.
3911
3912 * error.c (dump_template_bindings): Don't crash if we had an
3913 invalid argument list.
3914
3915 * typeck.c (c_expand_start_case): Do narrowing here.
3916 * semantics.c (finish_switch_cond): Not here.
3917
3918 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
3919
3920 * parse.y (asm_clobbers): Do string concatenation.
3921
3922 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3923
3924 * decl.c (pushtag): Don't put local classes in template functions
3925 on the local_classes list.
3926
3927 2000-07-04 Scott Snyder <snyder@fnal.gov>
3928
3929 * decl2.c (get_guard): Add missing return for old ABI local
3930 variable case.
3931
3932 2000-07-09 Mark Mitchell <mark@codesourcery.com>
3933
3934 * cp-tree.h (char_type_p): New function.
3935 * decl.c (init_decl_processing): Don't initialize
3936 signed_wchar_type_node or unsigned_wchar_type_node.
3937 (complete_array_type): Handle brace-enclosed string-constants.
3938 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
3939 * tree.c (char_type_p): New function.
3940 * typeck2.c (digest_init): Use char_type_p.
3941
3942 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3943
3944 * pt.c (tsubst): Don't layout type, if it's error_mark.
3945
3946 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
3947
3948 * pt.c (instantiate_pending_templates): Reset template level.
3949
3950 2000-07-05 Jason Merrill <jason@redhat.com>
3951
3952 * call.c (joust): Don't complain about `operator char *()' beating
3953 `operator const char *() const'.
3954
3955 2000-07-04 scott snyder <snyder@fnal.gov>
3956 Jason Merrill <jason@redhat.com>
3957
3958 * repo.c (repo_get_id): Handle the case where a class with virtual
3959 bases has a null TYPE_BINFO_VTABLE.
3960
3961 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
3962 Jason Merrill <jason@redhat.com>
3963
3964 * parse.y (member_init): Just pass in the type.
3965 * init.c (expand_member_init): Handle getting a type.
3966
3967 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3968 Jason Merrill <jason@redhat.com>
3969
3970 * decl.c (finish_function): Warn if a function has no return
3971 statement.
3972 Suggested by Andrew Koenig.
3973 * typeck.c (check_return_expr): Do set current_function_returns_value
3974 if we got an error_mark_node.
3975
3976 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3977
3978 * decl2.c (push_decl_namespace): Push the original namespace.
3979
3980 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
3981
3982 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
3983 * semantics.c (begin_class_definition): Clear it.
3984
3985 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
3986
3987 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
3988 (genrtl_expr_stmt): Likewise.
3989 (genrtl_decl_stmt): Likewise.
3990 (genrtl_if_stmt): Likewise.
3991 (genrtl_while_stmt): Likewise.
3992 (genrtl_do_stmt): Likewise.
3993 (genrtl_return_stmt): Likewise.
3994 (genrtl_for_stmt): Likewise.
3995 (genrtl_break_stmt): Likewise.
3996 (genrtl_continue_stmt): Likewise.
3997 (genrtl_scope_stmt): Likewise.
3998 (genrtl_switch_stmt): Likewise.
3999 (genrtl_case_label): Likewise.
4000 (genrtl_begin_compound_stmt): Likewise.
4001 (genrtl_finish_compound_stmt): Likewise.
4002 (genrtl_compound_stmt): Likewise.
4003 (genrtl_asm_stmt): Likewise.
4004
4005 * init.c (begin_init_stmts): Remove call to
4006 genrtl_begin_compound_stmt.
4007 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
4008
4009 * semantics.c (lang_expand_stmt): Changed call to
4010 genrtl_compound_stmt to ignore return value.
4011
4012 2000-07-02 Mark Mitchell <mark@codesourcery.com>
4013
4014 * mangle.c (canonicalize_for_substitution): Return the canonical
4015 variant of a type.
4016
4017 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
4018 TYPE_DECL.
4019 * typeck.c (commonparms): Remove obstack manipulations.
4020
4021 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
4022
4023 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
4024
4025 * Makefile.in (OBJS): Added ../c-semantics.o.
4026 (OBJDEPS): Likewise.
4027
4028 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
4029 ../c-common.h.
4030 (struct stmt_tree): Added comment.
4031 (current_function_name_declared): Removed.
4032 (stmts_are_full_exprs_p): Likewise.
4033 (genrtl_do_pushlevel): Likewise.
4034 (genrtl_clear_out_block): Likewise.
4035 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
4036 (DECL_ANON_UNION_ELEMS): Likewise.
4037 (emit_local_var): Likewise.
4038 (make_rtl_for_local_static): Likewise.
4039 (do_case): Likewise.
4040 (expand_stmt): Likewise.
4041 (genrtl_decl_cleanup): Likewise.
4042 (c_expand_asm_operands): Likewise.
4043 (c_expand_return): Likewise.
4044 (c_expand_start_case): Likewise.
4045
4046 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
4047 (emit_local_var): Likewise.
4048 (initialize_local_var): Change reference to
4049 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4050 Change reference to stmts_are_full_exprs_p to
4051 current_stmt_tree->stmts_are_full_exprs_p.
4052 (push_cp_function_context): Likewise.
4053
4054 * expect.c (expand_throw): Change reference to
4055 stmts_are_full_exprs_p.
4056
4057 * init.c (build_aggr_init): Change reference to
4058 stmts_are_full_exprs_p.
4059 (build_vec_init): Likewise.
4060
4061 * optimize.c (maybe_clone_body): Change reference to
4062 current_function_name_declared to
4063 cp_function_chain->name_declared.
4064
4065 * pt.c (instantiate_decl): Change reference to
4066 current_function_name_declared to
4067 cp_function_chain->name_declared.
4068
4069 * semantics.c (expand_cond): Moved declaration to c-common.h.
4070 (genrtl_do_pushlevel): Moved to c-semantics.c.
4071 (genrtl_clear_out_block): Likewise.
4072 (genrtl_goto_stmt): Likewise.
4073 (genrtl_expr_stmt): Likewise.
4074 (genrtl_decl_stmt): Likewise.
4075 (gerntl_if_stmt): Likewise.
4076 (genrtl_while_stmt): Likewise.
4077 (genrtl_do_stmt): Likewise.
4078 (genrtl_return_stmt): Likewise.
4079 (genrtl_for_stmt): Likewise.
4080 (genrtl_break_stmt): Likewise.
4081 (genrtl_continue_stmt): Likewise.
4082 (genrtl_scope_stmt): Likewise.
4083 (genrtl_switch_stmt): Likewise.
4084 (genrtl_case_label): Likewise.
4085 (genrtl_begin_compound_stmt): Likewise.
4086 (genrtl_finish_compound_stmt): Likewise.
4087 (genrtl_compound_stmt): Likewise.
4088 (genrtl_asm_stmt): Likewise.
4089 (genrtl_decl_cleanup): Likewise.
4090 (expand_cond): Likewise.
4091 (expand_stmt): Renamed to ...
4092 (lang_expand_stmt): ... this.
4093 (lang_expand_expr_stmt): Initialize.
4094 (set_current_function_name_declared): Likewise.
4095 (stmts_are_full_exprs_p): Likewise.
4096 (current_function_name_declared): Likewise.
4097 (anon_aggr_type_p): Likewise.
4098 (do_poplevel): Change reference to
4099 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4100 Change reference to stmts_are_full_exprs_p to
4101 current_stmt_tree->stmts_are_full_exprs_p.
4102 (add_tree): Likewise.
4103 (finish_expr_stmt): Likewise.
4104 (prep_stmt): Likewise.
4105 (lang_expand_stmt): Likewise.
4106 (begin_compound_stmt): Change reference to
4107 current_function_name_declared to
4108 cp_function_chain->name_declared and call to
4109 current_function_name_declared().
4110 (setup_vtbl_ptr): Likewise.
4111 (genrtl_do_poplevel): Removed.
4112
4113 2000-06-30 Jason Merrill <jason@redhat.com>
4114
4115 * init.c (init_init_processing): Go back to aligning like
4116 double_type_node for old ABI.
4117 (get_cookie_size): Make cookie larger if we get a type that needs
4118 more alignment.
4119 (build_vec_delete): Call it.
4120
4121 * typeck.c (qualify_type_recursive): New fn.
4122 (composite_pointer_type): Use it.
4123 (build_binary_op): Use composite_pointer_type.
4124
4125 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
4126 Jason Merrill <jason@redhat.com>
4127
4128 * typeck.c (check_return_expr): Don't complain about returning
4129 NULL from operator new if -fcheck-new.
4130 * cp-tree.h: Declare flag_check_new here.
4131 * init.c: Not here.
4132
4133 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4134
4135 * mangle.c (find_substitution): Use same_type_p.
4136 (write_encoding): Don't check for substitutions.
4137
4138 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4139
4140 * parse.y (expr_no_comma_rangle): New non-terminal.
4141 (template_parm): Use it for default parameter case.
4142 (template_arg): Use it.
4143 (expr_no_commas): Remove commented out undefined extensions.
4144 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4145 * parse.h, parse.c: Rebuilt.
4146
4147 2000-06-30 Mark Mitchell <mark@codesourcery.com>
4148
4149 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
4150 (finish_asm_stmt): Do it here, instead.
4151
4152 * cp-tree.h (ridpointers): Don't declare.
4153 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
4154 (record_builtin_java_type): Likewise.
4155 (init_decl_processing): Likewise.
4156 * lex.c: Move inclusion of lex.h.
4157 (ridpointers): Don't define.
4158 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
4159 RID_MAX.
4160 * lex.h (enum rid): Rename to ...
4161 (enum cp_rid): ... this.
4162 (ridpointers): Don't declare.
4163 * parse.y: Move inclusion of lex.h.
4164 * parse.c: Regenerated.
4165 * spew.c: Move inclusion of lex.h.
4166
4167 * cp-tree.h (struct language_function): Remove temp_name_counter.
4168 (temp_name_counter): Remove.
4169 (get_temp_name): Change prototype.
4170 (get_guard): New function.
4171 (get_guard_cond): Likewise.
4172 (set_guard): Likewise.
4173 * cvt.c (build_up_reference): Adjust call to get_temp_name.
4174 * decl.c (expand_static_init): Use get_guard and friends to
4175 implement guard variables.
4176 * decl2.c (get_temp_name): Assume that the variables created are
4177 always static.
4178 (get_sentry): Rename to ...
4179 (get_guard): ... this. Implement new ABI guard variables.
4180 (get_guard_bits): New function.
4181 (get_guard_cond): Likewise.
4182 (set_guard): Likewise.
4183 (start_static_initialization_or_destruction): Use them.
4184 (do_static_initialization): Replace sentry with guard throughout.
4185 (do_static_destruction): Likewise.
4186 * init.c (create_temporary_var): Add comment.
4187
4188 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4189
4190 * mangle.c (find_substitution): Use same_type_p.
4191 (write_encoding): Don't check for substitutions.
4192
4193 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4194
4195 * parse.y (expr_no_comma_rangle): New non-terminal.
4196 (template_parm): Use it for default parameter case.
4197 (template_arg): Use it.
4198 (expr_no_commas): Remove commented out undefined extensions.
4199 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4200 * parse.h, parse.c: Rebuilt.
4201
4202 2000-06-29 Mark Mitchell <mark@codesourcery.com>
4203
4204 * cp-tree.h (flag_const_strings): Remove.
4205 (warn_parentheses): Likewise.
4206 (warn_format): Likewise.
4207 (common_type): Likewise.
4208 (default_conversion): Likewise.
4209 (build_binary_op): Likewise.
4210 (cp_build_binary_op): New macro.
4211 * call.c (build_new_op): Use cp_build_binary_op instead of
4212 build_binary_op.
4213 * class.c (build_vtable_entry_ref): Likewise.
4214 * decl.c (expand_static_init): Likewise.
4215 (compute_array_index_type): Likewise.
4216 (build_enumerator): Likewise.
4217 * decl2.c (delete_sanity): Likewise.
4218 (start_static_initialization_or_destruction): Likewise.
4219 * error.c (dump_type_suffix): Likewise.
4220 * init.c (resolve_offset_ref): Likewise.
4221 (build_new): Likewise.
4222 (build_new_1): Likewise.
4223 (build_vec_delete_1): Likewise.
4224 (build_vec_init): Likewise.
4225 (build_delete): Likewise.
4226 * rtti.c (synthesize_tinfo_fn): Likewise.
4227 (synthesize_tinfo_var): Likewise.
4228 * search.c (expand_upcast_fixups): Likewise.
4229 (fixup_all_virtual_upcast_offsets): Likewise.
4230 * typeck.c (build_array_ref): Likewise.
4231 (get_member_function_from_ptrfunc): Likewise.
4232 (build_binary_op): Add parameter.
4233 (pointer_int_sum): Use cp_build_binary_op.
4234 (pointer_diff): Likewise.
4235 (build_modify_expr): Likewise.
4236 (get_delta_difference): Likewise.
4237 (build_ptrmemfunc): Likewise.
4238
4239 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
4240
4241 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
4242 * decl.c (create_implicit_typedef): Adjust.
4243 * decl2.c (build_artificial_parm): Adjust.
4244 * method.c (implicitly_declare_fn): Adjust.
4245 * pt.c (push_inline_template_parms_recursive): Adjust.
4246 (process_template_parm): Adjust.
4247 (overloaded_template_name): Adjust.
4248 * semantics.c (finish_template_template_parm): Adjust.
4249
4250 2000-06-28 Mark Mitchell <mark@codesourcery.com>
4251
4252 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
4253 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
4254 where to emit thunks.
4255 (build_vtt): Adjust call to build_vtt_inits.
4256 (build_vtt_inits): Add parameter to indicate whether or not
4257 sub-VTTs for virtual bases should be included. Adjust handling of
4258 construction vtables.
4259 (get_matching_base): New function.
4260 (dfs_build_vtt_inits): Rename to ...
4261 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
4262 construction vtables.
4263 (dfs_fixup_binfo_vtbls): Likewise.
4264 (build_ctor_vtbl_groups): Build construction vtables for virtual
4265 bases, too.
4266 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
4267 to build construction vtbls.
4268 (dfs_accumulate_vtbl_inits): Adjust handling of
4269 construction vtables.
4270
4271 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
4272 types correctly.
4273
4274 2000-06-27 Mark Mitchell <mark@codesourcery.com>
4275
4276 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
4277
4278 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4279
4280 * search.c (hides): Remove.
4281 (is_subobject_of_p): Add most_derived parameter. Use
4282 CANONICAL_BINFO.
4283 (lookup_field_queue_p): Adjust.
4284 (lookup_field_r): Adjust.
4285
4286 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
4287
4288 * decl2.c (handle_class_head): Bash typedefs to the type's main
4289 decl.
4290
4291 2000-06-25 Mark Mitchell <mark@codesourcery.com>
4292
4293 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
4294 (begin_global_stmt_expr): ... this.
4295 (genrtl_finish_stmt_expr): Rename to ...
4296 (finish_global_stmt_expr): ... this.
4297 * init.c (begin_init_stmts): Adjust calls.
4298 (finish_init_stmts): Likewise.
4299 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
4300 (begin_global_stmt_expr): ... this.
4301 (genrtl_finish_stmt_expr): Rename to ...
4302 (finish_global_stmt_expr): ... this.
4303
4304 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4305
4306 * search.c (lookup_member): Fix typo in comment.
4307
4308 2000-06-24 Jason Merrill <jason@redhat.com>
4309
4310 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
4311 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
4312
4313 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4314
4315 * parse.y (complex_direct_notype_declarator): Support global_scope.
4316 * Makefile.in: Adjust conflict count.
4317
4318 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
4319
4320 * parse.y (template_arg): Convert TEMPLATE_DECL
4321 that is a template template paramter to
4322 TEMPLATE_TEMPLATE_PARM here.
4323
4324 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4325 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
4326 (copy_template_template_parm): Adjust prototype.
4327 * decl.c (grokdeclarator): Remove dead code.
4328 * pt.c (process_template_parm): Tidy.
4329 (lookup_template_class): Construct nodes in
4330 copy_template_template_parm.
4331 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
4332 lookup_template_class. Use TYPE_TI_TEMPLATE.
4333 * tree.c (copy_template_template_parm): Add NEWARGS
4334 parameter.
4335 (mapcar): Adjust call to copy_template_template_parm.
4336 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
4337 * method.c (build_template_template_parm_names): Change error
4338 code to avoid compilation warning.
4339
4340 * gxxint.texi: Document template template parameter
4341 name mangling.
4342
4343 2000-06-21 Alex Samuel <samuel@codesourcery.com>
4344
4345 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
4346 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
4347 (cp-demangle.o): New rule.
4348 (dyn-string.o): Likewise.
4349 * inc/cxxabi.h (__cxa_demangle): New declaration.
4350
4351 2000-06-22 Mark Mitchell <mark@codesourcery.com>
4352
4353 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
4354 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
4355 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
4356 a tree, not an int.
4357 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
4358 (make_thunk): Change prototype.
4359 (emit_thunk): Rename to use_thunk.
4360 (mangle_thunk): Change prototype.
4361 * class.c (get_derived_offset): Simplify.
4362 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
4363 BV_GENERATE_THUNK_WITH_VTABLE_P.
4364 (build_primary_vtable): Simplify.
4365 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
4366 (dfs_find_base): Remove.
4367 (update_vtable_entry_for_fn): Correct bug in finding the base
4368 where a virtual function was first declared. Figure out whether
4369 or not to emit a vcall-thunk with the vtables in which it appears.
4370 Correct logic for deciding whether to use an ordinary thunk, or a
4371 vcall thunk.
4372 (finish_struct_1): Remove unnecssary code.
4373 (build_vtbl_initializer): Use ssize_int for the running counter of
4374 negative indices.
4375 (build_vtbl_initializer): Only use vcall thunks where necessary.
4376 Mark thunks as needing to be emitted with their vtables, or not.
4377 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
4378 indices. Use size_binop.
4379 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
4380 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
4381 size_binop.
4382 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
4383 (build_vtable_entry): Mark thunks as needing to be emitted with
4384 their vtables, or not.
4385 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
4386 * decl2.c (mark_vtable_entries): Use use_thunk instead of
4387 emit_thunk.
4388 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
4389 information.
4390 * error.c (dump_expr): Use BV_FN.
4391 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
4392 not an int.
4393 * method.c (make_thunk): Likewise.
4394 (emit_thunk): Rename to use_thunk. Allow callers to decide
4395 whether or not to actually emit the thunk. Adjust for changes in
4396 representation of vcall offsets.
4397 * search.c (dfs_get_pure_virtuals): Use BV_FN.
4398 * semantics.c (emit_associated_thunks): New function.
4399 (expand_body): Use it.
4400 * ir.texi: Adjust decriptions of thunks.
4401
4402 2000-06-22 Jason Merrill <jason@redhat.com>
4403
4404 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
4405 (tsubst_friend_function): Copy it here.
4406
4407 * decl.c (grok_op_properties): Fix typo.
4408
4409 * decl2.c (delete_sanity): Clarify warning, avoid failure on
4410 deleting void*.
4411
4412 * pt.c (check_explicit_specialization): Clarify error.
4413
4414 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
4415 an old OVERLOAD when we're declaring a non-function.
4416 (pushdecl, destroy_local_var): Check for error_mark_node.
4417 (warn_extern_redeclared_static): Also bail early if
4418 we're a CONST_DECL.
4419 (push_overloaded_decl): Ignore an old error_mark_node.
4420
4421 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
4422
4423 * call.c (build_x_va_arg): Check if in a template decl.
4424 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
4425
4426 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
4427
4428 * class.c (push_lang_context): TYPE_NAME gets you to the Java
4429 types DECLs.
4430 * decl.c (check_goto): Computed gotos assumed OK.
4431
4432 2000-06-20 Jason Merrill <jason@redhat.com>
4433
4434 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
4435 for which we don't need to look for instantiations.
4436
4437 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
4438
4439 * parse.y (program): Always call finish_translation_unit.
4440 * parse.c, parse.h: Rebuilt.
4441
4442 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
4443
4444 * method.c: Don't include hard-reg-set.h.
4445
4446 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4447
4448 * rtti.c (get_base_offset): Cope when vbase field is in a base.
4449
4450 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
4451
4452 * call.c (build_conditional_expr): Use VOID_TYPE_P.
4453 * cvt.c (cp_convert_to_pointer): Likewise.
4454 (convert_to_void): Likewise.
4455 * error.c (dump_expr): Likewise.
4456 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
4457 * init.c (build_delete): Likewise.
4458 * method.c (emit_thunk): Likewise.
4459 * optmize.c (declare_return_variable): Likewise.
4460 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4461 (get_typeid): Likewise.
4462 (build_dynamic_cast_1): Likewise.
4463 * typeck.c (composite_pointer_type): Likewise.
4464 (common_type): Likewise.
4465 (build_indirect_ref): Likewise.
4466 (build_binary_op): Likewise.
4467 (build_x_compound_expr): Likewise.
4468 (check_return_expr): Likewise.
4469 * typeck2.c (add_exception_specifier): Likewise.
4470
4471 * mangle.c (write_method_parms): Use direct comparison for end
4472 of parmlist.
4473
4474 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
4475
4476 * cp-tree.h (genrtl_try_block): Declare function.
4477 (genrtl_handler): Likewise.
4478 (genrtl_catch_block): Likewise.
4479 (genrtl_ctor_stmt): Likewise.
4480 (genrtl_subobject): Likewise.
4481 (genrtl_decl_cleanup): Likewise.
4482 (genrtl_do_poplevel): Likewise.
4483 (genrtl_do_pushlevel): Likewise.
4484 (genrtl_clear_out_block): Likewise.
4485 (genrtl_goto_stmt): Likewise.
4486 (genrtl_expr_stmt): Likewise.
4487 (genrtl_decl_stmt): Likewise.
4488 (genrtl_if_stmt): Likewise.
4489 (genrtl_while_stmt): Likewise.
4490 (genrtl_do_stmt): Likewise.
4491 (genrtl_return_stmt): Likewise.
4492 (genrtl_for_stmt): Likewise.
4493 (genrtl_break_stmt): Likewise.
4494 (genrtl_continue_stmt): Likewise.
4495 (genrtl_scope_stmt): Likewise.
4496 (genrtl_switch_stmt): Likewise.
4497 (genrtl_case_label): Likewise.
4498 (genrtl_begin_compound_stmt): Likewise.
4499 (genrtl_finish_compound_stmt): Likewise.
4500 (genrtl_compound_stmt): Likewise.
4501 (genrtl_asm_stmt): Likewise.
4502 (genrtl_named_return_value): Likewise.
4503 (genrtl_begin_stmt_expr): Likewise.
4504 (genrtl_finish_stmt_expr): Likewise.
4505 (finish_for_stmt): Removed first argument.
4506 (finish_switch_stmt): Likewise.
4507
4508 * semantics.c (genrtl_try_block): Define function.
4509 (genrtl_handler): Likewise.
4510 (genrtl_catch_block): Likewise.
4511 (genrtl_ctor_stmt): Likewise.
4512 (genrtl_subobject): Likewise.
4513 (genrtl_decl_cleanup): Likewise.
4514 (genrtl_do_poplevel): Likewise.
4515 (genrtl_do_pushlevel): Likewise.
4516 (genrtl_clear_out_block): Likewise.
4517 (genrtl_goto_stmt): Likewise.
4518 (genrtl_expr_stmt): Likewise.
4519 (genrtl_decl_stmt): Likewise.
4520 (genrtl_if_stmt): Likewise.
4521 (genrtl_while_stmt): Likewise.
4522 (genrtl_do_stmt): Likewise.
4523 (genrtl_return_stmt): Likewise.
4524 (genrtl_for_stmt): Likewise.
4525 (genrtl_break_stmt): Likewise.
4526 (genrtl_continue_stmt): Likewise.
4527 (genrtl_scope_stmt): Likewise.
4528 (genrtl_switch_stmt): Likewise.
4529 (genrtl_case_label): Likewise.
4530 (genrtl_begin_compound_stmt): Likewise.
4531 (genrtl_finish_compound_stmt): Likewise.
4532 (genrtl_compound_stmt): Likewise.
4533 (genrtl_asm_stmt): Likewise.
4534 (genrtl_named_return_value): Likewise.
4535 (genrtl_begin_stmt_expr): Likewise.
4536 (genrtl_finish_stmt_expr): Likewise.
4537 (finish_for_stmt): Removed first argument and generate rtl
4538 specific code.
4539 (finish_switch_stmt): Likewise.
4540 (do_poplevel): Removed generate rtl specific code.
4541 (do_pushlevel): Likewise.
4542 (add_tree): Likewise.
4543 (finish_goto_stmt): Likewise.
4544 (finish_expr_stmt): Likewise.
4545 (begin_if_stmt): Likewise.
4546 (finish_if_stmt_cond): Likewise.
4547 (finish_then_clause): Likewise.
4548 (begin_else_clause): Likewise.
4549 (finish_else_clause): Likewise.
4550 (finish_if_stmt): Likewise.
4551 (clear_out_block): Likewise.
4552 (begin_while_stmt): Likewise.
4553 (finish_while_stmt_cond): Likewise.
4554 (finish_while_stmt): Likewise.
4555 (begin_do_stmt): Likewise.
4556 (finish_do_body): Likewise.
4557 (finish_do_stmt): Likewise.
4558 (finish_return_stmt): Likewise.
4559 (begin_for_stmt): Likewise.
4560 (finish_for_init_stmt): Likewise.
4561 (finish_for_cond): Likewise.
4562 (finish_for_expr): Likewise.
4563 (finish_break_stmt): Likewise.
4564 (finish_continue_stmt): Likewise.
4565 (begin_switch_stmt): Likewise.
4566 (finish_switch_cond): Likewise.
4567 (finish_case_label): Likewise.
4568 (begin_try_block): Likewise.
4569 (begin_function_try_block): Likewise.
4570 (finish_try_block): Likewise.
4571 (finish_cleanup_try_block): Likewise.
4572 (finish_cleanup): Likewise.
4573 (finish_function_try_block): Likewise.
4574 (finish_handler_sequence): Likewise.
4575 (finish_function_handler_sequence): Likewise.
4576 (begin_handler): Likewise.
4577 (finish_handler_parms): Likewise.
4578 (begin_catch_block): Likewise.
4579 (finish_handler): Likewise.
4580 (begin_compound_stmt): Likewise.
4581 (finish_compound_stmt): Likewise.
4582 (finish_asm_stmt): Likewise.
4583 (finish_label_stmt): Likewise.
4584 (finish_label_decl): Likewise.
4585 (finish_subobject): Likewise.
4586 (finish_decl_cleanup): Likewise.
4587 (finish_named_return_value): Likewise.
4588 (begin_stmt_expr): Likewise.
4589 (finish_stmt_expr): Likewise.
4590
4591 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
4592 to call genrtl_expr_stmt when appropriate.
4593
4594 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
4595 begin_compound_expr to call genrtl_begin_stmt_expr and
4596 genrtl_begin_compound_expr when appropriate.
4597 (finish_init_stmts): Changed calls to finish_compound_expr and
4598 finish_stmt_expr to call genrtl_finish_compound_expr and
4599 genrtl_finish_stmt_expr when appropriate.
4600 (expand_default_init): Changed call to finish_expr_stmt to call
4601 genrtl_expr_stmt when appropriate.
4602 (build_vec_init): Likewise.
4603
4604 * parse.y (simple_stmt): Removed first argument from call to
4605 finish_for_stmt. Removed first argument from call to
4606 finish_switch_stmt.
4607
4608 * parse.c: Regenerated.
4609
4610 * pt.c (tsubst_expr): Removed first argument from call to
4611 finish_for_stmt. Removed first argument from call to
4612 finish_switch_stmt.
4613
4614 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
4615
4616 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
4617 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
4618
4619 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
4620 (cplus_tree_code_length[]): Likewise.
4621 (cplus_tree_code_name[]): Likewise.
4622 (init_parse): Added call to add_c_tree_codes. Changed
4623 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
4624
4625 2000-06-16 Mark Mitchell <mark@codesourcery.com>
4626
4627 * cp-tree.h (finish_mem_initializers): Declare.
4628 (count_trees): Likewise.
4629 * parse.y (base_init): Use finish_mem_initializers.
4630 * semantics.c (finish_mem_initializers): New function.
4631
4632 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
4633 the number of trees.
4634 (n_trees): Remove.
4635 (count_trees): Don't use it.
4636
4637 2000-06-15 Jason Merrill <jason@redhat.com>
4638
4639 * tree.c (count_trees): New debugging function.
4640
4641 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
4642 * init.c (build_member_call): Pull out the name of a DECL.
4643
4644 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
4645 * semantics.c (expand_body): Push to TV_INTEGRATION here.
4646 * optimize.c (optimize_function): Not here.
4647 * pt.c (instantiate_decl): Push to TV_PARSE.
4648
4649 2000-06-15 Mark Mitchell <mark@codesourcery.com>
4650
4651 * cp-tree.h (struct language_function): Remove x_base_init_list
4652 and x_member_init_list.
4653 (current_base_init_list): Remove.
4654 (current_member_init_list): Likewise.
4655 (setup_vtbl_ptr): Change prototype.
4656 (emit_base_init): Likewise.
4657 (expand_member_init): Likewise.
4658 (reinit_parse_for_function): Remove.
4659 * decl.c (save_function_data): Don't clear x_base_init_list and
4660 x_member_init_list.
4661 (mark_language_function): Don't mark them.
4662 * init.c (perform_member_init): Tweak comment.
4663 (sort_member_init): Take the list of initializers as an argument.
4664 (sort_base_init): Likewise.
4665 (emit_base_init): Likewise.
4666 (expand_member_init): Return the initializer. Don't use global
4667 variables.
4668 * lex.c (reinit_parse_for_function): Remove.
4669 * method.c (build_template_parm_names): Correct substitution.
4670 (do_build_copy_constructor): Don't use current_member_init_list
4671 and current_base_init_list.
4672 (synthesize_method): Likewise.
4673 * parse.y (base_init): Split mem-initializers into
4674 base-initializers and field-initializers.
4675 (member_init_list): Build up the list here.
4676 (member_init): Return the initializer.
4677 (fn.depfn): Don't use reinit_parse_for_function.
4678 * parse.c: Regenerated.
4679 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4680 ERROR_MARK.
4681 (tsubst_expr): Don't use current_member_init_list
4682 and current_base_init_list.
4683 (tsubst_expr_values): Rename to ...
4684 (tsubst_initializer_list): ... this. Use convert_from_reference.
4685 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4686 and current_base_init_list.
4687 (begin_function_definition): Don't call reinit_parse_for_function.
4688
4689 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4690
4691 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4692 correctly.
4693
4694 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4695
4696 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
4697
4698 * cp-tree.h (IF_COND): Move to c-common.h.
4699 (THEN_CLAUSE): Likewise.
4700 (ELSE_CLAUSE): Likewise.
4701 (WHILE_COND): Likewise.
4702 (WHILE_BODY): Likewise.
4703 (DO_COND): Likewise.
4704 (DO_BODY): Likewise.
4705 (RETURN_EXPR): Likewise.
4706 (EXPR_STMT_EXPR): Likewise.
4707 (FOR_INIT_STMT): Likewise.
4708 (FOR_COND): Likewise.
4709 (FOR_EXPR): Likewise.
4710 (FOR_BODY): Likewise.
4711 (SWITCH_COND): Likewise.
4712 (SWITCH_BODY): Likewise.
4713 (CASE_LOW): Likewise.
4714 (CASE_HIGH): Likewise.
4715 (GOTO_DESTINATION): Likewise.
4716 (COMPOUND_BODY): Likewise.
4717 (ASM_CV_QUAL): Likewise.
4718 (ASM_STRING): Likewise.
4719 (ASM_OUTPUTS): Likewise.
4720 (ASM_INPUTS): Likewise.
4721 (ASM_CLOBBERS): Likewise.
4722 (DECL_STMT_DECL): Likewise.
4723 (STMT_EXPR_STMT): Likewise.
4724 (LABEL_STMT_LABEL): Likewise.
4725 (SCOPE_BEGIN_P): Likewise.
4726 (SCOPE_END_P): Likewise.
4727 (SCOPE_STMT_BLOCK): Likewise.
4728 (SCOPE_NULLIFIED_P): Likewise.
4729 (SCOPE_NO_CLEANUPS_P): Likewise.
4730 (SCOPE_PARTIAL_P): Likewise.
4731 (ASM_VOLATILE_P): Likewise.
4732 (STMT_LINENO): Likewise.
4733 (STMT_LINENO_FOR_FN_P): Likewise.
4734
4735 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4736 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4737 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4738 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4739 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4740
4741 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4742
4743 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
4744 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
4745
4746 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
4747 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
4748 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
4749
4750 2000-06-14 Mark Mitchell <mark@codesourcery.com>
4751
4752 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
4753 * class.c (dfs_find_final_overrider): Set it appropriately.
4754 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
4755 avoid unneeded secondary vptrs.
4756
4757 2000-06-13 Jakub Jelinek <jakub@redhat.com>
4758
4759 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
4760 (check_bitfield_decl, check_field_decl): Likewise.
4761 (build_vtbl_or_vbase_field, build_base_field): Likewise.
4762 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
4763 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
4764 (xfer_tag, finish_enum): Likewise.
4765 * decl2.c (finish_builtin_type): Likewise.
4766 * init.c (init_init_processing): Likewise.
4767 * pt.c (instantiate_class_template): Likewise.
4768 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
4769 * cp-tree.h (struct lang_type): Add user_align member.
4770 (CLASSTYPE_USER_ALIGN): Define.
4771
4772 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4773
4774 * Make-lang.in (c++.install-common): Install g++-cross in
4775 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
4776 $(target_alias)-g++ and $(target_alias)-c++.
4777
4778 2000-06-12 Mark Mitchell <mark@codesourcery.com>
4779
4780 * class.c (vcall_offset_data_s): Add last_init and fns.
4781 (overrides): Rename to same_signature_p.
4782 (dfs_find_final_overrider): Adjust accordingly.
4783 (mark_overriders): Likewise.
4784 (warn_hidden): Likewise.
4785 (build_vtbl_initializer): Reorganize machinery for building things
4786 at negative offsets.
4787 (build_vcall_and_vbase_vtbl_entries): Likewise.
4788 (build_vbase_offset_vtbl_entries): Likewise.
4789 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
4790 offset entries. Do not create two entries for functions with the
4791 same signature.
4792 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
4793 (build_rtti_vtbl_entries): Reorganize machinery for building things
4794 at negative offsets.
4795
4796 * optimize.c (expand_call_inline): Don't recurse into the code
4797 used to initialize the parameters more than once.
4798
4799 2000-06-11 Mark Mitchell <mark@codesourcery.com>
4800
4801 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
4802 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
4803 (find_substitution): Only use the `Sa' substitution for
4804 std::allocator, not instantiations of it.
4805 (write_template_prefix): Move comment. Only use a TREE_LIST to
4806 represent substitutions for a member template.
4807 (write_array_type): Mangle array dimensions correctly.
4808 * optimize.c (maybe_clone_body): Copy more information from the
4809 cloned function.
4810 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
4811 on the regenerated declaration.
4812
4813 2000-06-11 Chip Salzenberg <chip@valinux.com>
4814 Mark Mitchell <mark@codesourcery.com>
4815
4816 * class.c (build_vtable): Clarify comment.
4817 (build_ctor_vtbl_group): Pass the most derived type to
4818 build_vtable.
4819
4820 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4821
4822 * decl2.c (compare_options): Don't needlessly cast away const-ness.
4823
4824 2000-06-10 Mark Mitchell <mark@codesourcery.com>
4825
4826 * decl.c (add_binding): Handle duplicate declarations of external
4827 variables.
4828
4829 2000-06-09 Chip Salzenberg <chip@valinux.com>
4830 Mark Mitchell <mark@codesourcery.com>
4831
4832 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
4833 argument.
4834 (write_signed_number): New macro.
4835 (write_unsigned_number): Likewise.
4836 (write_source_name): Use them.
4837 (write_number): Handle signed and unsigned values.
4838 (write_integer_cst): Use tree_int_cst_sgn, and use
4839 write_unsigned_number or write_signed_number as appropriate.
4840 (write_discriminator): Use write_unsigned_number or
4841 write_signed_number as appropriate.
4842 (write_template_arg_literal): Likewise.
4843 (write_array_type): Use tree_low_cst.
4844 (write_template_parm): Use write_unsigned_number or
4845 write_signed_number as appropriate.
4846 (write_substitution): Adjust call to write_number.
4847 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
4848 (write_expression): Handle non-type template arguments of
4849 reference type correctly.
4850 (mangle_thunk): Use write_signed_number.
4851
4852 2000-06-09 Chip Salzenberg <chip@valinux.com>
4853
4854 * mangle.c (find_substition): Don't mangle objects with typename
4855 substitutions (e.g. "cin" as "Si").
4856
4857 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
4858
4859 * call.c (add_candidate): Use ggc_alloc_cleared.
4860 * decl.c (lookup_label): Likewise.
4861 * lex.c (retrofit_lang_decl): Likewise.
4862
4863 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
4864
4865 * semantics.c (expand_body): Push to TV_EXPAND.
4866 * optimize.c (optimize_function): Push to TV_INTEGRATION.
4867 * decl.c (start_function): Always call announce_function.
4868
4869 * tinfo2.cc: Just declare abort.
4870
4871 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
4872
4873 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
4874 whenever @ is a symbolic name.
4875
4876 2000-06-08 Jakub Jelinek <jakub@redhat.com>
4877
4878 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
4879
4880 2000-06-07 Mark Mitchell <mark@codesourcery.com>
4881
4882 * decl.c (pushdecl): Look up functions by DECL_NAME, not
4883 DECL_ASSEMBLER_NAME.
4884
4885 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4886
4887 * decl2.c (c_language): Define.
4888
4889 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
4890
4891 * lex.c (lang_init_options): Tweak.
4892
4893 * decl2.c: Remove #inclusion of diagnostic.h
4894 (lang_decode_option): Move diagnostic formatting options to
4895 toplevel.
4896
4897 * lang-options.h: Remove documentation for diagnostic options.
4898
4899 * Makefile.in (lex.o): Depends upon diagnostic.h
4900
4901 2000-06-06 Mark Mitchell <mark@codesourcery.com>
4902
4903 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
4904 the same DECL_RESULT, it's not a redefinition.
4905 * pt.c (tsubst_decl): Remove code to handle illegal
4906 specializations.
4907
4908 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
4909
4910 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
4911
4912 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
4913
4914 * search.c (maybe_suppress_debug_info): Don't check
4915 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
4916
4917 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
4918 here if extern_p.
4919
4920 Remember instantiation context in deferred instantiations.
4921 * cp-tree.h (struct tinst_level): Remove.
4922 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
4923 * pt.c (current_tinst_level): Now a tree.
4924 (print_template_context, push_tinst_level, pop_tinst_level,
4925 tinst_for_decl): Adjust.
4926 (reopen_tinst_level): New fn.
4927 (init_pt): Register current_tinst_level as a root.
4928 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
4929 of the pending templates list.
4930 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
4931 * lex.c (extract_interface_info): Adjust.
4932 * decl2.c (warn_if_unknown_interface): Adjust.
4933
4934 2000-06-05 Mark Mitchell <mark@codesourcery.com>
4935
4936 * class.c (indirect_primary_base_p): New function.
4937 (determine_primary_base): Use it.
4938
4939 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
4940
4941 Update new-abi dynamic cast algorithm.
4942 * tinfo.cc (__class_type_info::__dyncast_result): Add
4943 whole_details. Adjust constructor.
4944 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
4945 Avoid unnecessary searching.
4946 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
4947
4948 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4949
4950 * decl.c (init_decl_processing): Don't call record_component_aliases.
4951 * tree.c (build_cplus_array_type_1): Likewise.
4952
4953 2000-06-04 Mark Mitchell <mark@codesourcery.com>
4954
4955 * ir.texi: Correct typo.
4956 * mangle.c (write_expression): Handle non-type template arguments
4957 with reference type.
4958 * method.c (build_overload_value): Likewise.
4959 * pt.c (convert_nontype_argument): Explicitly represent conversion
4960 to a reference with an ADDR_EXPR.
4961 (unify): Always unify arguments in left-to-right order.
4962
4963 2000-06-03 Alex Samuel <samuel@codesourcery.com>
4964 Mark Mitchell <mark@codesourcery.com>
4965
4966 * Make-lang.in (CXX_SRCS): Add mangle.c.
4967 * Makefile.in (CXX_OBJS): Add mangle.o.
4968 (mangle.o): New rule.
4969
4970 * class.c (local_classes): New variable.
4971 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
4972 (get_vtt_name): Use mangle_vtt_name for new ABI.
4973 (init_class_processing): Initialize local_classes.
4974 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
4975 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
4976 (std_identifier): New macro.
4977 (DECL_VOLATILE_MEMFUNC_P): New macro.
4978 (DECL_NAMESPACE_STD_P): Likewise.
4979 (local_classes): Declare.
4980 (get_mostly_instantiated_function_type): Declare.
4981 (init_mangle): Declare.
4982 (mangle_decl): Likewise.
4983 (mangle_type_string): Likewise.
4984 (mangle_type): Likewise.
4985 (mangle_typeinfo_for_type): Likewise.
4986 (mangle_typeinfo_string_for_type): Likewise.
4987 (mangle_vtbl_for_type): Likewise.
4988 (mangle_vtt_for_type): Likewise.
4989 (mangle_ctor_vtbl_for_type): Likewise.
4990 (mangle_thunk): Likewise.
4991 (mangle_conv_op_name_for_type): Likewise.
4992 (mangle_guard_variable): Likewise.
4993 * decl.c (pushtag): Keep track of local classes.
4994 (initialize_predefined_identifiers): Initialize std_identifier.
4995 (init_decl_processing): Use std_identifier.
4996 (start_decl): Don't treat instantiations as specializations.
4997 (grokdeclarator): Likewise.
4998 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
4999 name for fully-instantiated templates.
5000 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
5001 destructors with the new ABI.
5002 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
5003 (grokfield): Use mangle_type for new ABI.
5004 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
5005 (get_sentry): Use mangle_guard_variable for new ABI.
5006 (start_static_initialization_or_destruction): Likewise.
5007 * expr.c (extract_aggr_init): Remove.
5008 (extract_scalar_init): Likewise.
5009 (extract_init): Remove #if 0'd code.
5010 * mangle.c: New function.
5011 * method.c (build_mangled_name): Assert not flag_new_abi.
5012 (build_static_name): Likewise.
5013 (build_decl_overload_real): Likewise.
5014 (build_typename_overload): Likewise.
5015 (build_overload_with_type): Likewise.
5016 (build_overload_name): Likewise.
5017 (get_ctor_vtbl_name): Likewise.
5018 (start_squangling): Likewise.
5019 (get_id_2): Likewise.
5020 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
5021 (init_method): Call init_mangle for new ABI.
5022 (make_thunk): Call mangle_thunk for new ABI.
5023 * operators.def: Correct new ABI manglings for the `%' operator.
5024 Add `::' operator.
5025 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
5026 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
5027 (lookup_template_class): Call mangle_decl for new ABI.
5028 (get_mostly_instantiated_function_type): New function.
5029 (set_mangled_name_for_template_decl): Use it.
5030 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
5031 the new ABI. Use mangle_conv_op_name_for_type for instantiated
5032 conversion op names.
5033 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
5034 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
5035 (tinfo_base_init): Likewise. Mangle typeinfo string name with
5036 mangle_typeinfo_string_for_type.
5037
5038 2000-06-03 Mark Mitchell <mark@codesourcery.com>
5039
5040 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
5041 (INNERMOST_TEMPLATE_ARGS): New macro.
5042 (innermost_args): Remove.
5043 (get_innermost_template_args): New function.
5044 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
5045 * error.c (dump_function_decl): Be caution when using
5046 most_general_template.
5047 * method.c (build_template_parm_names): Use
5048 INNERMOST_TEMPLATE_ARGS.
5049 * pt.c (add_to_template_args): Tidy comment
5050 (get_innermost_template_args): New function.
5051 (check_explicit_specialization): Clear DECL_INITIAL for a new
5052 specialization.
5053 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
5054 Tidy.
5055 (push_template_decl): Always register specializations of the most
5056 general template.
5057 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
5058 (coerce_template_parms): Likewise.
5059 (lookup_template_class): Likewise.
5060 (innermost_args): Remove.
5061 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
5062 (tsubst_decl): Handle tricky specializations. Use
5063 get_innermost_template_args.
5064 (instantiate_template): Simplify handling of partial
5065 instantiations.
5066 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
5067 (most_general_template): Reimplement, in a more straightforward
5068 manner.
5069 (regenerate_decl_from_template): Tweak formatting. Use
5070 TMPL_ARGS_DEPTH for clarity.
5071 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
5072
5073 * dump.c (dequeue_and_dump): Dump information about thunks.
5074
5075 2000-06-01 Richard Henderson <rth@cygnus.com>
5076
5077 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
5078
5079 2000-06-01 Richard Henderson <rth@cygnus.com>
5080
5081 * decl2.c (unsupported_options): Fix typo, make const.
5082 (lang_decode_option): Fix bsearch argument order.
5083
5084 2000-06-01 Mark Mitchell <mark@codesourcery.com>
5085
5086 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
5087 on FIELD_DECLs.
5088
5089 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5090
5091 * cp-tree.h (c_get_alias_set): Deleted.
5092 * Makefile.in (decl.o): Include ../expr.h.
5093 * decl.c (expr.h): Include.
5094 (init_decl_processing): Call record_component_aliases for arrays.
5095 (grokdeclarator): Likewise.
5096 Set TREE_ADDRESSABLE for fields that aren't bitfields.
5097 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
5098
5099 2000-05-31 Mark Mitchell <mark@codesourcery.com>
5100
5101 Remove guiding declaration support.
5102 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
5103 (flag_guiding_decls): Remove.
5104 * call.c (build_user_type_conversion_1): Remove support for
5105 guiding decls.
5106 (build_new_function_call): Likewise.
5107 (build_new_op): Likewise.
5108 (build_new_method_call): Likewise.
5109 * decl.c (start_function): Likewise.
5110 * friend.c (is_friend): Likewise.
5111 (do_friend): Likewise.
5112 * decl2.c ((flag_dump_translation_unit): Make it const.
5113 (flag_guiding_decls): Remove.
5114 (unsupported_options): New variable
5115 (compare_options): New function.
5116 (lang_decode_option): Use them.
5117
5118 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
5119
5120 * method.c (mangle_expression): Adjust test for legal expression
5121 operators.
5122
5123 * pt.c (instantiate_decl): Save and restore the local
5124 specializations list.
5125
5126 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
5127
5128 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
5129
5130 2000-05-30 Mark Mitchell <mark@codesourcery.com>
5131
5132 * call.c (add_template_candidate_real): Handle member template
5133 constructors for classes with virtual bases.
5134 (build_user_type_conversion_1): Use in_charge_arg_for_name.
5135 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
5136
5137 * ir.texi: Update thunk documentation.
5138
5139 * call.c (joust): Fix handling of overloaded builtin operators.
5140
5141 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
5142
5143 * cp-tree.h (DECL_ANTICIPATED): New macro.
5144 Document new use of DECL_LANG_FLAG_7.
5145 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
5146 in the user namespace.
5147 * lex.c (do_identifier): If the identifier's declaration has
5148 DECL_ANTICIPATED on, it has not yet been declared. But do not
5149 replace it with an ordinary implicit declaration.
5150
5151 * tinfo2.cc: Include stdlib.h.
5152
5153 2000-05-29 Mark Mitchell <mark@codesourcery.com>
5154
5155 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
5156 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
5157 CLASSTYPE_ALIGN.
5158
5159 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
5160
5161 * decl2.c (lang_decode_option): Use skip_leading_substring instead
5162 of plain strncmp.
5163
5164 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
5165
5166 * operators.def (<?): Duplicated, should have been...
5167 (>?): this. Fixed.
5168
5169 2000-05-27 Alex Samuel <samuel@codesourcery.com>
5170 Mark Mitchell <mark@codesourcery.com>
5171
5172 * cp-tree.h (ansi_opname): Make it a macro.
5173 (ansi_assopname): Likewise.
5174 (struct lang_decl_flags): Add assignment_operator_p.
5175 (struct lang_decl): Add operator_code.
5176 (DECL_VTT_PARM): Adjust.
5177 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
5178 overloaded operator.
5179 (SET_OVERLOADED_OPERATOR_CODE): New macro.
5180 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
5181 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
5182 (opname_tab): Remove.
5183 (assignop_tab): Likewise.
5184 (operator_name_info_t): New type.
5185 (operator_name_info): New variable.
5186 (assignment_operator_name_info): Likewise.
5187 (build_cp_library_fn): Remove declaration.
5188 (push_cp_library_fn): Likewise.
5189 (operator_name_string): Likewise.
5190 (build_decl_overload): Likewise.
5191 * call.c (print_z_candidates): Simplify.
5192 (build_object_call): Adjust usage of ansi_opname. Use
5193 DECL_OVERLOADED_OPERATOR_P.
5194 (op_error): Adjust operator name lookup.
5195 (build_conditional_expr): Adjust usage of ansi_opname.
5196 (build_new_op): Likewise.
5197 (build_op_delete_call): Likewise.
5198 (build_over_call): Likewise.
5199 (joust): Use DECL_OVERLOADED_OPERATOR_P.
5200 * decl.c (duplicate_decls): Copy operator_code.
5201 (init_decl_processing): Adjust parameters to push_cp_library_fn.
5202 (builtin_function): Adjust parameters to build_library_fn_1.
5203 (build_library_fn_1): Accept an overloaded operator code.
5204 (build_library_fn): Pass ERROR_MARK.
5205 (build_cp_library_fn): Accept an overloaded operator code.
5206 (push_cp_library_fn): Likewise.
5207 (grokfndecl): Tweak.
5208 (grokdeclarator): Simplify code to compute names of overloaded
5209 operators. Adjust use of ansi_opname.
5210 (ambi_op_p): Work on tree_codes, not identifiers.
5211 (unary_op_p): Likewise.
5212 (grok_op_properties): Likewise.
5213 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
5214 (lang_mark_tree): Don't try to mark the operator_code.
5215 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
5216 * error.c (dump_decl): Remove special handling for operator
5217 names.
5218 (dump_function_name): Likewise.
5219 (dump_expr): Adjust name lookup of operators.
5220 (op_to_string): Simplify.
5221 (assop_to_string): Likewise.
5222 * init.c (build_new_1): Adjust use of ansi_opname.
5223 * lex.c (opname_tab): Remove.
5224 (assignop_tab): Likewise.
5225 (ansi_opname): Likewise.
5226 (ansi_assopname): Likewise.
5227 (operator_name_string): Likewise.
5228 (reinit_lang_specific): Likewise.
5229 (operator_name_info): New variable.
5230 (assignment_operator_name_info): Likewise.
5231 (init_operators): New function.
5232 (init_parse): Use it.
5233 (do_identifier): Adjust use of ansi_opname.
5234 * method.c (mangle_expression): Don't use ansi_opname for
5235 mangling.
5236 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
5237 (build_decl_overload): Remove.
5238 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
5239 (do_build_assign_ref): Adjust use of ansi_opname.
5240 (synthesize_method): Likewise.
5241 (implicitly_declare_fn): Likewise.
5242 * operators.def: New file.
5243 * parse.y (operator): Adjust use of ansi_opname.
5244 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
5245 (set_mangled_name_for_template_decl): Don't play games with
5246 current_namespace.
5247 (special_function_p): Adjust use of ansi_opname.
5248 * typeck.c (check_return_expr): Likewise.
5249 * Make-lang.in (cc1plus): Depend on operators.def.
5250 * Makefile.in (lex.o): Likewise.
5251 (decl.o): Likewise.
5252
5253 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
5254
5255 * Make-lang.in (cplib2.ready): Eradicate.
5256
5257 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5258
5259 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
5260 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
5261 (built_min, cp_tree_equal): Likewise.
5262
5263 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5264
5265 * class.c (layout_nonempty_base_or_field): Replace
5266 `record_layout_info' with `record_layout_info_s'.
5267
5268 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
5269
5270 Fix goto checking.
5271 * cp-tree.h (struct language_function): x_named_labels is now
5272 a struct named_label_list*.
5273 * decl.c (struct named_label_use_list): Renamed from...
5274 (struct named_label_list): ...this. New struct.
5275 (push_binding_level): Don't set eh_region.
5276 (note_level_for_eh): New fn.
5277 (pop_label): Take label and old value directly.
5278 (pop_labels): Adjust for new named_labels format.
5279 (lookup_label): Likewise.
5280 (poplevel): Note characteristics of a binding level containing a
5281 named label. Mess with named label lists earlier.
5282 (mark_named_label_lists): New fn.
5283 (mark_lang_function): Call it.
5284 (use_label): New fn, split out from...
5285 (make_label_decl): ...here. Don't call it.
5286 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
5287 check_previous_gotos): New fns, split out from...
5288 (define_label): ...here.
5289 (check_switch_goto): New fn.
5290 (define_case_label): Call it.
5291 (check_goto): New fn.
5292 * semantics.c (finish_goto_stmt): Call it and use_label.
5293 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
5294 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
5295
5296 2000-05-26 Mark Mitchell <mark@codesourcery.com>
5297
5298 * class.c (build_vtable_entry_ref): Correct usage of
5299 get_vtbl_decl_for_binfo.
5300
5301 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
5302 * method.c (implicitly_declare_fn): Not here.
5303
5304 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
5305
5306 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
5307 (CPTI_PTMD_DESC_TYPE): ... here.
5308 (ptmd_desc_type_node): Rename to ...
5309 (ptm_desc_type_node): ... here.
5310 * decl.c: Likewise.
5311 * rtti.c (ptmd_initializer): Rename to ...
5312 (ptm_initializer): ... here.
5313 (sythesize_tinfo_var): Adjust. Deal with pointer to member
5314 function.
5315 (create_tinfo_types): Adjust.
5316
5317 2000-05-25 Mark Mitchell <mark@codesourcery.com>
5318
5319 Finish implementation of VTTs.
5320 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
5321 CPTI_VTT_PARM_IDENTIFIER.
5322 (vtt_parm_identifier): New macro.
5323 (vtt_parm_type): Likewise.
5324 (BINFO_SUBVTT_INDEX): Likewise.
5325 (BINFO_VPTR_INDEX): Likewise.
5326 (struct lang_decl): Add vtt_parm.
5327 (DECL_VTT_PARM): New macro.
5328 (DECL_USE_VTT_PARM): Likewise.
5329 (DECL_NEEDS_VTT_PARM_P): Likewise.
5330 (get_vtt_name): Declare.
5331 (build_artifical_parm): Likewise.
5332 (fixup_all_virtual_upcast_offsets): Likewise.
5333 (expand_indirect_vtbls_init): Remove.
5334 * call.c (build_new_method_call): Pass the vtt to subobject
5335 constructors and destructors.
5336 * class.c (get_vtt_name): Give it external linkage.
5337 (build_clone): Handle the magic VTT parameters for clones.
5338 (clone_function_decl): Fix typo in comment.
5339 (build_vtt): Keep track of the indices in the VTTs where various
5340 entities are stored.
5341 (build_vtt_inits): Likewise.
5342 (dfs_build_vtt_inits): Likewise.
5343 (build_ctor_vtbl_group): Tweak type of construction vtables.
5344 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
5345 primary bases, when building construction vtables.
5346 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
5347 (initialize_predefined_identifiers): Add vtt_parm_identifier.
5348 (init_decl_processing): Initialize vtt_parm_type.
5349 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
5350 (lang_mark_tree): Make vtt_parm.
5351 * decl2.c (build_artificial_parm): New function.
5352 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
5353 (grokclassfn): Use build_artificial_parm.
5354 * init.c (initialize_vtbl_ptrs): Call
5355 fixup_all_virtual_upcast_offsets directly.
5356 (perform_member_init): Use the complete subobject destructor for
5357 member cleanups.
5358 (build_vtbl_address): New function.
5359 (expand_virtual_init): Handle VTTs.
5360 * optimize (maybe_clone_body): Likewise.
5361 * search.c (fixup_all_virtual_upcast_offsets): Give it external
5362 linkage.
5363 (expand_indirect_vtbls_init): Remove.
5364 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
5365 * tree.c (make_binfo): Make them bigger.
5366
5367 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5368
5369 * inc/cxxabi.h (__pbase_type_info): Define, based on
5370 __pointer_type_info.
5371 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
5372 (__pointer_to_member_type_info): Likewise.
5373 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
5374 (__pointer_to_member_type_info::__is_pointer_p): Remove.
5375 (__pointer_type_info::__do_catch): Rename to ...
5376 (__pbase_type_info::__do_catch): ... here. Adjust.
5377 (__pbase_type_info::__pointer_catch): Implement.
5378 (__pointer_type_info::__pointer_catch): Adjust.
5379 (__pointer_to_member_type_info::__pointer_catch): Adjust.
5380
5381 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
5382
5383 * tinfo.h (__user_type_info::contained_virtual_p): New
5384 predicate.
5385 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
5386 shaped heirarchy.
5387 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
5388 diamond shaped heirarchy. Add early out for mixed diamond and
5389 duplicate shaped heirarchy.
5390
5391 2000-05-24 Mark Mitchell <mark@codesourcery.com>
5392
5393 * cp-tree.h (build_delete): Change prototype.
5394 (build_vec_delete): Likewise.
5395 * call.c (build_scoped_method_call): Use special_function_kind
5396 values to indicate the kind of destruction to be done.
5397 (build_method_call): Likewise.
5398 * decl.c (finish_destructor_body): Likewise.
5399 (maybe_build_cleanup_1): Likewise. Rename to ...
5400 (maybe_build_cleanup): ... this.
5401 * decl2.c (delete_sanity): Use special_function_kind
5402 values to indicate the kind of destruction to be done.
5403 (build_cleanup): Likewise.
5404 * init.c (perform_member_init): Likewise.
5405 (build_vec_delete_1): Likewise.
5406 (build_dtor_call): Simplify.
5407 (build_delete): Use special_function_kind
5408 values to indicate the kind of destruction to be done.
5409 (build_vbase_delete): Likewise.
5410 (build_vec_delete): Likewise.
5411
5412 * init.c (sort_member_init): Fix typo in error message generation
5413 code.
5414
5415 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
5416
5417 * semantics.c (begin_class_definition): make the packed
5418 attribute be sensitive to the "-fpack-struct" command line flag
5419
5420 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
5421
5422 Update new-abi upcast algorithm.
5423 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
5424 prototype and meaning of return value.
5425 (__si_class_type_info::__do_upcast): Likewise.
5426 (__vmi_class_type_info::__do_upcast): Likewise.
5427 * tinfo.cc (__class_type_info::__upcast_result): Replace
5428 whole2dst with part2dst. Adjust ctor.
5429 (__class_type_info::__do_upcast): Adjust call of worker function.
5430 (__class_type_info::__do_upcast): Adjust.
5431 (__si_class_type_info::__do_upcast): Adjust. Use parent's
5432 __do_upcast.
5433 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
5434 virtual base in diamond heirarchy bug.
5435
5436 2000-05-23 Mark Mitchell <mark@codesourcery.com>
5437
5438 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
5439 and bitfield to tinfo_fn_p.
5440 (DECL_TINFO_FN_P): Adjust.
5441 (SET_DECL_TINFO_FN_P): Likewise.
5442 (DECL_MUTABLE_P): Likewise.
5443 (DECL_C_BIT_FIELD): Likewise.
5444 (SET_DECL_C_BIT_FIELD): Likewise.
5445 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5446 (DECL_UNINLINABLE): Likewise.
5447 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
5448 (handle_using_decl): Remove assertion.
5449 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
5450 to build FIELD_DECLs.
5451 (build_base_field): Likewise.
5452 (layout_class_type): Likewise.
5453 * decl.c (init_decl_processing): Likewise.
5454 (build_ptrmemfunc_type): Likewise.
5455 (grokdeclarator): Likewise.
5456 * decl2.c (grok_x_components): Likewise.
5457 * except.c (call_eh_info): Likewise.
5458 * init.c (init_init_processing): Likewise.
5459 * rtti.c (expand_class_desc): Likewise.
5460 (create_pseudo_type_info): Likewise.
5461 (get_vmi_pseudo_type_info): Likewise.
5462 (create_tinfo_types): Likewise.
5463 * ptree.c (print_lang_decl): Adjust.
5464 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
5465 before checking DECL_MUTABLE_P.
5466
5467 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
5468 parameters for template functions.
5469 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
5470 destructors as well as constructors.
5471
5472 2000-05-22 Mark Mitchell <mark@codesourcery.com>
5473
5474 * class.c (build_ctor_vtbl_group): Set inits.
5475 * optimize.c (maybe_clone_body): Set DECL_INLINE and
5476 DECL_THIS_INLINE appropriately for clones.
5477
5478 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
5479 (DECL_CONV_FN_P): Simplify.
5480 (DECL_OPERATOR): Remove.
5481 (language_to_string): Declare.
5482 * decl.c (duplicate_decls): Fix typo in comment.
5483 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
5484 (grok_op_properties): Use DECL_CONV_FN_P instead of
5485 IDENTIFIER_TYPENAME_P.
5486 * dump.c (dequeue_and_dump): Dump the language linkage of
5487 declarations.
5488 * error.c (language_to_string): Give it external linkage.
5489 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
5490 (implicitly_declare_fn): Set DECL_LANGUAGE.
5491 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
5492 IDENTIFIER_TYPENAME_P.
5493 (tsubst_decl): Likewise.
5494 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
5495 * semantics.c (finish_member_declaration): Don't mark members of
5496 classes declared in an extern "C" region as extern "C".
5497
5498 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5499
5500 * decl2.c (qualified_lookup_using_namespace): Look through
5501 namespace aliases.
5502
5503 * decl.c (push_using_decl): Return the old decl on namespace level.
5504
5505 2000-05-21 Mark Mitchell <mark@codesourcery.com>
5506
5507 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
5508 (VTT_NAME_PREFIX): New macro.
5509 (CTOR_VTBL_NAME_PREFIX): Likewise.
5510 (get_ctor_vtbl_name): New function.
5511 * class.c (get_vtable_name): Simplify.
5512 (get_vtt_name): New function.
5513 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
5514 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
5515 when a virtual base becomes primary.
5516 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
5517 VTTs.
5518 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
5519 additional parameters.
5520 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
5521 (initialize_array): New function.
5522 (build_vtt): Likewise.
5523 (build_vtt_inits): Likewise.
5524 (dfs_build_vtt_inits): Likewise.
5525 (dfs_fixup_binfo_vtbls): Likewise.
5526 (build_ctor_vtbl_group): Likewise.
5527 (initialize_vtable): Use initialize_array.
5528 (accumulate_vtbl_inits): Reimplement to handle construction
5529 vtables.
5530 (dfs_accumulate_vtbl_inits): Likewise.
5531 (bulid_vtbl_initializer): Adjust parameter name.
5532 * method.c (build_typename_overload): Remove #if 0'd code.
5533 (get_ctor_vtbl_name): New function.
5534 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
5535 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
5536
5537 * cp-tree.h (struct lang_type): Remove search_slot.
5538 (CLASSTYPE_SEARCH_SLOT): Remove.
5539 (emit_base_init): Change prototype.
5540 (initialize_vtbl_ptrs): Likewise.
5541 (expand_indirect_vtbls_init): Likewise.
5542 (clear_search_slots): Remove.
5543 * decl.c (lang_mark_tree): Don't mark search_slot.
5544 * init.c (initialize_vtbl_ptrs): Simplify.
5545 (emit_base_init): Likewise.
5546 * search.c (struct vbase_info): Document decl_ptr.
5547 (convert_pointer_to_single_level): Remove.
5548 (dfs_find_vbases): Remove.
5549 (dfs_init_base_pointers): Simplify.
5550 (dfs_clear_vbase_slots): Remove.
5551 (dfs_vtable_path_unmark): New function.
5552 (init_vbase_pointers): Simplify.
5553 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
5554 (expand_indirect_vtbls_init): Simplify. Don't call
5555 mark_all_temps_used.
5556 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
5557 initialize_vtbl_ptrs.
5558
5559 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
5560
5561 * except.c: Add static prototypes.
5562
5563 2000-05-20 H.J. Lu <hjl@gnu.org>
5564
5565 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
5566
5567 2000-05-19 Mark Mitchell <mark@codesourcery.com>
5568
5569 Don't create a separate copy of virtual bases for the
5570 CLASSTYPE_VBASECLASSES list.
5571 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
5572 (BINFO_FOR_VBASE): Remove.
5573 (CANONICAL_BINFO): Adjust.
5574 (binfo_for_vbase): New function.
5575 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
5576 instead of BINFO_FOR_VBASE.
5577 (build_vbase_pointer): Likewise.
5578 (build_secondary_vtable): Likewise.
5579 (dfs_mark_primary_bases): Likewise.
5580 (mark_primary_bases): Likewise.
5581 (layout_nonempty_base_or_field): Likewise.
5582 (dfs_set_offset_for_shared_vbases): Likewise.
5583 (dfs_set_offset_for_unshared_vbases): Likewise.
5584 (layout_virtual_bases): Likewise. Adjust for changes to the
5585 CLASSTYPE_VBASECLASSES list.
5586 (dump_class_hierarchy_r): Use binfo_for_vbase
5587 instead of BINFO_FOR_VBASE.
5588 (dump_class_hierarchy): Likewise.
5589 (finish_vtbls): Likewise.
5590 (build_vtbl_initializer): Adjust for changes to the
5591 CLASSTYPE_VBASECLASSES list.
5592 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
5593 * decl.c (finish_destructor_body): Adjust for changes to the
5594 CLASSTYPE_VBASECLASSES list.
5595 * init.c (sort_base_init): Use binfo_for_vbase.
5596 (construct_virtual_bases): Adjust for changes to the
5597 CLASSTYPE_VBASECLASSES list.
5598 (expand_member_init): Use binfo_for_vbase.
5599 (build_vbase_delete): Adjust for changes to the
5600 CLASSTYPE_VBASECLASSES list.
5601 * method.c (do_build_copy_constructor): Likewise.
5602 * rtti.c (get_base_offset): Use binfo_for_vbase.
5603 (expand_class_desc): Remove #if 0'd code.
5604 * search.c (struct vbase_info): Remove vbase_types.
5605 (get_base_distance): Use binfo_for_vbase.
5606 (lookup_field_queue_p): Use CANONICAL_BINFO.
5607 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
5608 (get_pure_virtuals): Adjust for changes to the
5609 CLASSTYPE_VBASECLASSES list.
5610 (dfs_find_vbases): Use binfo_for_vbase.
5611 (dfs_init_vbase_pointers): Likewise.
5612 (init_vbase_pointers): Don't initialize vi.vbase_types.
5613 (virtual_context): Use binfo_for_vbase.
5614 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
5615 CLASSTYPE_VBASECLASSES list.
5616 (expand_indirect_vtbls_init): Simplify.
5617 (dfs_get_vbase_types): Don't replicate virtual bases.
5618 (find_vbase_instance): Use binfo_for_vbase.
5619 (binfo_for_vbase): New function.
5620 * typeck.c (get_delta_difference): Use binfo_for_vbase.
5621
5622 2000-05-17 Mark Mitchell <mark@codesourcery.com>
5623
5624 * decl2.c (finish_anon_union): Generalize error messages to handle
5625 anonymous structures.
5626 * init.c (perform_member_init): Remove `name' parameter.
5627 (build_field_list): New function.
5628 (sort_member_init): Handle anonymous union initialization order
5629 correctly. Check for multiple initializations of the same union.
5630 (emit_base_init): Don't look up fields by name here.
5631 (expand_member_init): Record the result of name lookup for future
5632 reference.
5633 * typeck.c (build_component_ref): Fix formatting.
5634
5635 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
5636
5637 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
5638 * typeck.c (build_x_compound_expr): Replace warn_unused with
5639 warn_unused_value.
5640
5641 * decl2.c (lang_decode_option): Update -Wall unused flags by
5642 calling set_Wunused.
5643
5644 2000-05-16 Mark Mitchell <mark@codesourcery.com>
5645
5646 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
5647 * init.c (dfs_vtable_path_unmark): Remove.
5648 * search.c (marked_new_vtable_p): Likewise.
5649 (unmarked_new_vtable_p): Likewise.
5650 (dfs_search_slot_nonempty_p): Likewise.
5651 (dfs_mark): Likewise.
5652 (dfs_vtable_path_unmark): Likewise.
5653 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
5654 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
5655 (dfs_init_vbase_pointers): Remove special-case new ABI code.
5656 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
5657 (init_vbase_pointers): Simplify.
5658 (expand_indirect_vtbls_init): Likewise.
5659
5660 * class.c (copy_virtuals): New function.
5661 (build_primary_table): Use it.
5662 (build_secondary_vtable): Likewise.
5663 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5664 indicate that no vcall offset is required.
5665 (add_virtual_function): Likewise.
5666 (modify_all_vtables): Likewise.
5667 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5668 (dfs_accumulate_vtbl_inits): Likewise.
5669 (build_vtbl_initializer): Make changes to handle construction
5670 vtables.
5671 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5672 (build_rtti_vtbl_entries): Likewise.
5673 (build_vtable_entries): Handle a NULL vcall_index.
5674
5675 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
5676
5677 * decl2.c (lang_decode_option): Fix thinko.
5678
5679 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
5680
5681 * except.c (check_handlers): New fn.
5682 * cp-tree.h: Declare it.
5683 * semantics.c (finish_handler_sequence): Call it.
5684 (finish_function_handler_sequence): Likewise.
5685 (finish_handler_parms): Set TREE_TYPE on the handler.
5686 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5687 * search.c (get_base_distance_recursive): If protect>1, ignore
5688 special access.
5689 (get_base_distance): Don't reduce watch_access.
5690
5691 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
5692
5693 * lex.c: #include diagnostic.h.
5694 (lang_init_options): Set default prefixing rules.
5695
5696 * lang-options.h: Add -fdiagnostics-show-location=.
5697
5698 * decl2.c: #include diagnostic.h.
5699 (lang_decode_option): Handle -fdiagnostics-show-location=.
5700
5701 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
5702
5703 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5704 * vec.cc: Revert my 2000-05-07 change.
5705
5706 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
5707
5708 * class.c (check_field_decls): Complain about non-static data
5709 members with same name as class in class with constructor.
5710
5711 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
5712
5713 * decl.c (grokdeclarator): Allow non-static data members with
5714 same name as class.
5715
5716 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
5717
5718 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5719 and pending_inline.filename. Update prototypes.
5720 * decl.c (define_label): Constify filename parameter.
5721 * decl2.c (warn_if_unknown_interface): Constify local char *.
5722 * input.c Constify input_source.filename. Don't declare
5723 input_filename or lineno. Constify filename parameter to feed_input.
5724 * lex.c (init_parse): Constify parameter and return value.
5725 (cp_pragma_interface, cp_pragma_implementation): Constify
5726 filename argument.
5727 (reinit_parse_for_method, reinit_parse_for_block,
5728 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5729 Constify local char *.
5730 * pt.c: Don't declare lineno or input_filename.
5731 (print_template_context, tsubst_friend_function, tsubst_decl,
5732 tsubst, instantiate_decl): Constify local char *.
5733 * semantics.c (expand_body): Constify local char *.
5734 * tree.c (build_srcloc): Constify filename parameter.
5735 * typeck.c (c_expand_asm_operands): Constify filename
5736 parameter.
5737
5738 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
5739
5740 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5741 offsetof expansion.
5742
5743 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
5744
5745 * inc/cxxabi.h: Fix typos in comment.
5746 (__base_class_info::__offset): Use a static_cast.
5747
5748 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
5749
5750 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
5751 of std::size_t and std::ptrdiff_t respectively.
5752 * tinfo.cc: Likewise.
5753 * vec.cc: Likewise.
5754
5755 2000-05-06 Richard Henderson <rth@cygnus.com>
5756
5757 * typeck.c (build_c_cast): Don't warn integer->pointer size
5758 mismatch for constants.
5759
5760 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
5761
5762 * rtti.c (ptmd_initializer): Set non-public, if class is
5763 incomplete.
5764
5765 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
5766 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5767 __cxa_vec_delete): Likewise.
5768 * tinfo.cc (__dynamic_cast): Likewise.
5769 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5770 __cxa_vec_delete): Likewise.
5771
5772 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5773
5774 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
5775 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
5776 (lang_decl_flags): Add vcall_offset.
5777 (THUNK_VCALL_OFFSET): Use it.
5778 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
5779 * method.c (make_thunk): Create the lang_decl here, not in
5780 emit_thunk.
5781 (emit_thunk): Make generic thunks into ordinary functions once
5782 they have been fed to expand_body.
5783 * semantics.c (expand_body): Set current_function_is_thunk here.
5784
5785 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5786
5787 * class.c (update_vtable_entry_for_fn): Prototype.
5788
5789 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
5790 and `tmpl'.
5791
5792 * search.c (dfs_build_inheritance_graph_order): Prototype.
5793
5794 2000-05-04 Mark Mitchell <mark@codesourcery.com>
5795
5796 * cp-tree.h (special_function_kind): Add various kinds of
5797 destructors.
5798 (special_function_p): New function.
5799 * class.c (overrides): Don't let one kind of destructor override
5800 another.
5801 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
5802 whether or not to instantiate a template.
5803 * tree.c (special_function_p): Define.
5804
5805 2000-05-03 Mark Mitchell <mark@codesourcery.com>
5806
5807 * cp-tree.def (THUNK_DECL): Remove.
5808 * cp-tree.h (DECL_THUNK_P): New macro.
5809 (DECL_NON_THUNK_FUNCTION_P): Likewise.
5810 (DECL_EXTERN_C_FUNCTION_P): Likewise.
5811 (SET_DECL_THUNK_P): Likewise.
5812 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
5813 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
5814 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
5815 * decl.c (decls_match): Use DECL_EXTERN_C_P.
5816 (duplicate_decls): Likewise.
5817 (pushdecl): Likewise. Adjust thunk handling.
5818 (grokfndecl): Use DECL_EXTERN_C_P.
5819 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
5820 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
5821 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
5822 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
5823 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
5824 DECL_NO_STATIC_CHAIN.
5825 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
5826 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
5827 * search.c (covariant_return_p): Remove THUNK_DECL handling.
5828 * ir.texi: Update.
5829
5830 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5831
5832 * tree.c (walk_tree): Set lineno.
5833
5834 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5835
5836 * exception.cc: Update license notice.
5837 * new.cc: Likewise.
5838 * new1.cc: Likewise.
5839 * new2.cc: Likewise.
5840 * tinfo.cc: Likewise.
5841 * tinfo2.cc: Likewise.
5842 * vec.cc: Likewise.
5843 * inc/cxxabi.h: Likewise.
5844 * inc/exception: Likewise.
5845 * inc/new: Likewise.
5846 * inc/new.h: Likewise.
5847 * inc/typeinfo: Likewise.
5848
5849 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
5850
5851 * tree.c (build_target_expr_with_type): If we already have a
5852 TARGET_EXPR, just return it.
5853
5854 * optimize.c (initialize_inlined_parameters): Don't generate an
5855 EXPR_STMT if we can just use DECL_INITIAL.
5856 * decl.c (emit_local_var): Only make the initialization a
5857 full-expression if stmts_are_full_exprs_p.
5858
5859 2000-05-01 Mark Mitchell <mark@codesourcery.com>
5860
5861 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
5862 macro.
5863 * call.c (standard_conversion): Use it.
5864 (direct_reference_binding): Likewise.
5865 (build_over_call): Likewise.
5866 (is_properly_derived_from): Likewise.
5867 (compare_ics): Likewise.
5868 * class.c (resolves_to_fixed_type_p): Likewise.
5869 * optimize.c (declare_return_variable): Likewise.
5870 * pt.c (is_specialization_of): Likewise.
5871 (unify): Likewise.
5872 * typeck.c (comp_target_parms): Likeiwse.
5873 (build_static_cast): Likewise.
5874 (build_reinterpret_cast): Likewise.
5875 (build_const_cast): Likewise.
5876 (comp_ptr_ttypes_real): Likewise.
5877 (comp_ptr_ttypes_const): Likewise.
5878 * typeck2.c (process_init_constructor): Likewise.
5879
5880 2000-04-30 Scott Snyder <snyder@fnal.gov>
5881
5882 * decl.c (finish_destructor_body): Use the base destructor when
5883 destroying virtual bases.
5884
5885 2000-04-30 Mark Mitchell <mark@codesourcery.com>
5886
5887 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
5888 STMT_EXPRs.
5889 * optimize.c (struct inline_data): Add target_exprs field.
5890 (declare_return_variable): When a function returns an aggregate,
5891 use the variable declared in the TARGET_EXPR as the remapped
5892 DECL_RESULT.
5893 (expand_call_inline): Update the pending target_exprs stack.
5894 (optimize_function): Initialize the stack.
5895
5896 * decl2.c (finish_file): Fix typo in comment.
5897
5898 * method.c (emit_thunk): Don't try to return a `void' value.
5899
5900 * optimize.c (initialize_inlined_parameters): If the parameter is
5901 addressable, we need to make a new VAR_DECL, even if the
5902 initializer is constant.
5903
5904 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
5905
5906 * decl.c (grok_op_properties): Add an extra check of argtypes.
5907
5908 2000-04-27 Mark Mitchell <mark@codesourcery.com>
5909
5910 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
5911 variables.
5912 (initialize_inlined_parameters): Try to avoid creating new
5913 VAR_DECLs.
5914
5915 2000-04-27 Alex Samuel <samuel@codesourcery.com>
5916
5917 * lex.c (my_get_run_time): Remove.
5918 (init_filename_times): Use get_run_time instead of my_get_run_time.
5919 (check_newline): Likewise.
5920 (dump_time_statistics): Likewise.
5921 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
5922 of computing elapsed time explicitly.
5923
5924 2000-04-26 Mark Mitchell <mark@codesourcery.com>
5925
5926 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
5927 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
5928 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
5929 before calling decl_constant_value.
5930 * class.c (check_bitfield_decl): Likewise.
5931 * cvt.c (ocp_convert): Likewise.
5932 (convert): Likewise.
5933 * decl.c (compute_array_index_type): Likewise.
5934 (build_enumerator): Likewise.
5935 * decl2.c (check_cp_case_value): Likewise.
5936 * pt.c (convert_nontype_argument): Likewise.
5937 (tsubst): Likewise.
5938 * typeck.c (decay_conversion): Likewise.
5939 (build_compound_expr): Likewise.
5940 (build_reinterpret_cast): Likewise.
5941 (build_c_cast): Likewise.
5942 (convert_for_assignment): Likewise.
5943
5944 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
5945
5946 * decl.c (finish_function): Don't play games with DECL_INLINE.
5947
5948 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
5949
5950 * ir.texi: Correct typo.
5951
5952 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5953
5954 * decl.c (grokdeclarator): Reject VLAs as members.
5955
5956 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
5957
5958 * call.c (standard_conversion): Accept conversion between
5959 COMPLEX_TYPEs.
5960
5961 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
5962
5963 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
5964
5965 * decl2.c (finish_file): Remove double setup for accounting
5966 compile time.
5967
5968 2000-04-24 Robert Lipe <robertlipe@usa.net>
5969
5970 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
5971
5972 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
5973
5974 * new.cc (set_new_handler): Needs to be in std::.
5975
5976 2000-04-23 Mark Mitchell <mark@codesourcery.com>
5977
5978 * cp-tree.h (lang_decl): Remove pretty_function_p.
5979 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
5980 language-specific node.
5981 * decl.c (cp_make_fname_decl): Use build_decl, not
5982 build_lang_decl, to build the variables.
5983 (grokvardecl): Don't call build_lang_decl for local variables in
5984 templates.
5985 (grokdeclarator): Don't call build_lang_decl for local type
5986 declarations in templates.
5987 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
5988 zero'd memory, rather than calling memset.
5989 * pt.c: Include hashtab.h.
5990 (local_specializations): New variable.
5991 (retrieve_local_specialization): Use it.
5992 (register_local_specialization): Likewise.
5993 (tsubst_decl): Don't assume local variables have
5994 DECL_LANG_SPECIFIC.
5995 (instantiate_decl): Set up local_specializations.
5996 * Makefile.in (HTAB_H): New variable.
5997
5998 2000-04-23 Richard Henderson <rth@cygnus.com>
5999
6000 * typeck.c (c_expand_asm_operands): Restore the original
6001 contents of the output list.
6002
6003 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
6004
6005 * ir.texi: Document complex number representation.
6006
6007 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
6008
6009 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
6010 (target_incomplete_p): New function.
6011 (tinfo_base_init): Create comdat NTBS name variable.
6012 (ptr_initializer): Add non_public parameter. Calculate it.
6013 (ptmd_initializer): Likewise.
6014 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
6015 (create_real_tinfo_var): Add non_public parameter. Use it.
6016 Push proxy into global namespace.
6017 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
6018 New enumeration.
6019 * inc/typeinfo (type_info::before, type_info::operator==):
6020 Compare __name addresses.
6021
6022 * tinfo2.cc: Remove new-abi builtins comment.
6023
6024 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
6025
6026 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
6027
6028 * call.c (joust): Exit early if we get the same function, too.
6029
6030 * decl2.c (key_method): Return NULL_TREE for template classes.
6031 (import_export_class): Don't need to check for template classes.
6032
6033 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
6034
6035 * lex.c: Remove references to cccp.c.
6036
6037 2000-04-18 Mark Mitchell <mark@codesourcery.com>
6038
6039 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
6040 volatile_memfunc. Add destructor_attr. Adjust dummy.
6041 (DECL_DESTRUCTOR_P): Use destructor_attr.
6042 (DECL_CONST_MEMFUNC_P): Reimplement.
6043 (DECL_VOLATILE_MEMFUNC_P): Remove.
6044 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
6045 (overrides): Use DECL_DESTRUCTOR_P.
6046 (check_for_override): Likewise.
6047 * decl.c (start_function): Likewise.
6048 * decl2.c (grokfclassfn): Likewise.
6049 (check_classfn): Likewise.
6050 (grok_function_init): Likewise.
6051
6052 2000-04-17 Mark Mitchell <mark@codesourcery.com>
6053
6054 * decl2.c (grokfield): Issue error on illegal data member
6055 declaration.
6056
6057 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
6058
6059 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
6060
6061 2000-04-16 Mark Mitchell <mark@codesourcery.com>
6062
6063 * class.c (build_vtable_entry): Don't build thunks for type-info
6064 functions.
6065
6066 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
6067
6068 * decl.c (decls_match): Allow a redeclaration of a builtin to
6069 specify args while the builtin did not.
6070
6071 2000-04-15 Mark Mitchell <mark@codesourcery.com>
6072
6073 * cp-tree.def (THUNK_DECL): Add to documentation.
6074 * cp-tree.h (flag_huge_objects): Declare.
6075 * class.c (modify_vtable_entry): Tidy.
6076 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
6077 Calculate delta appropriately for the new ABI.
6078 (dfs_modify_vtables): Use it.
6079 (modify_all_vtables): Fix thinko in code to add overriding copies
6080 of functions to primary vtables.
6081 (build_clone): Fix typo in comment.
6082 (clone_function_decl): Correct order of destructors in vtable.
6083 (build_vbase_offset_vtbl_entries): Adjust comment.
6084 (dfs_vcall_offset_queue_p): Remove.
6085 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
6086 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
6087 (build_vtable_entry): Correct check for pure virtual functions.
6088 Don't declare flag_huge_objects.
6089 * decl.c (flag_huge_objects): Remove declaration.
6090 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
6091 Use int_size_in_bytes.
6092 (emit_thunk): Handle vcall offset thunks.
6093
6094 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6095
6096 * decl2.c (parse_time, varconst_time): Delete declarations.
6097 (finish_file): Delete LINENO declaration.
6098 START_TIME and THIS_TIME now long.
6099
6100 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
6101
6102 * class.c (build_base_field): Reformat comment.
6103
6104 * inc/cxxabi.h (stddef.h): Comment inclusion.
6105 (__base_class_info::__offset): Comment shift.
6106
6107 2000-04-12 Mark Mitchell <mark@codesourcery.com>
6108
6109 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
6110 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
6111 (cp_push_exception_identifier): New macro.
6112 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
6113 (DECL_BASE_DESTRUCTOR_P): Likewise.
6114 (DECL_DELETING_DESTRUCTOR_P): Likewise.
6115 (get_vtbl_decl_for_binfo): Fix formatting.
6116 (in_charge_arg_for_name): New macro.
6117 (maybe_build_cleanup_and_delete): Remove declaration.
6118 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
6119 (in_charge_arg_for_name): New function.
6120 (build_new_method_call): Use it. Handle cloned destructors.
6121 (build_clone): Don't make the base constructor virtual.
6122 Automatically defer generated functions.
6123 (clone_function_decl): Handle destructors, too.
6124 (clone_constructors_and_destructors): Likewise.
6125 (create_vtable_ptr): Don't create a vtable entry for a cloned
6126 function.
6127 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
6128 (initialize_predefined_identifiers): Update appropriately.
6129 (finish_destructor_body): Simplify.
6130 (maybe_build_cleanup_and_delete): Remove.
6131 * except.c (expand_throw): Handle new-ABI destructors.
6132 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
6133 (build_dtor_call): New function.
6134 (build_delete): Use it. Simplify.
6135 * optimize.c (maybe_clone_body): Handle destructors.
6136 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
6137
6138 * exception.cc (cleanup_fn): New typedef.
6139 (CALL_CLEANUP): New macro.
6140 (cp_eh_info): Use them.
6141 (__cp_push_exception): Likewise.
6142 (__cp_pop_exception): Likewise.
6143
6144 2000-04-11 Mark Mitchell <mark@codesourcery.com>
6145
6146 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
6147 (complete_dtor_identifier): New macro.
6148 (CLASSTYPE_FIRST_CONVERSION): Remove.
6149 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
6150 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
6151 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
6152 (CLASSTYPE_CONSTRUCTORS): Likewise.
6153 (CLASSTYPE_DESTRUCTORS): Likewise.
6154 (lang_decl): Add cloned_function.
6155 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
6156 (DECL_BASE_CONSTRUCTOR_P): Likewise.
6157 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
6158 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
6159 (DECL_CLONED_FUNCTION_P): Likewise.
6160 (DECL_CLONED_FUNCTION): Likewise.
6161 (clone_function_decl): Declare.
6162 (maybe_clone_body): Likewise.
6163 * call.c (build_user_type_conversion_1): Call complete object
6164 constructors in the new ABI.
6165 (build_new_method_call): Don't add in-charge parameters under the
6166 new ABI.
6167 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
6168 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
6169 CLASSTYPE_DESTRUCTOR_SLOT.
6170 (build_clone): New function.
6171 (clone_function_decl): Likewise.
6172 (clone_constructors_and_destructors): Likewise.
6173 (check_bases_and_members): Use it.
6174 * decl.c (iniitialize_predefined_identifiers): Initialize
6175 complete_dtor_identifier.
6176 (finish_function): Don't add extra code to a clone.
6177 (lang_mark_tree): Mark cloned_function.
6178 * decl2.c (mark_used): Don't bother trying to instantiate things
6179 we synthesized.
6180 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
6181 * method.c (set_mangled_name_for_decl): Don't treat clones as
6182 constructors.
6183 (synthesize_method): Sythesize cloned functions, not the clones.
6184 * optimize.c (inline_data): Update comment on ret_label.
6185 (remap_block): Don't assume DECL_INITIAL exists.
6186 (copy_body_r): Allow ret_label to be NULL.
6187 (maybe_clone_body): Define.
6188 * pt.c (tsubst_decl): Handle clones.
6189 (instantiate_clone): New function.
6190 (instantiate_template): Use it.
6191 (set_mangled_name_for_template_decl): Don't treat clones as
6192 constructors.
6193 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
6194 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
6195 * semantics.c (expand_body): Clone function bodies as necessary.
6196
6197 * optimize.c (remap_decl): Avoid sharing structure for arrays
6198 whose size is only known at run-time.
6199 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
6200
6201 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
6202 to has_in_charge_parm_p.
6203 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
6204 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
6205 (DECL_COPY_CONSTRUCTOR_P): New macro.
6206 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
6207 (build_user_type_conversion_1): Likewise.
6208 (convert_like_real): Likewise.
6209 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
6210 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
6211 (copy_args_p): Likewise.
6212 (grok_ctor_properties): Likewise.
6213 (start_function): Likewise.
6214 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
6215 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
6216 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
6217 * method.c (do_build_copy_constructor): Use
6218 DECL_HAS_IN_CHARGE_PARM_P.
6219 (synthesize_method): Likewise.
6220 * pt.c (instantiate_template): Remove goto.
6221 * tree.c (build_cplus_method_type): Remove mention of obstacks in
6222 comment.
6223
6224 * cp-tre.h (finish_function): Change prototype.
6225 * decl.c (end_cleanup_fn): Adjust caller.
6226 (finish_function): Take only one parameter.
6227 * decl2.c (finish_objects): Adjust caller.
6228 (finish_static_storage_duration_function): Likewise.
6229 * method.c (emit_thunk): Likewise.
6230 * parse.y: Likewise.
6231 * parse.c: Regenerated.
6232 * pt.c (instantiate_decl): Likewise.
6233 * rtti.c (synthesize_tinfo_fn): Likewise.
6234 * semantics.c (expand_body): Likewise.
6235
6236 * cp-tree.h (copy_decl): New function.
6237 * class.c (finish_struct_1): Use it.
6238 * lex.c (copy_decl): Define it.
6239 * pt.c (tsubst_decl): Likewise.
6240 * tree.c (copy_template_template_parm): Likewise.
6241
6242 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
6243 has_nonpublic_assign_ref.
6244 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
6245 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
6246 * class.c (finish_struct_methods): Don't set
6247 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
6248 (interface_only): Don't declare.
6249 (interface_unknown): Likewise.
6250
6251 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6252
6253 * tree.h (HAVE_TEMPLATES): Remove definition.
6254 * lang-options.h (-fthis-is-variable): Remove documentation.
6255
6256 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
6257
6258 * class.c (instantiate_type): Handle object-relative template-id.
6259
6260 * semantics.c (finish_expr_stmt): Call convert_to_void here.
6261 * decl.c (cplus_expand_expr_stmt): Not here.
6262
6263 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
6264 Initialize exprtype earlier.
6265
6266 * parse.y (fn.def1): Check for defining types in return types.
6267
6268 * decl.c (check_tag_decl): Notice extra fundamental types.
6269 Diagnose empty decls in classes, too.
6270
6271 * decl.c (grokdeclarator): Don't override an anonymous name if no
6272 declarator was given.
6273
6274 * cvt.c (convert_to_void): Call resolve_offset_ref.
6275
6276 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
6277
6278 * decl2.c (decl_namespace): Handle getting a type.
6279
6280 * typeck.c (build_c_cast): Re-enable warning for cast between
6281 pointer and integer of different size.
6282
6283 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
6284
6285 * inc/cxxabi.h (__pointer_type_info): Add restrict and
6286 incomplete flags.
6287 (__pointer_type_info::__pointer_catch): New virtual function.
6288 (__pointer_to_member_type_info): Derive from
6289 __pointer_type_info. Adjust.
6290 (__pointer_to_member_type_info::__do_catch): Remove.
6291 (__pointer_to_member_type_info::__is_pointer_p): Declare.
6292 (__pointer_to_member_type_info::__pointer_catch): Declare.
6293 * rtti.c (qualifier_flags): Add restrict flag.
6294 (ptmd_initializer): Reorder members.
6295 (create_tinfo_types): Expand comments. Reorder
6296 ptmd_desc_type_node members.
6297 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
6298 Implement.
6299 (__pointer_type_info::__do_catch): Move specific code into
6300 __pointer_catch. Call it.
6301 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
6302 specific catch checking. Fix void conversion check.
6303 (__pointer_to_member_type_info::__do_catch): Remove.
6304 (__pointer_to_member_type_info::__pointer_catch): Implement.
6305
6306 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6307
6308 * lex.c (init_parse): Remove traces of classof and headof.
6309 * decl2.c (flag_operator_names): Default to 1.
6310 (lang_decode_option): Do not set it for -ansi.
6311
6312 2000-04-09 Mark Mitchell <mark@codesourcery.com>
6313
6314 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
6315 (DECL_MAIN_VARIANT): Remove.
6316 * decl.c (duplicate_decls): Don't set it.
6317 (start_function): Likewise.
6318 (lang_mark_tree): Don't mark it.
6319 * decl2.c (defer_fn): Don't use it.
6320 * lex.c (retrofit_lang_decl): Don't set it.
6321 * pt.c (tsubst_decl): Likewise.
6322 * ptree.c (print_lang_decl): Don't print it.
6323 * typeck.c (mark_addressable): Don't use it.
6324
6325 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6326
6327 * vec.cc: Include <new> and <exception>.
6328 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
6329 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
6330 terminate.
6331 (__cxa_vec_delete): Catch dtor exceptions.
6332
6333 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
6334
6335 Prepend __ to implementation defined names.
6336 * inc/typeinfo (type_info): Rename _name to __name.
6337 (type_info::type_info): Rename parameter.
6338 (type_info::operator==, type_info::operator!=,
6339 type_info::before): Likewise.
6340 (type_info::is_pointer_p, type_info::is_function_p,
6341 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
6342 parameters.
6343 * inc/cxxabi.h
6344 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
6345 (__pointer_type_info::__pointer_type_info): Likewise.
6346 (__pointer_type_info::is_pointer_p,
6347 __pointer_type_info::do_catch): Prepend __. Rename parameters.
6348 (__array_type_info::__array_type_info): Rename parameters.
6349 (__function_type_info::__function_type_info): Likewise.
6350 (__function_type_info::is_function_p): Prepend __.
6351 (__enum_type_info::__enum_type_info): Rename parameters.
6352 (__pointer_to_member_type_info::__pointer_to_member_type_info):
6353 Likewise.
6354 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
6355 parameters.
6356 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
6357 (__class_type_info::__class_type_info): Rename parameters.
6358 (__class_type_info::sub_kind): Prepend __. Adjust member names.
6359 (__class_type_info::upcast_result,
6360 __class_type_info::dyncast_result): Prepend __. Move definition
6361 into tinfo.cc.
6362 (__class_type_info::do_upcast, __class_type_info::do_catch,
6363 __class_type_info::find_public_src,
6364 __class_type_info::do_dyncast,
6365 __class_type_info::do_find_public_src): Prepend __. Rename
6366 parameters.
6367 (__si_class_type_info::__si_class_type_info): Rename parameters.
6368 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
6369 __si_class_type_info::do_find_public_src): Prepent __. Rename
6370 parameters.
6371 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
6372 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
6373 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
6374 parameters.
6375 (__dynamic_cast): Rename parameters.
6376 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
6377 type_info::do_catch, type_info::do_upcast): Prepend __.
6378 (contained_p, public_p, virtual_p, contained_public_p,
6379 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
6380 (__class_type_info::do_catch,
6381 __class_type_info::do_upcast): Prepend __. Adjust.
6382 (__class_type_info::__upcast_result,
6383 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
6384 Adjust.
6385 (__class_type_info::find_public_src): Prepend __. Adjust.
6386 (__class_type_info::do_find_public_src,
6387 __si_class_type_info::do_find_public_src,
6388 __vmi_class_type_info::do_find_public_src): Likewise.
6389 (__class_type_info::do_dyncast,
6390 __si_class_type_info::do_dyncast,
6391 __vmi_class_type_info::do_dyncast): Likewise.
6392 (__class_type_info::do_upcast,
6393 __si_class_type_info::do_upcast,
6394 __vmi_class_type_info::do_upcast): Likewise.
6395 (__dynamic_cast): Adjust.
6396 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
6397 (__function_type_info::is_function_p): Likewise.
6398 (__pointer_type_info::do_catch): Likewise. Adjust.
6399 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
6400 (__throw_type_match_rtti_2): Adjust.
6401 (__is_pointer): Adjust.
6402
6403 2000-04-08 Mark Mitchell <mark@codesourcery.com>
6404
6405 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
6406 (complete_ctor_identifier): New macro.
6407 (special_function_kind): Add sfk_copy_constructor and
6408 sfk_assignment_operator.
6409 (LOOKUP_HAS_IN_CHARGE): Remove.
6410 (cons_up_default_function): Rename to ...
6411 (implicitly_declare_fn): ... this.
6412 * call.c (build_new_method_call): Add in-charge parameters for
6413 constructors here.
6414 * class.c (add_implicitly_declared_members): Change parameter name
6415 from cant_have_assignment to cant_have_const_assignment.
6416 Replace calls to cons_up_default_function to implicitly_declare_fn.
6417 * cvt.c (ocp_convert): Use complete_ctor_identifier.
6418 * decl.c (initialize_predefined_identifiers): Initialize it.
6419 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
6420 complex expression.
6421 * init.c (expand_default_init): Don't calculate the in-charge
6422 parameter here.
6423 (build_new_1): Likewise.
6424 * lex.c (cons_up_default_function): Move to method.c.
6425 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
6426 (implicitly_declare_fn): New function.
6427 * typeck.c (build_static_cast): Use complete_ctor_identifier.
6428 (build_modify_expr): Likewise.
6429 * typeck2.c (build_functional_cast): Likewise.
6430
6431 Under the new ABI, constructors don't return `this'.
6432 * cp-tree.h (warn_reorder): Declare.
6433 (special_function_kind): New enum.
6434 (global_base_init_list): Remove declaration.
6435 (emit_base_init): Don't return a value.
6436 (check_base_init): Don't declare.
6437 (is_aggr_typedef): Likewise.
6438 * decl.c (check_special_function_return_type): New function.
6439 (return_types): Remove.
6440 (grokdeclarator): Use check_special_function_return_type.
6441 (start_function): Don't initialize ctor_label under the new ABI.
6442 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
6443 * init.c (begin_init_stmts): Move to top of file.
6444 (finish_init_stmts): Likewise.
6445 (warn_reorder): Don't declare.
6446 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
6447 value.
6448 (check_base_init): Remove.
6449 (is_aggr_typedef): Likewise.
6450 (build_new_1): Don't use the return value of a constructor.
6451 * semantics.c (setup_vtbl_ptr): Don't use the return value
6452 of emit_base_init.
6453 * typeck.c (check_return_expr): Don't magically convert return
6454 statements into `return this' in constructors under the new ABI.
6455
6456 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
6457 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
6458 (base_ctor_identifier): New macro.
6459 (base_dtor_identifier): Likewise.
6460 (deleting_dtor_identifier): Likewise.
6461 * decl.c: Don't include obstack.h.
6462 (obstack_chunk_alloc): Don't define.
6463 (obstack_chunk_free): Likewise.
6464 (struct predefined_identifier): New type.
6465 (initialize_predefined_identifiers): New function.
6466 (init_decl_processing): Use it.
6467 (debug_temp_inits): Remove.
6468 (start_method): Don't call preserve_data.
6469 (hack_incomplete_structures): Update comment.
6470 * init.c (init_init_processing): Don't initialize
6471 nelts_identifier.
6472 (build_offset_rf): Remove dead code.
6473 (build_delete): Use CLASSTYPE_N_BASECLASSES.
6474 * search.c (init_search_processing): Don't initialize
6475 vptr_identifier.
6476
6477 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6478
6479 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
6480 some sign_compare warnings.
6481
6482 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6483
6484 Rename abi::__vmi_class_type_info members.
6485 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
6486 base_list, detail_masks members to vmi_flags, vmi_base_count,
6487 vmi_bases and vmi_flags_masks respectively.
6488 (__vmi_class_type_info::vmi_flags_masks): Rename
6489 details_unknown_mask to flags_unknown_mask.
6490 * tinfo.cc (__class_type_info::do_upcast): Adjust.
6491 (__vmi_class_type_info::do_find_public_src): Adjust.
6492 (__vmi_class_type_info::do_dyncast): Adjust.
6493 (__vmi_class_type_info::do_upcast): Adjust.
6494
6495 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
6496
6497 * tinfo.cc (convert_to_base): New function.
6498 (get_vbase_offset): Remove. Move into convert_to_base.
6499 (__vmi_class_type_info::do_find_public_src): Adjust.
6500 (__vmi_class_type_info::do_dyncast): Adjust.
6501 (__vmi_class_type_info::do_upcast): Adjust.
6502
6503 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
6504
6505 * tinfo.cc (operator=): Use __builtin_strcmp.
6506 * tinfo2.cc (before): Likewise.
6507
6508 2000-04-06 Mark Mitchell <mark@codesourcery.com>
6509
6510 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
6511 (DECL_SAVED_INLINE): Rename to ...
6512 (DECL_DEFERRED_FN): ... this.
6513 (in_function_p): Remove declaration.
6514 (mark_inline_for_output): Rename to ...
6515 (defer_fn): ... this.
6516 * decl.c (finish_function): Adjust call to mark_inline_for_output.
6517 (in_function_p): Remove definition.
6518 * decl2.c (saved_inlines): Rename to ...
6519 (deferred_fns): ... this.
6520 (saved_inlines_used): Rename to ...
6521 (deferred_fns_used): ... this.
6522 (mark_inline_for_output): Rename to ...
6523 (defer_fn): ... this.
6524 (finish_file): Adjust accordingly.
6525 (init_decl2): Likewise.
6526 * lex.c (cons_up_default_function): Likewise.
6527 * pt.c (mark_decl_instantiated): Likewise.
6528 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
6529 circumstances.
6530 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
6531 * semantics.c (expand_body): Defer more functions.
6532
6533 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6534
6535 * vec.cc: New file.
6536 * Make-lang.in (CXX_LIB2FUNCS): Add it.
6537 (vec.o): Build it.
6538 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6539 __cxa_vec_delete): Declare.
6540
6541 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
6542
6543 * rtti.c (dfs_class_hint_mark): New static function.
6544 (dfs_class_hint_unmark): New static function.
6545 (class_hint_flags): Use them.
6546
6547 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
6548
6549 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
6550
6551 2000-04-05 Mark Mitchell <mark@codesourcery.com>
6552
6553 * cp-tree.h (instantiate_decl): Change prototype.
6554 * decl2.c (mark_used): Adjust call.
6555 * optimize.c (inlinable_function_p): Adjust handling of templates.
6556 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
6557 (do_type_instantiation): Likewise.
6558 (instantiate_decl): Defer more templates.
6559 (instantiate_pending_templates): Adjust logic to handle inline
6560 friend functions.
6561
6562 * Makefile.in (GGC_H): New variable. Use it throughout in place
6563 of ggc.h.
6564
6565 * call.c: Don't include obstack.h. Include ggc.h.
6566 (obstack_chunk_alloc): Don't define.
6567 (obstack_chunk_free): Likewise.
6568 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
6569 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
6570 (pop_switch): Free it.
6571
6572 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
6573
6574 * dump.c (dequeue_and_dump): Don't try to print the bit_position
6575 if we don't have a DECL_FIELD_OFFSET.
6576
6577 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
6578
6579 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
6580 special_function_p.
6581
6582 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6583
6584 * cfns.gperf (hash, libc_name_p): Prototype.
6585
6586 * rtti.c (build_dynamic_cast_1): Constification.
6587
6588 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
6589
6590 * semantics.c (deferred_type_access_control): Prototype.
6591
6592 2000-04-04 Mark Mitchell <mark@codesourcery.com>
6593
6594 Correct many new ABI issues regarding vbase and vcall offset
6595 layout.
6596 * cp-tree.h (BINFO_VTABLE): Document.
6597 (struct lang_type): Tweak formatting.
6598 (BINFO_PRIMARY_BINFO): Add to documentation.
6599 (CLASSTYPE_VSIZE): Fix typo in comment.
6600 (CLASSTYPE_VBASECLASSES): Update documentation.
6601 (BINFO_VBASE_MARKED): Remove.
6602 (SET_BINFO_VBASE_MARKED): Likewise.
6603 (CLEAR_BINFO_VBASE_MARKED): Likewise.
6604 (BINFO_FIELDS_MARKED): Remove.
6605 (SET_BINFO_FIELDS_MARKED): Likewise.
6606 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
6607 (enum access_kind): New enumeration.
6608 (num_extra_vtbl_entries): Remove declaration.
6609 (size_extra_vtbl_entries): Likewise.
6610 (get_vtbl_decl_for_binfo): New function.
6611 (dfs_vbase_unmark): Remove declaration.
6612 (mark_primary_bases): Likewise.
6613 * class.c (SAME_FN): Remove.
6614 (struct vcall_offset_data_s): Move definition.
6615 (build_vbase_pointer): Use `build', not `build_binary_op', to
6616 access the vbase pointer under the new ABI.
6617 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
6618 (build_primary_vtable): Likewise.
6619 (dfs_mark_primary_bases): Move here from search.c.
6620 (mark_primary_bases): Likewise.
6621 (determine_primary_bases): Under the new ABI, don't make a base
6622 class a primary base just because we don't yet have any virtual
6623 functions.
6624 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
6625 (num_vfun_entries): Remove.
6626 (dfs_count_virtuals): Likewise.
6627 (num_extra_vtbl_entries): Likewise.
6628 (size_extra_vtbl_entries): Likewise.
6629 (layout_virtual_bases): Iterate in inheritance graph order under
6630 the new ABI.
6631 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
6632 indicate that a vfield is present.
6633 (init_class_processing): Initialize access_public_node, etc., from
6634 ak_public, etc.
6635 (get_vtbl_decl_for_binfo): New function.
6636 (dump_class_hierarchy_r): Likewise.
6637 (dump_class_hierarchy): Use it.
6638 (finish_vtbls): Build the vtbls in inheritance graph order.
6639 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6640 (initialize_vtable): Use get_vtbl_decl_for_binfo.
6641 (accumulate_vtbl_inits): Add comments explaining why a pre-order
6642 walk is required.
6643 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
6644 where the vptr points, even for primary vtables.
6645 (build_vtbl_initializer): Adjust handling of vbase and vcall
6646 offsets.
6647 (build_vcall_and_vbase_vtable_entries): New function.
6648 (dfs_build_vbase_offset_vtbl_entries): Remove.
6649 (build_vbase_offset_vtbl_entries): Reimplement.
6650 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
6651 were already handled in a primary base class vtable.
6652 (build_vcall_offset_vtbl_entries): Adjust.
6653 (build_rtti_vtbl_entries): Adjust.
6654 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
6655 * init.c (expand_virtual_init): Simplify.
6656 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
6657 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
6658 * search.c (BINFO_ACCESS): New macro.
6659 (SET_BINFO_ACCESS): Likewise.
6660 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
6661 (access_in_type): Likewise.
6662 (dfs_accessible_p): Likewise.
6663 (protected_accessible_p): Likewise.
6664 (lookup_fnfields_1): Adjust documentation.
6665 (dfs_mark_primary_bases): Move to class.c
6666 (mark_primary_bases): Likewise.
6667 (dfs_vbase_unmark): Remove.
6668 (virtual_context): Use BINFO_FOR_VBASE.
6669 (dfs_get_vbase_types): Simplify.
6670 (dfs_build_inheritance_graph_order): New function.
6671 (get_vbase_types): Use it.
6672 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6673
6674 * tinfo.cc (get_vbase_offset): New function.
6675 (__vmi_class_type_info::do_find_public_src): Use it.
6676 (__vmi_class_type_info::do_dyncast): Likewise.
6677 (__vmi_class_type_info::do_upcast): Likewise.
6678
6679 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
6680
6681 * lang-specs.h: Pass -fno-show-column to the preprocessor.
6682
6683 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
6684
6685 * rtti.c (class_hint_flags): Rename flags.
6686 (class_initializer): Remove flags.
6687 (synthesize_tinfo_var): Combine offset and flags. Add flags
6688 for __vmi_class_type_info.
6689 (create_tinfo_types): Remove flags from __class_type_info and
6690 __si_class_type_info. Merge flags and offset from
6691 base_class_type_info.
6692 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6693 (__base_class_info::is_virtual_p): Adjust.
6694 (__base_class_info::is_public_p): Adjust.
6695 (__base_class_info::offset): New accessor.
6696 (__class_type_info::details): Remove member.
6697 (__class_type_info::__class_type_info): Lose details.
6698 (__class_type_info::detail_masks): Remove.
6699 (__si_class_type_info::__si_class_type_info): Lose details.
6700 (__vmi_class_type_info::details): New member.
6701 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6702 (__vmi_class_type_info::detail_masks): New member.
6703 * tinfo.cc (__class_type_info::do_upcast): Initialize result
6704 with unknown_details_mask.
6705 (__vmi_class_type_info::do_find_public_src): Adjust
6706 (__vmi_class_type_info::do_dyncast): Adjust.
6707 (__vmi_class_type_info::do_upcast): Set result details, if
6708 needed. Adjust.
6709 (__dynamic_cast): Temporarily #if out optimization.
6710
6711 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
6712
6713 * rtti.c (get_tinfo_decl): Mark used.
6714 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6715 mark as dealt with, if we output it.
6716
6717 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6718
6719 * class.c: Reorganize to put virtual function table initialization
6720 machinery at the end of the file.
6721
6722 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
6723
6724 * class.c (finish_struct): Use bitsize_zero_node.
6725 * pt.c (instantiate_class_template): Likewise.
6726
6727 2000-03-28 Mark Mitchell <mark@codesourcery.com>
6728
6729 Put RTTI entries at negative offsets in new ABI.
6730 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6731 vbase offset at index -3, not -1.
6732 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6733 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6734 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6735 (build_rtti_vtbl_entries): New function.
6736 (set_rtti_entry): Remove.
6737 (build_primary_vtable): Don't use it.
6738 (build_secondary_vtable): Likewise.
6739 (start_vtable): Remove.
6740 (first_vfun_index): New function.
6741 (set_vindex): Likewise.
6742 (add_virtual_function): Don't call start_vtable. Do call
6743 set_vindex.
6744 (set_primary_base): Rename parameter.
6745 (determine_primary_base): Likewise.
6746 (num_vfun_entries): Don't use skip_rtti_stuff.
6747 (num_extra_vtbl_entries): Include RTTI information.
6748 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
6749 (skip_rtti_stuff): Remove.
6750 (dfs_modify_vtables): Don't use it.
6751 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
6752 (layout_nonempty_base_or_field): Update size handling.
6753 (create_vtable_ptr): Tweak.
6754 (layout_class_type): Adjust parameter names.
6755 (finish_struct_1): Simplify.
6756 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
6757 (skip_rtti_stuff): Remove.
6758 (first_vfun_index): New function.
6759 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6760 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
6761 (marked_vtable_pathp): Declare.
6762 (unmarked_vtable_pathp): Likewise.
6763 * error.c (dump_expr): Use first_vfun_index to calculate vtable
6764 offsets.
6765 * rtti.c (build_headof): Look for RTTI at negative offsets.
6766 (get_tinfo_decl_dynamic): Likewise.
6767 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
6768 here.
6769 (create_pseudo_type_info): Do it here instead. Adjust so that
6770 vptr points at first virtual function.
6771 * search.c (marked_vtable_pathp): Make it global.
6772 (unmarked_vtable_pathp): Likewise.
6773 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6774 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6775 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
6776 (get_pure_virtuals): Likewise.
6777 (expand_upcast_fixups): Likewise.
6778 * tree.c (debug_binfo): Likewise.
6779 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
6780 negative offset.
6781
6782 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6783
6784 * class.c (check_field_decl): Fix typo.
6785 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
6786 (check_methods): Likewise.
6787 (check_field_decls): Likewise.
6788 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
6789 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
6790 Use DECL_RESULT_FLD, not DECL_RESULT.
6791 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
6792 * lex.c (identifier_type): Likewise.
6793 * pt.c (determine_specialization, lookup_template_class): Likewise.
6794 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
6795 (resolve_overloaded_unification, more_specialized): Likewise.
6796 * semantics.c (finish_member_declaration): Likewise.
6797 * typeck.c (build_x_function_call): Likewise.
6798
6799 2000-03-26 Mark Mitchell <mark@codesourcery.com>
6800
6801 * class.c (layout_empty_base): Handle empty bases with non-byte
6802 alignment.
6803 (build_base_field): Likewise.
6804 (layout_virtual_bases): Likewise.
6805
6806 * class.c (finish_struct_1): Fix typo in this change:
6807
6808 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6809
6810 2000-03-25 Mark Mitchell <mark@codesourcery.com>
6811
6812 * decl.c (grokdeclarator): Count partial specializations when
6813 keeping track of how many template classes have been seen.
6814
6815 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
6816
6817 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6818
6819 * class.c (build_vbase_pointer_fields): layout_field now place_field.
6820 (get_vfield_offset): Use byte_position.
6821 (set_rtti_entry): Set OFFSET to ssizetype zero.
6822 (get_binfo_offset_as_int): Deleted.
6823 (dfs_record_base_offsets): Use tree_low_cst.
6824 (dfs_search_base_offsets): Likewise.
6825 (layout_nonempty_base_or_field): Reflect changes in RLI format
6826 and call byte_position.
6827 (layout_empty_base): Convert offset to ssizetype.
6828 (build_base_field): use rli_size_unit_so_far.
6829 (dfs_propagate_binfo_offsets): Do computation in proper type.
6830 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
6831 (layout_class_type): Reflect changes in RLI names and fields.
6832 (finish_struct_1): Set DECL_FIELD_OFFSET.
6833 * dump.c (dequeue_and_dump): Call bit_position.
6834 * expr.c (cplus_expand_constant): Use byte_position.
6835 * rtti.c (expand_class_desc): Use bitsize_one_node.
6836 * typeck.c (build_component_addr): Use byte_position and don't
6837 special case for zero offset.
6838
6839 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
6840
6841 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
6842
6843 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
6844 tinfo object.
6845 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
6846 vtable.
6847
6848 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6849
6850 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
6851 DECL_P macros.
6852 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
6853 make_typename_type, check_initializer, cp_finish_decl,
6854 xref_tag): Likewise.
6855 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
6856 decl_namespace, arg_assoc_template_arg, arg_assoc,
6857 validate_nonmember_using_decl, do_class_using_decl): Likewise.
6858 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
6859 args_to_string): Likewise.
6860 * friend.c (is_friend): Likewise.
6861 * lex.c (note_got_semicolon, note_list_got_semicolon,
6862 is_global): Likewise.
6863 * method.c (build_overload_nested_name, build_overload_value,
6864 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
6865 * parse.y (typename_sub, typename_sub1): Likewise.
6866 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
6867 process_partial_specialization, convert_template_argument,
6868 template_args_equal, add_pending_template, lookup_template_class,
6869 for_each_template_parm_r, maybe_fold_nontype_arg,
6870 tsubst, instantiate_template, type_unification_real, unify,
6871 instantiate_pending_templates, set_mangled_name_for_template_decl):
6872 Likewise.
6873 * repo.c (repo_get_id, repo_template_used): Likewise.
6874 * search.c (lookup_field_1): Likewise.
6875 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
6876 * xref.c (classname): Likewise.
6877
6878 2000-03-22 Mark Mitchell <mark@codesourcery.com>
6879
6880 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
6881 (CANONICAL_BINFO): New macro.
6882 (BINFO_NEW_VTABLE_MARKED): Use it.
6883 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
6884 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
6885 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
6886 not TREE_TYPE.
6887 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6888 (build_secondary_vtable): Likewise.
6889 (dfs_finish_vtbls): Likewise.
6890 (dfs_accumulate_vtbl_inits): Likewise.
6891 (accumulate_vtbl_inits): New function.
6892 (finish_vtbls): Make sure that virtual bases come after
6893 non-virtual bases in the vtable group.
6894 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
6895 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6896 * search.c (struct vbase_info): Move definition.
6897 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6898 (unmarked_new_vtable_p): Likewise.
6899 (dfs_mark_vtable_path): Remove.
6900 (dfs_mark_new_vtable): Remove.
6901 (dfs_unmark_new_vtable): Likewise.
6902 (dfs_clear_search_slot): Likewise.
6903 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6904 (dfs_clear_vbase_slots): Likewise.
6905 (init_vbase_pointers): LIkewise.
6906
6907 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
6908
6909 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
6910 SIZETYPE to a non-SIZETYPE.
6911
6912 2000-03-21 Mark Mitchell <mark@codesourcery.com>
6913
6914 * class.c (layout_virtual_bases): Adjust names in conditionally
6915 compiled code.
6916
6917 * class.c (record_base_offsets): New function.
6918 (layout_conflict_p): Likewise.
6919 (layout_nonempty_base_or_field): Use it.
6920 (layout_empty_base): New function.
6921 (build_base_field): Use it.
6922 (build_base_fields): Update comment.
6923 (layout_virtual_bases): Fold in a little code form
6924 layout_basetypes. Use layout_empty_base.
6925 (layout_basetypes): Remove.
6926 (end_of_class): New function.
6927 (layout_class_type): Use it. Adjust.
6928
6929 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
6930 (fntype_p): Remove.
6931 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
6932 comment.
6933 (dfs_skip_nonprimary_vbases_markedp): Likewise.
6934 * typeck.c (fntype_p): Remove.
6935
6936 * cp-tree.h (TI_SPEC_INFO): Remove.
6937 (CLASSTYPE_TI_SPEC_INFO): Likewise.
6938 * pt.c (process_partial_specialization): Likewise.
6939
6940 * class.c (build_base_field): Fix thinko in computation of binfo
6941 offsets.
6942
6943 * tree.c (mark_local_for_remap_p): Mark variables declared in
6944 TARGET_EXPRs as well.
6945
6946 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6947
6948 * typeck.c (require_complete_type, complete_type,
6949 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
6950 build_array_ref, convert_arguments, pointer_diff,
6951 build_x_unary_op, build_unary_op, build_c_cast,
6952 build_modify_expr): Use COMPLETE_TYPE_P etc.
6953 * call.c (is_complete, convert_like_real,
6954 build_new_method_call): Likewise.
6955 * class.c (build_vbase_pointer_fields, check_bases,
6956 build_base_field, finish_struct_1, pushclass): Likewise.
6957 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
6958 * decl.c (maybe_process_template_type_declaration, pushtag,
6959 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
6960 layout_var_decl, check_initializer, cp_finish_decl,
6961 grokdeclarator, require_complete_types_for_parms,
6962 grok_op_properties, xref_tag, xref_basetypes,
6963 check_function_type): Likewise.
6964 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
6965 * friend.c (do_friend): Likewise.
6966 * init.c (build_offset_ref): Likewise.
6967 * parse.y (structsp): Likewise.
6968 * pt.c (maybe_process_partial_specialization,
6969 tsubst_friend_function, instantiate_class_template, tsubst,
6970 do_type_instantiation, instantiate_pending_templates): Likewise.
6971 * repo.c (repo_get_id): Likewise.
6972 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
6973 synthesize_tinfo_var, emit_support_tinfos): Likewise.
6974 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
6975 * semantics.c (begin_class_definition): Likewise.
6976 * tree.c (build_cplus_method_type): Likewise.
6977 * typeck2.c (digest_init, build_functional_cast,
6978 add_exception_specifier): Likewise.
6979 * parse.h, parse.c: Regenerated.
6980
6981 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
6982
6983 * inc/cxxabi.h: New header file. Define new-abi entry points.
6984 (__pointer_type_info::target): Rename member to ...
6985 (__pointer_type_info::type): ... here.
6986 (__base_class_info::type): Rename member to ...
6987 (__base_class_info::base): ... here.
6988 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
6989 * cp-tree.h (CPTI_ABI): New global tree enumeration.
6990 (abi_node): New global tree node.
6991 * decl.c (abi_node): Document.
6992 (init_decl_processing): Initialize abi_node.
6993 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
6994 (get_vmi_pseudo_type_info): Likewise.
6995 (create_tinfo_types): Likewise.
6996 (emit_support_tinfos): Likewise.
6997 * tinfo.h (cxxabi.h): Include for new-abi.
6998 Move rtti class definitions to new header file.
6999 * tinfo.cc (abi): Use the namespace.
7000 (std): Move new abi rtti classes from here ...
7001 (__cxxabiv1): ... to here.
7002 * tinfo2.cc (cxxabi.h): Include for new-abi.
7003 Move rtti class definitions to new header file.
7004 (std): Move new abi rtti classes from here ...
7005 (__cxxabiv1): ... to here.
7006 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
7007 namespace.
7008
7009 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
7010 Jason Merrill <jason@casey.cygnus.com>
7011
7012 * method.c (build_overload_int): Use host_integerp.
7013
7014 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7015
7016 * init.c (build_offset_ref): Handle the case of a templated member
7017 function.
7018
7019 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7020
7021 * except.c (expand_exception_blocks): Clear catch_clauses_last.
7022
7023 2000-03-18 Mark Mitchell <mark@codesourcery.com>
7024
7025 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
7026 * class.c (check_bitfield_decl): Turn illegal bitfields into
7027 non-bitfields.
7028 (dfs_propagate_binfo_offsets): Adjust for new size_binop
7029 semantics.
7030 (dfs_offset_for_unshared_vbases): Likewise.
7031 * cvt.c (cp_convert_to_pointer): Convert NULL to a
7032 pointer-to-member correctly under the new ABI.
7033 * expr.c (cplus_expand_constant): Don't use cp_convert when
7034 turning an offset into a pointer-to-member.
7035 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
7036 when dereferencing them under the new ABI.
7037 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
7038 of pointers-to-members under the new ABI.
7039
7040 * class.c (check_bitfield_decl): Remove restriction on really long
7041 bitfields.
7042 (layout_class_type): Implement new ABI handling of bitfields
7043 longer than their types.
7044
7045 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7046
7047 * parse.y (extdefs): Call ggc_collect.
7048 * parse.c: Regenerated.
7049
7050 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
7051
7052 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
7053 (note_name_declared_in_class): Use OVL_CURRENT to get at a
7054 potential overload.
7055
7056 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7057
7058 * class.c (build_vbase_path): Use integer_zerop.
7059 (build_vtable_entry): Use tree_low_cst.
7060 (get_vfield_offset): Use bit_position.
7061 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
7062 Use tree_low_cst.
7063 (check_bitfield_decl): Set DECL_SIZE using convert.
7064 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
7065 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
7066 Use tree_low_cst.
7067 (finish_struct_1): Use bit_position.
7068 (dump_class_hierarchy): Use tree_low_cst.
7069 * cp-tree.h (min_precision): Add declaration.
7070 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
7071 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
7072 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
7073 * expr.c (cplus_expand_constant): Use bit_position.
7074 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
7075 * rtti.c (get_base_offset): Use bit_position.
7076 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
7077 host_integerp, and tree_low_cst.
7078 (pointer_int_sum): Use integer_zerop.
7079 (build_component_addr): Use bit_position.
7080
7081 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
7082
7083 * typeck.c (require_complete_type): Don't assume size_zero_node.
7084 (complete_type_or_else): Likewise.
7085
7086 2000-03-16 Steven Grady <grady@digitaldeck.com>
7087 Jason Merrill <jason@casey.cygnus.com>
7088
7089 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
7090
7091 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
7092
7093 * decl2.c (grokfield): Bail out if type is error_mark_node.
7094
7095 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7096
7097 * tinfo2.cc (__ptr_to_member_data): Rename to ...
7098 (__pointer_to_member_data): ... here. Adjust.
7099 * rtti.c (create_tinfo_types): Adjust.
7100
7101 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7102
7103 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
7104 * decl.c (ref_desc_type_node): Undocument.
7105 * rtti.c (ptr_ref_initializer): Rename to ...
7106 (ptr_initializer): ... here. Adjust comments.
7107 (ptmd_initializer): Fix comment thinko.
7108 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
7109 (create_tinfo_types): Remove ref_desc_type_node init.
7110 * tinfo2.cc (__reference_type_info): Remove.
7111
7112 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7113
7114 * decl.c (cp_finish_decl): Remove obsolete comment.
7115
7116 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
7117
7118 2000-03-14 Mark Mitchell <mark@codesourcery.com>
7119
7120 * cp-tree.h: Tweak documentation.
7121 * class.c (build_vbase_pointer_fields): Layout the fields, too.
7122 (avoid_overlap): Remove.
7123 (get_binfo_offset_as_int): New function.
7124 (dfs_serach_base_offsets): Likewise.
7125 (layout_nonempty_base_or_field): Likewise.
7126 (build_base_field): Layout fields here. Avoid placing two objects
7127 of the same type at the same address, under the new ABI.
7128 (build_base_fields): Adjust accordingly.
7129 (create_vtable_ptr): Return the new field, but don't attach it to
7130 TYPE_FIELDS.
7131 (remove_base_field): Remove.
7132 (remove_base_fields): Remove.
7133 (layout_basetypes): Adjust accordingly.
7134 (layout_class_type): Call layout_field for each field, rather than
7135 just making a wholesale call to layout_type.
7136
7137 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
7138
7139 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
7140
7141 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
7142
7143 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
7144
7145 * except.c (dtor_nothrow): New fn.
7146 (do_pop_exception): Use it. Take type parm.
7147 (push_eh_cleanup): Take type parm.
7148 (expand_start_catch_block): Pass it.
7149 (build_eh_type_type_ref): Accept null type.
7150
7151 2000-03-12 Mark Mitchell <mark@codesourcery.com>
7152
7153 * cp-tree.h (revert_static_member_fn): Change prototype.
7154 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
7155 (grok_op_properties): Likewise.
7156 (start_function): Likewise.
7157 (revert_static_member_fn): Simplify.
7158 * pt.c (check_explicit_specialization): Adjust call to
7159 revert_static_member_fn.
7160
7161 2000-03-11 Mark Mitchell <mark@codesourcery.com>
7162
7163 * cp-tree.h (scope_kind): New type.
7164 (tmpl_spec_kind): Likewise.
7165 (declare_pseudo_global_level): Remove.
7166 (pseudo_global_level_p): Rename to template_parm_scope_p.
7167 (pushlevel): Remove declaration.
7168 (begin_scope): New function.
7169 (finish_scope): Likewise.
7170 (current_tmpl_spec_kind): Likewise.
7171 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
7172 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
7173 Add template_spec_p.
7174 (toplevel_bindings_p): Adjust.
7175 (declare_pseudo_global_level): Remove.
7176 (pseudo_global_level_p): Rename to template_parm_scope_p.
7177 (current_tmpl_spec_kind): New function.
7178 (begin_scope): Likewise.
7179 (finish_scope): Likewise.
7180 (maybe_push_to_top_level): Adjust.
7181 (maybe_process_template_type_declaration): Likewise.
7182 (pushtag): Likewise.
7183 (pushdecl_nonclass_level): Likewise.
7184 (lookup_tag): Likewise.
7185 (grokfndecl): Handle member template specializations. Share
7186 constructor and non-constructor code.
7187 * decl2.c (check_classfn): Handle member template specializations.
7188 * pt.c (begin_template_parm_list): Use begin_scope.
7189 (begin_specialization): Likewise.
7190 (end_specialization): Likewise.
7191 (check_explicit_specialization): Use current_tmpl_spec_kind.
7192 Handle member template specializations.
7193 (end_template_decl): Use finish_scope. Remove call to
7194 get_pending_sizes.
7195 (push_template_decl_real): Remove bogus error message.
7196 (tsubst_decl): Fix typo in code contained in comment.
7197 (instantiate_template): Handle member template specializations.
7198 (most_general_template): Likewise.
7199
7200 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
7201
7202 * lex.c (whitespace_cr): Compress consecutive calls to warning().
7203 (do_identifier): Ditto for error().
7204
7205 * pt.c (convert_nontype_argument): Ditto for cp_error().
7206 (convert_template_argument): Ditto for cp_pedwarn().
7207
7208 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
7209
7210 * exception.cc (__check_null_eh_spec): New fn.
7211 * except.c (expand_end_eh_spec): Call it if the spec is throw().
7212
7213 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7214
7215 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
7216 * except.c (expand_end_eh_spec): Add the return type.
7217 * rtti.c (throw_bad_cast): Add the parmtypes.
7218 (throw_bad_typeid): Likewise.
7219
7220 * semantics.c (expand_stmt): Only leave out rtl for unused
7221 artificials, and set DECL_IGNORED_P on them as well.
7222 * decl.c (wrapup_globals_for_namespace): Likewise.
7223
7224 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
7225
7226 * decl.c (maybe_commonize_var): Skip all artificial decls.
7227 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
7228
7229 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
7230
7231 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
7232 * cp-tree.h: Declare flag_enforce_eh_specs.
7233 * decl.c (store_parm_decls, finish_function): Check it.
7234
7235 C library functions don't throw.
7236 * Makefile.in (cfns.h): New target.
7237 (except.o): Depend on it.
7238 * Make-lang.in (cc1plus): Depend on cfns.gperf.
7239 * cfns.gperf: New file.
7240 * cfns.h: Generated.
7241 * except.c: Include it.
7242 (nothrow_libfn_p): New fn.
7243 * decl.c (grokfndecl): Use it.
7244 * cp-tree.h: Declare it.
7245
7246 * decl.c (push_overloaded_decl_1, auto_function,
7247 define_function): Lose.
7248 (build_library_fn_1): New static fn.
7249 (builtin_function): Use it.
7250 (get_atexit_node): Use build_library_fn_ptr.
7251 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
7252 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
7253 push_void_library_fn, push_throw_library_fn): New fns.
7254 * cp-tree.h: Declare them.
7255 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
7256 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
7257 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
7258 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
7259 * rtti.c (build_runtime_decl): Lose.
7260 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
7261 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
7262 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
7263
7264 * call.c (build_call): Remove result_type parm.
7265 Call mark_used on unused artificial fns.
7266 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
7267
7268 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
7269
7270 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
7271 appropriate.
7272 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
7273 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
7274 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
7275 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
7276 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
7277 expand_generic_desc): Likewise.
7278
7279 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7280
7281 * exception.cc (__cp_pop_exception): Cleanup the original object.
7282
7283 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7284
7285 * decl.c (grok_op_properties): Merge conversion to void warning
7286 with other silly op warnings.
7287
7288 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
7289
7290 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
7291 array CONSTRUCTOR elements. Don't use expr_tree_cons.
7292
7293 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7294
7295 * decl.c (cp_make_fname_decl): New function.
7296 (wrapup_globals_for_namespace): Don't emit unused static vars.
7297 (init_decl_processing): Remove comment about use of
7298 array_domain_type. Set make_fname_decl.
7299 (cp_finish_decl): Remove __FUNCTION__ nadgering.
7300 * semantics.c (begin_compound_stmt): Remove
7301 current_function_name_declared flagging.
7302 (expand_stmt): Don't emit unused local statics.
7303 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
7304 specially.
7305
7306 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
7307
7308 * typeck.c (convert_for_assignment): Don't look at array
7309 initializer.
7310 * call.c (convert_like_real): Likewise.
7311
7312 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
7313
7314 Add initial support for '\uNNNN' specifier.
7315 * lex.c (read_ucs): New fn.
7316 (readescape, skip_white_space): Call it.
7317 (is_extended_char, is_extended_char_1): New fns.
7318 (utf8_extend_token): New fn, #if 0'd out.
7319 (real_yylex): Treat extended chars like letters.
7320
7321 * search.c (note_debug_info_needed): Walk the bases even if we
7322 weren't deferring the type itself.
7323
7324 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7325
7326 * decl2.c (finish_objects): Constify a char*.
7327
7328 * method.c (emit_thunk): Likewise.
7329
7330 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
7331
7332 * typeck.c (dubious_conversion_warnings): Look through
7333 REFERENCE_TYPE.
7334
7335 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7336
7337 * class.c (dfs_modify_vtables): I is now unsigned.
7338 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
7339 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
7340 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
7341 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
7342 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
7343 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
7344 Call integer_all_onesp.
7345 * typeck2.c (process_init_constructor): Use compare_tree_int.
7346
7347 * lang-specs.h (as): Don't call if -syntax-only.
7348
7349 2000-03-06 Mark Mitchell <mark@codesourcery.com>
7350
7351 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
7352 RTL_EXPR_HAS_NO_SCOPE after all.
7353
7354 2000-03-05 Mark Mitchell <mark@codesourcery.com>
7355
7356 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
7357 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
7358 RTL_EXPR_HAS_NO_SCOPE.
7359
7360 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
7361 later.
7362
7363 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
7364
7365 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
7366
7367 * call.c (convert_like): Macrofy.
7368 (convert_like_with_context): New macro.
7369 (convert_like_real): Renamed from convert_like. Add calling
7370 context parameters, for diagnostics. Add recursive flag. Call
7371 dubious_conversion_warnings for outer conversion.
7372 (build_user_type_conversion): Use convert_like_with_context.
7373 (build_over_call): Likewise. Don't warn about dubious
7374 conversions here. Adjust convert_default_arg calls.
7375 (convert_default_arg): Add context parameters for diagnostics.
7376 Pass throught to convert_like_with_context.
7377 * cp-tree.h (convert_default_arg): Add context parameters.
7378 (dubious_conversion_warnings): Prototype new function.
7379 * typeck.c (convert_arguments): Adjust convert_default_arg call.
7380 (dubious_conversion_warnings): New function, broken
7381 out of convert_for_assignment.
7382 (convert_for_assignment): Adjust.
7383
7384 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
7385
7386 * decl2.c (key_method): Break out from...
7387 (import_export_vtable, import_export_class): ...here.
7388
7389 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
7390 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
7391
7392 * search.c (note_debug_info_needed, dfs_debug_mark,
7393 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
7394 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
7395
7396 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
7397
7398 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
7399 typos.
7400
7401 2000-03-02 Mark Mitchell <mark@codesourcery.com>
7402
7403 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
7404 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
7405 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
7406 (lang_type): Split gets_new into has_new and has_array_new.
7407 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7408 (TYPE_GETS_NEW): Split into ...
7409 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
7410 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
7411 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
7412 (build_op_new_call): Don't declare.
7413 (build_new_1): Likewise.
7414 * call.c (build_op_new_call): Remove.
7415 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7416 instead of TYPE_NEEDS_DESTRUCTOR.
7417 (finish_struct_bits): Likewise.
7418 (add_implicitly_declared_members): Likewise.
7419 (check_field_decl): Likewise.
7420 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
7421 correctly under the new ABI.
7422 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
7423 instead of TYPE_NEEDS_DESTRUCTOR.
7424 (initialize_local_var): Likewise.
7425 (destroy_local_var): Likewise.
7426 (cp_finish_decl): Likewise.
7427 (register_dtor_fn): Likewise.
7428 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
7429 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
7430 TYPE_VEC_DELETE_TAKES_SIZE here.
7431 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
7432 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
7433 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7434 (finish_destructor_body): Likewise.
7435 (maybe_build_cleanup_1): Likewise.
7436 * decl2.c (do_static_destruction): Likewise.
7437 * init.c (build_new_1): Make it static.
7438 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7439 (expand_cleanup_for_base): Likewise.
7440 (get_cookie_size): New function.
7441 (build_new_1): Handle array-new cookies correctly under the new
7442 ABI.
7443 (build_vec_delete_1): Likewise.
7444 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7445 (build_delete): Likewise.
7446 (build_vec_delete): Handle array-new cookies correctly under the new
7447 ABI.
7448 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7449 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
7450 TYPE_HAS_ARRAY_NEW_OPERATOR.
7451 * ptree.c (print_lang_type): Check them.
7452 * search.c (context_for_name_lookup): Fix typo in comment.
7453 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
7454 * tree.c (break_out_cleanups): Likewise.
7455 (build_cplus_array_test_1): Likewise.
7456 (cp_build_qualified_type_real): Likewise.
7457 * typeck.c (complete_type): Likewise.
7458
7459 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
7460 the command-line, not the end.
7461
7462 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
7463
7464 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
7465
7466 2000-03-02 Tom Tromey <tromey@cygnus.com>
7467
7468 * cp-tree.h (build_java_class_ref): Declare.
7469 * init.c (build_java_class_ref): No longer static.
7470 * except.c (expand_throw): Generate a Java-style `throw' if the
7471 thrown object is a "Java" object.
7472 (initialize_handler_parm): Generate a Java-style lookup of
7473 exception info if the caught object is a "Java" object.
7474 (catch_language, catch_language_init): New globals.
7475 (decl_is_java_type): New function.
7476 (expand_start_catch_block): Don't call push_eh_info() or
7477 push_eh_cleanup() when handling a Java-style "catch". Pass Java
7478 class reference to build_catch_block.
7479
7480 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7481
7482 * typeck.c (comptypes): Treat sizetype like its language equivalent.
7483
7484 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
7485
7486 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
7487 to merge reference/pointer code and fix incorrect warnings.
7488
7489 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
7490
7491 * search.c (protected_accessible_p): Use context_for_name_lookup.
7492
7493 * init.c (construct_virtual_bases): Fix thinko.
7494 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
7495
7496 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
7497
7498 * decl.c (current_function_decl): Move to toplev.c.
7499
7500 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
7501
7502 * pt.c (fn_type_unification): Unify return type, whenever
7503 provided.
7504 (get_bindings_real): Only pass return type when necessary.
7505 Remove explicit return type check.
7506 * class.c (resolve_address_of_overloaded_function): Pass desired
7507 return type to fn_type_unification.
7508
7509 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7510
7511 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
7512 DECL_FIELD_SIZE.
7513 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
7514 DECL_FIELD_SIZE.
7515 * rtti.c (expand_class_desc): Likewise.
7516 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
7517 (THUNK_VCALL_OFFSET): Likewise.
7518 (THUNK_DELTA): Reflect changes in ../tree.h.
7519
7520 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
7521
7522 * search.c (protected_accessible_p): Also allow the access if
7523 the member is public in DERIVED. Lose TYPE parm.
7524 (friend_accessible_p): Lose TYPE parm.
7525 (accessible_p): Adjust.
7526
7527 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7528
7529 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
7530 on things that are not sizes; ssize_binop deleted.
7531 Call size_diffop when appropriate.
7532 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7533 (build_primary_vtable, build_secondary_vtable): Likewise.
7534 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
7535 Variable I is HOST_WIDE_INT.
7536 (get_vfield_offset): Pass proper types to size_binop.
7537 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
7538 (finish_struct_1): Likewise.
7539 (skip_rtti_stuff): Arg N is now pointer to signed.
7540 (layout_class_type): Use size_zero_node.
7541 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
7542 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
7543 * decl.c (complete_arry_type): Pass proper types to size_binop.
7544 (xref_basetypes): BINFO_OFFSET is sizetype.
7545 * error.c (dump_expr): Don't use size_binop non-sizes.
7546 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
7547 * init.c (construct_virtual_bases): Fix type error.
7548 (build_vec_delete_1): Pass proper type to size_binop and don't
7549 fold result.
7550 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
7551 * rtti.c (get_base_offset): Pass proper type to size_binop.
7552 * search.c (dfs_find_vbases): Fix type error.
7553 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
7554 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
7555 * tree.c (debug_binfo): Variable N is signed.
7556 Use HOST_WIDE_INT_PRINT_DEC.
7557 * typeck.c (comptypes): sizetype is same as equivalent integer type.
7558 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
7559 size_one_node and size_zero_node.
7560 (c_alignof): Use size_one_node.
7561 (build_component_addr): Pass proper types to size_binop.
7562 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
7563
7564 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
7565
7566 Implement class scope using-declarations for functions.
7567 * class.c (handle_using_decl): Call add_method for used functions.
7568 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
7569 (add_method): Used functions are hidden by local functions.
7570 (check_bases_and_members): Handle using-decls before finalizing
7571 CLASSTYPE_METHOD_VEC.
7572 * call.c (add_function_candidate): Add ctype parm; if non-zero,
7573 override the type of 'this' accordingly.
7574 (add_template_candidate, add_template_candidate_real): Add ctype parm.
7575 (convert_class_to_reference, build_user_type_conversion_1,
7576 build_new_function_call, build_object_call, build_new_op,
7577 build_new_method_call): Pass ctype parm.
7578
7579 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
7580 the baselink.
7581 * call.c (convert_class_to_reference, build_user_type_conversion_1,
7582 build_new_function_call, build_object_call, build_new_op,
7583 build_new_method_call, build_op_delete_call): Don't get basetype_path
7584 from a baselink.
7585 * typeck.c (build_component_ref): Likewise.
7586 * init.c (build_offset_ref): Likewise.
7587 (resolve_offset_ref): Don't call enforce_access.
7588 Call build_scoped_ref.
7589 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
7590 would cause an error or if -pedantic.
7591 * class.c (alter_access): Lose binfo parm.
7592
7593 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7594
7595 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
7596 types.
7597
7598 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
7599
7600 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
7601 pseudo_type_info creation into the std namespace
7602
7603 2000-02-26 Mark Mitchell <mark@codesourcery.com>
7604
7605 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
7606 (import_export_class): Remove declaration.
7607 * decl2.c (import_export_class): Make it static.
7608 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
7609 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
7610 EXPR_WITH_FILE_LOCATION.
7611 * lex.c (check_newline): Tweak filename/lineno setting.
7612 * semantics.c (begin_while_stmt): Fix typo in comment.
7613
7614 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7615
7616 * lang-options.h (-fmessage-length=): Add missing option.
7617
7618 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
7619
7620 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
7621
7622 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
7623
7624 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
7625
7626 * optimize.c (expand_call_inline): Emit the return label before
7627 evaluating the return value.
7628
7629 2000-02-24 Mark Mitchell <mark@codesourcery.com>
7630
7631 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
7632 than duplicating functionality here.
7633 * optimize.c: Include input.h.
7634 (expand_call_inline): Use push_srcloc and pop_srcloc.
7635 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
7636 * parse.c: Regenerated.
7637 * Makefile.in (lex.o): Depend on input.h.
7638 (optimize.o): Likewise.
7639
7640 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
7641
7642 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
7643 function type, rather than ICE.
7644
7645 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
7646
7647 * decl.c (grokdeclarator): Call decl_type_access_control.
7648 * parse.y (parse_end_decl): Don't call decl_type_access_control if
7649 decl is null.
7650
7651 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
7652
7653 * decl.c (decls_match): Remove obsolete static member nadgering.
7654
7655 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7656
7657 * decl.c (grokdeclarator): Change ANSI to ISO.
7658 * lex.c (consume_string, readescape, do_identifier): Likewise.
7659 (parse_float, real_yylex): Likewise.
7660 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
7661 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
7662 new_type_id, maybe_label_decls, simple_stmt,
7663 for.init.statement): Likewise.
7664 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7665 * semantics.c (finish_named_return_value): Likewise.
7666 * parse.c: Regenerate.
7667
7668 2000-02-21 Mark Mitchell <mark@codesourcery.com>
7669
7670 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7671 (CPTI_CLASS_STAR_TYPE): Remove.
7672 (vtable_index_type): Likewise.
7673 (class_star_type_node): Remove.
7674 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7675 (build_binary_op_nodefault): Remove.
7676 * call.c (build_new_op): Use build_binary_op instead of
7677 build_binary_op_nodefault.
7678 * decl.c (init_decl_processing): Remove class_star_type_node
7679 initialization. Make delta_type_node ptrdiff_type_node under the
7680 new ABI. Initialize vtable_index_type.
7681 (build_ptrmemfunc_type): Build different structures for the new
7682 ABI.
7683 (build_enumerator): Use build_binary_op instead of
7684 build_binary_op_nodefault.
7685 * method.c (build_overload_value): Mangle pointers-to-members
7686 appropriately under the new ABI.
7687 * typeck.c (build_array_ref): Use build_binary_op instead of
7688 build_binary_op_nodefault.
7689 (get_member_function_from_ptrfunc): Adjust for the new ABI.
7690 (build_binary_op_nodefault): Rename to ...
7691 (build_binary_op): ... this. Remove old version. Adjust for
7692 pointer-to-member comparisons under the new ABI.
7693 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
7694 (build_ptrmemfunc): Adjust for the new ABI.
7695 (expand_ptrmemfunc_cst): Likewise.
7696 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7697 (pfn_from_ptrmemfunc): Adjust for the new ABI.
7698
7699 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
7700
7701 * call.c (build_object_call): Compress consecutive calls to
7702 cp_error.
7703 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7704 (build_op_delete_call): Adjust message formatting.
7705
7706 * class.c (check_bases): Compress consecutive calls to
7707 cp_pedwarn.
7708 (finish_struct_anon): Say 'ISO C++'.
7709
7710 * decl.c (start_decl): Same here.
7711 (grok_reference_init): Likewise.
7712 (grokfndecl): Correct message formatting.
7713 (grokfndecl): Improve diagnostic.
7714 (check_static_variable_definition): Likewise. Say 'ISO C++'
7715 (compute_array_index_type): Say 'ISO C++'
7716 (create_array_type_for_decl): Compress consecutive calls to
7717 cp_error.
7718 (grokdeclarator): Say 'ISO C++'
7719 (grok_op_properties): Likewise.
7720
7721 * decl2.c (delete_sanity): Clairify diagnostic.
7722 (check_member_template): Same here.
7723 (grok_function_init): Use consistent terminology.
7724
7725 * expr.c (do_case): Say 'ISO C++'
7726
7727 * friend.c (do_friend): Compress consecutive calls to warning.
7728
7729 2000-02-20 Mark Mitchell <mark@codesourcery.com>
7730
7731 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7732 * class.c (build_secondary_vtable): Reorganize. Don't create a
7733 new vtable under the new ABI.
7734 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7735 computing the size.
7736 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7737 the initializing elements.
7738 (initialize_vtable): New function.
7739 (dfs_finish_vtbls): Use it.
7740 (dfs_accumulate_vtbl_inits): New function.
7741 (finish_vtbls): Merge primary and secondary vtables under the new
7742 ABI.
7743 (finish_struct_1): Remove redundant call to layout_vtable_decl.
7744 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
7745 aren't VAR_DECLs.
7746
7747 * class.c (build_vtable): New function, split out from ...
7748 (get_vtable_decl): ... here, and ...
7749 (build_secondary_vtable): ... here.
7750
7751 * pt.c (tsubst_decl): Fix formatting.
7752
7753 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7754
7755 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
7756 (avoid_overlap, build_base_field): Likewise.
7757 (build_base_field, build_base_fields, is_empty_class):
7758 Test DECL_SIZE with integer_zero.
7759 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
7760 * cp-tree.h (struct lang_type): New field size_unit.
7761 (CLASSTYPE_SIZE_UNIT): New macro.
7762 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
7763 (cp_finish_decl): Delete -Wlarger-than processing.
7764 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
7765 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
7766 * tree.c (make_binfo): binfo vector is one entry longer.
7767 (walk_tree): Walk DECL_SIZE_UNIT.
7768
7769 2000-02-19 Mark Mitchell <mark@codesourcery.com>
7770
7771 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
7772 comment.
7773 (build_vtable_entry): Don't assume all vtable entries are
7774 functions.
7775 (build_vtbl_initializer): Adjust accordingly.
7776 (get_vtable_decl): Fix formatting.
7777
7778 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
7779
7780 * semantics.c (deferred_type_access_control): Walk the entire
7781 type_lookups list.
7782 (save_type_access_control): Rename from
7783 initial_deferred_type_access_control. Just remember the value.
7784 (decl_type_access_control): New fn.
7785 (begin_function_definition): Use deferred_type_access_control, after
7786 we've started the function. Set type_lookups to error_mark_node.
7787 * parse.y (frob_specs, fn.def1): Adjust.
7788 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
7789 (parse_end_decl, parse_bitfield0, parse_method): New fns.
7790 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
7791 (after_type_component_declarator0): Likewise.
7792 (after_type_component_declarator): Likewise.
7793 (notype_component_declarator): Likewise.
7794 * cp-tree.h: Adjust.
7795
7796 * decl.c (redeclaration_error_message): Allow redeclaration of
7797 namespace-scope decls.
7798
7799 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
7800
7801 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
7802
7803 2000-02-17 Mark Mitchell <mark@codesourcery.com>
7804
7805 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
7806 * decl2.c (grokclassfn): Likewise.
7807
7808 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
7809
7810 * decl2.c (lang_decode_option): Don't set default message length
7811 here.
7812 * lex.c (lang_init_options): Set it here.
7813
7814 2000-02-16 Mark Mitchell <mark@codesourcery.com>
7815
7816 Make DECL_CONTEXT mean the class in which a member function was
7817 declared, even for a virtual function.
7818 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
7819 (DECL_FRIEND_CONTEXT): New macro.
7820 (DECL_REAL_CONTEXT): Remove.
7821 (SET_DECL_FRIEND_CONTEXT): Likewise.
7822 (DECL_VIRTUAL_CONTEXT): Adjust.
7823 (DECL_CLASS_SCOPE_P): Use TYPE_P.
7824 (add_friends): Remove.
7825 (hack_decl_function_context): Likewise.
7826 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
7827 CP_DECL_CONTEXT.
7828 (build_over_call): Fix indentation. Use DECL_CONTEXT
7829 instead of DECL_CLASS_CONTEXT.
7830 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
7831 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7832 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7833 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
7834 (build_base_field): Likewise.
7835 (finish_struct_1): Likewise.
7836 (build_self_reference): Likewise.
7837 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
7838 DECL_REAL_CONTEXT.
7839 (pushtag): Use decl_function_context, not
7840 hack_decl_function_context.
7841 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7842 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
7843 (pushdecl): Remove bogus code.
7844 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
7845 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7846 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7847 Use decl_function_context, nothack_decl_function_context.
7848 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
7849 (grokdeclarator): Likewise. Use decl_function_context, not
7850 hack_decl_function_context.
7851 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
7852 (start_function): Use DECL_FRIEND_CONTEXT, not
7853 DECL_CLASS_CONTEXT. Use decl_function_context, not
7854 hack_decl_function_context.
7855 (finish_function): Use decl_function_context, not
7856 hack_decl_function_context.
7857 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
7858 DECL_CLASS_CONTEXT.
7859 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
7860 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
7861 (grokfield): Likewise.
7862 (finish_builtin_type): Likewise.
7863 (finish_vtable_vardec): Use decl_function_context, not
7864 hack_decl_function_context.
7865 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7866 (start_static_initialization_or_destruction): Likewise.
7867 (finish_static_initialization_or_destruction): Likewise.
7868 (mark_used): Adjust logic for deciding when to synthesize methods.
7869 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
7870 DECL_REAL_CONTEXT.
7871 * error.c (dump_function_decl): Use DECL_CONTEXT, not
7872 DECL_CLASS_CONTEXT.
7873 * friend.c (is_friend): Likewise.
7874 (add_friends): Remove.
7875 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
7876 * lex.c (begin_definition_of_inclass_inline): Use
7877 decl_function_context, not hack_decl_function_context.
7878 (process_next_inline): Likewise.
7879 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7880 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
7881 DECL_CLASSS_CONTEXT.
7882 (hack_identifier): Likewise.
7883 (synthesize_method): Use decl_function_context, not
7884 hack_decl_function_context.
7885 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
7886 DECL_REAL_CONTEXT.
7887 (is_member_template): Use decl_function_context, not
7888 hack_decl_function_context. Use DECL_CONTEXT, not
7889 DECL_CLASS_CONTEXT.
7890 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
7891 DECL_CLASS_CONTEXT.
7892 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
7893 DECL_REAL_CONTEXT.
7894 (push_template_decl_real): Likewise.
7895 (instantiate_class_template): Don't call add_friends.
7896 (tsubst_default_argument): Use DECL_CONTEXT, not
7897 DECL_REAL_CONTEXT.
7898 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7899 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7900 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
7901 DECL_CLASS_CONTEXT.
7902 * repo.c (repo_inline_used): Likewise.
7903 * search.c (current_scope): Adjust for new _CONTEXT macros.
7904 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
7905 DECL_REAL_CONTEXT.
7906 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7907 (lookup_fnfields_here):Likewise.
7908 (check_final_overrider): Likewise.
7909 (init_vbase_pointers): Likewise.
7910 (virtual_context): Likewise.
7911 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
7912 (expand_body): Use decl_function_context, not
7913 hack_decl_function_context.
7914 * tree.c (hack_decl_function_context): Remove.
7915 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
7916 DECL_CLASS_CONTEXT.
7917 * typeck2.c (error_not_base_type): Likewise.
7918
7919 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
7920
7921 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
7922
7923 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7924
7925 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
7926
7927 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
7928
7929 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
7930
7931 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
7932
7933 * decl2.c (lang_decode_option): Enable automatic line wrapping.
7934
7935 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
7936
7937 * parse.y (frob_specs): Split out...
7938 (parse_decl): From here.
7939 (fn.def2): Call initial_deferred_type_access_control.
7940 (after_type_component_declarator0): Call frob_specs.
7941 (notype_component_declarator0): Likewise.
7942 * search.c (friend_accessible_p): Nested classes are friends of their
7943 enclosing classes.
7944
7945 2000-02-10 Mark Mitchell <mark@codesourcery.com>
7946
7947 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
7948 used to create an implicit temporary.
7949
7950 * class.c (dfs_modify_vtables): Tweak calculation of functions to
7951 override.
7952
7953 2000-02-08 Nathan Sidwell <nathan@acm.org>
7954
7955 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
7956 strip array element qualifiers too.
7957
7958 2000-02-07 Mark Mitchell <mark@codesourcery.com>
7959
7960 * decl.c (store_parm_decls): Don't build cleanups for parameters
7961 while processing_template_decl.
7962
7963 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
7964
7965 * cp-tree.h (struct saved_scope): Add incomplete field.
7966 (namespace_scope_incomplete): New macro.
7967 * decl.c (pushdecl): Use it.
7968 (hack_incomplete_structures): Use it. See through artificial
7969 binding levels.
7970 (mark_saved_scope): Mark it.
7971
7972 Implement access control for nested types.
7973 * search.c (type_access_control): New fn.
7974 (accessible_p): Now we do perform access control for types.
7975 * semantics.c (deferred_type_access_control): New fn.
7976 (initial_deferred_type_access_control): New fn.
7977 (begin_function_definition): Call it. Add lookups parm.
7978 * decl.c (struct binding_level): Add this_class field.
7979 (pushlevel_class): Set it.
7980 (mark_binding_level): Mark it.
7981 (lookup_name_real): Use it. Call type_access_control.
7982 (mark_saved_scope): Mark lookups field.
7983 * cp-tree.h (flagged_type_tree): Add lookups field.
7984 (struct saved_scope): Add lookups field.
7985 (type_lookups): New macro.
7986 * parse.y (declmods): Now <ftype>.
7987 (parse_decl): Add lookups parm. Call
7988 initial_deferred_type_access_control.
7989 (lang_extdef): Clear type_lookups.
7990 (typed_declspecs, declmods, typespec): Set lookups field.
7991 (initdcl): Call deferred_type_access_control.
7992 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
7993 component_decl_1, named_parm): Adjust.
7994 * friend.c (is_friend): Nested classes are friends of their
7995 enclosing classes.
7996
7997 * class.c (currently_open_derived_class): New fn.
7998 * method.c (hack_identifier): Use it.
7999
8000 * lex.c (do_identifier): Remove obsolete code.
8001
8002 * parse.y (typed_typespecs): Propagate new_type_flag properly.
8003
8004 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
8005
8006 * tinfo.h: Remove apostrophes from C++ comment (xgettext
8007 thinks this file is plain C).
8008
8009 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8010
8011 * Makefile.in (call.o): Depend on $(EXPR_H).
8012
8013 * call.c: Include "expr.h".
8014
8015 * class.c (dump_class_hierarchy): Add prototype.
8016
8017 * search.c (dfs_get_pure_virtuals): Likewise.
8018
8019 2000-02-1 Ulrich Drepper <drepper@redhat.com>
8020
8021 * parse.y (simple_stmt): Allow :: token in asm parameter list.
8022 * parse.c: Rebuilt.
8023
8024 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
8025
8026 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
8027 Store it in DECL_FCONTEXT.
8028 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
8029
8030 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
8031
8032 * tinfo.h (old abi): #include "tconfig.h".
8033 * tinfo.cc (convert_to_base): Move into old abi section.
8034
8035 2000-01-31 Mark Mitchell <mark@codesourcery.com>
8036
8037 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
8038 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
8039 (BINFO_PRIMARY_BINFO): New macro.
8040 (BF_DELTA): Rename to ...
8041 (BV_DELTA): ... this.
8042 (BF_VCALL_INDEX): Rename to ...
8043 (BV_VCALL_INDEX): ... this.
8044 (BF_FN): Rename to ...
8045 (BV_FN): ... this.
8046 * class.c (build_vbase_path): Adjust for changes to reverse_path.
8047 (set_rtti_entry): Rename BF_ macros to BV_ variants.
8048 (modify_vtable_entry): Simplify.
8049 (add_virtual_function): Rename BF_ macros to BV_ variants.
8050 (build_vtable_initializer): Likewise.
8051 (get_class_offset_1): Remove.
8052 (dfs_get_class_offset): Likewise.
8053 (get_class_offset): Likewise.
8054 (dfs_find_final_overrider): New function.
8055 (find_final_overrider): Likewise.
8056 (modify_one_vtable): Remove.
8057 (dfs_find_base): New function.
8058 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
8059 find_final_overrider.
8060 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
8061 virtuals.
8062 (dfs_fixup_vtable_deltas): Remove.
8063 (override_one_vtable): Remove.
8064 (merge_overrides): Likewise.
8065 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
8066 unreal chilren of virtual bases.
8067 (finish_struct_1): Don't use merge_overrides. Don't use
8068 dfs_fixup_vtable_deltas.
8069 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
8070 BINFOs.
8071
8072 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8073 Jason Merrill <jason@yorick.cygnus.com>
8074
8075 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
8076
8077 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
8078
8079 * exception.cc (__throw_bad_typeid): Add missing std::.
8080
8081 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8082
8083 * cp-tree.h (make_thunk): PROTO -> PARAMS.
8084
8085 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
8086
8087 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
8088
8089 Runtime support for new-abi rtti.
8090 * inc/typeinfo (type_info::operator!=): Define in class.
8091 (type_info::before, type_info::name, type_info::operator==,
8092 type_info::operator!=): Define new ABI implementations.
8093 (type_info::is_pointer_p, type_info::is_function_p): Declare
8094 new virtual functions.
8095 (type_info::do_catch, type_info::do_upcast): Likewise.
8096
8097 * tinfo.h (__base_class_info): Define new class.
8098 (__class_type_info): Likewise.
8099 (__si_class_type_info): Likewise.
8100 (__vmi_class_type_info): Likewise.
8101 (__dynamic_cast): Prototype.
8102
8103 * tinfo.cc: Conditionalize old and new rtti mechanisms.
8104 (type_info::is_pointer_p): Define new function.
8105 (type_info::is_function_p): Likewise.
8106 (type_info::do_catch): Likewise.
8107 (type_info::do_upcast): Likewise.
8108 (vtable_prefix): New structure for vtable access.
8109 (adjust_pointer): Define new template function.
8110 (contained_p, public_p, virtual_p, contained_public_p,
8111 contained_nonpublic_p, contained_nonvirtual_p): Define new
8112 functions.
8113 (nonvirtual_base_type): New local variable.
8114 (__class_type_info::~__class_type_info): Define.
8115 (__si_class_type_info::~__si_class_type_info): Likewise.
8116 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
8117 (__class_type_info::do_catch): Define new function.
8118 (__class_type_info::do_upcast): Likewise.
8119 (__class_type_info::find_public_src): Likewise.
8120 (__class_type_info::do_find_public_src): Likewise.
8121 (__si_class_type_info::do_find_public_src): Likewise.
8122 (__vmi_class_type_info::do_find_public_src): Likewise.
8123 (__class_type_info::do_dyncast): Likewise.
8124 (__si_class_type_info::do_dyncast): Likewise.
8125 (__vmi_class_type_info::do_dyncast): Likewise.
8126 (__class_type_info::do_upcast): Likewise.
8127 (__si_class_type_info::do_upcast): Likewise.
8128 (__vmi_class_type_info::do_upcast): Likewise.
8129 (__dynamic_cast): Likewise.
8130
8131 * tinfo2.cc (__fundamental_type_info): Define new class.
8132 (__pointer_type_info): Likewise.
8133 (__reference_type_info): Likewise.
8134 (__array_type_info): Likewise.
8135 (__function_type_info): Likewise.
8136 (__enum_type_info): Likewise.
8137 (__ptr_to_member_type_info): Likewise.
8138 (__fundamental_type_info::~__fundamental_type_info): Define.
8139 (__pointer_type_info::~__pointer_type_info): Likewise.
8140 (__reference_type_info::~__reference_type_info): Likewise.
8141 (__array_type_info::~__array_type_info): Likewise.
8142 (__function_type_info::~__function_type_info): Likewise.
8143 (__enum_type_info::~__enum_type_info): Likewise.
8144 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
8145 (__pointer_type_info::do_catch): Define new function.
8146 (__ptr_to_member_type_info::do_catch): Define new function.
8147
8148 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
8149 (__is_pointer): Likewise.
8150
8151 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
8152
8153 2000-01-30 Mark Mitchell <mark@codesourcery.com>
8154
8155 * cp/class.c (build_vtable): Rename to build_primary_vtable.
8156 (prepare_fresh_vtable): Rename to build_secondary_vtable.
8157 (make_new_vtable): New function.
8158 (modify_vtable_entry): Handle generation of new vtables correctly.
8159 (modify_one_vtable): Remove unused parameter.
8160 (dfs_fixup_vtable_deltas): Likewise.
8161 (override_one_vtable): Use build_secondary_vtable.
8162 (finish_struct_1): Use build_primary_vtable and
8163 build_secondary_vtable.
8164
8165 2000-01-28 Ulrich Drepper <drepper@redhat.com>
8166
8167 * cp/decl.c: Adjust variable names, comments, help strings.
8168
8169 2000-01-29 Nathan Sidwell <nathan@acm.org>
8170
8171 * new2.cc (operator delete[]): Use operator delete, don't assume
8172 implementation.
8173
8174 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
8175
8176 * class.c (build_vtbl_initializer): Add argument to
8177 build_vtable_entry call.
8178
8179 2000-01-27 Mark Mitchell <mark@codesourcery.com>
8180
8181 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
8182 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
8183 (BF_DELTA): New macro.
8184 (BF_VCALL_INDEX): Likewise.
8185 (BF_FN): Likewise.
8186 (THUNK_VCALL_OFFSET): Likewise.
8187 (make_thunk): Change prototype.
8188 * class.c (build_vtable_entry): Integrate
8189 build_vtable_entry_for_fn. Handle vcall indices.
8190 (build_vtable_entry_for_fn): Remove.
8191 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
8192 BF_VCALL_INDEX, BF_FN.
8193 (modify_vtable_entry): Integrate common code from
8194 modify_one_vtable and dfs_fixup_vtable_deltas.
8195 (add_virtual_function): Set BF_VCALL_INDEX.
8196 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
8197 and BF_FN.
8198 (modify_one_vtable): Simplify.
8199 (dfs_fixup_vtable_deltas): Likewise.
8200 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
8201 * method.c (make_thunk): Handle vcall indices.
8202
8203 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
8204
8205 Compiler side new abi rtti (not enabled).
8206 * cp-tree.h (new_abi_rtti_p): New macro.
8207 (emit_support_tinfos): Prototype new function.
8208 (tinfo_decl_p): Likewise.
8209 (emit_tinfo_decl): Likwise.
8210 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
8211 macros.
8212 (doing_runtime): New local static.
8213 (init_rtti_processing): Add new-abi initializer.
8214 (get_tinfo_decl): Add new-abi logic.
8215 (tinfo_from_decl): Likewise.
8216 (build_dynamic_cast_1): Likewise.
8217 (qualifier_flags): New static function.
8218 (tinfo_base_init): Likewise.
8219 (generic_initializer): Likewise.
8220 (ptr_ref_initializer): Likewise.
8221 (ptmd_initializer): Likewise.
8222 (class_hint_flags): Likewise.
8223 (class_initializer): Likewise.
8224 (synthesize_tinfo_var): Likewise.
8225 (create_real_tinfo_var): Likewise.
8226 (create_pseudo_type_info): Likewise.
8227 (get_vmi_pseudo_type_info): Likewise.
8228 (create_tinfo_types): Likewise.
8229 (emit_support_tinfos): New global function.
8230 (tinfo_decl_p): New global predicate.
8231 (emit_tinfo_decl): New global function.
8232 * class.c (set_rtti_entry): Generalize for old and new rtti.
8233 (build_vtbl_initializer): Likewise.
8234 * decl2.c (finish_file): Likewise.
8235
8236 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
8237
8238 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
8239 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
8240
8241 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
8242
8243 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
8244 for scopes.
8245
8246 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
8247
8248 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
8249
8250 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8251
8252 * optimize.c (calls_setjmp_r): Supply new argument
8253 to special_function_p.
8254
8255 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8256
8257 * call.c: PROTO -> PARAMS.
8258 * class.c: Likewise.
8259 * cp-tree.h: Likewise.
8260 * cvt.c: Likewise.
8261 * decl.c: Likewise.
8262 * decl.h: Likewise.
8263 * decl2.c: Likewise.
8264 * dump.c: Likewise.
8265 * errfn.c: Likewise.
8266 * error.c: Likewise.
8267 * except.c: Likewise.
8268 * expr.c: Likewise.
8269 * init.c: Likewise.
8270 * input.c: Likewise.
8271 * lex.c: Likewise.
8272 * lex.h: Likewise.
8273 * method.c: Likewise.
8274 * optimize.c: Likewise.
8275 * parse.y: Likewise.
8276 * pt.c: Likewise.
8277 * repo.c: Likewise.
8278 * rtti.c: Likewise.
8279 * search.c: Likewise.
8280 * semantics.c: Likewise.
8281 * spew.c: Likewise.
8282 * tree.c: Likewise.
8283 * typeck.c: Likewise.
8284 * typeck2.c: Likewise.
8285 * xref.c: Likewise.
8286
8287 2000-01-25 Richard Henderson <rth@cygnus.com>
8288
8289 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
8290
8291 2000-01-25 Mark Mitchell <mark@codesourcery.com>
8292
8293 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
8294 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
8295 (struct vcall_offset_data_s): New type.
8296 (dfs_vcall_offset_queue_p): New function.
8297 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8298 (build_vcall_offset_vtbl_entries): Likewise.
8299 (layout_vtable_decl): Likewise.
8300 (num_vfun_entries): Likewise.
8301 (num_extra_vtbl_entries): Add the entries for vcall offsets.
8302 (build_vtbl_initializer): Likewise.
8303 (dfs_finish_vtabls): Use layout_vtable_decl.
8304 (modify_one_vtables): Always duplicate vtables under the new ABI.
8305 (finish_struct_1): Use layout_vtable_decl.
8306
8307 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8308
8309 * decl.c (member_function_or_else): Change third arg from a format
8310 specifier to an `enum overload_flags'. Callers changed.
8311
8312 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
8313
8314 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
8315 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
8316 build_const_cast, get_delta_difference, check_return_expr): Avoid
8317 ANSI string concatenation usage.
8318
8319 2000-01-24 Mark Mitchell <mark@codesourcery.com>
8320
8321 * class.c (layout_class_type): Put the fields required to make a
8322 class non-empty at the end, not the beginning, of the TYPE_FIELDs
8323 list.
8324
8325 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
8326
8327 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
8328 template.
8329
8330 * decl2.c (mark_used): Do instantiate inlines that have been
8331 explicitly instantiated.
8332
8333 2000-01-24 Richard Henderson <rth@cygnus.com>
8334
8335 * call.c (build_over_call): Use expand_tree_builtin.
8336 * typeck.c (build_function_call_real): Likewise.
8337 (build_binary_op_nodefault): Handle unordered compares.
8338
8339 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8340
8341 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
8342 cp_tree_index values.
8343 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
8344 New global node #defines for them.
8345 * rtti.c (call_void_fn): Replace with ...
8346 (build_runtime_decl): ... new static function.
8347 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
8348 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
8349 (build_dynamic_cast_1): Always produce correctly typed result.
8350 Explicitly produce type_info addresses. Use dynamic_cast_node.
8351 * exception.cc (__throw_bad_cast): Return `void *'.
8352 (__throw_bad_typeid): Return `const type_info &'.
8353
8354 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8355
8356 * cp-tree.h (get_vtable_decl): Prototype new function.
8357 * class.c (get_vtable_decl): New function. Broken out from ...
8358 (build_vtable): ... here. Use it.
8359 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
8360 by get_vtable_decl.
8361
8362 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
8363
8364 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
8365 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
8366 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
8367 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
8368 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
8369 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
8370 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
8371 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
8372 (CPTI_TINFO_VAR_ID): New enumeration.
8373 (__tp_desc_type_node, __access_mode_type_node,
8374 __bltn_desc_type_node, __user_desc_type_node,
8375 __class_desc_type_node, __ptr_desc_type_node,
8376 __attr_desc_type_node, __func_desc_type_node,
8377 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
8378 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
8379 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
8380 enum_desc_type_node, class_desc_type_node,
8381 si_class_desc_type_node, vmi_class_desc_type_node,
8382 ptmd_desc_type_node, base_desc_type_node): New #defines.
8383 (tinfo_fn_id, tinfo_fn_type): Rename to ...
8384 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
8385 (tinfo_var_id): New enumeration.
8386 (DECL_TINFO_FN_P): Augment comment.
8387 * decl.c (cp_global_trees): Adjust documentation.
8388 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
8389 tinfo_decl_type and tinfo_var_id.
8390 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
8391 (build_typeid): Remove unused variable.
8392 (get_tinfo_var): Use tinfo_var_id.
8393 (tinfo_name): New static function.
8394 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
8395 (tinfo_from_decl): Likewise.
8396 (get_base_offset): New static function, broken out of
8397 expand_class_desc.
8398 (expand_si_desc): Use tinfo_name.
8399 (expand_class_desc): Likewise. Lose local static variable.
8400 Use base_desc_type_node. Use get_base_offset.
8401 (expand_ptr_desc): Use tinfo_name.
8402 (expand_attr_desc): Likewise.
8403 (expand_generic_desc): Likewise.
8404
8405 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
8406 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
8407
8408 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8409
8410 * cp-tree.h (__eprintf): Remove declaration.
8411 * tree.c (__eprintf): Remove definition.
8412
8413 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
8414 Mark Mitchell <mark@codesourcery.com>
8415
8416 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
8417 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
8418
8419 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
8420
8421 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
8422
8423 2000-01-23 Mark Mitchell <mark@codesourcery.com>
8424
8425 * cp-tree.h (register_dtor_fn): New function.
8426 * decl.c (destroy_local_static): Rename to ...
8427 (register_dtor_fn): ... this. Give it external linkage.
8428 (expand_static_init): Use it.
8429 * decl2.c (do_static_initialization): Likewise, if using
8430 __cxa_atexit.
8431 (do_static_destruction): Check that __cxa_atexit is not in use.
8432 (finish_file): Don't call do_static_destruction if using
8433 __cxa_atexit.
8434
8435 * typeck.c (convert_arguments): Restore two-message error
8436 reporting.
8437
8438 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
8439
8440 Remap dynamic cast hint values to be consistent across ABIs.
8441 * search.c (dynamic_cast_base_recurse): Remap generated value.
8442 (get_dynamic_cast_base_type): Adjust documentation.
8443 * tinfo.h (__user_type_info::dyncast): Likewise.
8444 (__user_type_info::find_public_subobj): Remap BOFF meaning.
8445 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
8446 (__class_type_info::do_dyncast): Likewise.
8447 (__class_type_info::do_find_public_subobj): Likewise.
8448 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
8449
8450 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8451
8452 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
8453
8454 * typeck2.c (incomplete_type_error): Restore previous
8455 cp_error and cp_error_at call sequence.
8456
8457 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
8458
8459 * class.c (dump_class_hierarchy): Make format agree with argument;
8460 cast pointer to unsigned long and print with %lx.
8461
8462 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
8463
8464 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
8465
8466 * typeck.c (composite_pointer_type, common_type,
8467 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
8468 build_function_call_real, convert_arguments,
8469 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
8470 build_unary_op, mark_addressable, build_compound_expr,
8471 build_static_cast, build_reinterpret_cast, build_const_cast,
8472 build_c_cast, build_modify_expr, get_delta_difference,
8473 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
8474 'ISO C++'. Fusion consecutive calls to diagnotic message routines
8475 into a single one.
8476 * typeck2.c (readonly_error, abstract_virtuals_error,
8477 process_init_constructor, check_for_new_type): Likewise.
8478
8479 2000-01-19 Mark Mitchell <mark@codesourcery.com>
8480
8481 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
8482 VAR_DECLs.
8483
8484 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
8485
8486 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
8487 (build_x_typeid): Likewise.
8488 (get_tinfo_fn): Likewise.
8489 (get_tinfo_fn_unused): Rename to ...
8490 (get_tinfo_decl): ... here.
8491 * rtti.c (build_headof): Replace logic error with assertion.
8492 (get_tinfo_fn_dynamic): Rename to ...
8493 (get_tinfo_decl_dynamic): ... here. Make static. Use
8494 complete_type_or_else.
8495 (build_x_typeid): Move into ...
8496 (build_typeid): ... here. Adjust call to
8497 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
8498 throw_bad_typeid expression.
8499 (get_tinfo_fn_unused): Rename to ...
8500 (get_tinfo_decl): ... here. Adjust comment.
8501 (get_tinfo_fn): Delete.
8502 (tinfo_from_decl): New static function.
8503 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
8504 (get_typeid): Use complete_type_or_else.
8505 (build_dynamic_cast_1): Adjust calls to
8506 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
8507 * parse.y (primary): Adjust call to build_typeid.
8508 * except.c (build_eh_type_type_ref): Adjust call to
8509 get_tinfo_decl. Mark as used.
8510 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
8511 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
8512 * parse.c: Regenerated.
8513
8514 2000-01-17 Mark Mitchell <mark@codesourcery.com>
8515
8516 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
8517 calling convention.
8518 (resolves_to_fixed_type_p): Document calling convention.
8519 * rtti.c (build_x_typeid): Initialize NONNULL.
8520
8521 * cp-tree.h (build_shared_int_cst): New function.
8522 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
8523 * class.c (modify_vtable_entry): Likewise.
8524 (add_virtual_function): Split out code to generated shared
8525 INTEGER_CSTs to build_share_int_cst.
8526 (modify_all_vtables): Handle all the overridden functions here.
8527 Add overridden functions from non-primary virtual bases to the
8528 primary vtable.
8529 (finish_struct_1): Adjust call to modify_all_vtables. Add
8530 overridden functions from non-primary bases to the vtable.
8531 * tree.c (build_shared_int_cst): New function.
8532
8533 * cp-tree.h (scratchalloc): Remove.
8534 (build_scratch_list): Likewise.
8535 * call.c (convert_class_to_reference): Replace build_scratch_list
8536 and build_expr_list with build_tree_list.
8537 (add_candidate): Replace scratchalloc with expralloc. Note memory
8538 leak.
8539 (build_user_type_conversion_1): Replace build_scratch_list
8540 and build_expr_list with build_tree_list.
8541 (build_new_op): Likewise.
8542 (build_op_delete_call): Likewise.
8543 (convert_like): Likewise.
8544 * cvt.c (ocp_convert): Likewise.
8545 * decl.c (start_decl): Likewise.
8546 (start_function): Likewise.
8547 (finish_destructor_body): Likewise.
8548 (maybe_build_cleanup_1): Likewise.
8549 * decl2.c (reparse_decl_as_expr): Likewise.
8550 * init.c (perform_member_init): Likewise.
8551 (expand_cleanup_for_base): Likewise.
8552 (build_builtin_delete_call): Likewise.
8553 (build_new_1): Likewise.
8554 (build_delete): Likewise.
8555 * method.c (do_build_assign_ref): Likewise.
8556 * parse.y (already_scoped_stmt): Likewise.
8557 (nontrivial_exprlist): Likewise.
8558 (net_initializer): Likewise.
8559 (initlist): Likewise.
8560 * parse.c: Regenerated.
8561 * rtti.c (build_x_typeid): Likewise.
8562 (build_dynamic_cast_1): Likewise.
8563 * typeck.c (build_x_compound_expr): Likewise.
8564 (build_static_cast): Likewise.
8565 (build_modify_expr): Likewise.
8566
8567 * cp-tree.h (DECL_VINDEX): Add documentation.
8568 * class.c (build_vtable_entry): Likewise.
8569 (start_vtable): Add comment.
8570 (add_virtual_function): Replace pending_hard_virtuals with
8571 overridden_virtuals and pending_virtuals with new_virtuals.
8572 Replace redundant assignments with assertions.
8573 (check_for_override): Add comment.
8574 (check_bases_and_members): Replace pending_hard_virtuals with
8575 overridden_virtuals and pending_virtuals with new_virtuals.
8576 (create_vtbl_ptr): Likewise.
8577 (layout_class_type): Likewise.
8578 (finish_struct_1): Likewise. Add comments.
8579
8580 2000-01-16 Mark Mitchell <mark@codesourcery.com>
8581
8582 * class.c (finish_struct_1): Replace redundant code with
8583 assertions.
8584
8585 * cp-tree.h (flag_new_abi): Move.
8586 (flag_use_cxa_atexit): Likewise.
8587 (flag_honor_std): Likewise.
8588 (flag_rtti): Likewise.
8589 (vbase_offsets_in_vtable_p): Define.
8590 (vptrs_present_everywhere_p): Likewise.
8591 (TYPE_CONTAINS_VPTR_P): Likewise.
8592 (dfs_walk_real): Declare.
8593 * class.c (build_vbase_pointer_fields): Check
8594 vbase_offsets_in_vtable_p.
8595 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
8596 BINFO_VPTR_FIELD.
8597 (build_vbase_offset_vtbl_entries): Simplify.
8598 (build_vbase_offset_vtbl_entries): Adjust.
8599 (build_vbase_pointer): Add ability to look up vbase offsets in
8600 vtable.
8601 (start_vtable): New function.
8602 (add_virtual_function): Use it.
8603 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
8604 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
8605 (build_vtbl_initializer): Take the type of the complete object as
8606 input. Use it to correctly calculate vbase offsets.
8607 (dfs_finish_vtbls): Pass the complete type to
8608 build_vtbl_initializer.
8609 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
8610 (create_vtable_ptr): Create a vtable even if there are no
8611 new virtual functions, under the new ABI.
8612 (finish_struct_1): Likewise.
8613 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
8614 * decl.c (exapnd_static_init): Remove call to
8615 preserve_initializer.
8616 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
8617 vtables.
8618 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
8619 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
8620 (construct_virtual_bases): Don't initialize virtual base pointers
8621 under the new ABI.
8622 (build_aggr_init): Clean up comment.
8623 (expand_aggr_init_1): Likewise.
8624 * rtti.c (expand_class_desc): Store the virtual function table
8625 index where the vbase offset lives in the offset field.
8626 * search.c (dfs_walk_real): Make it global.
8627 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
8628 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
8629
8630 * tinfo.h (USItype): Make it signed under the new ABI.
8631 * tinfo.cc (convert_to_base): New function. Encapsulate base
8632 conversion logic here.
8633 (__class_type_info::do_upcast): Use it.
8634 (__class_type_info::do_dyncast): Likewise.
8635 (__class_type_info::do_find_public_subobj): Likewise.
8636
8637 * init.c (construct_virtual_bases): Don't look up the addresses of
8638 virtual bases at run-time.
8639
8640 * class.c (build_vbase_pointer): Relocate.
8641 (build_vbase_pointer_fields): Likewise.
8642 (dfs_build_vbase_offset_vtbl_entries): Likewise.
8643 (build_vbase_offset_vtbl_entries): Likewise.
8644
8645 * decl.c (init_decl_processing): Complain if -fnew-abi
8646 -fno-vtable-thunks is used.
8647
8648 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
8649 flag_new_abi.
8650
8651 2000-01-15 Mark Mitchell <mark@codesourcery.com>
8652
8653 * cp-tree.h (num_extra_vtbl_entries): New function.
8654 (size_extra_vtbl_entries): Likewise.
8655 (dfs_vtable_path_unmark): Likewise.
8656 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
8657 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8658 * class.c (num_extra_vtbl_entries): New function.
8659 (size_extra_vtbl_entries): Likewise.
8660 (dfs_build_vbase_offset_vtbl_entries): New function.
8661 (build_vbase_offset_vtbl_entries): Likewise.
8662 (build_vtbl_initializer): Use it.
8663 (finish_struct_1): Adjust vtable sizes (using
8664 num_extra_vtbl_entries).
8665 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8666 THUNK_DECL is non-NULL before expanding it.
8667 * init.c (expand_virtual_init): Adjust the vtable pointer by
8668 size_extra_vtbl_entries before storing it.
8669 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8670 Handle TREE_LIST parameters here, not in the dfs_* functions.
8671 (dfs_unmarked_real_bases_queue_p): Adjust.
8672 (dfs_marked_real_bases_queue_p): Likewise.
8673 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8674 (dfs_vtable_path_marked_real_bases_queue_p): New function.
8675 (dfs_vtable_path_unmark): Likewise.
8676
8677 2000-01-14 Mark Mitchell <mark@codesourcery.com>
8678
8679 * optimize.c (copy_body_r): Clear the operand three of a
8680 TARGET_EXPR when copying it.
8681
8682 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8683
8684 * method.c (build_decl_overload_real): Check whether we are in ::
8685 before returning __builtin_new/delete.
8686
8687 2000-01-13 Mark Mitchell <mark@codesourcery.com>
8688
8689 * pt.c (tsubst_friend_function): Improve comment.
8690 (instantiate_decl): Avoid crashing when a "nested" function is
8691 instantiated from the top level.
8692
8693 * dump.c (dqeueue_and_dump): Dump
8694 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8695
8696 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8697
8698 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8699
8700 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
8701
8702 * g++spec.c (lang_specific_driver): Add -fnew-abi if
8703 ENABLE_NEW_GXX_ABI defined.
8704 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8705 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8706 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8707
8708 2000-01-12 Mark Mitchell <mark@codesourcery.com>
8709
8710 * decl.c (start_cleanup_fn): Call pushdecl.
8711
8712 * call.c (convert_class_to_reference): Fix typos.
8713 (build_conditional_expr): Handle errors gracefully.
8714 * class.c (push_nested_class): Likewise.
8715 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8716 (DECL_THIS_EXTERN): Use it.
8717 (DECL_THIS_STATIC): Likewise.
8718 * cvt.c (convert_to_void): Handle errors gracefully.
8719 (build_expr_type_conversion): Likewise.
8720 * decl.c (maybe_push_decl): Likewise.
8721 (start_decl_1): Likewise.
8722 (require_complete_types_for_parms): Likewise.
8723 * parse.y (structsp): Likewise.
8724 (base_class): Likewise.
8725 * parse.c: Regenerated.
8726 * pt.c (finish_member_template_decl): Likewise.
8727 * typeck.c (decay_conversion): Likewise.
8728
8729 * cp-tree.h (dfs_skip_vbases): New function.
8730 (find_vbase_instance): Likewise.
8731 * class.c (determine_primary_base): Allow a nearly empty base to
8732 serve as a primary base class under the new ABI.
8733 (get_class_offset_1): Rename to ...
8734 (dfs_get_class_offset): ... this. Simplify. Don't issue error
8735 messages here.
8736 (get_class_offset): Use it. Issue error messages here.
8737 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8738 find the right copies of virtual bases.
8739 (fixup_vtable_deltas1): Rename to ...
8740 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
8741 bases as primary bases.
8742 (fixup_vtable_deltas): Remove.
8743 (override_one_vtable): Handle virtual bases as primary bases.
8744 (merge_overrides): Likewise.
8745 (finish_struct_1): Likewise.
8746 (dump_class_hierarchy): Dump primary-ness of bases as well.
8747 * search.c (mark_primary_bases): Use a pre-order traversal to
8748 handle primary virtual bases.
8749 (dfs_skip_vbases): New fiunction.
8750 (expand_upcast_fixups): Adjust to handle primary virtual bases.
8751 (fixup_virtual_upcast_offsets): Likewise.
8752 (fixup_all_virtual_upcast_offsets): Likewise.
8753 (dfs_find_vbase_instances): New function.
8754 (find_vbase_instance): Likewise.
8755
8756 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
8757
8758 * lex.c (DIR_SEPARATOR): Delete macro.
8759
8760 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
8761
8762 * decl2.c (lang_decode_option): Handle automatic line wrapping
8763 option.
8764
8765 2000-01-11 Mark Mitchell <mark@codesourcery.com>
8766
8767 * friend.c (do_friend): Don't resolve scopes when processing
8768 template declarations, even if the qualifying scope doesn't
8769 involve template parameters.
8770
8771 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
8772
8773 * class.c (dfs_modify_vtables_queue_p): Remove.
8774 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
8775 and dfs_marked_real_bases_queue_p instead of
8776 dfs_modify_vtables_queue_p.
8777
8778 * class.c (build_vbase_path): Simplify.
8779 (dfs_propagate_binfo_offsets): New function.
8780 (propagate_binfo_offsets): Use it.
8781 (remove_base_field): Simplify.
8782 (dfs_set_offset_for_vbases): Remove.
8783 (dfs_set_offset_for_shared_vbases): New function.
8784 (dfs_set_offset_for_unshared_vbases): Likewise.
8785 (layout_virtual_bases): Use them.
8786 (layout_basetypes): Don't call propagate_binfo_offsets.
8787 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
8788 for the vbases.
8789
8790 * class.c (build_base_field): New function, split out from ...
8791 (build_base_fields): ... here. Use it. Allocate primary bases
8792 first, under the new ABI.
8793 (get_vtable_entry): Remove.
8794 (remove_base_field): New function, split out from ...
8795 (remove_base_fields): ... here. Adjust since primary bases come
8796 first under the new ABI.
8797
8798 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
8799 (initialize_vtbl_ptrs): New function.
8800 (expand_indirect_vtbls_init): Change prototype.
8801 (convert_pointer_to_vbase): Declare.
8802 * init.c (expand_direct_vtbls_init): Remove.
8803 (dfs_initialize_vtbl_ptrs): New function.
8804 (initialize_vtbl_ptrs): Likewise.
8805 (emit_base_init): Use initialize_vtbl_ptrs.
8806 * search.c (convert_pointer_to_vbase): Make it global.
8807 (expand_indirect_vtbls_init): Remove vtable initialization code.
8808 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
8809
8810 * class.c (dfs_finish_vtbls): New function.
8811 (finish_vtbls): Use it.
8812 (dump_class_hierarchy): New function.
8813
8814 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
8815 (BINFO_VBASE_PRIMARY_P): New macro.
8816 (BINFO_VIRTUALS): Add to documentation.
8817 (SET_BINFO_PRIMARY_MARKED_P): Remove.
8818 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8819 (dfs_mark_primary_bases_queue_p): Likewise.
8820 (dfs_unmarked_real_bases_queue_p): New function.
8821 (dfs_marked_real_bases_queue_p): Likewise.
8822 * search.c (dfs_mark_primary_bases): Adjust.
8823 (mark_primary_bases): Likewise.
8824 (get_shared_vbase_if_not_primary): New function.
8825 (dfs_unmarked_real_bases_queue_p): Likewise.
8826 (dfs_marked_real_bases_queue_p): Likewise.
8827 (dfs_get_pure_virtuals): Simplify.
8828 (get_pure_virtuals): Likewise.
8829
8830 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8831
8832 * lex.c: Include tm_p.h.
8833
8834 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
8835
8836 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
8837
8838 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
8839
8840 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
8841 * pt.c (instantiate_decl): Defer comdat templates that might not be
8842 needed.
8843
8844 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
8845 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
8846 (finish_file): Likewise.
8847
8848 * decl2.c (import_export_class): Undo 12/14 change.
8849
8850 * error.c (dump_decl): operator new, not operatornew.
8851
8852 * class.c (field_decl_cmp): A nontype is "greater" than a type.
8853 * search.c (lookup_field_1): Look for the last field with the
8854 desired name.
8855
8856 2000-01-05 Nathan Sidwell <nathan@acm.org>
8857
8858 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
8859 FUNCTION_DECL.
8860
8861 2000-01-05 Nathan Sidwell <nathan@acm.org>
8862
8863 * typeck.c (build_static_cast): Don't strip target qualifiers
8864 when casting from a class.
8865
8866 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8867
8868 * class.c (warn_hidden): Initialize variable `fndecl'.
8869
8870 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
8871
8872 * decl.c (flag_isoc9x): New variable to be able to use code in
8873 c-common.c. For now always zero.
8874
8875 2000-01-03 Mark Mitchell <mark@codesourcery.com>
8876
8877 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
8878 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
8879 or unshare_base_binfos for virtual bases here.
8880 * search.c (dfs_get_vbase_types): Do it here.
8881 (get_vbase_types): Adjust.
8882
8883 2000-01-02 Mark Mitchell <mark@codesourcery.com>
8884
8885 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
8886 (BINFO_PRIMARY_MARKED_P): Use flag 5.
8887 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8888 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8889 (unmark_primary_bases): Remove declaration.
8890 (unmarkedp): Declare.
8891 (dfs_vbase_unmark): Likewise.
8892 * class.c (determine_primary_base): Return immediately if there
8893 are no base classes. Call mark_primary_bases here.
8894 (modify_all_direct_vtables): Remove.
8895 (modify_all_indirect_vtables): Remove.
8896 (dfs_modify_vtables_queue_p): New function.
8897 (dfs_modify_vtables): New function.
8898 (modify_all_vtables): Use them.
8899 (build_base_fields): Build FIELD_DECLs for primary virtual base
8900 classes.
8901 (create_vtable_ptr): Don't call determine_primary_base here.
8902 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
8903 (dfs_set_offset_for_vbases): ... this.
8904 (layout_virtual_bases): Use it.
8905 (layout_class_type): Call determine_primary_base here.
8906 * search.c (unmarkedp): Make it global.
8907 (shared_marked_p): Simplify.
8908 (shared_unmarked_p): Likewise.
8909 (dfs_primary_bases_queue_p): Remove.
8910 (dfs_unmark_primary_bases): Likewise.
8911 (unmark_primary_bases): Likewise.
8912 (mark_primary_bases): Simplify.
8913 (get_pure_virtuals): Don't call mark_primary_bases here.
8914 (dfs_vbase_unmark): New function.
8915 (get_vbase_types): Simplify.
8916
8917 * class.c (struct base_info): Remove.
8918 (determine_primary_base): Take has_virtual_p rather than a
8919 base_info as input. Don't calculate max_has_virtual.
8920 (finish_struct_bits): Remove max_has_virtual argument.
8921 (create_vtable_ptr): Remove max_has_virtual_p argument.
8922 (layout_virtual_bases): Remove max argument.
8923 (layout_basetypes): Likewise.
8924 (layout_class_type): Remove max_has_virtual_p argument.
8925 (finish_struct_1): Remove max_has_virtual.
8926
8927 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
8928 (layout_basetypes): Remove.
8929 * class.c (propagate_binfo_offsets): Moved here from tree.c.
8930 Update to handle primary virtual bases.
8931 (remove_base_fields): New function, split out from
8932 layout_basetypes.
8933 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
8934 (layout_virtual_bases): New function, split out from
8935 layout_basetypes. Update to handle primary virtual bases.
8936 (layout_basetypes): Moved here from tree.c. Use
8937 remove_base_fields and layout_virtual_bases.
8938 * search.c (dfs_mark_primary_bases_queue_p): New function.
8939 (mark_primary_bases): Use it.
8940 * tree.c (CEIL): Remove.
8941 (propagate_binfo_offsets): Remove.
8942 (layout_basetypes): Remove.
8943
8944 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8945
8946 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
8947 (BINFO_PRIMARY_MARKED_P): New macro.
8948 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8949 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8950 (mark_primary_bases): New function.
8951 (unmark_primary_bases): Likewise.
8952 * search.c (get_abstract_virtuals_1): Remove.
8953 (dfs_mark_primary_bases): New function.
8954 (mark_primary_bases): Likewise.
8955 (dfs_unmark_primary_bases): Likewise.
8956 (unmark_primary_bases): Likewise.
8957 (dfs_get_pure_virtuals): Likewise.
8958
8959 2000-01-01 Mark Mitchell <mark@codesourcery.com>
8960
8961 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
8962 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
8963 (modify_one_vtable): Adjust.
8964 (fixup_vtable_deltas1): Likewise.
8965 (override_one_vtable): Likewise.
8966 * search.c (get_abstract_virtuals_1): Likewise.
8967 (get_pure_virtuals): Likewise.
8968 (expand_upcast_fixups): Likewise.
8969 * tree.c (debug_binfo): Likewise.
8970
8971 * class.c (build_vtable): Don't return a value. Don't rebuild
8972 vtables for bases that have already been handled.
8973 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
8974 already been handled.
8975 (modify_one_vtable): Adjust accordingly.
8976 (fixup_vtable_deltas1): Likewise.
8977 (finish_struct_1): Likewise.
8978
8979 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8980
8981 * call.c (build_new_method_call): Also check destructors.