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