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