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