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