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