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