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