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