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