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