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