]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/ChangeLog
Remove obstacks.
[thirdparty/gcc.git] / gcc / cp / ChangeLog
1 2000-10-12 Mark Mitchell <mark@codesourcery.com>
2
3 * class.c (current_obstack): Remove.
4 * decl.c (ggc_p): Remove.
5 (start_decl): Don't use decl_tree_cons.
6 (grokdeclarator): Don't use build_decl_list.
7 (start_function): Don't use decl_tree_cons.
8 (finish_function): Don't mess with obstacks.
9 * decl2.c (grok_x_components): Don't use build_decl_list.
10 * lex.c (make_call_declarator): Don't call decl_tree_cons.
11 (implicitly_declare_fn): Don't call build_decl_list.
12 * parse.y (frob_specs): Don't call build_decl_list or
13 decl_tree_cons.
14 (expr_or_declarator_intern): Don't call decl_tree_cons.
15 (primary): Don't call build_decl_list.
16 (fcast_or_absdcl): Likewise.
17 (typed_declspecs): Don't call decl_tree_cons.
18 (reserved_declspecs): Don't call build_decl_list.
19 (declmods): Likewise.
20 (reserved_typespecquals): Likewise.
21 (aggr): Likewise.
22 (new_type_id): Likewise.
23 (cv_qualifiers): Likewise.
24 (after_type_declarator_intern): Likewise.
25 (notype_declarator_intern): Likewise.
26 (absdcl_intern): Likewise.
27 (named_parm): Likewise.
28 * pt.c (most_specialized_class): Likewise.
29 * repo.c (temporary_obstack): Make it a structure, not a pointer.
30 (init_repo): Initialize it.
31 * search.c (current_obstack): Remove.
32 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
33
34 2000-10-09 Richard Henderson <rth@cygnus.com>
35
36 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
37 (c++ language support bits for libgcc): Remove.
38 (c++.clean): Remove cplib2.txt cleanup.
39 * config-lang.in (headers, lib2funcs): Remove.
40
41 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
42 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
43 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
44 * inc/new.h, inc/typeinfo: Remove files.
45
46 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
47
48 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
49 defined.
50 (init_decl_processing): Initialize intmax_type_node and
51 uintmax_type_node.
52
53 2000-10-06 Richard Henderson <rth@cygnus.com>
54
55 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
56 (original_result_rtx): Remove.
57 * decl.c (save_function_data): Don't clear x_result_rtx.
58 (mark_lang_function): Don't mark it either.
59 * expr.c (fixup_result_decl): Remove.
60 * semantics.c (genrtl_named_return_value): Frob the return decl
61 before calling emit_local_var.
62 (genrtl_finish_function): Don't call fixup_result_decl.
63 Always emit the jump to return_label.
64
65 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
66
67 * pt.c (lookup_template_class): Set current access for enum.
68 (tsubst_enum): Set file & line for enum decl.
69
70 * spew.c (yylex): Remove unused variable.
71
72 2000-10-05 Richard Henderson <rth@cygnus.com>
73
74 * semantics.c (genrtl_finish_function): Don't init or check
75 can_reach_end; remove noreturn and return value checks.
76
77 2000-10-05 Tom Tromey <tromey@cygnus.com>
78
79 * init.c (build_java_class_ref): Use `build_static_name' with a
80 suffix, not a prefix, to build the class object's name.
81
82 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
83
84 * cp-tree.h (access_kind): Fix comment typo.
85 * decl2.c (grokfield): Fix diagnostic typo.
86 * semantics.c (finish_template_type): Fix comment typo.
87 (finish_qualified_object_call_expr): Likewise.
88
89 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
90
91 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
92 tsubsting fails.
93
94 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
95
96 * spew.c (frob_id): New static function.
97 (frob_opname): Use it.
98 (yylex): Use it.
99
100 2000-10-01 Mark Mitchell <mark@codesourcery.com>
101
102 * decl.c (lang_mark_false_label_stack): Remove.
103 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
104
105 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
106
107 * gxxint.texi: Use @email for formatting email addresses.
108
109 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
110
111 * error.c: Remove direct obstack manipulation. Replace with
112 output_buffer-based formatting. Adjust calls to removed macros.
113 (obstack_chunk_alloc, obstack_chunk_free): Remove.
114 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
115 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
116
117 2000-09-24 Mark Mitchell <mark@codesourcery.com>
118
119 * ir.texi: Move to ../c-tree.texi.
120
121 2000-09-20 Jason Merrill <jason@redhat.com>
122
123 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
124
125 2000-09-21 Andreas Jaeger <aj@suse.de>
126
127 * errfn.c: Move declaration of cp_printer and cp_printers to ...
128 * cp-tree.h: ... here.
129
130 * error.c: Remove declaration of cp_printer.
131
132 2000-09-20 Mark Mitchell <mark@codesourcery.com>
133
134 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
135
136 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
137
138 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
139 users.
140
141 2000-09-18 Mark Mitchell <mark@codesourcery.com>
142
143 * decl.c (start_function): Robustify.
144
145 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
146
147 * cp-tree.h (check_function_format): Accept a `status' parameter.
148
149 * call.c, typeck.c: Updates calls to `check_function_format'.
150
151 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
152
153 * decl2.c (handle_class_head): Always push some scope even
154 in the error case.
155
156 2000-09-16 Mark Mitchell <mark@codesourcery.com>
157
158 * cp-tree.h (struct cp_language_function): Remove
159 x_scope_stmt_stack and name_declared.
160 (current_scope_stmt_stack): Remove.
161 (function_name_declared_p): New macro.
162 (struct lang_decl_flags): Use c_lang_decl as a base class.
163 (context): Remove.
164 (struct lang_decl): Replace saved_tree with context.
165 (DECL_FRIEND_CONTEXT): Adjust accordingly.
166 (SET_DECL_FRIEND_CONTEXT): Likewise.
167 (DECL_VIRTUAL_CONTEXT): Likewise.
168 (DECL_SAVED_TREE): Remove.
169 (C_DECLARED_LABEL_FLAG): Likewise.
170 (cplus_expand_expr_stmt): Don't declare.
171 (add_decl_stmt): Likewise.
172 (add_scope_stmt): Likewise.
173 * decl.c (mark_stmt_tree): Remove.
174 (case_compare): Likewise.
175 (finish_case_label): Use c_add_case_label.
176 (init_decl_processing): Set more language-specific hooks.
177 (build_enumerator): Fix typo in comment.
178 (cplus_expand_expr_stmt): Remove.
179 (mark_lang_function): Use mark_c_language_function.
180 (lang_mark_tree): Use c_mark_lang_decl.
181 * decl2.c: Change order of inclusion.
182 * except.c: Likewise.
183 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
184 back on c_expand_expr.
185 * friend.c: Include expr.h.
186 * init.c: Change order of inclusion.
187 * Makefile.in: Update dependencies.
188 * lex.h (free_lang_decl_chain): Remove.
189 * optimize.c (maybe_clone_body): Use function_name_declared_p.
190 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
191 it doesn't exist.
192 (instantiate_decl): Use function_name_declared_p.
193 * semantics.c (lang_expand_expr_stmt): Remove.
194 (set_current_function_name_declared): Likewise.
195 (current_function_name_declared): Likewise.
196 (begin_compound_stmt): Use function_name_declared_p.
197 (add_decl_stmt): Remove.
198 (setup_vtbl_ptr): Use function_name_declared_p.
199 (add_scope_stmt): Remove.
200 (current_scope_stmt_stack): New function.
201 (cp_expand_stmt): Don't handle SCOPE_STMTs.
202 (expand_body): Use function_name_declared_p.
203 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
204 * typeck.c: Change order of includes.
205 (convert_sequence): Remove.
206
207 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
208
209 * lex.c (reswords): Add _Complex.
210
211 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
212
213 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
214
215 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
216
217 * init.c (begin_init_stmts): Don't use // comments.
218
219 2000-09-12 Jason Merrill <jason@redhat.com>
220
221 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
222 all non-extern arrays.
223
224 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
225 typenames, too. Downgrade complaint to pedwarn.
226 (xref_tag): Warn about surprising behavior of 'friend struct T'.
227 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
228 'class This::Inherited'.
229
230 2000-09-12 Mark Mitchell <mark@codesourcery.com>
231
232 * decl.c (finish_case_label): Given the LABEL_DECL a
233 DECL_CONTEXT.
234
235 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
236
237 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
238 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
239 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
240 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
241 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
242 New macros.
243 (sorry_for_unsupported_tree, print_scope_operator,
244 print_left_paren, print_right_paren, print_left_bracket,
245 print_right_bracket, print_whitespace): Likewise.
246 (aggr_variety): Rename to class_key_or_enum.
247 (print_type): Rename to print_type_id.
248 (print_type_specifier_seq, print_simple_type_specifier,
249 print_elaborated_type_specifier,
250 print_rest_of_abstract_declarator,
251 print_parameter_declaration_clause, print_exception_specification,
252 print_nested_name_specifier, print_template_id,
253 typedef_original_name, print_template_argument_list_start,
254 print_template_argument_list_end): New functions.
255
256 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
257
258 * ir.texi: Add more documentation.
259
260 2000-09-11 Mark Mitchell <mark@codesourcery.com>
261
262 * cp-tree.h (struct saved_scope): Remove x_function_parms.
263 (current_function_parms): Don't define.
264 (struct cp_language_function): Remove parms_stored.
265 (current_function_just_assigned_this): Don't define.
266 (current_function_parms_stored): Likewise.
267 (static_ctors): Declare.
268 (static_dtors): Likewise.
269 (SF_EXPAND): Don't define.
270 (expand_start_early_try_stmts): Remove declaration.
271 (store_parm_decls): Likewise.
272 * decl.c (static_ctors): Don't declare.
273 (static_dtors): Likewise.
274 (struct binding_level): Remove this_block.
275 (poplevel): Remove dead code.
276 (set_block): Likewise.
277 (mark_binding_level): Don't mark this_block.
278 (mark_saved_scope): Don't mark x_function_parms.
279 (init_decl_processing): Don't add current_function_parms as a GC
280 root.
281 (check_function_type): Change prototype.
282 (start_function): Remove RTL-generation code.
283 (expand_start_early_try_stmts): Remove.
284 (store_parm_decls): Give it internal linkage. Remove
285 RTL-generation code.
286 (finish_function): Remove RTL-generation code.
287 * decl2.c (static_ctors): Fix formatting.
288 (static_dtors): Likewise.
289 * method.c (use_thunk): Don't call store_parm_decls.
290 (synthesize_method): Likewise.
291 * optimize.c (maybe_clone_body): Likewise.
292 * parse.y (fn.def2): Likewise.
293 (.set_base_init): Likewise.
294 (nodecls): Likewise.
295 * pt.c (instantiate_decl): Likewise.
296 * rtti.c (synthesize_tinfo_fn): Likewise.
297 * semantics.c (genrtl_try_block): Simplify.
298 (expand_body): Use genrtl_start_function and
299 genrtl_finish_function.
300 (genrtl_start_function): New function.
301 (genrtl_finish_function): Likewise.
302
303 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
304
305 * error.c (cp_tree_printer, case 'P'): Append break.
306
307 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
308
309 * cp-tree.h (frob_opname): Declare.
310 * parse.y (saved_scopes): New static variable.
311 (cp_parse_init): Adjust.
312 (do_id): If lastiddecl is NULL, do do_identifier.
313 (operator): Save scope information.
314 (unoperator): new reduction. Restore scope information.
315 (operator_name): Append unoperator. Call frob_opname.
316 * spew.c (frob_opname): Define.
317
318 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
319
320 * decl.c, rtti.c: Include defaults.h if not already included.
321 Don't define the *_TYPE_SIZE macros.
322
323 2000-09-09 Mark Mitchell <mark@codesourcery.com>
324
325 * cp-tree.h (push_switch): Change prototype.
326 (check_cp_case_value): Remove declaration.
327 (decl_constant_value): Likewise.
328 * decl.c (struct cp_switch): Add switch_stmt and cases.
329 (case_compare): New function.
330 (push_switch): Set switch_stmt. Initialize cases.
331 (pop_switch): Clean up cases.
332 (define_case_label): Rename to ...
333 (finish_case_label): ... this. Do semantic analysis for case
334 labels here.
335 (start_function): Correct comment.
336 * decl2.c (check_cp_case_value): Remove.
337 * expr.c (do_case): Remove.
338 * pt.c (tsubst_expr): Adjust call to finish_case_label.
339 * semantics.c (genrtl_do_poplevel): Remove declaration.
340 (RECHAIN_STMTS): Remove.
341 (finish_break_stmt): Use build_break_stmt.
342 (finish_continue_stmt): Use build_continue_stmt.
343 (finish_switch_cond): Adjust condition here, rater than in
344 c_expand_start_case.
345 (finish_case_label): Remove.
346 * typeck.c (c_expand_return): Remove.
347 (c_expand_start_case): Likewise.
348
349 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
350
351 * ir.texi: Document type nodes.
352
353 2000-09-06 Mark Mitchell <mark@codesourcery.com>
354
355 * cp-tree.h (init_cp_semantics): Declare.
356 (genrtl_try_block): Don't declare.
357 (genrtl_handler): Likewise.
358 (genrtl_catch_block): Likewise.
359 (genrtl_ctor_stmt): Likewise.
360 (genrtl_subobject): Likewise.
361 (genrtl_do_poplevel): Likewise.
362 (genrtl_named_return_value): Likewise.
363 * lex.c (init_parse): Call init_cp_semantics.
364 * semantics.c (genrtl_try_block): Give it internal linkage.
365 (genrtl_handler): Likewise.
366 (genrtl_catch_block): Likewise.
367 (genrtl_ctor_stmt): Likewise.
368 (genrtl_subobject): Likewise.
369 (genrtl_do_poplevel): Likewise.
370 (genrtl_named_return_value): Likewise.
371 (lang_expand_stmt): Rename to ...
372 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
373 (init_cp_semantics): Define.
374
375 * decl.c (initialize_local_var): Remove RTL-generating code.
376 * semantics.c (genrtl_try_block): Fix formatting.
377
378 Move statement-tree facilities from C++ to C front-end.
379 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
380 (void_zero_node): Remove.
381 (stmt_tree): Likewise.
382 (scope_chain): Adjust.
383 (language_function): Rename to cp_language_function.
384 (cp_function_chain): Adjust.
385 (current_stmt_tree): Remove.
386 (last_tree): Likewise.
387 (last_expr_type): Likewise.
388 (struct lang_decl): Adjust.
389 (STMT_IS_FULL_EXPR_P): Remove.
390 (add_tree): Remove.
391 (begin_stmt_tree): Likewise.
392 (finish_stmt_tree): Likewise.
393 (walk_tree_fn): Likewise.
394 (walk_stmt_tree): Likewise.
395 * class.c (finish_struct): Replace use of add_tree with add_stmt.
396 * decl.c (mark_stmt_tree): Adjust type.
397 (init_decl_processing): Don't build void_zero_node.
398 (initialize_local_var): Adjust usage of current_stmt_tree.
399 (finish_enum): Use add_stmt, not add_tree.
400 (save_function_data): Adjust use of language_function.
401 (finish_constructor_body): Use add_stmt, not add_tree.
402 (finish_destructor_body): Likewise.
403 (push_cp_function_context): Adjust use of language_function.
404 (pop_cp_function_context): Likewise.
405 (mark_lang_function): Likewise.
406 (mark_cp_function_context): Likewise.
407 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
408 (build_vec_init): Likewise.
409 * semantics.c (SET_LAST_STMT): Remove.
410 (RECHAIN_STMTS): Don't use it.
411 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
412 (current_stmt_tree): Define.
413 (add_tree): Remove.
414 (finish_goto_stmt): Use add_stmt, not add_tree.
415 (finish_expr_stmt): Likewise.
416 (begin_if_stmt): Likewise.
417 (finish_then_clause): Likewise.
418 (begin_while_stmt): Likewise.
419 (begin_do_stmt): Likewise.
420 (finish_return_stmt): Likewise.
421 (begin_for_stmt): Likewise.
422 (finish_break_stmt): Likewise.
423 (finish_continue_stmt): Likewise.
424 (begin_switch_stmt): Likewise.
425 (finish_case_label): Likewise.
426 (begin_try_block): Likewise.
427 (begin_function_try_block): Likewise.
428 (begin_handler): Likewise.
429 (begin_catch_block): Likewise.
430 (begin_compound_stmt): Likewise.
431 (begin_asm_stmt): Likewise.
432 (finish_asm_stmt): Likewise.
433 (finish_label_stmt): Likewise.
434 (add_decl_stmt): Likewise.
435 (finish_subobject): Likewise.
436 (finish_decl_cleanup): Likewise.
437 (finish_named_return_value): Likewise.
438 (setup_vtbl_ptr): Likewise.
439 (add_scope_stmt): Likewise.
440 (finish_stmt_expr): Likewise.
441 (prune_unused_decls): Remove.
442 (begin_stmt_tree): Likewise.
443 (finish_stmt_tree): Likewise.
444 (prep_stmt): Adjust use of current_stmt_tree.
445 (lang_expand_stmt): Likewise.
446 * tree.c (statement_code_p): Remove.
447 (cp_statement_code_p): New function.
448 (walk_stmt_tree): Remove.
449 (init_tree): Set lang_statement_code_p.
450
451 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
452
453 Integrated preprocessor.
454
455 * Make-lang.in, Makefile.in: Remove all references to input.c,
456 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
457 * gxx.gperf, hash.h, input.c: Delete.
458 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
459 initialized properly.
460
461 * class.c (fixup_pending_inline): Take a tree, not a
462 struct pending_inline *. All callers changed.
463 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
464 RID_PROTECTED entries in ridpointers[] array here.
465 * decl.c (duplicate_decls): Do not refer to struct
466 pending_inline.
467 (record_builtin_type, init_decl_processing): Use RID_MAX not
468 CP_RID_MAX.
469 (grokdeclarator): Use C_IS_RESERVED_WORD.
470 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
471 cpplib.
472 (grok_x_components): Do not inspect pending_inlines chain.
473
474 * cp-tree.h (struct lang_identifier): Add rid_code entry.
475 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
476 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
477 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
478 TIME_IDENTIFIER_FILEINFO): Kill.
479 Update prototypes.
480 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
481 single 32-bit word.
482 * parse.y: Call do_pending_inlines unconditionally.
483 reinit_parse_for_method is now snarf_method. fn.defpen is no
484 longer necessary. Remove unnecessary <itype> annotation on
485 SCOPE. Do not refer to end_of_file or struct pending_inline.
486 * semantics.c (begin_inline_definitions): Call
487 do_pending_inlines unconditionally.
488
489 * lex.c: Remove all code now shared with C front end.
490 Initialize cpplib properly if USE_CPPLIB. Put reserved words
491 into the get_identifier table. Rewrite pragma handling to
492 work with the registry. Move code to save tokens for later
493 processing to spew.c.
494
495 * spew.c: Rewrite everything in terms of token streams instead
496 of text. Move routines here from lex.c / input.c as
497 appropriate. GC-mark trees hanging off the pending inlines
498 chain.
499
500 2000-09-06 Mark Mitchell <mark@codesourcery.com>
501
502 * NEWS: Mention that the named return value extension has been
503 deprecated.
504 * cp-tree.h (original_result_rtx): Define.
505 (TREE_REFERENCE_EXPR): Remove.
506 (DECL_VPARENT): Likewise.
507 (pushdecl_nonclass_level): Likewise.
508 (store_return_init): Likewise.
509 (reinit_lang_specific): Likewise.
510 (genrtl_named_return_value): Change prototype.
511 * decl.c (original_result_rtx): Remove.
512 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
513 Do not generate RTL for local variables here.
514 (store_return_init): Remove.
515 * semantics.c (genrtl_named_return_value): Simplify. Fold in
516 store_return_init.
517 (finish_named_return_value): Adjust accordingly. Warn that this
518 extension is deprecated.
519 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
520
521 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
522
523 * pt.c (type_unification_real): Replace switch with if.
524 (unify): Tsubst non-type parms before comparing.
525
526 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
527
528 * error.c (dump_typename): New function, broken out of ...
529 (dump_type): ... here. Use it.
530 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
531
532 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
533
534 * init.c (build_offset_ref): Deal with namespace scoped
535 TEMPLATE_ID_EXPRs.
536
537 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
538
539 * class.c (resolve_address_of_overloaded_function): Add
540 explanation message.
541 * decl.c (define_case_label): Reformat explanation.
542 * decl2.c (finish_static_data_member_decl): Likewise.
543 (grokfield): Likewise.
544 * friend.c (do_friend): Likewise.
545
546 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
547
548 * tree.c (walk_tree): Expose tail recursion.
549 (walk_stmt_tree): New function.
550 * cp-tree.h: Prototype walk_stmt_tree.
551 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
552 the BLOCKs directly. If a BLOCK has no variables after
553 pruning, discard it.
554 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
555 restore the line number.
556
557 2000-09-05 Mark Mitchell <mark@codesourcery.com>
558
559 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
560 (pt.o): Remove dependency on HTAB_H.
561 * cp-tree.h: Include hashtab.h.
562 (walk_tree): Change prototype.
563 (walk_tree_without_duplicates): New function.
564 * decl.c (check_default_argument): Use it.
565 * optimize.c (remap_decl): Adjust calls to walk_tree.
566 (copy_body): Likewise.
567 (expand_calls_inline): Likewise.
568 (calls_setjmp_p): Use walk_tree_without_duplicates.
569 * pt.c: Don't include hashtab.h.
570 (for_each_template_parm): Use walk_tree_without_duplicates.
571 * semantics.c (finish-stmt_tree): Likewise.
572 (expand_body): Likewise.
573 * tree.c (walk_tree): Add additional parameter.
574 (walk_tree_without_duplicates): New function.
575 (count_trees): Use it.
576 (verify_stmt_tree): Adjust call to walk_tree.
577 (find_tree): Use walk_tree_without_duplicates.
578 (no_linkage_check): Likewise.
579 (break_out_target_exprs): Adjust call to walk_tree.
580 (cp_unsave): Likewise.
581
582 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
583
584 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
585 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
586 * cp-tree.h (TYPE_BINFO): Adjust comment.
587 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
588 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
589 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
590 (TYPE_TEMPLATE_INFO): Likewise.
591 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
592 * class.c (push_nested_class): Likewise.
593 * decl.c (lookup_name_real): Likewise.
594 (grokdeclarator): Likewise.
595 (grok_op_properties): Likewise.
596 (xref_tag): Likewise.
597 (xref_basetypes): Likewise.
598 * decl2.c (constructor_name_full): Likewise.
599 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
600 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
601 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
602 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
603 (dump_type_suffix): Likewise.
604 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
605 instead.
606 (get_aggr_from_typedef): Likewise.
607 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
608 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
609 (write_template_parm): Likewise.
610 (write_template_template_parm): Check tree code instead of
611 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
612 * method.c (build_overload_nested_name): Add
613 BOUND_TEMPLATE_TEMPLATE_PARM.
614 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
615 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
616 * pt.c (convert_template_argument): Check tree code instead of
617 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
618 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
619 (for_each_template_parm): Adjust comment.
620 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
621 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
622 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
623 template_args_equal to compare template template parameter cases.
624 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
625 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
626 instead.
627 * tree.c (copy_template_template_parm): Decide whether to create
628 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
629 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
630 (copy_tree_r): Likewise.
631 * typeck.c (comptypes): Likewise. Check tree code instead of
632 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
633
634 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
635
636 * decl.c (finish_function): Move the code for handling functions
637 marked with the constructor and destructor attributes inside the
638 expand_p block.
639
640 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
641
642 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
643
644 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
645
646 * pt.c (lookup_template_class): Remove abort.
647 * tree.c (get_type_decl): Allow error_mark_node.
648
649 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
650
651 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
652 TEMPLATE_ID_EXPRs.
653
654 2000-09-03 Mark Mitchell <mark@codesourcery.com>
655
656 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
657 new ABI mangling.
658
659 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
660
661 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
662 union tag mismatch error reporting.
663
664 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
665
666 * call.c (build_scoped_method_call): Check it is not a namespace.
667
668 2000-08-30 Jason Merrill <jason@redhat.com>
669
670 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
671
672 * tree.c (bot_manip): Check TREE_CONSTANT rather than
673 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
674 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
675
676 * decl.c (start_function): Always call make_function_rtl.
677
678 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
679
680 * semantics.c (prune_unused_decls): New function.
681 (finish_stmt_tree): Call it via walk_tree.
682
683 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
684
685 * class.c (build_secondary_vtable): Constify a char *.
686 * decl.c (init_decl_processing): Initialize function_id_node,
687 pretty_function_id_node, and func_id_node.
688 * input.c (struct input_source): Constify 'str'.
689 (feed_input): Constify first argument.
690 * mangle.c (write_identifier): Constify argument.
691 * pt.c (mangle_class_name_for_template): Constify argument.
692
693 2000-08-29 Mark Mitchell <mark@codesourcery.com>
694
695 * typeck.c (mark_addressable): Remove code that pokes around in
696 RTL.
697
698 2000-08-28 Jason Merrill <jason@redhat.com>
699
700 * lex.c (file_name_nondirectory): Move to toplev.c.
701
702 * cp-tree.h (LOCAL_CLASS_P): New macro.
703 * class.c (finish_struct_1): Use it.
704
705 2000-08-27 Alex Samuel <samuel@codesourcery.com>
706
707 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
708 (write_encoding): Pass another argument to write_name.
709 (write_name): Add ignore_local_scope parameter. Fix handling of
710 local names.
711 (write_nested_name): Use write_unqualified_name.
712 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
713 (write_template_prefix): Use write_unqualified_name.
714 (write_component): Remove.
715 (write_local_name): Add parameter. Use direct local entity to
716 discriminator calculation.
717 (write_class_enum_type): Pass another argument to write_name.
718 (write_template_template_arg): Likewise.
719 (make_guard_variable): Likewise.
720
721 2000-08-27 Jason Merrill <jason@redhat.com>
722
723 * decl.c (pushdecl): Matching decls for local externs are found in
724 the current level. Propagate linkage information from previous
725 declarations.
726
727 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
728
729 * ir.texi (Expressions): Fix typo.
730
731 2000-08-25 Greg McGary <greg@mcgary.org>
732
733 * tree.c (init_tree): Use ARRAY_SIZE.
734
735 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
736
737 * error.c (cp_tree_printer): Rework.
738
739 2000-08-25 Mark Mitchell <mark@codesourcery.com>
740
741 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
742 dyn-string.o.
743 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
744 (cp-demangle.o): Remove target.
745 (dyn-string.o): Likewise.
746
747 * decl.c (grokfndecl): Require that `main' return an `int'.
748 * mangle.c (write_encoding): Don't mangle return types for
749 conversion functions.
750
751 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
752
753 * error.c (tree_formatting_info): New data type.
754 (tree_being_formatted): New macro.
755 (tree_formatting_flags): Likewise.
756 (put_whitespace): Likewise.
757 (print_tree_identifier): Likewise.
758 (print_identifier): Likewise.
759 (cp_tree_printer, print_function_argument_list, print_declaration,
760 print_expression, print_function_declaration,
761 print_function_parameter, print_type, print_cv_qualifier): New
762 functions.
763 (init_error): Initialize lang_printer.
764
765 2000-08-24 Jason Merrill <jason@redhat.com>
766
767 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
768 adjustment necessary.
769
770 2000-08-24 Greg McGary <greg@mcgary.org>
771
772 * cp-tree.h (MAIN_NAME_P): Remove macro.
773
774 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
775
776 * error.c (print_instantiation_context): Don't forget to flush the
777 buffer.
778
779 2000-08-23 Jason Merrill <jason@redhat.com>
780
781 * typeck.c (build_ptrmemfunc): Save the input pmf.
782
783 * method.c (process_modifiers): Use same_type_p.
784
785 2000-08-23 Mark Mitchell <mark@codesourcery.com>
786
787 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
788 * mangle.c (write_function_type): Change prototype.
789 (write_encoding): Don't mangle return types for
790 constructors or destructors.
791 (write_type): Adjust call to write_function_type.
792 * pt.c (instantiate_template): Instantiate alternate entry points
793 when instantiating the main function.
794
795 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
796
797 * error.c (cp_print_error_function): Don't use embedded '\n' in
798 output_printf.
799
800 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
801
802 * decl.c (init_decl_processing): Remove bogus initialization.
803 * error.c (lang_print_error_function): Restore here.
804 (init_error): Initialize print_error_function.
805
806 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
807
808 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
809
810 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
811
812 * Makefile.in (error.o): Depends on diagnostic.h
813
814 * cp-tree.h (problematic_instantiation_changed,
815 record_last_problematic_instantiation, current_instantiation,
816 print_instantiation_context): Declare.
817 (maybe_print_template_context): Remove.
818
819 * decl.c (init_decl_processing): Set print_error_function to NULL.
820 (lang_print_error_function): Remove, since we're using a new
821 machinery.
822
823 * error.c: #include diagnostic.h
824 (function_category): New function.
825 (cp_diagnostic_starter): Likewise.
826 (cp_diagnostic_finalizer): Likewise.
827 (cp_print_error_function): Likewise.
828 (maybe_print_instantiation_context): Likewise.
829 (print_instantiation_full_context): Likewise.
830 (print_instantiation_partial_context): Likewise.
831 (print_instantiation_context): Define.
832 (init_error): Initialize diagnostic pager and finalizer.
833
834 * pt.c (problematic_instantiation_changed): Define.
835 (record_last_problematic_instantiation): Likewise.
836 (current_instantiation): Likewise.
837 (maybe_print_template_context): Remove.
838 (print_template_context): Likewise.
839 (current_tinst_level): Make static to reflect Brendan Kehoe's
840 change of 1995-04-13.
841 (push_tinst_level): Call print_instantiation_context.
842
843 2000-08-21 Nix <nix@esperi.demon.co.uk>
844
845 * lang-specs.h: Do not process -o or run the assembler if
846 -fsyntax-only.
847
848 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
849
850 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
851 variables.
852 * decl2.c (lang_decode_option): Disable gettext attributes for
853 -ansi.
854
855 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
856
857 * lex.c (lang_init_options): Default diagnostic message maximum
858 length to 80, when line-wrapping.
859
860 2000-08-20 Mark Mitchell <mark@codesourcery.com>
861
862 * class.c (build_vtbl_initializer): Clear the entire
863 vtbl_init_data. Start keeping track of the functions for which we
864 have created vcall offsets here.
865 (dfs_build_vcall_offset_vtbl_entries): Remove.
866 (build_vcall_offset_vtbl_entries): Reimplement.
867 (add_vcall_offset_vtbl_entries_r): New function.
868 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
869 computing when vcall offsets are necessary.
870
871 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
872
873 * decl.c (member_function_or_else): Use cp_error ... %T.
874 (grokdeclarator): Likewise.
875 (start_method): Likewise.
876 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
877
878 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
879
880 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
881 TYPE_DECLs.
882
883 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
884
885 * cp-tree.h (PTRMEM_OK_P): New macro.
886 (itf_ptrmem_ok): New enumeration value.
887 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
888 argument. Diagnose implicit pointer to member.
889 (instantiate_type): Don't diagnose implicit pointer to member
890 here. Pass itf_ptrmem_ok if ok. Adjust calls to
891 resolve_address_of_overloaded_function.
892 * init.c (build_offset_ref): Set PTRMEM_OK_P.
893 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
894 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
895 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
896 (build_unary_op): Deal with single non-static member in
897 microsoft-land.
898
899 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
900
901 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
902
903 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
904
905 * cp-tree.h (enum_name_string): Remove prototype.
906 (report_case_error): Remove prototype.
907 * cp/typeck2.c (enum_name_string): Remove.
908 (report_case_error): Remove.
909 * error.c (dump_expr): Deal with enum values directly.
910 Correctly negate integer constant.
911
912 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
913
914 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
915 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
916 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
917 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
918 (__cxa_vec_new): Use __cxa_vec_new2.
919 (__cxa_vec_delete): Use __cxa_vec_delete2.
920
921 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
922
923 * vec.cc (__cxa_vec_new): Set "C" linkage.
924 (__cxa_vec_ctor): Likewise.
925 (__cxa_vec_cctor): Likewise.
926 (__cxa_vec_dtor): Likewise.
927 (__cxa_vec_delete): Likewise.
928 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
929 (__cxa_vec_ctor): Likewise.
930 (__cxa_vec_cctor): Likewise.
931 (__cxa_vec_dtor): Likewise.
932 (__cxa_vec_delete): Likewise.
933
934 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
935
936 * class.c (instantiate_type): Reinstate local variable
937 deleted in previous change.
938
939 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
940 itf_no_attributes.
941
942 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
943
944 * cp-tree.h (instantiate_type_flags): New enumeration.
945 (instantiate_type): Change parameter.
946 * class.c (instantiate_type): Adjust prototype. Adjust.
947 * call.c (standard_conversion): Adjust instantiate_type call.
948 (reference_binding): Likewise.
949 (build_op_delete_call): Likewise.
950 (convert_like_real): Likewise.
951 * cvt.c (cp_convert_to_pointer): Likewise.
952 (convert_to_reference): Likewise.
953 * pt.c (convert_nontype_argument): Likewise.
954 * typeck.c (build_binary_op): Likewise.
955 (build_ptrmemfunc): Likewise.
956 (convert_for_assignment): Likewise.
957
958 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
959
960 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
961 (current_aggr): Define.
962 * decl.c (grokdeclarator): Make sure a friend class is an
963 elaborated type specifier.
964 * parse.y (current_aggr): Remove static definition.
965 (cp_parse_init): Adjust.
966 (structsp): Clear and restore current_aggr.
967 (component_decl_list): Clear current_aggr.
968
969 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
970 aggregate tag on the typename's context.
971
972 * pt.c (tsubst_friend_class): Return error_mark_node, if
973 parms becomes NULL.
974 (instantiate_class_template): Ignore error_mark_node friend types.
975
976 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
977
978 * cvt.c (warn_ref_binding): New static function, broken out of ...
979 (convert_to_reference): ... here. Use it.
980
981 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
982
983 * parse.y (template_arg): Add rule for template qualified with
984 global scope.
985
986 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
987
988 * decl2.c (add_function): Reorganize.
989 (arg_assoc): Do not consider function template decls.
990
991 2000-08-11 Jason Merrill <jason@redhat.com>
992
993 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
994 looking inside.
995
996 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
997
998 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
999 (lookup_nested_tag): Likewise.
1000
1001 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
1002 can be produced.
1003
1004 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1005
1006 * parse.y (named_complex_class_head_sans_basetype): Remove
1007 always true if.
1008
1009 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1010
1011 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
1012 explicit TEMPLATE_ID_EXPR args.
1013 (build_expr_from_tree, case CALL_EXPR): Likewise.
1014
1015 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1016
1017 * decl.c (check_tag_decl): Diagnose typename's which don't
1018 declare anything.
1019
1020 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
1021
1022 * init.c (build_aggr_init): Reject bogus array initializers
1023 early.
1024
1025 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1026
1027 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
1028 runtime.
1029 * cp/tinfo.cc (__dynamic_cast): Likewise.
1030 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
1031
1032 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1033
1034 * cvt.c (convert_to_pointer_force): Fix error message when
1035 attempting to cast from ambiguous base.
1036
1037 2000-08-08 Jason Merrill <jason@redhat.com>
1038
1039 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
1040 (tsubst_template_arg_vector): Likewise.
1041
1042 * decl2.c (build_anon_union_vars): Choose the largest field; don't
1043 assume that one will be as large as the union.
1044
1045 2000-08-07 Kazu Hirata <kazu@hxi.com>
1046
1047 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
1048 * decl.c (pop_labels): Likewise.
1049
1050 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
1051
1052 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
1053 specifications.
1054 (__pointer_to_member_type_info): Likewise.
1055 (__base_class_info): Likewise.
1056 (__class_type_info): Likewise.
1057 (__si_class_type_info): Likewise.
1058 (__vmi_class_type_info): Likewise.
1059 * tinfo.cc (__si_class_type_info::__do_find_public_src):
1060 Changed member names to match specifications.
1061 (__vmi_class_type_info::__do_find_public_src): Likewise.
1062 (__si_class_type_info::__do_dyncast): Likewise.
1063 (__vmi_class_type_info::__do_dyncast): Likewise.
1064 (__si_class_type_info::__do_upcast): Likewise.
1065 (__vmi_class_type_info::__do_upcast): Likewise.
1066 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
1067 (__pbase_type_info::__pointer_catch): Likewise.
1068 (__pointer_type_info::__pointer_catch): Likewise.
1069 (__pointer_to_member_type_info::__pointer_catch): Likewise.
1070
1071
1072 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
1073
1074 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
1075 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
1076 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
1077
1078 2000-08-04 Mark Mitchell <mark@codesourcery.com>
1079
1080 * cp-tree.h (add_method): Change prototype.
1081 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
1082 Don't double the size of the method vector in the error case.
1083 (handle_using_decl): Adjust call to add_method.
1084 (add_implicitly_declared_members): Likewise.
1085 (clone_function_decl): Likewise.
1086 * decl2.c (check_classfn): Likewise.
1087 * semantics.c (finish_member_declaration): Likewise.
1088
1089 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
1090
1091 * decl.c (flag_isoc94): New variable.
1092
1093 2000-08-02 Jason Merrill <jason@redhat.com>
1094
1095 * pt.c (do_type_instantiation): Add complain parm; don't complain
1096 if called recursively.
1097 * cp-tree.h, parse.y: Adjust.
1098
1099 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
1100
1101 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
1102 -Wno-strict-prototypes.
1103
1104 * g++spec.c: Adjust type of second argument to
1105 lang_specific_driver, and update code as necessary.
1106
1107 * cp-tree.h: Don't prototype min_precision here.
1108 (my_friendly_assert): Cast expression to void.
1109 * semantics.c (do_poplevel): Initialize scope_stmts.
1110
1111 2000-08-02 Mark Mitchell <mark@codesourcery.com>
1112
1113 * cp-tree.h (DECL_NEEDED_P): Tweak.
1114
1115 2000-07-28 Jason Merrill <jason@redhat.com>
1116
1117 * lang-specs.h: Use %i in rule for .ii files.
1118
1119 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
1120
1121 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
1122
1123 2000-07-30 Mark Mitchell <mark@codesourcery.com>
1124
1125 Allow indirect primary bases.
1126 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
1127 primary_base.
1128 (CLASSTYPE_VFIELD_PARENT): Remove.
1129 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
1130 (BINFO_PRIMARY_BINFO): Remove.
1131 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
1132 (BINFO_VBASE_PRIMARY_P): Likewise.
1133 (BINFO_PRIMARY_BASE_OF): New macro.
1134 (BINFO_INDIRECT_PRIMARY_P): Likewise.
1135 (get_primary_binfo): New function.
1136 * decl.c (lang_mark_tree): Make lang_type::primary_base.
1137 * class.c (vcall_offset_data_s): Rename to ...
1138 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
1139 and add ctor_vtbl_p.
1140 (get_derived_offset): Use get_primary_binfo.
1141 (dfs_mark_primary_bases): Adjust handling of virtual primary
1142 bases.
1143 (mark_primary_bases): Likewise.
1144 (set_primary_base): Take a binfo, not an integer, as a
1145 representation of the primary base.
1146 (indirect_primary_base_p): Remove.
1147 (determine_primary_base): Adjust for indirect primary bases.
1148 (dfs_find_final_overrider): Fix typo in coment.
1149 (update_vtable_entry_for_fn): Use get_primary_binfo.
1150 (layout_nonempty_base_or_field): Tweak.
1151 (build_base_fields): Adjust for new primary base semantics.
1152 (dfs_propagate_binfo_offsets): Remove.
1153 (propagate_binfo_offsets): Rewrite.
1154 (dfs_set_offset_for_shared_vbases): Remove.
1155 (layout_virtual_bases): Don't use it.
1156 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
1157 ABI.
1158 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
1159 CLASSTYPE_VFIELD_PARENT.
1160 (dfs_get_primary_binfo): New function.
1161 (get_primary_binfo): Likewise.
1162 (dump_class_hierarchy_r): Tweak printing of primary bases.
1163 (build_vtbl_initializer): Fix typo in comments. Use
1164 vtbl_init_data.
1165 (build_vcall_and_vbase_vtbl_entries): Likewise.
1166 (build_vbaes_offset_vtbl_entries): Likewise.
1167 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
1168 BV_VCALL_INDEX to handle indirect primary bases.
1169 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
1170 (build_rtti_vtbl_entries): Likewise.
1171 * search.c (get_shared_vbase_if_not_primary): Tweak.
1172 (find_vbase_instance): Likewise.
1173 (binfo_for_vtable): Simplify.
1174 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
1175 (make_binfo): Make it have 11 entries.
1176
1177 2000-07-30 Alex Samuel <samuel@codesourcery.com>
1178
1179 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
1180 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
1181 ascertaining primaryness.
1182 (G): Remove template_args.
1183 (decl_is_template_id): New function.
1184 (write_encoding): Use decl_is_template_id.
1185 (write_name): Likewise. Handle type_decls. Get main variant of
1186 type decls.
1187 (write_nested_name): Likewise.
1188 (write_prefix): Likewise.
1189 (write_template_prefix): Likewise.
1190 (write_special_name_constructor): Remove defunct production from
1191 comment.
1192 (write_bare_function_type): Remove comment about absent parameter.
1193 (write_template_template_arg): Add missing grammar production to
1194 comment.
1195
1196 2000-07-27 Jason Merrill <jason@redhat.com>
1197
1198 * decl.c (duplicate_decls): If common_type produces a non-typedef
1199 type for a typedef, just use the old type.
1200
1201 2000-07-27 Mark Mitchell <mark@codesourcery.com>
1202
1203 * cp-tree.h (function_depth): Declare.
1204 (verify_stmt_tree): Likewise.
1205 (find_tree): Likewise.
1206 * decl.c (function_depth): Give it external linkage.
1207 * optimize.c (optimize_function): Increment and decrement it.
1208 * tree.c (verify_stmt_tree_r): New function.
1209 (verify_stmt_tree): Likewise.
1210 (find_tree_r): Likewise.
1211 (find_tree): Likewise.
1212
1213 2000-07-27 Jason Merrill <jason@redhat.com>
1214
1215 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
1216 TYPE_PTRMEMFUNC_P.
1217 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
1218
1219 2000-07-26 Mark Mitchell <mark@codesourcery.com>
1220
1221 * decl.c (start_cleanup_fn): Mark the function as `inline'.
1222 * decl2.c (get_guard): Call cp_finish_decl, not
1223 rest_of_decl_compilation, for local guards.
1224 * lex.c (do_identifier): Remove unused variable.
1225
1226 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
1227
1228 * parse.y: Add missing ';'.
1229
1230 2000-07-26 Mark Mitchell <mark@codesourcery.com>
1231
1232 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
1233 of `extern "C++"'.
1234
1235 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
1236
1237 Kill strict_prototype. Backwards compatibility only for
1238 non NO_IMPLICIT_EXTERN_C systems.
1239 * cp-tree.h (flag_strict_prototype): Remove.
1240 (strict_prototype): Remove.
1241 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1242 * decl.c (maybe_push_to_top_level): Adjust.
1243 (pop_from_top_level): Adjust.
1244 (decls_match): Only allow sloppy parm matching for ancient
1245 system headers.
1246 (init_decl_processing): Adjust.
1247 (grokdeclarator): Adjust.
1248 * decl2.c (flag_strict_prototype): Remove.
1249 (strict_prototype): Remove.
1250 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1251 (lang_f_options): Remove "strict-prototype".
1252 (unsupported-options): Add "strict-prototype".
1253 * lex.c (do_identifier): Adjust.
1254 (do_scoped_id): Adjust.
1255 * parse.y (empty_parms): Adjust.
1256 * class.c (push_lang_context): Adjust.
1257 (pop_lang_context): Adjust.
1258 * typeck.c (comp_target_parms): Adjust.
1259
1260 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
1261
1262 * decl.c (poplevel): Deal with anonymous variables at for scope.
1263 (maybe_inject_for_scope_var): Likewise.
1264
1265 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
1266
1267 * decl.c: Remove all signal handling code, now done in toplev.c.
1268
1269 2000-07-23 Mark Mitchell <mark@codesourcery.com>
1270
1271 * decl.c (make_rtl_for_nonlocal_decl): Rework.
1272
1273 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
1274 correctly.
1275
1276 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
1277
1278 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
1279 Define my_friendly_assert and my_friendly_abort as macros
1280 which may call friendly_abort. Prototype friendly abort, not
1281 my_friendly_abort or my_friendly_assert.
1282 * decl.c (signal_catch): Report the signal caught in the error
1283 message. Call fatal directly.
1284 * typeck2.c (ack, my_friendly_assert): Delete.
1285 (my_friendly_abort): Rename to friendly_abort. Expect file,
1286 line, and function parameters. Report the abort code, then
1287 call fancy_abort. Do not mask an abort if errors have
1288 already occurred.
1289
1290 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
1291
1292 * typeck.c (comp_target_parms): Remove obsolete parameter.
1293 (comp_target_types): Adjust.
1294
1295 2000-07-17 Jason Merrill <jason@redhat.com>
1296
1297 * typeck.c (mark_addressable): Never set TREE_USED.
1298 * call.c (build_call): Don't abort on calls to library functions
1299 that have been declared normally.
1300
1301 * typeck.c (build_binary_op): Fix grammar in warning.
1302
1303 * exception.cc (__eh_free): Fix prototype.
1304
1305 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
1306
1307 * decl.c (pushdecl): Handle seeing an OVERLOAD in
1308 IDENTIFIER_NAMESPACE_VALUE.
1309
1310 2000-07-16 Mark Mitchell <mark@codesourcery.com>
1311
1312 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
1313 * method.c (use_thunk): Correct handling of vcall offsets.
1314
1315 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
1316
1317 * .cvsignore: parse.h and parse.c have no cp- prefix.
1318
1319 2000-07-13 Mark Mitchell <mark@codesourcery.com>
1320
1321 * .cvsignore: New file.
1322
1323 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
1324
1325 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
1326
1327 2000-07-12 Mark Mitchell <mark@codesourcery.com>
1328
1329 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
1330 * parse.c: Remove.
1331 * parse.h: Likewise.
1332
1333 2000-07-11 Mark Mitchell <mark@codesourcery.com>
1334
1335 * class.c (layout_class_type): Add pointers to virtual bases after
1336 base classes under the old ABI.
1337
1338 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
1339
1340 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
1341 (finish_continue_stmt): Likewise.
1342 (begin_for_stmt): Remove call to note_level_for_for.
1343 (finish_goto_stmt): Change call from build_min_nt
1344 to build_stmt.
1345 (finish_expr_stmt): Likewise.
1346 (begin_if_stmt): Likewise.
1347 (begin_while_stmt): Likewise.
1348 (finish_while_stmt): Likewise.
1349 (finish_return_stmt): Likewise.
1350 (begin_for_stmt): Likewise.
1351 (finish_for_stmt): Likewise.
1352 (finish_break_stmt): Likewise.
1353 (begin_switch_stmt): Likewise.
1354 (finish_case_label): Likewise.
1355 (genrtl_try_block): Likewise.
1356 (begin_try_block): Likewise.
1357 (begin_handler): Likewise.
1358 (begin_compound_stmt): Likewise.
1359 (finish_asm_stmt): Likewise.
1360 (finish_label_stmt): Likewise.
1361 (add_decl_stmt): Likewise.
1362 (finish_subobject): Likewise.
1363 (finish_decl_cleanup): Likewise.
1364 (finish_named_return_value): Likewise.
1365 (setup_vtbl_ptr): Likewise.
1366 (add_scope_stmt): Likewise.
1367 * decl.c (finish_constructor_body): Likewise.
1368 (finish_destructor_body): Likewise.
1369 * optimize.c (copy_body_r): Likewise.
1370 (initialize_inlined_parameters): Likewise.
1371 (declare_return_variable): Likewise.
1372 (expand_call_inline): Likewise.
1373
1374 2000-07-10 Jakub Jelinek <jakub@redhat.com>
1375
1376 * semantics.c (expand_body): Sync interface information
1377 at the end of function body expansion.
1378
1379 2000-07-09 Jason Merrill <jason@redhat.com>
1380
1381 * init.c (build_new_1): Bail early if the call to new fails.
1382
1383 * decl.c (compute_array_index_type): Check specifically for
1384 an INTEGER_CST, not just TREE_CONSTANT.
1385
1386 * decl.c (duplicate_decls): Don't call duplicate_decls on
1387 the DECL_TEMPLATE_RESULT.
1388 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
1389 codes.
1390
1391 * error.c (dump_template_bindings): Don't crash if we had an
1392 invalid argument list.
1393
1394 * typeck.c (c_expand_start_case): Do narrowing here.
1395 * semantics.c (finish_switch_cond): Not here.
1396
1397 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
1398
1399 * parse.y (asm_clobbers): Do string concatenation.
1400
1401 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1402
1403 * decl.c (pushtag): Don't put local classes in template functions
1404 on the local_classes list.
1405
1406 2000-07-04 Scott Snyder <snyder@fnal.gov>
1407
1408 * decl2.c (get_guard): Add missing return for old ABI local
1409 variable case.
1410
1411 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1412
1413 * cp-tree.h (char_type_p): New function.
1414 * decl.c (init_decl_processing): Don't initialize
1415 signed_wchar_type_node or unsigned_wchar_type_node.
1416 (complete_array_type): Handle brace-enclosed string-constants.
1417 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
1418 * tree.c (char_type_p): New function.
1419 * typeck2.c (digest_init): Use char_type_p.
1420
1421 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1422
1423 * pt.c (tsubst): Don't layout type, if it's error_mark.
1424
1425 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1426
1427 * pt.c (instantiate_pending_templates): Reset template level.
1428
1429 2000-07-05 Jason Merrill <jason@redhat.com>
1430
1431 * call.c (joust): Don't complain about `operator char *()' beating
1432 `operator const char *() const'.
1433
1434 2000-07-04 scott snyder <snyder@fnal.gov>
1435 Jason Merrill <jason@redhat.com>
1436
1437 * repo.c (repo_get_id): Handle the case where a class with virtual
1438 bases has a null TYPE_BINFO_VTABLE.
1439
1440 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
1441 Jason Merrill <jason@redhat.com>
1442
1443 * parse.y (member_init): Just pass in the type.
1444 * init.c (expand_member_init): Handle getting a type.
1445
1446 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1447 Jason Merrill <jason@redhat.com>
1448
1449 * decl.c (finish_function): Warn if a function has no return
1450 statement.
1451 Suggested by Andrew Koenig.
1452 * typeck.c (check_return_expr): Do set current_function_returns_value
1453 if we got an error_mark_node.
1454
1455 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1456
1457 * decl2.c (push_decl_namespace): Push the original namespace.
1458
1459 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1460
1461 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
1462 * semantics.c (begin_class_definition): Clear it.
1463
1464 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
1465
1466 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
1467 (genrtl_expr_stmt): Likewise.
1468 (genrtl_decl_stmt): Likewise.
1469 (genrtl_if_stmt): Likewise.
1470 (genrtl_while_stmt): Likewise.
1471 (genrtl_do_stmt): Likewise.
1472 (genrtl_return_stmt): Likewise.
1473 (genrtl_for_stmt): Likewise.
1474 (genrtl_break_stmt): Likewise.
1475 (genrtl_continue_stmt): Likewise.
1476 (genrtl_scope_stmt): Likewise.
1477 (genrtl_switch_stmt): Likewise.
1478 (genrtl_case_label): Likewise.
1479 (genrtl_begin_compound_stmt): Likewise.
1480 (genrtl_finish_compound_stmt): Likewise.
1481 (genrtl_compound_stmt): Likewise.
1482 (genrtl_asm_stmt): Likewise.
1483
1484 * init.c (begin_init_stmts): Remove call to
1485 genrtl_begin_compound_stmt.
1486 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
1487
1488 * semantics.c (lang_expand_stmt): Changed call to
1489 genrtl_compound_stmt to ignore return value.
1490
1491 2000-07-02 Mark Mitchell <mark@codesourcery.com>
1492
1493 * mangle.c (canonicalize_for_substitution): Return the canonical
1494 variant of a type.
1495
1496 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
1497 TYPE_DECL.
1498 * typeck.c (commonparms): Remove obstack manipulations.
1499
1500 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
1501
1502 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
1503
1504 * Makefile.in (OBJS): Added ../c-semantics.o.
1505 (OBJDEPS): Likewise.
1506
1507 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
1508 ../c-common.h.
1509 (struct stmt_tree): Added comment.
1510 (current_function_name_declared): Removed.
1511 (stmts_are_full_exprs_p): Likewise.
1512 (genrtl_do_pushlevel): Likewise.
1513 (genrtl_clear_out_block): Likewise.
1514 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
1515 (DECL_ANON_UNION_ELEMS): Likewise.
1516 (emit_local_var): Likewise.
1517 (make_rtl_for_local_static): Likewise.
1518 (do_case): Likewise.
1519 (expand_stmt): Likewise.
1520 (genrtl_decl_cleanup): Likewise.
1521 (c_expand_asm_operands): Likewise.
1522 (c_expand_return): Likewise.
1523 (c_expand_start_case): Likewise.
1524
1525 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
1526 (emit_local_var): Likewise.
1527 (initialize_local_var): Change reference to
1528 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1529 Change reference to stmts_are_full_exprs_p to
1530 current_stmt_tree->stmts_are_full_exprs_p.
1531 (push_cp_function_context): Likewise.
1532
1533 * expect.c (expand_throw): Change reference to
1534 stmts_are_full_exprs_p.
1535
1536 * init.c (build_aggr_init): Change reference to
1537 stmts_are_full_exprs_p.
1538 (build_vec_init): Likewise.
1539
1540 * optimize.c (maybe_clone_body): Change reference to
1541 current_function_name_declared to
1542 cp_function_chain->name_declared.
1543
1544 * pt.c (instantiate_decl): Change reference to
1545 current_function_name_declared to
1546 cp_function_chain->name_declared.
1547
1548 * semantics.c (expand_cond): Moved declaration to c-common.h.
1549 (genrtl_do_pushlevel): Moved to c-semantics.c.
1550 (genrtl_clear_out_block): Likewise.
1551 (genrtl_goto_stmt): Likewise.
1552 (genrtl_expr_stmt): Likewise.
1553 (genrtl_decl_stmt): Likewise.
1554 (gerntl_if_stmt): Likewise.
1555 (genrtl_while_stmt): Likewise.
1556 (genrtl_do_stmt): Likewise.
1557 (genrtl_return_stmt): Likewise.
1558 (genrtl_for_stmt): Likewise.
1559 (genrtl_break_stmt): Likewise.
1560 (genrtl_continue_stmt): Likewise.
1561 (genrtl_scope_stmt): Likewise.
1562 (genrtl_switch_stmt): Likewise.
1563 (genrtl_case_label): Likewise.
1564 (genrtl_begin_compound_stmt): Likewise.
1565 (genrtl_finish_compound_stmt): Likewise.
1566 (genrtl_compound_stmt): Likewise.
1567 (genrtl_asm_stmt): Likewise.
1568 (genrtl_decl_cleanup): Likewise.
1569 (expand_cond): Likewise.
1570 (expand_stmt): Renamed to ...
1571 (lang_expand_stmt): ... this.
1572 (lang_expand_expr_stmt): Initialize.
1573 (set_current_function_name_declared): Likewise.
1574 (stmts_are_full_exprs_p): Likewise.
1575 (current_function_name_declared): Likewise.
1576 (anon_aggr_type_p): Likewise.
1577 (do_poplevel): Change reference to
1578 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
1579 Change reference to stmts_are_full_exprs_p to
1580 current_stmt_tree->stmts_are_full_exprs_p.
1581 (add_tree): Likewise.
1582 (finish_expr_stmt): Likewise.
1583 (prep_stmt): Likewise.
1584 (lang_expand_stmt): Likewise.
1585 (begin_compound_stmt): Change reference to
1586 current_function_name_declared to
1587 cp_function_chain->name_declared and call to
1588 current_function_name_declared().
1589 (setup_vtbl_ptr): Likewise.
1590 (genrtl_do_poplevel): Removed.
1591
1592 2000-06-30 Jason Merrill <jason@redhat.com>
1593
1594 * init.c (init_init_processing): Go back to aligning like
1595 double_type_node for old ABI.
1596 (get_cookie_size): Make cookie larger if we get a type that needs
1597 more alignment.
1598 (build_vec_delete): Call it.
1599
1600 * typeck.c (qualify_type_recursive): New fn.
1601 (composite_pointer_type): Use it.
1602 (build_binary_op): Use composite_pointer_type.
1603
1604 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
1605 Jason Merrill <jason@redhat.com>
1606
1607 * typeck.c (check_return_expr): Don't complain about returning
1608 NULL from operator new if -fcheck-new.
1609 * cp-tree.h: Declare flag_check_new here.
1610 * init.c: Not here.
1611
1612 2000-06-28 Alex Samuel <samuel@codesourcery.com>
1613
1614 * mangle.c (find_substitution): Use same_type_p.
1615 (write_encoding): Don't check for substitutions.
1616
1617 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
1618
1619 * parse.y (expr_no_comma_rangle): New non-terminal.
1620 (template_parm): Use it for default parameter case.
1621 (template_arg): Use it.
1622 (expr_no_commas): Remove commented out undefined extensions.
1623 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1624 * parse.h, parse.c: Rebuilt.
1625
1626 2000-06-30 Mark Mitchell <mark@codesourcery.com>
1627
1628 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
1629 (finish_asm_stmt): Do it here, instead.
1630
1631 * cp-tree.h (ridpointers): Don't declare.
1632 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
1633 (record_builtin_java_type): Likewise.
1634 (init_decl_processing): Likewise.
1635 * lex.c: Move inclusion of lex.h.
1636 (ridpointers): Don't define.
1637 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
1638 RID_MAX.
1639 * lex.h (enum rid): Rename to ...
1640 (enum cp_rid): ... this.
1641 (ridpointers): Don't declare.
1642 * parse.y: Move inclusion of lex.h.
1643 * parse.c: Regenerated.
1644 * spew.c: Move inclusion of lex.h.
1645
1646 * cp-tree.h (struct language_function): Remove temp_name_counter.
1647 (temp_name_counter): Remove.
1648 (get_temp_name): Change prototype.
1649 (get_guard): New function.
1650 (get_guard_cond): Likewise.
1651 (set_guard): Likewise.
1652 * cvt.c (build_up_reference): Adjust call to get_temp_name.
1653 * decl.c (expand_static_init): Use get_guard and friends to
1654 implement guard variables.
1655 * decl2.c (get_temp_name): Assume that the variables created are
1656 always static.
1657 (get_sentry): Rename to ...
1658 (get_guard): ... this. Implement new ABI guard variables.
1659 (get_guard_bits): New function.
1660 (get_guard_cond): Likewise.
1661 (set_guard): Likewise.
1662 (start_static_initialization_or_destruction): Use them.
1663 (do_static_initialization): Replace sentry with guard throughout.
1664 (do_static_destruction): Likewise.
1665 * init.c (create_temporary_var): Add comment.
1666
1667 2000-06-28 Alex Samuel <samuel@codesourcery.com>
1668
1669 * mangle.c (find_substitution): Use same_type_p.
1670 (write_encoding): Don't check for substitutions.
1671
1672 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
1673
1674 * parse.y (expr_no_comma_rangle): New non-terminal.
1675 (template_parm): Use it for default parameter case.
1676 (template_arg): Use it.
1677 (expr_no_commas): Remove commented out undefined extensions.
1678 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
1679 * parse.h, parse.c: Rebuilt.
1680
1681 2000-06-29 Mark Mitchell <mark@codesourcery.com>
1682
1683 * cp-tree.h (flag_const_strings): Remove.
1684 (warn_parentheses): Likewise.
1685 (warn_format): Likewise.
1686 (common_type): Likewise.
1687 (default_conversion): Likewise.
1688 (build_binary_op): Likewise.
1689 (cp_build_binary_op): New macro.
1690 * call.c (build_new_op): Use cp_build_binary_op instead of
1691 build_binary_op.
1692 * class.c (build_vtable_entry_ref): Likewise.
1693 * decl.c (expand_static_init): Likewise.
1694 (compute_array_index_type): Likewise.
1695 (build_enumerator): Likewise.
1696 * decl2.c (delete_sanity): Likewise.
1697 (start_static_initialization_or_destruction): Likewise.
1698 * error.c (dump_type_suffix): Likewise.
1699 * init.c (resolve_offset_ref): Likewise.
1700 (build_new): Likewise.
1701 (build_new_1): Likewise.
1702 (build_vec_delete_1): Likewise.
1703 (build_vec_init): Likewise.
1704 (build_delete): Likewise.
1705 * rtti.c (synthesize_tinfo_fn): Likewise.
1706 (synthesize_tinfo_var): Likewise.
1707 * search.c (expand_upcast_fixups): Likewise.
1708 (fixup_all_virtual_upcast_offsets): Likewise.
1709 * typeck.c (build_array_ref): Likewise.
1710 (get_member_function_from_ptrfunc): Likewise.
1711 (build_binary_op): Add parameter.
1712 (pointer_int_sum): Use cp_build_binary_op.
1713 (pointer_diff): Likewise.
1714 (build_modify_expr): Likewise.
1715 (get_delta_difference): Likewise.
1716 (build_ptrmemfunc): Likewise.
1717
1718 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
1719
1720 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
1721 * decl.c (create_implicit_typedef): Adjust.
1722 * decl2.c (build_artificial_parm): Adjust.
1723 * method.c (implicitly_declare_fn): Adjust.
1724 * pt.c (push_inline_template_parms_recursive): Adjust.
1725 (process_template_parm): Adjust.
1726 (overloaded_template_name): Adjust.
1727 * semantics.c (finish_template_template_parm): Adjust.
1728
1729 2000-06-28 Mark Mitchell <mark@codesourcery.com>
1730
1731 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
1732 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
1733 where to emit thunks.
1734 (build_vtt): Adjust call to build_vtt_inits.
1735 (build_vtt_inits): Add parameter to indicate whether or not
1736 sub-VTTs for virtual bases should be included. Adjust handling of
1737 construction vtables.
1738 (get_matching_base): New function.
1739 (dfs_build_vtt_inits): Rename to ...
1740 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1741 construction vtables.
1742 (dfs_fixup_binfo_vtbls): Likewise.
1743 (build_ctor_vtbl_groups): Build construction vtables for virtual
1744 bases, too.
1745 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1746 to build construction vtbls.
1747 (dfs_accumulate_vtbl_inits): Adjust handling of
1748 construction vtables.
1749
1750 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1751 types correctly.
1752
1753 2000-06-27 Mark Mitchell <mark@codesourcery.com>
1754
1755 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1756
1757 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1758
1759 * search.c (hides): Remove.
1760 (is_subobject_of_p): Add most_derived parameter. Use
1761 CANONICAL_BINFO.
1762 (lookup_field_queue_p): Adjust.
1763 (lookup_field_r): Adjust.
1764
1765 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
1766
1767 * decl2.c (handle_class_head): Bash typedefs to the type's main
1768 decl.
1769
1770 2000-06-25 Mark Mitchell <mark@codesourcery.com>
1771
1772 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1773 (begin_global_stmt_expr): ... this.
1774 (genrtl_finish_stmt_expr): Rename to ...
1775 (finish_global_stmt_expr): ... this.
1776 * init.c (begin_init_stmts): Adjust calls.
1777 (finish_init_stmts): Likewise.
1778 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1779 (begin_global_stmt_expr): ... this.
1780 (genrtl_finish_stmt_expr): Rename to ...
1781 (finish_global_stmt_expr): ... this.
1782
1783 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1784
1785 * search.c (lookup_member): Fix typo in comment.
1786
1787 2000-06-24 Jason Merrill <jason@redhat.com>
1788
1789 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1790 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1791
1792 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1793
1794 * parse.y (complex_direct_notype_declarator): Support global_scope.
1795 * Makefile.in: Adjust conflict count.
1796
1797 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1798
1799 * parse.y (template_arg): Convert TEMPLATE_DECL
1800 that is a template template paramter to
1801 TEMPLATE_TEMPLATE_PARM here.
1802
1803 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1804 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1805 (copy_template_template_parm): Adjust prototype.
1806 * decl.c (grokdeclarator): Remove dead code.
1807 * pt.c (process_template_parm): Tidy.
1808 (lookup_template_class): Construct nodes in
1809 copy_template_template_parm.
1810 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1811 lookup_template_class. Use TYPE_TI_TEMPLATE.
1812 * tree.c (copy_template_template_parm): Add NEWARGS
1813 parameter.
1814 (mapcar): Adjust call to copy_template_template_parm.
1815 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1816 * method.c (build_template_template_parm_names): Change error
1817 code to avoid compilation warning.
1818
1819 * gxxint.texi: Document template template parameter
1820 name mangling.
1821
1822 2000-06-21 Alex Samuel <samuel@codesourcery.com>
1823
1824 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1825 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1826 (cp-demangle.o): New rule.
1827 (dyn-string.o): Likewise.
1828 * inc/cxxabi.h (__cxa_demangle): New declaration.
1829
1830 2000-06-22 Mark Mitchell <mark@codesourcery.com>
1831
1832 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1833 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1834 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
1835 a tree, not an int.
1836 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1837 (make_thunk): Change prototype.
1838 (emit_thunk): Rename to use_thunk.
1839 (mangle_thunk): Change prototype.
1840 * class.c (get_derived_offset): Simplify.
1841 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1842 BV_GENERATE_THUNK_WITH_VTABLE_P.
1843 (build_primary_vtable): Simplify.
1844 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1845 (dfs_find_base): Remove.
1846 (update_vtable_entry_for_fn): Correct bug in finding the base
1847 where a virtual function was first declared. Figure out whether
1848 or not to emit a vcall-thunk with the vtables in which it appears.
1849 Correct logic for deciding whether to use an ordinary thunk, or a
1850 vcall thunk.
1851 (finish_struct_1): Remove unnecssary code.
1852 (build_vtbl_initializer): Use ssize_int for the running counter of
1853 negative indices.
1854 (build_vtbl_initializer): Only use vcall thunks where necessary.
1855 Mark thunks as needing to be emitted with their vtables, or not.
1856 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1857 indices. Use size_binop.
1858 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1859 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
1860 size_binop.
1861 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1862 (build_vtable_entry): Mark thunks as needing to be emitted with
1863 their vtables, or not.
1864 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1865 * decl2.c (mark_vtable_entries): Use use_thunk instead of
1866 emit_thunk.
1867 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
1868 information.
1869 * error.c (dump_expr): Use BV_FN.
1870 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1871 not an int.
1872 * method.c (make_thunk): Likewise.
1873 (emit_thunk): Rename to use_thunk. Allow callers to decide
1874 whether or not to actually emit the thunk. Adjust for changes in
1875 representation of vcall offsets.
1876 * search.c (dfs_get_pure_virtuals): Use BV_FN.
1877 * semantics.c (emit_associated_thunks): New function.
1878 (expand_body): Use it.
1879 * ir.texi: Adjust decriptions of thunks.
1880
1881 2000-06-22 Jason Merrill <jason@redhat.com>
1882
1883 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1884 (tsubst_friend_function): Copy it here.
1885
1886 * decl.c (grok_op_properties): Fix typo.
1887
1888 * decl2.c (delete_sanity): Clarify warning, avoid failure on
1889 deleting void*.
1890
1891 * pt.c (check_explicit_specialization): Clarify error.
1892
1893 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1894 an old OVERLOAD when we're declaring a non-function.
1895 (pushdecl, destroy_local_var): Check for error_mark_node.
1896 (warn_extern_redeclared_static): Also bail early if
1897 we're a CONST_DECL.
1898 (push_overloaded_decl): Ignore an old error_mark_node.
1899
1900 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
1901
1902 * call.c (build_x_va_arg): Check if in a template decl.
1903 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1904
1905 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
1906
1907 * class.c (push_lang_context): TYPE_NAME gets you to the Java
1908 types DECLs.
1909 * decl.c (check_goto): Computed gotos assumed OK.
1910
1911 2000-06-20 Jason Merrill <jason@redhat.com>
1912
1913 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
1914 for which we don't need to look for instantiations.
1915
1916 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
1917
1918 * parse.y (program): Always call finish_translation_unit.
1919 * parse.c, parse.h: Rebuilt.
1920
1921 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
1922
1923 * method.c: Don't include hard-reg-set.h.
1924
1925 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1926
1927 * rtti.c (get_base_offset): Cope when vbase field is in a base.
1928
1929 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
1930
1931 * call.c (build_conditional_expr): Use VOID_TYPE_P.
1932 * cvt.c (cp_convert_to_pointer): Likewise.
1933 (convert_to_void): Likewise.
1934 * error.c (dump_expr): Likewise.
1935 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1936 * init.c (build_delete): Likewise.
1937 * method.c (emit_thunk): Likewise.
1938 * optmize.c (declare_return_variable): Likewise.
1939 * rtti.c (get_tinfo_decl_dynamic): Likewise.
1940 (get_typeid): Likewise.
1941 (build_dynamic_cast_1): Likewise.
1942 * typeck.c (composite_pointer_type): Likewise.
1943 (common_type): Likewise.
1944 (build_indirect_ref): Likewise.
1945 (build_binary_op): Likewise.
1946 (build_x_compound_expr): Likewise.
1947 (check_return_expr): Likewise.
1948 * typeck2.c (add_exception_specifier): Likewise.
1949
1950 * mangle.c (write_method_parms): Use direct comparison for end
1951 of parmlist.
1952
1953 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
1954
1955 * cp-tree.h (genrtl_try_block): Declare function.
1956 (genrtl_handler): Likewise.
1957 (genrtl_catch_block): Likewise.
1958 (genrtl_ctor_stmt): Likewise.
1959 (genrtl_subobject): Likewise.
1960 (genrtl_decl_cleanup): Likewise.
1961 (genrtl_do_poplevel): Likewise.
1962 (genrtl_do_pushlevel): Likewise.
1963 (genrtl_clear_out_block): Likewise.
1964 (genrtl_goto_stmt): Likewise.
1965 (genrtl_expr_stmt): Likewise.
1966 (genrtl_decl_stmt): Likewise.
1967 (genrtl_if_stmt): Likewise.
1968 (genrtl_while_stmt): Likewise.
1969 (genrtl_do_stmt): Likewise.
1970 (genrtl_return_stmt): Likewise.
1971 (genrtl_for_stmt): Likewise.
1972 (genrtl_break_stmt): Likewise.
1973 (genrtl_continue_stmt): Likewise.
1974 (genrtl_scope_stmt): Likewise.
1975 (genrtl_switch_stmt): Likewise.
1976 (genrtl_case_label): Likewise.
1977 (genrtl_begin_compound_stmt): Likewise.
1978 (genrtl_finish_compound_stmt): Likewise.
1979 (genrtl_compound_stmt): Likewise.
1980 (genrtl_asm_stmt): Likewise.
1981 (genrtl_named_return_value): Likewise.
1982 (genrtl_begin_stmt_expr): Likewise.
1983 (genrtl_finish_stmt_expr): Likewise.
1984 (finish_for_stmt): Removed first argument.
1985 (finish_switch_stmt): Likewise.
1986
1987 * semantics.c (genrtl_try_block): Define function.
1988 (genrtl_handler): Likewise.
1989 (genrtl_catch_block): Likewise.
1990 (genrtl_ctor_stmt): Likewise.
1991 (genrtl_subobject): Likewise.
1992 (genrtl_decl_cleanup): Likewise.
1993 (genrtl_do_poplevel): Likewise.
1994 (genrtl_do_pushlevel): Likewise.
1995 (genrtl_clear_out_block): Likewise.
1996 (genrtl_goto_stmt): Likewise.
1997 (genrtl_expr_stmt): Likewise.
1998 (genrtl_decl_stmt): Likewise.
1999 (genrtl_if_stmt): Likewise.
2000 (genrtl_while_stmt): Likewise.
2001 (genrtl_do_stmt): Likewise.
2002 (genrtl_return_stmt): Likewise.
2003 (genrtl_for_stmt): Likewise.
2004 (genrtl_break_stmt): Likewise.
2005 (genrtl_continue_stmt): Likewise.
2006 (genrtl_scope_stmt): Likewise.
2007 (genrtl_switch_stmt): Likewise.
2008 (genrtl_case_label): Likewise.
2009 (genrtl_begin_compound_stmt): Likewise.
2010 (genrtl_finish_compound_stmt): Likewise.
2011 (genrtl_compound_stmt): Likewise.
2012 (genrtl_asm_stmt): Likewise.
2013 (genrtl_named_return_value): Likewise.
2014 (genrtl_begin_stmt_expr): Likewise.
2015 (genrtl_finish_stmt_expr): Likewise.
2016 (finish_for_stmt): Removed first argument and generate rtl
2017 specific code.
2018 (finish_switch_stmt): Likewise.
2019 (do_poplevel): Removed generate rtl specific code.
2020 (do_pushlevel): Likewise.
2021 (add_tree): Likewise.
2022 (finish_goto_stmt): Likewise.
2023 (finish_expr_stmt): Likewise.
2024 (begin_if_stmt): Likewise.
2025 (finish_if_stmt_cond): Likewise.
2026 (finish_then_clause): Likewise.
2027 (begin_else_clause): Likewise.
2028 (finish_else_clause): Likewise.
2029 (finish_if_stmt): Likewise.
2030 (clear_out_block): Likewise.
2031 (begin_while_stmt): Likewise.
2032 (finish_while_stmt_cond): Likewise.
2033 (finish_while_stmt): Likewise.
2034 (begin_do_stmt): Likewise.
2035 (finish_do_body): Likewise.
2036 (finish_do_stmt): Likewise.
2037 (finish_return_stmt): Likewise.
2038 (begin_for_stmt): Likewise.
2039 (finish_for_init_stmt): Likewise.
2040 (finish_for_cond): Likewise.
2041 (finish_for_expr): Likewise.
2042 (finish_break_stmt): Likewise.
2043 (finish_continue_stmt): Likewise.
2044 (begin_switch_stmt): Likewise.
2045 (finish_switch_cond): Likewise.
2046 (finish_case_label): Likewise.
2047 (begin_try_block): Likewise.
2048 (begin_function_try_block): Likewise.
2049 (finish_try_block): Likewise.
2050 (finish_cleanup_try_block): Likewise.
2051 (finish_cleanup): Likewise.
2052 (finish_function_try_block): Likewise.
2053 (finish_handler_sequence): Likewise.
2054 (finish_function_handler_sequence): Likewise.
2055 (begin_handler): Likewise.
2056 (finish_handler_parms): Likewise.
2057 (begin_catch_block): Likewise.
2058 (finish_handler): Likewise.
2059 (begin_compound_stmt): Likewise.
2060 (finish_compound_stmt): Likewise.
2061 (finish_asm_stmt): Likewise.
2062 (finish_label_stmt): Likewise.
2063 (finish_label_decl): Likewise.
2064 (finish_subobject): Likewise.
2065 (finish_decl_cleanup): Likewise.
2066 (finish_named_return_value): Likewise.
2067 (begin_stmt_expr): Likewise.
2068 (finish_stmt_expr): Likewise.
2069
2070 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
2071 to call genrtl_expr_stmt when appropriate.
2072
2073 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
2074 begin_compound_expr to call genrtl_begin_stmt_expr and
2075 genrtl_begin_compound_expr when appropriate.
2076 (finish_init_stmts): Changed calls to finish_compound_expr and
2077 finish_stmt_expr to call genrtl_finish_compound_expr and
2078 genrtl_finish_stmt_expr when appropriate.
2079 (expand_default_init): Changed call to finish_expr_stmt to call
2080 genrtl_expr_stmt when appropriate.
2081 (build_vec_init): Likewise.
2082
2083 * parse.y (simple_stmt): Removed first argument from call to
2084 finish_for_stmt. Removed first argument from call to
2085 finish_switch_stmt.
2086
2087 * parse.c: Regenerated.
2088
2089 * pt.c (tsubst_expr): Removed first argument from call to
2090 finish_for_stmt. Removed first argument from call to
2091 finish_switch_stmt.
2092
2093 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
2094
2095 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
2096 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
2097
2098 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
2099 (cplus_tree_code_length[]): Likewise.
2100 (cplus_tree_code_name[]): Likewise.
2101 (init_parse): Added call to add_c_tree_codes. Changed
2102 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
2103
2104 2000-06-16 Mark Mitchell <mark@codesourcery.com>
2105
2106 * cp-tree.h (finish_mem_initializers): Declare.
2107 (count_trees): Likewise.
2108 * parse.y (base_init): Use finish_mem_initializers.
2109 * semantics.c (finish_mem_initializers): New function.
2110
2111 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
2112 the number of trees.
2113 (n_trees): Remove.
2114 (count_trees): Don't use it.
2115
2116 2000-06-15 Jason Merrill <jason@redhat.com>
2117
2118 * tree.c (count_trees): New debugging function.
2119
2120 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
2121 * init.c (build_member_call): Pull out the name of a DECL.
2122
2123 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
2124 * semantics.c (expand_body): Push to TV_INTEGRATION here.
2125 * optimize.c (optimize_function): Not here.
2126 * pt.c (instantiate_decl): Push to TV_PARSE.
2127
2128 2000-06-15 Mark Mitchell <mark@codesourcery.com>
2129
2130 * cp-tree.h (struct language_function): Remove x_base_init_list
2131 and x_member_init_list.
2132 (current_base_init_list): Remove.
2133 (current_member_init_list): Likewise.
2134 (setup_vtbl_ptr): Change prototype.
2135 (emit_base_init): Likewise.
2136 (expand_member_init): Likewise.
2137 (reinit_parse_for_function): Remove.
2138 * decl.c (save_function_data): Don't clear x_base_init_list and
2139 x_member_init_list.
2140 (mark_language_function): Don't mark them.
2141 * init.c (perform_member_init): Tweak comment.
2142 (sort_member_init): Take the list of initializers as an argument.
2143 (sort_base_init): Likewise.
2144 (emit_base_init): Likewise.
2145 (expand_member_init): Return the initializer. Don't use global
2146 variables.
2147 * lex.c (reinit_parse_for_function): Remove.
2148 * method.c (build_template_parm_names): Correct substitution.
2149 (do_build_copy_constructor): Don't use current_member_init_list
2150 and current_base_init_list.
2151 (synthesize_method): Likewise.
2152 * parse.y (base_init): Split mem-initializers into
2153 base-initializers and field-initializers.
2154 (member_init_list): Build up the list here.
2155 (member_init): Return the initializer.
2156 (fn.depfn): Don't use reinit_parse_for_function.
2157 * parse.c: Regenerated.
2158 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
2159 ERROR_MARK.
2160 (tsubst_expr): Don't use current_member_init_list
2161 and current_base_init_list.
2162 (tsubst_expr_values): Rename to ...
2163 (tsubst_initializer_list): ... this. Use convert_from_reference.
2164 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
2165 and current_base_init_list.
2166 (begin_function_definition): Don't call reinit_parse_for_function.
2167
2168 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
2169
2170 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
2171 correctly.
2172
2173 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
2174
2175 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
2176
2177 * cp-tree.h (IF_COND): Move to c-common.h.
2178 (THEN_CLAUSE): Likewise.
2179 (ELSE_CLAUSE): Likewise.
2180 (WHILE_COND): Likewise.
2181 (WHILE_BODY): Likewise.
2182 (DO_COND): Likewise.
2183 (DO_BODY): Likewise.
2184 (RETURN_EXPR): Likewise.
2185 (EXPR_STMT_EXPR): Likewise.
2186 (FOR_INIT_STMT): Likewise.
2187 (FOR_COND): Likewise.
2188 (FOR_EXPR): Likewise.
2189 (FOR_BODY): Likewise.
2190 (SWITCH_COND): Likewise.
2191 (SWITCH_BODY): Likewise.
2192 (CASE_LOW): Likewise.
2193 (CASE_HIGH): Likewise.
2194 (GOTO_DESTINATION): Likewise.
2195 (COMPOUND_BODY): Likewise.
2196 (ASM_CV_QUAL): Likewise.
2197 (ASM_STRING): Likewise.
2198 (ASM_OUTPUTS): Likewise.
2199 (ASM_INPUTS): Likewise.
2200 (ASM_CLOBBERS): Likewise.
2201 (DECL_STMT_DECL): Likewise.
2202 (STMT_EXPR_STMT): Likewise.
2203 (LABEL_STMT_LABEL): Likewise.
2204 (SCOPE_BEGIN_P): Likewise.
2205 (SCOPE_END_P): Likewise.
2206 (SCOPE_STMT_BLOCK): Likewise.
2207 (SCOPE_NULLIFIED_P): Likewise.
2208 (SCOPE_NO_CLEANUPS_P): Likewise.
2209 (SCOPE_PARTIAL_P): Likewise.
2210 (ASM_VOLATILE_P): Likewise.
2211 (STMT_LINENO): Likewise.
2212 (STMT_LINENO_FOR_FN_P): Likewise.
2213
2214 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
2215 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
2216 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
2217 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
2218 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
2219
2220 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
2221
2222 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
2223 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
2224
2225 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
2226 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
2227 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
2228
2229 2000-06-14 Mark Mitchell <mark@codesourcery.com>
2230
2231 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
2232 * class.c (dfs_find_final_overrider): Set it appropriately.
2233 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
2234 avoid unneeded secondary vptrs.
2235
2236 2000-06-13 Jakub Jelinek <jakub@redhat.com>
2237
2238 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
2239 (check_bitfield_decl, check_field_decl): Likewise.
2240 (build_vtbl_or_vbase_field, build_base_field): Likewise.
2241 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
2242 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
2243 (xfer_tag, finish_enum): Likewise.
2244 * decl2.c (finish_builtin_type): Likewise.
2245 * init.c (init_init_processing): Likewise.
2246 * pt.c (instantiate_class_template): Likewise.
2247 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
2248 * cp-tree.h (struct lang_type): Add user_align member.
2249 (CLASSTYPE_USER_ALIGN): Define.
2250
2251 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2252
2253 * Make-lang.in (c++.install-common): Install g++-cross in
2254 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
2255 $(target_alias)-g++ and $(target_alias)-c++.
2256
2257 2000-06-12 Mark Mitchell <mark@codesourcery.com>
2258
2259 * class.c (vcall_offset_data_s): Add last_init and fns.
2260 (overrides): Rename to same_signature_p.
2261 (dfs_find_final_overrider): Adjust accordingly.
2262 (mark_overriders): Likewise.
2263 (warn_hidden): Likewise.
2264 (build_vtbl_initializer): Reorganize machinery for building things
2265 at negative offsets.
2266 (build_vcall_and_vbase_vtbl_entries): Likewise.
2267 (build_vbase_offset_vtbl_entries): Likewise.
2268 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
2269 offset entries. Do not create two entries for functions with the
2270 same signature.
2271 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
2272 (build_rtti_vtbl_entries): Reorganize machinery for building things
2273 at negative offsets.
2274
2275 * optimize.c (expand_call_inline): Don't recurse into the code
2276 used to initialize the parameters more than once.
2277
2278 2000-06-11 Mark Mitchell <mark@codesourcery.com>
2279
2280 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
2281 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
2282 (find_substitution): Only use the `Sa' substitution for
2283 std::allocator, not instantiations of it.
2284 (write_template_prefix): Move comment. Only use a TREE_LIST to
2285 represent substitutions for a member template.
2286 (write_array_type): Mangle array dimensions correctly.
2287 * optimize.c (maybe_clone_body): Copy more information from the
2288 cloned function.
2289 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
2290 on the regenerated declaration.
2291
2292 2000-06-11 Chip Salzenberg <chip@valinux.com>
2293 Mark Mitchell <mark@codesourcery.com>
2294
2295 * class.c (build_vtable): Clarify comment.
2296 (build_ctor_vtbl_group): Pass the most derived type to
2297 build_vtable.
2298
2299 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2300
2301 * decl2.c (compare_options): Don't needlessly cast away const-ness.
2302
2303 2000-06-10 Mark Mitchell <mark@codesourcery.com>
2304
2305 * decl.c (add_binding): Handle duplicate declarations of external
2306 variables.
2307
2308 2000-06-09 Chip Salzenberg <chip@valinux.com>
2309 Mark Mitchell <mark@codesourcery.com>
2310
2311 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
2312 argument.
2313 (write_signed_number): New macro.
2314 (write_unsigned_number): Likewise.
2315 (write_source_name): Use them.
2316 (write_number): Handle signed and unsigned values.
2317 (write_integer_cst): Use tree_int_cst_sgn, and use
2318 write_unsigned_number or write_signed_number as appropriate.
2319 (write_discriminator): Use write_unsigned_number or
2320 write_signed_number as appropriate.
2321 (write_template_arg_literal): Likewise.
2322 (write_array_type): Use tree_low_cst.
2323 (write_template_parm): Use write_unsigned_number or
2324 write_signed_number as appropriate.
2325 (write_substitution): Adjust call to write_number.
2326 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
2327 (write_expression): Handle non-type template arguments of
2328 reference type correctly.
2329 (mangle_thunk): Use write_signed_number.
2330
2331 2000-06-09 Chip Salzenberg <chip@valinux.com>
2332
2333 * mangle.c (find_substition): Don't mangle objects with typename
2334 substitutions (e.g. "cin" as "Si").
2335
2336 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
2337
2338 * call.c (add_candidate): Use ggc_alloc_cleared.
2339 * decl.c (lookup_label): Likewise.
2340 * lex.c (retrofit_lang_decl): Likewise.
2341
2342 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
2343
2344 * semantics.c (expand_body): Push to TV_EXPAND.
2345 * optimize.c (optimize_function): Push to TV_INTEGRATION.
2346 * decl.c (start_function): Always call announce_function.
2347
2348 * tinfo2.cc: Just declare abort.
2349
2350 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
2351
2352 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
2353 whenever @ is a symbolic name.
2354
2355 2000-06-08 Jakub Jelinek <jakub@redhat.com>
2356
2357 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
2358
2359 2000-06-07 Mark Mitchell <mark@codesourcery.com>
2360
2361 * decl.c (pushdecl): Look up functions by DECL_NAME, not
2362 DECL_ASSEMBLER_NAME.
2363
2364 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2365
2366 * decl2.c (c_language): Define.
2367
2368 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
2369
2370 * lex.c (lang_init_options): Tweak.
2371
2372 * decl2.c: Remove #inclusion of diagnostic.h
2373 (lang_decode_option): Move diagnostic formatting options to
2374 toplevel.
2375
2376 * lang-options.h: Remove documentation for diagnostic options.
2377
2378 * Makefile.in (lex.o): Depends upon diagnostic.h
2379
2380 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2381
2382 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
2383 the same DECL_RESULT, it's not a redefinition.
2384 * pt.c (tsubst_decl): Remove code to handle illegal
2385 specializations.
2386
2387 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
2388
2389 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
2390
2391 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
2392
2393 * search.c (maybe_suppress_debug_info): Don't check
2394 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
2395
2396 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
2397 here if extern_p.
2398
2399 Remember instantiation context in deferred instantiations.
2400 * cp-tree.h (struct tinst_level): Remove.
2401 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
2402 * pt.c (current_tinst_level): Now a tree.
2403 (print_template_context, push_tinst_level, pop_tinst_level,
2404 tinst_for_decl): Adjust.
2405 (reopen_tinst_level): New fn.
2406 (init_pt): Register current_tinst_level as a root.
2407 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
2408 of the pending templates list.
2409 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
2410 * lex.c (extract_interface_info): Adjust.
2411 * decl2.c (warn_if_unknown_interface): Adjust.
2412
2413 2000-06-05 Mark Mitchell <mark@codesourcery.com>
2414
2415 * class.c (indirect_primary_base_p): New function.
2416 (determine_primary_base): Use it.
2417
2418 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
2419
2420 Update new-abi dynamic cast algorithm.
2421 * tinfo.cc (__class_type_info::__dyncast_result): Add
2422 whole_details. Adjust constructor.
2423 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
2424 Avoid unnecessary searching.
2425 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
2426
2427 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2428
2429 * decl.c (init_decl_processing): Don't call record_component_aliases.
2430 * tree.c (build_cplus_array_type_1): Likewise.
2431
2432 2000-06-04 Mark Mitchell <mark@codesourcery.com>
2433
2434 * ir.texi: Correct typo.
2435 * mangle.c (write_expression): Handle non-type template arguments
2436 with reference type.
2437 * method.c (build_overload_value): Likewise.
2438 * pt.c (convert_nontype_argument): Explicitly represent conversion
2439 to a reference with an ADDR_EXPR.
2440 (unify): Always unify arguments in left-to-right order.
2441
2442 2000-06-03 Alex Samuel <samuel@codesourcery.com>
2443 Mark Mitchell <mark@codesourcery.com>
2444
2445 * Make-lang.in (CXX_SRCS): Add mangle.c.
2446 * Makefile.in (CXX_OBJS): Add mangle.o.
2447 (mangle.o): New rule.
2448
2449 * class.c (local_classes): New variable.
2450 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
2451 (get_vtt_name): Use mangle_vtt_name for new ABI.
2452 (init_class_processing): Initialize local_classes.
2453 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
2454 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
2455 (std_identifier): New macro.
2456 (DECL_VOLATILE_MEMFUNC_P): New macro.
2457 (DECL_NAMESPACE_STD_P): Likewise.
2458 (local_classes): Declare.
2459 (get_mostly_instantiated_function_type): Declare.
2460 (init_mangle): Declare.
2461 (mangle_decl): Likewise.
2462 (mangle_type_string): Likewise.
2463 (mangle_type): Likewise.
2464 (mangle_typeinfo_for_type): Likewise.
2465 (mangle_typeinfo_string_for_type): Likewise.
2466 (mangle_vtbl_for_type): Likewise.
2467 (mangle_vtt_for_type): Likewise.
2468 (mangle_ctor_vtbl_for_type): Likewise.
2469 (mangle_thunk): Likewise.
2470 (mangle_conv_op_name_for_type): Likewise.
2471 (mangle_guard_variable): Likewise.
2472 * decl.c (pushtag): Keep track of local classes.
2473 (initialize_predefined_identifiers): Initialize std_identifier.
2474 (init_decl_processing): Use std_identifier.
2475 (start_decl): Don't treat instantiations as specializations.
2476 (grokdeclarator): Likewise.
2477 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
2478 name for fully-instantiated templates.
2479 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
2480 destructors with the new ABI.
2481 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
2482 (grokfield): Use mangle_type for new ABI.
2483 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
2484 (get_sentry): Use mangle_guard_variable for new ABI.
2485 (start_static_initialization_or_destruction): Likewise.
2486 * expr.c (extract_aggr_init): Remove.
2487 (extract_scalar_init): Likewise.
2488 (extract_init): Remove #if 0'd code.
2489 * mangle.c: New function.
2490 * method.c (build_mangled_name): Assert not flag_new_abi.
2491 (build_static_name): Likewise.
2492 (build_decl_overload_real): Likewise.
2493 (build_typename_overload): Likewise.
2494 (build_overload_with_type): Likewise.
2495 (build_overload_name): Likewise.
2496 (get_ctor_vtbl_name): Likewise.
2497 (start_squangling): Likewise.
2498 (get_id_2): Likewise.
2499 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
2500 (init_method): Call init_mangle for new ABI.
2501 (make_thunk): Call mangle_thunk for new ABI.
2502 * operators.def: Correct new ABI manglings for the `%' operator.
2503 Add `::' operator.
2504 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
2505 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
2506 (lookup_template_class): Call mangle_decl for new ABI.
2507 (get_mostly_instantiated_function_type): New function.
2508 (set_mangled_name_for_template_decl): Use it.
2509 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
2510 the new ABI. Use mangle_conv_op_name_for_type for instantiated
2511 conversion op names.
2512 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
2513 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
2514 (tinfo_base_init): Likewise. Mangle typeinfo string name with
2515 mangle_typeinfo_string_for_type.
2516
2517 2000-06-03 Mark Mitchell <mark@codesourcery.com>
2518
2519 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
2520 (INNERMOST_TEMPLATE_ARGS): New macro.
2521 (innermost_args): Remove.
2522 (get_innermost_template_args): New function.
2523 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
2524 * error.c (dump_function_decl): Be caution when using
2525 most_general_template.
2526 * method.c (build_template_parm_names): Use
2527 INNERMOST_TEMPLATE_ARGS.
2528 * pt.c (add_to_template_args): Tidy comment
2529 (get_innermost_template_args): New function.
2530 (check_explicit_specialization): Clear DECL_INITIAL for a new
2531 specialization.
2532 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
2533 Tidy.
2534 (push_template_decl): Always register specializations of the most
2535 general template.
2536 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
2537 (coerce_template_parms): Likewise.
2538 (lookup_template_class): Likewise.
2539 (innermost_args): Remove.
2540 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
2541 (tsubst_decl): Handle tricky specializations. Use
2542 get_innermost_template_args.
2543 (instantiate_template): Simplify handling of partial
2544 instantiations.
2545 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
2546 (most_general_template): Reimplement, in a more straightforward
2547 manner.
2548 (regenerate_decl_from_template): Tweak formatting. Use
2549 TMPL_ARGS_DEPTH for clarity.
2550 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
2551
2552 * dump.c (dequeue_and_dump): Dump information about thunks.
2553
2554 2000-06-01 Richard Henderson <rth@cygnus.com>
2555
2556 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
2557
2558 2000-06-01 Richard Henderson <rth@cygnus.com>
2559
2560 * decl2.c (unsupported_options): Fix typo, make const.
2561 (lang_decode_option): Fix bsearch argument order.
2562
2563 2000-06-01 Mark Mitchell <mark@codesourcery.com>
2564
2565 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
2566 on FIELD_DECLs.
2567
2568 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2569
2570 * cp-tree.h (c_get_alias_set): Deleted.
2571 * Makefile.in (decl.o): Include ../expr.h.
2572 * decl.c (expr.h): Include.
2573 (init_decl_processing): Call record_component_aliases for arrays.
2574 (grokdeclarator): Likewise.
2575 Set TREE_ADDRESSABLE for fields that aren't bitfields.
2576 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
2577
2578 2000-05-31 Mark Mitchell <mark@codesourcery.com>
2579
2580 Remove guiding declaration support.
2581 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
2582 (flag_guiding_decls): Remove.
2583 * call.c (build_user_type_conversion_1): Remove support for
2584 guiding decls.
2585 (build_new_function_call): Likewise.
2586 (build_new_op): Likewise.
2587 (build_new_method_call): Likewise.
2588 * decl.c (start_function): Likewise.
2589 * friend.c (is_friend): Likewise.
2590 (do_friend): Likewise.
2591 * decl2.c ((flag_dump_translation_unit): Make it const.
2592 (flag_guiding_decls): Remove.
2593 (unsupported_options): New variable
2594 (compare_options): New function.
2595 (lang_decode_option): Use them.
2596
2597 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
2598
2599 * method.c (mangle_expression): Adjust test for legal expression
2600 operators.
2601
2602 * pt.c (instantiate_decl): Save and restore the local
2603 specializations list.
2604
2605 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
2606
2607 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
2608
2609 2000-05-30 Mark Mitchell <mark@codesourcery.com>
2610
2611 * call.c (add_template_candidate_real): Handle member template
2612 constructors for classes with virtual bases.
2613 (build_user_type_conversion_1): Use in_charge_arg_for_name.
2614 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
2615
2616 * ir.texi: Update thunk documentation.
2617
2618 * call.c (joust): Fix handling of overloaded builtin operators.
2619
2620 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
2621
2622 * cp-tree.h (DECL_ANTICIPATED): New macro.
2623 Document new use of DECL_LANG_FLAG_7.
2624 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
2625 in the user namespace.
2626 * lex.c (do_identifier): If the identifier's declaration has
2627 DECL_ANTICIPATED on, it has not yet been declared. But do not
2628 replace it with an ordinary implicit declaration.
2629
2630 * tinfo2.cc: Include stdlib.h.
2631
2632 2000-05-29 Mark Mitchell <mark@codesourcery.com>
2633
2634 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
2635 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
2636 CLASSTYPE_ALIGN.
2637
2638 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
2639
2640 * decl2.c (lang_decode_option): Use skip_leading_substring instead
2641 of plain strncmp.
2642
2643 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
2644
2645 * operators.def (<?): Duplicated, should have been...
2646 (>?): this. Fixed.
2647
2648 2000-05-27 Alex Samuel <samuel@codesourcery.com>
2649 Mark Mitchell <mark@codesourcery.com>
2650
2651 * cp-tree.h (ansi_opname): Make it a macro.
2652 (ansi_assopname): Likewise.
2653 (struct lang_decl_flags): Add assignment_operator_p.
2654 (struct lang_decl): Add operator_code.
2655 (DECL_VTT_PARM): Adjust.
2656 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
2657 overloaded operator.
2658 (SET_OVERLOADED_OPERATOR_CODE): New macro.
2659 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
2660 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
2661 (opname_tab): Remove.
2662 (assignop_tab): Likewise.
2663 (operator_name_info_t): New type.
2664 (operator_name_info): New variable.
2665 (assignment_operator_name_info): Likewise.
2666 (build_cp_library_fn): Remove declaration.
2667 (push_cp_library_fn): Likewise.
2668 (operator_name_string): Likewise.
2669 (build_decl_overload): Likewise.
2670 * call.c (print_z_candidates): Simplify.
2671 (build_object_call): Adjust usage of ansi_opname. Use
2672 DECL_OVERLOADED_OPERATOR_P.
2673 (op_error): Adjust operator name lookup.
2674 (build_conditional_expr): Adjust usage of ansi_opname.
2675 (build_new_op): Likewise.
2676 (build_op_delete_call): Likewise.
2677 (build_over_call): Likewise.
2678 (joust): Use DECL_OVERLOADED_OPERATOR_P.
2679 * decl.c (duplicate_decls): Copy operator_code.
2680 (init_decl_processing): Adjust parameters to push_cp_library_fn.
2681 (builtin_function): Adjust parameters to build_library_fn_1.
2682 (build_library_fn_1): Accept an overloaded operator code.
2683 (build_library_fn): Pass ERROR_MARK.
2684 (build_cp_library_fn): Accept an overloaded operator code.
2685 (push_cp_library_fn): Likewise.
2686 (grokfndecl): Tweak.
2687 (grokdeclarator): Simplify code to compute names of overloaded
2688 operators. Adjust use of ansi_opname.
2689 (ambi_op_p): Work on tree_codes, not identifiers.
2690 (unary_op_p): Likewise.
2691 (grok_op_properties): Likewise.
2692 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
2693 (lang_mark_tree): Don't try to mark the operator_code.
2694 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
2695 * error.c (dump_decl): Remove special handling for operator
2696 names.
2697 (dump_function_name): Likewise.
2698 (dump_expr): Adjust name lookup of operators.
2699 (op_to_string): Simplify.
2700 (assop_to_string): Likewise.
2701 * init.c (build_new_1): Adjust use of ansi_opname.
2702 * lex.c (opname_tab): Remove.
2703 (assignop_tab): Likewise.
2704 (ansi_opname): Likewise.
2705 (ansi_assopname): Likewise.
2706 (operator_name_string): Likewise.
2707 (reinit_lang_specific): Likewise.
2708 (operator_name_info): New variable.
2709 (assignment_operator_name_info): Likewise.
2710 (init_operators): New function.
2711 (init_parse): Use it.
2712 (do_identifier): Adjust use of ansi_opname.
2713 * method.c (mangle_expression): Don't use ansi_opname for
2714 mangling.
2715 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
2716 (build_decl_overload): Remove.
2717 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
2718 (do_build_assign_ref): Adjust use of ansi_opname.
2719 (synthesize_method): Likewise.
2720 (implicitly_declare_fn): Likewise.
2721 * operators.def: New file.
2722 * parse.y (operator): Adjust use of ansi_opname.
2723 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
2724 (set_mangled_name_for_template_decl): Don't play games with
2725 current_namespace.
2726 (special_function_p): Adjust use of ansi_opname.
2727 * typeck.c (check_return_expr): Likewise.
2728 * Make-lang.in (cc1plus): Depend on operators.def.
2729 * Makefile.in (lex.o): Likewise.
2730 (decl.o): Likewise.
2731
2732 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
2733
2734 * Make-lang.in (cplib2.ready): Eradicate.
2735
2736 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2737
2738 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2739 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2740 (built_min, cp_tree_equal): Likewise.
2741
2742 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2743
2744 * class.c (layout_nonempty_base_or_field): Replace
2745 `record_layout_info' with `record_layout_info_s'.
2746
2747 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
2748
2749 Fix goto checking.
2750 * cp-tree.h (struct language_function): x_named_labels is now
2751 a struct named_label_list*.
2752 * decl.c (struct named_label_use_list): Renamed from...
2753 (struct named_label_list): ...this. New struct.
2754 (push_binding_level): Don't set eh_region.
2755 (note_level_for_eh): New fn.
2756 (pop_label): Take label and old value directly.
2757 (pop_labels): Adjust for new named_labels format.
2758 (lookup_label): Likewise.
2759 (poplevel): Note characteristics of a binding level containing a
2760 named label. Mess with named label lists earlier.
2761 (mark_named_label_lists): New fn.
2762 (mark_lang_function): Call it.
2763 (use_label): New fn, split out from...
2764 (make_label_decl): ...here. Don't call it.
2765 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
2766 check_previous_gotos): New fns, split out from...
2767 (define_label): ...here.
2768 (check_switch_goto): New fn.
2769 (define_case_label): Call it.
2770 (check_goto): New fn.
2771 * semantics.c (finish_goto_stmt): Call it and use_label.
2772 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2773 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2774
2775 2000-05-26 Mark Mitchell <mark@codesourcery.com>
2776
2777 * class.c (build_vtable_entry_ref): Correct usage of
2778 get_vtbl_decl_for_binfo.
2779
2780 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2781 * method.c (implicitly_declare_fn): Not here.
2782
2783 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
2784
2785 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2786 (CPTI_PTMD_DESC_TYPE): ... here.
2787 (ptmd_desc_type_node): Rename to ...
2788 (ptm_desc_type_node): ... here.
2789 * decl.c: Likewise.
2790 * rtti.c (ptmd_initializer): Rename to ...
2791 (ptm_initializer): ... here.
2792 (sythesize_tinfo_var): Adjust. Deal with pointer to member
2793 function.
2794 (create_tinfo_types): Adjust.
2795
2796 2000-05-25 Mark Mitchell <mark@codesourcery.com>
2797
2798 Finish implementation of VTTs.
2799 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2800 CPTI_VTT_PARM_IDENTIFIER.
2801 (vtt_parm_identifier): New macro.
2802 (vtt_parm_type): Likewise.
2803 (BINFO_SUBVTT_INDEX): Likewise.
2804 (BINFO_VPTR_INDEX): Likewise.
2805 (struct lang_decl): Add vtt_parm.
2806 (DECL_VTT_PARM): New macro.
2807 (DECL_USE_VTT_PARM): Likewise.
2808 (DECL_NEEDS_VTT_PARM_P): Likewise.
2809 (get_vtt_name): Declare.
2810 (build_artifical_parm): Likewise.
2811 (fixup_all_virtual_upcast_offsets): Likewise.
2812 (expand_indirect_vtbls_init): Remove.
2813 * call.c (build_new_method_call): Pass the vtt to subobject
2814 constructors and destructors.
2815 * class.c (get_vtt_name): Give it external linkage.
2816 (build_clone): Handle the magic VTT parameters for clones.
2817 (clone_function_decl): Fix typo in comment.
2818 (build_vtt): Keep track of the indices in the VTTs where various
2819 entities are stored.
2820 (build_vtt_inits): Likewise.
2821 (dfs_build_vtt_inits): Likewise.
2822 (build_ctor_vtbl_group): Tweak type of construction vtables.
2823 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2824 primary bases, when building construction vtables.
2825 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2826 (initialize_predefined_identifiers): Add vtt_parm_identifier.
2827 (init_decl_processing): Initialize vtt_parm_type.
2828 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2829 (lang_mark_tree): Make vtt_parm.
2830 * decl2.c (build_artificial_parm): New function.
2831 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
2832 (grokclassfn): Use build_artificial_parm.
2833 * init.c (initialize_vtbl_ptrs): Call
2834 fixup_all_virtual_upcast_offsets directly.
2835 (perform_member_init): Use the complete subobject destructor for
2836 member cleanups.
2837 (build_vtbl_address): New function.
2838 (expand_virtual_init): Handle VTTs.
2839 * optimize (maybe_clone_body): Likewise.
2840 * search.c (fixup_all_virtual_upcast_offsets): Give it external
2841 linkage.
2842 (expand_indirect_vtbls_init): Remove.
2843 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2844 * tree.c (make_binfo): Make them bigger.
2845
2846 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2847
2848 * inc/cxxabi.h (__pbase_type_info): Define, based on
2849 __pointer_type_info.
2850 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2851 (__pointer_to_member_type_info): Likewise.
2852 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2853 (__pointer_to_member_type_info::__is_pointer_p): Remove.
2854 (__pointer_type_info::__do_catch): Rename to ...
2855 (__pbase_type_info::__do_catch): ... here. Adjust.
2856 (__pbase_type_info::__pointer_catch): Implement.
2857 (__pointer_type_info::__pointer_catch): Adjust.
2858 (__pointer_to_member_type_info::__pointer_catch): Adjust.
2859
2860 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
2861
2862 * tinfo.h (__user_type_info::contained_virtual_p): New
2863 predicate.
2864 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2865 shaped heirarchy.
2866 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2867 diamond shaped heirarchy. Add early out for mixed diamond and
2868 duplicate shaped heirarchy.
2869
2870 2000-05-24 Mark Mitchell <mark@codesourcery.com>
2871
2872 * cp-tree.h (build_delete): Change prototype.
2873 (build_vec_delete): Likewise.
2874 * call.c (build_scoped_method_call): Use special_function_kind
2875 values to indicate the kind of destruction to be done.
2876 (build_method_call): Likewise.
2877 * decl.c (finish_destructor_body): Likewise.
2878 (maybe_build_cleanup_1): Likewise. Rename to ...
2879 (maybe_build_cleanup): ... this.
2880 * decl2.c (delete_sanity): Use special_function_kind
2881 values to indicate the kind of destruction to be done.
2882 (build_cleanup): Likewise.
2883 * init.c (perform_member_init): Likewise.
2884 (build_vec_delete_1): Likewise.
2885 (build_dtor_call): Simplify.
2886 (build_delete): Use special_function_kind
2887 values to indicate the kind of destruction to be done.
2888 (build_vbase_delete): Likewise.
2889 (build_vec_delete): Likewise.
2890
2891 * init.c (sort_member_init): Fix typo in error message generation
2892 code.
2893
2894 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
2895
2896 * semantics.c (begin_class_definition): make the packed
2897 attribute be sensitive to the "-fpack-struct" command line flag
2898
2899 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
2900
2901 Update new-abi upcast algorithm.
2902 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2903 prototype and meaning of return value.
2904 (__si_class_type_info::__do_upcast): Likewise.
2905 (__vmi_class_type_info::__do_upcast): Likewise.
2906 * tinfo.cc (__class_type_info::__upcast_result): Replace
2907 whole2dst with part2dst. Adjust ctor.
2908 (__class_type_info::__do_upcast): Adjust call of worker function.
2909 (__class_type_info::__do_upcast): Adjust.
2910 (__si_class_type_info::__do_upcast): Adjust. Use parent's
2911 __do_upcast.
2912 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2913 virtual base in diamond heirarchy bug.
2914
2915 2000-05-23 Mark Mitchell <mark@codesourcery.com>
2916
2917 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2918 and bitfield to tinfo_fn_p.
2919 (DECL_TINFO_FN_P): Adjust.
2920 (SET_DECL_TINFO_FN_P): Likewise.
2921 (DECL_MUTABLE_P): Likewise.
2922 (DECL_C_BIT_FIELD): Likewise.
2923 (SET_DECL_C_BIT_FIELD): Likewise.
2924 (CLEAR_DECL_C_BIT_FIELD): Likewise.
2925 (DECL_UNINLINABLE): Likewise.
2926 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2927 (handle_using_decl): Remove assertion.
2928 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2929 to build FIELD_DECLs.
2930 (build_base_field): Likewise.
2931 (layout_class_type): Likewise.
2932 * decl.c (init_decl_processing): Likewise.
2933 (build_ptrmemfunc_type): Likewise.
2934 (grokdeclarator): Likewise.
2935 * decl2.c (grok_x_components): Likewise.
2936 * except.c (call_eh_info): Likewise.
2937 * init.c (init_init_processing): Likewise.
2938 * rtti.c (expand_class_desc): Likewise.
2939 (create_pseudo_type_info): Likewise.
2940 (get_vmi_pseudo_type_info): Likewise.
2941 (create_tinfo_types): Likewise.
2942 * ptree.c (print_lang_decl): Adjust.
2943 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2944 before checking DECL_MUTABLE_P.
2945
2946 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2947 parameters for template functions.
2948 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2949 destructors as well as constructors.
2950
2951 2000-05-22 Mark Mitchell <mark@codesourcery.com>
2952
2953 * class.c (build_ctor_vtbl_group): Set inits.
2954 * optimize.c (maybe_clone_body): Set DECL_INLINE and
2955 DECL_THIS_INLINE appropriately for clones.
2956
2957 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2958 (DECL_CONV_FN_P): Simplify.
2959 (DECL_OPERATOR): Remove.
2960 (language_to_string): Declare.
2961 * decl.c (duplicate_decls): Fix typo in comment.
2962 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2963 (grok_op_properties): Use DECL_CONV_FN_P instead of
2964 IDENTIFIER_TYPENAME_P.
2965 * dump.c (dequeue_and_dump): Dump the language linkage of
2966 declarations.
2967 * error.c (language_to_string): Give it external linkage.
2968 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2969 (implicitly_declare_fn): Set DECL_LANGUAGE.
2970 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2971 IDENTIFIER_TYPENAME_P.
2972 (tsubst_decl): Likewise.
2973 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2974 * semantics.c (finish_member_declaration): Don't mark members of
2975 classes declared in an extern "C" region as extern "C".
2976
2977 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2978
2979 * decl2.c (qualified_lookup_using_namespace): Look through
2980 namespace aliases.
2981
2982 * decl.c (push_using_decl): Return the old decl on namespace level.
2983
2984 2000-05-21 Mark Mitchell <mark@codesourcery.com>
2985
2986 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2987 (VTT_NAME_PREFIX): New macro.
2988 (CTOR_VTBL_NAME_PREFIX): Likewise.
2989 (get_ctor_vtbl_name): New function.
2990 * class.c (get_vtable_name): Simplify.
2991 (get_vtt_name): New function.
2992 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2993 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2994 when a virtual base becomes primary.
2995 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
2996 VTTs.
2997 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2998 additional parameters.
2999 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
3000 (initialize_array): New function.
3001 (build_vtt): Likewise.
3002 (build_vtt_inits): Likewise.
3003 (dfs_build_vtt_inits): Likewise.
3004 (dfs_fixup_binfo_vtbls): Likewise.
3005 (build_ctor_vtbl_group): Likewise.
3006 (initialize_vtable): Use initialize_array.
3007 (accumulate_vtbl_inits): Reimplement to handle construction
3008 vtables.
3009 (dfs_accumulate_vtbl_inits): Likewise.
3010 (bulid_vtbl_initializer): Adjust parameter name.
3011 * method.c (build_typename_overload): Remove #if 0'd code.
3012 (get_ctor_vtbl_name): New function.
3013 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
3014 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
3015
3016 * cp-tree.h (struct lang_type): Remove search_slot.
3017 (CLASSTYPE_SEARCH_SLOT): Remove.
3018 (emit_base_init): Change prototype.
3019 (initialize_vtbl_ptrs): Likewise.
3020 (expand_indirect_vtbls_init): Likewise.
3021 (clear_search_slots): Remove.
3022 * decl.c (lang_mark_tree): Don't mark search_slot.
3023 * init.c (initialize_vtbl_ptrs): Simplify.
3024 (emit_base_init): Likewise.
3025 * search.c (struct vbase_info): Document decl_ptr.
3026 (convert_pointer_to_single_level): Remove.
3027 (dfs_find_vbases): Remove.
3028 (dfs_init_base_pointers): Simplify.
3029 (dfs_clear_vbase_slots): Remove.
3030 (dfs_vtable_path_unmark): New function.
3031 (init_vbase_pointers): Simplify.
3032 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
3033 (expand_indirect_vtbls_init): Simplify. Don't call
3034 mark_all_temps_used.
3035 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
3036 initialize_vtbl_ptrs.
3037
3038 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
3039
3040 * except.c: Add static prototypes.
3041
3042 2000-05-20 H.J. Lu <hjl@gnu.org>
3043
3044 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
3045
3046 2000-05-19 Mark Mitchell <mark@codesourcery.com>
3047
3048 Don't create a separate copy of virtual bases for the
3049 CLASSTYPE_VBASECLASSES list.
3050 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
3051 (BINFO_FOR_VBASE): Remove.
3052 (CANONICAL_BINFO): Adjust.
3053 (binfo_for_vbase): New function.
3054 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
3055 instead of BINFO_FOR_VBASE.
3056 (build_vbase_pointer): Likewise.
3057 (build_secondary_vtable): Likewise.
3058 (dfs_mark_primary_bases): Likewise.
3059 (mark_primary_bases): Likewise.
3060 (layout_nonempty_base_or_field): Likewise.
3061 (dfs_set_offset_for_shared_vbases): Likewise.
3062 (dfs_set_offset_for_unshared_vbases): Likewise.
3063 (layout_virtual_bases): Likewise. Adjust for changes to the
3064 CLASSTYPE_VBASECLASSES list.
3065 (dump_class_hierarchy_r): Use binfo_for_vbase
3066 instead of BINFO_FOR_VBASE.
3067 (dump_class_hierarchy): Likewise.
3068 (finish_vtbls): Likewise.
3069 (build_vtbl_initializer): Adjust for changes to the
3070 CLASSTYPE_VBASECLASSES list.
3071 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
3072 * decl.c (finish_destructor_body): Adjust for changes to the
3073 CLASSTYPE_VBASECLASSES list.
3074 * init.c (sort_base_init): Use binfo_for_vbase.
3075 (construct_virtual_bases): Adjust for changes to the
3076 CLASSTYPE_VBASECLASSES list.
3077 (expand_member_init): Use binfo_for_vbase.
3078 (build_vbase_delete): Adjust for changes to the
3079 CLASSTYPE_VBASECLASSES list.
3080 * method.c (do_build_copy_constructor): Likewise.
3081 * rtti.c (get_base_offset): Use binfo_for_vbase.
3082 (expand_class_desc): Remove #if 0'd code.
3083 * search.c (struct vbase_info): Remove vbase_types.
3084 (get_base_distance): Use binfo_for_vbase.
3085 (lookup_field_queue_p): Use CANONICAL_BINFO.
3086 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
3087 (get_pure_virtuals): Adjust for changes to the
3088 CLASSTYPE_VBASECLASSES list.
3089 (dfs_find_vbases): Use binfo_for_vbase.
3090 (dfs_init_vbase_pointers): Likewise.
3091 (init_vbase_pointers): Don't initialize vi.vbase_types.
3092 (virtual_context): Use binfo_for_vbase.
3093 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
3094 CLASSTYPE_VBASECLASSES list.
3095 (expand_indirect_vtbls_init): Simplify.
3096 (dfs_get_vbase_types): Don't replicate virtual bases.
3097 (find_vbase_instance): Use binfo_for_vbase.
3098 (binfo_for_vbase): New function.
3099 * typeck.c (get_delta_difference): Use binfo_for_vbase.
3100
3101 2000-05-17 Mark Mitchell <mark@codesourcery.com>
3102
3103 * decl2.c (finish_anon_union): Generalize error messages to handle
3104 anonymous structures.
3105 * init.c (perform_member_init): Remove `name' parameter.
3106 (build_field_list): New function.
3107 (sort_member_init): Handle anonymous union initialization order
3108 correctly. Check for multiple initializations of the same union.
3109 (emit_base_init): Don't look up fields by name here.
3110 (expand_member_init): Record the result of name lookup for future
3111 reference.
3112 * typeck.c (build_component_ref): Fix formatting.
3113
3114 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
3115
3116 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
3117 * typeck.c (build_x_compound_expr): Replace warn_unused with
3118 warn_unused_value.
3119
3120 * decl2.c (lang_decode_option): Update -Wall unused flags by
3121 calling set_Wunused.
3122
3123 2000-05-16 Mark Mitchell <mark@codesourcery.com>
3124
3125 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
3126 * init.c (dfs_vtable_path_unmark): Remove.
3127 * search.c (marked_new_vtable_p): Likewise.
3128 (unmarked_new_vtable_p): Likewise.
3129 (dfs_search_slot_nonempty_p): Likewise.
3130 (dfs_mark): Likewise.
3131 (dfs_vtable_path_unmark): Likewise.
3132 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
3133 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
3134 (dfs_init_vbase_pointers): Remove special-case new ABI code.
3135 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
3136 (init_vbase_pointers): Simplify.
3137 (expand_indirect_vtbls_init): Likewise.
3138
3139 * class.c (copy_virtuals): New function.
3140 (build_primary_table): Use it.
3141 (build_secondary_vtable): Likewise.
3142 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
3143 indicate that no vcall offset is required.
3144 (add_virtual_function): Likewise.
3145 (modify_all_vtables): Likewise.
3146 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3147 (dfs_accumulate_vtbl_inits): Likewise.
3148 (build_vtbl_initializer): Make changes to handle construction
3149 vtables.
3150 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3151 (build_rtti_vtbl_entries): Likewise.
3152 (build_vtable_entries): Handle a NULL vcall_index.
3153
3154 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
3155
3156 * decl2.c (lang_decode_option): Fix thinko.
3157
3158 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
3159
3160 * except.c (check_handlers): New fn.
3161 * cp-tree.h: Declare it.
3162 * semantics.c (finish_handler_sequence): Call it.
3163 (finish_function_handler_sequence): Likewise.
3164 (finish_handler_parms): Set TREE_TYPE on the handler.
3165 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
3166 * search.c (get_base_distance_recursive): If protect>1, ignore
3167 special access.
3168 (get_base_distance): Don't reduce watch_access.
3169
3170 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
3171
3172 * lex.c: #include diagnostic.h.
3173 (lang_init_options): Set default prefixing rules.
3174
3175 * lang-options.h: Add -fdiagnostics-show-location=.
3176
3177 * decl2.c: #include diagnostic.h.
3178 (lang_decode_option): Handle -fdiagnostics-show-location=.
3179
3180 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
3181
3182 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
3183 * vec.cc: Revert my 2000-05-07 change.
3184
3185 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
3186
3187 * class.c (check_field_decls): Complain about non-static data
3188 members with same name as class in class with constructor.
3189
3190 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
3191
3192 * decl.c (grokdeclarator): Allow non-static data members with
3193 same name as class.
3194
3195 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3196
3197 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
3198 and pending_inline.filename. Update prototypes.
3199 * decl.c (define_label): Constify filename parameter.
3200 * decl2.c (warn_if_unknown_interface): Constify local char *.
3201 * input.c Constify input_source.filename. Don't declare
3202 input_filename or lineno. Constify filename parameter to feed_input.
3203 * lex.c (init_parse): Constify parameter and return value.
3204 (cp_pragma_interface, cp_pragma_implementation): Constify
3205 filename argument.
3206 (reinit_parse_for_method, reinit_parse_for_block,
3207 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
3208 Constify local char *.
3209 * pt.c: Don't declare lineno or input_filename.
3210 (print_template_context, tsubst_friend_function, tsubst_decl,
3211 tsubst, instantiate_decl): Constify local char *.
3212 * semantics.c (expand_body): Constify local char *.
3213 * tree.c (build_srcloc): Constify filename parameter.
3214 * typeck.c (c_expand_asm_operands): Constify filename
3215 parameter.
3216
3217 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
3218
3219 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
3220 offsetof expansion.
3221
3222 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
3223
3224 * inc/cxxabi.h: Fix typos in comment.
3225 (__base_class_info::__offset): Use a static_cast.
3226
3227 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
3228
3229 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
3230 of std::size_t and std::ptrdiff_t respectively.
3231 * tinfo.cc: Likewise.
3232 * vec.cc: Likewise.
3233
3234 2000-05-06 Richard Henderson <rth@cygnus.com>
3235
3236 * typeck.c (build_c_cast): Don't warn integer->pointer size
3237 mismatch for constants.
3238
3239 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
3240
3241 * rtti.c (ptmd_initializer): Set non-public, if class is
3242 incomplete.
3243
3244 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
3245 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3246 __cxa_vec_delete): Likewise.
3247 * tinfo.cc (__dynamic_cast): Likewise.
3248 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3249 __cxa_vec_delete): Likewise.
3250
3251 2000-05-04 Mark Mitchell <mark@codesourcery.com>
3252
3253 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
3254 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
3255 (lang_decl_flags): Add vcall_offset.
3256 (THUNK_VCALL_OFFSET): Use it.
3257 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
3258 * method.c (make_thunk): Create the lang_decl here, not in
3259 emit_thunk.
3260 (emit_thunk): Make generic thunks into ordinary functions once
3261 they have been fed to expand_body.
3262 * semantics.c (expand_body): Set current_function_is_thunk here.
3263
3264 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3265
3266 * class.c (update_vtable_entry_for_fn): Prototype.
3267
3268 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
3269 and `tmpl'.
3270
3271 * search.c (dfs_build_inheritance_graph_order): Prototype.
3272
3273 2000-05-04 Mark Mitchell <mark@codesourcery.com>
3274
3275 * cp-tree.h (special_function_kind): Add various kinds of
3276 destructors.
3277 (special_function_p): New function.
3278 * class.c (overrides): Don't let one kind of destructor override
3279 another.
3280 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
3281 whether or not to instantiate a template.
3282 * tree.c (special_function_p): Define.
3283
3284 2000-05-03 Mark Mitchell <mark@codesourcery.com>
3285
3286 * cp-tree.def (THUNK_DECL): Remove.
3287 * cp-tree.h (DECL_THUNK_P): New macro.
3288 (DECL_NON_THUNK_FUNCTION_P): Likewise.
3289 (DECL_EXTERN_C_FUNCTION_P): Likewise.
3290 (SET_DECL_THUNK_P): Likewise.
3291 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
3292 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
3293 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
3294 * decl.c (decls_match): Use DECL_EXTERN_C_P.
3295 (duplicate_decls): Likewise.
3296 (pushdecl): Likewise. Adjust thunk handling.
3297 (grokfndecl): Use DECL_EXTERN_C_P.
3298 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
3299 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
3300 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
3301 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
3302 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
3303 DECL_NO_STATIC_CHAIN.
3304 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
3305 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
3306 * search.c (covariant_return_p): Remove THUNK_DECL handling.
3307 * ir.texi: Update.
3308
3309 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
3310
3311 * tree.c (walk_tree): Set lineno.
3312
3313 2000-05-01 Mark Mitchell <mark@codesourcery.com>
3314
3315 * exception.cc: Update license notice.
3316 * new.cc: Likewise.
3317 * new1.cc: Likewise.
3318 * new2.cc: Likewise.
3319 * tinfo.cc: Likewise.
3320 * tinfo2.cc: Likewise.
3321 * vec.cc: Likewise.
3322 * inc/cxxabi.h: Likewise.
3323 * inc/exception: Likewise.
3324 * inc/new: Likewise.
3325 * inc/new.h: Likewise.
3326 * inc/typeinfo: Likewise.
3327
3328 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
3329
3330 * tree.c (build_target_expr_with_type): If we already have a
3331 TARGET_EXPR, just return it.
3332
3333 * optimize.c (initialize_inlined_parameters): Don't generate an
3334 EXPR_STMT if we can just use DECL_INITIAL.
3335 * decl.c (emit_local_var): Only make the initialization a
3336 full-expression if stmts_are_full_exprs_p.
3337
3338 2000-05-01 Mark Mitchell <mark@codesourcery.com>
3339
3340 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
3341 macro.
3342 * call.c (standard_conversion): Use it.
3343 (direct_reference_binding): Likewise.
3344 (build_over_call): Likewise.
3345 (is_properly_derived_from): Likewise.
3346 (compare_ics): Likewise.
3347 * class.c (resolves_to_fixed_type_p): Likewise.
3348 * optimize.c (declare_return_variable): Likewise.
3349 * pt.c (is_specialization_of): Likewise.
3350 (unify): Likewise.
3351 * typeck.c (comp_target_parms): Likeiwse.
3352 (build_static_cast): Likewise.
3353 (build_reinterpret_cast): Likewise.
3354 (build_const_cast): Likewise.
3355 (comp_ptr_ttypes_real): Likewise.
3356 (comp_ptr_ttypes_const): Likewise.
3357 * typeck2.c (process_init_constructor): Likewise.
3358
3359 2000-04-30 Scott Snyder <snyder@fnal.gov>
3360
3361 * decl.c (finish_destructor_body): Use the base destructor when
3362 destroying virtual bases.
3363
3364 2000-04-30 Mark Mitchell <mark@codesourcery.com>
3365
3366 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
3367 STMT_EXPRs.
3368 * optimize.c (struct inline_data): Add target_exprs field.
3369 (declare_return_variable): When a function returns an aggregate,
3370 use the variable declared in the TARGET_EXPR as the remapped
3371 DECL_RESULT.
3372 (expand_call_inline): Update the pending target_exprs stack.
3373 (optimize_function): Initialize the stack.
3374
3375 * decl2.c (finish_file): Fix typo in comment.
3376
3377 * method.c (emit_thunk): Don't try to return a `void' value.
3378
3379 * optimize.c (initialize_inlined_parameters): If the parameter is
3380 addressable, we need to make a new VAR_DECL, even if the
3381 initializer is constant.
3382
3383 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
3384
3385 * decl.c (grok_op_properties): Add an extra check of argtypes.
3386
3387 2000-04-27 Mark Mitchell <mark@codesourcery.com>
3388
3389 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
3390 variables.
3391 (initialize_inlined_parameters): Try to avoid creating new
3392 VAR_DECLs.
3393
3394 2000-04-27 Alex Samuel <samuel@codesourcery.com>
3395
3396 * lex.c (my_get_run_time): Remove.
3397 (init_filename_times): Use get_run_time instead of my_get_run_time.
3398 (check_newline): Likewise.
3399 (dump_time_statistics): Likewise.
3400 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
3401 of computing elapsed time explicitly.
3402
3403 2000-04-26 Mark Mitchell <mark@codesourcery.com>
3404
3405 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
3406 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
3407 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
3408 before calling decl_constant_value.
3409 * class.c (check_bitfield_decl): Likewise.
3410 * cvt.c (ocp_convert): Likewise.
3411 (convert): Likewise.
3412 * decl.c (compute_array_index_type): Likewise.
3413 (build_enumerator): Likewise.
3414 * decl2.c (check_cp_case_value): Likewise.
3415 * pt.c (convert_nontype_argument): Likewise.
3416 (tsubst): Likewise.
3417 * typeck.c (decay_conversion): Likewise.
3418 (build_compound_expr): Likewise.
3419 (build_reinterpret_cast): Likewise.
3420 (build_c_cast): Likewise.
3421 (convert_for_assignment): Likewise.
3422
3423 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
3424
3425 * decl.c (finish_function): Don't play games with DECL_INLINE.
3426
3427 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
3428
3429 * ir.texi: Correct typo.
3430
3431 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3432
3433 * decl.c (grokdeclarator): Reject VLAs as members.
3434
3435 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
3436
3437 * call.c (standard_conversion): Accept conversion between
3438 COMPLEX_TYPEs.
3439
3440 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
3441
3442 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
3443
3444 * decl2.c (finish_file): Remove double setup for accounting
3445 compile time.
3446
3447 2000-04-24 Robert Lipe <robertlipe@usa.net>
3448
3449 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
3450
3451 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
3452
3453 * new.cc (set_new_handler): Needs to be in std::.
3454
3455 2000-04-23 Mark Mitchell <mark@codesourcery.com>
3456
3457 * cp-tree.h (lang_decl): Remove pretty_function_p.
3458 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
3459 language-specific node.
3460 * decl.c (cp_make_fname_decl): Use build_decl, not
3461 build_lang_decl, to build the variables.
3462 (grokvardecl): Don't call build_lang_decl for local variables in
3463 templates.
3464 (grokdeclarator): Don't call build_lang_decl for local type
3465 declarations in templates.
3466 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
3467 zero'd memory, rather than calling memset.
3468 * pt.c: Include hashtab.h.
3469 (local_specializations): New variable.
3470 (retrieve_local_specialization): Use it.
3471 (register_local_specialization): Likewise.
3472 (tsubst_decl): Don't assume local variables have
3473 DECL_LANG_SPECIFIC.
3474 (instantiate_decl): Set up local_specializations.
3475 * Makefile.in (HTAB_H): New variable.
3476
3477 2000-04-23 Richard Henderson <rth@cygnus.com>
3478
3479 * typeck.c (c_expand_asm_operands): Restore the original
3480 contents of the output list.
3481
3482 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
3483
3484 * ir.texi: Document complex number representation.
3485
3486 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
3487
3488 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
3489 (target_incomplete_p): New function.
3490 (tinfo_base_init): Create comdat NTBS name variable.
3491 (ptr_initializer): Add non_public parameter. Calculate it.
3492 (ptmd_initializer): Likewise.
3493 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
3494 (create_real_tinfo_var): Add non_public parameter. Use it.
3495 Push proxy into global namespace.
3496 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
3497 New enumeration.
3498 * inc/typeinfo (type_info::before, type_info::operator==):
3499 Compare __name addresses.
3500
3501 * tinfo2.cc: Remove new-abi builtins comment.
3502
3503 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
3504
3505 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
3506
3507 * call.c (joust): Exit early if we get the same function, too.
3508
3509 * decl2.c (key_method): Return NULL_TREE for template classes.
3510 (import_export_class): Don't need to check for template classes.
3511
3512 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
3513
3514 * lex.c: Remove references to cccp.c.
3515
3516 2000-04-18 Mark Mitchell <mark@codesourcery.com>
3517
3518 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
3519 volatile_memfunc. Add destructor_attr. Adjust dummy.
3520 (DECL_DESTRUCTOR_P): Use destructor_attr.
3521 (DECL_CONST_MEMFUNC_P): Reimplement.
3522 (DECL_VOLATILE_MEMFUNC_P): Remove.
3523 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
3524 (overrides): Use DECL_DESTRUCTOR_P.
3525 (check_for_override): Likewise.
3526 * decl.c (start_function): Likewise.
3527 * decl2.c (grokfclassfn): Likewise.
3528 (check_classfn): Likewise.
3529 (grok_function_init): Likewise.
3530
3531 2000-04-17 Mark Mitchell <mark@codesourcery.com>
3532
3533 * decl2.c (grokfield): Issue error on illegal data member
3534 declaration.
3535
3536 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
3537
3538 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
3539
3540 2000-04-16 Mark Mitchell <mark@codesourcery.com>
3541
3542 * class.c (build_vtable_entry): Don't build thunks for type-info
3543 functions.
3544
3545 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
3546
3547 * decl.c (decls_match): Allow a redeclaration of a builtin to
3548 specify args while the builtin did not.
3549
3550 2000-04-15 Mark Mitchell <mark@codesourcery.com>
3551
3552 * cp-tree.def (THUNK_DECL): Add to documentation.
3553 * cp-tree.h (flag_huge_objects): Declare.
3554 * class.c (modify_vtable_entry): Tidy.
3555 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
3556 Calculate delta appropriately for the new ABI.
3557 (dfs_modify_vtables): Use it.
3558 (modify_all_vtables): Fix thinko in code to add overriding copies
3559 of functions to primary vtables.
3560 (build_clone): Fix typo in comment.
3561 (clone_function_decl): Correct order of destructors in vtable.
3562 (build_vbase_offset_vtbl_entries): Adjust comment.
3563 (dfs_vcall_offset_queue_p): Remove.
3564 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
3565 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
3566 (build_vtable_entry): Correct check for pure virtual functions.
3567 Don't declare flag_huge_objects.
3568 * decl.c (flag_huge_objects): Remove declaration.
3569 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
3570 Use int_size_in_bytes.
3571 (emit_thunk): Handle vcall offset thunks.
3572
3573 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3574
3575 * decl2.c (parse_time, varconst_time): Delete declarations.
3576 (finish_file): Delete LINENO declaration.
3577 START_TIME and THIS_TIME now long.
3578
3579 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
3580
3581 * class.c (build_base_field): Reformat comment.
3582
3583 * inc/cxxabi.h (stddef.h): Comment inclusion.
3584 (__base_class_info::__offset): Comment shift.
3585
3586 2000-04-12 Mark Mitchell <mark@codesourcery.com>
3587
3588 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
3589 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
3590 (cp_push_exception_identifier): New macro.
3591 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
3592 (DECL_BASE_DESTRUCTOR_P): Likewise.
3593 (DECL_DELETING_DESTRUCTOR_P): Likewise.
3594 (get_vtbl_decl_for_binfo): Fix formatting.
3595 (in_charge_arg_for_name): New macro.
3596 (maybe_build_cleanup_and_delete): Remove declaration.
3597 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
3598 (in_charge_arg_for_name): New function.
3599 (build_new_method_call): Use it. Handle cloned destructors.
3600 (build_clone): Don't make the base constructor virtual.
3601 Automatically defer generated functions.
3602 (clone_function_decl): Handle destructors, too.
3603 (clone_constructors_and_destructors): Likewise.
3604 (create_vtable_ptr): Don't create a vtable entry for a cloned
3605 function.
3606 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
3607 (initialize_predefined_identifiers): Update appropriately.
3608 (finish_destructor_body): Simplify.
3609 (maybe_build_cleanup_and_delete): Remove.
3610 * except.c (expand_throw): Handle new-ABI destructors.
3611 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
3612 (build_dtor_call): New function.
3613 (build_delete): Use it. Simplify.
3614 * optimize.c (maybe_clone_body): Handle destructors.
3615 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
3616
3617 * exception.cc (cleanup_fn): New typedef.
3618 (CALL_CLEANUP): New macro.
3619 (cp_eh_info): Use them.
3620 (__cp_push_exception): Likewise.
3621 (__cp_pop_exception): Likewise.
3622
3623 2000-04-11 Mark Mitchell <mark@codesourcery.com>
3624
3625 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
3626 (complete_dtor_identifier): New macro.
3627 (CLASSTYPE_FIRST_CONVERSION): Remove.
3628 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
3629 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
3630 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
3631 (CLASSTYPE_CONSTRUCTORS): Likewise.
3632 (CLASSTYPE_DESTRUCTORS): Likewise.
3633 (lang_decl): Add cloned_function.
3634 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
3635 (DECL_BASE_CONSTRUCTOR_P): Likewise.
3636 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
3637 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
3638 (DECL_CLONED_FUNCTION_P): Likewise.
3639 (DECL_CLONED_FUNCTION): Likewise.
3640 (clone_function_decl): Declare.
3641 (maybe_clone_body): Likewise.
3642 * call.c (build_user_type_conversion_1): Call complete object
3643 constructors in the new ABI.
3644 (build_new_method_call): Don't add in-charge parameters under the
3645 new ABI.
3646 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
3647 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
3648 CLASSTYPE_DESTRUCTOR_SLOT.
3649 (build_clone): New function.
3650 (clone_function_decl): Likewise.
3651 (clone_constructors_and_destructors): Likewise.
3652 (check_bases_and_members): Use it.
3653 * decl.c (iniitialize_predefined_identifiers): Initialize
3654 complete_dtor_identifier.
3655 (finish_function): Don't add extra code to a clone.
3656 (lang_mark_tree): Mark cloned_function.
3657 * decl2.c (mark_used): Don't bother trying to instantiate things
3658 we synthesized.
3659 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
3660 * method.c (set_mangled_name_for_decl): Don't treat clones as
3661 constructors.
3662 (synthesize_method): Sythesize cloned functions, not the clones.
3663 * optimize.c (inline_data): Update comment on ret_label.
3664 (remap_block): Don't assume DECL_INITIAL exists.
3665 (copy_body_r): Allow ret_label to be NULL.
3666 (maybe_clone_body): Define.
3667 * pt.c (tsubst_decl): Handle clones.
3668 (instantiate_clone): New function.
3669 (instantiate_template): Use it.
3670 (set_mangled_name_for_template_decl): Don't treat clones as
3671 constructors.
3672 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
3673 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
3674 * semantics.c (expand_body): Clone function bodies as necessary.
3675
3676 * optimize.c (remap_decl): Avoid sharing structure for arrays
3677 whose size is only known at run-time.
3678 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
3679
3680 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
3681 to has_in_charge_parm_p.
3682 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
3683 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
3684 (DECL_COPY_CONSTRUCTOR_P): New macro.
3685 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
3686 (build_user_type_conversion_1): Likewise.
3687 (convert_like_real): Likewise.
3688 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
3689 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
3690 (copy_args_p): Likewise.
3691 (grok_ctor_properties): Likewise.
3692 (start_function): Likewise.
3693 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
3694 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
3695 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
3696 * method.c (do_build_copy_constructor): Use
3697 DECL_HAS_IN_CHARGE_PARM_P.
3698 (synthesize_method): Likewise.
3699 * pt.c (instantiate_template): Remove goto.
3700 * tree.c (build_cplus_method_type): Remove mention of obstacks in
3701 comment.
3702
3703 * cp-tre.h (finish_function): Change prototype.
3704 * decl.c (end_cleanup_fn): Adjust caller.
3705 (finish_function): Take only one parameter.
3706 * decl2.c (finish_objects): Adjust caller.
3707 (finish_static_storage_duration_function): Likewise.
3708 * method.c (emit_thunk): Likewise.
3709 * parse.y: Likewise.
3710 * parse.c: Regenerated.
3711 * pt.c (instantiate_decl): Likewise.
3712 * rtti.c (synthesize_tinfo_fn): Likewise.
3713 * semantics.c (expand_body): Likewise.
3714
3715 * cp-tree.h (copy_decl): New function.
3716 * class.c (finish_struct_1): Use it.
3717 * lex.c (copy_decl): Define it.
3718 * pt.c (tsubst_decl): Likewise.
3719 * tree.c (copy_template_template_parm): Likewise.
3720
3721 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
3722 has_nonpublic_assign_ref.
3723 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
3724 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
3725 * class.c (finish_struct_methods): Don't set
3726 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
3727 (interface_only): Don't declare.
3728 (interface_unknown): Likewise.
3729
3730 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3731
3732 * tree.h (HAVE_TEMPLATES): Remove definition.
3733 * lang-options.h (-fthis-is-variable): Remove documentation.
3734
3735 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
3736
3737 * class.c (instantiate_type): Handle object-relative template-id.
3738
3739 * semantics.c (finish_expr_stmt): Call convert_to_void here.
3740 * decl.c (cplus_expand_expr_stmt): Not here.
3741
3742 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3743 Initialize exprtype earlier.
3744
3745 * parse.y (fn.def1): Check for defining types in return types.
3746
3747 * decl.c (check_tag_decl): Notice extra fundamental types.
3748 Diagnose empty decls in classes, too.
3749
3750 * decl.c (grokdeclarator): Don't override an anonymous name if no
3751 declarator was given.
3752
3753 * cvt.c (convert_to_void): Call resolve_offset_ref.
3754
3755 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3756
3757 * decl2.c (decl_namespace): Handle getting a type.
3758
3759 * typeck.c (build_c_cast): Re-enable warning for cast between
3760 pointer and integer of different size.
3761
3762 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
3763
3764 * inc/cxxabi.h (__pointer_type_info): Add restrict and
3765 incomplete flags.
3766 (__pointer_type_info::__pointer_catch): New virtual function.
3767 (__pointer_to_member_type_info): Derive from
3768 __pointer_type_info. Adjust.
3769 (__pointer_to_member_type_info::__do_catch): Remove.
3770 (__pointer_to_member_type_info::__is_pointer_p): Declare.
3771 (__pointer_to_member_type_info::__pointer_catch): Declare.
3772 * rtti.c (qualifier_flags): Add restrict flag.
3773 (ptmd_initializer): Reorder members.
3774 (create_tinfo_types): Expand comments. Reorder
3775 ptmd_desc_type_node members.
3776 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3777 Implement.
3778 (__pointer_type_info::__do_catch): Move specific code into
3779 __pointer_catch. Call it.
3780 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3781 specific catch checking. Fix void conversion check.
3782 (__pointer_to_member_type_info::__do_catch): Remove.
3783 (__pointer_to_member_type_info::__pointer_catch): Implement.
3784
3785 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3786
3787 * lex.c (init_parse): Remove traces of classof and headof.
3788 * decl2.c (flag_operator_names): Default to 1.
3789 (lang_decode_option): Do not set it for -ansi.
3790
3791 2000-04-09 Mark Mitchell <mark@codesourcery.com>
3792
3793 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3794 (DECL_MAIN_VARIANT): Remove.
3795 * decl.c (duplicate_decls): Don't set it.
3796 (start_function): Likewise.
3797 (lang_mark_tree): Don't mark it.
3798 * decl2.c (defer_fn): Don't use it.
3799 * lex.c (retrofit_lang_decl): Don't set it.
3800 * pt.c (tsubst_decl): Likewise.
3801 * ptree.c (print_lang_decl): Don't print it.
3802 * typeck.c (mark_addressable): Don't use it.
3803
3804 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3805
3806 * vec.cc: Include <new> and <exception>.
3807 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3808 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3809 terminate.
3810 (__cxa_vec_delete): Catch dtor exceptions.
3811
3812 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
3813
3814 Prepend __ to implementation defined names.
3815 * inc/typeinfo (type_info): Rename _name to __name.
3816 (type_info::type_info): Rename parameter.
3817 (type_info::operator==, type_info::operator!=,
3818 type_info::before): Likewise.
3819 (type_info::is_pointer_p, type_info::is_function_p,
3820 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3821 parameters.
3822 * inc/cxxabi.h
3823 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3824 (__pointer_type_info::__pointer_type_info): Likewise.
3825 (__pointer_type_info::is_pointer_p,
3826 __pointer_type_info::do_catch): Prepend __. Rename parameters.
3827 (__array_type_info::__array_type_info): Rename parameters.
3828 (__function_type_info::__function_type_info): Likewise.
3829 (__function_type_info::is_function_p): Prepend __.
3830 (__enum_type_info::__enum_type_info): Rename parameters.
3831 (__pointer_to_member_type_info::__pointer_to_member_type_info):
3832 Likewise.
3833 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3834 parameters.
3835 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3836 (__class_type_info::__class_type_info): Rename parameters.
3837 (__class_type_info::sub_kind): Prepend __. Adjust member names.
3838 (__class_type_info::upcast_result,
3839 __class_type_info::dyncast_result): Prepend __. Move definition
3840 into tinfo.cc.
3841 (__class_type_info::do_upcast, __class_type_info::do_catch,
3842 __class_type_info::find_public_src,
3843 __class_type_info::do_dyncast,
3844 __class_type_info::do_find_public_src): Prepend __. Rename
3845 parameters.
3846 (__si_class_type_info::__si_class_type_info): Rename parameters.
3847 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3848 __si_class_type_info::do_find_public_src): Prepent __. Rename
3849 parameters.
3850 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3851 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3852 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3853 parameters.
3854 (__dynamic_cast): Rename parameters.
3855 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3856 type_info::do_catch, type_info::do_upcast): Prepend __.
3857 (contained_p, public_p, virtual_p, contained_public_p,
3858 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3859 (__class_type_info::do_catch,
3860 __class_type_info::do_upcast): Prepend __. Adjust.
3861 (__class_type_info::__upcast_result,
3862 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3863 Adjust.
3864 (__class_type_info::find_public_src): Prepend __. Adjust.
3865 (__class_type_info::do_find_public_src,
3866 __si_class_type_info::do_find_public_src,
3867 __vmi_class_type_info::do_find_public_src): Likewise.
3868 (__class_type_info::do_dyncast,
3869 __si_class_type_info::do_dyncast,
3870 __vmi_class_type_info::do_dyncast): Likewise.
3871 (__class_type_info::do_upcast,
3872 __si_class_type_info::do_upcast,
3873 __vmi_class_type_info::do_upcast): Likewise.
3874 (__dynamic_cast): Adjust.
3875 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3876 (__function_type_info::is_function_p): Likewise.
3877 (__pointer_type_info::do_catch): Likewise. Adjust.
3878 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3879 (__throw_type_match_rtti_2): Adjust.
3880 (__is_pointer): Adjust.
3881
3882 2000-04-08 Mark Mitchell <mark@codesourcery.com>
3883
3884 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3885 (complete_ctor_identifier): New macro.
3886 (special_function_kind): Add sfk_copy_constructor and
3887 sfk_assignment_operator.
3888 (LOOKUP_HAS_IN_CHARGE): Remove.
3889 (cons_up_default_function): Rename to ...
3890 (implicitly_declare_fn): ... this.
3891 * call.c (build_new_method_call): Add in-charge parameters for
3892 constructors here.
3893 * class.c (add_implicitly_declared_members): Change parameter name
3894 from cant_have_assignment to cant_have_const_assignment.
3895 Replace calls to cons_up_default_function to implicitly_declare_fn.
3896 * cvt.c (ocp_convert): Use complete_ctor_identifier.
3897 * decl.c (initialize_predefined_identifiers): Initialize it.
3898 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3899 complex expression.
3900 * init.c (expand_default_init): Don't calculate the in-charge
3901 parameter here.
3902 (build_new_1): Likewise.
3903 * lex.c (cons_up_default_function): Move to method.c.
3904 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3905 (implicitly_declare_fn): New function.
3906 * typeck.c (build_static_cast): Use complete_ctor_identifier.
3907 (build_modify_expr): Likewise.
3908 * typeck2.c (build_functional_cast): Likewise.
3909
3910 Under the new ABI, constructors don't return `this'.
3911 * cp-tree.h (warn_reorder): Declare.
3912 (special_function_kind): New enum.
3913 (global_base_init_list): Remove declaration.
3914 (emit_base_init): Don't return a value.
3915 (check_base_init): Don't declare.
3916 (is_aggr_typedef): Likewise.
3917 * decl.c (check_special_function_return_type): New function.
3918 (return_types): Remove.
3919 (grokdeclarator): Use check_special_function_return_type.
3920 (start_function): Don't initialize ctor_label under the new ABI.
3921 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3922 * init.c (begin_init_stmts): Move to top of file.
3923 (finish_init_stmts): Likewise.
3924 (warn_reorder): Don't declare.
3925 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
3926 value.
3927 (check_base_init): Remove.
3928 (is_aggr_typedef): Likewise.
3929 (build_new_1): Don't use the return value of a constructor.
3930 * semantics.c (setup_vtbl_ptr): Don't use the return value
3931 of emit_base_init.
3932 * typeck.c (check_return_expr): Don't magically convert return
3933 statements into `return this' in constructors under the new ABI.
3934
3935 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3936 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3937 (base_ctor_identifier): New macro.
3938 (base_dtor_identifier): Likewise.
3939 (deleting_dtor_identifier): Likewise.
3940 * decl.c: Don't include obstack.h.
3941 (obstack_chunk_alloc): Don't define.
3942 (obstack_chunk_free): Likewise.
3943 (struct predefined_identifier): New type.
3944 (initialize_predefined_identifiers): New function.
3945 (init_decl_processing): Use it.
3946 (debug_temp_inits): Remove.
3947 (start_method): Don't call preserve_data.
3948 (hack_incomplete_structures): Update comment.
3949 * init.c (init_init_processing): Don't initialize
3950 nelts_identifier.
3951 (build_offset_rf): Remove dead code.
3952 (build_delete): Use CLASSTYPE_N_BASECLASSES.
3953 * search.c (init_search_processing): Don't initialize
3954 vptr_identifier.
3955
3956 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3957
3958 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3959 some sign_compare warnings.
3960
3961 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3962
3963 Rename abi::__vmi_class_type_info members.
3964 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3965 base_list, detail_masks members to vmi_flags, vmi_base_count,
3966 vmi_bases and vmi_flags_masks respectively.
3967 (__vmi_class_type_info::vmi_flags_masks): Rename
3968 details_unknown_mask to flags_unknown_mask.
3969 * tinfo.cc (__class_type_info::do_upcast): Adjust.
3970 (__vmi_class_type_info::do_find_public_src): Adjust.
3971 (__vmi_class_type_info::do_dyncast): Adjust.
3972 (__vmi_class_type_info::do_upcast): Adjust.
3973
3974 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
3975
3976 * tinfo.cc (convert_to_base): New function.
3977 (get_vbase_offset): Remove. Move into convert_to_base.
3978 (__vmi_class_type_info::do_find_public_src): Adjust.
3979 (__vmi_class_type_info::do_dyncast): Adjust.
3980 (__vmi_class_type_info::do_upcast): Adjust.
3981
3982 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
3983
3984 * tinfo.cc (operator=): Use __builtin_strcmp.
3985 * tinfo2.cc (before): Likewise.
3986
3987 2000-04-06 Mark Mitchell <mark@codesourcery.com>
3988
3989 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3990 (DECL_SAVED_INLINE): Rename to ...
3991 (DECL_DEFERRED_FN): ... this.
3992 (in_function_p): Remove declaration.
3993 (mark_inline_for_output): Rename to ...
3994 (defer_fn): ... this.
3995 * decl.c (finish_function): Adjust call to mark_inline_for_output.
3996 (in_function_p): Remove definition.
3997 * decl2.c (saved_inlines): Rename to ...
3998 (deferred_fns): ... this.
3999 (saved_inlines_used): Rename to ...
4000 (deferred_fns_used): ... this.
4001 (mark_inline_for_output): Rename to ...
4002 (defer_fn): ... this.
4003 (finish_file): Adjust accordingly.
4004 (init_decl2): Likewise.
4005 * lex.c (cons_up_default_function): Likewise.
4006 * pt.c (mark_decl_instantiated): Likewise.
4007 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
4008 circumstances.
4009 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
4010 * semantics.c (expand_body): Defer more functions.
4011
4012 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4013
4014 * vec.cc: New file.
4015 * Make-lang.in (CXX_LIB2FUNCS): Add it.
4016 (vec.o): Build it.
4017 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4018 __cxa_vec_delete): Declare.
4019
4020 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4021
4022 * rtti.c (dfs_class_hint_mark): New static function.
4023 (dfs_class_hint_unmark): New static function.
4024 (class_hint_flags): Use them.
4025
4026 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
4027
4028 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
4029
4030 2000-04-05 Mark Mitchell <mark@codesourcery.com>
4031
4032 * cp-tree.h (instantiate_decl): Change prototype.
4033 * decl2.c (mark_used): Adjust call.
4034 * optimize.c (inlinable_function_p): Adjust handling of templates.
4035 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
4036 (do_type_instantiation): Likewise.
4037 (instantiate_decl): Defer more templates.
4038 (instantiate_pending_templates): Adjust logic to handle inline
4039 friend functions.
4040
4041 * Makefile.in (GGC_H): New variable. Use it throughout in place
4042 of ggc.h.
4043
4044 * call.c: Don't include obstack.h. Include ggc.h.
4045 (obstack_chunk_alloc): Don't define.
4046 (obstack_chunk_free): Likewise.
4047 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
4048 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
4049 (pop_switch): Free it.
4050
4051 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
4052
4053 * dump.c (dequeue_and_dump): Don't try to print the bit_position
4054 if we don't have a DECL_FIELD_OFFSET.
4055
4056 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
4057
4058 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
4059 special_function_p.
4060
4061 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4062
4063 * cfns.gperf (hash, libc_name_p): Prototype.
4064
4065 * rtti.c (build_dynamic_cast_1): Constification.
4066
4067 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
4068
4069 * semantics.c (deferred_type_access_control): Prototype.
4070
4071 2000-04-04 Mark Mitchell <mark@codesourcery.com>
4072
4073 Correct many new ABI issues regarding vbase and vcall offset
4074 layout.
4075 * cp-tree.h (BINFO_VTABLE): Document.
4076 (struct lang_type): Tweak formatting.
4077 (BINFO_PRIMARY_BINFO): Add to documentation.
4078 (CLASSTYPE_VSIZE): Fix typo in comment.
4079 (CLASSTYPE_VBASECLASSES): Update documentation.
4080 (BINFO_VBASE_MARKED): Remove.
4081 (SET_BINFO_VBASE_MARKED): Likewise.
4082 (CLEAR_BINFO_VBASE_MARKED): Likewise.
4083 (BINFO_FIELDS_MARKED): Remove.
4084 (SET_BINFO_FIELDS_MARKED): Likewise.
4085 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
4086 (enum access_kind): New enumeration.
4087 (num_extra_vtbl_entries): Remove declaration.
4088 (size_extra_vtbl_entries): Likewise.
4089 (get_vtbl_decl_for_binfo): New function.
4090 (dfs_vbase_unmark): Remove declaration.
4091 (mark_primary_bases): Likewise.
4092 * class.c (SAME_FN): Remove.
4093 (struct vcall_offset_data_s): Move definition.
4094 (build_vbase_pointer): Use `build', not `build_binary_op', to
4095 access the vbase pointer under the new ABI.
4096 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
4097 (build_primary_vtable): Likewise.
4098 (dfs_mark_primary_bases): Move here from search.c.
4099 (mark_primary_bases): Likewise.
4100 (determine_primary_bases): Under the new ABI, don't make a base
4101 class a primary base just because we don't yet have any virtual
4102 functions.
4103 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
4104 (num_vfun_entries): Remove.
4105 (dfs_count_virtuals): Likewise.
4106 (num_extra_vtbl_entries): Likewise.
4107 (size_extra_vtbl_entries): Likewise.
4108 (layout_virtual_bases): Iterate in inheritance graph order under
4109 the new ABI.
4110 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
4111 indicate that a vfield is present.
4112 (init_class_processing): Initialize access_public_node, etc., from
4113 ak_public, etc.
4114 (get_vtbl_decl_for_binfo): New function.
4115 (dump_class_hierarchy_r): Likewise.
4116 (dump_class_hierarchy): Use it.
4117 (finish_vtbls): Build the vtbls in inheritance graph order.
4118 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4119 (initialize_vtable): Use get_vtbl_decl_for_binfo.
4120 (accumulate_vtbl_inits): Add comments explaining why a pre-order
4121 walk is required.
4122 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
4123 where the vptr points, even for primary vtables.
4124 (build_vtbl_initializer): Adjust handling of vbase and vcall
4125 offsets.
4126 (build_vcall_and_vbase_vtable_entries): New function.
4127 (dfs_build_vbase_offset_vtbl_entries): Remove.
4128 (build_vbase_offset_vtbl_entries): Reimplement.
4129 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
4130 were already handled in a primary base class vtable.
4131 (build_vcall_offset_vtbl_entries): Adjust.
4132 (build_rtti_vtbl_entries): Adjust.
4133 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
4134 * init.c (expand_virtual_init): Simplify.
4135 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
4136 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
4137 * search.c (BINFO_ACCESS): New macro.
4138 (SET_BINFO_ACCESS): Likewise.
4139 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
4140 (access_in_type): Likewise.
4141 (dfs_accessible_p): Likewise.
4142 (protected_accessible_p): Likewise.
4143 (lookup_fnfields_1): Adjust documentation.
4144 (dfs_mark_primary_bases): Move to class.c
4145 (mark_primary_bases): Likewise.
4146 (dfs_vbase_unmark): Remove.
4147 (virtual_context): Use BINFO_FOR_VBASE.
4148 (dfs_get_vbase_types): Simplify.
4149 (dfs_build_inheritance_graph_order): New function.
4150 (get_vbase_types): Use it.
4151 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
4152
4153 * tinfo.cc (get_vbase_offset): New function.
4154 (__vmi_class_type_info::do_find_public_src): Use it.
4155 (__vmi_class_type_info::do_dyncast): Likewise.
4156 (__vmi_class_type_info::do_upcast): Likewise.
4157
4158 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
4159
4160 * lang-specs.h: Pass -fno-show-column to the preprocessor.
4161
4162 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
4163
4164 * rtti.c (class_hint_flags): Rename flags.
4165 (class_initializer): Remove flags.
4166 (synthesize_tinfo_var): Combine offset and flags. Add flags
4167 for __vmi_class_type_info.
4168 (create_tinfo_types): Remove flags from __class_type_info and
4169 __si_class_type_info. Merge flags and offset from
4170 base_class_type_info.
4171 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
4172 (__base_class_info::is_virtual_p): Adjust.
4173 (__base_class_info::is_public_p): Adjust.
4174 (__base_class_info::offset): New accessor.
4175 (__class_type_info::details): Remove member.
4176 (__class_type_info::__class_type_info): Lose details.
4177 (__class_type_info::detail_masks): Remove.
4178 (__si_class_type_info::__si_class_type_info): Lose details.
4179 (__vmi_class_type_info::details): New member.
4180 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
4181 (__vmi_class_type_info::detail_masks): New member.
4182 * tinfo.cc (__class_type_info::do_upcast): Initialize result
4183 with unknown_details_mask.
4184 (__vmi_class_type_info::do_find_public_src): Adjust
4185 (__vmi_class_type_info::do_dyncast): Adjust.
4186 (__vmi_class_type_info::do_upcast): Set result details, if
4187 needed. Adjust.
4188 (__dynamic_cast): Temporarily #if out optimization.
4189
4190 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
4191
4192 * rtti.c (get_tinfo_decl): Mark used.
4193 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
4194 mark as dealt with, if we output it.
4195
4196 2000-03-28 Mark Mitchell <mark@codesourcery.com>
4197
4198 * class.c: Reorganize to put virtual function table initialization
4199 machinery at the end of the file.
4200
4201 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
4202
4203 * class.c (finish_struct): Use bitsize_zero_node.
4204 * pt.c (instantiate_class_template): Likewise.
4205
4206 2000-03-28 Mark Mitchell <mark@codesourcery.com>
4207
4208 Put RTTI entries at negative offsets in new ABI.
4209 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
4210 vbase offset at index -3, not -1.
4211 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
4212 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
4213 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
4214 (build_rtti_vtbl_entries): New function.
4215 (set_rtti_entry): Remove.
4216 (build_primary_vtable): Don't use it.
4217 (build_secondary_vtable): Likewise.
4218 (start_vtable): Remove.
4219 (first_vfun_index): New function.
4220 (set_vindex): Likewise.
4221 (add_virtual_function): Don't call start_vtable. Do call
4222 set_vindex.
4223 (set_primary_base): Rename parameter.
4224 (determine_primary_base): Likewise.
4225 (num_vfun_entries): Don't use skip_rtti_stuff.
4226 (num_extra_vtbl_entries): Include RTTI information.
4227 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
4228 (skip_rtti_stuff): Remove.
4229 (dfs_modify_vtables): Don't use it.
4230 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
4231 (layout_nonempty_base_or_field): Update size handling.
4232 (create_vtable_ptr): Tweak.
4233 (layout_class_type): Adjust parameter names.
4234 (finish_struct_1): Simplify.
4235 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
4236 (skip_rtti_stuff): Remove.
4237 (first_vfun_index): New function.
4238 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4239 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
4240 (marked_vtable_pathp): Declare.
4241 (unmarked_vtable_pathp): Likewise.
4242 * error.c (dump_expr): Use first_vfun_index to calculate vtable
4243 offsets.
4244 * rtti.c (build_headof): Look for RTTI at negative offsets.
4245 (get_tinfo_decl_dynamic): Likewise.
4246 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
4247 here.
4248 (create_pseudo_type_info): Do it here instead. Adjust so that
4249 vptr points at first virtual function.
4250 * search.c (marked_vtable_pathp): Make it global.
4251 (unmarked_vtable_pathp): Likewise.
4252 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4253 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4254 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
4255 (get_pure_virtuals): Likewise.
4256 (expand_upcast_fixups): Likewise.
4257 * tree.c (debug_binfo): Likewise.
4258 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
4259 negative offset.
4260
4261 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4262
4263 * class.c (check_field_decl): Fix typo.
4264 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
4265 (check_methods): Likewise.
4266 (check_field_decls): Likewise.
4267 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
4268 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
4269 Use DECL_RESULT_FLD, not DECL_RESULT.
4270 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
4271 * lex.c (identifier_type): Likewise.
4272 * pt.c (determine_specialization, lookup_template_class): Likewise.
4273 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
4274 (resolve_overloaded_unification, more_specialized): Likewise.
4275 * semantics.c (finish_member_declaration): Likewise.
4276 * typeck.c (build_x_function_call): Likewise.
4277
4278 2000-03-26 Mark Mitchell <mark@codesourcery.com>
4279
4280 * class.c (layout_empty_base): Handle empty bases with non-byte
4281 alignment.
4282 (build_base_field): Likewise.
4283 (layout_virtual_bases): Likewise.
4284
4285 * class.c (finish_struct_1): Fix typo in this change:
4286
4287 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4288
4289 2000-03-25 Mark Mitchell <mark@codesourcery.com>
4290
4291 * decl.c (grokdeclarator): Count partial specializations when
4292 keeping track of how many template classes have been seen.
4293
4294 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
4295
4296 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4297
4298 * class.c (build_vbase_pointer_fields): layout_field now place_field.
4299 (get_vfield_offset): Use byte_position.
4300 (set_rtti_entry): Set OFFSET to ssizetype zero.
4301 (get_binfo_offset_as_int): Deleted.
4302 (dfs_record_base_offsets): Use tree_low_cst.
4303 (dfs_search_base_offsets): Likewise.
4304 (layout_nonempty_base_or_field): Reflect changes in RLI format
4305 and call byte_position.
4306 (layout_empty_base): Convert offset to ssizetype.
4307 (build_base_field): use rli_size_unit_so_far.
4308 (dfs_propagate_binfo_offsets): Do computation in proper type.
4309 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
4310 (layout_class_type): Reflect changes in RLI names and fields.
4311 (finish_struct_1): Set DECL_FIELD_OFFSET.
4312 * dump.c (dequeue_and_dump): Call bit_position.
4313 * expr.c (cplus_expand_constant): Use byte_position.
4314 * rtti.c (expand_class_desc): Use bitsize_one_node.
4315 * typeck.c (build_component_addr): Use byte_position and don't
4316 special case for zero offset.
4317
4318 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
4319
4320 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
4321
4322 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
4323 tinfo object.
4324 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
4325 vtable.
4326
4327 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4328
4329 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
4330 DECL_P macros.
4331 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
4332 make_typename_type, check_initializer, cp_finish_decl,
4333 xref_tag): Likewise.
4334 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
4335 decl_namespace, arg_assoc_template_arg, arg_assoc,
4336 validate_nonmember_using_decl, do_class_using_decl): Likewise.
4337 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
4338 args_to_string): Likewise.
4339 * friend.c (is_friend): Likewise.
4340 * lex.c (note_got_semicolon, note_list_got_semicolon,
4341 is_global): Likewise.
4342 * method.c (build_overload_nested_name, build_overload_value,
4343 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
4344 * parse.y (typename_sub, typename_sub1): Likewise.
4345 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
4346 process_partial_specialization, convert_template_argument,
4347 template_args_equal, add_pending_template, lookup_template_class,
4348 for_each_template_parm_r, maybe_fold_nontype_arg,
4349 tsubst, instantiate_template, type_unification_real, unify,
4350 instantiate_pending_templates, set_mangled_name_for_template_decl):
4351 Likewise.
4352 * repo.c (repo_get_id, repo_template_used): Likewise.
4353 * search.c (lookup_field_1): Likewise.
4354 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
4355 * xref.c (classname): Likewise.
4356
4357 2000-03-22 Mark Mitchell <mark@codesourcery.com>
4358
4359 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
4360 (CANONICAL_BINFO): New macro.
4361 (BINFO_NEW_VTABLE_MARKED): Use it.
4362 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
4363 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
4364 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
4365 not TREE_TYPE.
4366 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4367 (build_secondary_vtable): Likewise.
4368 (dfs_finish_vtbls): Likewise.
4369 (dfs_accumulate_vtbl_inits): Likewise.
4370 (accumulate_vtbl_inits): New function.
4371 (finish_vtbls): Make sure that virtual bases come after
4372 non-virtual bases in the vtable group.
4373 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
4374 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4375 * search.c (struct vbase_info): Move definition.
4376 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4377 (unmarked_new_vtable_p): Likewise.
4378 (dfs_mark_vtable_path): Remove.
4379 (dfs_mark_new_vtable): Remove.
4380 (dfs_unmark_new_vtable): Likewise.
4381 (dfs_clear_search_slot): Likewise.
4382 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4383 (dfs_clear_vbase_slots): Likewise.
4384 (init_vbase_pointers): LIkewise.
4385
4386 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
4387
4388 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
4389 SIZETYPE to a non-SIZETYPE.
4390
4391 2000-03-21 Mark Mitchell <mark@codesourcery.com>
4392
4393 * class.c (layout_virtual_bases): Adjust names in conditionally
4394 compiled code.
4395
4396 * class.c (record_base_offsets): New function.
4397 (layout_conflict_p): Likewise.
4398 (layout_nonempty_base_or_field): Use it.
4399 (layout_empty_base): New function.
4400 (build_base_field): Use it.
4401 (build_base_fields): Update comment.
4402 (layout_virtual_bases): Fold in a little code form
4403 layout_basetypes. Use layout_empty_base.
4404 (layout_basetypes): Remove.
4405 (end_of_class): New function.
4406 (layout_class_type): Use it. Adjust.
4407
4408 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
4409 (fntype_p): Remove.
4410 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
4411 comment.
4412 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4413 * typeck.c (fntype_p): Remove.
4414
4415 * cp-tree.h (TI_SPEC_INFO): Remove.
4416 (CLASSTYPE_TI_SPEC_INFO): Likewise.
4417 * pt.c (process_partial_specialization): Likewise.
4418
4419 * class.c (build_base_field): Fix thinko in computation of binfo
4420 offsets.
4421
4422 * tree.c (mark_local_for_remap_p): Mark variables declared in
4423 TARGET_EXPRs as well.
4424
4425 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4426
4427 * typeck.c (require_complete_type, complete_type,
4428 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
4429 build_array_ref, convert_arguments, pointer_diff,
4430 build_x_unary_op, build_unary_op, build_c_cast,
4431 build_modify_expr): Use COMPLETE_TYPE_P etc.
4432 * call.c (is_complete, convert_like_real,
4433 build_new_method_call): Likewise.
4434 * class.c (build_vbase_pointer_fields, check_bases,
4435 build_base_field, finish_struct_1, pushclass): Likewise.
4436 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
4437 * decl.c (maybe_process_template_type_declaration, pushtag,
4438 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
4439 layout_var_decl, check_initializer, cp_finish_decl,
4440 grokdeclarator, require_complete_types_for_parms,
4441 grok_op_properties, xref_tag, xref_basetypes,
4442 check_function_type): Likewise.
4443 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
4444 * friend.c (do_friend): Likewise.
4445 * init.c (build_offset_ref): Likewise.
4446 * parse.y (structsp): Likewise.
4447 * pt.c (maybe_process_partial_specialization,
4448 tsubst_friend_function, instantiate_class_template, tsubst,
4449 do_type_instantiation, instantiate_pending_templates): Likewise.
4450 * repo.c (repo_get_id): Likewise.
4451 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
4452 synthesize_tinfo_var, emit_support_tinfos): Likewise.
4453 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
4454 * semantics.c (begin_class_definition): Likewise.
4455 * tree.c (build_cplus_method_type): Likewise.
4456 * typeck2.c (digest_init, build_functional_cast,
4457 add_exception_specifier): Likewise.
4458 * parse.h, parse.c: Regenerated.
4459
4460 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4461
4462 * inc/cxxabi.h: New header file. Define new-abi entry points.
4463 (__pointer_type_info::target): Rename member to ...
4464 (__pointer_type_info::type): ... here.
4465 (__base_class_info::type): Rename member to ...
4466 (__base_class_info::base): ... here.
4467 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
4468 * cp-tree.h (CPTI_ABI): New global tree enumeration.
4469 (abi_node): New global tree node.
4470 * decl.c (abi_node): Document.
4471 (init_decl_processing): Initialize abi_node.
4472 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
4473 (get_vmi_pseudo_type_info): Likewise.
4474 (create_tinfo_types): Likewise.
4475 (emit_support_tinfos): Likewise.
4476 * tinfo.h (cxxabi.h): Include for new-abi.
4477 Move rtti class definitions to new header file.
4478 * tinfo.cc (abi): Use the namespace.
4479 (std): Move new abi rtti classes from here ...
4480 (__cxxabiv1): ... to here.
4481 * tinfo2.cc (cxxabi.h): Include for new-abi.
4482 Move rtti class definitions to new header file.
4483 (std): Move new abi rtti classes from here ...
4484 (__cxxabiv1): ... to here.
4485 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
4486 namespace.
4487
4488 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
4489 Jason Merrill <jason@casey.cygnus.com>
4490
4491 * method.c (build_overload_int): Use host_integerp.
4492
4493 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4494
4495 * init.c (build_offset_ref): Handle the case of a templated member
4496 function.
4497
4498 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4499
4500 * except.c (expand_exception_blocks): Clear catch_clauses_last.
4501
4502 2000-03-18 Mark Mitchell <mark@codesourcery.com>
4503
4504 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
4505 * class.c (check_bitfield_decl): Turn illegal bitfields into
4506 non-bitfields.
4507 (dfs_propagate_binfo_offsets): Adjust for new size_binop
4508 semantics.
4509 (dfs_offset_for_unshared_vbases): Likewise.
4510 * cvt.c (cp_convert_to_pointer): Convert NULL to a
4511 pointer-to-member correctly under the new ABI.
4512 * expr.c (cplus_expand_constant): Don't use cp_convert when
4513 turning an offset into a pointer-to-member.
4514 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
4515 when dereferencing them under the new ABI.
4516 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
4517 of pointers-to-members under the new ABI.
4518
4519 * class.c (check_bitfield_decl): Remove restriction on really long
4520 bitfields.
4521 (layout_class_type): Implement new ABI handling of bitfields
4522 longer than their types.
4523
4524 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4525
4526 * parse.y (extdefs): Call ggc_collect.
4527 * parse.c: Regenerated.
4528
4529 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
4530
4531 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
4532 (note_name_declared_in_class): Use OVL_CURRENT to get at a
4533 potential overload.
4534
4535 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4536
4537 * class.c (build_vbase_path): Use integer_zerop.
4538 (build_vtable_entry): Use tree_low_cst.
4539 (get_vfield_offset): Use bit_position.
4540 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
4541 Use tree_low_cst.
4542 (check_bitfield_decl): Set DECL_SIZE using convert.
4543 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
4544 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
4545 Use tree_low_cst.
4546 (finish_struct_1): Use bit_position.
4547 (dump_class_hierarchy): Use tree_low_cst.
4548 * cp-tree.h (min_precision): Add declaration.
4549 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
4550 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
4551 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
4552 * expr.c (cplus_expand_constant): Use bit_position.
4553 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
4554 * rtti.c (get_base_offset): Use bit_position.
4555 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
4556 host_integerp, and tree_low_cst.
4557 (pointer_int_sum): Use integer_zerop.
4558 (build_component_addr): Use bit_position.
4559
4560 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
4561
4562 * typeck.c (require_complete_type): Don't assume size_zero_node.
4563 (complete_type_or_else): Likewise.
4564
4565 2000-03-16 Steven Grady <grady@digitaldeck.com>
4566 Jason Merrill <jason@casey.cygnus.com>
4567
4568 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
4569
4570 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
4571
4572 * decl2.c (grokfield): Bail out if type is error_mark_node.
4573
4574 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4575
4576 * tinfo2.cc (__ptr_to_member_data): Rename to ...
4577 (__pointer_to_member_data): ... here. Adjust.
4578 * rtti.c (create_tinfo_types): Adjust.
4579
4580 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4581
4582 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
4583 * decl.c (ref_desc_type_node): Undocument.
4584 * rtti.c (ptr_ref_initializer): Rename to ...
4585 (ptr_initializer): ... here. Adjust comments.
4586 (ptmd_initializer): Fix comment thinko.
4587 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
4588 (create_tinfo_types): Remove ref_desc_type_node init.
4589 * tinfo2.cc (__reference_type_info): Remove.
4590
4591 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
4592
4593 * decl.c (cp_finish_decl): Remove obsolete comment.
4594
4595 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
4596
4597 2000-03-14 Mark Mitchell <mark@codesourcery.com>
4598
4599 * cp-tree.h: Tweak documentation.
4600 * class.c (build_vbase_pointer_fields): Layout the fields, too.
4601 (avoid_overlap): Remove.
4602 (get_binfo_offset_as_int): New function.
4603 (dfs_serach_base_offsets): Likewise.
4604 (layout_nonempty_base_or_field): Likewise.
4605 (build_base_field): Layout fields here. Avoid placing two objects
4606 of the same type at the same address, under the new ABI.
4607 (build_base_fields): Adjust accordingly.
4608 (create_vtable_ptr): Return the new field, but don't attach it to
4609 TYPE_FIELDS.
4610 (remove_base_field): Remove.
4611 (remove_base_fields): Remove.
4612 (layout_basetypes): Adjust accordingly.
4613 (layout_class_type): Call layout_field for each field, rather than
4614 just making a wholesale call to layout_type.
4615
4616 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
4617
4618 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
4619
4620 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
4621
4622 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
4623
4624 * except.c (dtor_nothrow): New fn.
4625 (do_pop_exception): Use it. Take type parm.
4626 (push_eh_cleanup): Take type parm.
4627 (expand_start_catch_block): Pass it.
4628 (build_eh_type_type_ref): Accept null type.
4629
4630 2000-03-12 Mark Mitchell <mark@codesourcery.com>
4631
4632 * cp-tree.h (revert_static_member_fn): Change prototype.
4633 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
4634 (grok_op_properties): Likewise.
4635 (start_function): Likewise.
4636 (revert_static_member_fn): Simplify.
4637 * pt.c (check_explicit_specialization): Adjust call to
4638 revert_static_member_fn.
4639
4640 2000-03-11 Mark Mitchell <mark@codesourcery.com>
4641
4642 * cp-tree.h (scope_kind): New type.
4643 (tmpl_spec_kind): Likewise.
4644 (declare_pseudo_global_level): Remove.
4645 (pseudo_global_level_p): Rename to template_parm_scope_p.
4646 (pushlevel): Remove declaration.
4647 (begin_scope): New function.
4648 (finish_scope): Likewise.
4649 (current_tmpl_spec_kind): Likewise.
4650 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
4651 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
4652 Add template_spec_p.
4653 (toplevel_bindings_p): Adjust.
4654 (declare_pseudo_global_level): Remove.
4655 (pseudo_global_level_p): Rename to template_parm_scope_p.
4656 (current_tmpl_spec_kind): New function.
4657 (begin_scope): Likewise.
4658 (finish_scope): Likewise.
4659 (maybe_push_to_top_level): Adjust.
4660 (maybe_process_template_type_declaration): Likewise.
4661 (pushtag): Likewise.
4662 (pushdecl_nonclass_level): Likewise.
4663 (lookup_tag): Likewise.
4664 (grokfndecl): Handle member template specializations. Share
4665 constructor and non-constructor code.
4666 * decl2.c (check_classfn): Handle member template specializations.
4667 * pt.c (begin_template_parm_list): Use begin_scope.
4668 (begin_specialization): Likewise.
4669 (end_specialization): Likewise.
4670 (check_explicit_specialization): Use current_tmpl_spec_kind.
4671 Handle member template specializations.
4672 (end_template_decl): Use finish_scope. Remove call to
4673 get_pending_sizes.
4674 (push_template_decl_real): Remove bogus error message.
4675 (tsubst_decl): Fix typo in code contained in comment.
4676 (instantiate_template): Handle member template specializations.
4677 (most_general_template): Likewise.
4678
4679 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
4680
4681 * lex.c (whitespace_cr): Compress consecutive calls to warning().
4682 (do_identifier): Ditto for error().
4683
4684 * pt.c (convert_nontype_argument): Ditto for cp_error().
4685 (convert_template_argument): Ditto for cp_pedwarn().
4686
4687 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
4688
4689 * exception.cc (__check_null_eh_spec): New fn.
4690 * except.c (expand_end_eh_spec): Call it if the spec is throw().
4691
4692 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4693
4694 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
4695 * except.c (expand_end_eh_spec): Add the return type.
4696 * rtti.c (throw_bad_cast): Add the parmtypes.
4697 (throw_bad_typeid): Likewise.
4698
4699 * semantics.c (expand_stmt): Only leave out rtl for unused
4700 artificials, and set DECL_IGNORED_P on them as well.
4701 * decl.c (wrapup_globals_for_namespace): Likewise.
4702
4703 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
4704
4705 * decl.c (maybe_commonize_var): Skip all artificial decls.
4706 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
4707
4708 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
4709
4710 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4711 * cp-tree.h: Declare flag_enforce_eh_specs.
4712 * decl.c (store_parm_decls, finish_function): Check it.
4713
4714 C library functions don't throw.
4715 * Makefile.in (cfns.h): New target.
4716 (except.o): Depend on it.
4717 * Make-lang.in (cc1plus): Depend on cfns.gperf.
4718 * cfns.gperf: New file.
4719 * cfns.h: Generated.
4720 * except.c: Include it.
4721 (nothrow_libfn_p): New fn.
4722 * decl.c (grokfndecl): Use it.
4723 * cp-tree.h: Declare it.
4724
4725 * decl.c (push_overloaded_decl_1, auto_function,
4726 define_function): Lose.
4727 (build_library_fn_1): New static fn.
4728 (builtin_function): Use it.
4729 (get_atexit_node): Use build_library_fn_ptr.
4730 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
4731 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
4732 push_void_library_fn, push_throw_library_fn): New fns.
4733 * cp-tree.h: Declare them.
4734 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4735 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4736 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4737 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4738 * rtti.c (build_runtime_decl): Lose.
4739 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
4740 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4741 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4742
4743 * call.c (build_call): Remove result_type parm.
4744 Call mark_used on unused artificial fns.
4745 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4746
4747 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
4748
4749 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4750 appropriate.
4751 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4752 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4753 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4754 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4755 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4756 expand_generic_desc): Likewise.
4757
4758 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4759
4760 * exception.cc (__cp_pop_exception): Cleanup the original object.
4761
4762 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4763
4764 * decl.c (grok_op_properties): Merge conversion to void warning
4765 with other silly op warnings.
4766
4767 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
4768
4769 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4770 array CONSTRUCTOR elements. Don't use expr_tree_cons.
4771
4772 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4773
4774 * decl.c (cp_make_fname_decl): New function.
4775 (wrapup_globals_for_namespace): Don't emit unused static vars.
4776 (init_decl_processing): Remove comment about use of
4777 array_domain_type. Set make_fname_decl.
4778 (cp_finish_decl): Remove __FUNCTION__ nadgering.
4779 * semantics.c (begin_compound_stmt): Remove
4780 current_function_name_declared flagging.
4781 (expand_stmt): Don't emit unused local statics.
4782 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4783 specially.
4784
4785 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
4786
4787 * typeck.c (convert_for_assignment): Don't look at array
4788 initializer.
4789 * call.c (convert_like_real): Likewise.
4790
4791 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
4792
4793 Add initial support for '\uNNNN' specifier.
4794 * lex.c (read_ucs): New fn.
4795 (readescape, skip_white_space): Call it.
4796 (is_extended_char, is_extended_char_1): New fns.
4797 (utf8_extend_token): New fn, #if 0'd out.
4798 (real_yylex): Treat extended chars like letters.
4799
4800 * search.c (note_debug_info_needed): Walk the bases even if we
4801 weren't deferring the type itself.
4802
4803 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4804
4805 * decl2.c (finish_objects): Constify a char*.
4806
4807 * method.c (emit_thunk): Likewise.
4808
4809 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
4810
4811 * typeck.c (dubious_conversion_warnings): Look through
4812 REFERENCE_TYPE.
4813
4814 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4815
4816 * class.c (dfs_modify_vtables): I is now unsigned.
4817 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4818 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4819 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4820 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4821 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4822 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4823 Call integer_all_onesp.
4824 * typeck2.c (process_init_constructor): Use compare_tree_int.
4825
4826 * lang-specs.h (as): Don't call if -syntax-only.
4827
4828 2000-03-06 Mark Mitchell <mark@codesourcery.com>
4829
4830 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4831 RTL_EXPR_HAS_NO_SCOPE after all.
4832
4833 2000-03-05 Mark Mitchell <mark@codesourcery.com>
4834
4835 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4836 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
4837 RTL_EXPR_HAS_NO_SCOPE.
4838
4839 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4840 later.
4841
4842 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4843
4844 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
4845
4846 * call.c (convert_like): Macrofy.
4847 (convert_like_with_context): New macro.
4848 (convert_like_real): Renamed from convert_like. Add calling
4849 context parameters, for diagnostics. Add recursive flag. Call
4850 dubious_conversion_warnings for outer conversion.
4851 (build_user_type_conversion): Use convert_like_with_context.
4852 (build_over_call): Likewise. Don't warn about dubious
4853 conversions here. Adjust convert_default_arg calls.
4854 (convert_default_arg): Add context parameters for diagnostics.
4855 Pass throught to convert_like_with_context.
4856 * cp-tree.h (convert_default_arg): Add context parameters.
4857 (dubious_conversion_warnings): Prototype new function.
4858 * typeck.c (convert_arguments): Adjust convert_default_arg call.
4859 (dubious_conversion_warnings): New function, broken
4860 out of convert_for_assignment.
4861 (convert_for_assignment): Adjust.
4862
4863 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
4864
4865 * decl2.c (key_method): Break out from...
4866 (import_export_vtable, import_export_class): ...here.
4867
4868 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4869 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4870
4871 * search.c (note_debug_info_needed, dfs_debug_mark,
4872 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
4873 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4874
4875 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
4876
4877 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4878 typos.
4879
4880 2000-03-02 Mark Mitchell <mark@codesourcery.com>
4881
4882 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4883 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4884 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4885 (lang_type): Split gets_new into has_new and has_array_new.
4886 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4887 (TYPE_GETS_NEW): Split into ...
4888 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4889 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4890 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4891 (build_op_new_call): Don't declare.
4892 (build_new_1): Likewise.
4893 * call.c (build_op_new_call): Remove.
4894 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4895 instead of TYPE_NEEDS_DESTRUCTOR.
4896 (finish_struct_bits): Likewise.
4897 (add_implicitly_declared_members): Likewise.
4898 (check_field_decl): Likewise.
4899 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4900 correctly under the new ABI.
4901 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4902 instead of TYPE_NEEDS_DESTRUCTOR.
4903 (initialize_local_var): Likewise.
4904 (destroy_local_var): Likewise.
4905 (cp_finish_decl): Likewise.
4906 (register_dtor_fn): Likewise.
4907 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4908 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
4909 TYPE_VEC_DELETE_TAKES_SIZE here.
4910 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4911 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4912 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4913 (finish_destructor_body): Likewise.
4914 (maybe_build_cleanup_1): Likewise.
4915 * decl2.c (do_static_destruction): Likewise.
4916 * init.c (build_new_1): Make it static.
4917 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4918 (expand_cleanup_for_base): Likewise.
4919 (get_cookie_size): New function.
4920 (build_new_1): Handle array-new cookies correctly under the new
4921 ABI.
4922 (build_vec_delete_1): Likewise.
4923 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4924 (build_delete): Likewise.
4925 (build_vec_delete): Handle array-new cookies correctly under the new
4926 ABI.
4927 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4928 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4929 TYPE_HAS_ARRAY_NEW_OPERATOR.
4930 * ptree.c (print_lang_type): Check them.
4931 * search.c (context_for_name_lookup): Fix typo in comment.
4932 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4933 * tree.c (break_out_cleanups): Likewise.
4934 (build_cplus_array_test_1): Likewise.
4935 (cp_build_qualified_type_real): Likewise.
4936 * typeck.c (complete_type): Likewise.
4937
4938 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4939 the command-line, not the end.
4940
4941 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
4942
4943 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4944
4945 2000-03-02 Tom Tromey <tromey@cygnus.com>
4946
4947 * cp-tree.h (build_java_class_ref): Declare.
4948 * init.c (build_java_class_ref): No longer static.
4949 * except.c (expand_throw): Generate a Java-style `throw' if the
4950 thrown object is a "Java" object.
4951 (initialize_handler_parm): Generate a Java-style lookup of
4952 exception info if the caught object is a "Java" object.
4953 (catch_language, catch_language_init): New globals.
4954 (decl_is_java_type): New function.
4955 (expand_start_catch_block): Don't call push_eh_info() or
4956 push_eh_cleanup() when handling a Java-style "catch". Pass Java
4957 class reference to build_catch_block.
4958
4959 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4960
4961 * typeck.c (comptypes): Treat sizetype like its language equivalent.
4962
4963 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
4964
4965 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4966 to merge reference/pointer code and fix incorrect warnings.
4967
4968 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
4969
4970 * search.c (protected_accessible_p): Use context_for_name_lookup.
4971
4972 * init.c (construct_virtual_bases): Fix thinko.
4973 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4974
4975 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
4976
4977 * decl.c (current_function_decl): Move to toplev.c.
4978
4979 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
4980
4981 * pt.c (fn_type_unification): Unify return type, whenever
4982 provided.
4983 (get_bindings_real): Only pass return type when necessary.
4984 Remove explicit return type check.
4985 * class.c (resolve_address_of_overloaded_function): Pass desired
4986 return type to fn_type_unification.
4987
4988 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4989
4990 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4991 DECL_FIELD_SIZE.
4992 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4993 DECL_FIELD_SIZE.
4994 * rtti.c (expand_class_desc): Likewise.
4995 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4996 (THUNK_VCALL_OFFSET): Likewise.
4997 (THUNK_DELTA): Reflect changes in ../tree.h.
4998
4999 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
5000
5001 * search.c (protected_accessible_p): Also allow the access if
5002 the member is public in DERIVED. Lose TYPE parm.
5003 (friend_accessible_p): Lose TYPE parm.
5004 (accessible_p): Adjust.
5005
5006 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5007
5008 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
5009 on things that are not sizes; ssize_binop deleted.
5010 Call size_diffop when appropriate.
5011 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5012 (build_primary_vtable, build_secondary_vtable): Likewise.
5013 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
5014 Variable I is HOST_WIDE_INT.
5015 (get_vfield_offset): Pass proper types to size_binop.
5016 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
5017 (finish_struct_1): Likewise.
5018 (skip_rtti_stuff): Arg N is now pointer to signed.
5019 (layout_class_type): Use size_zero_node.
5020 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
5021 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
5022 * decl.c (complete_arry_type): Pass proper types to size_binop.
5023 (xref_basetypes): BINFO_OFFSET is sizetype.
5024 * error.c (dump_expr): Don't use size_binop non-sizes.
5025 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
5026 * init.c (construct_virtual_bases): Fix type error.
5027 (build_vec_delete_1): Pass proper type to size_binop and don't
5028 fold result.
5029 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
5030 * rtti.c (get_base_offset): Pass proper type to size_binop.
5031 * search.c (dfs_find_vbases): Fix type error.
5032 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
5033 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
5034 * tree.c (debug_binfo): Variable N is signed.
5035 Use HOST_WIDE_INT_PRINT_DEC.
5036 * typeck.c (comptypes): sizetype is same as equivalent integer type.
5037 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
5038 size_one_node and size_zero_node.
5039 (c_alignof): Use size_one_node.
5040 (build_component_addr): Pass proper types to size_binop.
5041 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
5042
5043 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
5044
5045 Implement class scope using-declarations for functions.
5046 * class.c (handle_using_decl): Call add_method for used functions.
5047 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
5048 (add_method): Used functions are hidden by local functions.
5049 (check_bases_and_members): Handle using-decls before finalizing
5050 CLASSTYPE_METHOD_VEC.
5051 * call.c (add_function_candidate): Add ctype parm; if non-zero,
5052 override the type of 'this' accordingly.
5053 (add_template_candidate, add_template_candidate_real): Add ctype parm.
5054 (convert_class_to_reference, build_user_type_conversion_1,
5055 build_new_function_call, build_object_call, build_new_op,
5056 build_new_method_call): Pass ctype parm.
5057
5058 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
5059 the baselink.
5060 * call.c (convert_class_to_reference, build_user_type_conversion_1,
5061 build_new_function_call, build_object_call, build_new_op,
5062 build_new_method_call, build_op_delete_call): Don't get basetype_path
5063 from a baselink.
5064 * typeck.c (build_component_ref): Likewise.
5065 * init.c (build_offset_ref): Likewise.
5066 (resolve_offset_ref): Don't call enforce_access.
5067 Call build_scoped_ref.
5068 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
5069 would cause an error or if -pedantic.
5070 * class.c (alter_access): Lose binfo parm.
5071
5072 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5073
5074 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
5075 types.
5076
5077 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
5078
5079 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
5080 pseudo_type_info creation into the std namespace
5081
5082 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5083
5084 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
5085 (import_export_class): Remove declaration.
5086 * decl2.c (import_export_class): Make it static.
5087 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
5088 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
5089 EXPR_WITH_FILE_LOCATION.
5090 * lex.c (check_newline): Tweak filename/lineno setting.
5091 * semantics.c (begin_while_stmt): Fix typo in comment.
5092
5093 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5094
5095 * lang-options.h (-fmessage-length=): Add missing option.
5096
5097 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
5098
5099 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
5100
5101 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
5102
5103 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
5104
5105 * optimize.c (expand_call_inline): Emit the return label before
5106 evaluating the return value.
5107
5108 2000-02-24 Mark Mitchell <mark@codesourcery.com>
5109
5110 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
5111 than duplicating functionality here.
5112 * optimize.c: Include input.h.
5113 (expand_call_inline): Use push_srcloc and pop_srcloc.
5114 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
5115 * parse.c: Regenerated.
5116 * Makefile.in (lex.o): Depend on input.h.
5117 (optimize.o): Likewise.
5118
5119 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
5120
5121 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
5122 function type, rather than ICE.
5123
5124 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
5125
5126 * decl.c (grokdeclarator): Call decl_type_access_control.
5127 * parse.y (parse_end_decl): Don't call decl_type_access_control if
5128 decl is null.
5129
5130 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
5131
5132 * decl.c (decls_match): Remove obsolete static member nadgering.
5133
5134 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5135
5136 * decl.c (grokdeclarator): Change ANSI to ISO.
5137 * lex.c (consume_string, readescape, do_identifier): Likewise.
5138 (parse_float, real_yylex): Likewise.
5139 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
5140 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
5141 new_type_id, maybe_label_decls, simple_stmt,
5142 for.init.statement): Likewise.
5143 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
5144 * semantics.c (finish_named_return_value): Likewise.
5145 * parse.c: Regenerate.
5146
5147 2000-02-21 Mark Mitchell <mark@codesourcery.com>
5148
5149 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
5150 (CPTI_CLASS_STAR_TYPE): Remove.
5151 (vtable_index_type): Likewise.
5152 (class_star_type_node): Remove.
5153 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
5154 (build_binary_op_nodefault): Remove.
5155 * call.c (build_new_op): Use build_binary_op instead of
5156 build_binary_op_nodefault.
5157 * decl.c (init_decl_processing): Remove class_star_type_node
5158 initialization. Make delta_type_node ptrdiff_type_node under the
5159 new ABI. Initialize vtable_index_type.
5160 (build_ptrmemfunc_type): Build different structures for the new
5161 ABI.
5162 (build_enumerator): Use build_binary_op instead of
5163 build_binary_op_nodefault.
5164 * method.c (build_overload_value): Mangle pointers-to-members
5165 appropriately under the new ABI.
5166 * typeck.c (build_array_ref): Use build_binary_op instead of
5167 build_binary_op_nodefault.
5168 (get_member_function_from_ptrfunc): Adjust for the new ABI.
5169 (build_binary_op_nodefault): Rename to ...
5170 (build_binary_op): ... this. Remove old version. Adjust for
5171 pointer-to-member comparisons under the new ABI.
5172 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
5173 (build_ptrmemfunc): Adjust for the new ABI.
5174 (expand_ptrmemfunc_cst): Likewise.
5175 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
5176 (pfn_from_ptrmemfunc): Adjust for the new ABI.
5177
5178 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
5179
5180 * call.c (build_object_call): Compress consecutive calls to
5181 cp_error.
5182 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
5183 (build_op_delete_call): Adjust message formatting.
5184
5185 * class.c (check_bases): Compress consecutive calls to
5186 cp_pedwarn.
5187 (finish_struct_anon): Say 'ISO C++'.
5188
5189 * decl.c (start_decl): Same here.
5190 (grok_reference_init): Likewise.
5191 (grokfndecl): Correct message formatting.
5192 (grokfndecl): Improve diagnostic.
5193 (check_static_variable_definition): Likewise. Say 'ISO C++'
5194 (compute_array_index_type): Say 'ISO C++'
5195 (create_array_type_for_decl): Compress consecutive calls to
5196 cp_error.
5197 (grokdeclarator): Say 'ISO C++'
5198 (grok_op_properties): Likewise.
5199
5200 * decl2.c (delete_sanity): Clairify diagnostic.
5201 (check_member_template): Same here.
5202 (grok_function_init): Use consistent terminology.
5203
5204 * expr.c (do_case): Say 'ISO C++'
5205
5206 * friend.c (do_friend): Compress consecutive calls to warning.
5207
5208 2000-02-20 Mark Mitchell <mark@codesourcery.com>
5209
5210 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
5211 * class.c (build_secondary_vtable): Reorganize. Don't create a
5212 new vtable under the new ABI.
5213 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
5214 computing the size.
5215 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
5216 the initializing elements.
5217 (initialize_vtable): New function.
5218 (dfs_finish_vtbls): Use it.
5219 (dfs_accumulate_vtbl_inits): New function.
5220 (finish_vtbls): Merge primary and secondary vtables under the new
5221 ABI.
5222 (finish_struct_1): Remove redundant call to layout_vtable_decl.
5223 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
5224 aren't VAR_DECLs.
5225
5226 * class.c (build_vtable): New function, split out from ...
5227 (get_vtable_decl): ... here, and ...
5228 (build_secondary_vtable): ... here.
5229
5230 * pt.c (tsubst_decl): Fix formatting.
5231
5232 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5233
5234 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
5235 (avoid_overlap, build_base_field): Likewise.
5236 (build_base_field, build_base_fields, is_empty_class):
5237 Test DECL_SIZE with integer_zero.
5238 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
5239 * cp-tree.h (struct lang_type): New field size_unit.
5240 (CLASSTYPE_SIZE_UNIT): New macro.
5241 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
5242 (cp_finish_decl): Delete -Wlarger-than processing.
5243 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
5244 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
5245 * tree.c (make_binfo): binfo vector is one entry longer.
5246 (walk_tree): Walk DECL_SIZE_UNIT.
5247
5248 2000-02-19 Mark Mitchell <mark@codesourcery.com>
5249
5250 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
5251 comment.
5252 (build_vtable_entry): Don't assume all vtable entries are
5253 functions.
5254 (build_vtbl_initializer): Adjust accordingly.
5255 (get_vtable_decl): Fix formatting.
5256
5257 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
5258
5259 * semantics.c (deferred_type_access_control): Walk the entire
5260 type_lookups list.
5261 (save_type_access_control): Rename from
5262 initial_deferred_type_access_control. Just remember the value.
5263 (decl_type_access_control): New fn.
5264 (begin_function_definition): Use deferred_type_access_control, after
5265 we've started the function. Set type_lookups to error_mark_node.
5266 * parse.y (frob_specs, fn.def1): Adjust.
5267 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
5268 (parse_end_decl, parse_bitfield0, parse_method): New fns.
5269 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
5270 (after_type_component_declarator0): Likewise.
5271 (after_type_component_declarator): Likewise.
5272 (notype_component_declarator): Likewise.
5273 * cp-tree.h: Adjust.
5274
5275 * decl.c (redeclaration_error_message): Allow redeclaration of
5276 namespace-scope decls.
5277
5278 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5279
5280 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
5281
5282 2000-02-17 Mark Mitchell <mark@codesourcery.com>
5283
5284 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
5285 * decl2.c (grokclassfn): Likewise.
5286
5287 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
5288
5289 * decl2.c (lang_decode_option): Don't set default message length
5290 here.
5291 * lex.c (lang_init_options): Set it here.
5292
5293 2000-02-16 Mark Mitchell <mark@codesourcery.com>
5294
5295 Make DECL_CONTEXT mean the class in which a member function was
5296 declared, even for a virtual function.
5297 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
5298 (DECL_FRIEND_CONTEXT): New macro.
5299 (DECL_REAL_CONTEXT): Remove.
5300 (SET_DECL_FRIEND_CONTEXT): Likewise.
5301 (DECL_VIRTUAL_CONTEXT): Adjust.
5302 (DECL_CLASS_SCOPE_P): Use TYPE_P.
5303 (add_friends): Remove.
5304 (hack_decl_function_context): Likewise.
5305 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
5306 CP_DECL_CONTEXT.
5307 (build_over_call): Fix indentation. Use DECL_CONTEXT
5308 instead of DECL_CLASS_CONTEXT.
5309 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
5310 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5311 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5312 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
5313 (build_base_field): Likewise.
5314 (finish_struct_1): Likewise.
5315 (build_self_reference): Likewise.
5316 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
5317 DECL_REAL_CONTEXT.
5318 (pushtag): Use decl_function_context, not
5319 hack_decl_function_context.
5320 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5321 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
5322 (pushdecl): Remove bogus code.
5323 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
5324 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5325 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5326 Use decl_function_context, nothack_decl_function_context.
5327 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
5328 (grokdeclarator): Likewise. Use decl_function_context, not
5329 hack_decl_function_context.
5330 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
5331 (start_function): Use DECL_FRIEND_CONTEXT, not
5332 DECL_CLASS_CONTEXT. Use decl_function_context, not
5333 hack_decl_function_context.
5334 (finish_function): Use decl_function_context, not
5335 hack_decl_function_context.
5336 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
5337 DECL_CLASS_CONTEXT.
5338 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
5339 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
5340 (grokfield): Likewise.
5341 (finish_builtin_type): Likewise.
5342 (finish_vtable_vardec): Use decl_function_context, not
5343 hack_decl_function_context.
5344 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5345 (start_static_initialization_or_destruction): Likewise.
5346 (finish_static_initialization_or_destruction): Likewise.
5347 (mark_used): Adjust logic for deciding when to synthesize methods.
5348 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
5349 DECL_REAL_CONTEXT.
5350 * error.c (dump_function_decl): Use DECL_CONTEXT, not
5351 DECL_CLASS_CONTEXT.
5352 * friend.c (is_friend): Likewise.
5353 (add_friends): Remove.
5354 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
5355 * lex.c (begin_definition_of_inclass_inline): Use
5356 decl_function_context, not hack_decl_function_context.
5357 (process_next_inline): Likewise.
5358 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5359 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
5360 DECL_CLASSS_CONTEXT.
5361 (hack_identifier): Likewise.
5362 (synthesize_method): Use decl_function_context, not
5363 hack_decl_function_context.
5364 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
5365 DECL_REAL_CONTEXT.
5366 (is_member_template): Use decl_function_context, not
5367 hack_decl_function_context. Use DECL_CONTEXT, not
5368 DECL_CLASS_CONTEXT.
5369 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
5370 DECL_CLASS_CONTEXT.
5371 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
5372 DECL_REAL_CONTEXT.
5373 (push_template_decl_real): Likewise.
5374 (instantiate_class_template): Don't call add_friends.
5375 (tsubst_default_argument): Use DECL_CONTEXT, not
5376 DECL_REAL_CONTEXT.
5377 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5378 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5379 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
5380 DECL_CLASS_CONTEXT.
5381 * repo.c (repo_inline_used): Likewise.
5382 * search.c (current_scope): Adjust for new _CONTEXT macros.
5383 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
5384 DECL_REAL_CONTEXT.
5385 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5386 (lookup_fnfields_here):Likewise.
5387 (check_final_overrider): Likewise.
5388 (init_vbase_pointers): Likewise.
5389 (virtual_context): Likewise.
5390 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
5391 (expand_body): Use decl_function_context, not
5392 hack_decl_function_context.
5393 * tree.c (hack_decl_function_context): Remove.
5394 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
5395 DECL_CLASS_CONTEXT.
5396 * typeck2.c (error_not_base_type): Likewise.
5397
5398 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
5399
5400 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
5401
5402 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5403
5404 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
5405
5406 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
5407
5408 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
5409
5410 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
5411
5412 * decl2.c (lang_decode_option): Enable automatic line wrapping.
5413
5414 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
5415
5416 * parse.y (frob_specs): Split out...
5417 (parse_decl): From here.
5418 (fn.def2): Call initial_deferred_type_access_control.
5419 (after_type_component_declarator0): Call frob_specs.
5420 (notype_component_declarator0): Likewise.
5421 * search.c (friend_accessible_p): Nested classes are friends of their
5422 enclosing classes.
5423
5424 2000-02-10 Mark Mitchell <mark@codesourcery.com>
5425
5426 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
5427 used to create an implicit temporary.
5428
5429 * class.c (dfs_modify_vtables): Tweak calculation of functions to
5430 override.
5431
5432 2000-02-08 Nathan Sidwell <nathan@acm.org>
5433
5434 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
5435 strip array element qualifiers too.
5436
5437 2000-02-07 Mark Mitchell <mark@codesourcery.com>
5438
5439 * decl.c (store_parm_decls): Don't build cleanups for parameters
5440 while processing_template_decl.
5441
5442 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
5443
5444 * cp-tree.h (struct saved_scope): Add incomplete field.
5445 (namespace_scope_incomplete): New macro.
5446 * decl.c (pushdecl): Use it.
5447 (hack_incomplete_structures): Use it. See through artificial
5448 binding levels.
5449 (mark_saved_scope): Mark it.
5450
5451 Implement access control for nested types.
5452 * search.c (type_access_control): New fn.
5453 (accessible_p): Now we do perform access control for types.
5454 * semantics.c (deferred_type_access_control): New fn.
5455 (initial_deferred_type_access_control): New fn.
5456 (begin_function_definition): Call it. Add lookups parm.
5457 * decl.c (struct binding_level): Add this_class field.
5458 (pushlevel_class): Set it.
5459 (mark_binding_level): Mark it.
5460 (lookup_name_real): Use it. Call type_access_control.
5461 (mark_saved_scope): Mark lookups field.
5462 * cp-tree.h (flagged_type_tree): Add lookups field.
5463 (struct saved_scope): Add lookups field.
5464 (type_lookups): New macro.
5465 * parse.y (declmods): Now <ftype>.
5466 (parse_decl): Add lookups parm. Call
5467 initial_deferred_type_access_control.
5468 (lang_extdef): Clear type_lookups.
5469 (typed_declspecs, declmods, typespec): Set lookups field.
5470 (initdcl): Call deferred_type_access_control.
5471 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
5472 component_decl_1, named_parm): Adjust.
5473 * friend.c (is_friend): Nested classes are friends of their
5474 enclosing classes.
5475
5476 * class.c (currently_open_derived_class): New fn.
5477 * method.c (hack_identifier): Use it.
5478
5479 * lex.c (do_identifier): Remove obsolete code.
5480
5481 * parse.y (typed_typespecs): Propagate new_type_flag properly.
5482
5483 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
5484
5485 * tinfo.h: Remove apostrophes from C++ comment (xgettext
5486 thinks this file is plain C).
5487
5488 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5489
5490 * Makefile.in (call.o): Depend on $(EXPR_H).
5491
5492 * call.c: Include "expr.h".
5493
5494 * class.c (dump_class_hierarchy): Add prototype.
5495
5496 * search.c (dfs_get_pure_virtuals): Likewise.
5497
5498 2000-02-1 Ulrich Drepper <drepper@redhat.com>
5499
5500 * parse.y (simple_stmt): Allow :: token in asm parameter list.
5501 * parse.c: Rebuilt.
5502
5503 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
5504
5505 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
5506 Store it in DECL_FCONTEXT.
5507 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
5508
5509 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
5510
5511 * tinfo.h (old abi): #include "tconfig.h".
5512 * tinfo.cc (convert_to_base): Move into old abi section.
5513
5514 2000-01-31 Mark Mitchell <mark@codesourcery.com>
5515
5516 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
5517 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
5518 (BINFO_PRIMARY_BINFO): New macro.
5519 (BF_DELTA): Rename to ...
5520 (BV_DELTA): ... this.
5521 (BF_VCALL_INDEX): Rename to ...
5522 (BV_VCALL_INDEX): ... this.
5523 (BF_FN): Rename to ...
5524 (BV_FN): ... this.
5525 * class.c (build_vbase_path): Adjust for changes to reverse_path.
5526 (set_rtti_entry): Rename BF_ macros to BV_ variants.
5527 (modify_vtable_entry): Simplify.
5528 (add_virtual_function): Rename BF_ macros to BV_ variants.
5529 (build_vtable_initializer): Likewise.
5530 (get_class_offset_1): Remove.
5531 (dfs_get_class_offset): Likewise.
5532 (get_class_offset): Likewise.
5533 (dfs_find_final_overrider): New function.
5534 (find_final_overrider): Likewise.
5535 (modify_one_vtable): Remove.
5536 (dfs_find_base): New function.
5537 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
5538 find_final_overrider.
5539 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
5540 virtuals.
5541 (dfs_fixup_vtable_deltas): Remove.
5542 (override_one_vtable): Remove.
5543 (merge_overrides): Likewise.
5544 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
5545 unreal chilren of virtual bases.
5546 (finish_struct_1): Don't use merge_overrides. Don't use
5547 dfs_fixup_vtable_deltas.
5548 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
5549 BINFOs.
5550
5551 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
5552 Jason Merrill <jason@yorick.cygnus.com>
5553
5554 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
5555
5556 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
5557
5558 * exception.cc (__throw_bad_typeid): Add missing std::.
5559
5560 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5561
5562 * cp-tree.h (make_thunk): PROTO -> PARAMS.
5563
5564 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
5565
5566 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
5567
5568 Runtime support for new-abi rtti.
5569 * inc/typeinfo (type_info::operator!=): Define in class.
5570 (type_info::before, type_info::name, type_info::operator==,
5571 type_info::operator!=): Define new ABI implementations.
5572 (type_info::is_pointer_p, type_info::is_function_p): Declare
5573 new virtual functions.
5574 (type_info::do_catch, type_info::do_upcast): Likewise.
5575
5576 * tinfo.h (__base_class_info): Define new class.
5577 (__class_type_info): Likewise.
5578 (__si_class_type_info): Likewise.
5579 (__vmi_class_type_info): Likewise.
5580 (__dynamic_cast): Prototype.
5581
5582 * tinfo.cc: Conditionalize old and new rtti mechanisms.
5583 (type_info::is_pointer_p): Define new function.
5584 (type_info::is_function_p): Likewise.
5585 (type_info::do_catch): Likewise.
5586 (type_info::do_upcast): Likewise.
5587 (vtable_prefix): New structure for vtable access.
5588 (adjust_pointer): Define new template function.
5589 (contained_p, public_p, virtual_p, contained_public_p,
5590 contained_nonpublic_p, contained_nonvirtual_p): Define new
5591 functions.
5592 (nonvirtual_base_type): New local variable.
5593 (__class_type_info::~__class_type_info): Define.
5594 (__si_class_type_info::~__si_class_type_info): Likewise.
5595 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
5596 (__class_type_info::do_catch): Define new function.
5597 (__class_type_info::do_upcast): Likewise.
5598 (__class_type_info::find_public_src): Likewise.
5599 (__class_type_info::do_find_public_src): Likewise.
5600 (__si_class_type_info::do_find_public_src): Likewise.
5601 (__vmi_class_type_info::do_find_public_src): Likewise.
5602 (__class_type_info::do_dyncast): Likewise.
5603 (__si_class_type_info::do_dyncast): Likewise.
5604 (__vmi_class_type_info::do_dyncast): Likewise.
5605 (__class_type_info::do_upcast): Likewise.
5606 (__si_class_type_info::do_upcast): Likewise.
5607 (__vmi_class_type_info::do_upcast): Likewise.
5608 (__dynamic_cast): Likewise.
5609
5610 * tinfo2.cc (__fundamental_type_info): Define new class.
5611 (__pointer_type_info): Likewise.
5612 (__reference_type_info): Likewise.
5613 (__array_type_info): Likewise.
5614 (__function_type_info): Likewise.
5615 (__enum_type_info): Likewise.
5616 (__ptr_to_member_type_info): Likewise.
5617 (__fundamental_type_info::~__fundamental_type_info): Define.
5618 (__pointer_type_info::~__pointer_type_info): Likewise.
5619 (__reference_type_info::~__reference_type_info): Likewise.
5620 (__array_type_info::~__array_type_info): Likewise.
5621 (__function_type_info::~__function_type_info): Likewise.
5622 (__enum_type_info::~__enum_type_info): Likewise.
5623 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
5624 (__pointer_type_info::do_catch): Define new function.
5625 (__ptr_to_member_type_info::do_catch): Define new function.
5626
5627 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
5628 (__is_pointer): Likewise.
5629
5630 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
5631
5632 2000-01-30 Mark Mitchell <mark@codesourcery.com>
5633
5634 * cp/class.c (build_vtable): Rename to build_primary_vtable.
5635 (prepare_fresh_vtable): Rename to build_secondary_vtable.
5636 (make_new_vtable): New function.
5637 (modify_vtable_entry): Handle generation of new vtables correctly.
5638 (modify_one_vtable): Remove unused parameter.
5639 (dfs_fixup_vtable_deltas): Likewise.
5640 (override_one_vtable): Use build_secondary_vtable.
5641 (finish_struct_1): Use build_primary_vtable and
5642 build_secondary_vtable.
5643
5644 2000-01-28 Ulrich Drepper <drepper@redhat.com>
5645
5646 * cp/decl.c: Adjust variable names, comments, help strings.
5647
5648 2000-01-29 Nathan Sidwell <nathan@acm.org>
5649
5650 * new2.cc (operator delete[]): Use operator delete, don't assume
5651 implementation.
5652
5653 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
5654
5655 * class.c (build_vtbl_initializer): Add argument to
5656 build_vtable_entry call.
5657
5658 2000-01-27 Mark Mitchell <mark@codesourcery.com>
5659
5660 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
5661 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
5662 (BF_DELTA): New macro.
5663 (BF_VCALL_INDEX): Likewise.
5664 (BF_FN): Likewise.
5665 (THUNK_VCALL_OFFSET): Likewise.
5666 (make_thunk): Change prototype.
5667 * class.c (build_vtable_entry): Integrate
5668 build_vtable_entry_for_fn. Handle vcall indices.
5669 (build_vtable_entry_for_fn): Remove.
5670 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
5671 BF_VCALL_INDEX, BF_FN.
5672 (modify_vtable_entry): Integrate common code from
5673 modify_one_vtable and dfs_fixup_vtable_deltas.
5674 (add_virtual_function): Set BF_VCALL_INDEX.
5675 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
5676 and BF_FN.
5677 (modify_one_vtable): Simplify.
5678 (dfs_fixup_vtable_deltas): Likewise.
5679 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
5680 * method.c (make_thunk): Handle vcall indices.
5681
5682 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
5683
5684 Compiler side new abi rtti (not enabled).
5685 * cp-tree.h (new_abi_rtti_p): New macro.
5686 (emit_support_tinfos): Prototype new function.
5687 (tinfo_decl_p): Likewise.
5688 (emit_tinfo_decl): Likwise.
5689 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
5690 macros.
5691 (doing_runtime): New local static.
5692 (init_rtti_processing): Add new-abi initializer.
5693 (get_tinfo_decl): Add new-abi logic.
5694 (tinfo_from_decl): Likewise.
5695 (build_dynamic_cast_1): Likewise.
5696 (qualifier_flags): New static function.
5697 (tinfo_base_init): Likewise.
5698 (generic_initializer): Likewise.
5699 (ptr_ref_initializer): Likewise.
5700 (ptmd_initializer): Likewise.
5701 (class_hint_flags): Likewise.
5702 (class_initializer): Likewise.
5703 (synthesize_tinfo_var): Likewise.
5704 (create_real_tinfo_var): Likewise.
5705 (create_pseudo_type_info): Likewise.
5706 (get_vmi_pseudo_type_info): Likewise.
5707 (create_tinfo_types): Likewise.
5708 (emit_support_tinfos): New global function.
5709 (tinfo_decl_p): New global predicate.
5710 (emit_tinfo_decl): New global function.
5711 * class.c (set_rtti_entry): Generalize for old and new rtti.
5712 (build_vtbl_initializer): Likewise.
5713 * decl2.c (finish_file): Likewise.
5714
5715 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
5716
5717 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
5718 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
5719
5720 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
5721
5722 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
5723 for scopes.
5724
5725 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
5726
5727 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
5728
5729 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
5730
5731 * optimize.c (calls_setjmp_r): Supply new argument
5732 to special_function_p.
5733
5734 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5735
5736 * call.c: PROTO -> PARAMS.
5737 * class.c: Likewise.
5738 * cp-tree.h: Likewise.
5739 * cvt.c: Likewise.
5740 * decl.c: Likewise.
5741 * decl.h: Likewise.
5742 * decl2.c: Likewise.
5743 * dump.c: Likewise.
5744 * errfn.c: Likewise.
5745 * error.c: Likewise.
5746 * except.c: Likewise.
5747 * expr.c: Likewise.
5748 * init.c: Likewise.
5749 * input.c: Likewise.
5750 * lex.c: Likewise.
5751 * lex.h: Likewise.
5752 * method.c: Likewise.
5753 * optimize.c: Likewise.
5754 * parse.y: Likewise.
5755 * pt.c: Likewise.
5756 * repo.c: Likewise.
5757 * rtti.c: Likewise.
5758 * search.c: Likewise.
5759 * semantics.c: Likewise.
5760 * spew.c: Likewise.
5761 * tree.c: Likewise.
5762 * typeck.c: Likewise.
5763 * typeck2.c: Likewise.
5764 * xref.c: Likewise.
5765
5766 2000-01-25 Richard Henderson <rth@cygnus.com>
5767
5768 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5769
5770 2000-01-25 Mark Mitchell <mark@codesourcery.com>
5771
5772 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5773 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5774 (struct vcall_offset_data_s): New type.
5775 (dfs_vcall_offset_queue_p): New function.
5776 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5777 (build_vcall_offset_vtbl_entries): Likewise.
5778 (layout_vtable_decl): Likewise.
5779 (num_vfun_entries): Likewise.
5780 (num_extra_vtbl_entries): Add the entries for vcall offsets.
5781 (build_vtbl_initializer): Likewise.
5782 (dfs_finish_vtabls): Use layout_vtable_decl.
5783 (modify_one_vtables): Always duplicate vtables under the new ABI.
5784 (finish_struct_1): Use layout_vtable_decl.
5785
5786 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5787
5788 * decl.c (member_function_or_else): Change third arg from a format
5789 specifier to an `enum overload_flags'. Callers changed.
5790
5791 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
5792
5793 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5794 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5795 build_const_cast, get_delta_difference, check_return_expr): Avoid
5796 ANSI string concatenation usage.
5797
5798 2000-01-24 Mark Mitchell <mark@codesourcery.com>
5799
5800 * class.c (layout_class_type): Put the fields required to make a
5801 class non-empty at the end, not the beginning, of the TYPE_FIELDs
5802 list.
5803
5804 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
5805
5806 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5807 template.
5808
5809 * decl2.c (mark_used): Do instantiate inlines that have been
5810 explicitly instantiated.
5811
5812 2000-01-24 Richard Henderson <rth@cygnus.com>
5813
5814 * call.c (build_over_call): Use expand_tree_builtin.
5815 * typeck.c (build_function_call_real): Likewise.
5816 (build_binary_op_nodefault): Handle unordered compares.
5817
5818 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5819
5820 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5821 cp_tree_index values.
5822 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5823 New global node #defines for them.
5824 * rtti.c (call_void_fn): Replace with ...
5825 (build_runtime_decl): ... new static function.
5826 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5827 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5828 (build_dynamic_cast_1): Always produce correctly typed result.
5829 Explicitly produce type_info addresses. Use dynamic_cast_node.
5830 * exception.cc (__throw_bad_cast): Return `void *'.
5831 (__throw_bad_typeid): Return `const type_info &'.
5832
5833 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5834
5835 * cp-tree.h (get_vtable_decl): Prototype new function.
5836 * class.c (get_vtable_decl): New function. Broken out from ...
5837 (build_vtable): ... here. Use it.
5838 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5839 by get_vtable_decl.
5840
5841 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
5842
5843 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5844 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5845 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5846 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5847 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5848 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5849 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5850 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5851 (CPTI_TINFO_VAR_ID): New enumeration.
5852 (__tp_desc_type_node, __access_mode_type_node,
5853 __bltn_desc_type_node, __user_desc_type_node,
5854 __class_desc_type_node, __ptr_desc_type_node,
5855 __attr_desc_type_node, __func_desc_type_node,
5856 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5857 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5858 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5859 enum_desc_type_node, class_desc_type_node,
5860 si_class_desc_type_node, vmi_class_desc_type_node,
5861 ptmd_desc_type_node, base_desc_type_node): New #defines.
5862 (tinfo_fn_id, tinfo_fn_type): Rename to ...
5863 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5864 (tinfo_var_id): New enumeration.
5865 (DECL_TINFO_FN_P): Augment comment.
5866 * decl.c (cp_global_trees): Adjust documentation.
5867 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5868 tinfo_decl_type and tinfo_var_id.
5869 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5870 (build_typeid): Remove unused variable.
5871 (get_tinfo_var): Use tinfo_var_id.
5872 (tinfo_name): New static function.
5873 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5874 (tinfo_from_decl): Likewise.
5875 (get_base_offset): New static function, broken out of
5876 expand_class_desc.
5877 (expand_si_desc): Use tinfo_name.
5878 (expand_class_desc): Likewise. Lose local static variable.
5879 Use base_desc_type_node. Use get_base_offset.
5880 (expand_ptr_desc): Use tinfo_name.
5881 (expand_attr_desc): Likewise.
5882 (expand_generic_desc): Likewise.
5883
5884 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5885 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5886
5887 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5888
5889 * cp-tree.h (__eprintf): Remove declaration.
5890 * tree.c (__eprintf): Remove definition.
5891
5892 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
5893 Mark Mitchell <mark@codesourcery.com>
5894
5895 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5896 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5897
5898 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
5899
5900 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5901
5902 2000-01-23 Mark Mitchell <mark@codesourcery.com>
5903
5904 * cp-tree.h (register_dtor_fn): New function.
5905 * decl.c (destroy_local_static): Rename to ...
5906 (register_dtor_fn): ... this. Give it external linkage.
5907 (expand_static_init): Use it.
5908 * decl2.c (do_static_initialization): Likewise, if using
5909 __cxa_atexit.
5910 (do_static_destruction): Check that __cxa_atexit is not in use.
5911 (finish_file): Don't call do_static_destruction if using
5912 __cxa_atexit.
5913
5914 * typeck.c (convert_arguments): Restore two-message error
5915 reporting.
5916
5917 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
5918
5919 Remap dynamic cast hint values to be consistent across ABIs.
5920 * search.c (dynamic_cast_base_recurse): Remap generated value.
5921 (get_dynamic_cast_base_type): Adjust documentation.
5922 * tinfo.h (__user_type_info::dyncast): Likewise.
5923 (__user_type_info::find_public_subobj): Remap BOFF meaning.
5924 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5925 (__class_type_info::do_dyncast): Likewise.
5926 (__class_type_info::do_find_public_subobj): Likewise.
5927 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
5928
5929 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5930
5931 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5932
5933 * typeck2.c (incomplete_type_error): Restore previous
5934 cp_error and cp_error_at call sequence.
5935
5936 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
5937
5938 * class.c (dump_class_hierarchy): Make format agree with argument;
5939 cast pointer to unsigned long and print with %lx.
5940
5941 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
5942
5943 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5944
5945 * typeck.c (composite_pointer_type, common_type,
5946 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5947 build_function_call_real, convert_arguments,
5948 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5949 build_unary_op, mark_addressable, build_compound_expr,
5950 build_static_cast, build_reinterpret_cast, build_const_cast,
5951 build_c_cast, build_modify_expr, get_delta_difference,
5952 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
5953 'ISO C++'. Fusion consecutive calls to diagnotic message routines
5954 into a single one.
5955 * typeck2.c (readonly_error, abstract_virtuals_error,
5956 process_init_constructor, check_for_new_type): Likewise.
5957
5958 2000-01-19 Mark Mitchell <mark@codesourcery.com>
5959
5960 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5961 VAR_DECLs.
5962
5963 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
5964
5965 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5966 (build_x_typeid): Likewise.
5967 (get_tinfo_fn): Likewise.
5968 (get_tinfo_fn_unused): Rename to ...
5969 (get_tinfo_decl): ... here.
5970 * rtti.c (build_headof): Replace logic error with assertion.
5971 (get_tinfo_fn_dynamic): Rename to ...
5972 (get_tinfo_decl_dynamic): ... here. Make static. Use
5973 complete_type_or_else.
5974 (build_x_typeid): Move into ...
5975 (build_typeid): ... here. Adjust call to
5976 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5977 throw_bad_typeid expression.
5978 (get_tinfo_fn_unused): Rename to ...
5979 (get_tinfo_decl): ... here. Adjust comment.
5980 (get_tinfo_fn): Delete.
5981 (tinfo_from_decl): New static function.
5982 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5983 (get_typeid): Use complete_type_or_else.
5984 (build_dynamic_cast_1): Adjust calls to
5985 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5986 * parse.y (primary): Adjust call to build_typeid.
5987 * except.c (build_eh_type_type_ref): Adjust call to
5988 get_tinfo_decl. Mark as used.
5989 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5990 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5991 * parse.c: Regenerated.
5992
5993 2000-01-17 Mark Mitchell <mark@codesourcery.com>
5994
5995 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
5996 calling convention.
5997 (resolves_to_fixed_type_p): Document calling convention.
5998 * rtti.c (build_x_typeid): Initialize NONNULL.
5999
6000 * cp-tree.h (build_shared_int_cst): New function.
6001 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
6002 * class.c (modify_vtable_entry): Likewise.
6003 (add_virtual_function): Split out code to generated shared
6004 INTEGER_CSTs to build_share_int_cst.
6005 (modify_all_vtables): Handle all the overridden functions here.
6006 Add overridden functions from non-primary virtual bases to the
6007 primary vtable.
6008 (finish_struct_1): Adjust call to modify_all_vtables. Add
6009 overridden functions from non-primary bases to the vtable.
6010 * tree.c (build_shared_int_cst): New function.
6011
6012 * cp-tree.h (scratchalloc): Remove.
6013 (build_scratch_list): Likewise.
6014 * call.c (convert_class_to_reference): Replace build_scratch_list
6015 and build_expr_list with build_tree_list.
6016 (add_candidate): Replace scratchalloc with expralloc. Note memory
6017 leak.
6018 (build_user_type_conversion_1): Replace build_scratch_list
6019 and build_expr_list with build_tree_list.
6020 (build_new_op): Likewise.
6021 (build_op_delete_call): Likewise.
6022 (convert_like): Likewise.
6023 * cvt.c (ocp_convert): Likewise.
6024 * decl.c (start_decl): Likewise.
6025 (start_function): Likewise.
6026 (finish_destructor_body): Likewise.
6027 (maybe_build_cleanup_1): Likewise.
6028 * decl2.c (reparse_decl_as_expr): Likewise.
6029 * init.c (perform_member_init): Likewise.
6030 (expand_cleanup_for_base): Likewise.
6031 (build_builtin_delete_call): Likewise.
6032 (build_new_1): Likewise.
6033 (build_delete): Likewise.
6034 * method.c (do_build_assign_ref): Likewise.
6035 * parse.y (already_scoped_stmt): Likewise.
6036 (nontrivial_exprlist): Likewise.
6037 (net_initializer): Likewise.
6038 (initlist): Likewise.
6039 * parse.c: Regenerated.
6040 * rtti.c (build_x_typeid): Likewise.
6041 (build_dynamic_cast_1): Likewise.
6042 * typeck.c (build_x_compound_expr): Likewise.
6043 (build_static_cast): Likewise.
6044 (build_modify_expr): Likewise.
6045
6046 * cp-tree.h (DECL_VINDEX): Add documentation.
6047 * class.c (build_vtable_entry): Likewise.
6048 (start_vtable): Add comment.
6049 (add_virtual_function): Replace pending_hard_virtuals with
6050 overridden_virtuals and pending_virtuals with new_virtuals.
6051 Replace redundant assignments with assertions.
6052 (check_for_override): Add comment.
6053 (check_bases_and_members): Replace pending_hard_virtuals with
6054 overridden_virtuals and pending_virtuals with new_virtuals.
6055 (create_vtbl_ptr): Likewise.
6056 (layout_class_type): Likewise.
6057 (finish_struct_1): Likewise. Add comments.
6058
6059 2000-01-16 Mark Mitchell <mark@codesourcery.com>
6060
6061 * class.c (finish_struct_1): Replace redundant code with
6062 assertions.
6063
6064 * cp-tree.h (flag_new_abi): Move.
6065 (flag_use_cxa_atexit): Likewise.
6066 (flag_honor_std): Likewise.
6067 (flag_rtti): Likewise.
6068 (vbase_offsets_in_vtable_p): Define.
6069 (vptrs_present_everywhere_p): Likewise.
6070 (TYPE_CONTAINS_VPTR_P): Likewise.
6071 (dfs_walk_real): Declare.
6072 * class.c (build_vbase_pointer_fields): Check
6073 vbase_offsets_in_vtable_p.
6074 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
6075 BINFO_VPTR_FIELD.
6076 (build_vbase_offset_vtbl_entries): Simplify.
6077 (build_vbase_offset_vtbl_entries): Adjust.
6078 (build_vbase_pointer): Add ability to look up vbase offsets in
6079 vtable.
6080 (start_vtable): New function.
6081 (add_virtual_function): Use it.
6082 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
6083 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
6084 (build_vtbl_initializer): Take the type of the complete object as
6085 input. Use it to correctly calculate vbase offsets.
6086 (dfs_finish_vtbls): Pass the complete type to
6087 build_vtbl_initializer.
6088 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
6089 (create_vtable_ptr): Create a vtable even if there are no
6090 new virtual functions, under the new ABI.
6091 (finish_struct_1): Likewise.
6092 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
6093 * decl.c (exapnd_static_init): Remove call to
6094 preserve_initializer.
6095 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
6096 vtables.
6097 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
6098 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
6099 (construct_virtual_bases): Don't initialize virtual base pointers
6100 under the new ABI.
6101 (build_aggr_init): Clean up comment.
6102 (expand_aggr_init_1): Likewise.
6103 * rtti.c (expand_class_desc): Store the virtual function table
6104 index where the vbase offset lives in the offset field.
6105 * search.c (dfs_walk_real): Make it global.
6106 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
6107 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
6108
6109 * tinfo.h (USItype): Make it signed under the new ABI.
6110 * tinfo.cc (convert_to_base): New function. Encapsulate base
6111 conversion logic here.
6112 (__class_type_info::do_upcast): Use it.
6113 (__class_type_info::do_dyncast): Likewise.
6114 (__class_type_info::do_find_public_subobj): Likewise.
6115
6116 * init.c (construct_virtual_bases): Don't look up the addresses of
6117 virtual bases at run-time.
6118
6119 * class.c (build_vbase_pointer): Relocate.
6120 (build_vbase_pointer_fields): Likewise.
6121 (dfs_build_vbase_offset_vtbl_entries): Likewise.
6122 (build_vbase_offset_vtbl_entries): Likewise.
6123
6124 * decl.c (init_decl_processing): Complain if -fnew-abi
6125 -fno-vtable-thunks is used.
6126
6127 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
6128 flag_new_abi.
6129
6130 2000-01-15 Mark Mitchell <mark@codesourcery.com>
6131
6132 * cp-tree.h (num_extra_vtbl_entries): New function.
6133 (size_extra_vtbl_entries): Likewise.
6134 (dfs_vtable_path_unmark): Likewise.
6135 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
6136 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6137 * class.c (num_extra_vtbl_entries): New function.
6138 (size_extra_vtbl_entries): Likewise.
6139 (dfs_build_vbase_offset_vtbl_entries): New function.
6140 (build_vbase_offset_vtbl_entries): Likewise.
6141 (build_vtbl_initializer): Use it.
6142 (finish_struct_1): Adjust vtable sizes (using
6143 num_extra_vtbl_entries).
6144 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
6145 THUNK_DECL is non-NULL before expanding it.
6146 * init.c (expand_virtual_init): Adjust the vtable pointer by
6147 size_extra_vtbl_entries before storing it.
6148 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
6149 Handle TREE_LIST parameters here, not in the dfs_* functions.
6150 (dfs_unmarked_real_bases_queue_p): Adjust.
6151 (dfs_marked_real_bases_queue_p): Likewise.
6152 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
6153 (dfs_vtable_path_marked_real_bases_queue_p): New function.
6154 (dfs_vtable_path_unmark): Likewise.
6155
6156 2000-01-14 Mark Mitchell <mark@codesourcery.com>
6157
6158 * optimize.c (copy_body_r): Clear the operand three of a
6159 TARGET_EXPR when copying it.
6160
6161 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6162
6163 * method.c (build_decl_overload_real): Check whether we are in ::
6164 before returning __builtin_new/delete.
6165
6166 2000-01-13 Mark Mitchell <mark@codesourcery.com>
6167
6168 * pt.c (tsubst_friend_function): Improve comment.
6169 (instantiate_decl): Avoid crashing when a "nested" function is
6170 instantiated from the top level.
6171
6172 * dump.c (dqeueue_and_dump): Dump
6173 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
6174
6175 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6176
6177 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
6178
6179 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
6180
6181 * g++spec.c (lang_specific_driver): Add -fnew-abi if
6182 ENABLE_NEW_GXX_ABI defined.
6183 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
6184 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
6185 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
6186
6187 2000-01-12 Mark Mitchell <mark@codesourcery.com>
6188
6189 * decl.c (start_cleanup_fn): Call pushdecl.
6190
6191 * call.c (convert_class_to_reference): Fix typos.
6192 (build_conditional_expr): Handle errors gracefully.
6193 * class.c (push_nested_class): Likewise.
6194 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
6195 (DECL_THIS_EXTERN): Use it.
6196 (DECL_THIS_STATIC): Likewise.
6197 * cvt.c (convert_to_void): Handle errors gracefully.
6198 (build_expr_type_conversion): Likewise.
6199 * decl.c (maybe_push_decl): Likewise.
6200 (start_decl_1): Likewise.
6201 (require_complete_types_for_parms): Likewise.
6202 * parse.y (structsp): Likewise.
6203 (base_class): Likewise.
6204 * parse.c: Regenerated.
6205 * pt.c (finish_member_template_decl): Likewise.
6206 * typeck.c (decay_conversion): Likewise.
6207
6208 * cp-tree.h (dfs_skip_vbases): New function.
6209 (find_vbase_instance): Likewise.
6210 * class.c (determine_primary_base): Allow a nearly empty base to
6211 serve as a primary base class under the new ABI.
6212 (get_class_offset_1): Rename to ...
6213 (dfs_get_class_offset): ... this. Simplify. Don't issue error
6214 messages here.
6215 (get_class_offset): Use it. Issue error messages here.
6216 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
6217 find the right copies of virtual bases.
6218 (fixup_vtable_deltas1): Rename to ...
6219 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
6220 bases as primary bases.
6221 (fixup_vtable_deltas): Remove.
6222 (override_one_vtable): Handle virtual bases as primary bases.
6223 (merge_overrides): Likewise.
6224 (finish_struct_1): Likewise.
6225 (dump_class_hierarchy): Dump primary-ness of bases as well.
6226 * search.c (mark_primary_bases): Use a pre-order traversal to
6227 handle primary virtual bases.
6228 (dfs_skip_vbases): New fiunction.
6229 (expand_upcast_fixups): Adjust to handle primary virtual bases.
6230 (fixup_virtual_upcast_offsets): Likewise.
6231 (fixup_all_virtual_upcast_offsets): Likewise.
6232 (dfs_find_vbase_instances): New function.
6233 (find_vbase_instance): Likewise.
6234
6235 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
6236
6237 * lex.c (DIR_SEPARATOR): Delete macro.
6238
6239 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
6240
6241 * decl2.c (lang_decode_option): Handle automatic line wrapping
6242 option.
6243
6244 2000-01-11 Mark Mitchell <mark@codesourcery.com>
6245
6246 * friend.c (do_friend): Don't resolve scopes when processing
6247 template declarations, even if the qualifying scope doesn't
6248 involve template parameters.
6249
6250 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
6251
6252 * class.c (dfs_modify_vtables_queue_p): Remove.
6253 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
6254 and dfs_marked_real_bases_queue_p instead of
6255 dfs_modify_vtables_queue_p.
6256
6257 * class.c (build_vbase_path): Simplify.
6258 (dfs_propagate_binfo_offsets): New function.
6259 (propagate_binfo_offsets): Use it.
6260 (remove_base_field): Simplify.
6261 (dfs_set_offset_for_vbases): Remove.
6262 (dfs_set_offset_for_shared_vbases): New function.
6263 (dfs_set_offset_for_unshared_vbases): Likewise.
6264 (layout_virtual_bases): Use them.
6265 (layout_basetypes): Don't call propagate_binfo_offsets.
6266 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
6267 for the vbases.
6268
6269 * class.c (build_base_field): New function, split out from ...
6270 (build_base_fields): ... here. Use it. Allocate primary bases
6271 first, under the new ABI.
6272 (get_vtable_entry): Remove.
6273 (remove_base_field): New function, split out from ...
6274 (remove_base_fields): ... here. Adjust since primary bases come
6275 first under the new ABI.
6276
6277 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
6278 (initialize_vtbl_ptrs): New function.
6279 (expand_indirect_vtbls_init): Change prototype.
6280 (convert_pointer_to_vbase): Declare.
6281 * init.c (expand_direct_vtbls_init): Remove.
6282 (dfs_initialize_vtbl_ptrs): New function.
6283 (initialize_vtbl_ptrs): Likewise.
6284 (emit_base_init): Use initialize_vtbl_ptrs.
6285 * search.c (convert_pointer_to_vbase): Make it global.
6286 (expand_indirect_vtbls_init): Remove vtable initialization code.
6287 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
6288
6289 * class.c (dfs_finish_vtbls): New function.
6290 (finish_vtbls): Use it.
6291 (dump_class_hierarchy): New function.
6292
6293 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
6294 (BINFO_VBASE_PRIMARY_P): New macro.
6295 (BINFO_VIRTUALS): Add to documentation.
6296 (SET_BINFO_PRIMARY_MARKED_P): Remove.
6297 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6298 (dfs_mark_primary_bases_queue_p): Likewise.
6299 (dfs_unmarked_real_bases_queue_p): New function.
6300 (dfs_marked_real_bases_queue_p): Likewise.
6301 * search.c (dfs_mark_primary_bases): Adjust.
6302 (mark_primary_bases): Likewise.
6303 (get_shared_vbase_if_not_primary): New function.
6304 (dfs_unmarked_real_bases_queue_p): Likewise.
6305 (dfs_marked_real_bases_queue_p): Likewise.
6306 (dfs_get_pure_virtuals): Simplify.
6307 (get_pure_virtuals): Likewise.
6308
6309 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6310
6311 * lex.c: Include tm_p.h.
6312
6313 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
6314
6315 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
6316
6317 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
6318
6319 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
6320 * pt.c (instantiate_decl): Defer comdat templates that might not be
6321 needed.
6322
6323 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
6324 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
6325 (finish_file): Likewise.
6326
6327 * decl2.c (import_export_class): Undo 12/14 change.
6328
6329 * error.c (dump_decl): operator new, not operatornew.
6330
6331 * class.c (field_decl_cmp): A nontype is "greater" than a type.
6332 * search.c (lookup_field_1): Look for the last field with the
6333 desired name.
6334
6335 2000-01-05 Nathan Sidwell <nathan@acm.org>
6336
6337 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
6338 FUNCTION_DECL.
6339
6340 2000-01-05 Nathan Sidwell <nathan@acm.org>
6341
6342 * typeck.c (build_static_cast): Don't strip target qualifiers
6343 when casting from a class.
6344
6345 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6346
6347 * class.c (warn_hidden): Initialize variable `fndecl'.
6348
6349 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
6350
6351 * decl.c (flag_isoc9x): New variable to be able to use code in
6352 c-common.c. For now always zero.
6353
6354 2000-01-03 Mark Mitchell <mark@codesourcery.com>
6355
6356 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
6357 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
6358 or unshare_base_binfos for virtual bases here.
6359 * search.c (dfs_get_vbase_types): Do it here.
6360 (get_vbase_types): Adjust.
6361
6362 2000-01-02 Mark Mitchell <mark@codesourcery.com>
6363
6364 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
6365 (BINFO_PRIMARY_MARKED_P): Use flag 5.
6366 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6367 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6368 (unmark_primary_bases): Remove declaration.
6369 (unmarkedp): Declare.
6370 (dfs_vbase_unmark): Likewise.
6371 * class.c (determine_primary_base): Return immediately if there
6372 are no base classes. Call mark_primary_bases here.
6373 (modify_all_direct_vtables): Remove.
6374 (modify_all_indirect_vtables): Remove.
6375 (dfs_modify_vtables_queue_p): New function.
6376 (dfs_modify_vtables): New function.
6377 (modify_all_vtables): Use them.
6378 (build_base_fields): Build FIELD_DECLs for primary virtual base
6379 classes.
6380 (create_vtable_ptr): Don't call determine_primary_base here.
6381 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
6382 (dfs_set_offset_for_vbases): ... this.
6383 (layout_virtual_bases): Use it.
6384 (layout_class_type): Call determine_primary_base here.
6385 * search.c (unmarkedp): Make it global.
6386 (shared_marked_p): Simplify.
6387 (shared_unmarked_p): Likewise.
6388 (dfs_primary_bases_queue_p): Remove.
6389 (dfs_unmark_primary_bases): Likewise.
6390 (unmark_primary_bases): Likewise.
6391 (mark_primary_bases): Simplify.
6392 (get_pure_virtuals): Don't call mark_primary_bases here.
6393 (dfs_vbase_unmark): New function.
6394 (get_vbase_types): Simplify.
6395
6396 * class.c (struct base_info): Remove.
6397 (determine_primary_base): Take has_virtual_p rather than a
6398 base_info as input. Don't calculate max_has_virtual.
6399 (finish_struct_bits): Remove max_has_virtual argument.
6400 (create_vtable_ptr): Remove max_has_virtual_p argument.
6401 (layout_virtual_bases): Remove max argument.
6402 (layout_basetypes): Likewise.
6403 (layout_class_type): Remove max_has_virtual_p argument.
6404 (finish_struct_1): Remove max_has_virtual.
6405
6406 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
6407 (layout_basetypes): Remove.
6408 * class.c (propagate_binfo_offsets): Moved here from tree.c.
6409 Update to handle primary virtual bases.
6410 (remove_base_fields): New function, split out from
6411 layout_basetypes.
6412 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
6413 (layout_virtual_bases): New function, split out from
6414 layout_basetypes. Update to handle primary virtual bases.
6415 (layout_basetypes): Moved here from tree.c. Use
6416 remove_base_fields and layout_virtual_bases.
6417 * search.c (dfs_mark_primary_bases_queue_p): New function.
6418 (mark_primary_bases): Use it.
6419 * tree.c (CEIL): Remove.
6420 (propagate_binfo_offsets): Remove.
6421 (layout_basetypes): Remove.
6422
6423 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6424
6425 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
6426 (BINFO_PRIMARY_MARKED_P): New macro.
6427 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6428 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6429 (mark_primary_bases): New function.
6430 (unmark_primary_bases): Likewise.
6431 * search.c (get_abstract_virtuals_1): Remove.
6432 (dfs_mark_primary_bases): New function.
6433 (mark_primary_bases): Likewise.
6434 (dfs_unmark_primary_bases): Likewise.
6435 (unmark_primary_bases): Likewise.
6436 (dfs_get_pure_virtuals): Likewise.
6437
6438 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6439
6440 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
6441 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
6442 (modify_one_vtable): Adjust.
6443 (fixup_vtable_deltas1): Likewise.
6444 (override_one_vtable): Likewise.
6445 * search.c (get_abstract_virtuals_1): Likewise.
6446 (get_pure_virtuals): Likewise.
6447 (expand_upcast_fixups): Likewise.
6448 * tree.c (debug_binfo): Likewise.
6449
6450 * class.c (build_vtable): Don't return a value. Don't rebuild
6451 vtables for bases that have already been handled.
6452 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
6453 already been handled.
6454 (modify_one_vtable): Adjust accordingly.
6455 (fixup_vtable_deltas1): Likewise.
6456 (finish_struct_1): Likewise.
6457
6458 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6459
6460 * call.c (build_new_method_call): Also check destructors.