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