Makefile.in: Update.
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
2
3         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
4         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
5         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
6         cxx_mark_function_context): New.
7         * decl.c (push_cp_function_context, pop_cp_function_context,
8         mark_cp_function_context): Rename for consistency.
9         (cxx_init_decl_processing): Don't set old hooks.
10
11 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
12
13         * call.c (convert_type_from_ellipsis): Rename, update.
14         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
15         * cp-tree.h (convert_type_from_ellipsis): Rename.
16         * decl.c (cxx_init_decl_processing): Don't set hook.
17
18 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
19
20         * call.c (build_new_method_call): Update.
21         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
22         * cp-tree.h (cxx_incomplete_type_error): New.
23         * decl.c (grokdeclarator, grokparms): Update.
24         * decl2.c (check_classfn): Update.
25         * pt.c (tsubst): Update.
26         * typeck.c (complete_type_or_else, expr_sizeof,
27         decay_conversion): Update.
28         * typeck2.c (incomplete_type_error): Rename.
29         (add_exception_specifier): Update.
30
31 2002-04-18  Jason Merrill  <jason@redhat.com>
32
33         PR c++/5658
34         * search.c (setup_class_bindings): A class template qualifies as a
35         type binding.
36
37 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
38
39         PR c++/6316
40         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
41         before expanding.
42
43 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
44
45         * init.c (begin_init_stmts): Remove commented out code.
46         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
47         * semantics.c (begin_gobal_stmt_expr): Adjust call to
48         expand_start_stmt_expr.
49         
50 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
51
52         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
53         dso_handle itself, to __cxa_atexit.
54
55 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
56
57         * error.c (cxx_print_error_function): Adjust call to macros.
58
59 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
60
61         * class.c (layout_virtual_bases): Do all dsize computation on trees.
62
63 2002-04-14  Jason Merrill  <jason@redhat.com>
64
65         * typeck.c (get_member_function_from_ptrfunc): Don't do
66         gratuitious division and multiplication on
67         ptrmemfunc_vbit_in_delta targets.
68
69 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
70
71         PR c++/5373.
72         * semantics.c (finish_expr_stmt): Remember the type of the
73         expression before any conversions are performed.
74
75 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
76
77         PR c++/5189.
78         * call.c (add_template_candidate_real): Do not treat member
79         templates as copy constructors.
80
81 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
82
83         * decl.c (duplicate_decls): Do not copy the RTL for a variable
84         declaration if the old variable had an incomplete type and the new
85         variable does not.
86         (complete_vars): Do not call layout_decl for completed variables.
87
88 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
89
90         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
91         with an explicit one.
92         (follow_tag_typedef): New.
93         (lookup_tag): Use it to extract the tag of an explicit typedef.
94         (xref_tag): Likewise.
95
96 2002-04-11  Andrew Haley  <aph@redhat.com>
97
98         * typeck.c (type_after_usual_arithmetic_conversions):
99         If two types have the same variant, return immediately.
100         When two floating-point operands are the same precision: 
101           convert to float if one of the operands is float;
102           if neither operand is one of the standard types, return the type
103           of the first operand.
104  
105 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
106
107         PR c++/5507
108         * decl.c (make_typename_type): Remove implicit typenameness.
109
110 2002-04-09  Jason Merrill  <jason@redhat.com>
111
112         PR optimization/6189
113         * semantics.c (genrtl_start_function): Don't free
114         DECL_SAVED_FUNCTION_DATA for inline functions.
115
116         * init.c (build_member_call): For now, don't convert to
117         intermediate base if it would cause an error.
118
119 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
120
121         * parse.y (namespace_qualifier, maybe_identifier,
122         begin_explicit_instantiation, end_explicit_instantiation,
123         apparent_template_type, .finish_template_type,
124         do_id, maybe_init, defarg_again, component_decl_1):
125         Add ending ';', in accordance with POSIX.
126
127 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
128
129         PR c++/5571
130         * class.c (layout_class_type): Remember incomplete static
131         variables.
132         (finish_struct_1): Call complete_vars, not
133         hack_incomplete_structures.
134         * cp-tree.h (hack_incomplete_structures): Rename to ...
135         (complete_vars): ... this.
136         (struct saved_scope): Remove incomplete.
137         (namespace_scope_incomplete): Remove.
138         * decl.c (struct binding_level): Remove incomplete.
139         (incomplete_vars): New variable.
140         (mark_binding_level): Don't mark incomplete.
141         (print_binding_level): Don't print it.
142         (mark_saved_scope): Don't mark incomplete.
143         (pushdecl): Use maybe_register_incopmlete_var.
144         (cxx_init_decl_processing): Register incomplete_vars for GC.
145         (start_decl_1): Clarify error message.
146         (hack_incomplete_vars): Remove.
147         (maybe_register_incomplete_var): New function.
148         (complete_vars): Likewise.
149
150 2002-04-06  Jason Merrill  <jason@redhat.com>
151
152         PR c++/4934
153         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
154         set before checking it.
155
156         PR c++/525
157         * init.c (build_member_call): Use build_scoped_ref.
158         (resolve_offset_ref): Likewise.
159         * call.c (build_scoped_method_call): Likewise.
160         * tree.c (maybe_dummy_object): Kludge around current_class_type being 
161         wrong.
162         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
163         * cp-tree.h: Adjust.
164         
165         * init.c (push_base_cleanups): Just use build_scoped_method_call.
166
167         PR c++/6179
168         * method.c (implicitly_declare_fn): Pass unqualified type to 
169         synthesize_exception_spec.
170
171 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
172
173         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
174         * cvt.c: Update comment.
175         * init.c (expand_cleanup_for_base): Update.
176         * semantics.c (finish_parenthesized_expr): Update.
177         * typeck.c (cp_truthvalue_conversion): Update.
178
179 2002-04-04  Jason Merrill  <jason@redhat.com>
180
181         * semantics.c (finish_eh_cleanup): New fn.
182         * cp-tree.h: Add prototype.
183         * init.c (perform_member_init, expand_cleanup_for_base): Use 
184         finish_eh_cleanup.
185         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
186         * cp-tree.h: Remove references.
187         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
188         * dump.c (cp_dump_tree): Likewise.
189         * pt.c (tsubst_expr): Likewise.
190         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
191         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
192         * tree.c (cp_statement_code_p): Likewise.
193
194         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
195
196         PR c++/5636
197         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
198         cleanup for nrv.
199
200         PR c++/5104
201         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
202         specifiers.
203         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
204
205 2002-04-03  Richard Henderson  <rth@redhat.com>
206
207         * cp-lang.c (cxx_warn_unused_global_decl): New.
208         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
209
210 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
211
212         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
213         * tree.c (init_tree): Don't set hook.
214
215 2002-04-03  Roger Sayle  <roger@eyesopen.com>
216
217         PR c++/5998:
218         * decl.c (duplicate_decls): Don't mess with assembler names when
219         redeclaring builtin functions as static.
220
221 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
222
223         * call.c (build_addr_func): Update.
224         * class.c (resolve_address_of_overloaded_function): Update.
225         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
226         * cp-tree.h (cxx_mark_addressable): New.
227         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
228         * decl2.c (build_cleanup): Update.
229         * except.c (build_throw): Update.
230         * init.c (resolve_offset_ref): Update.
231         * pt.c (convert_nontype_argument): Update.
232         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
233         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
234         unary_complex_lvalue): Update.
235         (mark_addressable): Rename.
236
237 2002-04-01  Roger Sayle  <roger@eyesopen.com>
238
239         PR c++/5998:
240         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
241         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
242         but follow the SET_DECL_RTL idiom used elsewhere in the function.
243
244 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
245
246         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
247         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
248         * decl.c (grokdeclarator): Update.
249         * mangle.c (write_integer_cst): Update.
250         * typeck.c (build_binary_op): Update.
251
252 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
253
254         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
255         * lex.c (cxx_init): Don't set hook.
256
257 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
258
259         * Make-lang.in (error.o): Update.
260         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
261         * cp-tree.h (struct diagnostic_context): Predeclare.
262         (cxx_print_error_function): New.
263         * error.c: Include langhooks-def.h.
264         (lang_print_error_function): Rename.  Update.
265         (init_error): Don't set hook.
266
267 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
268
269         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
270         Redefine.
271         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
272         * decl.c (finish_enum): Similarly.
273         * error.c (dump_type): Similarly.
274         * lex.c (cxx_init): Similarly.
275         * mangle.c (write_builtin_type): Similarly.
276         * typeck.c (comptypes): Similarly.
277
278 2002-03-28  Roger Sayle  <roger@eyesopen.com>
279
280         PR c++/5998:
281         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
282         in the g++ front-end.
283         (duplicate_decl): Allow redefinition of anticipated built-ins.
284         Fix inlining problem by over-writing the old DECL_RTL.
285         (lookup_namespace_name): Fail to find an identifier in the
286         specified namespace if its still anticipated.
287         (builtin_function_1): New function split out from builtin_function
288         to create a builtin in the current namespace with given context.
289         (builtin_function): Call builtin_function_1 to define the
290         appropriate builtins in both the std and global namespaces.
291         (select_decl): Don't test for anticipated decls here.
292         (unqualified_namespace_lookup): Instead ignore them whilst
293         searching through scopes and namespaces.
294         * decl2.c (do_nonmember_using_decl): If a using declaration
295         specifies an anticipated built-in function, mark it as no longer
296         anticipated in that scope.
297         (ambiguous_decl):  Avoid resolving to an anticipated decl.
298         * lex.c (do_scoped_id): Fail to find an identifier in the global
299         namespace if its still anticipated.
300
301 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
302
303         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
304         * cp-tree.h (cp_make_lang_type): Rename.
305         * lex.c (cp_make_lang_type): Rename.
306         (make_aggr_type): Update.
307         * tree.c (init_tree): Don't set make_lang_type_fn.
308
309 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
310
311         PR c++/6073
312         * class.c (finish_struct_1): Update static field's DECL_MODE even
313         if its type is a variant of t.
314
315 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
316
317         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
318         * cp-tree.h (cxx_insert_default_attributes): New.
319         * decl.c (insert_default_attributes): Rename.
320
321 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
322
323         PR c++/4884
324         * call.c (build_op_delete_call): Allow for the fact the placement
325         may be a COMPOUND_EXPR.
326         
327 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
328
329         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
330         * cp-tree.h (init_cplus_expand): Remove.
331         (cxx_expand_expr): New.
332         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
333         fix prototype.
334         (init_cplus_expand): Remove.
335         * lex.c (cxx_init): Don't call init_cplus_expand.
336
337 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
338
339         PR c++/4884.
340         * init.c (build_new_1): Allow for the fact the result of
341         build_function_call may be a COMPOUND_EXPR.
342
343 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
344
345         PR c++/5682
346         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
347         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
348         (dfs_skip_nonprimary_vbases_markedp): Remove.
349         * search.c (get_shared_vbase_if_not_primary): Remove.
350         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
351         (dfs_skip_nonprimary_vbases_markedp): Remove.
352         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
353         (dfs_marked_real_bases_queue_p): Likewise.
354
355 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
356
357         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
358         * cp-tree.h (cxx_mark_tree): New.
359         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
360
361 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
362
363         * cp-tree.h (cxx_maybe_build_cleanup): New.
364         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
365         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
366         * tree.c (build_target_expr): Update.
367         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
368
369 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
370
371         * decl2.c (cxx_decode_option): Handle -E.
372         * lang-specs.h (default_compilers): Preprocess with cc1plus.
373         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
374
375 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
376
377         PR c++/6037
378         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
379
380 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
381
382         * error.c (dump_type): Be careful about implicit typenames.
383
384 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
385
386         PR C++/3656
387         * semantics.c (finish_base_specifier): Handle erronous base
388         classes. 
389
390 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
391
392         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
393         REAL_IS_NOT_DOUBLE.
394
395 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
396
397         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
398         an index into the vtable_entry array regardless of
399         TARGET_PTRMEMFUNC_VBIT_LOCATION.
400
401 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
402
403         * tree.c (cp_cannot_inline_tree_fn): Same.
404
405 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
406
407         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
408         insert_block, getdecls, global_bindings_p): New.
409
410 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
411
412         PR c++/4361
413         * mangle.c (struct globals) Add internal_mangling_p member.
414         (write_template_param): Do internal mangling, if needed.
415         (mangle_conv_op_name_for_type): Request internal mangling.
416
417 2002-03-20  Jason Merrill  <jason@redhat.com>
418
419         PR c++/2136
420         * init.c (build_delete): Check access for a member op delete here.
421         * decl2.c (delete_sanity): Not here.
422
423 2002-03-19  Jason Merrill  <jason@redhat.com>
424
425         PR c++/5118
426         * class.c (get_vfield_name): Use the constructor_name.
427
428 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
429
430         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
431         * cp-tree.h (lang_printable_name): Rename.
432         * error.c (lang_decl_name): Use new hook.
433         * lex.c (cxx_init): Remove old hook.
434         * pt.c (tsubst_decl): Use new hook.
435         * tree.c (lang_printable_name): Rename.
436
437 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
438
439         PR c++/3882
440         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
441         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
442         only after recording the declaration.
443
444 2002-03-18  Jason Merrill  <jason@redhat.com>
445
446         PR c++/2039
447         * init.c (resolve_offset_ref): Hand off to build_component_ref.
448
449         PR c++/4222, c++/5995
450         * call.c (build_over_call): Fix empty class logic.
451
452         PR c++/3870
453         * cp-tree.h (struct saved_scope): Add last_parms field.
454         * decl.c (maybe_push_to_top_level): Save last_function_parms.
455         (pop_from_top_level): Restore it.
456
457         PR c++/4377
458         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
459         NON_LVALUE_EXPRs.
460
461         PR c++/4003
462         * pt.c (tsubst_friend_function): Use decl_namespace_context.
463
464         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
465         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
466         type with a nontrivial destructor.
467
468 2002-03-17  Jason Merrill  <jason@redhat.com>
469
470         PR c++/4460
471         * class.c (build_base_path): Virtual base layout is fixed in
472         in-charge [cd]tors.
473
474 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
475
476         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
477         * parse.y (yyparse): Remove macro.
478
479 2002-03-17  Jason Merrill  <jason@redhat.com>
480
481         PR c++/5757
482         * init.c (build_new_1): Pass the right pointer to op delete.
483
484 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
485
486         PR c++/4361
487         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
488         conversion operators go.
489         (struct lang_decl_flags): Add template_conv_p and unused
490         bitfields.
491         (DECL_TEMPLATE_CONV_FN_P): New macro.
492         * call.c (build_user_type_conversion_1): Don't check second type
493         conversion of overload set first.
494         * class.c (add_method): Make sure templated conversion operators
495         all end up on slot 2.
496         * lex.c (do_identifier): A conversion operator token might be
497         satisfied by a templated conversion operator.
498         * pt.c (check_explicit_specialization): Use
499         CLASSTYPE_FIRST_CONVERSION_SLOT.
500         (template_parm_this_level_p): New function.
501         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
502         * search.c (lookup_fnfields_1): Template conversions will be on
503         the first slot.
504         * typeck.c (build_component_ref): Preserve the type of an
505         conversion operator name on the overload type.
506         (build_x_function_call): Retrieve the conversion operator name.
507
508 2002-03-15  Richard Henderson  <rth@redhat.com>
509
510         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
511
512 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
513
514         * cp-tree.h (CLEANUP_DECL): Remove.
515         (CLEANUP_EXPR): Likewise.
516         * decl.c (destroy_local_var): Simplify.
517         (maybe_build_cleanup): Tidy.
518         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
519         * semantics.c (cp_expand_stmt): Likewise.
520         * cp/tree.c (cp_statement_code_p): Likewise.
521
522 2002-03-15  Jason Merrill  <jason@redhat.com>
523
524         PR c++/5857
525         * decl.c (duplicate_decls): Use merge_types instead of common_type.
526         * typeck.c (common_type): Just hand off to
527         type_after_usual_arithmetic_conversions and
528         composite_pointer_type.
529         (merge_types): New fn.
530         (commonparms): Use it instead of common_type.
531         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
532         (composite_pointer_type): Also handle attributes.
533         * cp-tree.h: Declare merge_types.
534
535         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
536         variables.
537         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
538
539 2002-03-14  Richard Henderson  <rth@redhat.com>
540
541         * decl.c: Include c-pragma.h.
542         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
543         * Make-lang.in: Update dependencies.
544
545 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
546
547         PR c++/5908
548         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
549         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
550
551 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
552
553         * mangle.c (write_builtin_type): Handle 128-bit integers even if
554         they are not a standard integer type.
555
556 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
557
558         * cp-tree.h (init_init_processing): Remove declaration.
559         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
560         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
561
562 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
563
564         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
565         Define.
566         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
567         tree_code_length.
568         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
569         cplus_tree_code_name): Delete.
570         (cxx_init): Don't call add_c_tree_codes, instead set
571         lang_unsafe_for_reeval.  Don't try to copy into the various
572         tree_code arrays.
573
574 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
575
576         PR c++/5659
577         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
578         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
579         definitions.
580
581 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
582
583         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
584         DR209 is now not a defect.
585         * cp-tree.h (skip_type_access_control): Remove.
586         * decl.c (grokdeclarator): Do type access control for friend
587         declarations.
588         * semantics.c (decl_type_access_control): Don't reset
589         current_type_lookups.
590         (save_type_access_control): Always save the lookups.
591         (skip_type_access_control): Remove.
592         (finish_class_definition): Don't change type_lookups.
593
594 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
595
596         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
597         It is incorrect.
598         * typeck.c (build_static_cast): Compare non-qualified types
599         with pointer to member conversions.
600
601 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
602             Daniel Berlin  <dan@dberlin.org>
603
604         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
605         (cxx_get_alias_set): Use it.
606
607 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
608
609         * cp-tree.h (stabilize_expr): Prototype.
610
611 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
612
613         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
614         conditional return void.
615
616 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
617
618         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
619         * cp-tree.h (cxx_unsave): New.
620         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
621         (init_tree): Update.
622
623 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
624
625         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
626         explicit sizeof/sizeof.
627         * decl2.c (cxx_decode_option): Likewise.
628         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
629
630 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
631
632         PR c++/775
633         * decl.c (lookup_tag): Only reject enum/class mismatch, not
634         class/union mismatch.
635         * parse.y (check_class_key): New function.
636         (structsp): Call it.
637
638 2002-03-01  Michael Matz  <matz@suse.de>
639
640         * typeck.c (cp_pointer_int_sum): Complete inner type which is
641         used later by size_in_bytes().
642
643 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
644
645         * cp-tree.h:  Require __GNUC__ to be #defined.
646         (build_init):  Add missing prototype.
647
648 2002-03-01  Jason Merrill  <jason@redhat.com>
649
650         * except.c: Don't include decl.h or obstack.h.  Do include
651         tree-inline.h.
652         (build_throw): Destroy temporaries from the thrown
653         expression before calling __cxa_throw.  Construct a thrown 
654         temporary directly into the exception object.
655         (stabilize_throw_expr): New function.
656         (wrap_cleanups_r): New function.
657         * tree.c (stabilize_expr): New function.
658         * init.c (build_init): New function.
659         * Make-lang.in (cp/except.o): Adjust .h deps.
660
661 2002-02-28  Jason Merrill  <jason@redhat.com>
662
663         * search.c (lookup_base_r): Don't clear is_non_public just because
664         we found a friendly scope.
665
666         * decl.c (finish_function): Only warn about missing return
667         statement with -Wreturn-type.
668
669 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
670
671         * class.c (build_clone): Update.
672         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
673         * cp-tree.h (cxx_dup_lang_specific_decl): New.
674         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
675         (copy_decl): Update.
676         * method.c (make_thunk): Update.
677
678 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
679
680         * decl2.c: Delete traditional-mode-related code copied from
681         the C front end but not used, or used only to permit the
682         compiler to link.
683
684 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org> 
685
686         PR c++/4093
687         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
688         to void.
689
690 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
691
692         PR other/5746
693         * semantics.c (finish_switch_cond): Don't call get_unwidened
694         if error_mark_node.
695
696 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
697
698         PR c++/2645, DR 295
699         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
700         tf_keep_type_decl.
701         (make_typename_type): Use tsubst_flags_t.
702         * decl.c (make_typename_type): Adjust. Return non-artificial
703         TYPE_DECLs, if required.
704         (grokdeclarator): Simplify CVR qualification handling. Allow bad
705         qualifiers on typedef types.
706         * decl2.c (handle_class_head): Adjust make_typename_type call.
707         * parse.y (nested_name_specifier): Likewise.
708         (typename_sub0): Likewise.
709         (typename_sub1): Likewise.
710         * pt.c (convert_template_argument): Adjust make_typename_type
711         return value.
712         (tsubst): Adjust cp_build_qualified_type_real calls.
713         (check_cv_quals_for_unify): Cope with alowing bad qualifications
714         on template type parms.
715         (instantiate_decl): Recheck substitutions to give warnings on bad
716         qualifications.
717         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
718
719 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
720
721         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
722
723         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
724         unless DECL_ALWAYS_INLINE.
725
726 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
727
728         * typeck.c (cp_pointer_int_sum): Renamed from
729         pointer_int_sum, call pointer_int_sum.
730
731 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
732
733         * decl.c (duplicate_decls): Return 0 if issued error about
734         redeclaration.
735
736 2002-02-19  Jason Merrill  <jason@redhat.com>
737
738         ABI change: Mangle `void (A::*)() const' as 
739         M1AKFvvE, not MK1AFvvE.
740         * mangle.c (write_function_type): Write cv-quals for member
741         function type here.
742         (write_pointer_to_member_type): Not here.
743
744 2002-02-18  Jason Merrill  <jason@redhat.com>
745
746         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
747         (do_decl_instantiation): Likewise.
748
749 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
750
751         PR c++/5685
752         * decl.c (duplicate_decls): Make warning unconditional
753         if duplicate default argument declarations are present.
754
755 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
756
757         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
758         shortening.
759
760 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
761
762         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
763         remove incorrect comment. Move #if 0'd code to common path. Use
764         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
765
766 2002-02-13  Jason Merrill  <jason@redhat.com>
767
768         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
769         (finish_function): Don't warn if current_function_returns_null.
770
771         * typeck2.c (digest_init): Do handle values of vector type.
772
773         * typeck2.c (digest_init, process_init_constructor): Treat vectors
774         like arrays.
775
776 2002-02-11  Jason Merrill  <jason@redhat.com>
777
778         * parse.y (reserved_declspecs): Don't handle attributes.
779         (reserved_typespecquals): Handle them here.
780         * Make-lang.in (parse.c): Adjust expected conflicts.
781
782 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
783
784         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
785         instead of compstmt.
786         (compstmt_or_stmtexpr): Renamed from compstmt.
787         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
788
789 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
790
791         Rename instantiate_type_flags to tsubst_flags_t & expand use.
792         * cp-tree.h (instantiate_type_flags): Rename to ...
793         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
794         add tf_warning flag.
795         (instantiate_type): Adjust prototype.
796         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
797         do_type_instantiation, cp_build_qualified_type_real): Likewise.
798         cp_build_qualified_type: Adjust.
799         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
800         tf_*.
801         * call.c (standard_conversion): Rename itf_* to tf_*.
802         (reference_binding): Likewise.
803         (convert_like_real): Likewise.
804         * cvt.c (cp_convert_to_pointer): Likewise.
805         (convert_to_reference): Likewise.
806         * decl.c (lookup_namespace_name): Use tf_* flags.
807         (make_typename_type): Likewise.
808         (grokdeclarator): Likewise.
809         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
810         (coerce_template_template_parms, convert_template_argument,
811         coerce_template_parms, maybe_get_template_decl_from_type_decl,
812         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
813         instantiate_class_template, tsubst_template_arg_vector, 
814         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 
815         tsubst_decl, tsubst_arg_types, tsubst_function_type,
816         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 
817         instantiate_template, fn_type_unification,
818         resolve_overloaded_unification, verify_class_unification, 
819         unify, get_bindings_real, do_type_instantiation, 
820         regenerate_decl_from_template, instantiate_decl, 
821         tsubst_initializer_list, tsubst_enum,
822         get_mostly_instantiated_function_type,
823         invalid_nontype_parm_type_p): Likewise.
824         * tree.c (cp_build_qualified_type_real): Likewise.
825         * typeck.c (build_binary_op): Rename itf_* to tf_*.
826         (build_ptrmemfunc): Likewise.
827         (convert_for_assignment): Likewise.
828
829 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
830
831         PR c++/109
832         * decl.c (grokdeclarator): Allow friend declarations from
833         dependent types.
834         * decl2.c (handle_class_head): Don't push into template parm contexts.
835         * pt.c (push_template_decl_real): Template parm contexts are never
836         being defined.
837
838 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
839
840         * class.c: Include target.h.
841         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
842         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
843         bit-field layout.
844         * Make-lang.in: Adjust deps.
845
846 2002-02-05  Jason Merrill  <jason@redhat.com>
847
848         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
849
850 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
851
852         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
853         (finish_switch_cond): Set SWITCH_TYPE.
854
855 2002-02-04  Richard Henderson  <rth@redhat.com>
856
857         * method.c (use_thunk): Always initialize the block tree.  Reindent.
858         * semantics.c (expand_body): Emit thunks after function, not before.
859
860 2002-02-04  Jason Merrill  <jason@redhat.com>
861
862         * decl.c (start_function): Call cplus_decl_attributes immediately
863         after grokdeclarator.
864
865         * decl.c (start_function): Combine DECL_RESULT handling code.
866
867 2002-02-03  Jason Merrill  <jason@redhat.com>
868
869         * xref.c: Remove.
870         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
871         (cp/xref.o): Remove dependencies.
872         * class.c (finish_struct_1, check_methods): Don't call xref fns.
873         (finish_struct_1): Likewise.
874         * friend.c (make_friend_class): Likewise.
875         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
876         * spew.c (read_process_identifier): Likewise.
877
878 2002-02-01  Jason Merrill  <jason@redhat.com>
879
880         PR c++/4872
881         * decl.c (finish_function): Warn about a non-void function with 
882         no return statement and no abnormal exit.
883         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
884         (current_function_returns_abnormally): New macro.
885         * call.c (build_call): Set it.
886
887         * typeck.c (build_component_ref): Always complain about offsetof
888         constructs on non-PODs.  Only make it an error for members of
889         virtual bases.
890
891         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
892         (dump_function_decl): Always dump parms.
893
894         * decl2.c (finish_static_data_member_decl): Complain about a local
895         class with a static data member.
896
897         PR c++/4286
898         * search.c (lookup_field_1): Don't xref a static data member
899         just because we looked it up.
900
901 2002-01-31  Jason Merrill  <jason@redhat.com>
902
903         * Make-lang.in (parse.c): Handle .output file.
904
905         PR c++/3395
906         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
907         not TREE_TYPE.
908         * semantics.c (finish_class_definition): Adjust.
909
910         Allow attributes in parms and casts.
911         * parse.y (named_parm): Don't strip attrs.
912         (declmods): Remove 'attributes' production.
913         (nonempty_cv_qualifiers): Accept attributes.
914         (ATTRIBUTE): Give precedence.
915         * decl.c (groktypename): Handle attributes.
916         (grokparms): Likewise.
917
918 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
919
920         * decl2.c (cxx_decode_option): Pass 0 as last argument to
921         cpp_handle_option.
922         * lang-specs.h: Use cpp_unique_options instead of cpp_options
923         when used together with cc1_options.
924
925 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
926
927         PR c++/5132
928         * typeck2.c (digest_init): Make sure non-array core type is
929         instantiated.
930         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
931         constructor, rather than build a new one.
932         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
933         PURPOSE of constructor elts.
934
935 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
936
937         * Make-lang.in (parse.c): Adjust expected number of
938         shift-reduce conflicts.
939         (decl.o): Depend on diagnostic.h.
940         * decl.c: Include diagnostic.h.
941         (grokdeclarator): Check for null pointer.
942         (finish_function): Don't abort when
943         current_binding_level->parm_flag != 1, if errors have
944         occurred; throw away the statement tree and extra binding
945         levels, and continue.
946         * lex.c (note_list_got_semicolon): Check for null pointer.
947         * method.c (hack_identifier): Just return error_mark_node if
948         value is error_mark_node.
949         * parse.y (primary: TYPEID(type_id)): No need to use
950         TYPE_MAIN_VARIANT here.
951         (handler_seq): Accept an empty list of catch clauses and
952         generate a fake handler block to avoid later crashes.
953         (ansi_raise_identifier): Accept the error token too.
954         * semantics.c (begin_class_definition,
955         finish_class_definition): Check for error_mark_node.
956
957 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
958
959         * typeck2.c (friendly_abort): Delete definition.
960         * cp-tree.h (friendly_abort): Don't prototype.
961         (my_friendly_assert): Use fancy_abort.
962
963 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
964
965         * cp-tree.h (my_friendly_abort): Remove.
966
967 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
968
969         * spew.c (pending_inlines, pending_inlines_tail,
970         processing_these_inlines): Make static.
971         (mark_pending_inlines): Remove static.
972         (begin_parsing_inclass_inline): If in function, save pi
973         for GC to cp_function_chain->unparsed_inlines instead.
974         (process_next_inline): Likewise.
975         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
976         (mark_pending_inlines): Add prototype.
977         * decl.c (spew_debug): Remove unused extern.
978         (mark_lang_function): Call mark_pending_inlines.
979
980 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
981
982         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
983         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
984         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
985         Change my_fancy_abort() to abort().
986
987 2002-01-23  Jason Merrill  <jason@redhat.com>
988
989         PR c++/5453
990         * class.c (fixed_type_or_null): Fix thinko.
991
992         PR c++/3331
993         * init.c (resolve_offset_ref): Use build_indirect_ref.
994
995         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
996
997 2002-01-22  Jason Merrill  <jason@redhat.com>
998
999         * parse.y (function_body): Suppress the block for the outermost
1000         curly braces.
1001         * decl.c (pushdecl): Don't try to skip it.
1002         (begin_function_body): Keep the block we create, not the next one.
1003         * init.c (emit_base_init): Don't mess with keep_next_level.
1004
1005         * class.c (build_base_path): Tweak formatting.
1006
1007 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1008
1009         Fix regression introduced with patch for c++/775
1010         * parse.y (class_head_defn): Check for template specializations
1011         with a different class-key.
1012
1013 2002-01-17  Jason Merrill  <jason@redhat.com>
1014
1015         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
1016         (begin_function_body): Call them and keep_next_level.
1017         * init.c (emit_base_init): Call keep_next_level.
1018         * semantics.c (setup_vtbl_ptr): Lose.
1019         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
1020         (vtbls_set_up_p): Lose.
1021         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
1022         * method.c (do_build_copy_constructor): Likewise.
1023         (synthesize_method): Call finish_mem_initializers.
1024         * parse.y (nodecls): Likewise.
1025
1026         * error.c (dump_type_suffix): Print the exception specs before
1027         recursing.
1028         (dump_function_decl): Here, too.
1029
1030         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
1031
1032 2002-01-10  Ira Ruben   <ira@apple.com>
1033
1034         PR c++/907
1035         * decl.c (start_method): Handle attrlist.
1036
1037 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
1038
1039         * decl2.c (max_tinst_depth): Increase default limit to 500.
1040
1041 2002-01-10  Graham Stott  <grahams@redhat.com>
1042
1043         * spew.c (YYCHAR): Uppercase macro parameter and add
1044         parenthesis.
1045         (YYCODE): Likewise.
1046         (NAME): Uppercase macro parameter.
1047
1048 2002-01-09  Graham Stott  <grahams@redhat.com>
1049
1050         * decl.h (grokdeclarator): Wrap long line.
1051
1052         * semantics.c (FINISH_COND): Uppercase macro paramaters and
1053         add parenthesis.
1054
1055 2002-01-08  Graham Stott  <grahams@redhat.com>
1056
1057         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
1058         (PALLOC): Uppercase macro parameter and whitespace.
1059         (SALLOC): Uppercase macro parameter.
1060         (SFREE): Uppercase macros parameter, add parenthese and
1061         whitespace.
1062         (STREQL): Uppercase macro parameter and whitespace.
1063         (STRNEQ): Likewise.
1064         (STRLSS): Likewise.
1065         (STRLEQ): Likewise.
1066         (STRGTR): Likewise.
1067         (STRGEQ): Likewise.
1068
1069         * call.c (convert_like): Add parenthesis and wrap.
1070         (convert_like_with_context): Likewise.
1071         (ICS_RANK): Whitespace.
1072         (NEED_TEMPORARY_P): Remove parenthesis.
1073
1074         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
1075         whitespace.
1076         (VTT_MARKED_BINFO_P): Likewise.
1077
1078         * decl.c (BINDING_LEVEL): Add parenthesis.
1079         (DEF_OPERATOR): Likewise.
1080
1081         * mangle.c (MANGLE_TRACE): Add parenthesis.
1082         (MANGLE_TRACE_TREE): Likewise.
1083         (write_signed_number): Likewise.
1084         (write_unsigned_number): Likewise.
1085
1086         * pt.c (ccat): Uppercase macro parameter.
1087         (cat): Likewise
1088
1089         * search.c (SET_BINFO_ACCESS): Add parenthesis.
1090
1091 2002-01-07  Jason Merrill  <jason@redhat.com>
1092
1093         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
1094         to pedwarn.
1095
1096         PR c++/3536
1097         * method.c (make_thunk): If !flag_weak, give the thunk the
1098         function's linkage.
1099         (use_thunk): Here, too.
1100
1101 2002-01-07  Graham Stott  <grahams@redhat.com>
1102
1103         * error.c: Update copyright date.
1104         (print_scope_operator): Add parenthesis.
1105         (print_left_paren): Likewise.
1106         (print_right_paren): Likewise.
1107         (print_left_bracket): Likewise.
1108         (print_right_bracket): Likewise.
1109         (print_template_argument_list_start): Likewise.
1110         (print_template_argument_list_end): Likewise.
1111         (print_non_consecutive_character): Likewise.
1112         (print_tree_identifier): Likewise.
1113         (print_identifier): Likewise.
1114         (NEXT_CODE): Uppercase macro parameter.
1115         (ident_fndecl): Delete unused.
1116         (GLOBAL_THING): Likewise.
1117
1118 2002-01-06  Graham Stott  <grahams@redhat.com>
1119
1120         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
1121         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
1122         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
1123         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
1124         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
1125         (C_IS_RESERVED_WORD): Uppercase macro parameter.
1126         (C_RID_YYCODE) Likewise.
1127         (ptrmem_cst): Use rtx.
1128         (LOCAL_BINDING_P): Add whitespace.
1129         (INHERITED_VALUE_BINDING_P): Likewise.
1130         (BINDING_SCOPE): Wrap long line.
1131         (BINDING_HAS_LEVEL_P): Remove parenthesis.
1132         (BINDING_VALUE): Wrap long line.
1133         (BINDING_TYPE): Whitespace.
1134         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
1135         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
1136         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
1137         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
1138         (same_type_p): Uppercase macro parameters.
1139         (same_type_ignoring_top_level_qualifiers_p): Likewise.
1140         (OVL_FUNCTION): Wrap long line.
1141         (OVL_CHAIN): Whitespace.
1142         (OVL_CURRENT): Add parenthesis and whitespace.
1143         (OVL_NEXT): Whitespace.
1144         (OVL_USED): Likewise.
1145         (IDENTIFIER_TYPE_VALUE): Likewise.
1146         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
1147         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
1148         (LANG_ID_FIELD): Whitespace.
1149         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
1150         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
1151         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
1152         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
1153         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
1154         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
1155         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
1156         (IDENTIFIER_VIRTUAL_P): Likewise.
1157         (IDENTIFIER_OPNAME_P): Likewise.
1158         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
1159         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
1160         (C_SET_EXP_ORIGINAL_CODE): Likewise.
1161         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
1162         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1163         (IS_AGGR_TYPE): Uppercase macro parameter.
1164         (CLASS_TYPE_P): Likewise.
1165         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
1166         (IS_AGGR_TYPE_2): Whitespace.
1167         (TAGGED_TYPE_P): Uppercase macro parameter.
1168         (TYPE_BUILT_IN): Whitespace.
1169         (TYPE_FOR_JAVA): Likewise.
1170         (FUNCTION_ARG_CHAIN): Remove parenthesis.
1171         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
1172         (FUNCTION_FIRST_USER_PARAM): Likewise.
1173         (PROMOTES_TO_AGGR_TYPE): Whitespace.
1174         (DERIVED_FROM_P): Add parenthesis and wrap.
1175         (UNIQUELY_DERIVED_FROM_P): Likewise.
1176         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
1177         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1178         (CLASSTYPE_USE_TEMPLATE): Whitespace.
1179         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
1180         (TYPE_GETS_DELETE): Add parenthesis.
1181         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
1182         (TYPE_HAS_ASSIGN_REF): Likewise,
1183         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
1184         (TYPE_HAS_INIT_REF): Likewise.
1185         (TYPE_HAS_CONST_INIT_REF): Likewise.
1186         (TYPE_BEING_DEFINED): Likewise.
1187         (TYPE_LANG_SPECIFIC): Likewise.
1188         (CLASSTYPE_RTTI): Likewise.
1189         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
1190         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1191         (TYPE_OVERLOADS_ARROW): Likewise.
1192         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
1193         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
1194         (CLASSTYPE_METHOD_VEC): Likewise.
1195         (CLASSTYPE_MARKED_N): Likewise.
1196         (CLASSTYPE_MARKED): Likewise.
1197         (CLASSTYPE_MARKED2): Likewise.
1198         (CLASSTYPE_MARKED3): Likewise.
1199         (CLASSTYPE_MARKED4): Likewise.
1200         (CLASSTYPE_MARKED5): Likewise.
1201         (CLASSTYPE_MARKED6): Likewise.
1202         (SET_CLASSTYPE_MARKED): Whitespace.
1203         (CLEAR_CLASSTYPE_MARKED): Likewise.
1204         (SET_CLASSTYPE_MARKED2): Likewise.
1205         (CLEAR_CLASSTYPE_MARKED2): Likewise.
1206         (SET_CLASSTYPE_MARKED3): Likewise.
1207         (CLEAR_CLASSTYPE_MARKED3): Likewise.
1208         (SET_CLASSTYPE_MARKED4): Likewise.
1209         (CLEAR_CLASSTYPE_MARKED4): Likewise.
1210         (SET_CLASSTYPE_MARKED5): Likewise.
1211         (CLEAR_CLASSTYPE_MARKED5): Likewise.
1212         (SET_CLASSTYPE_MARKED6): Likewise.
1213         (CLEAR_CLASSTYPE_MARKED6): Likewise.
1214         (CLASSTYPE_TAGS): Likewise.
1215         (CLASSTYPE_VSIZE): Likewise.
1216         (CLASSTYPE_VBASECLASSES): Likewise.
1217         (CANONICAL_BINFO): Add parenthesis.
1218         (CLASSTYPE_SIZE(NODE): Likewise.
1219         (CLASSTYPE_SIZE_UNIT): Likewise.
1220         (CLASSTYPE_ALIGN(NODE): Likewise.
1221         (CLASSTYPE_USER_ALIGN): Likewise.
1222         (TYPE_JAVA_INTERFACE): Likewise.
1223         (CLASSTYPE_PURE_VIRTUALS): Likewise.
1224         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
1225         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
1226         (CLASSTYPE_HAS_MUTABLE): Likewise.
1227         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
1228         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
1229         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
1230         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
1231         (CLASSTYPE_INTERFACE_ONLY): Likewise.
1232         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1233         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1234         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1235         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1236         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1237         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
1238         (BINFO_UNSHARED_MARKED): Whitespace.
1239         (BINFO_MARKED): Whitespace and wrap.
1240         (SET_BINFO_MARKED): Likewise.
1241         (CLEAR_BINFO_MARKED): Likewise.
1242         (BINFO_VTABLE_PATH_MARKED): Likewise.
1243         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
1244         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
1245         (BINFO_SUBVTT_INDEX): Remove parenthesis.
1246         (BINFO_VPTR_INDEX): Likewise.
1247         (BINFO_PRIMARY_BASE_OF): Likewise,
1248         (CLASSTYPE_VFIELDS): Whitespace.
1249         (VF_DERIVED_VALUE): Wrap long line.
1250         (NAMESPACE_LEVEL): Whitespace.
1251         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
1252         (DEFARG_POINTER): Whitespace.
1253         (DECL_NEEDED_P): Remove parenthesis.
1254         (DECL_LANGUAGE): Whitespace.
1255         (SET_DECL_LANGUAGE): Add parenthesis.
1256         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
1257         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
1258         (DECL_IN_AGGR_P): Whitespace.
1259         (DECL_FRIEND_P): Likewise.
1260         (DECL_BEFRIENDING_CLASSES): Likewise.
1261         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
1262         (DECL_NONCONVERTING_P): Whitespace.
1263         (DECL_PURE_VIRTUAL_P): Likewise.
1264         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
1265         (DECL_PENDING_INLINE_INFO): Whitespace.
1266         (DECL_SORTED_FIELDS): Likewise.
1267         (DECL_DEFERRED_FN): Likewise.
1268         (DECL_TEMPLATE_INFO): Likewise.
1269         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
1270         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
1271         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
1272         (TMPL_ARGS_LEVEL): Likewise.
1273         (SET_TMPL_ARGS_LEVEL): Likewise.
1274         (INNERMOST_TEMPLATE_PARMS): Whitespace.
1275         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
1276         (INTEGRAL_CODE_P(CODE): Add parenthesis.
1277         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
1278         (TYPE_HAS_CONSTRUCTOR): Whitespace.
1279         (TREE_HAS_CONSTRUCTOR): Likewise.
1280         (TYPE_HAS_DESTRUCTOR): Likewise.
1281         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
1282         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
1283         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1284         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
1285         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
1286         (TYPE_PTRMEMFUNC_P): Likewise.
1287         (TYPE_PTRMEMFUNC_FLAG): Likewise.
1288         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
1289         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1290         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
1291         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1292         (DECL_ACCESS): Whitespace.
1293         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
1294         (DECL_GLOBAL_DTOR_P): Likewise.
1295         (GLOBAL_INIT_PRIORITY): Likewise.
1296         (DECL_TEMPLATE_PARMS): Likewise.
1297         (DECL_TEMPLATE_RESULT): Likewise.
1298         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
1299         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
1300         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
1301         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1302         (PRIMARY_TEMPLATE_P): Add parenthesis.
1303         (DECL_USE_TEMPLATE): Whitespace.
1304         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1305         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1306         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1307         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1308         (CALL_DECLARATOR_PARMS): Remove parenthesis.
1309         (CALL_DECLARATOR_QUALS): Likewise.
1310         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1311         (TEMP_NAME_P): Wrap.
1312         (VFIELD_NAME_P): Likewise.
1313         (B_SET): Uppercase macro parameters and add parenthesis.
1314         (B_CLR): Likewise.
1315         (B_TST): Likewise.
1316         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
1317         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
1318         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
1319         (same_or_base_type_p): Likewise.
1320         (cp_deprecated): Likewise.
1321
1322 2002-01-05  Richard Henderson  <rth@redhat.com>
1323
1324         * semantics.c (expand_body): Revert last change.
1325
1326 2002-01-04  Jason Merrill  <jason@redhat.com>
1327
1328         PR c++/4122
1329         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
1330         lost primary.
1331
1332         * class.c (build_vtbl_initializer): Check for a lost primary
1333         before calculating the vtable entry to throw away.
1334
1335 2002-01-02  Jason Merrill  <jason@redhat.com>
1336
1337         * semantics.c (expand_body): Call outlining_inline_function when
1338         emitting an inline function out of line.
1339
1340 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1341
1342         PR c++/5116, c++/764 reversion
1343         * call.c (build_new_op): Revert the instantiations. They are
1344         incorrect.
1345
1346 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1347
1348         PR c++/5089
1349         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
1350
1351 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1352
1353         PR c++/3716
1354         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
1355         (tsubst, case POINTER_TYPE): Handle pmfs here.
1356         (tsubst, case OFFSET_TYPE): Check it is not an offset to
1357         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
1358
1359 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1360
1361         PR c++/35
1362         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
1363         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
1364         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
1365         PARM_DECL.
1366         (tsubst_template_parms): Break up loop statements.
1367         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
1368         parm PARM_DECLs don't get promoted.
1369
1370 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1371
1372         PR c++/5123
1373         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
1374         (build_x_function_call): Cope with a COMPONENT_REF containing a
1375         TEMPLATE_ID_EXPR.
1376
1377 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1378
1379         PR c++/5213
1380         * pt.c (convert_template_argument): Be more careful determining
1381         when RECORD_TYPE templates are or are not templates.
1382
1383 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1384
1385         PR c++/775
1386         * cp-tree.h (handle_class_head): Adjust prototype.
1387         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
1388         parameters. Use for all class heads.
1389         * parse.y (named_class_head_sans_basetype, named_class_head,
1390         named_complex_class_head_sans_basetype,
1391         named_class_head_sans_basetype_defn,
1392         unnamed_class_head): Remove.
1393         (class_head, class_head_apparent_template): Recognize class heads
1394         (class_head_decl, class_head_defn): New reductions. Process class
1395         heads.
1396         (structsp): Adjust class definition and class declaration
1397         reductions.
1398         (maybe_base_class_list): Give diagnostic on empty list.
1399
1400 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1401
1402         PR c++/4379
1403         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1404         single non-static member.
1405         (unary_complex_lvalue): If it cannot be a pointer to member, don't
1406         make it so. Check it is not pointer to reference.
1407
1408 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1409
1410         PR c++/5132
1411         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1412         are processing a template decl.
1413
1414 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1415
1416         PR c++/5116, c++/764
1417         * call.c (build_new_op): Make sure template class operands are
1418         instantiated. Simplify arglist construction.
1419
1420 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1421
1422         * call.c (build_user_type_conversion_1): Use my_friendly_assert
1423         rather than if ... abort.
1424         * cvt.c (convert_to_reference): Likewise.
1425         * semantics.c (setup_vtbl_ptr): Likewise.
1426         * pt.c (lookup_template_class): Comment typo.
1427
1428 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1429
1430         PR c++/5125
1431         * pt.c (push_template_decl_real): Make sure DECL has
1432         DECL_LANG_SPECIFIC.
1433
1434 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1435
1436         PR c++/335
1437         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
1438         for non-reference fields.
1439         * typeck.c (require_complete_type): Use resolve_offset_ref).
1440
1441 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1442
1443         PR c++/196
1444         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
1445
1446 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1447
1448         PR c++/160
1449         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1450         up. Don't stabilize_references when initializing a reference.
1451
1452 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1453
1454         * decl2.c (lang_f_options): Const-ify.
1455
1456 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1457
1458         * config-lang.in (diff_excludes): Remove.
1459
1460 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
1461
1462         PR c++/90
1463         * typeck.c (build_function_call_real): Use original function
1464         expression for errors.
1465
1466 2001-12-18  Jason Merrill  <jason@redhat.com>
1467
1468         PR c++/3242
1469         * class.c (add_method): Do compare 'this' quals when trying to match a
1470         used function.  Don't defer to another used function.
1471
1472 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1473
1474         * pt.c (instantiate_clone): Remove, fold into ...
1475         (instantiate_template): ... here. Simplify by removing mutual
1476         recursion.
1477         * typeck2.c (build_m_component_ref): Don't cv qualify the function
1478         pointed to by a pointer to function.
1479         * class.c (delete_duplicate_fields_1): Typo.
1480
1481 2001-12-18  Jason Merrill  <jason@redhat.com>
1482
1483         C++ ABI change: destroy value arguments in caller.
1484         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1485         create an extra binding level for the parameters.
1486         * decl.c (store_parm_decls): Don't do parameter cleanups.
1487
1488 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1489
1490         * call.c (build_new_method_call): Use '%#V'.
1491         * error.c (cv_to_string): Use V parameter to determine padding.
1492
1493 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1494
1495         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1496         spellings in messages.
1497
1498 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
1499
1500         * cp-tree.h: Delete #defines for cp_error, cp_warning,
1501         cp_pedwarn, and cp_compiler_error.
1502         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1503         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1504         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1505         typeck2.c: Change calls to the above macros to use their
1506         language-independent equivalents: error, warning, pedwarn, and
1507         internal_error respectively.
1508
1509 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1510
1511         * decl2.c (finish_file): Remove back_end_hook.
1512
1513 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1514
1515         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1516         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1517         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1518
1519 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
1520
1521         * lang-options.h: Use American spelling in messages.
1522
1523 2001-12-13  Jason Merrill  <jason@redhat.com>
1524
1525         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1526
1527         Use cleanups to run base and member destructors.
1528         * init.c (push_base_cleanups): New function, split out from...
1529         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
1530         * decl.c (finish_destructor_body): Move vbase destruction code to
1531         push_base_cleanups.
1532         (begin_function_body, finish_function_body): New fns.
1533         (finish_function): Move [cd]tor handling and call_poplevel to
1534         finish_function_body.
1535         (pushdecl): Skip the new level.
1536         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1537         (setup_vtbl_ptr): Call push_base_cleanups.
1538         * method.c (synthesize_method): Call {begin,end}_function_body.
1539         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1540         * cp-tree.h: Declare new fns.
1541         * parse.y (function_body, .begin_function_body): New nonterminals.
1542         (fndef, pending_inline, function_try_block): Use function_body.
1543         (ctor_initializer_opt, function_try_block): No longer has a value.
1544         (base_init): Remove .set_base_init token.
1545         (.set_base_init, compstmt_or_error): Remove.
1546         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1547
1548         * optimize.c (maybe_clone_body): Fix parameter updating.
1549
1550 2001-12-12  Jason Merrill  <jason@redhat.com>
1551
1552         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1553         * semantics.c (genrtl_start_function): Don't pass
1554         parms_have_cleanups or push an extra binding level.
1555         (genrtl_finish_function): Lose cleanup_label cruft.
1556
1557         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1558         (ctor_label): Remove.
1559         * semantics.c (finish_return_stmt): Lose ctor_label support.
1560         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1561         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1562         dtor_label.
1563
1564         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1565         check for [cd]tors.
1566         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1567
1568         * decl.c (finish_function): Check VMS_TARGET, not VMS.
1569
1570         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1571         (end_cleanup_fn): And poplevel.
1572
1573         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1574         if we're in a template.
1575
1576 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
1577
1578         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1579         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1580         THIS_NAME_P): Delete.
1581         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1582         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1583         with internal naming scheme.
1584         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1585
1586 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
1587
1588         * decl.c (grokdeclarator): Deprecated implicit typename use.
1589
1590 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
1591
1592         PR g++/51
1593         * parse.y (frob_specs): Indicate it is a language linkage which
1594         contained the extern.
1595         * decl.c (grokdeclarator): Allow extern language linkage with
1596         other specifiers.
1597
1598 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
1599
1600         PR g++/72
1601         * decl.c (add_binding): Don't reject duplicate typedefs involving
1602         template parameters.
1603
1604 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1605
1606         * parse.y, semantics.c: Similarly.
1607
1608 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1609
1610         PR g++/87
1611         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1612         (copy_args_p): Rename to ...
1613         (copy_fn_p): ... here.
1614         (grok_special_member_properties): New function.
1615         (grok_op_properties): Lose VIRTUALP parameter.
1616         (copy_assignment_arg_p): Remove.
1617         * call.c (build_over_call): Use copy_fn_p.
1618         * decl.c (grokfndecl): Reformat. Adjust call to
1619         grok_op_properties.
1620         (copy_args_p): Rename to ...
1621         (copy_fn_p): ... here. Reject template functions. Check for pass
1622         by value.
1623         (grok_special_member_properties): Remember special functions.
1624         (grok_ctor_properties): Don't remember them here, just check.
1625         (grok_op_properties): Likewise.
1626         (start_method): Call grok_special_member_properties.
1627         * decl2.c (grokfield): Likewise.
1628         (copy_assignment_arg_p): Remove.
1629         (grok_function_init): Don't remember abstract assignment here.
1630         * pt.c (instantiate_class_template): Call
1631         grok_special_member_properties.
1632         (tsubst_decl): Adjust grok_op_properties call.
1633
1634 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
1635
1636         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1637         RID_TYPES_COMPATIBLE_P.
1638
1639 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1640
1641         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1642         call to build_aggr_init.
1643         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1644
1645 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1646
1647         * parse.y: Replace uses of the string non-terminal with STRING.
1648         Don't perform string concatentaion here.
1649         (string): Remove non-terminal.
1650         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1651
1652 2001-12-05  Jason Merrill  <jason@redhat.com>
1653
1654         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1655         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1656         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1657         * pt.c (push_tinst_level): No longer static.
1658         * cp-tree.h: Declare them.
1659
1660         * init.c (resolve_offset_ref): Don't check access for the base
1661         conversion to access a FIELD_DECL.
1662
1663         * cp-tree.h (TYPE_REFFN_P): New macro.
1664         * decl.c (bad_specifiers): Check it, too.
1665
1666         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1667         on the __*_type_info type if we haven't seen a definition.
1668
1669 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
1670
1671         * decl.c: Include c-common.h.
1672         (shadow_warning): Move to c-common.c.
1673
1674 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1675
1676         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1677
1678 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1679
1680         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1681
1682 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1683
1684         PR g++/164
1685         * init.c (sort_base_init): Allow binfos to be directly specified.
1686         * method.c (do_build_copy_constructor): Explicitly convert to the
1687         base instance.
1688         (do_build_assign_ref): Likewise.
1689
1690 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
1691
1692         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1693         declaration and initialization.
1694
1695 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1696
1697         * typeck2.c: Remove leading capital from diagnostic messages, as
1698         per GNU coding standards.
1699
1700 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
1701
1702         PR c++/3394
1703         * decl.c (xref_basetypes): Handle attributes between
1704         'class' and name.
1705
1706 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1707
1708         PR g++/3381
1709         * parse.y (named_complex_class_head_sans_basetype): Add new
1710         reduction.
1711         * Make-lang.in (parse.c): Adjust expected conflict count.
1712
1713 2001-12-03  Jason Merrill  <jason@redhat.com>
1714
1715         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1716         immediate binfos for our virtual bases.
1717
1718 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
1719
1720         * call.c (build_java_interface_fn_ref): Similarly.
1721         * except.c (is_admissible_throw_operand): Similarly.
1722         * init.c (build_java_class_ref): Similarly.
1723         * xref.c (open_xref_file): Similarly.
1724
1725 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1726
1727         * class.c (finish_struct): Remove trailing periods from messages.
1728         * decl.c (check_tag_decl): Similarly.
1729         * lex.c (cxx_set_yydebug): Similarly.
1730         * typeck2.c (friendly_abort): Similarly.
1731
1732 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1733
1734         PR c++/3048
1735         * cp-tree.h (ovl_member): Remove.
1736         * decl2.c (merge_functions): Handle extern "C" functions
1737         specially.
1738         * tree.c (ovl_member): Remove.
1739
1740 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1741
1742         PR c++/4842
1743         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1744         FUNCTION_DECL, as input.
1745         (mark_overriders): Remove.
1746         (warn_hidden): Rework for the new ABI.
1747
1748 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1749
1750         PR c++/3471
1751         * call.c (convert_like_real): Do not build additional temporaries
1752         for rvalues of class type.
1753
1754 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1755
1756         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1757         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1758         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1759         (DERIVED_FROM_P): Likewise.
1760         (enum base_access): Renumber, add ba_quiet bit mask.
1761         (get_binfo): Remove.
1762         (get_base_distance): Remove.
1763         (binfo_value): Remove.
1764         (ACCESSIBLY_DERIVED_FROM_P): Remove.
1765         * call.c (standard_conversion): Use lookup_base.
1766         * class.c (strictly_overrides): Likewise.
1767         (layout_virtual_bases): Likewise.
1768         (warn_about_ambiguous_direct_bases): Likewise.
1769         (is_base_of_enclosing_class): Likewise.
1770         (add_vcall_offset_vtbl_entries_1): Likewise.
1771         * cvt.c (build_up_reference): Adjust comment.
1772         * init.c (build_member_call): Reformat.
1773         * search.c (get_binfo): Remove.
1774         (get_base_distance_recursive): Remove.
1775         (get_base_distance): Remove.
1776         (lookup_base_r): Tweak.
1777         (lookup_base): Add ba_quiet control. Complete the types here.
1778         (covariant_return_p): Use lookup_base.
1779         * tree.c (binfo_value): Remove.
1780         (maybe_dummy_object): Use lookup_base.
1781         * typeck.c (build_static_cast): Use lookup_base.
1782         (get_delta_difference): Likewise.
1783         * typeck2.c (binfo_or_else): Use lookup_base.
1784         (build_scoped_ref): Add back error_mark_check.
1785         (build_m_component_ref): Use lookup_base.
1786
1787 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1788
1789         * Make-lang.in (c++.generated-manpages): New dummy target.
1790
1791 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1792
1793         * Make-lang.in (cp-lang.o): Depends on c-common.h.
1794         * cp-lang.c (c-common.h): Include.
1795         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1796         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1797         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1798
1799 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1800
1801         * decl2.c (c_language): Move to c-common.c.
1802         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1803         functions.
1804         (cxx_init): Update.
1805
1806 2001-11-26  Jason Merrill  <jason@redhat.com>
1807
1808         * call.c (joust): Remove COND_EXPR hack.
1809
1810 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
1811
1812         * search.c (lookup_base_r): Declare bk in variable declaration
1813         space.
1814
1815 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
1816
1817         PR g++/3145
1818         * class.c (build_vbase_pointer): Remove.
1819         (build_vbase_path): Remove.
1820         (build_base_path): New function.
1821         * cp-tree.h (base_access, base_kind): New enumerations.
1822         (build_base_path): Declare.
1823         (convert_pointer_to_real): Remove.
1824         (convert_pointer_to): Remove.
1825         (lookup_base): Declare.
1826         (convert_pointer_to_vbase): Remove.
1827         * call.c (build_scoped_method_call): Use lookup_base &
1828         build_base_path instead of convert_pointer_to_real,
1829         get_base_distance & get_binfo.
1830         (build_over_call): Likewise.
1831         * cvt.c (cp_convert_to_pointer): Likewise.
1832         (convert_to_pointer_force): Likewise.
1833         (build_up_reference): Likewise.
1834         (convert_pointer_to_real): Remove.
1835         (convert_pointer_to): Remove.
1836         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1837         instead of convert_pointer_to_vbase & build_vbase_path.
1838         (emit_base_init): Use build_base_path instead of
1839         convert_pointer_to_real.
1840         (expand_virtual_init): Lose unrequired conversions.
1841         (resolve_offset_ref): Use lookup_base and build_base_path
1842         instead of convert_pointer_to.
1843         * rtti.c (build_dynamic_cast_1): Use lookup_base &
1844         build_base_path instead of get_base_distance & build_vbase_path.
1845         * search.c (get_vbase_1): Remove.
1846         (get_vbase): Remove.
1847         (convert_pointer_to_vbase): Remove.
1848         (lookup_base_r): New function.
1849         (lookup_base): New function.
1850         * typeck.c (require_complete_type): Use lookup_base &
1851         build_base_path instead of convert_pointer_to.
1852         (build_component_ref): Likewise.
1853         (build_x_function_call): Likewise.
1854         (get_member_function_from_ptrfunc): Likewise.
1855         (build_component_addr): Likewise.
1856         * typeck2.c (build_scoped_ref): Likewise.
1857
1858 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1859
1860         * cp-tree.h (CP_TYPE_QUALS): Removed.
1861         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1862         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1863         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1864         * dump.c (cp_dump_tree): Use void* dump_info argument to match
1865         lang-hooks prototype.
1866         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1867         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1868         CP_TYPE_QUALS changed to cp_type_quals.
1869         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1870         (CXX_C_OBJS): Remove c-dump.o.
1871
1872 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
1873
1874         PR c++/3637
1875         * pt.c (lookup_template_class): Ensure that all specializations
1876         are registered on the list corresponding to the most general
1877         template.
1878
1879 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
1880
1881         * call.c (non_reference): Add documentation.
1882         (convert_class_to_reference): Do not strip reference types
1883         from conversion operators.
1884         (maybe_handle_ref_bind): Simplify.
1885         (compare_ics): Correct handling of references.
1886
1887 2001-11-19  John Wilkinson <johnw@research.att.com>
1888
1889         * dump.c (dump_op): New function.
1890         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
1891         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1892         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1893
1894 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
1895
1896         PR4629
1897         * semantics.c (finish_sizeof): Make sure that expression created
1898         while processing a template do not have a type.
1899         (finish_alignof): Likewise.
1900         * typeck.c (c_sizeof): Likewise.
1901         (expr_sizeof): Likewise.
1902
1903 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1904
1905         * lex.c (cxx_finish): Call c_common_finish.
1906         (finish_parse): Remove.
1907
1908 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1909
1910         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1911         when displaying error message about missing array bounds.
1912
1913 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1914
1915         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1916         CONST_CAST_EXPR.
1917         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1918
1919 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1920
1921         * cp-tree.h (print_class_statistics): Restore.
1922
1923 2001-11-15  Jason Merrill  <jason@redhat.com>
1924
1925         * method.c (use_thunk): Don't emit debugging information for thunks.
1926
1927         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1928         * decl.c (make_typename_type): Handle getting a class template.
1929         * search.c (lookup_field_r): A class template is good enough for
1930         want_type.
1931
1932         * call.c (convert_like_real): Only use cp_convert for the bad part.
1933         (standard_conversion): Also allow bad int->enum.
1934         * typeck.c (ptr_reasonably_similar): Also allow functions to
1935         interconvert.  Pointers to same-size integers are reasonably
1936         similar.
1937
1938         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1939         give it void type.
1940
1941 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
1942
1943         PR g++/3154
1944         * init.c (sort_base_init): Remove unreachable code.
1945         (expand_member_init): Adjust comment to reflect reality. Simplify
1946         and remove unreachable code.
1947
1948 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
1949
1950         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1951         (cxx_init): Update prototype.
1952         * decl.c (init_decl_processing): Rename.  Move null node init
1953         to its creation time.
1954         * lex.c (cxx_init_options): Update.
1955         (cxx_init): Combine with old init_parse; also call
1956         cxx_init_decl_processing.
1957
1958 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
1959
1960         * decl.c (check_initializer): Try to complete the type of an
1961         array element before checking whether it's complete.  Don't
1962         complain about arrays with complete element types but an
1963         unknown size.
1964         (cp_finish_decl): Build the hierarchical constructor before
1965         calling maybe_deduce_size_from_array_init.
1966
1967 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1968
1969         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1970
1971 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
1972
1973         PR g++/4206
1974         * parse.y (already_scoped_stmt): Remove.
1975         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1976
1977 2001-11-12  H.J. Lu <hjl@gnu.org>
1978
1979         * cvt.c (ocp_convert): Don't warn the address of a weak
1980         function is always `true'.
1981
1982 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1983
1984         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1985         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1986         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1987         * cp-tree.h (print_class_statistics): Remove.
1988         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1989         cxx_print_identifier, cxx_set_yydebug): New.
1990         * lex.c (set_yydebug): Rename c_set_yydebug.
1991         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1992         lang_print_xnode): Rename.
1993         * tree.c (print_lang_statistics): Rename.
1994
1995 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1996
1997         * class.c (dump_array): Fix format specifier warning.
1998
1999 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2000
2001         * cp-lang.c (LANG_HOOKS_NAME): Override.
2002         (struct lang_hooks): Constify.
2003         * lex.c (cxx_init_options): Update.
2004         (lang_identify): Remove.
2005         * parse.y (language_string): Remove.
2006
2007 2001-11-08  Andreas Franck  <afranck@gmx.de>
2008
2009         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
2010         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
2011         suggested by autoconf.
2012         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
2013         (c++.install-common): Use the transformed target alias names.
2014
2015 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2016
2017         * Make-lang.in: Update.
2018         * cp-lang.c: Include langhooks-def.h.
2019
2020 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2021
2022         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
2023
2024 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2025
2026         * lex.c (copy_lang_type): Add static prototype.
2027
2028 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2029
2030         * pt.c (unify): Handle SCOPE_REF.
2031
2032 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
2033
2034         * tree.c (cp_copy_res_decl_for_inlining): Adjust
2035         DECL_ABSTRACT_ORIGIN for the return variable.
2036
2037 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
2038
2039         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
2040
2041 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
2042
2043         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
2044         semantics.c, spew.c: Fix spelling errors.
2045
2046 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2047
2048         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
2049
2050 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
2051
2052         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
2053         pop_everything.
2054
2055 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2056
2057         * cp-lang.c (cxx_get_alias_set): New function.
2058         Point LANG_HOOKS_GET_ALIAS_SET to it.
2059
2060 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2061
2062         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
2063         * cp-tree.h (make_unbound_class_template): Prototype new function.
2064         * decl.c (make_unbound_class_template): New function.
2065         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
2066         * error.c (dump_type): Likewise.
2067         * mangle.c (write_type): Likewise.
2068         * parse.y (template_parm): Likewise.
2069         (template_argument): Use make_unbound_class_template.
2070         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
2071         (tsubst): Likewise.
2072         (tsubst_copy): Likewise.
2073         (unify): Likewise.
2074         * tree.c (walk_tree): Likewise.
2075         * typeck.c (comptypes): Likewise.
2076
2077 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2078
2079         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
2080         extra calls into fewer ones.
2081
2082 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
2083
2084         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
2085         Warn when merging inline with attribute noinline.
2086         (start_decl, start_function): Warn if inline and attribute
2087         noinline appear in the same declaration.
2088
2089 2001-10-16  H.J. Lu <hjl@gnu.org>
2090
2091         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
2092         for tree checking disabled.
2093
2094 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
2095
2096         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
2097         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2098
2099 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2100
2101         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
2102         (unify): Only handle MINUS_EXPR specially if the above flag is set
2103         and the subtracted constant is 1.  Clear the flag on recursive calls.
2104         Set it when unifying the maximum value in an INTEGER_TYPE's range.
2105
2106 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2107
2108         * decl.c (bad_specifiers): Don't allow exception specifications
2109         on any typedefs.
2110
2111 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2112
2113         * cp/lex.c (init_cp_pragma): Similarly.
2114
2115 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2116
2117         * pt.c (lookup_template_class): Build complete template arguments
2118         for BOUND_TEMPLATE_TEMPLATE_PARM.
2119
2120 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2121
2122         * cp-tree.h (TYPE_BINFO): Update comment.
2123         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
2124         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
2125         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
2126         (copy_type): Prototype new function.
2127         * lex.c (copy_lang_decl): Gather tree node statistics.
2128         (copy_lang_type): New function.
2129         (copy_type): Likewise.
2130         (cp_make_lang_type): Create lang_type for
2131         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
2132         and BOUND_TEMPLATE_TEMPLATE_PARM.
2133         * pt.c (tsubst): Use copy_type instead of copy_node.
2134         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2135
2136 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2137
2138         * pt.c (determine_specialization): Ignore functions without
2139         DECL_TEMPLATE_INFO.
2140
2141 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2142
2143         PR g++/4476
2144         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2145
2146 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
2147
2148         * typeck2.c (store_init_value): Don't re-digest a bracketed
2149         initializer.
2150
2151         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
2152         ANON_AGGR_TYPE_P.
2153
2154 2001-10-11  Richard Henderson  <rth@redhat.com>
2155
2156         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
2157         of an asm statement.
2158         (build_vtbl_ref_1): Split out from build_vtbl_ref.
2159         (build_vfn_ref): Use it to handle vtable descriptors before
2160         calling build_vtable_entry_ref.
2161         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2162
2163 2001-10-10  Richard Henderson  <rth@redhat.com>
2164
2165         * parse.y (asm_operand): Allow named operands.
2166         * semantics.c (finish_asm_stmt): Tweek for changed location
2167         of the operand constrant.
2168
2169 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
2170
2171         * call.c (standard_conversion): Add bad conversion between
2172         integers and pointers.
2173         (convert_like_real): Don't use convert_for_initialization for bad
2174         conversions; complain here and use cp_convert.
2175         (build_over_call): Don't handle bad conversions specially.
2176         (perform_implicit_conversion): Allow bad conversions.
2177         (can_convert_arg_bad): New fn.
2178         * cp-tree.h: Declare it.
2179         * typeck.c (convert_for_assignment): Use it.
2180         (ptr_reasonably_similar): Any target type is similar to void.
2181
2182 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
2183
2184         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
2185         (cp/cp-lang.o): New rule.
2186         * cp-tree.h: Declare hooks.
2187         * tree.c: Make hooks non-static.
2188         (init_tree): Don't initialize hooks here.
2189         * lex.c: Likewise.  Move definition of lang_hooks to...
2190         * cp-lang.c: ... new file.
2191
2192 2001-10-08  Richard Henderson  <rth@redhat.com>
2193
2194         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
2195         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2196
2197 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2198
2199         * class.c (build_vtable_entry_ref): Const-ify.
2200         * decl.c (predefined_identifier,
2201         initialize_predefined_identifiers): Likewise.
2202         * init.c (build_new_1): Likewise.
2203         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
2204         Likewise.
2205
2206 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
2207
2208         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
2209         (INSNS_PER_STMT): Likewise.
2210         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
2211         (copy_body, initialize_inlined_parameters): Likewise.
2212         (declare_return_variable, inlinable_function_p): Likewise.
2213         (expand_call_inline, expand_calls_inline): Likewise.
2214         (optimize_inline_calls, clone_body): Likewise.
2215         * tree.c (walk_tree): Moved to ../tree-inline.c.
2216         (walk_tree_without_duplicates): Likewise.
2217         (copy_tree_r, remap_save_expr): Likewise.
2218
2219 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
2220
2221         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
2222         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
2223         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
2224         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
2225         (flag_inline_trees): Moved declaration to ../tree-inline.h.
2226         (walk_tree): Moved declaration to ../tree-inline.h.
2227         (walk_tree_without_duplicates, copy_tree_r): Likewise.
2228         (remap_save_expr): Likewise.
2229         * decl.c: Include tree-inline.h.
2230         (lang_mark_tree): Don't mark inlined_fns.
2231         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
2232         * optimize.c: Include tree-inline.h.
2233         (optimize_inline_calls): Move declaration to ../tree.h, as
2234         non-static.
2235         (remap_decl): Use language-independent constructs and hooks.
2236         (remap_block, copy_body_r, declare_return_variable): Likewise.
2237         (inlinable_function_p): Likewise.  Don't test for
2238         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
2239         no longer language-specific.
2240         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
2241         call of dump_function to...
2242         (optimize_function): Here...
2243         (clone_body): New function, extracted from...
2244         (maybe_clone_body): ... here.  Build decl_map locally and pass
2245         it on to clone_body.
2246         * pt.c, semantics.c: Include tree-inline.h.
2247         * tree.c: Likewise.
2248         (cp_walk_subtrees): New language-specific hook for tree inlining.
2249         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
2250         cp_is_overload_p, cp_auto_var_in_fn_p,
2251         cp_copy_res_decl_for_inlining): Likewise.
2252         (walk_tree): Move language-specific constructs into...
2253         (cp_walk_subtrees): this new function.
2254         (copy_tree_r): Use language-independent constructs and hooks.
2255         (init_tree): Initialize tree inlining hooks.
2256         (remap_save_expr): Adjust prototype so that the declaration
2257         does not require the definition of splay_tree.
2258
2259 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2260
2261         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
2262         to build the declaration instead of the declaration itself.
2263
2264 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
2265
2266         * decl2.c (cxx_decode_option): Add 'else'.
2267
2268         * spew.c (end_input): No longer static.
2269         * cp-tree.h: Declare it.
2270         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2271
2272 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2273
2274         * call.c (build_over_call), typeck.c (build_function_call_real):
2275         Pass type attributes to check_function_format rather than name or
2276         assembler name.  Don't require there to be a name or assembler
2277         name to check formats.
2278
2279 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2280
2281         * decl.c (init_decl_processing): Don't call
2282         init_function_format_info.  Initialize lang_attribute_table
2283         earlier.
2284         (builtin_function): Call decl_attributes.
2285         (insert_default_attributes): New.
2286
2287 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
2288
2289         * decl.c (grokdeclarator): Copy array typedef handling from C
2290         frontend.
2291
2292         * decl.c (grokdeclarator): Copy too-large array handling from C
2293         frontend.
2294
2295 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
2296
2297         * config-lang.in (target_libs): Added target-gperf, so that we
2298         don't try to build it if C++ is disabled.
2299
2300 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
2301
2302         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
2303         (cp/errfn.o): Delete rule.
2304         (cp/error.o): Depend on flags.h.
2305         * errfn.c: Delete file.
2306         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
2307         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
2308         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
2309         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
2310         internal_error respectively.  Make cp_deprecated into a macro.
2311         Don't define cp_printer typedef or declare cp_printers.
2312         * error.c: Include flags.h.
2313         Delete: struct tree_formatting_info, print_function_argument_list,
2314         print_declaration, print_expression, print_function_declaration,
2315         print_function_parameter, print_type_id, print_cv_qualifier_seq,
2316         print_type_specifier_seq, print_simple_type_specifier,
2317         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
2318         print_parameter_declaration_clause, print_exception_specification,
2319         print_nested_name_specifier, and definition of cp_printers.
2320         (locate_error): New function.
2321         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
2322         rewritten in terms of locate_error and diagnostic.c.
2323         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
2324         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
2325         (init_error): Adjust to match.
2326
2327 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2328
2329         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
2330
2331 2001-09-21  Richard Henderson  <rth@redhat.com>
2332
2333         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
2334         (build_vtbl_initializer): Likewise.
2335         (build_vfn_ref): New.
2336         * cp-tree.h: Declare it.
2337         * call.c (build_over_call): Use it.
2338         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
2339         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2340
2341 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
2342
2343         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2344
2345 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2346
2347         Table-driven attributes.
2348         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
2349         * decl2.c (cplus_decl_attributes): Only take one attributes
2350         parameter.
2351         * cp-tree.c (cplus_decl_attributes): Update prototype.
2352         * class.c (finish_struct), decl.c (start_decl, start_function),
2353         decl2.c (grokfield), friend.c (do_friend), parse.y
2354         (parse_bitfield): Update calls to cplus_decl_attributes.
2355         * decl.c (grokdeclarator): Take a pointer to a single ordinary
2356         attribute list.
2357         * decl.h (grokdeclarator): Update prototype.
2358         * decl2.c (grokfield): Take a single ordinary attribute list.
2359         * friend.c (do_friend): Likewise.
2360         * decl.c (shadow_tag, groktypename, start_decl,
2361         start_handler_parms, grokdeclarator, grokparms, start_function,
2362         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
2363         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
2364         (process_template_parm, do_decl_instantiation): Pass single
2365         ordinary attribute lists around.
2366         * decl.c (grokdeclarator): Correct handling of nested attributes.
2367         Revert the patch
2368         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
2369                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2370                 not the left.
2371         .
2372         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
2373         (cp_attribute_table): Declare.
2374         * decl.c (valid_lang_attribute): Don't define.
2375         (lang_attribute_table): Define.
2376         (init_decl_processing): Initialize lang_attribute_table instead of
2377         valid_lang_attribute.
2378         * tree.c (cp_valid_lang_attribute): Remove.
2379         (handle_java_interface_attribute, handle_com_interface_attribute,
2380         handle_init_priority_attribute): New functions.
2381         (cp_attribute_table): New array.
2382         * decl2.c (import_export_class): Don't use
2383         targetm.valid_type_attribute.
2384
2385 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2386
2387         * Make-lang.in (cp/error.o): Depend on real.h
2388         * error.c: #include "real.h"
2389
2390 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2391
2392         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2393         xmalloc/strcpy/strcat.
2394
2395 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2396
2397         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2398         Const-ification.
2399         * pt.c (tsubst_decl): Likewise.
2400
2401 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2402
2403         * decl2.c (lang_f_options): Const-ification.
2404         * lex.c (cplus_tree_code_name): Likewise.
2405         * spew.c (yyerror): Likewise.
2406
2407 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2408
2409         PR c++/3986
2410         * class.c (force_canonical_binfo_r): Check & move an indirect
2411         primary base first.
2412         (force_canonical_binfo): Check that it's not already
2413         canonical.
2414         (mark_primary_virtual_base): Remove BINFO parameter.
2415         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2416
2417 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2418
2419         Remove TYPE_NONCOPIED_PARTS.
2420         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2421         CLASSTYPE_PURE_VIRTUALS.
2422         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2423         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2424         (layout_class_type): Don't call fixup_inline_methods here ...
2425         (finish_struct_1): ... call it here.
2426
2427 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
2428
2429         * decl.c (duplicate_decls): Remove code deadling with
2430         DECL_SAVED_INSNS.
2431         * decl2.c (finish_file): Likewise.
2432         * pt.c (instantiate_decl): Likewise.
2433         * semantics.c (expand_body): Don't defer local functions if
2434         they wouldn't be deferred for some other reason.  Don't
2435         generate RTL for functions that will not be emitted.
2436         (genrtl_start_function): Remove code deadling with
2437         DECL_SAVED_INSNS.
2438         (genrtl_finish_function): Likewise.
2439
2440 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2441
2442         PR c++/4203
2443         * call.c (build_over_call): Do not optimize any empty base
2444         construction.
2445
2446 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2447
2448         * error.c (dump_template_decl): Output template parameters
2449         together with their specifiers.
2450         Output `class' prefix for template template parameter.
2451         (dump_decl): Fix formatting.
2452
2453 2001-08-30  Kurt Garloff  <garloff@suse.de>
2454
2455         * optimize.c (inlinable_function_p): Allow only smaller single
2456         functions. Halve inline limit after reaching recursive limit.
2457
2458 2001-08-30  Joern Rennecke <amylaar@redhat.com>
2459             Jason Merrill  <jason_merrill@redhat.com>
2460
2461         * class.c (build_vtable_entry_ref): Subtract in char*, not
2462         ptrdiff_t.
2463
2464 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
2465
2466         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2467         (build_cplus_array_type): Use cp_build_qualified_type, not
2468         TYPE_MAIN_VARIANT, to get an unqualified version.
2469
2470         * decl2.c (grok_alignof): Lose.
2471         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2472         * typeck.c (c_alignof): Lose.
2473         * semantics.c (finish_sizeof, finish_alignof): New.
2474         * parse.y: Use them.
2475         * cp-tree.h: Declare them.
2476
2477 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
2478
2479         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2480         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2481         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2482
2483 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
2484
2485         * typeck2.c (add_exception_specifier): Only require complete type if
2486         not in processing template declaration.
2487
2488 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2489
2490         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2491         GNU_xref_start_scope and GNU_xref_end_scope.
2492
2493         * tree.c (TYPE_HASH): Moved to ../tree.h.
2494
2495 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
2496
2497         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2498         on COMPOUND_EXPRs.
2499
2500 2001-08-14  Richard Henderson  <rth@redhat.com>
2501
2502         * class.c, cp-tree.h (build_vfn_ref): Remove.
2503         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2504
2505 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
2506
2507         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2508         empty class assignment as having side-effects to avoid
2509         spurious warnings.
2510
2511 2001-08-13  Zack Weinberg  <zackw@panix.com>
2512
2513         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2514         * except.c: Include libfuncs.h.
2515
2516 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2517
2518         * decl.c (grokdeclarator): Clarify diagnostic message.
2519
2520 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2521
2522         * decl2.c (do_nonmember_using_decl): Replace using directive
2523         with using declaration in the error message.
2524
2525 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2526
2527         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2528         criterion to avoid rebuilding expression tree instead of
2529         processing_template_decl.
2530
2531 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2532
2533         Support named return value optimization for inlines, too.
2534         * decl.c (finish_function): Nullify returns here.
2535         * semantics.c (genrtl_start_function): Not here.
2536         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2537         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
2538         Also nullify the CLEANUP_STMT for the nrv.
2539         * cp-tree.h: Declare it.
2540         * optimize.c (declare_return_variable): Replace the nrv with the
2541         return variable.
2542         * typeck.c (check_return_expr): Be more flexible on alignment check.
2543         Ignore cv-quals when checking for a matching type.
2544
2545 2001-08-09  Richard Henderson  <rth@redhat.com>
2546
2547         * decl2.c (finish_objects): Use target hooks instead of
2548         assemble_constructor and assemble_destructor.
2549
2550 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2551
2552         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2553
2554 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
2555
2556         PR c++/3820
2557         Stop using TYPE_NONCOPIED_PARTS.
2558         * call.c (build_over_call): Be careful when copy constructing
2559         or assigning to an empty class.
2560         * class.c (check_bases_and_members): It has a
2561         COMPLEX_ASSIGN_REF if it has a vptr.
2562         (layout_class_type): Don't add empty class padding to
2563         TYPE_NONCOPIED_PARTS.
2564         (finish_struct_1): Don't add the VFIELD either.
2565         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2566         initialization.
2567
2568 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2569
2570         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2571
2572 2001-08-06  Richard Henderson  <rth@redhat.com>
2573
2574         * decl2.c (finish_objects): Pass a symbol_ref and priority to
2575         assemble_{constructor,destructor}.  Remove priority handling.
2576
2577 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2578
2579         Don't allow template-id in using-declaration.
2580         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2581         (do_class_using_decl): Likewise.
2582
2583 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2584
2585         * cp/spew.c (read_token): No need to pop buffers.
2586
2587 2001-08-02  Stan Shebs  <shebs@apple.com>
2588
2589         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2590         (fnaddr_from_vtable_entry): Remove decl.
2591         * method.c (use_thunk): Update comment.
2592
2593 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
2594
2595         * repo.c (get_base_filename): Change return value to const char
2596         pointer.
2597
2598 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2599
2600         Kill -fhonor-std.
2601         * NEWS: Document.
2602         * cp-tree.h (flag_honor_std): Remove.
2603         (CPTI_FAKE_STD): Remove.
2604         (std_node): Remove comment about it being NULL.
2605         (fake_std_node): Remove.
2606         * decl.c (in_fake_std): Remove.
2607         (walk_namespaces_r): Remove fake_std_node check.
2608         (push_namespace): Remove in_fake_std code.
2609         (pop_namespace): Likewise.
2610         (lookup_name_real): Remove fake_std_node check.
2611         (init_decl_processing): Always create std_node. Always add
2612         std:: things there.
2613         (builtin_function): Always put non '_' fns in std.
2614         * decl2.c (flag_honor_std): Remove.
2615         (lang_f_options): Remove honor-std.
2616         (unsupported_options): Add honor-std.
2617         (set_decl_namespace): Remove fake_std_node check.
2618         (validate_nonmember_using_decl): Likewise.
2619         (do_using_directive): Likewise.
2620         (handle_class_head): Likewise.
2621         * dump.c (cp_dump_tree): Likewise.
2622         * except.c (init_exception_processing): Adjust.
2623         * init.c (build_member_call): Remove fake_std_node check.
2624         (build_offset_ref): Likewise.
2625         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2626         * rtti.c (init_rtti_processing): Adjust.
2627
2628 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2629
2630         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2631         operand while calling cp_tree_equal.
2632
2633 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2634
2635         The 3.0 ABI no longer has vbase pointer fields.
2636         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2637         FORMAT_VBASE_NAME): Remove.
2638         * method.c (do_build_copy_constructor): Adjust.
2639         (do_build_assign_ref): Adjust.
2640         * search.c (lookup_field_r): Adjust.
2641         * typeck.c (build_component_ref): Adjust.
2642
2643         The 3.0 ABI always has a vtable pointer at the start of every
2644         polymorphic class.
2645         * rtti.c (build_headof_sub): Remove.
2646         (build_headof): Adjust.
2647         (get_tinfo_decl_dynamic): No need to check flag_rtti
2648         here. Adjust.
2649         (create_real_tinfo_var): Explain why we need a hidden name.
2650
2651 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2652
2653         PR c++/3631
2654         * class.c (update_vtable_entry_for_fn): The fixed adjustment
2655         of a virtual thunk should be from declaring base.
2656
2657 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2658
2659         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2660         the shared virtual base, so preserving inheritance graph order.
2661
2662 2001-07-30  Andreas Jaeger  <aj@suse.de>
2663
2664         * decl2.c: Remove unused var global_temp_name_counter.
2665
2666 2001-07-28  Richard Henderson  <rth@redhat.com>
2667
2668         * method.c (pending_inlines): Remove.
2669
2670 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2671
2672         * class.c (mark_primary_virtual_base): Don't adjust base
2673         offsets here.
2674         (dfs_unshared_virtual_bases): Adjust them here.
2675         (mark_primary_bases): Explain why we adjust at the end.
2676
2677 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2678
2679         * class.c (finish_struct_1): When copying the primary base's
2680         VFIELD, make sure we find it is at offset zero.
2681
2682 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2683
2684         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2685         tsubst_expr for default template arguments.
2686
2687 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2688
2689         PR c++/3621
2690         * spew.c (yylex): Only copy the token's lineno, if it is
2691         non-zero.
2692
2693 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2694
2695         PR c++/3624
2696         * call.c (resolve_args): Simplify, call
2697         convert_from_reference.
2698         (build_new_op): Resolve and convert from reference ARG1
2699         earlier. Adjust ARG2 & ARG3 resolve and conversion.
2700
2701 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2702
2703         * decl.c (last_function_parm_tags): Remove.
2704         (current_function_parm_tags): Remove.
2705         (init_decl_processing): Adjust.
2706         (start_function): Adjust.
2707         (store_parm_decls): Adjust.
2708
2709         PR c++/3152
2710         * decl.c (grokdeclarator): Detect when a function typedef is
2711         declaring a function, and create last_function_parms correctly.
2712
2713 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
2714
2715         * call.c (joust): Only prefer a non-builtin candidate to a builtin
2716         one if they have the same signature.
2717
2718         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
2719         it rather than toplevel_bindings_p.  Give it a mangled name if static.
2720         (convert_to_reference): Adjust.
2721         * decl2.c (get_temp_name): Lose.
2722         * mangle.c (mangle_ref_init_variable): New fn.
2723         (mangle_guard_variable): Strip the ref-init header.
2724         * cp-tree.h: Adjust.
2725         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2726         initializer.
2727         (grok_reference_init): Always use DECL_INITIAL.
2728
2729 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2730
2731         PR c++/3416
2732         * call.c (build_conditional_expr): Recheck args after
2733         conversions.
2734         * cp-tree.h (build_conditional_expr): Move to correct file.
2735         * typeck.c (decay_conversion): Diagnose any unknown types
2736         reaching here.
2737         (build_binary_op): Don't do initial decay or default
2738         conversions on overloaded functions.
2739         (build_static_cast): Don't do a decay conversion here.
2740
2741 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2742
2743         PR c++/3543
2744         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2745         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2746
2747 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2748
2749         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2750         (create_vtbl_ptr): ... here.
2751
2752 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2753
2754         * class.c (build_vbase_offset_vbtl_entries): Look for
2755         non-primary base of which we are a sub vtable.
2756
2757 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
2758
2759         * semantics.c (finish_this_expr):  Remove unused code.
2760
2761 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2762
2763         Simplify rtti, now we've only one ABI.
2764         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2765         CPTI_TINFO_VAR_ID.
2766         (tinfo_decl_id, tinfo_var_id): Remove.
2767         (get_typeid_1): Remove.
2768         * rtti.c
2769         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2770         (typeid_ok_p): New function.
2771         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2772         (get_tinfo_decl): Remove old abi documentation.
2773         (tinfo_from_decl): Remove.
2774         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2775         (get_typeid_1): Remove.
2776         (get_base_offset): Remove.
2777         (synthesize_tinfo_var): Absorb get_base_offset.
2778         (create_real_tinfo_var): Don't use tinfo_decl_id.
2779
2780 2001-07-23  Graham Stott  <grahams@redhat.com>
2781
2782         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2783         variable has_two_argument_delete_p.
2784
2785 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2786
2787         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2788         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2789         (CPTI_INDEX_IDENTIFIER): Remove.
2790         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2791         (delta2_identifier): Remove.
2792         (index_identifier): Remove.
2793         (pfn_or_delta2_identifier): Remove.
2794         (flag_vtable_thunks): Remove.
2795         (VTABLE_DELTA2_NAME): Remove.
2796         (VTABLE_INDEX_NAME): Remove.
2797         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2798         (vfunc_ptr_type_node): Adjust.
2799         (VTABLE_NAME_PREFIX): Adjust.
2800         (build_vfn_ref): Lose first parameter.
2801         (fixup_all_virtual_upcast_offsets): Remove.
2802         * decl.c (initialize_predefined_identifiers): Remove
2803         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2804         (init_decl_processing): Remove no-vtable-thunk code.
2805         * decl2.c (flag_vtable_thunks): Remove.
2806         (mark_vtable_entries): Remove no-vtable-thunk code.
2807         * error.c (dump_decl): Remove no-vtable-thunk code.
2808         (dump_expr): Adjust ptr to member function code.
2809         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2810         code.
2811         * rtti.c (build_headof): Remove no-vtable-thunk code.
2812         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2813         * search.c (get_base_distance): Remove expand_upcast_fixups case.
2814         (virtual_context) Remove.
2815         (expand_upcast_fixups): Remove.
2816         (fixup_virtual_upcast_offsets): Remove.
2817         (fixup_all_virtual_upcast_offsets): Remove.
2818         * typeck.c (get_member_function_from_ptrfunc): Remove
2819         no-vtable-thunk code.
2820         * call.c (build_over_call): Adjust call to build_vfn_ref.
2821         * class.c (build_vfn_ref): Lose first parameter. Remove
2822         no-vtable-thunk code.
2823         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2824         (build_vtable_entry): Remove no-vtable-thunk code.
2825
2826 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2827
2828         Remove old-abi remnants. Remove comments about old abi
2829         behaviour. Remove references to 'new-abi' in comments.
2830         * cp-tree.h: Adjust comments.
2831         (vbase_offsets_in_vtable_p): Delete.
2832         (vcall_offsets_in_vtable_p): Delete.
2833         (vptrs_present_everywhere_p): Delete.
2834         (all_overridden_vfuns_in_vtables_p): Delete.
2835         (merge_primary_and_secondary_vtables_p): Delete.
2836         (TYPE_CONTAINS_VPTR_P): Adjust.
2837         (VTT_NAME_PREFIX): Remove.
2838         (CTOR_VTBL_NAME_PREFIX): Remove.
2839         (init_vbase_pointers): Remove.
2840         * class.c: Adjust coments.
2841         (build_vbase_pointer_fields): Delete.
2842         (build_vbase_pointer): Remove old-abi code.
2843         (build_secondary_vtable): Likewise.
2844         (modify_all_vtables): Likewise.
2845         (create_vtable_ptr): Likewise.
2846         (layout_class_type): Likewise.
2847         (finish_struct_1): Likewise.
2848         (finish_vtbls): Likewise.
2849         (dfs_finish_vtbls): Delete.
2850         (build_vbase_offset_vtbl_entries): Remove old-abi code.
2851         * cvt.c: Adjust comments.
2852         * decl.c: Adjust comments.
2853         * decl2.c: Adjust comments.
2854         * init.c: Adjust comments.
2855         (construct_virtual_bases): Remove old-abi code.
2856         * lang-specs.h: Remove -fno-new-abi.
2857         * mangle.c: Adjust comments.
2858         * rtti.c: Adjust comments.
2859         (get_base_offset): Remove old-abi-code.
2860         * search.c: Adjust comments.
2861         (dfs_init_vbase_pointers): Remove.
2862         (dfs_vtable_path_unmark): Remove.
2863         (init_vbase_pointers): Remove.
2864         * semantics.c: Adjust comments.
2865         (emit_associated_thunks): Remove old-abi code.
2866         * typeck.c: Adjust comments.
2867
2868 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
2869
2870         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2871         params.h.
2872
2873 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
2874
2875         * class.c (finish_struct_anon): Forbid nested classes.
2876
2877 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2878
2879         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2880         * optimize.c: Include debug.h.
2881         (maybe_clone_body): Use debug hook.
2882         * semantics.c: Include debug.h.
2883         (expand_body): Use debug hook.
2884
2885 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2886
2887         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2888
2889 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
2890
2891         * class.c (type_requires_array_cookie): New function.
2892         (check_methods): Don't try to figure out whether the type needs a
2893         cookie here.
2894         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2895         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2896         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2897         * pt.c (instantiate_class_template): Don't set
2898         TYPE_VEC_DELETE_TAKES_SIZE.
2899         * NEWS: Document ABI changes from GCC 3.0.
2900
2901 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
2902             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2903
2904         * NEWS (Changes in GCC 3.0): Fix typo.
2905
2906 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2907
2908         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2909         which attributes are to be attached, and a flags argument.  Update
2910         call to decl_attributes.
2911         (grokfield): Update call to decl_attributes.
2912         * class.c (finish_struct): Update call to cplus_decl_attributes.
2913         * cp-tree.h (cplus_decl_attributes): Update prototype.
2914         * decl.c (start_decl, grokdeclarator, start_function): Update
2915         calls to decl_attributes and cplus_decl_attributes.
2916         * friend.c (do_friend): Update call to cplus_decl_attributes.
2917         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2918
2919 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
2920
2921         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2922         for `register' variables with an asm-specification.
2923
2924 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
2925
2926         * semantics.c (finish_asm_stmt): Mark the output operands
2927         to an asm addressable, if necessary.
2928
2929 2001-07-11  Ben Elliston  <bje@redhat.com>
2930
2931         * Revert this change -- there is a subtle bug.
2932
2933         PR c++/80
2934         * decl.c (finish_enum): New "attributes" argument; pass it to
2935         cplus_decl_attributes.  Use a narrower type if the enum is packed.
2936         * cp-tree.h (finish_enum): Adjust prototype.
2937         * parse.y (enum_head): New non-terminal.
2938         (structsp): Use it. Enums now may be preceded or followed by
2939         optional attributes -- pass their chained tree to finish_enum().
2940         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2941
2942 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
2943
2944         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2945         variables.
2946
2947 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
2948
2949         * semantics.c (cp_expand_stmt): Fix for null
2950         current_function_return_value.
2951
2952 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
2953
2954         * call.c (build_op_delete_call): Initialize fn.
2955         (convert_like_real): Delete conditional.
2956         (joust): Initialize *w and *l.
2957         * class.c: Add prototype for binfo_ctor_vtable.
2958         (get_primary_binfo): Initialize result.
2959         * init.c (build_java_class_ref): Initialize name.
2960
2961 2001-07-09  Erik Rozendaal  <dlr@acm.org>
2962
2963         * typeck.c (unary_complex_lvalue): Do not duplicate the
2964         argument to modify, pre-, or post-increment when used as an
2965         lvalue and when the argument has side-effects.
2966
2967 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2968
2969         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2970         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
2971         cplus_decl_attributes even if attrs is NULL.
2972         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2973
2974 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2975
2976         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2977         calls to decl_attributes.
2978
2979 2001-07-06  Ira Ruben   <ira@apple.com>
2980
2981         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2982         be DECL_TEMPLATE_RESULT.
2983
2984 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2985
2986         * cp-tree.h (copy_template_template_parm): Rename to ...
2987         (bind_template_template_parm): ... here.
2988         * tree.c (copy_template_template_parm): Rename to ...
2989         (bind_template_template_parm): ... here.  Remove the case when
2990         NEWARGS is NULL_TREE.
2991         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2992         BOUND_TEMPLATE_TEMPLATE_PARM.
2993         * pt.c (lookup_template_class): Adjust.
2994
2995 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
2996
2997         * cvt.c (convert_lvalue): New fn.
2998         * cp-tree.h: Declare it.
2999         * method.c (do_build_assign_ref): Use it.
3000         (do_build_copy_constructor): Convert parm to base types
3001         before calling base constructors.
3002
3003         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
3004         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
3005         optimize.
3006         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
3007
3008 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3009
3010         * optimize.c (optimize_inline_calls): New function, broken out
3011         of ...
3012         (optimize_function): ... here. Call it. Don't inline if it is
3013         a thunk.
3014         (dump_function): Print name of dump flag causing this dump.
3015         * semantics.c (expand_body): Move thunk inline check to
3016         optimize_function.
3017
3018 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3019
3020         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
3021         (comptypes): Use target.comp_type_attributes.
3022
3023 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3024
3025         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
3026
3027 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3028
3029         * error.c (lang_print_error_function): Add a `diagnostic_context *'
3030         parameter. Tweak.
3031
3032 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3033
3034         * decl2.c (import_export_class): Update.
3035
3036 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3037
3038         * error.c (init_error): Adjust settings.
3039
3040 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
3041
3042         * error.c (init_error): Adjust settings.
3043
3044 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
3045
3046         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
3047         return pointers to data members by reference rather than by value.
3048
3049 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
3050
3051         Implement the Named Return Value optimization.
3052         * cp-tree.h (struct cp_language_function): Add x_return_value.
3053         (current_function_return_value): Now a macro.
3054         * decl.c: Don't define it.
3055         (define_label, finish_case_label): Don't clear it.
3056         (init_decl_processing): Don't register it with GC.
3057         * semantics.c (genrtl_finish_function): Don't check it for
3058         no_return_label.  Copy the RTL from the return value to
3059         current_function_return_value and walk, calling...
3060         (nullify_returns_r): ...this new fn.
3061         * typeck.c (check_return_expr): Set current_function_return_value.
3062
3063 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
3064
3065         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
3066         sharing a ctor vtable with.  Merge code for cases 1 and 2.
3067         (binfo_ctor_vtable): New fn.
3068         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
3069
3070 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
3071
3072         * class.c (dfs_find_final_overrider): Fix logic.
3073
3074         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
3075         virtual thunk instead of non-virtual.
3076         (get_matching_virtual): Uncomment.
3077
3078         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
3079         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
3080         PARM, not ARG.
3081
3082 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3083
3084         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
3085         we've not emerged from the hierarchy of RTTI_BINFO on reaching
3086         a non-virtual base.
3087
3088 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
3089
3090         * NEWS: Update release number.
3091
3092 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3093
3094         PR c++/3130, c++/3131, c++/3132
3095         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
3096         * class.c (force_canonical_binfo_r): Move
3097         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
3098         virtual bases unless they're primary and what they're primary
3099         too has been moved.
3100         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
3101         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
3102         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
3103         derived binfo.
3104         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
3105         (layout_nonempty_base_or_field): Add most derived type
3106         parameter. Adjust.
3107         (layout_empty_base): Likewise.
3108         (build_base_field): Likewise.
3109         (build_base_fields): Likewise.
3110         (propagate_binfo_offsets): Add most derived type
3111         parameter. Skip non canonical virtual bases too.
3112         (dfs_set_offset_for_unshared_vbases): Don't skip primary
3113         bases. Do skip canonical bases.
3114         (layout_virtual_bases): Adjust.
3115         (layout_class_type): Adjust.
3116         (dfs_get_primary_binfo): Build list of virtual primary base
3117         candidates.
3118         (get_primary_binfo): Check that the shared virtual primary
3119         base candidate was found first.
3120         (accumulate_vtbl_inits): Don't do anything for non-vptr
3121         containing binfos. For case 1 primary virtual bases, keep
3122         checking that we've not emerged from the hierarchy of RTTI_BINFO.
3123
3124 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3125
3126         PR c++/3089
3127         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
3128         hierarchy looking for primary bases for a ctor
3129         vtable. Recursively call oneself, if we meet our primary via
3130         this route and haven't met it yet via inheritance graph order.
3131
3132 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
3133
3134         * lang-options.h: Emit documentation for -fno-honor-std, not
3135         -fhonor-std.
3136
3137 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
3138
3139         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
3140         Don't clobber delta.
3141         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
3142
3143 2001-06-10  Mark Mitchell <mark@codesourcery.com>
3144             Gabriel Dos Reis  <gdr@codesourcery.com>
3145
3146         * Make-lang.in (cp/call.o): Depend on diagnostic.h
3147         (cp/typeck.o): Depend on diagnostic.h
3148         (cp/typeck2.o): Depend on diagnostic.h
3149         (cp/repo.o): Depend on dignostic.h
3150         * typeck.c: #include diagnostic.h
3151         (convert_for_initialization): Remove extern declaration for
3152         warningcount and errorcount.
3153
3154         * call.c: #include diagnostic.h
3155         (convert_like_real): Remove extern declaration for warnincount and
3156         errorcount.
3157
3158         * repo.c: #include diagnostic.h
3159         * typeck2.c: #include diagnostic.h
3160
3161 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3162
3163         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
3164         in previous change.
3165
3166 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3167
3168         PR c++/2929
3169         * friend.c (do_friend): Use push_decl_namespace for classes at
3170         namespace scope.
3171
3172 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3173             Jason Merrill <jason_merrill@redhat.com>
3174
3175         PR c++/3061
3176         * class.c (build_secondary_vtable): Use assert, rather than an error
3177         message.
3178         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
3179         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
3180         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
3181         Don't set BINFO_VTABLE for a primary virtual base.
3182
3183 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
3184
3185         * decl.c (duplicate_decls): Update source position information
3186         when a template function is defined.
3187
3188 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
3189
3190         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
3191
3192 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3193
3194         PR c++/2914
3195         * decl.c (pushtag): Don't push into a complete type's scope.
3196
3197 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
3198
3199         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
3200         (struct lang_decl_flags): Lose generate_with_vtable_p.
3201         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
3202         * class.c (copy_virtuals): Adjust.
3203         * decl2.c (mark_vtable_entries): Adjust.
3204         * method.c (make_thunk, build_vtable_entry): Adjust.
3205         * class.c (update_vtable_entry_for_fn): Only look as far as the
3206         first defining class.
3207         (build_vtbl_initializer): Put nothing in the slot for a function only
3208         defined in a lost primary virtual base.
3209         (add_vcall_offset_vtbl_entries_1): Use the same code for
3210         the lost primary case and the normal case.
3211         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
3212         (get_vfield_offset, get_derived_offset): Lose.
3213         (dfs_find_final_overrider): Use look_for_overrides_here.
3214         (get_matching_virtual): New fn.
3215         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
3216         not BV_VCALL_INDEX.
3217         * search.c (look_for_overrides_here): Split out from...
3218         (look_for_overrides_r): Here.
3219
3220         * class.c (find_final_overrider): Return error_mark_node on error.
3221
3222         * decl2.c (key_method): #if 0 accidental change.
3223
3224 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3225
3226         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
3227         (build_over_call): Likewise.
3228         * decl.c (grokparms): Likewise.
3229         * pt.c (tsubst_decl): Likewise.
3230         * typeck.c (convert_arguments): Likewise.
3231
3232 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
3233
3234         * semantics.c (begin_class_definition): Robustify.
3235
3236         * pt.c (instantiate_decl): Tell the repository code about the
3237         clones, not the cloned functions.
3238         * repo.c (repo_template_used): Explicitly instantiate the cloned
3239         function, not the clones.
3240
3241 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3242
3243         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
3244         ICS_BAD_FLAG on created conversion.
3245         (compare_ics): Break out rank.
3246
3247 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3248
3249         * decl.c (xref_tag): Remove extraneous %s on dependent name
3250         lookup warning.
3251
3252 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3253
3254         * class.c (layout_vtable_decl): Fix off by one error on
3255         build_index_type.
3256         (build_vtt): Likewise.
3257         (build_ctor_vtbl_group): Likewise.
3258
3259 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3260
3261         * class.c (maybe_indent_hierarchy): New function.
3262         (dump_class_hierarchy_r): Add flags. Dump extra binfo
3263         information, if enabled. Use maybe_indent_hierarchy. Adjust
3264         output format.
3265         (dump_class_hierarchy): Adjust prototype. Adjust output format.
3266         (dump_array, dump_vtable, dump_vtt): New functions.
3267         (finish_struct_1): Adjust hierarchy dumping.
3268         (initialize_vtable): Call dump_vtable.
3269         (build_vtt): Call dump_vtt.
3270         (build_ctor_vtbl_group): Call dump_vtable.
3271         * decl2.c (flag_dump_class_layout): Remove.
3272         (cxx_decode_option): Remove dump translation unit
3273         and dump class hierarchy check. Call dump_switch_p.
3274         (finish_file): Adjust dumping.
3275         (dump.c): Only dump base classes if not TDF_SLIM.
3276         Only dump namespace members if not TDF_SLIM.
3277         * optimize.c (dump_function): New function.
3278         (optimize_function): Call dump_function.
3279         * semantics.c (expand_body): Use dump_enabled_p.
3280
3281 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
3282
3283         PR g++/2936
3284         Part missed from first commit
3285         * decl2.c (finish_anon_union): Copy context.
3286
3287 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
3288
3289         PR g++/2936
3290         * optimize.c (remap_decl): Remap anonymous aggregate members too.
3291
3292 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3293
3294         PR g++/2823
3295         * semantics.c (expand_body): Don't optimize thunks.
3296
3297 2001-05-25  Sam TH  <sam@uchicago.edu>
3298
3299         * cp-tree.h lex.h: Fix header include guards.
3300
3301 2001-05-25  Mark Mitchell <mark@codesourcery.com>
3302
3303         * decl.c (init_decl_processing): Tweak.
3304
3305 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
3306
3307         * decl.c (duplicate_decls): Tidy.
3308         (init_decl_processing): Always set flag_no_builtin.
3309
3310 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3311
3312         PR c++/2184
3313         * decl2.c (do_local_using_decl): Push the decls, even in a
3314         template.
3315
3316 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
3317
3318         * optimize.c (initialize_inlined_parameters): Don't set
3319         TREE_READONLY for a VAR_DECL taking the place of an inlined
3320         PARM_DECL.
3321
3322 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
3323
3324         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
3325         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
3326         attribute.
3327
3328 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
3329
3330         * parse.y: Refer to compound literals as such, not as
3331         constructor-expressions.
3332
3333 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
3334
3335         * call.c (build_op_delete_call): Ignore exception-specifications
3336         when looking for matching delete operators.
3337         * init.c (build_new_1): Compute whether or not the allocation
3338         function used is a placement allocation function or not, and
3339         communicate this information to build_op_delete_call.
3340
3341 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
3342
3343         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
3344         (build_vtbl_ref): Adjust.
3345         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
3346         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
3347         Re-add vtable-gc.
3348         (unsupported_options): Correspondingly.
3349
3350         * decl2.c (maybe_make_one_only): Check flag_weak, not
3351         supports_one_only().
3352
3353         * cp-tree.def (START_CATCH_STMT): Lose.
3354         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
3355         * tree.c (cp_statement_code_p): Don't case it.
3356         * semantics.c (cp_expand_stmt): Likewise.
3357         * cp-tree.h (START_CATCH_TYPE): Lose.
3358         (HANDLER_TYPE): New.
3359         * except.c (expand_start_catch_block): Don't start any blocks.
3360         Return the type.
3361         (expand_end_catch_block): Don't end any blocks.
3362         * parse.y (handler): Don't pass anything from finish_handler_parms
3363         to finish_handler.
3364         * pt.c (tsubst_expr): Likewise.
3365         * semantics.c (begin_handler): Call note_level_for_catch here.
3366         (finish_handler_parms): Don't return anything.
3367         (genrtl_catch_block, begin_catch_block): Lose.
3368         (genrtl_handler): Call expand_start_catch here.
3369
3370 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
3371
3372         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
3373         (get_vtable_decl, build_vtt): Not here.
3374
3375 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
3376
3377         PR c++/2781
3378         * optimize.c (update_cloned_parm): Copy addressability and other
3379         flags.
3380
3381 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3382
3383         * pt.c (determine_specialization): Ignore artificial functions.
3384
3385 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3386
3387         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
3388         (C_RID_CODE): Remove.
3389         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
3390         (init_parse): Don't do it here.
3391
3392 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
3393
3394         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3395         function declaration to avoid stripping the symbol's attributes.
3396
3397 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
3398
3399         * decl.c (pushdecl): Adjust error string.
3400         (xref_tag): Adjust friend class injection warning. Remove the
3401         inherited name from the class shadowed scope.
3402
3403 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
3404
3405         * except.c (cp_protect_cleanup_actions): New function.
3406         (init_exception_processing): Don't set protect_cleanup_actions
3407         here.  Do set lang_protect_cleanup_actions.
3408
3409 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3410
3411         * spew.c (read_token): Call yyerror on all unexpected tokens.
3412
3413 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3414
3415         * init.c (member_init_ok_or_else): Take a tree rather than
3416         string for name.
3417         (expand_member_init): Adjust.
3418
3419 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
3420
3421         * decl.c (duplicate_decls): Suppress warning about duplicate
3422         decls if the first decl is a friend.
3423
3424 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
3425
3426         * except.c (choose_personality_routine): Export.  Add
3427         explanatory comment.  Take an enum languages, not a boolean.
3428         (initialize_handler_parm): Adjust to match.
3429         * cp-tree.h: Prototype choose_personality_routine.
3430         * lex.c (handle_pragma_java_exceptions): New function.
3431         (init_cp_pragma): Register #pragma GCC java_exceptions.
3432
3433 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3434
3435         * method.c (build_mangled_C99_name): Remove unused prototype.
3436
3437 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
3438
3439         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
3440         * typeck.c (get_member_function_from_ptrfunc,
3441         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
3442         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
3443
3444         Reverted Geoff Keating's 2001-05-03's patch.
3445
3446 2001-05-11  Ira Ruben   <ira@apple.com>
3447
3448         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3449
3450 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
3451
3452         * cp-tree.h (finish_label_expr, lookup_label): Delete.
3453         * parse.y: Update for '&&'; don't issue warning here.
3454         * semantics.c (finish_label_expr): Delete.
3455
3456 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
3457
3458         * splay-tree.h (splay_tree_max): New function.
3459         (splay_tree_min): Likewise.
3460
3461 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
3462
3463         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3464         (pfn_vflag_identifier): Define.
3465         Update comment about layout of pointer functions.
3466         (build_ptrmemfunc1): Update prototype.
3467         (expand_ptrmemfunc_cst): Update prototype.
3468         * decl.c (initialize_predefined_identifiers): Initialize
3469         pfn_vflag_identifier.
3470         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3471         an extra field to the type.
3472         * expr.c (cplus_expand_constant): Pass 'flag' between
3473         expand_ptrmemfunc_cst and build_ptrmemfunc1.
3474         * typeck.c (get_member_function_from_ptrfunc): When
3475         FUNCTION_BOUNDARY < 16, look at additional field to determine
3476         if a pointer-to-member is a real pointer or a vtable offset.
3477         (build_ptrmemfunc1): Add new parameter to contain extra field.
3478         (build_ptrmemfunc): Pass the extra field around.
3479         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3480         (pfn_from_ptrmemfunc): Ignore the extra field.
3481
3482 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
3483
3484         * cp-tree.h (flag_inline_trees): Update documentation.
3485         * decl.c (init_decl_processing): Adjust handling of
3486         flag_inline_functions and flag_inline_trees to support -O3.
3487         (grokfndecl): Set DECL_INLINE on all functions if that's what
3488         the user requested.
3489         (save_function_data): Clear DECL_INLINE in
3490         current_function_cannot_inline is non-NULL.
3491         * decl2.c (flag_inline_trees): Update documentation.
3492
3493 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3494
3495         * dump.c (cp_dump_tree, USING_STMT case): New case.
3496         * tree.c (cp_statement_code_p): Add USING_STMT.
3497         * decl2.c (do_using_directive): Add the using directive statement.
3498
3499         * tree.c (walk_tree): Reformat an if block.
3500
3501 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3502
3503         * decl.c (compute_array_index_type): Don't try to do anything with
3504         the indices when processing a template.
3505
3506 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3507
3508         * call.c: NULL_PTR -> NULL.
3509         * class.c: Likewise.
3510         * cvt.c: Likewise.
3511         * decl.c: Likewise.
3512         * decl2.c: Likewise.
3513         * except.c: Likewise.
3514         * init.c: Likewise.
3515         * rtti.c: Likewise.
3516         * search.c: Likewise.
3517         * tree.c: Likewise.
3518         * typeck.c: Likewise.
3519         * typeck2.c: Likewise.
3520
3521 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3522
3523         * decl2.c (do_using_directive): Revert previous patch.
3524
3525 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3526
3527         * cp-tree.def (USING_STMT): New statement node.
3528         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3529         * decl2.c (do_using_directive): Add USING_STMT to statement
3530         tree. Don't emit errors when processing template decl.
3531         * pt.c (tsubst_expr, USING_STMT case): New case.
3532         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3533
3534 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3535
3536         * call.c (build_new_op): Convert args from reference here.
3537         (build_conditional_expr): Don't convert here.
3538
3539 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3540
3541         * spew.c (last_token_id): New static variable.
3542         (read_token): Set it here.
3543         (yyerror): Use it here.
3544
3545 2001-04-30  Richard Henderson  <rth@redhat.com>
3546
3547         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3548         * decl.c: Likewise.
3549
3550 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3551
3552         * gxxint.texi: Remove.
3553         * Make-lang.in: Remove all traces of gxxint.texi.
3554
3555 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
3556
3557         * decl2.c (start_static_initialization_or_destruction): Correct
3558         logic to handle the -fno-use-cxa-atexit case.
3559
3560 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3561
3562         * optimize.c (update_cloned_parm): New function.
3563         (maybe_clone_body): Use it.  Update the `this' parameter too.
3564
3565 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3566
3567         * decl2.c (unsupported_options): Add new-abi.
3568         * lang-options.h: Remove no longer supported options.
3569
3570 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3571
3572         * except.c (can_convert_eh): Don't check template parms,
3573         typename types etc.
3574
3575 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3576
3577         * optimize.c (maybe_clone_body): Copy parameter names and locations.
3578
3579 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3580
3581         * cp-tree.h (adjust_clone_args): Prototype new function.
3582         * class.c (adjust_clone_args): New function.
3583         * decl.c (start_function): Call it for in charge ctors.
3584
3585 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
3586
3587         * method.c (use_thunk): Make sure that thunks really are emitted
3588         when requested.
3589
3590 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
3591
3592         * mangle.c (write_chars): New macro.
3593         (hwint_to_ascii): New function
3594         (write_number): Use it.
3595         (write_integer_cst): Deal with really big numbers.
3596
3597 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
3598
3599         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3600         the clone.
3601
3602 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
3603
3604         * decl.c (grokdeclarator): Set context of namespace scope
3605         TYPE_DECLS.
3606
3607 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
3608
3609         * cp/optimize.c: Include hashtab.h.
3610         (struct inline_data): Add tree_pruner.
3611         (expand_call_inline, expand_calls_inline): Use it when calling
3612         walk_tree.
3613         (optimize_function): Initialize and free tree_pruner.
3614
3615 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
3616
3617         Lazy __FUNCTION__ generation.
3618         * cp-tree.def (FUNCTION_NAME): Remove.
3619         * cp-tree.h (function_name_declared_p): Remove.
3620         (cp_fname_init): Prototype.
3621         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3622         don't call declare_function_name. Call start_fname_decls.
3623         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3624         clobber the line number.
3625         (cp_fname_init): New function.
3626         (start_function): Call start_fname_decls.
3627         (finish_function): Call finish_fname_decls.
3628         * lex.c (reswords): Add slots for __FUNCTION__ et al.
3629         (rid_to_yy): Add mappings for __FUNCTION__ et al.
3630         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3631         * parse.y (VAR_FUNC_NAME): New token.
3632         (primary): Add VAR_FUNC_NAME.
3633         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3634         generation.
3635         (tsubst, FUNCTION_NAME case): Remove.
3636         (tsubst_copy, FUNCTION_NAME case): Remove.
3637         (tsubst_expr, DECL_STMT case): Be careful with a
3638         DECL_PRETTY_FUNCTION_P.
3639         (instantiate_decl): Remove function_name_declared_p.
3640         * semantics.c (begin_compound_statement): Don't call
3641         declare_function_name here.
3642         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3643         (finish_translation_unit): Call finish_fname_decls.
3644         (expand_body): Remove function_name_declared_p.
3645         * typeck2.c (digest_init): Allow any ERROR_MARK.
3646
3647 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3648
3649         * pt.c (tsubst_decl): Use VOID_TYPE_P.
3650         * semantics.c: Fix some typos.
3651
3652 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
3653
3654         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
3655
3656 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3657
3658         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3659
3660 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
3661
3662         * except.c (build_throw): Wrap the initialization of the exception
3663         object in a MUST_NOT_THROW_EXPR.
3664         (do_free_exception): #if 0.
3665
3666 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
3667
3668         * cp-tree.h (finish_enum): Change prototype.
3669         * decl.c (finish_enum): Reorganize.
3670         * parse.y (structsp): Adjust calls to finish_enum.
3671
3672 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3673
3674         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3675         't' case.
3676
3677 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3678
3679         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3680         (layout_empty_base): Return at end flag.
3681         (build_base_field): Likewise.
3682         (build_base_fields): Likewise.
3683         (layout_virtual_bases): Don't add 1 to eoc value.
3684         (end_of_class): Use full size for empty bases.
3685         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3686         empty bases. Don't add 1 to eoc value. Only add trailing padding
3687         if we're an empty class with no empty bases.
3688         (dump_class_hierarchy): Dump size and alignment.
3689
3690 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3691
3692         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3693         ICS_BAD_FLAG.
3694
3695 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3696
3697         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3698         is found, look first if name does not match the structure name.
3699
3700 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
3701
3702         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3703         set.
3704         (SET_DECL_LANGUAGE): New macro.
3705         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3706         (pushdecl): Likewise.
3707         (build_library_fn_1): Likewise.
3708         (build_cp_library_fn): Likewise.
3709         (grokfndecl): Likewise.
3710         (grokvardecl): Mark `extern "C"' variables as having C linkage.
3711         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3712         * lex.c (retrofit_lang_decl): Likewise.
3713         * mangle.c (mangle_decl_string): Don't mangle the names of
3714         variables declared with C language linkage.
3715         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3716
3717 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3718
3719         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3720         flag_access_control from uninitialized storage.
3721
3722 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
3723
3724         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3725         * mangle.c (write_pointer_to_member_type): Fix mangling of
3726         pointers to cv-qualified member function types.
3727
3728         * init.c (build_delete): Create a SAVE_EXPR for the address if
3729         we're going to use it more than once.
3730
3731 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
3732
3733         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3734         (expand_ptremfunc_cst): Change prototype.
3735         (delta2_from_ptrmemfunc): Remove.
3736         * expr.c (cplus_expand_constant): Adjust call to
3737         expand_ptrmemfunc_cst.
3738         * typeck.c (build_ptrmemfunc1): Simplify.
3739         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3740         results in a constant.
3741         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3742         (delta2_from_ptrmemfunc): Remove.
3743         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3744
3745 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
3746
3747         * cp-tree.h (decl_namespace_list): New macro.
3748         (struct saved_scope): Add decl_ns_list.
3749         * decl.c (mark_saved_scope): Mark it.
3750         * decl2.c: Lose static decl_namespace_list.
3751         (init_decl2): Don't save it.
3752
3753 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3754
3755         * cp-tree.h (warn_return_type, yylex): Delete redundant
3756         declarations.
3757
3758         * decl.c (current_class_depth, global_namespace): Likewise.
3759
3760         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3761
3762         * repo.c (flag_use_repository): Likewise.
3763
3764 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3765
3766         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3767         set_block, pushdecl, getdecls, gettags, init_decl_processing,
3768         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3769         lvalue_or_else, print_lang_statistics, comp_target_types,
3770         unsigned_type, signed_type, signed_or_unsigned_type,
3771         build_function_call, mark_addressable, incomplete_type_error):
3772         Delete redundant declarations.
3773
3774 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
3775
3776         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3777         (TYPE_ANONYMOUS_P): New macro.
3778         (TAGGED_TYPE_P): New macro.
3779         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3780         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3781         * tree.c (no_linkage_helper): Likewise.
3782         * semantics.c (begin_class_definition): Likewise.
3783         * pt.c (convert_template_argument): Likewise.
3784         * lex.c (check_for_missing_semicolon): Likewise.
3785
3786 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3787
3788         * class.c (dfs_unshared_virtual_bases): New function.
3789         (mark_primary_bases): Call it.
3790         (check_bases): Ignore virtual bases when determining
3791         nearly-emptiness.
3792
3793 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3794
3795         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3796
3797 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
3798
3799         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3800         cloned function to the clone.
3801
3802 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3803
3804         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3805
3806         * semantics.c: Include expr.h.
3807
3808 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
3809
3810         * method.c (implicitly_declare_fn): Commonize code for copy ctor
3811         and assignment op. Set TREE_USED for parameter.
3812
3813 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
3814
3815         * class.c (find_final_overrider_data): Add `candidates'.
3816         (dfs_find_final_overrider): Don't issue error messages
3817         prematurely.
3818         (find_final_overrider): Issue error messages here.
3819         (build_base_field): Don't warn about amgibuous direct bases here.
3820         (warn_about_ambiguous_direct_bases): New function.
3821         (layout_class_type): Use it.
3822
3823 2001-04-10  Richard Henderson  <rth@redhat.com>
3824
3825         * typeck.c (build_array_ref): Push the array reference inside
3826         COMPOUND_EXPR and COND_EXPR.
3827
3828 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
3829
3830         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3831         * decl.c (duplicate_decls): Adjust accordingly.
3832         (maybe_commonize_var): Likewise.
3833         (grokfndecl): Likewise.
3834         (start_function): Likewise.
3835         (start_method): Likewise.
3836         * decl2.c (key_method): Likewise.
3837         (import_export_decl): Likewise.
3838         * method.c (implicitly_declare_fn): Likewise.
3839         * optimize.c (maybe_clone_body): Likewise.
3840
3841 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
3842
3843         * lang-specs.h: Add __DEPRECATED.
3844
3845 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
3846
3847         * search.c (get_dynamic_cast_base_type): When building a new
3848         constant, set its type to ssizetype.
3849
3850 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
3851
3852         * optimize.c (expand_call_inline): Only add newly inlined statements
3853         into inlined_stmts.
3854
3855 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3856
3857         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3858         (OPERATOR_FORMAT): Likewise.
3859         (OPERATOR_TYPENAME_FORMAT): Likewise.
3860         * operators.def: Remove old name-mangling information.
3861         * decl.c (grok_op_properties): Adjust accordingly.
3862         * lex.c (init_operators): Likewise.
3863         * rtti.c (get_tinfo_decl): Issue error messages about types that
3864         have variable size.
3865
3866 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3867
3868         * decl2.c (import_export_decl): Don't call import_export_class
3869         when processing an inline member function.
3870         * semantics.c (expand_body): Call import_export_decl before
3871         emitting inline functions.
3872
3873 2001-03-28  Richard Henderson  <rth@redhat.com>
3874
3875         IA-64 ABI Exception Handling:
3876         * cp-tree.def (EH_SPEC_BLOCK): New.
3877         (MUST_NOT_THROW_EXPR): New.
3878         * cp-tree.h: Update changed function declarations.
3879         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3880         (CPTI_CALL_UNEXPECTED): New.
3881         (struct cp_language_function): Rename x_eh_spec_try_block
3882         to x_eh_spec_block.
3883         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3884         * decl.c (current_binding_level): If no current function
3885         bindings, revert to scope_chain.
3886         (initialize_predefined_identifiers): Remove __cp_push_exception.
3887         (store_parm_decls): Use begin_eh_spec_block.
3888         (finish_function): Use finish_eh_spec_block.
3889         (mark_lang_function): Update for name changes.
3890         * decl2.c (finish_file): No mark_all_runtime_matches.
3891         * dump.c (cp_dump_tree): Handle new tree codes.
3892         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3893         * except.c (catch_language_init, catch_language): Remove.
3894         (init_exception_processing): Don't set language code.
3895         Initialize call_unexpected_node, protect_cleanup_actions,
3896         eh_personality_libfunc, lang_eh_runtime_type.
3897         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3898         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3899         (prepare_eh_type): Split out type canonicalizations ...
3900         (build_eh_type_type): ... from here.
3901         (build_eh_type_type_ref): Remove.
3902         (mark_all_runtime_matches): Remove.
3903         (build_exc_ptr): New.
3904         (do_begin_catch, do_end_catch): New.
3905         (do_pop_exception): Remove.
3906         (build_terminate_handler): Remove.
3907         (choose_personality_routine): Split out language choice from ...
3908         (initialize_handler_parm): ... here.
3909         Use MUST_NOT_THROW_EXPR.
3910         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
3911         exception object handling.
3912         (expand_start_eh_spec, expand_end_eh_spec): Remove.
3913         (expand_exception_blocks, alloc_eh_object): Remove.
3914         (begin_eh_spec_block, finish_eh_spec_block): New.
3915         (do_allocate_exception, do_free_exception): New.
3916         (expand_throw): Merge into ...
3917         (build_throw): ... here.  Update for abi.
3918         * expr.c (cplus_expand_expr): No expand_internal_throw.
3919         Handle MUST_NOT_THROW_EXPR.
3920         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3921         * semantics.c (*) Update for except.h name changes.
3922         (genrtl_try_block): No protect_with_terminate.
3923         (genrtl_eh_spec_block): New.
3924         (genrtl_handler): Don't emit the goto here.
3925         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3926         (genrtl_finish_function): Don't expand_exception_blocks.
3927         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3928
3929 2001-03-28  Richard Henderson  <rth@redhat.com>
3930
3931         * decl.c (struct named_label_list): Rename eh_region to
3932         in_try_scope, add in_catch_scope.
3933         (struct binding_level): Rename eh_region to is_try_scope,
3934         add is_catch_scope.
3935         (note_level_for_try): Rename from note_level_for_eh.
3936         (note_level_for_catch): New.
3937         (poplevel): Copy both is_try_scope and is_catch_scope to
3938         the named_label_list struct.
3939         (check_previous_goto_1): Don't check for catch block via
3940         DECL_ARTIFICIAL; use in_try_scope instead.
3941         (check_goto): Likewise.
3942         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3943         * except.c (expand_start_catch_block): Call note_level_for_catch.
3944         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3945
3946 2001-03-27  Richard Henderson  <rth@redhat.com>
3947
3948         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3949         exceptions_via_longjmp.
3950
3951 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
3952
3953         * pt.c (check_default_tmpl_args):  Make error messages clearer.
3954
3955 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
3956
3957         * error.c:  Also undefine 'A' macro used for cp_printers definition.
3958
3959 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3960
3961         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3962
3963 2001-03-26  Mike Yang <yang@research.att.com>
3964             Mark Mitchell  <mark@codesourcery.com>
3965
3966         * dump.c (dump_access): New function.
3967         (cp_dump_tree): Use it.  Dump basetype information for class
3968         types.
3969
3970 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
3971
3972         * Makefile.in (optimize.o): Depend on params.h.
3973         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3974         (init_decl_processing): Set flag_no_inline when doing
3975         inlining-on-trees.
3976         * optimize.c: Include params.h.
3977         (struct inline_data): Improve documentation of FNS.  Add
3978         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3979         (INSNS_PER_STMT): New macro.
3980         (remap_block): Use CLONING_P.
3981         (inlinable_function_p): Don't inline big functions.
3982         (expand_call_inline): Keep track of how much inlining we've done.
3983         (optimize_function): Set FIRST_INLINED_FN.
3984         (maybe_clone_body): Set CLONING_P.
3985         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3986         tree nodes.
3987         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3988         rest_of_compilation.  Clear DECL_RTL for local variables
3989         afterwards.
3990         (clear_decl_rtl): New function.
3991
3992 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3993
3994         Implement DR 209
3995         * cp-tree.h (skip_type_access_control,
3996         reset_type_access_control): Prototype.
3997         * decl.c (grokdeclarator): Access of friends is not checked.
3998         * parse.y (component_decl_list): Reset type access control.
3999         * semantics.c (decl_type_access_control): Clear
4000         current_type_lookups.
4001         (save_type_access_control): Don't save if not deferring.
4002         (skip_type_access_control, reset_type_access_control): New
4003         functions.
4004         (begin_class_definition): Do type access control for basetypes.
4005         Start deferred access control.
4006         (finish_class_definition): Resume immediate access control if
4007         this is a local class.
4008
4009 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4010
4011         * class.c (add_method): Use memcpy/memmove, not bcopy.
4012
4013         * decl.c (duplicate_decls): Likewise.
4014
4015 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4016
4017         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
4018         not `_'.
4019
4020 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4021
4022         * decl.c (local_names): Define.
4023         (push_local_name): New.
4024         (grok_reference_init): Return init if initializing static reference
4025         variable with non-constant instead of emitting it.
4026         Move expand_static_init call to cp_finish_decl.
4027         (layout_var_decl): Call push_local_name.
4028         (maybe_commonize_var): Allow inlining functions even if they have
4029         static local variables, use comdat_linkage for them if flag_weak.
4030         (check_initializer): Call obscure_complex_init if
4031         grok_reference_init returned non-zero.
4032         (save_function_data): Clear x_local_names.
4033         (pop_cp_function_context): Free x_local_names.
4034         (mark_inlined_fns): Remove.
4035         (mark_lang_function): Mark x_local_names.
4036         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
4037         Mark inlined_fns as tree, remove call to mark_inlined_fns.
4038         * class.c (alter_access): Ensure DECL_ACCESS is never set if
4039         DECL_DISCRIMINATOR_P.
4040         * cp-tree.h (cp_language_function): Add x_local_names.
4041         (lang_decl_flags): Add discriminator into u2.
4042         (lang_decl_inlined_fns): Remove.
4043         (lang_decl): inlined_fns is now a TREE_VEC.
4044         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
4045         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
4046         TREE_VEC, not a custom structure.
4047         (optimize_function): Likewise.
4048         * mangle.c (discriminator_for_local_entity): Discriminate among
4049         VAR_DECL local entities.
4050         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
4051         is not valid.
4052
4053 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
4054
4055         Add support for Java interface method calls.
4056         * cp-tree.h (struct lang_type): Add java_interface flag.
4057         (TYPE_JAVA_INTERFACE): New macro.
4058         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
4059         by setting TYPE_JAVA_INTERFACE.
4060         * call.c (java_iface_lookup_fn): New static.
4061         (build_over_call): If calling a method declared in a
4062         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
4063         expression which resolves the function address.
4064         (build_java_interface_fn_ref): New function.
4065
4066 2001-03-22  Richard Henderson  <rth@redhat.com>
4067
4068         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
4069         * except.c: Don't include it.
4070
4071 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
4072             based on an idea from Joe Buck <jbuck@synopsys.com>
4073
4074         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
4075         New nonterminals.
4076         (data_def, component_decl): Add reductions to bad_decl.
4077
4078 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
4079
4080         * method.c (do_build_assign_ref): Don't use build_modify_expr for
4081         anonymous aggregates, since they don't have assignment operator
4082         method.
4083         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
4084         assignment operators for anonymous structure fields.
4085
4086 2001-03-21  Jason Merrill  <jason@redhat.com>
4087
4088         * pt.c (instantiate_decl): Abort if we see a member constant
4089         instantiation that doesn't already have its initializer.
4090         Downgrade explicit instantiation without definition to pedwarn.
4091
4092         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
4093         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
4094         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
4095
4096         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
4097         (pending_vtables): Remove.
4098         * decl2.c (pending_vtables): Remove.
4099         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
4100         CLASSTYPE_VTABLE_NEEDS_WRITING.
4101         (import_export_class): Likewise.
4102         (init_decl2): Don't mark pending_vtables.
4103         * lex.c (handle_pragma_vtable): Just sorry.
4104         * pt.c (instantiate_class_template): Don't mess with
4105         CLASSTYPE_VTABLE_NEEDS_WRITING.
4106         (mark_class_instantiated): Likewise.
4107         * ptree.c (print_lang_type): Don't print it.
4108         * semantics.c (begin_class_definition): Don't set it.
4109
4110         * pt.c (template_tail): Replace with last_pending_template.
4111         (maybe_templates, maybe_template_tail): Remove.
4112         (add_pending_template): Adjust.
4113         (instantiate_pending_templates): Adjust.
4114
4115         * cp-tree.h (struct saved_scope): Remove lang_stack field.
4116         (current_lang_stack): Remove.
4117         * decl.c (maybe_push_to_top_level): Don't initialize it.
4118         (duplicate_decls): Use current_lang_depth.
4119         (xref_basetypes): Likewise.
4120         * class.c (current_lang_depth): New fn.
4121         (push_lang_context): Use more varray functionality.
4122         (pop_lang_context): Likewise.
4123
4124         * error.c (GLOBAL_THING): Always use '__'.
4125
4126 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
4127
4128         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
4129
4130         * mangle.c (mangle_decl_string): Mangle the names of overloaded
4131         operators, even when they have `extern "C"' linkage.
4132
4133 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4134
4135         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
4136         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4137         where it's not necessary.
4138         (add_method): Remove optimization involving comparison of
4139         DECL_ASSEMBLER_NAME.
4140         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
4141         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4142         where it's not necessary.
4143         (check_methods): Likewise.
4144         (build_clone): Likewise.
4145         (built_vtt): Likewise.
4146         * cp-tree.h (DECL_NEEDED_P): Likewise.
4147         * decl.c (pushtag): Likewise.
4148         (duplicate_decls): Likewise.
4149         (pushdecl): Likewise.
4150         (builtin_function): Likewise.
4151         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
4152         (build_cp_library_fn): Likewise.
4153         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
4154         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4155         where it's not necessary.
4156         (make_rtl_for_nonlocal_decl): Likewise.
4157         (cp_finish_decl): Likewise.
4158         (grokfndecl): Likewise.
4159         (grokvardecl): Likewise.
4160         (grokdeclarator): Likewise.
4161         (start_function): Likewise.
4162         (cp_missing_return_ok_p): Likewise.
4163         * decl2.c (grokclassfn): Likewise.
4164         (check_classfn): Likewise.
4165         (finish_static_data_member_decl): Likewise.
4166         (grokfield): Likewise.
4167         * error.c (GLOBAL_IORD_P): Remove.
4168         (dump_global_iord): Improve output.
4169         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
4170         * except.c (nothrow_libfn_p): Summarily reject any function not in
4171         namespace-scope.
4172         * init.c (build_java_class_ref): Don't explicitly set
4173         DECL_ASSEMBLER_NAME after calling mangle_decl.
4174         * mangle.c (mangle_decl_string): Handle extern "C" functions.
4175         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
4176         * method.c (set_mangled_name_for_decl): Don't explicitly set
4177         DECL_ASSEMBLER_NAME after calling mangle_decl.
4178         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
4179         IDENTIFIER_GLOBAL_VALUE for the thunk.
4180         * pt.c (set_mangled_name_for_template_decl): Remove.
4181         (check_explicit_specialization): Don't use it.
4182         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
4183         (tsubst_friend_function): Likewise.
4184         (tsubst_decl): Likewise.
4185         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
4186         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
4187         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4188         where it's not necessary.
4189         (tinfo_base_init): Likewise.
4190         (create_real_tinfo_var): Likewise.
4191         * search.c (looup_field_1): Likewise.
4192         * semantics.c (finish_named_return_value): Likewise.
4193         * tree.c (init_tree): Set lang_set_decl_assembler_name.
4194
4195 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4196
4197         Correct semantics restrictions checking in throw-expression.
4198         * except.c (is_admissible_throw_operand): New function.
4199         (build_throw): Use it.
4200
4201 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4202
4203         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
4204         and its ilk.
4205
4206 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4207
4208         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4209         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
4210         * decl.c (duplicate_decls): Likewise.
4211         (builtin_function): Likewise.
4212         (build_library_fn): Likewise.
4213         (build_cp_library_fn): Likewise.
4214         (check_initializer): Likewise.
4215         (cp_finish_decl): Likewise.
4216         * decl2.c (grokfield): Likewise.
4217         (grok_function_init): Remove #if 0'd code.
4218         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4219         * friend.c (do_friend): Likewise.
4220         * init.c (get_temp_regvar): Likewise.
4221         * method.c (make_thunk): Likewise.
4222         * pt.c (tsubst_friend_function): Likewise.
4223         (tsubst_decl): Likewise.
4224         (regenerate_decl_from_template): Likewise.
4225         * semantics.c (genrtl_named_return_value): Likewise.
4226         (expand_body): Likewise.
4227         (genrtl_finish_function): Likewise.
4228         * tree.c (cp_tree_equal): Likewise.
4229
4230 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4231
4232         * call.c (convert_like_real): Add extra semantics to INNER
4233         parameter. Don't convert to temporary if a user conversion
4234         gives us an lvalue that we're about to bind to a reference.
4235         Set INNER to indicate pending reference binding on recursive
4236         calls.
4237
4238 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4239
4240         * cp/lex.c: Delete duplicate pending_lang_change.
4241
4242 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4243
4244         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
4245         Similarly.
4246         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
4247         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
4248
4249 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
4250
4251         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
4252
4253 2001-03-08  Stan Shebs  <shebs@apple.com>
4254
4255         * cp-tree.h (set_identifier_local_value): Remove unused decl.
4256
4257 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
4258
4259         * spew.c: Remove references to CPP_OSTRING.
4260
4261 2001-03-06  Andrew Haley  <aph@redhat.com>
4262
4263         * typeck.c (convert_arguments): Check that we have an fndecl.
4264
4265 2001-03-05  Andrew Haley  <aph@redhat.com>
4266
4267         * typeck.c (convert_arguments): Don't do ellipsis conversion for
4268         __built_in_constant_p.
4269
4270 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4271
4272         * typeck.c (build_static_cast): Allow enum to enum conversions
4273         as per DR 128.
4274
4275 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4276
4277         * class.c (check_field_decls): Pointers to member do not a
4278         non-pod struct make, as per DR 148.
4279
4280 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4281
4282         * call.c (joust): cp_pedwarn when using gnu extension concerning
4283         worst conversion sequences.
4284
4285 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4286
4287         * decl.c: Replace all uses of 'boolean' with 'bool'.
4288
4289 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4290
4291         * lang-specs.h: Add zero initializer for cpp_spec field to
4292         all array elements that need one.  Don't put an #ifdef inside
4293         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
4294         use it.
4295
4296 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4297
4298         Implement using decls inside template functions.
4299         * decl2.c (validate_nonmember_using_decl): Don't special case
4300         fake_std_node in the global namespace. Don't reject early when
4301         processing a template.
4302         (do_local_using_decl): Add to statement tree. Don't do further
4303         processing when building a template.
4304         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
4305
4306 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4307
4308         * decl2.c (do_nonmember_using_decl): Don't complain if we find
4309         same function. Do complain about ambiguating extern "C"
4310         declarations.
4311
4312 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
4313
4314         Remove floating point and complex type template constant parms.
4315         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
4316         COMPLEX_TYPE extensions.
4317         (invalid_nontype_parm_type_p): Likewise.
4318
4319 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
4320
4321         * except.c (call_eh_info): Revert "match_function"'s type.
4322
4323 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
4324
4325         Fix ctor vtable vcall offsets.
4326         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
4327         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
4328         (get_matching_base): Remove.
4329         (get_original_base): New function.
4330         (build_vtbl_initializer): Initialize vid.rtti_binfo.
4331         Use a virtual thunk for a ctor vtable with an index
4332         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
4333         primary base within a constructor vtable. Only set
4334         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
4335         when primary base has been lost.
4336         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
4337
4338 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
4339
4340         * call.c (joust): Ensure more_specialized()'s argument length
4341         parameter has correct value for constructors.
4342
4343 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
4344
4345         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
4346
4347         * decl.c (mark_inlined_fns): Prototype.
4348
4349 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4350
4351         * spew.c (yylex): Correct handling of friends.
4352
4353 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4354
4355         * mangle.c (write_encoding): Pass write_function_type the
4356         FUNCTION_DECL for the function being encoded.
4357         (write_function_type): Pass it along to write_bare_function_type.
4358         (write_bare_function_type): Pass it along to write_method_parms.
4359         (write_method_parms): Don't mangle the compiler-generated
4360         parameters to a constructor or destructor.
4361
4362 2001-02-22  Andreas Jaeger  <aj@suse.de>
4363
4364         * optimize.c: Include toplev.h for
4365         note_deferral_of_defined_inline_function prototype.
4366
4367 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
4368
4369         * cp-tree.h (struct lang_decl_inlined_fns): New.
4370         (struct lang_decls): Add inlined_fns.
4371         (DECL_INLINED_FNS): New macro.
4372         * optimize.c (struct inline_data): Add inlined_fns.
4373         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
4374         (inlinable_function_p): Likewise, fix typo in comment,
4375         function is not inlinable if it already inlined function currently
4376         being optimized.
4377         (expand_call_inline): Add fn to inlined_fns if necessary.
4378         (optimize_function): Initialize inlined_fns.
4379         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
4380         * decl.c (mark_inlined_fns): New function.
4381         (lang_mark_tree): Call it.
4382
4383 2001-02-21  Jason Merrill  <jason@redhat.com>
4384
4385         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
4386         (DECL_UNINLINABLE): Move to middle-end.
4387
4388         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4389         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4390         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4391         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4392         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
4393
4394         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4395         second parm of op=.
4396
4397 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
4398
4399         * decl2.c (set_decl_namespace): Allow explicit instantiations in
4400         any namespace.
4401
4402 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4403
4404         * optimize.c (expand_call_inline): Don't walk subtrees of type
4405         nodes.
4406
4407 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
4408
4409         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4410         for a destructor.
4411
4412 2001-02-18  Jason Merrill  <jason@redhat.com>
4413
4414         Do put the VTT parameter in DECL_ARGUMENTS.
4415         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4416         (current_vtt_parm): New macro.
4417         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4418         (DECL_HAS_VTT_PARM_P): New macro.
4419         (DECL_VTT_PARM): Remove.
4420         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4421         * decl.c (duplicate_decls): Only copy the operator code if
4422         appropriate.
4423         (start_function): Set current_vtt_parm.
4424         (lang_mark_tree): Don't mark vtt_parm.
4425         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4426         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
4427         * class.c (build_clone): Maybe remove the VTT parm.
4428         * optimize.c (maybe_clone_body): Set up the VTT parm.
4429         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
4430         * call.c (build_over_call): Just allow the VTT arg.
4431         * method.c (make_thunk): Don't set DECL_VTT_PARM.
4432         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
4433         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
4434         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
4435         * error.c (dump_function_decl): Likewise.
4436         * call.c (build_user_type_conversion_1, convert_like_real): Abort
4437         if we try to call a constructor with in-charge or VTT parms.
4438         * method.c (skip_artificial_parms_for): New fn.
4439         * call.c (add_function_candidate, build_over_call): Call it.
4440         * call.c (build_new_method_call): Use current_vtt_parm.
4441         * init.c (expand_virtual_init): Likewise.
4442         * class.c (same_signature_p): No longer static.
4443         * cp-tree.h: Declare it.
4444         * search.c (look_for_overrides_r): Use it.
4445
4446 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4447
4448         * cp-tree.h (new_abi_rtti_p): Remove.
4449         (name_mangling_version): Likewise.
4450         (flag_do_squangling): Likewise.
4451         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4452         * decl.c (grokfndecl): Likewise.
4453         * decl2.c (name_mangling_version): Remove.
4454         (flag_do_squangling): Likewise.
4455         (lang_f_options): Remove `squangle'.
4456         (unsupported_options): Add `squangle'.
4457         (cxx_decode_option): Issue a warning about uses of
4458         -fname-mangling-version.
4459         (finish_file): Remove old ABI support.
4460         * pt.c (check_explicit_specialization): Likewise.
4461         (tsubst_decl): Likewise.
4462         * rtti.c (init_rtti_processing): Likewise.
4463         (build_headof): Likewise.
4464         (get_tinfo_decl_dynamic): Likewise.
4465         (tinfo_from_decl): Likewise.
4466         (build_dynamic_cast_1): Likewise.
4467         (synthesize_tinfo_var): Likewise.
4468         * init.c (build_new): Allow enumeration types for the array-bounds
4469         in a direct-new-declarator.
4470
4471         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4472
4473         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4474         TREE_PROTECTED from the template being specialized.
4475
4476 2001-02-17  Jason Merrill  <jason@redhat.com>
4477
4478         * decl2.c (build_artificial_parm): Set TREE_READONLY.
4479
4480         * decl.c (bad_specifiers): Allow throw specs on things with
4481         pointer-to-function or -member-function type.
4482         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4483         a pmf.
4484
4485 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4486
4487         * call.c (check_dtor_name): Handle template names correctly.
4488
4489 2001-02-16  Jason Merrill  <jason@redhat.com>
4490
4491         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4492         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4493         * optimize.c (maybe_clone_body): Don't substitute it.
4494         * call.c (build_new_method_call): Check in_chrg instead.
4495         * init.c (expand_virtual_init): Likewise.
4496
4497 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4498
4499         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4500         class-type introduces at least a type-name.
4501
4502 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
4503
4504         * call.c (convert_like_real): Create a temporary for non-lvalue.
4505
4506 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
4507
4508         * cp-tree.h: Fix typos in comments.
4509
4510 2001-02-16  Jason Merrill  <jason@redhat.com>
4511
4512         * optimize.c (remap_block): If we're compiling a clone, pass the
4513         new block to insert_block.
4514
4515 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
4516
4517         * semantics.c (finish_asm_stmt): Robustify.
4518
4519 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4520
4521         * pt.c (push_template_decl_real): Don't remangle the name of a
4522         class template.
4523
4524 2001-02-15  Jim Meyering  <meyering@lucent.com>
4525
4526         * Make-lang.in (c++.install-common): Depend on installdirs.
4527         (c++.install-info): Likewise.
4528         (c++.install-man): Likewise.
4529
4530 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4531
4532         * typeck2.c (build_m_component_ref): Robustify.
4533
4534 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
4535
4536         * friend.c (do_friend): Don't take the nested [template] class
4537         into account when deciding whether to warn about the friend
4538         function not referring to a template function.
4539
4540 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
4541
4542         * typeck.c (build_unary_op): Clarify error message.
4543
4544 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
4545
4546         * parse.y (component_constructor_declarator): allow optional
4547         parentheses around constructor class name.
4548
4549 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4550
4551         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4552         section.
4553         * init.c (emit_base_init): Remove incorrect comment about
4554         virtual bases.
4555         * method.c (make_thunk): Fix comment alignment.
4556
4557 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4558
4559         Kill remnants of this is variable.
4560         * cp-tree.h (flag_this_is_variable): Remove.
4561         * decl2.c (flag_this_is_variable): Remove.
4562         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4563         (build_vbase_path): The path is non-static, even in a cdtor.
4564         (resolves_to_fixed_type_p): Add additional return value.
4565         * search.c (init_vbase_pointers): Adjust.
4566         * tree.c (lvalue_p_1): Adjust.
4567         * typeck.c (mark_addressable): Adjust.
4568
4569 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4570
4571         * pt.c (unify): Don't check cv quals of array types.
4572
4573 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4574
4575         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4576         check whether we already have the type.
4577
4578 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
4579
4580         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4581         * call.c (build_op_delete_call): Simplify to remove duplicate
4582         code.
4583         * class.c (clone_function_decl): Don't build the deleting variant
4584         of a non-virtual destructor.
4585         * decl.c (finish_destructor_body): Don't call delete if this is a
4586         non-virtual destructor.
4587         * init.c (build_delete): Explicitly call `operator delete' when
4588         deleting an object with a non-virtual destructor.
4589
4590 2001-02-13  Jason Merrill  <jason@redhat.com>
4591
4592         * lang-specs.h: Add more __EXCEPTIONS.
4593
4594 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4595
4596         * typeck2.c (process_init_constructor): Check
4597         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4598
4599 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4600
4601         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4602         Remove spurious information in comment. Allow further
4603         adjustments of REFERENCE_TYPE args.
4604
4605 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4606
4607         * errfn.c (cp_deprecated): Tweak diagnostic text.
4608         * parse.y (new_initializer): Deprecate initializer lists
4609         extension.
4610
4611 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
4612
4613         Remove old ABI support.
4614
4615 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
4616
4617         * decl2.c (flag_vtable_thunks): Always set it to 1.
4618         (flag_new_abi): Likewise.
4619         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4620
4621         * Makefile.in (g++spec.o): Fix typo.
4622
4623 2001-02-09  Jason Merrill  <jason@redhat.com>
4624
4625         * lang-specs.h: Restore definition of __EXCEPTIONS.
4626
4627 2001-02-08  Jason Merrill  <jason@redhat.com>
4628
4629         * search.c (shared_member_p): New function.
4630         (lookup_field_r): Use it.
4631         * cp-tree.h (SHARED_MEMBER_P): Remove.
4632
4633         * method.c (process_overload_item): Handle template-dependent array
4634         bounds.
4635         * pt.c (type_unification_real): If we end up with undeduced nontype
4636         parms, try again.
4637
4638         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4639         types.
4640
4641         * typeck2.c (friendly_abort): Don't say anything if we have
4642         earlier errors or sorries.
4643
4644         * decl.c (check_tag_decl): Notice attempts to redefine bool and
4645         wchar_t.  Ignore if in_system_header.
4646
4647         * decl.c (maybe_push_cleanup_level): New fn...
4648         (start_decl_1): ...split out from here.
4649         * cvt.c (build_up_reference): Use it.
4650         * cp-tree.h: Declare it.
4651
4652 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
4653
4654         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4655         spec.
4656
4657 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
4658
4659         * pt.c (lookup_template_class): Make sure it's a primary
4660         template or template_template_parm when called from the parser.
4661         (instantiate_template_class): Add assertion.
4662
4663 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
4664
4665         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4666         from error_mark_node.
4667
4668 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
4669
4670         Fix specification and implementation bugs in V3 ABI
4671         construction vtables.
4672         * cp-tree.h (flag_dump_class_layout): New flag.
4673         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4674         (BINFO_LOST_PRIMARY_P): New flag.
4675         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4676         (BINFO_PRIMARY_MARKED_P): Rename to ...
4677         (BINFO_PRIMARY_P): ... here.
4678         (binfo_via_virtual): New prototype.
4679         * decl2.c (flag_dump_class_layout): New flag.
4680         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4681         use `=' as a file name separator.
4682         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4683         bases.
4684         (build_vtbl_address): If this is a virtual primary base, then
4685         get the vtbl of what it is ultimately primary for.
4686         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4687         for BINFO_PRIMARY_P.
4688         (dfs_skip_nonprimary_vbases_markedp): Likewise.
4689         (get_shared_vbase_if_not_primary): Likewise.
4690         (dfs_get_pure_virtuals): Likewise.
4691         (expand_upcast_fixups): Likewise.
4692         (fixup_virtual_upcast_offsets): Likewise.
4693         (dfs_find_vbase_instance): Likewise.
4694         (find_vbase_instance): Likewise.
4695         (binfo_from_vbase): Adjust comment to reflect reality.
4696         (binfo_via_virtual): New function.
4697         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4698         for binfo walking during VTT construction.
4699         (dfs_mark_primary_bases): Remove.
4700         (force_canonical_binfo_r): New function.
4701         (force_canonical_binfo): New function.
4702         (mark_primary_virtual_base): New function.
4703         (mark_primary_bases): Walk in inheritance graph order, use
4704         mark_primary_virtual_base.
4705         (determine_primary_base): Use some more intermediate variables.
4706         (dfs_find_final_overrider): Don't check for overriding along a
4707         virtual path.
4708         (dfs_modify_vtables): Walk into primary virtual bases too.
4709         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4710         (build_base_fields): Likewise.
4711         (dfs_set_offset_for_unshared_vbases): Likewise.
4712         (layout_virtual_bases): Likewise.
4713         (end_of_class): Likewise.
4714         (finish_struct_1): Call dump_class_hierarchy, if requested.
4715         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4716         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4717         (dump_class_hierarchy): Add file parameter. Append to file, if
4718         required.
4719         (finish_vtbls): Adjust accumulate_vtbl_inits call.
4720         Use canonical base for virtual bases.
4721         (build_vtt): Add more comments. Adjust build_vtt_inits call.
4722         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4723         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4724         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4725         virtual VTTs.
4726         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4727         from DATA.  We want virtual primary bases and all bases via virtual.
4728         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4729         virtual base when not a construction vtable.
4730         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4731         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4732         Use canonical bases when processing virtual bases.
4733         (accumulate_vtbl_inits): We're interested in any base via a
4734         virtual path.
4735         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4736         within a construction vtable, determine what is being overridden.
4737         (build_vtbl_initializer): Add more comments
4738         (add_vcall_offset_vtbl_entries_1): Adjust comment.
4739         (build_rtti_vtbl_entries): Check if the base has lost its
4740         primary.
4741
4742 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
4743
4744         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4745
4746 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4747
4748         * decl.c (pushdecl): Call abort instead of fatal.
4749         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4750         * init.c (build_new_1): Likewise.
4751         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4752         * decl.c (build_typename_type): hash_table_init now returns void.
4753         decl.c (init_decl_processing): Make an error non-fatal.
4754
4755 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
4756
4757         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4758         Document.
4759         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4760         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4761         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4762         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4763         * decl.c (maybe_commonize_var): Use the new name-mangling where
4764         appropriate.
4765         * decl2.c (comdat_linkage): Enhance comments.  Make all
4766         compiler-generated things static, if COMDAT is not available.
4767         (get_tinfo_decl): Do not make typeinfo objects that belong in the
4768         library COMDAT.
4769         (tinfo_base_init): Use the correct mangled name for typeinfo
4770         strings, and push them into the global scope.
4771         (typeinfo_in_lib_p): New function.
4772         (synthesize_tinfo_var): Use it.
4773         (create_real_tinfo_var): Likewise.
4774
4775 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
4776
4777         * decl.c (push_class_binding): Use context_for_name_lookup instead
4778         of CP_DECL_CONTEXT.
4779         * search.c (context_for_name_lookup): Remove static.  Check for NULL
4780         context in the loop.
4781         * cp-tree.h (context_for_name_lookup): Add prototype.
4782
4783 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
4784
4785         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4786         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4787         Remove.
4788         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4789         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4790
4791 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
4792
4793         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4794         of macros used when compiling g++spec.c.
4795         * g++spec.c (lang_specific_driver): Link with the shared
4796         libgcc by default.
4797
4798 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4799
4800         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4801         make_reference_declarator, make_call_declarator), method.c
4802         (implicitly_declare_fn), parse.y (namespace_using_decl,
4803         notype_unqualified_id, expr_or_declarator, new_type_id,
4804         after_type_declarator, direct_after_type_declarator,
4805         notype_declarator, complex_notype_declarator,
4806         complex_direct_notype_declarator, qualified_id,
4807         notype_qualified_id, overqualified_id, direct_new_declarator,
4808         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4809         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4810         instead of build_parse_node.
4811
4812 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4813
4814         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4815         (minus_one_node): Moved to top level gcc directory.  Renamed
4816         to integer_minus_one_node.
4817
4818         * init.c (init_init_processing): Don't set minus_one_node.
4819         (build_vec_init): Use integer_minus_one_node.
4820
4821         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4822
4823 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
4824
4825         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4826         identical and they would be replaced with constant, remove
4827         MODIFY_EXPR from the tree.
4828
4829 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4830
4831         * Make-lang.in: Remove all dependencies on defaults.h.
4832         * call.c: Don't include defaults.h.
4833         * decl.c: Likewise.
4834         * decl2.c: Likewise.
4835         * except.c: Likewise.
4836         * pt.c: Likewise.
4837         * rtti.c: Likewise.
4838         * tree.c: Likewise.
4839         * typeck.c: Likewise.
4840
4841 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
4842
4843         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4844         operators even in "C" linkage.
4845         * method.c (set_mangled_name_for_decl): Likewise.
4846         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4847         overloaded operators in "C" linkage.
4848
4849 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4850
4851         * pt.c (tsubst_decl): Remove IN_DECL parameter.
4852         (tsubst_arg_types): Check parameter is not void.
4853         (tsubst): Adjust tsubst_decl call.
4854
4855 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4856
4857         * call.c (add_builtin_candidate): Quote std properly, from
4858         previous change.
4859
4860 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4861
4862         * pt.c (check_explicit_specialization): Clone constructors and
4863         destructors.
4864
4865 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4866
4867         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4868         indicates anything special about template depth. Make sure we
4869         only count the user visible template classes.
4870
4871 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4872
4873         * call.c (build_conv): Typo in comment.
4874         (add_builtin_candidate): Add more explanation.
4875         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4876         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4877         when we have enumeral types.
4878         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4879         candidates for relops and eqops.
4880         (joust): Simplify control flow. Allow a non-template user
4881         function to hide a builtin.
4882
4883 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
4884
4885         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4886         (more_specialized): Add deduction parameter.
4887         * call.c (joust): Adjust more_specialized call.
4888         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4889         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4890         (get_bindings_order): Remove.
4891         (get_bindings_real): Add DEDUCE parameter.
4892         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4893         REFERENCE_TYPE jig for DEDUCE_ORDER.
4894         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4895         maybe_adjust_types_for_deduction.
4896         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4897         directly.
4898         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4899         (check_cv_quals_for_unify): Use new unify qualifier flags.
4900         (unify): Clear new unify qualifier flags.
4901         (get_bindings_real): Add DEDUCE parameter.
4902         (get_bindings): Adjust call to get_bindings_real.
4903         (get_bindings_overload): Likewise.
4904         (most_specialized_instantiation): Adjust call to
4905         more_specialized.
4906
4907 2001-01-19  Jason Merrill  <jason@redhat.com>
4908
4909         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4910
4911         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4912         -fnew-abi.
4913
4914 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
4915
4916         * decl2.c (arg_assoc_class): Fix double iteration logic.
4917
4918 2001-01-19  Jason Merrill  <jason@redhat.com>
4919
4920         * init.c (build_delete): Always call convert_force to strip cv-quals.
4921
4922         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4923         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4924         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4925
4926 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4927
4928         * search.c (get_vbase_1): Count only virtual bases.
4929
4930 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4931
4932         * class.c (duplicate_tag_error): Robustify flag clearing.
4933
4934 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4935
4936         * cp-tree.h (lookup_template_class): Add complain parm.
4937         * decl.c (lookup_namespace_name): Adjust call to
4938         lookup_template_class.
4939         (make_typename_type): Likewise.
4940         * semantics.c (finish_template_type): Likewise.
4941         * pt.c (lookup_template_class): Add complain parm. Adjust.
4942         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4943         (tsubst): Likewise.
4944
4945 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4946
4947         * pt.c (copy_default_args_to_explicit_spec): Preserve
4948         object's CV quals. Reorganize.
4949
4950 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4951
4952         * typeck.c (build_modify_expr): Say `initialization' for
4953         INIT_EXPRs.
4954         * init.c (build_default_init): Convert to enumeral type, if
4955         needed.
4956
4957 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
4958
4959         * parse.y (nomods_initdcl0): Properly set things up for
4960         initdcl0_innards.
4961
4962 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4963
4964         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4965         (type_unification_real): Set it.
4966         (unify): Use it.
4967
4968 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4969
4970         * decl.c (finish_destructor_body): Convert to vbase pointer here.
4971
4972 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4973
4974         * semantics.c (begin_class_definition): Check we're not inside a
4975         template parm list.
4976
4977 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4978
4979         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4980         BASELINK_P.
4981
4982 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4983
4984         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4985         * call.c (build_over_call): Add comment.
4986
4987 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4988
4989         * cvt.c (ocp_convert): Handle vector type conversion
4990         * typeck2.c (digest_init): Handle vector type initializations
4991
4992 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
4993
4994         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
4995           was given.
4996
4997 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
4998
4999         * pt.c (check_nontype_parm): Rename to ...
5000         (invalid_nontype_parm_type_p): ... here.
5001         (process_template_parm): Adjust.
5002         (convert_template_argument): Adjust.
5003
5004 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5005
5006         * pt.c (check_nontype_parm): New function.
5007         (process_template_parm): Use it.
5008         (convert_template_argument): Use it.
5009         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
5010         member.
5011
5012 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
5013
5014         * tree.c: Add defaults.h
5015         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
5016         * Make-lang.in (cp/tree.o): Add defaults.h.
5017
5018 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5019
5020         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
5021
5022 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5023
5024         * g++.1: Change to be ".so man1/gcc.1".
5025
5026 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5027
5028         * Make-lang.in (c++.info, c++.install-info): Build and install g++
5029         internals info.
5030         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
5031         ($(srcdir)/cp/g++int.info): New target.
5032         * gxxint.texi: Add info directory entry.  Use @@ in email address.
5033         * .cvsignore: Update.
5034
5035 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5036
5037         * typeck.c (build_c_cast): Do template processing earlier.
5038         Always pedwarn on array casts.
5039
5040 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
5041
5042         * friend.c (make_friend_class): Make sure a templated class is
5043         actually a template.
5044
5045 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5046
5047         * decl2.c (get_guard): Set linkage from guarded decl.
5048
5049 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5050
5051         * call.c (convert_default_arg): Check for unprocessed
5052         DEFAULT_ARG.
5053         * cp-tree.h (replace_defarg): Move to spew.c.
5054         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
5055         spew.c, which is where they really are.
5056         (done_pending_defargs): Declare.
5057         (unprocessed_defarg_fn): Declare.
5058         * decl.c (replace_defarg): Move to spew.c
5059         * parse.y (structsp): Call done_pending_defargs.
5060         * spew.c (defarg_fns): Rearrange list structure.
5061         (defarg_fnsdone): New static variable.
5062         (defarg_depfns): New static variable.
5063         (init_spew): Adjust.
5064         (add_defarg_fn): Store the type in TREE_TYPE.
5065         (do_pending_defargs): Detect and deal with ordering constraints
5066         and circularity.
5067         (done_pending_defargs): New function.
5068         (unprocessed_defarg_fn): New function.
5069         (replace_defarg): Moved from decl.c. Robustify. Don't save
5070         if circularity detected.
5071
5072 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5073
5074         * pt.c (unify): Check array has a domain, before checking
5075         whether it is variable sized.
5076
5077 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5078
5079         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
5080         parameters with pointers to arrays of unknown bound.
5081
5082 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5083
5084         * parse.y (template_parm_header, template_spec_header): New
5085         reductions. Split out from ...
5086         (template_header): ... here. Use them.
5087         (template_template_parm): Use template_parm_header.
5088         * semantics.c (finish_template_template_parm): Add assert.
5089
5090 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5091
5092         * mangle.c (write_builtin_type): Fix thinko.
5093
5094         * pt.c (copy_default_args_to_explicit_spec_1): New function.
5095         (copy_default_args_to_explicit_spec): Likewise.
5096         (check_explicit_specialization): Use it.
5097
5098         * class.c (finish_struct_1):  Remove last argument in call to
5099         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5100         * decl.c (builtin_function): Likewise.
5101         (build_cp_library_fn): Likewise.
5102         (check_initializer): Likewise.
5103         (make_rtl_for_nonlocal_decl): Likewise.
5104         (cp_finish_decl): Likewise.
5105         (start_function): Likewise.
5106         * decl2.c (finish_anon_union): Likewise.
5107         * friend.c (do_friend): Likewise.
5108         * init.c (build_java_class_ref): Likewise.
5109         * method.c (make_thunk): Likewise.
5110         * pt.c (tsubst_friend_function): Likewise.
5111         * semantics.c (expand_body): Likewise.
5112
5113 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5114
5115         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
5116         looking at DECL_CLONED_FUNCTION for non-functions.
5117
5118 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5119
5120         * error.c (dump_template_parameter): Use parm to determine how
5121         to print default value.
5122
5123 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5124
5125         * class.c (duplicate_tag_error): Clear more flags.
5126
5127 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5128
5129         * call.c (build_new_method_call): Use binfo_for_vbase.
5130
5131 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
5132
5133         * cp-tree.h (flag_cond_mismatch): Don't declare.
5134         * decl2.c (flag_cond_mismatch): Don't define.
5135         (lang_f_options): Remove cond-mismatch.
5136         (unsupported_options): Add cond-mismatch.
5137
5138 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
5139
5140         * class.c (handle_using_decl): Reject using of constructor name
5141         of sourcing class. Allow injecting of a method with same name as
5142         nested class. Fixup error messages.
5143
5144 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5145
5146         * decl2.c (lang_decode_option): Handle -Wformat=2.
5147
5148 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5149
5150         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
5151         initialized_in_class.
5152         (DECL_DEFINED_IN_CLASS_P): Rename to ...
5153         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
5154         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
5155         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
5156         * pt.c (check_default_tmpl_args): Adjust for
5157         DECL_INITIALIZED_IN_CLASS_P.
5158         (instantiate_class_template): Likewise.
5159         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
5160
5161         * class.c (finish_struct): Constify saved_filename.
5162
5163 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5164
5165         * class.c (duplicate_tag_error): Adjust diagnostic.
5166         (finish_struct): Locally set location to start of struct.
5167         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
5168
5169 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5170
5171         * decl.c (struct binding_level): Adjust class_shadowed comments
5172         to reflect reality.
5173         (push_class_level_binding): Adjust comments to reflect reality.
5174         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
5175         Don't set TREE_VALUE on the class_shadowed list.
5176
5177 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5178
5179         * decl2.c (acceptable_java_type): Allow references too.
5180         * init.c (build_java_class_ref): When using the new ABI, search
5181         `class$' and have it mangled with `mangle_decl.'
5182         * mangle.c (write_java_integer_type_codes): New function.
5183         (write_builtin_type): Detect and mangle Java integer and real
5184         types.
5185
5186 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
5187
5188         * decl2.c (grokfield): Don't accept `asm' specifiers for
5189         non-static data members.
5190
5191 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5192
5193         * expr.c (cplus_expand_expr): Don't reset `target'.
5194
5195 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5196
5197         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
5198
5199 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5200
5201         * parse.y (template_datadef): Check for error_mark_node.
5202
5203 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5204
5205         * cp-tree.def (DEFAULT_ARG): Make `x' class.
5206
5207 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5208
5209         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
5210         (record_builtin_type): Make non-static.
5211         (flag_short_double): Don't declare.
5212         (init_decl_processing): Remove the creation of many tree nodes now
5213         in c_common_nodes_and_builtins.
5214         (build_void_list_node): New function.
5215         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
5216         * cp-tree.h (flag_short_wchar): Don't declare.
5217
5218 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
5219
5220         * call.c (build_conv): Don't use build1 for USER_CONV.
5221         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
5222
5223 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5224
5225         * lex.c (lang_init): Call c_common_lang_init.
5226
5227 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5228
5229         * search.c (lookup_fnfields_here): Remove.
5230         (look_for_overrides_r): Use lookup_fnfields_1.
5231         Ignore functions from using declarations.
5232
5233 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5234
5235         Implement exceptions specifiers for implicit member functions.
5236         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5237         * method.c (synthesize_exception_spec): New function.
5238         (locate_dtor, locate_ctor, locate_copy): New functions.
5239         (implicitly_declare_fn): Generate the exception spec too.
5240         * search.c (check_final_overrider): Check artificial functions
5241         too.
5242         * typeck2.c (merge_exception_specifiers): New function.
5243
5244 2001-01-03  Jason Merrill  <jason@redhat.com>
5245
5246         * init.c (build_default_init): New fn.
5247         (perform_member_init): Split out from here.
5248         (build_new_1): Use it.  Simplify initialization logic.
5249         (build_vec_init): Take an array, rather than a pointer and maxindex.
5250         Speed up simple initializations.  Don't clean up if we're assigning.
5251         * cp-tree.h: Adjust.
5252         * decl2.c (do_static_initialization): Remove TREE_VEC case.
5253         * parse.y (new_initializer): Return void_zero_node for ().
5254         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
5255         * typeck2.c (digest_init): Only complain about user-written
5256         CONSTRUCTORs.
5257
5258 2000-12-22  Mike Stump  <mrs@wrs.com>
5259
5260         * decl2.c: (max_tinst_depth): Increase to 50.
5261
5262 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
5263
5264         * class.c (invalidate_class_lookup_cache): Zero the
5265         previous_class_values.
5266         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
5267         TREE_INT_CST_HIGH.
5268         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
5269         * decl.c (free_bindings): New variable.
5270         (push_binding): Don't create a new binding if we have one on the
5271         free list.
5272         (pop_binding): Put old bindings on the free list.
5273         (init_decl_processing): Use size_int, not build_int_2.
5274         Register free_bindings as a GC root.
5275         (cp_make_fname_decl): Use size_int, not build_int_2.
5276         (push_inline_template_parms_recursive): Likewise.
5277         (end_template_parm_list): Likewise.
5278         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
5279         (tsubst_template_parms): Use size_int, not build_int_2.
5280         (tsubst): Likewise.
5281         * rtti.c (get_vmi_pseudo_type_info): Likewise.
5282
5283 2001-01-02  Richard Henderson  <rth@redhat.com>
5284
5285         * parse.y (asm): Set ASM_INPUT_P.
5286
5287 2001-01-02  Jason Merrill  <jason@redhat.com>
5288
5289         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
5290         for v3 ABI.
5291
5292         * typeck.c (cp_truthvalue_conversion): New fn.
5293         * cvt.c (ocp_convert): Use it.
5294
5295         * cp-tree.h: Lose c-common.c decls.
5296
5297         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
5298         * cvt.c (convert_to_void): Use type_unknown_p.
5299
5300         * typeck.c (strip_all_pointer_quals): Also strip quals from
5301         pointer-to-member types.
5302
5303         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
5304         parse.y as C.
5305
5306         * call.c (build_new_method_call): Do evaluate the object parameter
5307         when accessing a static member.
5308         * typeck.c (build_component_ref): Likewise.
5309
5310 2001-01-02  Andreas Jaeger  <aj@suse.de>
5311
5312         * decl.c (cp_missing_noreturn_ok_p): New.
5313         (init_decl_processing): Set lang_missing_noreturn_ok_p.
5314
5315 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
5316
5317         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
5318
5319 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
5320
5321         * class.c (pushclass): Remove #if 0'd code.
5322         * cp-tree.h (overload_template_name): Remove.
5323         * decl.c (store_bindings): Simplify.
5324         (pop_from_top_level): Likewise.
5325         * pt.c (overload_template_name): Remove.
5326         (instantiate_decl): Don't call push_to_top_level if it's not
5327         needed.
5328
5329 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
5330
5331         * pt.c (register_local_specialization): Don't return a value.
5332         (lookup_template_class): Use move-to-front heuristic when looking
5333         up template instantiations.
5334         (instantiate_decl): Only push_to_top_level when we're actually
5335         going to instantiate the template.
5336
5337 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5338
5339         * search.c (binfo_for_vtable): Return least derived class, not
5340         most.  Handle secondary vtables.
5341
5342 2000-12-22  Jason Merrill  <jason@redhat.com>
5343
5344         * pt.c (more_specialized): Don't optimize len==0.
5345         (fn_type_unification): If we're adding the return type, increase len.
5346
5347         * typeck.c (build_binary_op): Fix pmf comparison logic.
5348
5349         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
5350         DECL_STATIC_FUNCTION_P.
5351
5352         * semantics.c (genrtl_finish_function): Don't try to jump to
5353         return_label unless it exists.
5354
5355         In partial ordering for a call, ignore parms for which we don't have
5356         a real argument.
5357         * call.c (joust): Pass len to more_specialized.
5358         (add_template_candidate_real): Strip 'this', pass len.
5359         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
5360         (get_bindings_order): New fn.  Pass len down.
5361         (get_bindings_real): Strip 'this', pass len.
5362         (fn_type_unification): Likewise.
5363         (type_unification_real): Succeed after checking 'len' args.
5364         (most_specialized_instantiation): Lose explicit_args parm.
5365         * class.c (resolve_address_of_overloaded_function): Strip 'this',
5366         pass len.
5367
5368 2000-12-21  Jason Merrill  <jason@redhat.com>
5369
5370         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
5371         DECL_TEMPLATE_RESULT.
5372
5373         * search.c (lookup_field_r): Call lookup_fnfields_1, not
5374         lookup_fnfields_here.
5375
5376         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
5377
5378         * call.c (build_object_call): Also allow conversions that return
5379         reference to pointer to function.
5380         (add_conv_candidate): Handle totype being ref to ptr to fn.
5381         (build_field_call): Also allow members of type reference to function.
5382         Lose support for calling pointer to METHOD_TYPE fields.
5383
5384         * error.c (dump_expr): Handle *_CAST_EXPR.
5385
5386         * typeck2.c (build_scoped_ref): Always convert to the naming class.
5387
5388         * tree.c (break_out_cleanups): Lose.
5389         * cp-tree.h: Remove prototype.
5390         * typeck.c (build_component_ref): Don't break_out_cleanups.
5391         (build_compound_expr): Likewise.
5392         * semantics.c (finish_expr_stmt): Likewise.
5393
5394 2000-12-20  Richard Henderson  <rth@redhat.com>
5395
5396         * cp-tree.h: Update declarations.
5397         * decl.c (finish_case_label): Return the new stmt node.
5398         * semantics.c (finish_goto_stmt): Likewise.
5399         (finish_expr_stmt, finish_return_stmt): Likewise.
5400         (finish_break_stmt, finish_continue_stmt): Likewise.
5401         (finish_asm_stmt): Likewise.
5402         * parse.y (already_scoped_stmt): Set STMT_LINENO.
5403         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5404         (simple_if, simple_stmt): Return the new stmt node.
5405         (save_lineno): New.
5406
5407 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5408
5409         * cp-tree.h: Don't declare warn_long_long.
5410
5411 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5412
5413         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5414         IS_AGGR_TYPE.
5415
5416 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5417
5418         * pt.c (unify): Handle when both ARG and PARM are
5419         BOUND_TEMPLATE_TEMPLATE_PARM.
5420
5421 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5422
5423         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5424         DECL_TEMPLATE_PARM_P.
5425
5426 2000-12-15  Jason Merrill  <jason@redhat.com>
5427
5428         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
5429
5430         * init.c (build_new_1): Don't strip quals from type.
5431
5432         * decl.c (pushdecl): Don't check for linkage on a non-decl.
5433
5434         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
5435
5436         * call.c (build_new_function_call): Lose space before paren in
5437         error message.
5438         (build_new_method_call): Likewise.
5439
5440         * typeck2.c (build_m_component_ref): Propagate quals from datum.
5441
5442 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5443
5444         * pt.c (check_explicit_specialization): Propagate default
5445         function arguments to explicit specializations.
5446
5447 2000-12-13  DJ Delorie  <dj@redhat.com>
5448
5449         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5450         and <? operators.
5451
5452 2000-12-08  Jason Merrill  <jason@redhat.com>
5453
5454         * error.c (dump_function_name): Don't let the user see __comp_ctor.
5455
5456         Clean up copy-initialization in overloading code.
5457         * call.c (build_user_type_conversion_1): Die if we are asked to
5458         convert to the same or a base type.
5459         (implicit_conversion): Avoid doing so.  Lose reference binding code.
5460         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5461         direct-initialization.  Also do direct-init part of copy-init.
5462         (build_user_type_conversion): Don't provide context to convert_like.
5463         * cvt.c (ocp_convert): build_user_type_conversion will now provide
5464         the constructor call for copy-init.
5465
5466         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5467         instantiation of a member template.
5468         (do_decl_instantiation): Not here.
5469
5470 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5471
5472         * class.c (check_field_decls): Don't special case anonymous
5473         fields in error messages.
5474         (note_name_declared_in_class): Use %D on diagnostic.
5475
5476         * tree.c (pod_type_p): Use strip_array_types.
5477         (cp_valid_lang_attribute): Likewise.
5478         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5479         multiple evaluations.
5480         (cp_has_mutable_p): Use strip_array_types.
5481
5482 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5483
5484         * cp-tree.h (sufficient_parms_p): Declare new function.
5485         * call.c (sufficient_parms_p): New function, broken out of ...
5486         (add_function_candidate): ... here. Use it.
5487         (add_conv_candidate): Use it.
5488         * decl.c (grok_ctor_properties): Use it.
5489
5490 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
5491
5492         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5493
5494 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5495
5496         * decl2.c (lang_decode_option): Handle -Wformat-security.
5497
5498 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5499
5500         * pt.c (verify_class_unification): New function.
5501         (get_class_bindings): Use it.
5502         (try_class_unification): Tidy.
5503         (unify): Handle when argument of a template-id is not
5504         template parameter dependent.
5505         (template_args_equal): Handle when TREE_CODE's do not match.
5506
5507 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
5508
5509         * lang-specs.h (c++): When invoking the stand-alone preprocessor
5510         for -save-temps, pass all relevant -Defines to it, and then don't
5511         pass them to cc1plus.
5512
5513 2000-12-05  Will Cohen  <wcohen@redhat.com>
5514
5515         * decl.c (finish_case_label): Cleared
5516         more_cleanups_ok in surrounding function scopes.
5517         (define_label): Likewise.
5518
5519 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5520
5521         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5522         (get_matching_virtual): Remove.
5523         (look_for_overrides): Declare new function.
5524         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5525         DECL_VINDEX here.
5526         * class.c (check_for_override): Move base class iteration code
5527         to look_for_overrides.
5528         * search.c (next_baselink): Remove.
5529         (get_virtuals_named_this): Remove.
5530         (get_virtual_destructor): Remove.
5531         (tree_has_any_destructors_p): Remove.
5532         (struct gvnt_info): Remove.
5533         (check_final_overrider): Remove `virtual' from error messages.
5534         (get_matching_virtuals): Remove. Move functionality to ...
5535         (look_for_overrides): ... here, and ...
5536         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5537         to be overriding.
5538
5539 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5540
5541         * typeck.c (get_delta_difference): If via a virtual base,
5542         return zero.
5543         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5544         adjustment.
5545
5546 2000-12-04  Richard Henderson  <rth@redhat.com>
5547
5548         * error.c (dump_tree): Use output_add_string not OB_PUTS.
5549
5550 2000-12-04  Jason Merrill  <jason@redhat.com>
5551
5552         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5553         (write_builtin_type): Pass intSI_type_node and the like through
5554         type_for_mode.
5555         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5556         Pass intSI_type_node and the like through type_for_mode.
5557         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5558         * pt.c (tsubst, unify): Likewise.
5559         * tree.c (walk_tree): Likewise.
5560         * error.c (dump_type): Likewise.
5561         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5562
5563         * Make-lang.in: Tweak top comment for emacs.
5564         (cp/TAGS): Restore.
5565
5566         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5567
5568         * class.c (clone_function_decl): Robustify.
5569
5570 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
5571
5572         * decl.c (store_bindings): Only search in the non modified
5573         old_bindings for duplicates.
5574
5575 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5576
5577         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5578         TYPE_POLYMORPHIC_P.
5579
5580         * typeck.c (build_static_cast): Remove unused variable.
5581
5582 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5583
5584         * pt.c: Fix typo in comment.
5585
5586 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5587
5588         * decl2.c (warn_format): Remove definition.
5589         (lang_decode_option): Handle -Wformat-nonliteral,
5590         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
5591
5592 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5593
5594         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5595         (init_decl_processing): Don't create string_type_node,
5596         const_string_type_node, wint_type_node, intmax_type_node,
5597         uintmax_type_node, default_function_type, ptrdiff_type_node and
5598         unsigned_ptrdiff_type_node.  Adjust position of call to
5599         c_common_nodes_and_builtins.
5600         (identifier_global_value): New function.
5601
5602 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
5603
5604         * call.c (standard_conversion): Reject pointer to member
5605         conversions from ambiguous, inaccessible or virtual bases.
5606         * typeck.c (build_static_cast): Don't check pointers to members
5607         specially.
5608
5609 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5610
5611         * method.c (do_build_copy_constructor): Preserve cv
5612         qualifications when accessing source object members.
5613         (do_build_assign_ref): Likewise. Remove separate diagnostics for
5614         unnamed fields.
5615
5616 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5617
5618         * method.c (do_build_assign_ref): Construct appropriately
5619         CV-qualified base reference. Don't allow const casts in base
5620         conversion.
5621
5622 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5623
5624         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5625         incomplete return type.
5626
5627 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5628
5629         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5630         * semantics.c (finish_base_specifier): Accept a _TYPE not a
5631         _DECL.
5632
5633 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5634
5635         * spew.c (yyerror): Cope if yylval.ttype is NULL.
5636
5637 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5638
5639         * decl.c (grokdeclarator): Diagnose undefined template contexts.
5640
5641 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5642
5643         * decl.c (grokdeclarator): Do type access control on friend
5644         class.
5645
5646 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5647
5648         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5649         bison parser ickiness.
5650         * pt.c (tsubst_friend_function): Enter namespace scope when
5651         tsubsting the function name.
5652         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5653
5654 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5655
5656         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5657         * cvt.c (cp_convert_to_pointer): Add force parameter.
5658         Allow conversions via virtual base if forced.
5659         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5660         (ocp_convert): Likewise.
5661         * search.c (binfo_from_vbase): Return the virtual base's binfo.
5662         * typeck.c (get_delta_difference): Adjust handling of virtual
5663         bases.
5664
5665 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
5666
5667         * tree.c (struct list_hash): Remove.
5668         (list_hash_table): Make it be an htab.
5669         (struct list_proxy): New type.
5670         (list_hash_eq): New function.
5671         (list_hash_pieces): Renamed from ...
5672         (list_hash): ... this.
5673         (list_hash_lookup): Remove.
5674         (list_hash_add): Remove.
5675         (hash_tree_cons): Use the generic hashtable.
5676         (mark_list_hash): Remove.
5677         (init_tree): Create the hashtable.
5678
5679 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
5680
5681         * method.c (build_mangled_C9x_name): Rename to
5682         build_mangled_C99_name.  Change C9X references in comments to
5683         refer to C99.
5684
5685 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5686
5687         * parse.y (unary_expr): Move VA_ARG from here ...
5688         (primary): ... to here.
5689
5690 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5691
5692         * semantics.c (finish_id_expr): If type is error_mark, return
5693         error_mark.
5694
5695 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
5696
5697         * pt.c (lookup_template_class): Simplify loop exit constructs.
5698         Cope when there is no partial instantiation of a template
5699         template member.
5700
5701 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
5702
5703         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5704
5705 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
5706
5707         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5708         prefix.
5709
5710         * pt.c (do_decl_instantiate): Explicitly clone constructors and
5711         destructors that haven't already been cloned.
5712
5713 2000-11-20  Richard Henderson  <rth@redhat.com>
5714
5715         * parse.y (yyparse_1): Rename the parser entry point.
5716
5717 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
5718
5719         * mangle.c (write_name): Use <unscoped-name> for names directly in
5720         function scope.
5721         (write_unscoped_name): Accept names directly in function scope.
5722
5723 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
5724
5725         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5726         * parse.y (extdef): Add EXPORT reduction.
5727         * spew.c (yylex): Don't skip export here.
5728
5729 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
5730
5731         * decl.c (init_decl_processing): Correct name of pure virtual
5732         function under the new ABI.
5733         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5734         (throw_bad_typeid): Likewise for bad typeid function.
5735
5736 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
5737
5738         * decl.c (grokparms): Don't even function types of `void' type,
5739         either.
5740         * mangle.c (write_type): Don't crash when confronted with the
5741         error_mark_node.
5742
5743         * decl.c (grokparms): Don't create parameters of `void' type.
5744
5745 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5746
5747         * lex.c (mark_impl_file_chain): Delete.
5748         (init_parse): Remove call to ggc_add_string_root.  No need to
5749         ggc_strdup a string constant.  Do not add impl_file_chain to GC
5750         roots.
5751         (handle_pragma_implementation): No need to ggc_strdup main_filename.
5752
5753 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5754
5755         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5756
5757 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5758
5759         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5760         * decl.c (grokdeclarator): Don't reject void parms here.
5761         (require_complete_types_for_parms): Simplify, use
5762         complete_type_or_else.
5763         (grokparms): Remove bitrot. Remove funcdef parm.
5764         Deal with ellipsis parm lists here.
5765         * semantics.c (finish_parmlist): Don't append void_list_node
5766         here. Set PARMLIST_ELLIPSIS_P.
5767
5768 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5769
5770         * typeck2.c (incomplete_type_error): Reorganise to avoid
5771         excessive diagnostics.
5772
5773 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5774
5775         * lex.c (struct impl_files, internal_filename): Constify a char *.
5776
5777 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
5778
5779         * mangle.c (write_special_name_constructor): Don't generate
5780         assembler junk when confronted with an old-style constructor.
5781         (write_special_name_destructor): Likewise.
5782         (mangle_decl_string): Do it here instead.
5783
5784 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
5785
5786         * call.c (op_error): Make error messages clearer.
5787
5788 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
5789
5790         * decl.c (wrapup_globals_for_namespace): Don't mark things
5791         TREE_ASM_WRITTEN when they're not.
5792
5793 2000-11-15  Jason Merrill  <jason@redhat.com>
5794
5795         * typeck2.c (friendly_abort): Uncount the error before handing
5796         off to fancy_abort.
5797
5798 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5799
5800         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5801
5802 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
5803
5804         * class.c (build_vtbl_initializer): Fix typo in comment.
5805         * typeck.c (expr_sizeof): Don't crash on errors.
5806
5807 2000-11-14  Jim Wilson  <wilson@redhat.com>
5808
5809         * lang-specs.h: Add %2 after %(cc1_options).
5810
5811 2000-11-14  Richard Henderson  <rth@redhat.com>
5812
5813         * typeck.c (c_sizeof): Be strict about casting result value
5814         back to c_size_type_node.
5815         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5816
5817 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5818
5819         * typeck.c (build_unary_op): Use boolean_increment from
5820         c-common.c, moving the relevant code there.
5821
5822 2000-11-11  Jason Merrill  <jason@redhat.com>
5823
5824         * typeck.c (mark_addressable): Don't call put_var_into_stack.
5825
5826         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5827         in inlines.
5828
5829 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5830
5831         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5832         * lex.c (copy_lang_decl): Likewise.
5833
5834 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
5835
5836         * dump.c (cp_dump_tree): Don't dump function bodies here.
5837
5838         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5839         (dump.o): Update dependency list.
5840         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5841         (flag_dump_translation_unit): Likewise.
5842         (CP_TYPE_QUALS): Adjust definition.
5843         (DECL_C_BIT_FIELD): Remove.
5844         (SET_DECL_C_BIT_FIELD): Likewise.
5845         (CLEAR_DECL_C_BIT_FIELD): Likewise.
5846         (add_maybe_template): Likewise.
5847         (strip_array_types): Likewise.
5848         (dump_node_to_file): Likewise.
5849         (cp_dump_tree): New function.
5850         * decl.c (init_decl_processing): Set lang_dump_tree.
5851         * decl2.c (flag_dump_translation_unit): Remove.
5852         * dump.c: Move most of it to ../c-dump.c.
5853         (cp_dump_tree): New function.
5854         * pt.c (add_maybe_template): Remove.
5855         * typeck.c (strip_array_types): Likewise.
5856
5857 2000-11-07  Eric Christopher  <echristo@redhat.com>
5858
5859         * decl.c (init_decl_processing): Change definition of
5860         __wchar_t to wchar_t.  Remove artificial declaration of
5861         wchar_t.
5862         * lex.c: Change instances of __wchar_t to wchar_t.
5863
5864 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
5865
5866         * lex.c (do_identifier): Don't lookup_name for operators.
5867         * parse.y (operator): Save looking_for_typename.
5868         (unoperator): Restore it.
5869         * spew.c (frob_opname): Use nth_token for lookahead.
5870
5871 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
5872
5873         * decl.c (grok_op_properties): Always use coerce_new_type and
5874         coerce_delete_type.
5875         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5876         exception specification. Tidy up.
5877         (coerce_delete_type): Preserve exception specification. Tidy up.
5878
5879 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5880
5881         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5882         (push_binding_level), error.c (cp_tree_printer), pt.c
5883         (process_partial_specialization, tsubst_template_arg_vector),
5884         search.c (lookup_member): Use memset () instead of bzero ().
5885
5886 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
5887
5888         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5889
5890 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
5891
5892         * Make-lang.in (c++.distdir): Remove.
5893
5894 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
5895
5896         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5897         declarations from different namespaces to be combined.
5898
5899 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
5900
5901         * decl.c: Include tm_p.h.
5902
5903 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5904
5905         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5906
5907 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5908
5909         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5910         (build_overload_value), repo.c (open_repo_file), xref.c
5911         (open_xref_file): Use strchr () and strrchr () instead of index ()
5912         and rindex ().
5913
5914 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
5915
5916         * call.c (build_over_call): Call fold on the CALL_EXPR.
5917
5918 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
5919
5920         * error.c (dump_template_decl): Separate template hearders with
5921         space not comma.
5922
5923 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
5924
5925         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
5926         TS_* flags with corresponding TFF_*.  Adjust prototypes of
5927         functions (which used to take a tree_string_flags) to take an int.
5928
5929         * cp-tree.h (enum tree_string_flags): Remove
5930         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5931         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5932         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5933         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5934         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5935         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5936         (type_as_string, decl_as_string, expr_as_string,
5937         context_as_string): Adjust prototype.
5938
5939         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5940         instead of TS_PLAIN.
5941
5942         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5943         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5944         plain `0'.
5945
5946 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
5947
5948         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5949         (linkage_kind): New enumeration.
5950         (decl_linkage): New function.
5951         * decl2.c (comdat_linkage): Extend comment.
5952         * error.c (dump_function_decl): Print the arguments used to
5953         instantiate a template, even when not printing the type of the
5954         function.
5955         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5956         not TREE_PUBLIC, to test for external linkage.
5957         * tree.c (decl_linkage): New function.
5958
5959 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
5960
5961         * pt.c (instantiate_decl): Always instantiate static data members
5962         initialized in-class.
5963
5964 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
5965
5966         * Make-lang.in: Move all build rules here from Makefile.in,
5967         adapt to new context.  Wrap all rules that change the current
5968         directory in parentheses.  Expunge all references to $(P).
5969         When one command depends on another and they're run all at
5970         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
5971         all object-file generation rules.  Delete obsolete variables.
5972
5973         * Makefile.in: Delete.
5974         * config-lang.in: Delete outputs= line.
5975
5976 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5977
5978         * error.c (dump_function_decl): Print no space between
5979         `ptr-operator' the `type-specifier' of the return type.
5980         (dump_type_prefix): Make sure we put space at the appropriate
5981         place.
5982
5983 2000-10-23  Jason Merrill  <jason@redhat.com>
5984
5985         * call.c (equal_functions): Also call decls_match for extern "C" fns.
5986
5987 2000-10-22  Jason Merrill  <jason@redhat.com>
5988
5989         * call.c (build_conditional_expr): Use ocp_convert to force
5990         rvalue conversion.
5991
5992 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
5993
5994         * call.c (standard_conversion): Use RVALUE_CONVs for all
5995         expressions that satisfy lvalue_p, not just those that satisfy
5996         real_lvalue_p.
5997
5998         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5999
6000         * typeck.c (c_sizeof): Return an expression of `size_t' type,
6001         not one with TYPE_IS_SIZETYPE set.
6002         (dubious_conversion_warnings): Remove special-case code.
6003
6004 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
6005
6006         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
6007         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
6008         (dump_type_prefix): Print vector-of-int as 'int vector'.
6009         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
6010         * tree.c (walk_tree): Handle VECTOR_TYPE.
6011
6012         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
6013
6014 2000-10-21  Jason Merrill  <jason@redhat.com>
6015
6016         * parse.y (operator): Set got_object from got_scope.
6017         Set looking_for_typename.
6018         * decl.c (lookup_name_real): Clear val after setting from_obj.
6019         Reorganize diagnostic.
6020
6021 2000-10-20  Jason Merrill  <jason@redhat.com>
6022
6023         * tree.c (walk_tree): Don't walk into default args.
6024
6025         * error.c (dump_expr): Use host_integerp.
6026
6027 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
6028
6029         * typeck2.c (abstract_virtuals_error): Use "because" instead of
6030         "since" in error message.
6031
6032 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6033
6034         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
6035
6036 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
6037
6038         * decl.c (revert_static_member_fn): Fixed typo.
6039
6040 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
6041
6042         * class.c (subobject_offset_fn): New type.
6043         (dfs_record_base_offsets): Remove.
6044         (record_base_offsets): Likewise.
6045         (dfs_search_base_offsets): Likewise.
6046         (record_subobject_offset): New function.
6047         (check_subobject_offset): Likewise.
6048         (walk_subobject_offsets): Likewise.
6049         (record_subobject_offsets): Likewise.
6050         (layout_conflict_p): Reimplement.
6051         (layout_nonempty_base_or_field): Correct handling of type
6052         conflicts during layout.
6053         (layout_empty_base): Likewise.
6054         (build_base_field): Adjust to handle new representation of empty
6055         base offset table.
6056         (build_base_fields): Likewise.
6057         (layout_virtual_bases): Likewise.
6058         (splay_tree_compare_integer_csts): New function.
6059         (layout_class_type): Use a splay_tree, rather than a varray, to
6060         represent the offsets of empty bases.
6061
6062         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
6063         * decl.c (select_decl): Don't return declarations that are
6064         DECL_ANTICIPATED.
6065
6066 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
6067
6068         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
6069         (fake_std_node): New macro.
6070         * decl.c (in_std): Rename to ...
6071         (in_fake_std): ... this.
6072         (flag_no_builtin): Remove.
6073         (flag_no_nonansi_builtin): Likewise.
6074         (walk_namespaces_r): Use fake_std_node.
6075         (push_namespace): Use std_identifier.
6076         (pop_namespace): Use in_fake_std.
6077         (lookup_name_real): Use fake_std_node.
6078         (init_decl_processing): When -fhonor-std, create the `std'
6079         namespace.  Don't create a dummy fake_std_node in that case.
6080         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
6081         (builtin_function): Put builtins whose names don't begin
6082         with `_' in the std namespace.
6083         * decl2.c (flag_no_builtin): Remove.
6084         (flag_no_nonansi_builtin): Likewise.
6085         (set_decl_namespace): Use fake_std_node.
6086         (validate_nonmember_using_decl): Likewise.
6087         (do_using_directive): Likewise.
6088         (handle_class_head): Likewise.
6089         * dump.c (dequeue_and_dump): Likewise.
6090         * except.c (init_exception_processing): Use std_identifier.
6091         * init.c (build_member_call): Use fake_std_node.
6092         * rtti.c (init_rtti_processing): Use std_identifier.
6093
6094 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
6095
6096         * cp-tree.h (back_end_hook): Remove declaration.
6097         * decl2.c (back_end_hook): Remove definition.
6098
6099         * dump.c (dequeue_and_dump): Dump TREE_USED.
6100
6101 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
6102
6103         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
6104
6105 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6106
6107         * decl.c (WINT_TYPE): Define.
6108         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
6109         c_size_type_node, signed_size_type_node and wint_type_node.
6110
6111 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6112
6113         * decl2.c (warn_missing_format_attribute): New variable.
6114         (lang_decode_option): Decode -Wmissing-format-attribute.
6115
6116 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
6117
6118         * typeck.c (qualify_type): Remove.
6119         (composite_pointer_type): Fix handling of conversions to `cv void*'.
6120
6121 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6122
6123         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
6124
6125 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6126
6127         * Makefile.in (parse.c, parse.h): Create atomically.
6128
6129 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6130
6131         * class.c (current_obstack): Remove.
6132         * decl.c (ggc_p): Remove.
6133         (start_decl): Don't use decl_tree_cons.
6134         (grokdeclarator): Don't use build_decl_list.
6135         (start_function): Don't use decl_tree_cons.
6136         (finish_function): Don't mess with obstacks.
6137         * decl2.c (grok_x_components): Don't use build_decl_list.
6138         * lex.c (make_call_declarator): Don't call decl_tree_cons.
6139         (implicitly_declare_fn): Don't call build_decl_list.
6140         * parse.y (frob_specs): Don't call build_decl_list or
6141         decl_tree_cons.
6142         (expr_or_declarator_intern): Don't call decl_tree_cons.
6143         (primary): Don't call build_decl_list.
6144         (fcast_or_absdcl): Likewise.
6145         (typed_declspecs): Don't call decl_tree_cons.
6146         (reserved_declspecs): Don't call build_decl_list.
6147         (declmods): Likewise.
6148         (reserved_typespecquals): Likewise.
6149         (aggr): Likewise.
6150         (new_type_id): Likewise.
6151         (cv_qualifiers): Likewise.
6152         (after_type_declarator_intern): Likewise.
6153         (notype_declarator_intern): Likewise.
6154         (absdcl_intern): Likewise.
6155         (named_parm): Likewise.
6156         * pt.c (most_specialized_class): Likewise.
6157         * repo.c (temporary_obstack): Make it a structure, not a pointer.
6158         (init_repo): Initialize it.
6159         * search.c (current_obstack): Remove.
6160         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
6161
6162 2000-10-09  Richard Henderson  <rth@cygnus.com>
6163
6164         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
6165         (c++ language support bits for libgcc): Remove.
6166         (c++.clean): Remove cplib2.txt cleanup.
6167         * config-lang.in (headers, lib2funcs): Remove.
6168
6169         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
6170         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
6171         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
6172         * inc/new.h, inc/typeinfo: Remove files.
6173
6174 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6175
6176         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
6177         defined.
6178         (init_decl_processing): Initialize intmax_type_node and
6179         uintmax_type_node.
6180
6181 2000-10-06  Richard Henderson  <rth@cygnus.com>
6182
6183         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
6184         (original_result_rtx): Remove.
6185         * decl.c (save_function_data): Don't clear x_result_rtx.
6186         (mark_lang_function): Don't mark it either.
6187         * expr.c (fixup_result_decl): Remove.
6188         * semantics.c (genrtl_named_return_value): Frob the return decl
6189         before calling emit_local_var.
6190         (genrtl_finish_function): Don't call fixup_result_decl.
6191         Always emit the jump to return_label.
6192
6193 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
6194
6195         * pt.c (lookup_template_class): Set current access for enum.
6196         (tsubst_enum): Set file & line for enum decl.
6197
6198         * spew.c (yylex): Remove unused variable.
6199
6200 2000-10-05  Richard Henderson  <rth@cygnus.com>
6201
6202         * semantics.c (genrtl_finish_function): Don't init or check
6203         can_reach_end; remove noreturn and return value checks.
6204
6205 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6206
6207         * init.c (build_java_class_ref): Use `build_static_name' with a
6208         suffix, not a prefix, to build the class object's name.
6209
6210 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6211
6212         * cp-tree.h (access_kind): Fix comment typo.
6213         * decl2.c (grokfield): Fix diagnostic typo.
6214         * semantics.c (finish_template_type): Fix comment typo.
6215         (finish_qualified_object_call_expr): Likewise.
6216
6217 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6218
6219         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
6220         tsubsting fails.
6221
6222 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6223
6224         * spew.c (frob_id): New static function.
6225         (frob_opname): Use it.
6226         (yylex): Use it.
6227
6228 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6229
6230         * decl.c (lang_mark_false_label_stack): Remove.
6231         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
6232
6233 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
6234
6235         * gxxint.texi: Use @email for formatting email addresses.
6236
6237 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
6238
6239         * error.c: Remove direct obstack manipulation.  Replace with
6240         output_buffer-based formatting.  Adjust calls to removed macros.
6241         (obstack_chunk_alloc, obstack_chunk_free): Remove.
6242         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
6243         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
6244
6245 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
6246
6247         * ir.texi: Move to ../c-tree.texi.
6248
6249 2000-09-20  Jason Merrill  <jason@redhat.com>
6250
6251         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
6252
6253 2000-09-21  Andreas Jaeger  <aj@suse.de>
6254
6255         * errfn.c: Move declaration of cp_printer and cp_printers to ...
6256         * cp-tree.h: ... here.
6257
6258         * error.c: Remove declaration of cp_printer.
6259
6260 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
6261
6262         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
6263
6264 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
6265
6266         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
6267         users.
6268
6269 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
6270
6271         * decl.c (start_function): Robustify.
6272
6273 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6274
6275         * cp-tree.h (check_function_format): Accept a `status' parameter.
6276
6277         * call.c, typeck.c: Updates calls to `check_function_format'.
6278
6279 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
6280
6281         * decl2.c (handle_class_head): Always push some scope even
6282         in the error case.
6283
6284 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
6285
6286         * cp-tree.h (struct cp_language_function): Remove
6287         x_scope_stmt_stack and name_declared.
6288         (current_scope_stmt_stack): Remove.
6289         (function_name_declared_p): New macro.
6290         (struct lang_decl_flags): Use c_lang_decl as a base class.
6291         (context): Remove.
6292         (struct lang_decl): Replace saved_tree with context.
6293         (DECL_FRIEND_CONTEXT): Adjust accordingly.
6294         (SET_DECL_FRIEND_CONTEXT): Likewise.
6295         (DECL_VIRTUAL_CONTEXT): Likewise.
6296         (DECL_SAVED_TREE): Remove.
6297         (C_DECLARED_LABEL_FLAG): Likewise.
6298         (cplus_expand_expr_stmt): Don't declare.
6299         (add_decl_stmt): Likewise.
6300         (add_scope_stmt): Likewise.
6301         * decl.c (mark_stmt_tree): Remove.
6302         (case_compare): Likewise.
6303         (finish_case_label): Use c_add_case_label.
6304         (init_decl_processing): Set more language-specific hooks.
6305         (build_enumerator): Fix typo in comment.
6306         (cplus_expand_expr_stmt): Remove.
6307         (mark_lang_function): Use mark_c_language_function.
6308         (lang_mark_tree): Use c_mark_lang_decl.
6309         * decl2.c: Change order of inclusion.
6310         * except.c: Likewise.
6311         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
6312         back on c_expand_expr.
6313         * friend.c: Include expr.h.
6314         * init.c: Change order of inclusion.
6315         * Makefile.in: Update dependencies.
6316         * lex.h (free_lang_decl_chain): Remove.
6317         * optimize.c (maybe_clone_body): Use function_name_declared_p.
6318         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
6319         it doesn't exist.
6320         (instantiate_decl): Use function_name_declared_p.
6321         * semantics.c (lang_expand_expr_stmt): Remove.
6322         (set_current_function_name_declared): Likewise.
6323         (current_function_name_declared): Likewise.
6324         (begin_compound_stmt): Use function_name_declared_p.
6325         (add_decl_stmt): Remove.
6326         (setup_vtbl_ptr): Use function_name_declared_p.
6327         (add_scope_stmt): Remove.
6328         (current_scope_stmt_stack): New function.
6329         (cp_expand_stmt): Don't handle SCOPE_STMTs.
6330         (expand_body): Use function_name_declared_p.
6331         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
6332         * typeck.c: Change order of includes.
6333         (convert_sequence): Remove.
6334
6335 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6336
6337         * lex.c (reswords): Add _Complex.
6338
6339 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6340
6341         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
6342
6343 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6344
6345         * init.c (begin_init_stmts): Don't use // comments.
6346
6347 2000-09-12  Jason Merrill  <jason@redhat.com>
6348
6349         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
6350         all non-extern arrays.
6351
6352         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
6353         typenames, too.  Downgrade complaint to pedwarn.
6354         (xref_tag): Warn about surprising behavior of 'friend struct T'.
6355         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
6356         'class This::Inherited'.
6357
6358 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
6359
6360         * decl.c (finish_case_label): Given the LABEL_DECL a
6361         DECL_CONTEXT.
6362
6363 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6364
6365         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
6366         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
6367         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6368         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6369         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
6370         New macros.
6371         (sorry_for_unsupported_tree, print_scope_operator,
6372         print_left_paren, print_right_paren, print_left_bracket,
6373         print_right_bracket, print_whitespace): Likewise.
6374         (aggr_variety): Rename to class_key_or_enum.
6375         (print_type): Rename to print_type_id.
6376         (print_type_specifier_seq, print_simple_type_specifier,
6377         print_elaborated_type_specifier,
6378         print_rest_of_abstract_declarator,
6379         print_parameter_declaration_clause, print_exception_specification,
6380         print_nested_name_specifier, print_template_id,
6381         typedef_original_name,  print_template_argument_list_start,
6382         print_template_argument_list_end): New functions.
6383
6384 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6385
6386         * ir.texi: Add more documentation.
6387
6388 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
6389
6390         * cp-tree.h (struct saved_scope): Remove x_function_parms.
6391         (current_function_parms): Don't define.
6392         (struct cp_language_function): Remove parms_stored.
6393         (current_function_just_assigned_this): Don't define.
6394         (current_function_parms_stored): Likewise.
6395         (static_ctors): Declare.
6396         (static_dtors): Likewise.
6397         (SF_EXPAND): Don't define.
6398         (expand_start_early_try_stmts): Remove declaration.
6399         (store_parm_decls): Likewise.
6400         * decl.c (static_ctors): Don't declare.
6401         (static_dtors): Likewise.
6402         (struct binding_level): Remove this_block.
6403         (poplevel): Remove dead code.
6404         (set_block): Likewise.
6405         (mark_binding_level): Don't mark this_block.
6406         (mark_saved_scope): Don't mark x_function_parms.
6407         (init_decl_processing): Don't add current_function_parms as a GC
6408         root.
6409         (check_function_type): Change prototype.
6410         (start_function): Remove RTL-generation code.
6411         (expand_start_early_try_stmts): Remove.
6412         (store_parm_decls): Give it internal linkage.  Remove
6413         RTL-generation code.
6414         (finish_function): Remove RTL-generation code.
6415         * decl2.c (static_ctors): Fix formatting.
6416         (static_dtors): Likewise.
6417         * method.c (use_thunk): Don't call store_parm_decls.
6418         (synthesize_method): Likewise.
6419         * optimize.c (maybe_clone_body): Likewise.
6420         * parse.y (fn.def2): Likewise.
6421         (.set_base_init): Likewise.
6422         (nodecls): Likewise.
6423         * pt.c (instantiate_decl): Likewise.
6424         * rtti.c (synthesize_tinfo_fn): Likewise.
6425         * semantics.c (genrtl_try_block): Simplify.
6426         (expand_body): Use genrtl_start_function and
6427         genrtl_finish_function.
6428         (genrtl_start_function): New function.
6429         (genrtl_finish_function): Likewise.
6430
6431 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6432
6433         * error.c (cp_tree_printer, case 'P'): Append break.
6434
6435 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6436
6437         * cp-tree.h (frob_opname): Declare.
6438         * parse.y (saved_scopes): New static variable.
6439         (cp_parse_init): Adjust.
6440         (do_id): If lastiddecl is NULL, do do_identifier.
6441         (operator): Save scope information.
6442         (unoperator): New reduction. Restore scope information.
6443         (operator_name): Append unoperator. Call frob_opname.
6444         * spew.c (frob_opname): Define.
6445
6446 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6447
6448         * decl.c, rtti.c: Include defaults.h if not already included.
6449         Don't define the *_TYPE_SIZE macros.
6450
6451 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
6452
6453         * cp-tree.h (push_switch): Change prototype.
6454         (check_cp_case_value): Remove declaration.
6455         (decl_constant_value): Likewise.
6456         * decl.c (struct cp_switch): Add switch_stmt and cases.
6457         (case_compare): New function.
6458         (push_switch): Set switch_stmt.  Initialize cases.
6459         (pop_switch): Clean up cases.
6460         (define_case_label): Rename to ...
6461         (finish_case_label): ... this.  Do semantic analysis for case
6462         labels here.
6463         (start_function): Correct comment.
6464         * decl2.c (check_cp_case_value): Remove.
6465         * expr.c (do_case): Remove.
6466         * pt.c (tsubst_expr): Adjust call to finish_case_label.
6467         * semantics.c (genrtl_do_poplevel): Remove declaration.
6468         (RECHAIN_STMTS): Remove.
6469         (finish_break_stmt): Use build_break_stmt.
6470         (finish_continue_stmt): Use build_continue_stmt.
6471         (finish_switch_cond): Adjust condition here, rater than in
6472         c_expand_start_case.
6473         (finish_case_label): Remove.
6474         * typeck.c (c_expand_return): Remove.
6475         (c_expand_start_case): Likewise.
6476
6477 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
6478
6479         * ir.texi: Document type nodes.
6480
6481 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6482
6483         * cp-tree.h (init_cp_semantics): Declare.
6484         (genrtl_try_block): Don't declare.
6485         (genrtl_handler): Likewise.
6486         (genrtl_catch_block): Likewise.
6487         (genrtl_ctor_stmt): Likewise.
6488         (genrtl_subobject): Likewise.
6489         (genrtl_do_poplevel): Likewise.
6490         (genrtl_named_return_value): Likewise.
6491         * lex.c (init_parse): Call init_cp_semantics.
6492         * semantics.c (genrtl_try_block): Give it internal linkage.
6493         (genrtl_handler): Likewise.
6494         (genrtl_catch_block): Likewise.
6495         (genrtl_ctor_stmt): Likewise.
6496         (genrtl_subobject): Likewise.
6497         (genrtl_do_poplevel): Likewise.
6498         (genrtl_named_return_value): Likewise.
6499         (lang_expand_stmt): Rename to ...
6500         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
6501         (init_cp_semantics): Define.
6502
6503         * decl.c (initialize_local_var): Remove RTL-generating code.
6504         * semantics.c (genrtl_try_block): Fix formatting.
6505
6506         Move statement-tree facilities from C++ to C front-end.
6507         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6508         (void_zero_node): Remove.
6509         (stmt_tree): Likewise.
6510         (scope_chain): Adjust.
6511         (language_function): Rename to cp_language_function.
6512         (cp_function_chain): Adjust.
6513         (current_stmt_tree): Remove.
6514         (last_tree): Likewise.
6515         (last_expr_type): Likewise.
6516         (struct lang_decl): Adjust.
6517         (STMT_IS_FULL_EXPR_P): Remove.
6518         (add_tree): Remove.
6519         (begin_stmt_tree): Likewise.
6520         (finish_stmt_tree): Likewise.
6521         (walk_tree_fn): Likewise.
6522         (walk_stmt_tree): Likewise.
6523         * class.c (finish_struct): Replace use of add_tree with add_stmt.
6524         * decl.c (mark_stmt_tree): Adjust type.
6525         (init_decl_processing): Don't build void_zero_node.
6526         (initialize_local_var): Adjust usage of current_stmt_tree.
6527         (finish_enum): Use add_stmt, not add_tree.
6528         (save_function_data): Adjust use of language_function.
6529         (finish_constructor_body): Use add_stmt, not add_tree.
6530         (finish_destructor_body): Likewise.
6531         (push_cp_function_context): Adjust use of language_function.
6532         (pop_cp_function_context): Likewise.
6533         (mark_lang_function): Likewise.
6534         (mark_cp_function_context): Likewise.
6535         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6536         (build_vec_init): Likewise.
6537         * semantics.c (SET_LAST_STMT): Remove.
6538         (RECHAIN_STMTS): Don't use it.
6539         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6540         (current_stmt_tree): Define.
6541         (add_tree): Remove.
6542         (finish_goto_stmt): Use add_stmt, not add_tree.
6543         (finish_expr_stmt): Likewise.
6544         (begin_if_stmt): Likewise.
6545         (finish_then_clause): Likewise.
6546         (begin_while_stmt): Likewise.
6547         (begin_do_stmt): Likewise.
6548         (finish_return_stmt): Likewise.
6549         (begin_for_stmt): Likewise.
6550         (finish_break_stmt): Likewise.
6551         (finish_continue_stmt): Likewise.
6552         (begin_switch_stmt): Likewise.
6553         (finish_case_label): Likewise.
6554         (begin_try_block): Likewise.
6555         (begin_function_try_block): Likewise.
6556         (begin_handler): Likewise.
6557         (begin_catch_block): Likewise.
6558         (begin_compound_stmt): Likewise.
6559         (begin_asm_stmt): Likewise.
6560         (finish_asm_stmt): Likewise.
6561         (finish_label_stmt): Likewise.
6562         (add_decl_stmt): Likewise.
6563         (finish_subobject): Likewise.
6564         (finish_decl_cleanup): Likewise.
6565         (finish_named_return_value): Likewise.
6566         (setup_vtbl_ptr): Likewise.
6567         (add_scope_stmt): Likewise.
6568         (finish_stmt_expr): Likewise.
6569         (prune_unused_decls): Remove.
6570         (begin_stmt_tree): Likewise.
6571         (finish_stmt_tree): Likewise.
6572         (prep_stmt): Adjust use of current_stmt_tree.
6573         (lang_expand_stmt): Likewise.
6574         * tree.c (statement_code_p): Remove.
6575         (cp_statement_code_p): New function.
6576         (walk_stmt_tree): Remove.
6577         (init_tree): Set lang_statement_code_p.
6578
6579 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
6580
6581         Integrated preprocessor.
6582
6583         * Make-lang.in, Makefile.in: Remove all references to input.c,
6584         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
6585         * gxx.gperf, hash.h, input.c: Delete.
6586         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6587         initialized properly.
6588
6589         * class.c (fixup_pending_inline): Take a tree, not a
6590         struct pending_inline *.  All callers changed.
6591         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6592         RID_PROTECTED entries in ridpointers[] array here.
6593         * decl.c (duplicate_decls): Do not refer to struct
6594         pending_inline.
6595         (record_builtin_type, init_decl_processing): Use RID_MAX not
6596         CP_RID_MAX.
6597         (grokdeclarator): Use C_IS_RESERVED_WORD.
6598         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6599         cpplib.
6600         (grok_x_components): Do not inspect pending_inlines chain.
6601
6602         * cp-tree.h (struct lang_identifier): Add rid_code entry.
6603         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6604         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6605         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6606         TIME_IDENTIFIER_FILEINFO): Kill.
6607         Update prototypes.
6608         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
6609         single 32-bit word.
6610         * parse.y: Call do_pending_inlines unconditionally.
6611         reinit_parse_for_method is now snarf_method.  fn.defpen is no
6612         longer necessary.  Remove unnecessary <itype> annotation on
6613         SCOPE.  Do not refer to end_of_file or struct pending_inline.
6614         * semantics.c (begin_inline_definitions): Call
6615         do_pending_inlines unconditionally.
6616
6617         * lex.c: Remove all code now shared with C front end.
6618         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
6619         into the get_identifier table.  Rewrite pragma handling to
6620         work with the registry.  Move code to save tokens for later
6621         processing to spew.c.
6622
6623         * spew.c: Rewrite everything in terms of token streams instead
6624         of text.  Move routines here from lex.c / input.c as
6625         appropriate.  GC-mark trees hanging off the pending inlines
6626         chain.
6627
6628 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6629
6630         * NEWS: Mention that the named return value extension has been
6631         deprecated.
6632         * cp-tree.h (original_result_rtx): Define.
6633         (TREE_REFERENCE_EXPR): Remove.
6634         (DECL_VPARENT): Likewise.
6635         (pushdecl_nonclass_level): Likewise.
6636         (store_return_init): Likewise.
6637         (reinit_lang_specific): Likewise.
6638         (genrtl_named_return_value): Change prototype.
6639         * decl.c (original_result_rtx): Remove.
6640         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6641         Do not generate RTL for local variables here.
6642         (store_return_init): Remove.
6643         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
6644         store_return_init.
6645         (finish_named_return_value): Adjust accordingly.  Warn that this
6646         extension is deprecated.
6647         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6648
6649 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6650
6651         * pt.c (type_unification_real): Replace switch with if.
6652         (unify): Tsubst non-type parms before comparing.
6653
6654 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6655
6656         * error.c (dump_typename): New function, broken out of ...
6657         (dump_type): ... here. Use it.
6658         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6659
6660 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6661
6662         * init.c (build_offset_ref): Deal with namespace scoped
6663         TEMPLATE_ID_EXPRs.
6664
6665 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6666
6667         * class.c (resolve_address_of_overloaded_function): Add
6668         explanation message.
6669         * decl.c (define_case_label): Reformat explanation.
6670         * decl2.c (finish_static_data_member_decl): Likewise.
6671         (grokfield): Likewise.
6672         * friend.c (do_friend): Likewise.
6673
6674 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
6675
6676         * tree.c (walk_tree): Expose tail recursion.
6677         (walk_stmt_tree): New function.
6678         * cp-tree.h: Prototype walk_stmt_tree.
6679         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6680         the BLOCKs directly.  If a BLOCK has no variables after
6681         pruning, discard it.
6682         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
6683         restore the line number.
6684
6685 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
6686
6687         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6688         (pt.o): Remove dependency on HTAB_H.
6689         * cp-tree.h: Include hashtab.h.
6690         (walk_tree): Change prototype.
6691         (walk_tree_without_duplicates): New function.
6692         * decl.c (check_default_argument): Use it.
6693         * optimize.c (remap_decl): Adjust calls to walk_tree.
6694         (copy_body): Likewise.
6695         (expand_calls_inline): Likewise.
6696         (calls_setjmp_p): Use walk_tree_without_duplicates.
6697         * pt.c: Don't include hashtab.h.
6698         (for_each_template_parm): Use walk_tree_without_duplicates.
6699         * semantics.c (finish-stmt_tree): Likewise.
6700         (expand_body): Likewise.
6701         * tree.c (walk_tree): Add additional parameter.
6702         (walk_tree_without_duplicates): New function.
6703         (count_trees): Use it.
6704         (verify_stmt_tree): Adjust call to walk_tree.
6705         (find_tree): Use walk_tree_without_duplicates.
6706         (no_linkage_check): Likewise.
6707         (break_out_target_exprs): Adjust call to walk_tree.
6708         (cp_unsave): Likewise.
6709
6710 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6711
6712         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6713         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6714         * cp-tree.h (TYPE_BINFO): Adjust comment.
6715         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6716         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6717         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6718         (TYPE_TEMPLATE_INFO): Likewise.
6719         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6720         * class.c (push_nested_class): Likewise.
6721         * decl.c (lookup_name_real): Likewise.
6722         (grokdeclarator): Likewise.
6723         (grok_op_properties): Likewise.
6724         (xref_tag): Likewise.
6725         (xref_basetypes): Likewise.
6726         * decl2.c (constructor_name_full): Likewise.
6727         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6728         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6729         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6730         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6731         (dump_type_suffix): Likewise.
6732         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6733         instead.
6734         (get_aggr_from_typedef): Likewise.
6735         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6736         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6737         (write_template_parm): Likewise.
6738         (write_template_template_parm): Check tree code instead of
6739         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6740         * method.c (build_overload_nested_name): Add
6741         BOUND_TEMPLATE_TEMPLATE_PARM.
6742         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6743         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6744         * pt.c (convert_template_argument): Check tree code instead of
6745         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6746         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6747         (for_each_template_parm): Adjust comment.
6748         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
6749         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6750         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
6751         template_args_equal to compare template template parameter cases.
6752         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6753         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6754         instead.
6755         * tree.c (copy_template_template_parm): Decide whether to create
6756         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6757         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6758         (copy_tree_r): Likewise.
6759         * typeck.c (comptypes): Likewise.  Check tree code instead of
6760         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6761
6762 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
6763
6764         * decl.c (finish_function): Move the code for handling functions
6765         marked with the constructor and destructor attributes inside the
6766         expand_p block.
6767
6768 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6769
6770         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6771
6772 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6773
6774         * pt.c (lookup_template_class): Remove abort.
6775         * tree.c (get_type_decl): Allow error_mark_node.
6776
6777 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6778
6779         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6780         TEMPLATE_ID_EXPRs.
6781
6782 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
6783
6784         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6785         new ABI mangling.
6786
6787 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6788
6789         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6790         union tag mismatch error reporting.
6791
6792 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6793
6794         * call.c (build_scoped_method_call): Check it is not a namespace.
6795
6796 2000-08-30  Jason Merrill  <jason@redhat.com>
6797
6798         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6799
6800         * tree.c (bot_manip): Check TREE_CONSTANT rather than
6801         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
6802         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6803
6804         * decl.c (start_function): Always call make_function_rtl.
6805
6806 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6807
6808         * semantics.c (prune_unused_decls): New function.
6809         (finish_stmt_tree): Call it via walk_tree.
6810
6811 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6812
6813         * class.c (build_secondary_vtable): Constify a char *.
6814         * decl.c (init_decl_processing): Initialize function_id_node,
6815         pretty_function_id_node, and func_id_node.
6816         * input.c (struct input_source): Constify 'str'.
6817         (feed_input): Constify first argument.
6818         * mangle.c (write_identifier): Constify argument.
6819         * pt.c (mangle_class_name_for_template): Constify argument.
6820
6821 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
6822
6823         * typeck.c (mark_addressable): Remove code that pokes around in
6824         RTL.
6825
6826 2000-08-28  Jason Merrill  <jason@redhat.com>
6827
6828         * lex.c (file_name_nondirectory): Move to toplev.c.
6829
6830         * cp-tree.h (LOCAL_CLASS_P): New macro.
6831         * class.c (finish_struct_1): Use it.
6832
6833 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
6834
6835         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6836         (write_encoding): Pass another argument to write_name.
6837         (write_name): Add ignore_local_scope parameter.  Fix handling of
6838         local names.
6839         (write_nested_name): Use write_unqualified_name.
6840         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
6841         (write_template_prefix): Use write_unqualified_name.
6842         (write_component): Remove.
6843         (write_local_name): Add parameter.  Use direct local entity to
6844         discriminator calculation.
6845         (write_class_enum_type): Pass another argument to write_name.
6846         (write_template_template_arg): Likewise.
6847         (make_guard_variable): Likewise.
6848
6849 2000-08-27  Jason Merrill  <jason@redhat.com>
6850
6851         * decl.c (pushdecl): Matching decls for local externs are found in
6852         the current level.  Propagate linkage information from previous
6853         declarations.
6854
6855 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6856
6857         * ir.texi (Expressions): Fix typo.
6858
6859 2000-08-25  Greg McGary  <greg@mcgary.org>
6860
6861         * tree.c (init_tree): Use ARRAY_SIZE.
6862
6863 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6864
6865         * error.c (cp_tree_printer): Rework.
6866
6867 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
6868
6869         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6870         dyn-string.o.
6871         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6872         (cp-demangle.o): Remove target.
6873         (dyn-string.o): Likewise.
6874
6875         * decl.c (grokfndecl): Require that `main' return an `int'.
6876         * mangle.c (write_encoding): Don't mangle return types for
6877         conversion functions.
6878
6879 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6880
6881         * error.c (tree_formatting_info): New data type.
6882         (tree_being_formatted): New macro.
6883         (tree_formatting_flags): Likewise.
6884         (put_whitespace): Likewise.
6885         (print_tree_identifier): Likewise.
6886         (print_identifier): Likewise.
6887         (cp_tree_printer, print_function_argument_list, print_declaration,
6888         print_expression, print_function_declaration,
6889         print_function_parameter, print_type, print_cv_qualifier): New
6890         functions.
6891         (init_error): Initialize lang_printer.
6892
6893 2000-08-24  Jason Merrill  <jason@redhat.com>
6894
6895         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6896         adjustment necessary.
6897
6898 2000-08-24  Greg McGary  <greg@mcgary.org>
6899
6900         * cp-tree.h (MAIN_NAME_P): Remove macro.
6901
6902 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
6903
6904         * error.c (print_instantiation_context): Don't forget to flush the
6905         buffer.
6906
6907 2000-08-23  Jason Merrill  <jason@redhat.com>
6908
6909         * typeck.c (build_ptrmemfunc): Save the input pmf.
6910
6911         * method.c (process_modifiers): Use same_type_p.
6912
6913 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
6914
6915         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6916         * mangle.c (write_function_type): Change prototype.
6917         (write_encoding): Don't mangle return types for
6918         constructors or destructors.
6919         (write_type): Adjust call to write_function_type.
6920         * pt.c (instantiate_template): Instantiate alternate entry points
6921         when instantiating the main function.
6922
6923 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6924
6925         * error.c (cp_print_error_function): Don't use embedded '\n' in
6926         output_printf.
6927
6928 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6929
6930         * decl.c (init_decl_processing): Remove bogus initialization.
6931         * error.c (lang_print_error_function): Restore here.
6932         (init_error): Initialize print_error_function.
6933
6934 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6935
6936         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6937
6938 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
6939
6940         * Makefile.in (error.o): Depends on diagnostic.h
6941
6942         * cp-tree.h (problematic_instantiation_changed,
6943         record_last_problematic_instantiation, current_instantiation,
6944         print_instantiation_context): Declare.
6945         (maybe_print_template_context): Remove.
6946
6947         * decl.c (init_decl_processing): Set print_error_function to NULL.
6948         (lang_print_error_function): Remove, since we're using a new
6949         machinery.
6950
6951         * error.c: #include diagnostic.h
6952         (function_category): New function.
6953         (cp_diagnostic_starter): Likewise.
6954         (cp_diagnostic_finalizer): Likewise.
6955         (cp_print_error_function): Likewise.
6956         (maybe_print_instantiation_context): Likewise.
6957         (print_instantiation_full_context): Likewise.
6958         (print_instantiation_partial_context): Likewise.
6959         (print_instantiation_context): Define.
6960         (init_error): Initialize diagnostic pager and finalizer.
6961
6962         * pt.c (problematic_instantiation_changed): Define.
6963         (record_last_problematic_instantiation): Likewise.
6964         (current_instantiation): Likewise.
6965         (maybe_print_template_context): Remove.
6966         (print_template_context): Likewise.
6967         (current_tinst_level): Make static to reflect Brendan Kehoe's
6968         change of 1995-04-13.
6969         (push_tinst_level): Call print_instantiation_context.
6970
6971 2000-08-21  Nix  <nix@esperi.demon.co.uk>
6972
6973         * lang-specs.h: Do not process -o or run the assembler if
6974         -fsyntax-only.
6975
6976 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6977
6978         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6979         variables.
6980         * decl2.c (lang_decode_option): Disable gettext attributes for
6981         -ansi.
6982
6983 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6984
6985         * lex.c (lang_init_options): Default diagnostic message maximum
6986         length to 80, when line-wrapping.
6987
6988 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
6989
6990         * class.c (build_vtbl_initializer): Clear the entire
6991         vtbl_init_data.  Start keeping track of the functions for which we
6992         have created vcall offsets here.
6993         (dfs_build_vcall_offset_vtbl_entries): Remove.
6994         (build_vcall_offset_vtbl_entries): Reimplement.
6995         (add_vcall_offset_vtbl_entries_r): New function.
6996         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
6997         computing when vcall offsets are necessary.
6998
6999 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7000
7001         * decl.c (member_function_or_else): Use cp_error ... %T.
7002         (grokdeclarator): Likewise.
7003         (start_method): Likewise.
7004         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
7005
7006 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7007
7008         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
7009         TYPE_DECLs.
7010
7011 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7012
7013         * cp-tree.h (PTRMEM_OK_P): New macro.
7014         (itf_ptrmem_ok): New enumeration value.
7015         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
7016         argument. Diagnose implicit pointer to member.
7017         (instantiate_type): Don't diagnose implicit pointer to member
7018         here. Pass itf_ptrmem_ok if ok. Adjust calls to
7019         resolve_address_of_overloaded_function.
7020         * init.c (build_offset_ref): Set PTRMEM_OK_P.
7021         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
7022         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
7023         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
7024         (build_unary_op): Deal with single non-static member in
7025         microsoft-land.
7026
7027 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7028
7029         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
7030
7031 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7032
7033         * cp-tree.h (enum_name_string): Remove prototype.
7034         (report_case_error): Remove prototype.
7035         * cp/typeck2.c (enum_name_string): Remove.
7036         (report_case_error): Remove.
7037         * error.c (dump_expr): Deal with enum values directly.
7038         Correctly negate integer constant.
7039
7040 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7041
7042         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
7043         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
7044         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
7045         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
7046         (__cxa_vec_new): Use __cxa_vec_new2.
7047         (__cxa_vec_delete): Use __cxa_vec_delete2.
7048
7049 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7050
7051         * vec.cc (__cxa_vec_new): Set "C" linkage.
7052         (__cxa_vec_ctor): Likewise.
7053         (__cxa_vec_cctor): Likewise.
7054         (__cxa_vec_dtor): Likewise.
7055         (__cxa_vec_delete): Likewise.
7056         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
7057         (__cxa_vec_ctor): Likewise.
7058         (__cxa_vec_cctor): Likewise.
7059         (__cxa_vec_dtor): Likewise.
7060         (__cxa_vec_delete): Likewise.
7061
7062 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7063
7064         * class.c (instantiate_type): Reinstate local variable
7065         deleted in previous change.
7066
7067         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
7068         itf_no_attributes.
7069
7070 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7071
7072         * cp-tree.h (instantiate_type_flags): New enumeration.
7073         (instantiate_type): Change parameter.
7074         * class.c (instantiate_type): Adjust prototype. Adjust.
7075         * call.c (standard_conversion): Adjust instantiate_type call.
7076         (reference_binding): Likewise.
7077         (build_op_delete_call): Likewise.
7078         (convert_like_real): Likewise.
7079         * cvt.c (cp_convert_to_pointer): Likewise.
7080         (convert_to_reference): Likewise.
7081         * pt.c (convert_nontype_argument): Likewise.
7082         * typeck.c (build_binary_op): Likewise.
7083         (build_ptrmemfunc): Likewise.
7084         (convert_for_assignment): Likewise.
7085
7086 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7087
7088         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
7089         (current_aggr): Define.
7090         * decl.c (grokdeclarator): Make sure a friend class is an
7091         elaborated type specifier.
7092         * parse.y (current_aggr): Remove static definition.
7093         (cp_parse_init): Adjust.
7094         (structsp): Clear and restore current_aggr.
7095         (component_decl_list): Clear current_aggr.
7096
7097         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
7098         aggregate tag on the typename's context.
7099
7100         * pt.c (tsubst_friend_class): Return error_mark_node, if
7101         parms becomes NULL.
7102         (instantiate_class_template): Ignore error_mark_node friend types.
7103
7104 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
7105
7106         * cvt.c (warn_ref_binding): New static function, broken out of ...
7107         (convert_to_reference): ... here. Use it.
7108
7109 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7110
7111         * parse.y (template_arg): Add rule for template qualified with
7112         global scope.
7113
7114 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7115
7116         * decl2.c (add_function): Reorganize.
7117         (arg_assoc): Do not consider function template decls.
7118
7119 2000-08-11  Jason Merrill  <jason@redhat.com>
7120
7121         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
7122         looking inside.
7123
7124 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7125
7126         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
7127         (lookup_nested_tag): Likewise.
7128
7129         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
7130         can be produced.
7131
7132 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7133
7134         * parse.y (named_complex_class_head_sans_basetype): Remove
7135         always true if.
7136
7137 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7138
7139         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
7140         explicit TEMPLATE_ID_EXPR args.
7141         (build_expr_from_tree, case CALL_EXPR): Likewise.
7142
7143 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7144
7145         * decl.c (check_tag_decl): Diagnose typename's which don't
7146         declare anything.
7147
7148 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7149
7150         * init.c (build_aggr_init): Reject bogus array initializers
7151         early.
7152
7153 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7154
7155         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
7156         runtime.
7157         * cp/tinfo.cc (__dynamic_cast): Likewise.
7158         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7159
7160 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7161
7162         * cvt.c (convert_to_pointer_force): Fix error message when
7163         attempting to cast from ambiguous base.
7164
7165 2000-08-08  Jason Merrill  <jason@redhat.com>
7166
7167         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
7168         (tsubst_template_arg_vector): Likewise.
7169
7170         * decl2.c (build_anon_union_vars): Choose the largest field; don't
7171         assume that one will be as large as the union.
7172
7173 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7174
7175         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
7176         * decl.c (pop_labels): Likewise.
7177
7178 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
7179
7180         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
7181         specifications.
7182         (__pointer_to_member_type_info): Likewise.
7183         (__base_class_info): Likewise.
7184         (__class_type_info): Likewise.
7185         (__si_class_type_info): Likewise.
7186         (__vmi_class_type_info): Likewise.
7187         * tinfo.cc (__si_class_type_info::__do_find_public_src):
7188         Changed member names to match specifications.
7189         (__vmi_class_type_info::__do_find_public_src): Likewise.
7190         (__si_class_type_info::__do_dyncast): Likewise.
7191         (__vmi_class_type_info::__do_dyncast): Likewise.
7192         (__si_class_type_info::__do_upcast): Likewise.
7193         (__vmi_class_type_info::__do_upcast): Likewise.
7194         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
7195         (__pbase_type_info::__pointer_catch): Likewise.
7196         (__pointer_type_info::__pointer_catch): Likewise.
7197         (__pointer_to_member_type_info::__pointer_catch): Likewise.
7198
7199 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7200
7201         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
7202         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
7203         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
7204
7205 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
7206
7207         * cp-tree.h (add_method): Change prototype.
7208         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
7209         Don't double the size of the method vector in the error case.
7210         (handle_using_decl): Adjust call to add_method.
7211         (add_implicitly_declared_members): Likewise.
7212         (clone_function_decl): Likewise.
7213         * decl2.c (check_classfn): Likewise.
7214         * semantics.c (finish_member_declaration): Likewise.
7215
7216 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7217
7218         * decl.c (flag_isoc94): New variable.
7219
7220 2000-08-02  Jason Merrill  <jason@redhat.com>
7221
7222         * pt.c (do_type_instantiation): Add complain parm; don't complain
7223         if called recursively.
7224         * cp-tree.h, parse.y: Adjust.
7225
7226 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7227
7228         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
7229         -Wno-strict-prototypes.
7230
7231         * g++spec.c: Adjust type of second argument to
7232         lang_specific_driver, and update code as necessary.
7233
7234         * cp-tree.h: Don't prototype min_precision here.
7235         (my_friendly_assert): Cast expression to void.
7236         * semantics.c (do_poplevel): Initialize scope_stmts.
7237
7238 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
7239
7240         * cp-tree.h (DECL_NEEDED_P): Tweak.
7241
7242 2000-07-28  Jason Merrill  <jason@redhat.com>
7243
7244         * lang-specs.h: Use %i in rule for .ii files.
7245
7246 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
7247
7248         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
7249
7250 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
7251
7252         Allow indirect primary bases.
7253         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
7254         primary_base.
7255         (CLASSTYPE_VFIELD_PARENT): Remove.
7256         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
7257         (BINFO_PRIMARY_BINFO): Remove.
7258         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
7259         (BINFO_VBASE_PRIMARY_P): Likewise.
7260         (BINFO_PRIMARY_BASE_OF): New macro.
7261         (BINFO_INDIRECT_PRIMARY_P): Likewise.
7262         (get_primary_binfo): New function.
7263         * decl.c (lang_mark_tree): Make lang_type::primary_base.
7264         * class.c (vcall_offset_data_s): Rename to ...
7265         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
7266         and add ctor_vtbl_p.
7267         (get_derived_offset): Use get_primary_binfo.
7268         (dfs_mark_primary_bases): Adjust handling of virtual primary
7269         bases.
7270         (mark_primary_bases): Likewise.
7271         (set_primary_base): Take a binfo, not an integer, as a
7272         representation of the primary base.
7273         (indirect_primary_base_p): Remove.
7274         (determine_primary_base): Adjust for indirect primary bases.
7275         (dfs_find_final_overrider): Fix typo in coment.
7276         (update_vtable_entry_for_fn): Use get_primary_binfo.
7277         (layout_nonempty_base_or_field): Tweak.
7278         (build_base_fields): Adjust for new primary base semantics.
7279         (dfs_propagate_binfo_offsets): Remove.
7280         (propagate_binfo_offsets): Rewrite.
7281         (dfs_set_offset_for_shared_vbases): Remove.
7282         (layout_virtual_bases): Don't use it.
7283         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
7284         ABI.
7285         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
7286         CLASSTYPE_VFIELD_PARENT.
7287         (dfs_get_primary_binfo): New function.
7288         (get_primary_binfo): Likewise.
7289         (dump_class_hierarchy_r): Tweak printing of primary bases.
7290         (build_vtbl_initializer): Fix typo in comments.  Use
7291         vtbl_init_data.
7292         (build_vcall_and_vbase_vtbl_entries): Likewise.
7293         (build_vbaes_offset_vtbl_entries): Likewise.
7294         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
7295         BV_VCALL_INDEX to handle indirect primary bases.
7296         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
7297         (build_rtti_vtbl_entries): Likewise.
7298         * search.c (get_shared_vbase_if_not_primary): Tweak.
7299         (find_vbase_instance): Likewise.
7300         (binfo_for_vtable): Simplify.
7301         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
7302         (make_binfo): Make it have 11 entries.
7303
7304 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
7305
7306         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
7307         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
7308         ascertaining primaryness.
7309         (G): Remove template_args.
7310         (decl_is_template_id): New function.
7311         (write_encoding): Use decl_is_template_id.
7312         (write_name): Likewise.  Handle type_decls.  Get main variant of
7313         type decls.
7314         (write_nested_name): Likewise.
7315         (write_prefix): Likewise.
7316         (write_template_prefix): Likewise.
7317         (write_special_name_constructor): Remove defunct production from
7318         comment.
7319         (write_bare_function_type): Remove comment about absent parameter.
7320         (write_template_template_arg): Add missing grammar production to
7321         comment.
7322
7323 2000-07-27  Jason Merrill  <jason@redhat.com>
7324
7325         * decl.c (duplicate_decls): If common_type produces a non-typedef
7326         type for a typedef, just use the old type.
7327
7328 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
7329
7330         * cp-tree.h (function_depth): Declare.
7331         (verify_stmt_tree): Likewise.
7332         (find_tree): Likewise.
7333         * decl.c (function_depth): Give it external linkage.
7334         * optimize.c (optimize_function): Increment and decrement it.
7335         * tree.c (verify_stmt_tree_r): New function.
7336         (verify_stmt_tree): Likewise.
7337         (find_tree_r): Likewise.
7338         (find_tree): Likewise.
7339
7340 2000-07-27  Jason Merrill  <jason@redhat.com>
7341
7342         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
7343         TYPE_PTRMEMFUNC_P.
7344         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
7345
7346 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7347
7348         * decl.c (start_cleanup_fn): Mark the function as `inline'.
7349         * decl2.c (get_guard): Call cp_finish_decl, not
7350         rest_of_decl_compilation, for local guards.
7351         * lex.c (do_identifier): Remove unused variable.
7352
7353 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
7354
7355         * parse.y:  Add missing ';'.
7356
7357 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7358
7359         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
7360         of `extern "C++"'.
7361
7362 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7363
7364         Kill strict_prototype. Backwards compatibility only for
7365         non NO_IMPLICIT_EXTERN_C systems.
7366         * cp-tree.h (flag_strict_prototype): Remove.
7367         (strict_prototype): Remove.
7368         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7369         * decl.c (maybe_push_to_top_level): Adjust.
7370         (pop_from_top_level): Adjust.
7371         (decls_match): Only allow sloppy parm matching for ancient
7372         system headers.
7373         (init_decl_processing): Adjust.
7374         (grokdeclarator): Adjust.
7375         * decl2.c (flag_strict_prototype): Remove.
7376         (strict_prototype): Remove.
7377         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7378         (lang_f_options): Remove "strict-prototype".
7379         (unsupported-options): Add "strict-prototype".
7380         * lex.c (do_identifier): Adjust.
7381         (do_scoped_id): Adjust.
7382         * parse.y (empty_parms): Adjust.
7383         * class.c (push_lang_context): Adjust.
7384         (pop_lang_context): Adjust.
7385         * typeck.c (comp_target_parms): Adjust.
7386
7387 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7388
7389         * decl.c (poplevel): Deal with anonymous variables at for scope.
7390         (maybe_inject_for_scope_var): Likewise.
7391
7392 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
7393
7394         * decl.c: Remove all signal handling code, now done in toplev.c.
7395
7396 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
7397
7398         * decl.c (make_rtl_for_nonlocal_decl): Rework.
7399
7400         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7401         correctly.
7402
7403 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
7404
7405         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7406         Define my_friendly_assert and my_friendly_abort as macros
7407         which may call friendly_abort.  Prototype friendly abort, not
7408         my_friendly_abort or my_friendly_assert.
7409         * decl.c (signal_catch): Report the signal caught in the error
7410         message.  Call fatal directly.
7411         * typeck2.c (ack, my_friendly_assert): Delete.
7412         (my_friendly_abort): Rename to friendly_abort.  Expect file,
7413         line, and function parameters.  Report the abort code, then
7414         call fancy_abort.  Do not mask an abort if errors have
7415         already occurred.
7416
7417 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
7418
7419         * typeck.c (comp_target_parms): Remove obsolete parameter.
7420         (comp_target_types): Adjust.
7421
7422 2000-07-17  Jason Merrill  <jason@redhat.com>
7423
7424         * typeck.c (mark_addressable): Never set TREE_USED.
7425         * call.c (build_call): Don't abort on calls to library functions
7426         that have been declared normally.
7427
7428         * typeck.c (build_binary_op): Fix grammar in warning.
7429
7430         * exception.cc (__eh_free): Fix prototype.
7431
7432         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
7433
7434         * decl.c (pushdecl): Handle seeing an OVERLOAD in
7435         IDENTIFIER_NAMESPACE_VALUE.
7436
7437 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
7438
7439         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
7440         * method.c (use_thunk): Correct handling of vcall offsets.
7441
7442 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7443
7444         * .cvsignore: parse.h and parse.c have no cp- prefix.
7445
7446 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7447
7448         * .cvsignore: New file.
7449
7450 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7451
7452         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7453
7454 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7455
7456         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7457         * parse.c: Remove.
7458         * parse.h: Likewise.
7459
7460 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
7461
7462         * class.c (layout_class_type): Add pointers to virtual bases after
7463         base classes under the old ABI.
7464
7465 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
7466
7467         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7468         (finish_continue_stmt): Likewise.
7469         (begin_for_stmt): Remove call to note_level_for_for.
7470         (finish_goto_stmt): Change call from build_min_nt
7471         to build_stmt.
7472         (finish_expr_stmt): Likewise.
7473         (begin_if_stmt): Likewise.
7474         (begin_while_stmt): Likewise.
7475         (finish_while_stmt): Likewise.
7476         (finish_return_stmt): Likewise.
7477         (begin_for_stmt): Likewise.
7478         (finish_for_stmt): Likewise.
7479         (finish_break_stmt): Likewise.
7480         (begin_switch_stmt): Likewise.
7481         (finish_case_label): Likewise.
7482         (genrtl_try_block): Likewise.
7483         (begin_try_block): Likewise.
7484         (begin_handler): Likewise.
7485         (begin_compound_stmt): Likewise.
7486         (finish_asm_stmt): Likewise.
7487         (finish_label_stmt): Likewise.
7488         (add_decl_stmt): Likewise.
7489         (finish_subobject): Likewise.
7490         (finish_decl_cleanup): Likewise.
7491         (finish_named_return_value): Likewise.
7492         (setup_vtbl_ptr): Likewise.
7493         (add_scope_stmt): Likewise.
7494         * decl.c (finish_constructor_body): Likewise.
7495         (finish_destructor_body): Likewise.
7496         * optimize.c (copy_body_r): Likewise.
7497         (initialize_inlined_parameters): Likewise.
7498         (declare_return_variable): Likewise.
7499         (expand_call_inline): Likewise.
7500
7501 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
7502
7503         * semantics.c (expand_body): Sync interface information
7504         at the end of function body expansion.
7505
7506 2000-07-09  Jason Merrill  <jason@redhat.com>
7507
7508         * init.c (build_new_1): Bail early if the call to new fails.
7509
7510         * decl.c (compute_array_index_type): Check specifically for
7511         an INTEGER_CST, not just TREE_CONSTANT.
7512
7513         * decl.c (duplicate_decls): Don't call duplicate_decls on
7514         the DECL_TEMPLATE_RESULT.
7515         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7516         codes.
7517
7518         * error.c (dump_template_bindings): Don't crash if we had an
7519         invalid argument list.
7520
7521         * typeck.c (c_expand_start_case): Do narrowing here.
7522         * semantics.c (finish_switch_cond): Not here.
7523
7524 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
7525
7526         * parse.y (asm_clobbers): Do string concatenation.
7527
7528 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7529
7530         * decl.c (pushtag): Don't put local classes in template functions
7531         on the local_classes list.
7532
7533 2000-07-04  Scott Snyder  <snyder@fnal.gov>
7534
7535         * decl2.c (get_guard): Add missing return for old ABI local
7536         variable case.
7537
7538 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7539
7540         * cp-tree.h (char_type_p): New function.
7541         * decl.c (init_decl_processing): Don't initialize
7542         signed_wchar_type_node or unsigned_wchar_type_node.
7543         (complete_array_type): Handle brace-enclosed string-constants.
7544         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7545         * tree.c (char_type_p): New function.
7546         * typeck2.c (digest_init): Use char_type_p.
7547
7548 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7549
7550         * pt.c (tsubst): Don't layout type, if it's error_mark.
7551
7552 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7553
7554         * pt.c (instantiate_pending_templates): Reset template level.
7555
7556 2000-07-05  Jason Merrill  <jason@redhat.com>
7557
7558         * call.c (joust): Don't complain about `operator char *()' beating
7559         `operator const char *() const'.
7560
7561 2000-07-04  scott snyder  <snyder@fnal.gov>
7562             Jason Merrill  <jason@redhat.com>
7563
7564         * repo.c (repo_get_id): Handle the case where a class with virtual
7565         bases has a null TYPE_BINFO_VTABLE.
7566
7567 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
7568             Jason Merrill  <jason@redhat.com>
7569
7570         * parse.y (member_init): Just pass in the type.
7571         * init.c (expand_member_init): Handle getting a type.
7572
7573 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7574             Jason Merrill  <jason@redhat.com>
7575
7576         * decl.c (finish_function): Warn if a function has no return
7577         statement.
7578         Suggested by Andrew Koenig.
7579         * typeck.c (check_return_expr): Do set current_function_returns_value
7580         if we got an error_mark_node.
7581
7582 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7583
7584         * decl2.c (push_decl_namespace): Push the original namespace.
7585
7586 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7587
7588         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7589         * semantics.c (begin_class_definition): Clear it.
7590
7591 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
7592
7593         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7594         (genrtl_expr_stmt): Likewise.
7595         (genrtl_decl_stmt): Likewise.
7596         (genrtl_if_stmt): Likewise.
7597         (genrtl_while_stmt): Likewise.
7598         (genrtl_do_stmt): Likewise.
7599         (genrtl_return_stmt): Likewise.
7600         (genrtl_for_stmt): Likewise.
7601         (genrtl_break_stmt): Likewise.
7602         (genrtl_continue_stmt): Likewise.
7603         (genrtl_scope_stmt): Likewise.
7604         (genrtl_switch_stmt): Likewise.
7605         (genrtl_case_label): Likewise.
7606         (genrtl_begin_compound_stmt): Likewise.
7607         (genrtl_finish_compound_stmt): Likewise.
7608         (genrtl_compound_stmt): Likewise.
7609         (genrtl_asm_stmt): Likewise.
7610
7611         * init.c (begin_init_stmts): Remove call to
7612         genrtl_begin_compound_stmt.
7613         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7614
7615         * semantics.c (lang_expand_stmt): Changed call to
7616         genrtl_compound_stmt to ignore return value.
7617
7618 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
7619
7620         * mangle.c (canonicalize_for_substitution): Return the canonical
7621         variant of a type.
7622
7623         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7624         TYPE_DECL.
7625         * typeck.c (commonparms): Remove obstack manipulations.
7626
7627 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
7628
7629         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7630
7631         * Makefile.in (OBJS): Added ../c-semantics.o.
7632         (OBJDEPS): Likewise.
7633
7634         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7635         ../c-common.h.
7636         (struct stmt_tree): Added comment.
7637         (current_function_name_declared): Removed.
7638         (stmts_are_full_exprs_p): Likewise.
7639         (genrtl_do_pushlevel): Likewise.
7640         (genrtl_clear_out_block): Likewise.
7641         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7642         (DECL_ANON_UNION_ELEMS): Likewise.
7643         (emit_local_var): Likewise.
7644         (make_rtl_for_local_static): Likewise.
7645         (do_case): Likewise.
7646         (expand_stmt): Likewise.
7647         (genrtl_decl_cleanup): Likewise.
7648         (c_expand_asm_operands): Likewise.
7649         (c_expand_return): Likewise.
7650         (c_expand_start_case): Likewise.
7651
7652         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7653         (emit_local_var): Likewise.
7654         (initialize_local_var): Change reference to
7655         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7656         Change reference to stmts_are_full_exprs_p to
7657         current_stmt_tree->stmts_are_full_exprs_p.
7658         (push_cp_function_context): Likewise.
7659
7660         * expect.c (expand_throw): Change reference to
7661         stmts_are_full_exprs_p.
7662
7663         * init.c (build_aggr_init): Change reference to
7664         stmts_are_full_exprs_p.
7665         (build_vec_init): Likewise.
7666
7667         * optimize.c (maybe_clone_body): Change reference to
7668         current_function_name_declared to
7669         cp_function_chain->name_declared.
7670
7671         * pt.c (instantiate_decl): Change reference to
7672         current_function_name_declared to
7673         cp_function_chain->name_declared.
7674
7675         * semantics.c (expand_cond): Moved declaration to c-common.h.
7676         (genrtl_do_pushlevel): Moved to c-semantics.c.
7677         (genrtl_clear_out_block): Likewise.
7678         (genrtl_goto_stmt): Likewise.
7679         (genrtl_expr_stmt): Likewise.
7680         (genrtl_decl_stmt): Likewise.
7681         (gerntl_if_stmt): Likewise.
7682         (genrtl_while_stmt): Likewise.
7683         (genrtl_do_stmt): Likewise.
7684         (genrtl_return_stmt): Likewise.
7685         (genrtl_for_stmt): Likewise.
7686         (genrtl_break_stmt): Likewise.
7687         (genrtl_continue_stmt): Likewise.
7688         (genrtl_scope_stmt): Likewise.
7689         (genrtl_switch_stmt): Likewise.
7690         (genrtl_case_label): Likewise.
7691         (genrtl_begin_compound_stmt): Likewise.
7692         (genrtl_finish_compound_stmt): Likewise.
7693         (genrtl_compound_stmt): Likewise.
7694         (genrtl_asm_stmt): Likewise.
7695         (genrtl_decl_cleanup): Likewise.
7696         (expand_cond): Likewise.
7697         (expand_stmt): Renamed to ...
7698         (lang_expand_stmt): ... this.
7699         (lang_expand_expr_stmt): Initialize.
7700         (set_current_function_name_declared): Likewise.
7701         (stmts_are_full_exprs_p): Likewise.
7702         (current_function_name_declared): Likewise.
7703         (anon_aggr_type_p): Likewise.
7704         (do_poplevel): Change reference to
7705         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7706         Change reference to stmts_are_full_exprs_p to
7707         current_stmt_tree->stmts_are_full_exprs_p.
7708         (add_tree): Likewise.
7709         (finish_expr_stmt): Likewise.
7710         (prep_stmt): Likewise.
7711         (lang_expand_stmt): Likewise.
7712         (begin_compound_stmt): Change reference to
7713         current_function_name_declared to
7714         cp_function_chain->name_declared and call to
7715         current_function_name_declared().
7716         (setup_vtbl_ptr): Likewise.
7717         (genrtl_do_poplevel): Removed.
7718
7719 2000-06-30  Jason Merrill  <jason@redhat.com>
7720
7721         * init.c (init_init_processing): Go back to aligning like
7722         double_type_node for old ABI.
7723         (get_cookie_size): Make cookie larger if we get a type that needs
7724         more alignment.
7725         (build_vec_delete): Call it.
7726
7727         * typeck.c (qualify_type_recursive): New fn.
7728         (composite_pointer_type): Use it.
7729         (build_binary_op): Use composite_pointer_type.
7730
7731 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
7732             Jason Merrill  <jason@redhat.com>
7733
7734         * typeck.c (check_return_expr): Don't complain about returning
7735         NULL from operator new if -fcheck-new.
7736         * cp-tree.h: Declare flag_check_new here.
7737         * init.c: Not here.
7738
7739 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7740
7741         * mangle.c (find_substitution): Use same_type_p.
7742         (write_encoding): Don't check for substitutions.
7743
7744 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7745
7746         * parse.y (expr_no_comma_rangle): New non-terminal.
7747         (template_parm): Use it for default parameter case.
7748         (template_arg): Use it.
7749         (expr_no_commas): Remove commented out undefined extensions.
7750         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7751         * parse.h, parse.c: Rebuilt.
7752
7753 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
7754
7755         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7756         (finish_asm_stmt): Do it here, instead.
7757
7758         * cp-tree.h (ridpointers): Don't declare.
7759         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7760         (record_builtin_java_type): Likewise.
7761         (init_decl_processing): Likewise.
7762         * lex.c: Move inclusion of lex.h.
7763         (ridpointers): Don't define.
7764         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
7765         RID_MAX.
7766         * lex.h (enum rid): Rename to ...
7767         (enum cp_rid): ... this.
7768         (ridpointers): Don't declare.
7769         * parse.y: Move inclusion of lex.h.
7770         * parse.c: Regenerated.
7771         * spew.c: Move inclusion of lex.h.
7772
7773         * cp-tree.h (struct language_function): Remove temp_name_counter.
7774         (temp_name_counter): Remove.
7775         (get_temp_name): Change prototype.
7776         (get_guard): New function.
7777         (get_guard_cond): Likewise.
7778         (set_guard): Likewise.
7779         * cvt.c (build_up_reference): Adjust call to get_temp_name.
7780         * decl.c (expand_static_init): Use get_guard and friends to
7781         implement guard variables.
7782         * decl2.c (get_temp_name): Assume that the variables created are
7783         always static.
7784         (get_sentry): Rename to ...
7785         (get_guard): ... this.  Implement new ABI guard variables.
7786         (get_guard_bits): New function.
7787         (get_guard_cond): Likewise.
7788         (set_guard): Likewise.
7789         (start_static_initialization_or_destruction): Use them.
7790         (do_static_initialization): Replace sentry with guard throughout.
7791         (do_static_destruction): Likewise.
7792         * init.c (create_temporary_var): Add comment.
7793
7794 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7795
7796         * mangle.c (find_substitution): Use same_type_p.
7797         (write_encoding): Don't check for substitutions.
7798
7799 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7800
7801         * parse.y (expr_no_comma_rangle): New non-terminal.
7802         (template_parm): Use it for default parameter case.
7803         (template_arg): Use it.
7804         (expr_no_commas): Remove commented out undefined extensions.
7805         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7806         * parse.h, parse.c: Rebuilt.
7807
7808 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
7809
7810         * cp-tree.h (flag_const_strings): Remove.
7811         (warn_parentheses): Likewise.
7812         (warn_format): Likewise.
7813         (common_type): Likewise.
7814         (default_conversion): Likewise.
7815         (build_binary_op): Likewise.
7816         (cp_build_binary_op): New macro.
7817         * call.c (build_new_op): Use cp_build_binary_op instead of
7818         build_binary_op.
7819         * class.c (build_vtable_entry_ref): Likewise.
7820         * decl.c (expand_static_init): Likewise.
7821         (compute_array_index_type): Likewise.
7822         (build_enumerator): Likewise.
7823         * decl2.c (delete_sanity): Likewise.
7824         (start_static_initialization_or_destruction): Likewise.
7825         * error.c (dump_type_suffix): Likewise.
7826         * init.c (resolve_offset_ref): Likewise.
7827         (build_new): Likewise.
7828         (build_new_1): Likewise.
7829         (build_vec_delete_1): Likewise.
7830         (build_vec_init): Likewise.
7831         (build_delete): Likewise.
7832         * rtti.c (synthesize_tinfo_fn): Likewise.
7833         (synthesize_tinfo_var): Likewise.
7834         * search.c (expand_upcast_fixups): Likewise.
7835         (fixup_all_virtual_upcast_offsets): Likewise.
7836         * typeck.c (build_array_ref): Likewise.
7837         (get_member_function_from_ptrfunc): Likewise.
7838         (build_binary_op): Add parameter.
7839         (pointer_int_sum): Use cp_build_binary_op.
7840         (pointer_diff): Likewise.
7841         (build_modify_expr): Likewise.
7842         (get_delta_difference): Likewise.
7843         (build_ptrmemfunc): Likewise.
7844
7845 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7846
7847         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7848         * decl.c (create_implicit_typedef): Adjust.
7849         * decl2.c (build_artificial_parm): Adjust.
7850         * method.c (implicitly_declare_fn): Adjust.
7851         * pt.c (push_inline_template_parms_recursive): Adjust.
7852         (process_template_parm): Adjust.
7853         (overloaded_template_name): Adjust.
7854         * semantics.c (finish_template_template_parm): Adjust.
7855
7856 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
7857
7858         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7859         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7860         where to emit thunks.
7861         (build_vtt): Adjust call to build_vtt_inits.
7862         (build_vtt_inits): Add parameter to indicate whether or not
7863         sub-VTTs for virtual bases should be included.  Adjust handling of
7864         construction vtables.
7865         (get_matching_base): New function.
7866         (dfs_build_vtt_inits): Rename to ...
7867         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7868         construction vtables.
7869         (dfs_fixup_binfo_vtbls): Likewise.
7870         (build_ctor_vtbl_groups): Build construction vtables for virtual
7871         bases, too.
7872         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7873         to build construction vtbls.
7874         (dfs_accumulate_vtbl_inits): Adjust handling of
7875         construction vtables.
7876
7877         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7878         types correctly.
7879
7880 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
7881
7882         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7883
7884 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7885
7886         * search.c (hides): Remove.
7887         (is_subobject_of_p): Add most_derived parameter. Use
7888         CANONICAL_BINFO.
7889         (lookup_field_queue_p): Adjust.
7890         (lookup_field_r): Adjust.
7891
7892 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7893
7894         * decl2.c (handle_class_head): Bash typedefs to the type's main
7895         decl.
7896
7897 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
7898
7899         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7900         (begin_global_stmt_expr): ... this.
7901         (genrtl_finish_stmt_expr): Rename to ...
7902         (finish_global_stmt_expr): ... this.
7903         * init.c (begin_init_stmts): Adjust calls.
7904         (finish_init_stmts): Likewise.
7905         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7906         (begin_global_stmt_expr): ... this.
7907         (genrtl_finish_stmt_expr): Rename to ...
7908         (finish_global_stmt_expr): ... this.
7909
7910 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7911
7912         * search.c (lookup_member): Fix typo in comment.
7913
7914 2000-06-24  Jason Merrill  <jason@redhat.com>
7915
7916         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7917         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7918
7919 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7920
7921         * parse.y (complex_direct_notype_declarator): Support global_scope.
7922         * Makefile.in: Adjust conflict count.
7923
7924 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7925
7926         * parse.y (template_arg): Convert TEMPLATE_DECL
7927         that is a template template parameter to
7928         TEMPLATE_TEMPLATE_PARM here.
7929
7930         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7931         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7932         (copy_template_template_parm): Adjust prototype.
7933         * decl.c (grokdeclarator): Remove dead code.
7934         * pt.c (process_template_parm): Tidy.
7935         (lookup_template_class): Construct nodes in
7936         copy_template_template_parm.
7937         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7938         lookup_template_class.  Use TYPE_TI_TEMPLATE.
7939         * tree.c (copy_template_template_parm): Add NEWARGS
7940         parameter.
7941         (mapcar): Adjust call to copy_template_template_parm.
7942         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7943         * method.c (build_template_template_parm_names): Change error
7944         code to avoid compilation warning.
7945
7946         * gxxint.texi: Document template template parameter
7947         name mangling.
7948
7949 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
7950
7951         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7952         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7953         (cp-demangle.o): New rule.
7954         (dyn-string.o): Likewise.
7955         * inc/cxxabi.h (__cxa_demangle): New declaration.
7956
7957 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
7958
7959         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7960         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7961         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
7962         a tree, not an int.
7963         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7964         (make_thunk): Change prototype.
7965         (emit_thunk): Rename to use_thunk.
7966         (mangle_thunk): Change prototype.
7967         * class.c (get_derived_offset): Simplify.
7968         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7969         BV_GENERATE_THUNK_WITH_VTABLE_P.
7970         (build_primary_vtable): Simplify.
7971         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7972         (dfs_find_base): Remove.
7973         (update_vtable_entry_for_fn): Correct bug in finding the base
7974         where a virtual function was first declared.  Figure out whether
7975         or not to emit a vcall-thunk with the vtables in which it appears.
7976         Correct logic for deciding whether to use an ordinary thunk, or a
7977         vcall thunk.
7978         (finish_struct_1): Remove unnecssary code.
7979         (build_vtbl_initializer): Use ssize_int for the running counter of
7980         negative indices.
7981         (build_vtbl_initializer): Only use vcall thunks where necessary.
7982         Mark thunks as needing to be emitted with their vtables, or not.
7983         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7984         indices.  Use size_binop.
7985         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7986         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
7987         size_binop.
7988         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7989         (build_vtable_entry): Mark thunks as needing to be emitted with
7990         their vtables, or not.
7991         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7992         * decl2.c (mark_vtable_entries): Use use_thunk instead of
7993         emit_thunk.
7994         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
7995         information.
7996         * error.c (dump_expr): Use BV_FN.
7997         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7998         not an int.
7999         * method.c (make_thunk): Likewise.
8000         (emit_thunk): Rename to use_thunk.  Allow callers to decide
8001         whether or not to actually emit the thunk.  Adjust for changes in
8002         representation of vcall offsets.
8003         * search.c (dfs_get_pure_virtuals): Use BV_FN.
8004         * semantics.c (emit_associated_thunks): New function.
8005         (expand_body): Use it.
8006         * ir.texi: Adjust decriptions of thunks.
8007
8008 2000-06-22  Jason Merrill  <jason@redhat.com>
8009
8010         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
8011         (tsubst_friend_function): Copy it here.
8012
8013         * decl.c (grok_op_properties): Fix typo.
8014
8015         * decl2.c (delete_sanity): Clarify warning, avoid failure on
8016         deleting void*.
8017
8018         * pt.c (check_explicit_specialization): Clarify error.
8019
8020         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
8021         an old OVERLOAD when we're declaring a non-function.
8022         (pushdecl, destroy_local_var): Check for error_mark_node.
8023         (warn_extern_redeclared_static): Also bail early if
8024         we're a CONST_DECL.
8025         (push_overloaded_decl): Ignore an old error_mark_node.
8026
8027 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
8028
8029         * call.c (build_x_va_arg): Check if in a template decl.
8030         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
8031
8032 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
8033
8034         * class.c (push_lang_context): TYPE_NAME gets you to the Java
8035         types DECLs.
8036         * decl.c (check_goto): Computed gotos assumed OK.
8037
8038 2000-06-20  Jason Merrill  <jason@redhat.com>
8039
8040         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
8041         for which we don't need to look for instantiations.
8042
8043 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
8044
8045         * parse.y (program): Always call finish_translation_unit.
8046         * parse.c, parse.h: Rebuilt.
8047
8048 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
8049
8050         * method.c: Don't include hard-reg-set.h.
8051
8052 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8053
8054         * rtti.c (get_base_offset): Cope when vbase field is in a base.
8055
8056 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
8057
8058         * call.c (build_conditional_expr): Use VOID_TYPE_P.
8059         * cvt.c (cp_convert_to_pointer): Likewise.
8060         (convert_to_void): Likewise.
8061         * error.c (dump_expr): Likewise.
8062         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
8063         * init.c (build_delete): Likewise.
8064         * method.c (emit_thunk): Likewise.
8065         * optmize.c (declare_return_variable): Likewise.
8066         * rtti.c (get_tinfo_decl_dynamic): Likewise.
8067         (get_typeid): Likewise.
8068         (build_dynamic_cast_1): Likewise.
8069         * typeck.c (composite_pointer_type): Likewise.
8070         (common_type): Likewise.
8071         (build_indirect_ref): Likewise.
8072         (build_binary_op): Likewise.
8073         (build_x_compound_expr): Likewise.
8074         (check_return_expr): Likewise.
8075         * typeck2.c (add_exception_specifier): Likewise.
8076
8077         * mangle.c (write_method_parms): Use direct comparison for end
8078         of parmlist.
8079
8080 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
8081
8082         * cp-tree.h (genrtl_try_block): Declare function.
8083         (genrtl_handler): Likewise.
8084         (genrtl_catch_block): Likewise.
8085         (genrtl_ctor_stmt): Likewise.
8086         (genrtl_subobject): Likewise.
8087         (genrtl_decl_cleanup): Likewise.
8088         (genrtl_do_poplevel): Likewise.
8089         (genrtl_do_pushlevel): Likewise.
8090         (genrtl_clear_out_block): Likewise.
8091         (genrtl_goto_stmt): Likewise.
8092         (genrtl_expr_stmt): Likewise.
8093         (genrtl_decl_stmt): Likewise.
8094         (genrtl_if_stmt): Likewise.
8095         (genrtl_while_stmt): Likewise.
8096         (genrtl_do_stmt): Likewise.
8097         (genrtl_return_stmt): Likewise.
8098         (genrtl_for_stmt): Likewise.
8099         (genrtl_break_stmt): Likewise.
8100         (genrtl_continue_stmt): Likewise.
8101         (genrtl_scope_stmt): Likewise.
8102         (genrtl_switch_stmt): Likewise.
8103         (genrtl_case_label): Likewise.
8104         (genrtl_begin_compound_stmt): Likewise.
8105         (genrtl_finish_compound_stmt): Likewise.
8106         (genrtl_compound_stmt): Likewise.
8107         (genrtl_asm_stmt): Likewise.
8108         (genrtl_named_return_value): Likewise.
8109         (genrtl_begin_stmt_expr): Likewise.
8110         (genrtl_finish_stmt_expr): Likewise.
8111         (finish_for_stmt): Removed first argument.
8112         (finish_switch_stmt): Likewise.
8113
8114         * semantics.c (genrtl_try_block): Define function.
8115         (genrtl_handler): Likewise.
8116         (genrtl_catch_block): Likewise.
8117         (genrtl_ctor_stmt): Likewise.
8118         (genrtl_subobject): Likewise.
8119         (genrtl_decl_cleanup): Likewise.
8120         (genrtl_do_poplevel): Likewise.
8121         (genrtl_do_pushlevel): Likewise.
8122         (genrtl_clear_out_block): Likewise.
8123         (genrtl_goto_stmt): Likewise.
8124         (genrtl_expr_stmt): Likewise.
8125         (genrtl_decl_stmt): Likewise.
8126         (genrtl_if_stmt): Likewise.
8127         (genrtl_while_stmt): Likewise.
8128         (genrtl_do_stmt): Likewise.
8129         (genrtl_return_stmt): Likewise.
8130         (genrtl_for_stmt): Likewise.
8131         (genrtl_break_stmt): Likewise.
8132         (genrtl_continue_stmt): Likewise.
8133         (genrtl_scope_stmt): Likewise.
8134         (genrtl_switch_stmt): Likewise.
8135         (genrtl_case_label): Likewise.
8136         (genrtl_begin_compound_stmt): Likewise.
8137         (genrtl_finish_compound_stmt): Likewise.
8138         (genrtl_compound_stmt): Likewise.
8139         (genrtl_asm_stmt): Likewise.
8140         (genrtl_named_return_value): Likewise.
8141         (genrtl_begin_stmt_expr): Likewise.
8142         (genrtl_finish_stmt_expr): Likewise.
8143         (finish_for_stmt): Removed first argument and generate rtl
8144         specific code.
8145         (finish_switch_stmt): Likewise.
8146         (do_poplevel): Removed generate rtl specific code.
8147         (do_pushlevel): Likewise.
8148         (add_tree): Likewise.
8149         (finish_goto_stmt): Likewise.
8150         (finish_expr_stmt): Likewise.
8151         (begin_if_stmt): Likewise.
8152         (finish_if_stmt_cond): Likewise.
8153         (finish_then_clause): Likewise.
8154         (begin_else_clause): Likewise.
8155         (finish_else_clause): Likewise.
8156         (finish_if_stmt): Likewise.
8157         (clear_out_block): Likewise.
8158         (begin_while_stmt): Likewise.
8159         (finish_while_stmt_cond): Likewise.
8160         (finish_while_stmt): Likewise.
8161         (begin_do_stmt): Likewise.
8162         (finish_do_body): Likewise.
8163         (finish_do_stmt): Likewise.
8164         (finish_return_stmt): Likewise.
8165         (begin_for_stmt): Likewise.
8166         (finish_for_init_stmt): Likewise.
8167         (finish_for_cond): Likewise.
8168         (finish_for_expr): Likewise.
8169         (finish_break_stmt): Likewise.
8170         (finish_continue_stmt): Likewise.
8171         (begin_switch_stmt): Likewise.
8172         (finish_switch_cond): Likewise.
8173         (finish_case_label): Likewise.
8174         (begin_try_block): Likewise.
8175         (begin_function_try_block): Likewise.
8176         (finish_try_block): Likewise.
8177         (finish_cleanup_try_block): Likewise.
8178         (finish_cleanup): Likewise.
8179         (finish_function_try_block): Likewise.
8180         (finish_handler_sequence): Likewise.
8181         (finish_function_handler_sequence): Likewise.
8182         (begin_handler): Likewise.
8183         (finish_handler_parms): Likewise.
8184         (begin_catch_block): Likewise.
8185         (finish_handler): Likewise.
8186         (begin_compound_stmt): Likewise.
8187         (finish_compound_stmt): Likewise.
8188         (finish_asm_stmt): Likewise.
8189         (finish_label_stmt): Likewise.
8190         (finish_label_decl): Likewise.
8191         (finish_subobject): Likewise.
8192         (finish_decl_cleanup): Likewise.
8193         (finish_named_return_value): Likewise.
8194         (begin_stmt_expr): Likewise.
8195         (finish_stmt_expr): Likewise.
8196
8197         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
8198         to call genrtl_expr_stmt when appropriate.
8199
8200         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
8201         begin_compound_expr to call genrtl_begin_stmt_expr and
8202         genrtl_begin_compound_expr when appropriate.
8203         (finish_init_stmts): Changed calls to finish_compound_expr and
8204         finish_stmt_expr to call genrtl_finish_compound_expr and
8205         genrtl_finish_stmt_expr when appropriate.
8206         (expand_default_init): Changed call to finish_expr_stmt to call
8207         genrtl_expr_stmt when appropriate.
8208         (build_vec_init): Likewise.
8209
8210         * parse.y (simple_stmt): Removed first argument from call to
8211         finish_for_stmt. Removed first argument from call to
8212         finish_switch_stmt.
8213
8214         * parse.c: Regenerated.
8215
8216         * pt.c (tsubst_expr): Removed first argument from call to
8217         finish_for_stmt. Removed first argument from call to
8218         finish_switch_stmt.
8219
8220 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
8221
8222         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
8223         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
8224
8225         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
8226         (cplus_tree_code_length[]): Likewise.
8227         (cplus_tree_code_name[]): Likewise.
8228         (init_parse): Added call to add_c_tree_codes. Changed
8229         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
8230
8231 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
8232
8233         * cp-tree.h (finish_mem_initializers): Declare.
8234         (count_trees): Likewise.
8235         * parse.y (base_init): Use finish_mem_initializers.
8236         * semantics.c (finish_mem_initializers): New function.
8237
8238         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
8239         the number of trees.
8240         (n_trees): Remove.
8241         (count_trees): Don't use it.
8242
8243 2000-06-15  Jason Merrill  <jason@redhat.com>
8244
8245         * tree.c (count_trees): New debugging function.
8246
8247         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
8248         * init.c (build_member_call): Pull out the name of a DECL.
8249
8250         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
8251         * semantics.c (expand_body): Push to TV_INTEGRATION here.
8252         * optimize.c (optimize_function): Not here.
8253         * pt.c (instantiate_decl): Push to TV_PARSE.
8254
8255 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
8256
8257         * cp-tree.h (struct language_function): Remove x_base_init_list
8258         and x_member_init_list.
8259         (current_base_init_list): Remove.
8260         (current_member_init_list): Likewise.
8261         (setup_vtbl_ptr): Change prototype.
8262         (emit_base_init): Likewise.
8263         (expand_member_init): Likewise.
8264         (reinit_parse_for_function): Remove.
8265         * decl.c (save_function_data): Don't clear x_base_init_list and
8266         x_member_init_list.
8267         (mark_language_function): Don't mark them.
8268         * init.c (perform_member_init): Tweak comment.
8269         (sort_member_init): Take the list of initializers as an argument.
8270         (sort_base_init): Likewise.
8271         (emit_base_init): Likewise.
8272         (expand_member_init): Return the initializer.  Don't use global
8273         variables.
8274         * lex.c (reinit_parse_for_function): Remove.
8275         * method.c (build_template_parm_names): Correct substitution.
8276         (do_build_copy_constructor): Don't use current_member_init_list
8277         and current_base_init_list.
8278         (synthesize_method): Likewise.
8279         * parse.y (base_init): Split mem-initializers into
8280         base-initializers and field-initializers.
8281         (member_init_list): Build up the list here.
8282         (member_init): Return the initializer.
8283         (fn.depfn): Don't use reinit_parse_for_function.
8284         * parse.c: Regenerated.
8285         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
8286         ERROR_MARK.
8287         (tsubst_expr): Don't use current_member_init_list
8288         and current_base_init_list.
8289         (tsubst_expr_values): Rename to ...
8290         (tsubst_initializer_list): ... this.  Use convert_from_reference.
8291         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
8292         and current_base_init_list.
8293         (begin_function_definition): Don't call reinit_parse_for_function.
8294
8295         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
8296
8297         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
8298         correctly.
8299
8300         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
8301
8302 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
8303
8304         * cp-tree.h (IF_COND): Move to c-common.h.
8305         (THEN_CLAUSE): Likewise.
8306         (ELSE_CLAUSE): Likewise.
8307         (WHILE_COND): Likewise.
8308         (WHILE_BODY): Likewise.
8309         (DO_COND): Likewise.
8310         (DO_BODY): Likewise.
8311         (RETURN_EXPR): Likewise.
8312         (EXPR_STMT_EXPR): Likewise.
8313         (FOR_INIT_STMT): Likewise.
8314         (FOR_COND): Likewise.
8315         (FOR_EXPR): Likewise.
8316         (FOR_BODY): Likewise.
8317         (SWITCH_COND): Likewise.
8318         (SWITCH_BODY): Likewise.
8319         (CASE_LOW): Likewise.
8320         (CASE_HIGH): Likewise.
8321         (GOTO_DESTINATION): Likewise.
8322         (COMPOUND_BODY): Likewise.
8323         (ASM_CV_QUAL): Likewise.
8324         (ASM_STRING): Likewise.
8325         (ASM_OUTPUTS): Likewise.
8326         (ASM_INPUTS): Likewise.
8327         (ASM_CLOBBERS): Likewise.
8328         (DECL_STMT_DECL): Likewise.
8329         (STMT_EXPR_STMT): Likewise.
8330         (LABEL_STMT_LABEL): Likewise.
8331         (SCOPE_BEGIN_P): Likewise.
8332         (SCOPE_END_P): Likewise.
8333         (SCOPE_STMT_BLOCK): Likewise.
8334         (SCOPE_NULLIFIED_P): Likewise.
8335         (SCOPE_NO_CLEANUPS_P): Likewise.
8336         (SCOPE_PARTIAL_P): Likewise.
8337         (ASM_VOLATILE_P): Likewise.
8338         (STMT_LINENO): Likewise.
8339         (STMT_LINENO_FOR_FN_P): Likewise.
8340
8341         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
8342         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
8343         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
8344         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
8345         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
8346
8347         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
8348
8349         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
8350         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
8351
8352         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
8353         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
8354         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
8355
8356 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
8357
8358         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
8359         * class.c (dfs_find_final_overrider): Set it appropriately.
8360         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
8361         avoid unneeded secondary vptrs.
8362
8363 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8364
8365         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
8366         (check_bitfield_decl, check_field_decl): Likewise.
8367         (build_vtbl_or_vbase_field, build_base_field): Likewise.
8368         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
8369         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
8370         (xfer_tag, finish_enum): Likewise.
8371         * decl2.c (finish_builtin_type): Likewise.
8372         * init.c (init_init_processing): Likewise.
8373         * pt.c (instantiate_class_template): Likewise.
8374         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
8375         * cp-tree.h (struct lang_type): Add user_align member.
8376         (CLASSTYPE_USER_ALIGN): Define.
8377
8378 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8379
8380         * Make-lang.in (c++.install-common): Install g++-cross in
8381         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
8382         $(target_alias)-g++ and $(target_alias)-c++.
8383
8384 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
8385
8386         * class.c (vcall_offset_data_s): Add last_init and fns.
8387         (overrides): Rename to same_signature_p.
8388         (dfs_find_final_overrider): Adjust accordingly.
8389         (mark_overriders): Likewise.
8390         (warn_hidden): Likewise.
8391         (build_vtbl_initializer): Reorganize machinery for building things
8392         at negative offsets.
8393         (build_vcall_and_vbase_vtbl_entries): Likewise.
8394         (build_vbase_offset_vtbl_entries): Likewise.
8395         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8396         offset entries.  Do not create two entries for functions with the
8397         same signature.
8398         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8399         (build_rtti_vtbl_entries): Reorganize machinery for building things
8400         at negative offsets.
8401
8402         * optimize.c (expand_call_inline): Don't recurse into the code
8403         used to initialize the parameters more than once.
8404
8405 2000-06-11  Mark Mitchell <mark@codesourcery.com>
8406
8407         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8408         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8409         (find_substitution): Only use the `Sa' substitution for
8410         std::allocator, not instantiations of it.
8411         (write_template_prefix): Move comment.  Only use a TREE_LIST to
8412         represent substitutions for a member template.
8413         (write_array_type): Mangle array dimensions correctly.
8414         * optimize.c (maybe_clone_body): Copy more information from the
8415         cloned function.
8416         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8417         on the regenerated declaration.
8418
8419 2000-06-11  Chip Salzenberg  <chip@valinux.com>
8420             Mark Mitchell <mark@codesourcery.com>
8421
8422         * class.c (build_vtable): Clarify comment.
8423         (build_ctor_vtbl_group): Pass the most derived type to
8424         build_vtable.
8425
8426 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8427
8428         * decl2.c (compare_options): Don't needlessly cast away const-ness.
8429
8430 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
8431
8432         * decl.c (add_binding): Handle duplicate declarations of external
8433         variables.
8434
8435 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8436             Mark Mitchell <mark@codesourcery.com>
8437
8438         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
8439         argument.
8440         (write_signed_number): New macro.
8441         (write_unsigned_number): Likewise.
8442         (write_source_name): Use them.
8443         (write_number): Handle signed and unsigned values.
8444         (write_integer_cst): Use tree_int_cst_sgn, and use
8445         write_unsigned_number or write_signed_number as appropriate.
8446         (write_discriminator): Use write_unsigned_number or
8447         write_signed_number as appropriate.
8448         (write_template_arg_literal): Likewise.
8449         (write_array_type): Use tree_low_cst.
8450         (write_template_parm):  Use write_unsigned_number or
8451         write_signed_number as appropriate.
8452         (write_substitution): Adjust call to write_number.
8453         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8454         (write_expression): Handle non-type template arguments of
8455         reference type correctly.
8456         (mangle_thunk): Use write_signed_number.
8457
8458 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8459
8460         * mangle.c (find_substition): Don't mangle objects with typename
8461         substitutions (e.g. "cin" as "Si").
8462
8463 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
8464
8465         * call.c (add_candidate): Use ggc_alloc_cleared.
8466         * decl.c (lookup_label): Likewise.
8467         * lex.c (retrofit_lang_decl): Likewise.
8468
8469 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
8470
8471         * semantics.c (expand_body): Push to TV_EXPAND.
8472         * optimize.c (optimize_function): Push to TV_INTEGRATION.
8473         * decl.c (start_function): Always call announce_function.
8474
8475         * tinfo2.cc: Just declare abort.
8476
8477 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
8478
8479         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8480         whenever @ is a symbolic name.
8481
8482 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
8483
8484         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8485
8486 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
8487
8488         * decl.c (pushdecl): Look up functions by DECL_NAME, not
8489         DECL_ASSEMBLER_NAME.
8490
8491 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8492
8493         * decl2.c (c_language): Define.
8494
8495 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8496
8497         * lex.c (lang_init_options): Tweak.
8498
8499         * decl2.c: Remove #inclusion of diagnostic.h
8500         (lang_decode_option): Move diagnostic formatting options to
8501         toplevel.
8502
8503         * lang-options.h: Remove documentation for diagnostic options.
8504
8505         * Makefile.in (lex.o): Depends upon diagnostic.h
8506
8507 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8508
8509         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8510         the same DECL_RESULT, it's not a redefinition.
8511         * pt.c (tsubst_decl): Remove code to handle illegal
8512         specializations.
8513
8514 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
8515
8516         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8517
8518 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
8519
8520         * search.c (maybe_suppress_debug_info): Don't check
8521         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8522
8523         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8524         here if extern_p.
8525
8526         Remember instantiation context in deferred instantiations.
8527         * cp-tree.h (struct tinst_level): Remove.
8528         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8529         * pt.c (current_tinst_level): Now a tree.
8530         (print_template_context, push_tinst_level, pop_tinst_level,
8531         tinst_for_decl): Adjust.
8532         (reopen_tinst_level): New fn.
8533         (init_pt): Register current_tinst_level as a root.
8534         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8535         of the pending templates list.
8536         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
8537         * lex.c (extract_interface_info): Adjust.
8538         * decl2.c (warn_if_unknown_interface): Adjust.
8539
8540 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
8541
8542         * class.c (indirect_primary_base_p): New function.
8543         (determine_primary_base): Use it.
8544
8545 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8546
8547         Update new-abi dynamic cast algorithm.
8548         * tinfo.cc (__class_type_info::__dyncast_result): Add
8549         whole_details. Adjust constructor.
8550         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8551         Avoid unnecessary searching.
8552         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8553
8554 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8555
8556         * decl.c (init_decl_processing): Don't call record_component_aliases.
8557         * tree.c (build_cplus_array_type_1): Likewise.
8558
8559 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
8560
8561         * ir.texi: Correct typo.
8562         * mangle.c (write_expression): Handle non-type template arguments
8563         with reference type.
8564         * method.c (build_overload_value): Likewise.
8565         * pt.c (convert_nontype_argument): Explicitly represent conversion
8566         to a reference with an ADDR_EXPR.
8567         (unify): Always unify arguments in left-to-right order.
8568
8569 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
8570             Mark Mitchell  <mark@codesourcery.com>
8571
8572         * Make-lang.in (CXX_SRCS): Add mangle.c.
8573         * Makefile.in (CXX_OBJS): Add mangle.o.
8574         (mangle.o): New rule.
8575
8576         * class.c (local_classes): New variable.
8577         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8578         (get_vtt_name): Use mangle_vtt_name for new ABI.
8579         (init_class_processing): Initialize local_classes.
8580         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8581         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8582         (std_identifier): New macro.
8583         (DECL_VOLATILE_MEMFUNC_P): New macro.
8584         (DECL_NAMESPACE_STD_P): Likewise.
8585         (local_classes): Declare.
8586         (get_mostly_instantiated_function_type): Declare.
8587         (init_mangle): Declare.
8588         (mangle_decl): Likewise.
8589         (mangle_type_string): Likewise.
8590         (mangle_type): Likewise.
8591         (mangle_typeinfo_for_type): Likewise.
8592         (mangle_typeinfo_string_for_type): Likewise.
8593         (mangle_vtbl_for_type): Likewise.
8594         (mangle_vtt_for_type): Likewise.
8595         (mangle_ctor_vtbl_for_type): Likewise.
8596         (mangle_thunk): Likewise.
8597         (mangle_conv_op_name_for_type): Likewise.
8598         (mangle_guard_variable): Likewise.
8599         * decl.c (pushtag): Keep track of local classes.
8600         (initialize_predefined_identifiers): Initialize std_identifier.
8601         (init_decl_processing): Use std_identifier.
8602         (start_decl): Don't treat instantiations as specializations.
8603         (grokdeclarator): Likewise.
8604         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
8605         name for fully-instantiated templates.
8606         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8607         destructors with the new ABI.
8608         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8609         (grokfield): Use mangle_type for new ABI.
8610         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8611         (get_sentry): Use mangle_guard_variable for new ABI.
8612         (start_static_initialization_or_destruction): Likewise.
8613         * expr.c (extract_aggr_init): Remove.
8614         (extract_scalar_init): Likewise.
8615         (extract_init): Remove #if 0'd code.
8616         * mangle.c: New function.
8617         * method.c (build_mangled_name): Assert not flag_new_abi.
8618         (build_static_name): Likewise.
8619         (build_decl_overload_real): Likewise.
8620         (build_typename_overload): Likewise.
8621         (build_overload_with_type): Likewise.
8622         (build_overload_name): Likewise.
8623         (get_ctor_vtbl_name): Likewise.
8624         (start_squangling): Likewise.
8625         (get_id_2): Likewise.
8626         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8627         (init_method): Call init_mangle for new ABI.
8628         (make_thunk): Call mangle_thunk for new ABI.
8629         * operators.def: Correct new ABI manglings for the `%' operator.
8630         Add `::' operator.
8631         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8632         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8633         (lookup_template_class): Call mangle_decl for new ABI.
8634         (get_mostly_instantiated_function_type): New function.
8635         (set_mangled_name_for_template_decl): Use it.
8636         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8637         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
8638         conversion op names.
8639         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8640         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8641         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
8642         mangle_typeinfo_string_for_type.
8643
8644 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
8645
8646         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8647         (INNERMOST_TEMPLATE_ARGS): New macro.
8648         (innermost_args): Remove.
8649         (get_innermost_template_args): New function.
8650         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8651         * error.c (dump_function_decl): Be caution when using
8652         most_general_template.
8653         * method.c (build_template_parm_names):  Use
8654         INNERMOST_TEMPLATE_ARGS.
8655         * pt.c (add_to_template_args): Tidy comment
8656         (get_innermost_template_args): New function.
8657         (check_explicit_specialization): Clear DECL_INITIAL for a new
8658         specialization.
8659         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8660         Tidy.
8661         (push_template_decl): Always register specializations of the most
8662         general template.
8663         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8664         (coerce_template_parms): Likewise.
8665         (lookup_template_class): Likewise.
8666         (innermost_args): Remove.
8667         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8668         (tsubst_decl): Handle tricky specializations.  Use
8669         get_innermost_template_args.
8670         (instantiate_template): Simplify handling of partial
8671         instantiations.
8672         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8673         (most_general_template): Reimplement, in a more straightforward
8674         manner.
8675         (regenerate_decl_from_template): Tweak formatting.  Use
8676         TMPL_ARGS_DEPTH for clarity.
8677         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8678
8679         * dump.c (dequeue_and_dump): Dump information about thunks.
8680
8681 2000-06-01  Richard Henderson  <rth@cygnus.com>
8682
8683         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8684
8685 2000-06-01  Richard Henderson  <rth@cygnus.com>
8686
8687         * decl2.c (unsupported_options): Fix typo, make const.
8688         (lang_decode_option): Fix bsearch argument order.
8689
8690 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
8691
8692         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8693         on FIELD_DECLs.
8694
8695 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8696
8697         * cp-tree.h (c_get_alias_set): Deleted.
8698         * Makefile.in (decl.o): Include ../expr.h.
8699         * decl.c (expr.h): Include.
8700         (init_decl_processing): Call record_component_aliases for arrays.
8701         (grokdeclarator): Likewise.
8702         Set TREE_ADDRESSABLE for fields that aren't bitfields.
8703         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8704
8705 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
8706
8707         Remove guiding declaration support.
8708         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8709         (flag_guiding_decls): Remove.
8710         * call.c (build_user_type_conversion_1): Remove support for
8711         guiding decls.
8712         (build_new_function_call): Likewise.
8713         (build_new_op): Likewise.
8714         (build_new_method_call): Likewise.
8715         * decl.c (start_function): Likewise.
8716         * friend.c (is_friend): Likewise.
8717         (do_friend): Likewise.
8718         * decl2.c ((flag_dump_translation_unit): Make it const.
8719         (flag_guiding_decls): Remove.
8720         (unsupported_options): New variable
8721         (compare_options): New function.
8722         (lang_decode_option): Use them.
8723
8724         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8725
8726         * method.c (mangle_expression): Adjust test for legal expression
8727         operators.
8728
8729         * pt.c (instantiate_decl): Save and restore the local
8730         specializations list.
8731
8732 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
8733
8734         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8735
8736 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
8737
8738         * call.c (add_template_candidate_real): Handle member template
8739         constructors for classes with virtual bases.
8740         (build_user_type_conversion_1): Use in_charge_arg_for_name.
8741         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8742
8743         * ir.texi: Update thunk documentation.
8744
8745         * call.c (joust): Fix handling of overloaded builtin operators.
8746
8747 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
8748
8749         * cp-tree.h (DECL_ANTICIPATED): New macro.
8750         Document new use of DECL_LANG_FLAG_7.
8751         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8752         in the user namespace.
8753         * lex.c (do_identifier): If the identifier's declaration has
8754         DECL_ANTICIPATED on, it has not yet been declared.  But do not
8755         replace it with an ordinary implicit declaration.
8756
8757         * tinfo2.cc: Include stdlib.h.
8758
8759 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
8760
8761         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8762         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8763         CLASSTYPE_ALIGN.
8764
8765 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8766
8767         * decl2.c (lang_decode_option): Use skip_leading_substring instead
8768         of plain strncmp.
8769
8770 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
8771
8772         * operators.def (<?): Duplicated, should have been...
8773         (>?): this.  Fixed.
8774
8775 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
8776             Mark Mitchell  <mark@codesourcery.com>
8777
8778         * cp-tree.h (ansi_opname): Make it a macro.
8779         (ansi_assopname): Likewise.
8780         (struct lang_decl_flags): Add assignment_operator_p.
8781         (struct lang_decl): Add operator_code.
8782         (DECL_VTT_PARM): Adjust.
8783         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8784         overloaded operator.
8785         (SET_OVERLOADED_OPERATOR_CODE): New macro.
8786         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8787         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8788         (opname_tab): Remove.
8789         (assignop_tab): Likewise.
8790         (operator_name_info_t): New type.
8791         (operator_name_info): New variable.
8792         (assignment_operator_name_info): Likewise.
8793         (build_cp_library_fn): Remove declaration.
8794         (push_cp_library_fn): Likewise.
8795         (operator_name_string): Likewise.
8796         (build_decl_overload): Likewise.
8797         * call.c (print_z_candidates): Simplify.
8798         (build_object_call): Adjust usage of ansi_opname.  Use
8799         DECL_OVERLOADED_OPERATOR_P.
8800         (op_error): Adjust operator name lookup.
8801         (build_conditional_expr): Adjust usage of ansi_opname.
8802         (build_new_op): Likewise.
8803         (build_op_delete_call): Likewise.
8804         (build_over_call): Likewise.
8805         (joust): Use DECL_OVERLOADED_OPERATOR_P.
8806         * decl.c (duplicate_decls): Copy operator_code.
8807         (init_decl_processing): Adjust parameters to push_cp_library_fn.
8808         (builtin_function): Adjust parameters to build_library_fn_1.
8809         (build_library_fn_1): Accept an overloaded operator code.
8810         (build_library_fn): Pass ERROR_MARK.
8811         (build_cp_library_fn): Accept an overloaded operator code.
8812         (push_cp_library_fn): Likewise.
8813         (grokfndecl): Tweak.
8814         (grokdeclarator): Simplify code to compute names of overloaded
8815         operators.  Adjust use of ansi_opname.
8816         (ambi_op_p): Work on tree_codes, not identifiers.
8817         (unary_op_p): Likewise.
8818         (grok_op_properties): Likewise.
8819         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8820         (lang_mark_tree): Don't try to mark the operator_code.
8821         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8822         * error.c (dump_decl): Remove special handling for operator
8823         names.
8824         (dump_function_name): Likewise.
8825         (dump_expr): Adjust name lookup of operators.
8826         (op_to_string): Simplify.
8827         (assop_to_string): Likewise.
8828         * init.c (build_new_1): Adjust use of ansi_opname.
8829         * lex.c (opname_tab): Remove.
8830         (assignop_tab): Likewise.
8831         (ansi_opname): Likewise.
8832         (ansi_assopname): Likewise.
8833         (operator_name_string): Likewise.
8834         (reinit_lang_specific): Likewise.
8835         (operator_name_info): New variable.
8836         (assignment_operator_name_info): Likewise.
8837         (init_operators): New function.
8838         (init_parse): Use it.
8839         (do_identifier): Adjust use of ansi_opname.
8840         * method.c (mangle_expression): Don't use ansi_opname for
8841         mangling.
8842         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8843         (build_decl_overload): Remove.
8844         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8845         (do_build_assign_ref): Adjust use of ansi_opname.
8846         (synthesize_method): Likewise.
8847         (implicitly_declare_fn): Likewise.
8848         * operators.def: New file.
8849         * parse.y (operator): Adjust use of ansi_opname.
8850         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8851         (set_mangled_name_for_template_decl): Don't play games with
8852         current_namespace.
8853         (special_function_p): Adjust use of ansi_opname.
8854         * typeck.c (check_return_expr): Likewise.
8855         * Make-lang.in (cc1plus): Depend on operators.def.
8856         * Makefile.in (lex.o): Likewise.
8857         (decl.o): Likewise.
8858
8859 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
8860
8861         * Make-lang.in (cplib2.ready): Eradicate.
8862
8863 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8864
8865         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8866         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8867         (built_min, cp_tree_equal): Likewise.
8868
8869 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8870
8871         * class.c (layout_nonempty_base_or_field): Replace
8872         `record_layout_info' with `record_layout_info_s'.
8873
8874 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
8875
8876         Fix goto checking.
8877         * cp-tree.h (struct language_function): x_named_labels is now
8878         a struct named_label_list*.
8879         * decl.c (struct named_label_use_list): Renamed from...
8880         (struct named_label_list): ...this.  New struct.
8881         (push_binding_level): Don't set eh_region.
8882         (note_level_for_eh): New fn.
8883         (pop_label): Take label and old value directly.
8884         (pop_labels): Adjust for new named_labels format.
8885         (lookup_label): Likewise.
8886         (poplevel): Note characteristics of a binding level containing a
8887         named label.  Mess with named label lists earlier.
8888         (mark_named_label_lists): New fn.
8889         (mark_lang_function): Call it.
8890         (use_label): New fn, split out from...
8891         (make_label_decl): ...here.  Don't call it.
8892         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8893         check_previous_gotos): New fns, split out from...
8894         (define_label): ...here.
8895         (check_switch_goto): New fn.
8896         (define_case_label): Call it.
8897         (check_goto): New fn.
8898         * semantics.c (finish_goto_stmt): Call it and use_label.
8899         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8900         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8901
8902 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8903
8904         * class.c (build_vtable_entry_ref): Correct usage of
8905         get_vtbl_decl_for_binfo.
8906
8907         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8908         * method.c (implicitly_declare_fn): Not here.
8909
8910 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8911
8912         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8913         (CPTI_PTMD_DESC_TYPE): ... here.
8914         (ptmd_desc_type_node): Rename to ...
8915         (ptm_desc_type_node): ... here.
8916         * decl.c: Likewise.
8917         * rtti.c (ptmd_initializer): Rename to ...
8918         (ptm_initializer): ... here.
8919         (sythesize_tinfo_var): Adjust. Deal with pointer to member
8920         function.
8921         (create_tinfo_types): Adjust.
8922
8923 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
8924
8925         Finish implementation of VTTs.
8926         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8927         CPTI_VTT_PARM_IDENTIFIER.
8928         (vtt_parm_identifier): New macro.
8929         (vtt_parm_type): Likewise.
8930         (BINFO_SUBVTT_INDEX): Likewise.
8931         (BINFO_VPTR_INDEX): Likewise.
8932         (struct lang_decl): Add vtt_parm.
8933         (DECL_VTT_PARM): New macro.
8934         (DECL_USE_VTT_PARM): Likewise.
8935         (DECL_NEEDS_VTT_PARM_P): Likewise.
8936         (get_vtt_name): Declare.
8937         (build_artificial_parm): Likewise.
8938         (fixup_all_virtual_upcast_offsets): Likewise.
8939         (expand_indirect_vtbls_init): Remove.
8940         * call.c (build_new_method_call): Pass the vtt to subobject
8941         constructors and destructors.
8942         * class.c (get_vtt_name): Give it external linkage.
8943         (build_clone): Handle the magic VTT parameters for clones.
8944         (clone_function_decl): Fix typo in comment.
8945         (build_vtt): Keep track of the indices in the VTTs where various
8946         entities are stored.
8947         (build_vtt_inits): Likewise.
8948         (dfs_build_vtt_inits): Likewise.
8949         (build_ctor_vtbl_group): Tweak type of construction vtables.
8950         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8951         primary bases, when building construction vtables.
8952         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8953         (initialize_predefined_identifiers): Add vtt_parm_identifier.
8954         (init_decl_processing): Initialize vtt_parm_type.
8955         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8956         (lang_mark_tree): Make vtt_parm.
8957         * decl2.c (build_artificial_parm): New function.
8958         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
8959         (grokclassfn): Use build_artificial_parm.
8960         * init.c (initialize_vtbl_ptrs): Call
8961         fixup_all_virtual_upcast_offsets directly.
8962         (perform_member_init): Use the complete subobject destructor for
8963         member cleanups.
8964         (build_vtbl_address): New function.
8965         (expand_virtual_init): Handle VTTs.
8966         * optimize (maybe_clone_body): Likewise.
8967         * search.c (fixup_all_virtual_upcast_offsets): Give it external
8968         linkage.
8969         (expand_indirect_vtbls_init): Remove.
8970         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8971         * tree.c (make_binfo): Make them bigger.
8972
8973 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8974
8975         * inc/cxxabi.h (__pbase_type_info): Define, based on
8976         __pointer_type_info.
8977         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8978         (__pointer_to_member_type_info): Likewise.
8979         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8980         (__pointer_to_member_type_info::__is_pointer_p): Remove.
8981         (__pointer_type_info::__do_catch): Rename to ...
8982         (__pbase_type_info::__do_catch): ... here. Adjust.
8983         (__pbase_type_info::__pointer_catch): Implement.
8984         (__pointer_type_info::__pointer_catch): Adjust.
8985         (__pointer_to_member_type_info::__pointer_catch): Adjust.
8986
8987 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8988
8989         * tinfo.h (__user_type_info::contained_virtual_p): New
8990         predicate.
8991         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8992         shaped hierarchy.
8993         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8994         diamond shaped hierarchy. Add early out for mixed diamond and
8995         duplicate shaped hierarchy.
8996
8997 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
8998
8999         * cp-tree.h (build_delete): Change prototype.
9000         (build_vec_delete): Likewise.
9001         * call.c (build_scoped_method_call): Use special_function_kind
9002         values to indicate the kind of destruction to be done.
9003         (build_method_call): Likewise.
9004         * decl.c (finish_destructor_body): Likewise.
9005         (maybe_build_cleanup_1): Likewise.  Rename to ...
9006         (maybe_build_cleanup): ... this.
9007         * decl2.c (delete_sanity): Use special_function_kind
9008         values to indicate the kind of destruction to be done.
9009         (build_cleanup): Likewise.
9010         * init.c (perform_member_init): Likewise.
9011         (build_vec_delete_1): Likewise.
9012         (build_dtor_call): Simplify.
9013         (build_delete): Use special_function_kind
9014         values to indicate the kind of destruction to be done.
9015         (build_vbase_delete): Likewise.
9016         (build_vec_delete): Likewise.
9017
9018         * init.c (sort_member_init): Fix typo in error message generation
9019         code.
9020
9021 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
9022
9023         * semantics.c (begin_class_definition): make the packed
9024         attribute be sensitive to the "-fpack-struct" command line flag
9025
9026 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
9027
9028         Update new-abi upcast algorithm.
9029         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
9030         prototype and meaning of return value.
9031         (__si_class_type_info::__do_upcast): Likewise.
9032         (__vmi_class_type_info::__do_upcast): Likewise.
9033         * tinfo.cc (__class_type_info::__upcast_result): Replace
9034         whole2dst with part2dst. Adjust ctor.
9035         (__class_type_info::__do_upcast): Adjust call of worker function.
9036         (__class_type_info::__do_upcast): Adjust.
9037         (__si_class_type_info::__do_upcast): Adjust. Use parent's
9038         __do_upcast.
9039         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
9040         virtual base in diamond hierarchy bug.
9041
9042 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
9043
9044         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
9045         and bitfield to tinfo_fn_p.
9046         (DECL_TINFO_FN_P): Adjust.
9047         (SET_DECL_TINFO_FN_P): Likewise.
9048         (DECL_MUTABLE_P): Likewise.
9049         (DECL_C_BIT_FIELD): Likewise.
9050         (SET_DECL_C_BIT_FIELD): Likewise.
9051         (CLEAR_DECL_C_BIT_FIELD): Likewise.
9052         (DECL_UNINLINABLE): Likewise.
9053         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
9054         (handle_using_decl): Remove assertion.
9055         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
9056         to build FIELD_DECLs.
9057         (build_base_field): Likewise.
9058         (layout_class_type): Likewise.
9059         * decl.c (init_decl_processing): Likewise.
9060         (build_ptrmemfunc_type): Likewise.
9061         (grokdeclarator): Likewise.
9062         * decl2.c (grok_x_components): Likewise.
9063         * except.c (call_eh_info): Likewise.
9064         * init.c (init_init_processing): Likewise.
9065         * rtti.c (expand_class_desc): Likewise.
9066         (create_pseudo_type_info): Likewise.
9067         (get_vmi_pseudo_type_info): Likewise.
9068         (create_tinfo_types): Likewise.
9069         * ptree.c (print_lang_decl): Adjust.
9070         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
9071         before checking DECL_MUTABLE_P.
9072
9073         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
9074         parameters for template functions.
9075         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
9076         destructors as well as constructors.
9077
9078 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
9079
9080         * class.c (build_ctor_vtbl_group): Set inits.
9081         * optimize.c (maybe_clone_body): Set DECL_INLINE and
9082         DECL_THIS_INLINE appropriately for clones.
9083
9084         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
9085         (DECL_CONV_FN_P): Simplify.
9086         (DECL_OPERATOR): Remove.
9087         (language_to_string): Declare.
9088         * decl.c (duplicate_decls): Fix typo in comment.
9089         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
9090         (grok_op_properties): Use DECL_CONV_FN_P instead of
9091         IDENTIFIER_TYPENAME_P.
9092         * dump.c (dequeue_and_dump): Dump the language linkage of
9093         declarations.
9094         * error.c (language_to_string): Give it external linkage.
9095         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
9096         (implicitly_declare_fn): Set DECL_LANGUAGE.
9097         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
9098         IDENTIFIER_TYPENAME_P.
9099         (tsubst_decl): Likewise.
9100         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
9101         * semantics.c (finish_member_declaration): Don't mark members of
9102         classes declared in an extern "C" region as extern "C".
9103
9104 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9105
9106         * decl2.c (qualified_lookup_using_namespace): Look through
9107         namespace aliases.
9108
9109         * decl.c (push_using_decl): Return the old decl on namespace level.
9110
9111 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
9112
9113         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
9114         (VTT_NAME_PREFIX): New macro.
9115         (CTOR_VTBL_NAME_PREFIX): Likewise.
9116         (get_ctor_vtbl_name): New function.
9117         * class.c (get_vtable_name): Simplify.
9118         (get_vtt_name): New function.
9119         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
9120         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
9121         when a virtual base becomes primary.
9122         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
9123         VTTs.
9124         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
9125         additional parameters.
9126         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
9127         (initialize_array): New function.
9128         (build_vtt): Likewise.
9129         (build_vtt_inits): Likewise.
9130         (dfs_build_vtt_inits): Likewise.
9131         (dfs_fixup_binfo_vtbls): Likewise.
9132         (build_ctor_vtbl_group): Likewise.
9133         (initialize_vtable): Use initialize_array.
9134         (accumulate_vtbl_inits): Reimplement to handle construction
9135         vtables.
9136         (dfs_accumulate_vtbl_inits): Likewise.
9137         (bulid_vtbl_initializer): Adjust parameter name.
9138         * method.c (build_typename_overload): Remove #if 0'd code.
9139         (get_ctor_vtbl_name): New function.
9140         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
9141         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
9142
9143         * cp-tree.h (struct lang_type): Remove search_slot.
9144         (CLASSTYPE_SEARCH_SLOT): Remove.
9145         (emit_base_init): Change prototype.
9146         (initialize_vtbl_ptrs): Likewise.
9147         (expand_indirect_vtbls_init): Likewise.
9148         (clear_search_slots): Remove.
9149         * decl.c (lang_mark_tree): Don't mark search_slot.
9150         * init.c (initialize_vtbl_ptrs): Simplify.
9151         (emit_base_init): Likewise.
9152         * search.c (struct vbase_info): Document decl_ptr.
9153         (convert_pointer_to_single_level): Remove.
9154         (dfs_find_vbases): Remove.
9155         (dfs_init_base_pointers): Simplify.
9156         (dfs_clear_vbase_slots): Remove.
9157         (dfs_vtable_path_unmark): New function.
9158         (init_vbase_pointers): Simplify.
9159         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
9160         (expand_indirect_vtbls_init): Simplify.  Don't call
9161         mark_all_temps_used.
9162         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
9163         initialize_vtbl_ptrs.
9164
9165 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
9166
9167         * except.c: Add static prototypes.
9168
9169 2000-05-20  H.J. Lu  <hjl@gnu.org>
9170
9171         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9172
9173 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
9174
9175         Don't create a separate copy of virtual bases for the
9176         CLASSTYPE_VBASECLASSES list.
9177         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
9178         (BINFO_FOR_VBASE): Remove.
9179         (CANONICAL_BINFO): Adjust.
9180         (binfo_for_vbase): New function.
9181         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
9182         instead of BINFO_FOR_VBASE.
9183         (build_vbase_pointer): Likewise.
9184         (build_secondary_vtable): Likewise.
9185         (dfs_mark_primary_bases): Likewise.
9186         (mark_primary_bases): Likewise.
9187         (layout_nonempty_base_or_field): Likewise.
9188         (dfs_set_offset_for_shared_vbases): Likewise.
9189         (dfs_set_offset_for_unshared_vbases): Likewise.
9190         (layout_virtual_bases): Likewise.  Adjust for changes to the
9191         CLASSTYPE_VBASECLASSES list.
9192         (dump_class_hierarchy_r): Use binfo_for_vbase
9193         instead of BINFO_FOR_VBASE.
9194         (dump_class_hierarchy): Likewise.
9195         (finish_vtbls): Likewise.
9196         (build_vtbl_initializer): Adjust for changes to the
9197         CLASSTYPE_VBASECLASSES list.
9198         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
9199         * decl.c (finish_destructor_body): Adjust for changes to the
9200         CLASSTYPE_VBASECLASSES list.
9201         * init.c (sort_base_init): Use binfo_for_vbase.
9202         (construct_virtual_bases): Adjust for changes to the
9203         CLASSTYPE_VBASECLASSES list.
9204         (expand_member_init): Use binfo_for_vbase.
9205         (build_vbase_delete):  Adjust for changes to the
9206         CLASSTYPE_VBASECLASSES list.
9207         * method.c (do_build_copy_constructor): Likewise.
9208         * rtti.c (get_base_offset): Use binfo_for_vbase.
9209         (expand_class_desc): Remove #if 0'd code.
9210         * search.c (struct vbase_info): Remove vbase_types.
9211         (get_base_distance):  Use binfo_for_vbase.
9212         (lookup_field_queue_p): Use CANONICAL_BINFO.
9213         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
9214         (get_pure_virtuals): Adjust for changes to the
9215         CLASSTYPE_VBASECLASSES list.
9216         (dfs_find_vbases): Use binfo_for_vbase.
9217         (dfs_init_vbase_pointers): Likewise.
9218         (init_vbase_pointers): Don't initialize vi.vbase_types.
9219         (virtual_context): Use binfo_for_vbase.
9220         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
9221         CLASSTYPE_VBASECLASSES list.
9222         (expand_indirect_vtbls_init): Simplify.
9223         (dfs_get_vbase_types): Don't replicate virtual bases.
9224         (find_vbase_instance): Use binfo_for_vbase.
9225         (binfo_for_vbase): New function.
9226         * typeck.c (get_delta_difference): Use binfo_for_vbase.
9227
9228 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
9229
9230         * decl2.c (finish_anon_union): Generalize error messages to handle
9231         anonymous structures.
9232         * init.c (perform_member_init): Remove `name' parameter.
9233         (build_field_list): New function.
9234         (sort_member_init): Handle anonymous union initialization order
9235         correctly.  Check for multiple initializations of the same union.
9236         (emit_base_init): Don't look up fields by name here.
9237         (expand_member_init): Record the result of name lookup for future
9238         reference.
9239         * typeck.c (build_component_ref): Fix formatting.
9240
9241 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
9242
9243         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
9244         * typeck.c (build_x_compound_expr): Replace warn_unused with
9245         warn_unused_value.
9246
9247         * decl2.c (lang_decode_option): Update -Wall unused flags by
9248         calling set_Wunused.
9249
9250 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
9251
9252         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
9253         * init.c (dfs_vtable_path_unmark): Remove.
9254         * search.c (marked_new_vtable_p): Likewise.
9255         (unmarked_new_vtable_p): Likewise.
9256         (dfs_search_slot_nonempty_p): Likewise.
9257         (dfs_mark): Likewise.
9258         (dfs_vtable_path_unmark): Likewise.
9259         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
9260         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
9261         (dfs_init_vbase_pointers): Remove special-case new ABI code.
9262         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
9263         (init_vbase_pointers): Simplify.
9264         (expand_indirect_vtbls_init): Likewise.
9265
9266         * class.c (copy_virtuals): New function.
9267         (build_primary_table): Use it.
9268         (build_secondary_vtable): Likewise.
9269         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
9270         indicate that no vcall offset is required.
9271         (add_virtual_function): Likewise.
9272         (modify_all_vtables): Likewise.
9273         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9274         (dfs_accumulate_vtbl_inits): Likewise.
9275         (build_vtbl_initializer): Make changes to handle construction
9276         vtables.
9277         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9278         (build_rtti_vtbl_entries): Likewise.
9279         (build_vtable_entries): Handle a NULL vcall_index.
9280
9281 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9282
9283         * decl2.c (lang_decode_option): Fix thinko.
9284
9285 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
9286
9287         * except.c (check_handlers): New fn.
9288         * cp-tree.h: Declare it.
9289         * semantics.c (finish_handler_sequence): Call it.
9290         (finish_function_handler_sequence): Likewise.
9291         (finish_handler_parms): Set TREE_TYPE on the handler.
9292         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
9293         * search.c (get_base_distance_recursive): If protect>1, ignore
9294         special access.
9295         (get_base_distance): Don't reduce watch_access.
9296
9297 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
9298
9299         * lex.c: #include diagnostic.h.
9300         (lang_init_options): Set default prefixing rules.
9301
9302         * lang-options.h: Add -fdiagnostics-show-location=.
9303
9304         * decl2.c: #include diagnostic.h.
9305         (lang_decode_option): Handle -fdiagnostics-show-location=.
9306
9307 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
9308
9309         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
9310         * vec.cc: Revert my 2000-05-07 change.
9311
9312 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
9313
9314         * class.c (check_field_decls): Complain about non-static data
9315         members with same name as class in class with constructor.
9316
9317 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
9318
9319         * decl.c (grokdeclarator): Allow non-static data members with
9320         same name as class.
9321
9322 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9323
9324         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
9325         and pending_inline.filename.  Update prototypes.
9326         * decl.c (define_label): Constify filename parameter.
9327         * decl2.c (warn_if_unknown_interface): Constify local char *.
9328         * input.c Constify input_source.filename. Don't declare
9329         input_filename or lineno.  Constify filename parameter to feed_input.
9330         * lex.c (init_parse): Constify parameter and return value.
9331         (cp_pragma_interface, cp_pragma_implementation): Constify
9332         filename argument.
9333         (reinit_parse_for_method, reinit_parse_for_block,
9334         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
9335         Constify local char *.
9336         * pt.c: Don't declare lineno or input_filename.
9337         (print_template_context, tsubst_friend_function, tsubst_decl,
9338         tsubst, instantiate_decl): Constify local char *.
9339         * semantics.c (expand_body): Constify local char *.
9340         * tree.c (build_srcloc): Constify filename parameter.
9341         * typeck.c (c_expand_asm_operands): Constify filename
9342         parameter.
9343
9344 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
9345
9346         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
9347         offsetof expansion.
9348
9349 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
9350
9351         * inc/cxxabi.h:  Fix typos in comment.
9352         (__base_class_info::__offset): Use a static_cast.
9353
9354 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
9355
9356         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
9357         of std::size_t and std::ptrdiff_t respectively.
9358         * tinfo.cc: Likewise.
9359         * vec.cc: Likewise.
9360
9361 2000-05-06  Richard Henderson  <rth@cygnus.com>
9362
9363         * typeck.c (build_c_cast): Don't warn integer->pointer size
9364         mismatch for constants.
9365
9366 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
9367
9368         * rtti.c (ptmd_initializer): Set non-public, if class is
9369         incomplete.
9370
9371         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
9372         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9373         __cxa_vec_delete): Likewise.
9374         * tinfo.cc (__dynamic_cast): Likewise.
9375         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9376         __cxa_vec_delete): Likewise.
9377
9378 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9379
9380         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
9381         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
9382         (lang_decl_flags): Add vcall_offset.
9383         (THUNK_VCALL_OFFSET): Use it.
9384         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
9385         * method.c (make_thunk): Create the lang_decl here, not in
9386         emit_thunk.
9387         (emit_thunk): Make generic thunks into ordinary functions once
9388         they have been fed to expand_body.
9389         * semantics.c (expand_body): Set current_function_is_thunk here.
9390
9391 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9392
9393         * class.c (update_vtable_entry_for_fn): Prototype.
9394
9395         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9396         and `tmpl'.
9397
9398         * search.c (dfs_build_inheritance_graph_order): Prototype.
9399
9400 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9401
9402         * cp-tree.h (special_function_kind): Add various kinds of
9403         destructors.
9404         (special_function_p): New function.
9405         * class.c (overrides): Don't let one kind of destructor override
9406         another.
9407         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9408         whether or not to instantiate a template.
9409         * tree.c (special_function_p): Define.
9410
9411 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
9412
9413         * cp-tree.def (THUNK_DECL): Remove.
9414         * cp-tree.h (DECL_THUNK_P): New macro.
9415         (DECL_NON_THUNK_FUNCTION_P): Likewise.
9416         (DECL_EXTERN_C_FUNCTION_P): Likewise.
9417         (SET_DECL_THUNK_P): Likewise.
9418         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9419         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9420         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9421         * decl.c (decls_match): Use DECL_EXTERN_C_P.
9422         (duplicate_decls): Likewise.
9423         (pushdecl): Likewise.  Adjust thunk handling.
9424         (grokfndecl): Use DECL_EXTERN_C_P.
9425         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9426         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9427         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9428         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
9429         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
9430         DECL_NO_STATIC_CHAIN.
9431         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
9432         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
9433         * search.c (covariant_return_p): Remove THUNK_DECL handling.
9434         * ir.texi: Update.
9435
9436 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9437
9438         * tree.c (walk_tree): Set lineno.
9439
9440 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9441
9442         * exception.cc: Update license notice.
9443         * new.cc: Likewise.
9444         * new1.cc: Likewise.
9445         * new2.cc: Likewise.
9446         * tinfo.cc: Likewise.
9447         * tinfo2.cc: Likewise.
9448         * vec.cc: Likewise.
9449         * inc/cxxabi.h: Likewise.
9450         * inc/exception: Likewise.
9451         * inc/new: Likewise.
9452         * inc/new.h: Likewise.
9453         * inc/typeinfo: Likewise.
9454
9455 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9456
9457         * tree.c (build_target_expr_with_type): If we already have a
9458         TARGET_EXPR, just return it.
9459
9460         * optimize.c (initialize_inlined_parameters): Don't generate an
9461         EXPR_STMT if we can just use DECL_INITIAL.
9462         * decl.c (emit_local_var): Only make the initialization a
9463         full-expression if stmts_are_full_exprs_p.
9464
9465 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9466
9467         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9468         macro.
9469         * call.c (standard_conversion): Use it.
9470         (direct_reference_binding): Likewise.
9471         (build_over_call): Likewise.
9472         (is_properly_derived_from): Likewise.
9473         (compare_ics): Likewise.
9474         * class.c (resolves_to_fixed_type_p): Likewise.
9475         * optimize.c (declare_return_variable): Likewise.
9476         * pt.c (is_specialization_of): Likewise.
9477         (unify): Likewise.
9478         * typeck.c (comp_target_parms): Likeiwse.
9479         (build_static_cast): Likewise.
9480         (build_reinterpret_cast): Likewise.
9481         (build_const_cast): Likewise.
9482         (comp_ptr_ttypes_real): Likewise.
9483         (comp_ptr_ttypes_const): Likewise.
9484         * typeck2.c (process_init_constructor): Likewise.
9485
9486 2000-04-30  Scott Snyder <snyder@fnal.gov>
9487
9488         * decl.c (finish_destructor_body): Use the base destructor when
9489         destroying virtual bases.
9490
9491 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
9492
9493         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9494         STMT_EXPRs.
9495         * optimize.c (struct inline_data): Add target_exprs field.
9496         (declare_return_variable): When a function returns an aggregate,
9497         use the variable declared in the TARGET_EXPR as the remapped
9498         DECL_RESULT.
9499         (expand_call_inline): Update the pending target_exprs stack.
9500         (optimize_function): Initialize the stack.
9501
9502         * decl2.c (finish_file): Fix typo in comment.
9503
9504         * method.c (emit_thunk): Don't try to return a `void' value.
9505
9506         * optimize.c (initialize_inlined_parameters): If the parameter is
9507         addressable, we need to make a new VAR_DECL, even if the
9508         initializer is constant.
9509
9510 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
9511
9512         * decl.c (grok_op_properties): Add an extra check of argtypes.
9513
9514 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
9515
9516         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9517         variables.
9518         (initialize_inlined_parameters): Try to avoid creating new
9519         VAR_DECLs.
9520
9521 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
9522
9523         * lex.c (my_get_run_time): Remove.
9524         (init_filename_times): Use get_run_time instead of my_get_run_time.
9525         (check_newline): Likewise.
9526         (dump_time_statistics): Likewise.
9527         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9528         of computing elapsed time explicitly.
9529
9530 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
9531
9532         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9533         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9534         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9535         before calling decl_constant_value.
9536         * class.c (check_bitfield_decl): Likewise.
9537         * cvt.c (ocp_convert): Likewise.
9538         (convert): Likewise.
9539         * decl.c (compute_array_index_type): Likewise.
9540         (build_enumerator): Likewise.
9541         * decl2.c (check_cp_case_value): Likewise.
9542         * pt.c (convert_nontype_argument): Likewise.
9543         (tsubst): Likewise.
9544         * typeck.c (decay_conversion): Likewise.
9545         (build_compound_expr): Likewise.
9546         (build_reinterpret_cast): Likewise.
9547         (build_c_cast): Likewise.
9548         (convert_for_assignment): Likewise.
9549
9550 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
9551
9552         * decl.c (finish_function): Don't play games with DECL_INLINE.
9553
9554 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
9555
9556         * ir.texi: Correct typo.
9557
9558 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9559
9560         * decl.c (grokdeclarator): Reject VLAs as members.
9561
9562 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
9563
9564         * call.c (standard_conversion): Accept conversion between
9565         COMPLEX_TYPEs.
9566
9567         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9568
9569 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
9570
9571         * decl2.c (finish_file): Remove double setup for accounting
9572         compile time.
9573
9574 2000-04-24  Robert Lipe <robertlipe@usa.net>
9575
9576         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9577
9578 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
9579
9580         * new.cc (set_new_handler): Needs to be in std::.
9581
9582 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
9583
9584         * cp-tree.h (lang_decl): Remove pretty_function_p.
9585         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9586         language-specific node.
9587         * decl.c (cp_make_fname_decl): Use build_decl, not
9588         build_lang_decl, to build the variables.
9589         (grokvardecl): Don't call build_lang_decl for local variables in
9590         templates.
9591         (grokdeclarator): Don't call build_lang_decl for local type
9592         declarations in templates.
9593         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9594         zero'd memory, rather than calling memset.
9595         * pt.c: Include hashtab.h.
9596         (local_specializations): New variable.
9597         (retrieve_local_specialization): Use it.
9598         (register_local_specialization): Likewise.
9599         (tsubst_decl): Don't assume local variables have
9600         DECL_LANG_SPECIFIC.
9601         (instantiate_decl): Set up local_specializations.
9602         * Makefile.in (HTAB_H): New variable.
9603
9604 2000-04-23  Richard Henderson  <rth@cygnus.com>
9605
9606         * typeck.c (c_expand_asm_operands): Restore the original
9607         contents of the output list.
9608
9609 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
9610
9611         * ir.texi:  Document complex number representation.
9612
9613 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9614
9615         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9616         (target_incomplete_p): New function.
9617         (tinfo_base_init): Create comdat NTBS name variable.
9618         (ptr_initializer): Add non_public parameter. Calculate it.
9619         (ptmd_initializer): Likewise.
9620         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9621         (create_real_tinfo_var): Add non_public parameter. Use it.
9622         Push proxy into global namespace.
9623         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9624         New enumeration.
9625         * inc/typeinfo (type_info::before, type_info::operator==):
9626         Compare __name addresses.
9627
9628         * tinfo2.cc: Remove new-abi builtins comment.
9629
9630 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
9631
9632         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9633
9634         * call.c (joust): Exit early if we get the same function, too.
9635
9636         * decl2.c (key_method): Return NULL_TREE for template classes.
9637         (import_export_class): Don't need to check for template classes.
9638
9639 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
9640
9641         * lex.c: Remove references to cccp.c.
9642
9643 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
9644
9645         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9646         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
9647         (DECL_DESTRUCTOR_P): Use destructor_attr.
9648         (DECL_CONST_MEMFUNC_P): Reimplement.
9649         (DECL_VOLATILE_MEMFUNC_P): Remove.
9650         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9651         (overrides): Use DECL_DESTRUCTOR_P.
9652         (check_for_override): Likewise.
9653         * decl.c (start_function): Likewise.
9654         * decl2.c (grokfclassfn): Likewise.
9655         (check_classfn): Likewise.
9656         (grok_function_init): Likewise.
9657
9658 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
9659
9660         * decl2.c (grokfield): Issue error on illegal data member
9661         declaration.
9662
9663 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
9664
9665         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9666
9667 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
9668
9669         * class.c (build_vtable_entry): Don't build thunks for type-info
9670         functions.
9671
9672 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
9673
9674         * decl.c (decls_match): Allow a redeclaration of a builtin to
9675         specify args while the builtin did not.
9676
9677 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
9678
9679         * cp-tree.def (THUNK_DECL): Add to documentation.
9680         * cp-tree.h (flag_huge_objects): Declare.
9681         * class.c (modify_vtable_entry): Tidy.
9682         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9683         Calculate delta appropriately for the new ABI.
9684         (dfs_modify_vtables): Use it.
9685         (modify_all_vtables): Fix thinko in code to add overriding copies
9686         of functions to primary vtables.
9687         (build_clone): Fix typo in comment.
9688         (clone_function_decl): Correct order of destructors in vtable.
9689         (build_vbase_offset_vtbl_entries): Adjust comment.
9690         (dfs_vcall_offset_queue_p): Remove.
9691         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9692         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9693         (build_vtable_entry): Correct check for pure virtual functions.
9694         Don't declare flag_huge_objects.
9695         * decl.c (flag_huge_objects): Remove declaration.
9696         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9697         Use int_size_in_bytes.
9698         (emit_thunk): Handle vcall offset thunks.
9699
9700 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9701
9702         * decl2.c (parse_time, varconst_time): Delete declarations.
9703         (finish_file): Delete LINENO declaration.
9704         START_TIME and THIS_TIME now long.
9705
9706 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
9707
9708         * class.c (build_base_field): Reformat comment.
9709
9710         * inc/cxxabi.h (stddef.h): Comment inclusion.
9711         (__base_class_info::__offset): Comment shift.
9712
9713 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
9714
9715         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9716         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9717         (cp_push_exception_identifier): New macro.
9718         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9719         (DECL_BASE_DESTRUCTOR_P): Likewise.
9720         (DECL_DELETING_DESTRUCTOR_P): Likewise.
9721         (get_vtbl_decl_for_binfo): Fix formatting.
9722         (in_charge_arg_for_name): New macro.
9723         (maybe_build_cleanup_and_delete): Remove declaration.
9724         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9725         (in_charge_arg_for_name): New function.
9726         (build_new_method_call): Use it.  Handle cloned destructors.
9727         (build_clone): Don't make the base constructor virtual.
9728         Automatically defer generated functions.
9729         (clone_function_decl): Handle destructors, too.
9730         (clone_constructors_and_destructors): Likewise.
9731         (create_vtable_ptr): Don't create a vtable entry for a cloned
9732         function.
9733         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9734         (initialize_predefined_identifiers): Update appropriately.
9735         (finish_destructor_body): Simplify.
9736         (maybe_build_cleanup_and_delete): Remove.
9737         * except.c (expand_throw): Handle new-ABI destructors.
9738         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9739         (build_dtor_call): New function.
9740         (build_delete): Use it.  Simplify.
9741         * optimize.c (maybe_clone_body): Handle destructors.
9742         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9743
9744         * exception.cc (cleanup_fn): New typedef.
9745         (CALL_CLEANUP): New macro.
9746         (cp_eh_info): Use them.
9747         (__cp_push_exception): Likewise.
9748         (__cp_pop_exception): Likewise.
9749
9750 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
9751
9752         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9753         (complete_dtor_identifier): New macro.
9754         (CLASSTYPE_FIRST_CONVERSION): Remove.
9755         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9756         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9757         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9758         (CLASSTYPE_CONSTRUCTORS): Likewise.
9759         (CLASSTYPE_DESTRUCTORS): Likewise.
9760         (lang_decl): Add cloned_function.
9761         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9762         (DECL_BASE_CONSTRUCTOR_P): Likewise.
9763         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9764         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9765         (DECL_CLONED_FUNCTION_P): Likewise.
9766         (DECL_CLONED_FUNCTION): Likewise.
9767         (clone_function_decl): Declare.
9768         (maybe_clone_body): Likewise.
9769         * call.c (build_user_type_conversion_1): Call complete object
9770         constructors in the new ABI.
9771         (build_new_method_call): Don't add in-charge parameters under the
9772         new ABI.
9773         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9774         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9775         CLASSTYPE_DESTRUCTOR_SLOT.
9776         (build_clone): New function.
9777         (clone_function_decl): Likewise.
9778         (clone_constructors_and_destructors): Likewise.
9779         (check_bases_and_members): Use it.
9780         * decl.c (iniitialize_predefined_identifiers): Initialize
9781         complete_dtor_identifier.
9782         (finish_function): Don't add extra code to a clone.
9783         (lang_mark_tree): Mark cloned_function.
9784         * decl2.c (mark_used): Don't bother trying to instantiate things
9785         we synthesized.
9786         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9787         * method.c (set_mangled_name_for_decl): Don't treat clones as
9788         constructors.
9789         (synthesize_method): Sythesize cloned functions, not the clones.
9790         * optimize.c (inline_data): Update comment on ret_label.
9791         (remap_block): Don't assume DECL_INITIAL exists.
9792         (copy_body_r): Allow ret_label to be NULL.
9793         (maybe_clone_body): Define.
9794         * pt.c (tsubst_decl): Handle clones.
9795         (instantiate_clone): New function.
9796         (instantiate_template): Use it.
9797         (set_mangled_name_for_template_decl): Don't treat clones as
9798         constructors.
9799         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9800         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9801         * semantics.c (expand_body): Clone function bodies as necessary.
9802
9803         * optimize.c (remap_decl): Avoid sharing structure for arrays
9804         whose size is only known at run-time.
9805         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9806
9807         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9808         to has_in_charge_parm_p.
9809         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9810         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9811         (DECL_COPY_CONSTRUCTOR_P): New macro.
9812         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9813         (build_user_type_conversion_1): Likewise.
9814         (convert_like_real): Likewise.
9815         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
9816         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9817         (copy_args_p): Likewise.
9818         (grok_ctor_properties): Likewise.
9819         (start_function): Likewise.
9820         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
9821         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9822         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9823         * method.c (do_build_copy_constructor): Use
9824         DECL_HAS_IN_CHARGE_PARM_P.
9825         (synthesize_method): Likewise.
9826         * pt.c (instantiate_template): Remove goto.
9827         * tree.c (build_cplus_method_type): Remove mention of obstacks in
9828         comment.
9829
9830         * cp-tre.h (finish_function): Change prototype.
9831         * decl.c (end_cleanup_fn): Adjust caller.
9832         (finish_function): Take only one parameter.
9833         * decl2.c (finish_objects): Adjust caller.
9834         (finish_static_storage_duration_function): Likewise.
9835         * method.c (emit_thunk): Likewise.
9836         * parse.y: Likewise.
9837         * parse.c: Regenerated.
9838         * pt.c (instantiate_decl): Likewise.
9839         * rtti.c (synthesize_tinfo_fn): Likewise.
9840         * semantics.c (expand_body): Likewise.
9841
9842         * cp-tree.h (copy_decl): New function.
9843         * class.c (finish_struct_1): Use it.
9844         * lex.c (copy_decl): Define it.
9845         * pt.c (tsubst_decl): Likewise.
9846         * tree.c (copy_template_template_parm): Likewise.
9847
9848         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9849         has_nonpublic_assign_ref.
9850         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9851         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9852         * class.c (finish_struct_methods): Don't set
9853         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9854         (interface_only): Don't declare.
9855         (interface_unknown): Likewise.
9856
9857 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9858
9859         * tree.h (HAVE_TEMPLATES): Remove definition.
9860         * lang-options.h (-fthis-is-variable): Remove documentation.
9861
9862 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
9863
9864         * class.c (instantiate_type): Handle object-relative template-id.
9865
9866         * semantics.c (finish_expr_stmt): Call convert_to_void here.
9867         * decl.c (cplus_expand_expr_stmt): Not here.
9868
9869         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9870         Initialize exprtype earlier.
9871
9872         * parse.y (fn.def1): Check for defining types in return types.
9873
9874         * decl.c (check_tag_decl): Notice extra fundamental types.
9875         Diagnose empty decls in classes, too.
9876
9877         * decl.c (grokdeclarator): Don't override an anonymous name if no
9878         declarator was given.
9879
9880         * cvt.c (convert_to_void): Call resolve_offset_ref.
9881
9882         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9883
9884         * decl2.c (decl_namespace): Handle getting a type.
9885
9886         * typeck.c (build_c_cast): Re-enable warning for cast between
9887         pointer and integer of different size.
9888
9889 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9890
9891         * inc/cxxabi.h (__pointer_type_info): Add restrict and
9892         incomplete flags.
9893         (__pointer_type_info::__pointer_catch): New virtual function.
9894         (__pointer_to_member_type_info): Derive from
9895         __pointer_type_info. Adjust.
9896         (__pointer_to_member_type_info::__do_catch): Remove.
9897         (__pointer_to_member_type_info::__is_pointer_p): Declare.
9898         (__pointer_to_member_type_info::__pointer_catch): Declare.
9899         * rtti.c (qualifier_flags): Add restrict flag.
9900         (ptmd_initializer): Reorder members.
9901         (create_tinfo_types): Expand comments. Reorder
9902         ptmd_desc_type_node members.
9903         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9904         Implement.
9905         (__pointer_type_info::__do_catch): Move specific code into
9906         __pointer_catch. Call it.
9907         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9908         specific catch checking. Fix void conversion check.
9909         (__pointer_to_member_type_info::__do_catch): Remove.
9910         (__pointer_to_member_type_info::__pointer_catch): Implement.
9911
9912 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9913
9914         * lex.c (init_parse): Remove traces of classof and headof.
9915         * decl2.c (flag_operator_names): Default to 1.
9916         (lang_decode_option): Do not set it for -ansi.
9917
9918 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
9919
9920         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9921         (DECL_MAIN_VARIANT): Remove.
9922         * decl.c (duplicate_decls): Don't set it.
9923         (start_function): Likewise.
9924         (lang_mark_tree): Don't mark it.
9925         * decl2.c (defer_fn): Don't use it.
9926         * lex.c (retrofit_lang_decl): Don't set it.
9927         * pt.c (tsubst_decl): Likewise.
9928         * ptree.c (print_lang_decl): Don't print it.
9929         * typeck.c (mark_addressable): Don't use it.
9930
9931 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9932
9933         * vec.cc: Include <new> and <exception>.
9934         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9935         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9936         terminate.
9937         (__cxa_vec_delete): Catch dtor exceptions.
9938
9939 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9940
9941         Prepend __ to implementation defined names.
9942         * inc/typeinfo (type_info): Rename _name to __name.
9943         (type_info::type_info): Rename parameter.
9944         (type_info::operator==, type_info::operator!=,
9945         type_info::before): Likewise.
9946         (type_info::is_pointer_p, type_info::is_function_p,
9947         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9948         parameters.
9949         * inc/cxxabi.h
9950         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9951         (__pointer_type_info::__pointer_type_info): Likewise.
9952         (__pointer_type_info::is_pointer_p,
9953         __pointer_type_info::do_catch): Prepend __. Rename parameters.
9954         (__array_type_info::__array_type_info): Rename parameters.
9955         (__function_type_info::__function_type_info): Likewise.
9956         (__function_type_info::is_function_p): Prepend __.
9957         (__enum_type_info::__enum_type_info): Rename parameters.
9958         (__pointer_to_member_type_info::__pointer_to_member_type_info):
9959         Likewise.
9960         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9961         parameters.
9962         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9963         (__class_type_info::__class_type_info): Rename parameters.
9964         (__class_type_info::sub_kind): Prepend __. Adjust member names.
9965         (__class_type_info::upcast_result,
9966         __class_type_info::dyncast_result): Prepend __. Move definition
9967         into tinfo.cc.
9968         (__class_type_info::do_upcast, __class_type_info::do_catch,
9969         __class_type_info::find_public_src,
9970         __class_type_info::do_dyncast,
9971         __class_type_info::do_find_public_src): Prepend __. Rename
9972         parameters.
9973         (__si_class_type_info::__si_class_type_info): Rename parameters.
9974         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9975         __si_class_type_info::do_find_public_src): Prepent __. Rename
9976         parameters.
9977         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9978         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9979         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9980         parameters.
9981         (__dynamic_cast): Rename parameters.
9982         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9983         type_info::do_catch, type_info::do_upcast): Prepend __.
9984         (contained_p, public_p, virtual_p, contained_public_p,
9985         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9986         (__class_type_info::do_catch,
9987         __class_type_info::do_upcast): Prepend __. Adjust.
9988         (__class_type_info::__upcast_result,
9989         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9990         Adjust.
9991         (__class_type_info::find_public_src): Prepend __. Adjust.
9992         (__class_type_info::do_find_public_src,
9993         __si_class_type_info::do_find_public_src,
9994         __vmi_class_type_info::do_find_public_src): Likewise.
9995         (__class_type_info::do_dyncast,
9996         __si_class_type_info::do_dyncast,
9997         __vmi_class_type_info::do_dyncast): Likewise.
9998         (__class_type_info::do_upcast,
9999         __si_class_type_info::do_upcast,
10000         __vmi_class_type_info::do_upcast): Likewise.
10001         (__dynamic_cast): Adjust.
10002         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
10003         (__function_type_info::is_function_p): Likewise.
10004         (__pointer_type_info::do_catch): Likewise. Adjust.
10005         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
10006         (__throw_type_match_rtti_2): Adjust.
10007         (__is_pointer): Adjust.
10008
10009 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
10010
10011         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
10012         (complete_ctor_identifier): New macro.
10013         (special_function_kind): Add sfk_copy_constructor and
10014         sfk_assignment_operator.
10015         (LOOKUP_HAS_IN_CHARGE): Remove.
10016         (cons_up_default_function): Rename to ...
10017         (implicitly_declare_fn): ... this.
10018         * call.c (build_new_method_call): Add in-charge parameters for
10019         constructors here.
10020         * class.c (add_implicitly_declared_members): Change parameter name
10021         from cant_have_assignment to cant_have_const_assignment.
10022         Replace calls to cons_up_default_function to implicitly_declare_fn.
10023         * cvt.c (ocp_convert): Use complete_ctor_identifier.
10024         * decl.c (initialize_predefined_identifiers): Initialize it.
10025         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
10026         complex expression.
10027         * init.c (expand_default_init): Don't calculate the in-charge
10028         parameter here.
10029         (build_new_1): Likewise.
10030         * lex.c (cons_up_default_function): Move to method.c.
10031         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
10032         (implicitly_declare_fn): New function.
10033         * typeck.c (build_static_cast): Use complete_ctor_identifier.
10034         (build_modify_expr): Likewise.
10035         * typeck2.c (build_functional_cast): Likewise.
10036
10037         Under the new ABI, constructors don't return `this'.
10038         * cp-tree.h (warn_reorder): Declare.
10039         (special_function_kind): New enum.
10040         (global_base_init_list): Remove declaration.
10041         (emit_base_init): Don't return a value.
10042         (check_base_init): Don't declare.
10043         (is_aggr_typedef): Likewise.
10044         * decl.c (check_special_function_return_type): New function.
10045         (return_types): Remove.
10046         (grokdeclarator): Use check_special_function_return_type.
10047         (start_function): Don't initialize ctor_label under the new ABI.
10048         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
10049         * init.c (begin_init_stmts): Move to top of file.
10050         (finish_init_stmts): Likewise.
10051         (warn_reorder): Don't declare.
10052         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
10053         value.
10054         (check_base_init): Remove.
10055         (is_aggr_typedef): Likewise.
10056         (build_new_1): Don't use the return value of a constructor.
10057         * semantics.c (setup_vtbl_ptr): Don't use the return value
10058         of emit_base_init.
10059         * typeck.c (check_return_expr): Don't magically convert return
10060         statements into `return this' in constructors under the new ABI.
10061
10062         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
10063         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
10064         (base_ctor_identifier): New macro.
10065         (base_dtor_identifier): Likewise.
10066         (deleting_dtor_identifier): Likewise.
10067         * decl.c: Don't include obstack.h.
10068         (obstack_chunk_alloc): Don't define.
10069         (obstack_chunk_free): Likewise.
10070         (struct predefined_identifier): New type.
10071         (initialize_predefined_identifiers): New function.
10072         (init_decl_processing): Use it.
10073         (debug_temp_inits): Remove.
10074         (start_method): Don't call preserve_data.
10075         (hack_incomplete_structures): Update comment.
10076         * init.c (init_init_processing): Don't initialize
10077         nelts_identifier.
10078         (build_offset_rf): Remove dead code.
10079         (build_delete): Use CLASSTYPE_N_BASECLASSES.
10080         * search.c (init_search_processing): Don't initialize
10081         vptr_identifier.
10082
10083 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10084
10085         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
10086         some sign_compare warnings.
10087
10088 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10089
10090         Rename abi::__vmi_class_type_info members.
10091         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
10092         base_list, detail_masks members to vmi_flags, vmi_base_count,
10093         vmi_bases and vmi_flags_masks respectively.
10094         (__vmi_class_type_info::vmi_flags_masks): Rename
10095         details_unknown_mask to flags_unknown_mask.
10096         * tinfo.cc (__class_type_info::do_upcast): Adjust.
10097         (__vmi_class_type_info::do_find_public_src): Adjust.
10098         (__vmi_class_type_info::do_dyncast): Adjust.
10099         (__vmi_class_type_info::do_upcast): Adjust.
10100
10101 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10102
10103         * tinfo.cc (convert_to_base): New function.
10104         (get_vbase_offset): Remove. Move into convert_to_base.
10105         (__vmi_class_type_info::do_find_public_src): Adjust.
10106         (__vmi_class_type_info::do_dyncast): Adjust.
10107         (__vmi_class_type_info::do_upcast): Adjust.
10108
10109 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
10110
10111         * tinfo.cc (operator=): Use __builtin_strcmp.
10112         * tinfo2.cc (before): Likewise.
10113
10114 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
10115
10116         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
10117         (DECL_SAVED_INLINE): Rename to ...
10118         (DECL_DEFERRED_FN): ... this.
10119         (in_function_p): Remove declaration.
10120         (mark_inline_for_output): Rename to ...
10121         (defer_fn): ... this.
10122         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10123         (in_function_p): Remove definition.
10124         * decl2.c (saved_inlines): Rename to ...
10125         (deferred_fns): ... this.
10126         (saved_inlines_used): Rename to ...
10127         (deferred_fns_used): ... this.
10128         (mark_inline_for_output): Rename to ...
10129         (defer_fn): ... this.
10130         (finish_file): Adjust accordingly.
10131         (init_decl2): Likewise.
10132         * lex.c (cons_up_default_function): Likewise.
10133         * pt.c (mark_decl_instantiated): Likewise.
10134         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
10135         circumstances.
10136         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
10137         * semantics.c (expand_body): Defer more functions.
10138
10139 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10140
10141         * vec.cc: New file.
10142         * Make-lang.in (CXX_LIB2FUNCS): Add it.
10143         (vec.o): Build it.
10144         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10145         __cxa_vec_delete): Declare.
10146
10147 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10148
10149         * rtti.c (dfs_class_hint_mark): New static function.
10150         (dfs_class_hint_unmark): New static function.
10151         (class_hint_flags): Use them.
10152
10153 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
10154
10155         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
10156
10157 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
10158
10159         * cp-tree.h (instantiate_decl): Change prototype.
10160         * decl2.c (mark_used): Adjust call.
10161         * optimize.c (inlinable_function_p): Adjust handling of templates.
10162         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
10163         (do_type_instantiation): Likewise.
10164         (instantiate_decl): Defer more templates.
10165         (instantiate_pending_templates): Adjust logic to handle inline
10166         friend functions.
10167
10168         * Makefile.in (GGC_H): New variable.  Use it throughout in place
10169         of ggc.h.
10170
10171         * call.c: Don't include obstack.h.  Include ggc.h.
10172         (obstack_chunk_alloc): Don't define.
10173         (obstack_chunk_free): Likewise.
10174         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
10175         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
10176         (pop_switch): Free it.
10177
10178         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
10179
10180         * dump.c (dequeue_and_dump): Don't try to print the bit_position
10181         if we don't have a DECL_FIELD_OFFSET.
10182
10183 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
10184
10185         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
10186         special_function_p.
10187
10188 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10189
10190         * cfns.gperf (hash, libc_name_p): Prototype.
10191
10192         * rtti.c (build_dynamic_cast_1): Constification.
10193
10194         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
10195
10196         * semantics.c (deferred_type_access_control): Prototype.
10197
10198 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
10199
10200         Correct many new ABI issues regarding vbase and vcall offset
10201         layout.
10202         * cp-tree.h (BINFO_VTABLE): Document.
10203         (struct lang_type): Tweak formatting.
10204         (BINFO_PRIMARY_BINFO): Add to documentation.
10205         (CLASSTYPE_VSIZE): Fix typo in comment.
10206         (CLASSTYPE_VBASECLASSES): Update documentation.
10207         (BINFO_VBASE_MARKED): Remove.
10208         (SET_BINFO_VBASE_MARKED): Likewise.
10209         (CLEAR_BINFO_VBASE_MARKED): Likewise.
10210         (BINFO_FIELDS_MARKED): Remove.
10211         (SET_BINFO_FIELDS_MARKED): Likewise.
10212         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
10213         (enum access_kind): New enumeration.
10214         (num_extra_vtbl_entries): Remove declaration.
10215         (size_extra_vtbl_entries): Likewise.
10216         (get_vtbl_decl_for_binfo): New function.
10217         (dfs_vbase_unmark): Remove declaration.
10218         (mark_primary_bases): Likewise.
10219         * class.c (SAME_FN): Remove.
10220         (struct vcall_offset_data_s): Move definition.
10221         (build_vbase_pointer): Use `build', not `build_binary_op', to
10222         access the vbase pointer under the new ABI.
10223         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
10224         (build_primary_vtable): Likewise.
10225         (dfs_mark_primary_bases): Move here from search.c.
10226         (mark_primary_bases): Likewise.
10227         (determine_primary_bases): Under the new ABI, don't make a base
10228         class a primary base just because we don't yet have any virtual
10229         functions.
10230         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
10231         (num_vfun_entries): Remove.
10232         (dfs_count_virtuals): Likewise.
10233         (num_extra_vtbl_entries): Likewise.
10234         (size_extra_vtbl_entries): Likewise.
10235         (layout_virtual_bases): Iterate in inheritance graph order under
10236         the new ABI.
10237         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
10238         indicate that a vfield is present.
10239         (init_class_processing): Initialize access_public_node, etc., from
10240         ak_public, etc.
10241         (get_vtbl_decl_for_binfo): New function.
10242         (dump_class_hierarchy_r): Likewise.
10243         (dump_class_hierarchy): Use it.
10244         (finish_vtbls): Build the vtbls in inheritance graph order.
10245         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10246         (initialize_vtable): Use get_vtbl_decl_for_binfo.
10247         (accumulate_vtbl_inits): Add comments explaining why a pre-order
10248         walk is required.
10249         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
10250         where the vptr points, even for primary vtables.
10251         (build_vtbl_initializer): Adjust handling of vbase and vcall
10252         offsets.
10253         (build_vcall_and_vbase_vtable_entries): New function.
10254         (dfs_build_vbase_offset_vtbl_entries): Remove.
10255         (build_vbase_offset_vtbl_entries): Reimplement.
10256         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
10257         were already handled in a primary base class vtable.
10258         (build_vcall_offset_vtbl_entries): Adjust.
10259         (build_rtti_vtbl_entries): Adjust.
10260         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
10261         * init.c (expand_virtual_init): Simplify.
10262         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
10263         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
10264         * search.c (BINFO_ACCESS): New macro.
10265         (SET_BINFO_ACCESS): Likewise.
10266         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
10267         (access_in_type): Likewise.
10268         (dfs_accessible_p): Likewise.
10269         (protected_accessible_p): Likewise.
10270         (lookup_fnfields_1): Adjust documentation.
10271         (dfs_mark_primary_bases): Move to class.c
10272         (mark_primary_bases): Likewise.
10273         (dfs_vbase_unmark): Remove.
10274         (virtual_context): Use BINFO_FOR_VBASE.
10275         (dfs_get_vbase_types): Simplify.
10276         (dfs_build_inheritance_graph_order): New function.
10277         (get_vbase_types): Use it.
10278         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
10279
10280         * tinfo.cc (get_vbase_offset): New function.
10281         (__vmi_class_type_info::do_find_public_src): Use it.
10282         (__vmi_class_type_info::do_dyncast): Likewise.
10283         (__vmi_class_type_info::do_upcast): Likewise.
10284
10285 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
10286
10287         * lang-specs.h: Pass -fno-show-column to the preprocessor.
10288
10289 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
10290
10291         * rtti.c (class_hint_flags): Rename flags.
10292         (class_initializer): Remove flags.
10293         (synthesize_tinfo_var): Combine offset and flags. Add flags
10294         for __vmi_class_type_info.
10295         (create_tinfo_types): Remove flags from __class_type_info and
10296         __si_class_type_info. Merge flags and offset from
10297         base_class_type_info.
10298         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
10299         (__base_class_info::is_virtual_p): Adjust.
10300         (__base_class_info::is_public_p): Adjust.
10301         (__base_class_info::offset): New accessor.
10302         (__class_type_info::details): Remove member.
10303         (__class_type_info::__class_type_info): Lose details.
10304         (__class_type_info::detail_masks): Remove.
10305         (__si_class_type_info::__si_class_type_info): Lose details.
10306         (__vmi_class_type_info::details): New member.
10307         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
10308         (__vmi_class_type_info::detail_masks): New member.
10309         * tinfo.cc (__class_type_info::do_upcast): Initialize result
10310         with unknown_details_mask.
10311         (__vmi_class_type_info::do_find_public_src): Adjust
10312         (__vmi_class_type_info::do_dyncast): Adjust.
10313         (__vmi_class_type_info::do_upcast): Set result details, if
10314         needed. Adjust.
10315         (__dynamic_cast): Temporarily #if out optimization.
10316
10317 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
10318
10319         * rtti.c (get_tinfo_decl): Mark used.
10320         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
10321         mark as dealt with, if we output it.
10322
10323 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10324
10325         * class.c: Reorganize to put virtual function table initialization
10326         machinery at the end of the file.
10327
10328 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
10329
10330         * class.c (finish_struct): Use bitsize_zero_node.
10331         * pt.c (instantiate_class_template): Likewise.
10332
10333 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10334
10335         Put RTTI entries at negative offsets in new ABI.
10336         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
10337         vbase offset at index -3, not -1.
10338         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
10339         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
10340         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
10341         (build_rtti_vtbl_entries): New function.
10342         (set_rtti_entry): Remove.
10343         (build_primary_vtable): Don't use it.
10344         (build_secondary_vtable): Likewise.
10345         (start_vtable): Remove.
10346         (first_vfun_index): New function.
10347         (set_vindex): Likewise.
10348         (add_virtual_function): Don't call start_vtable.  Do call
10349         set_vindex.
10350         (set_primary_base): Rename parameter.
10351         (determine_primary_base): Likewise.
10352         (num_vfun_entries): Don't use skip_rtti_stuff.
10353         (num_extra_vtbl_entries): Include RTTI information.
10354         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
10355         (skip_rtti_stuff): Remove.
10356         (dfs_modify_vtables): Don't use it.
10357         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
10358         (layout_nonempty_base_or_field): Update size handling.
10359         (create_vtable_ptr): Tweak.
10360         (layout_class_type): Adjust parameter names.
10361         (finish_struct_1): Simplify.
10362         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
10363         (skip_rtti_stuff): Remove.
10364         (first_vfun_index): New function.
10365         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10366         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
10367         (marked_vtable_pathp): Declare.
10368         (unmarked_vtable_pathp): Likewise.
10369         * error.c (dump_expr): Use first_vfun_index to calculate vtable
10370         offsets.
10371         * rtti.c (build_headof): Look for RTTI at negative offsets.
10372         (get_tinfo_decl_dynamic): Likewise.
10373         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
10374         here.
10375         (create_pseudo_type_info): Do it here instead.  Adjust so that
10376         vptr points at first virtual function.
10377         * search.c (marked_vtable_pathp): Make it global.
10378         (unmarked_vtable_pathp): Likewise.
10379         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10380         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10381         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
10382         (get_pure_virtuals): Likewise.
10383         (expand_upcast_fixups): Likewise.
10384         * tree.c (debug_binfo): Likewise.
10385         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
10386         negative offset.
10387
10388 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10389
10390         * class.c (check_field_decl): Fix typo.
10391         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10392         (check_methods): Likewise.
10393         (check_field_decls): Likewise.
10394         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10395         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10396         Use DECL_RESULT_FLD, not DECL_RESULT.
10397         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10398         * lex.c (identifier_type): Likewise.
10399         * pt.c (determine_specialization, lookup_template_class): Likewise.
10400         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10401         (resolve_overloaded_unification, more_specialized): Likewise.
10402         * semantics.c (finish_member_declaration): Likewise.
10403         * typeck.c (build_x_function_call): Likewise.
10404
10405 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
10406
10407         * class.c (layout_empty_base): Handle empty bases with non-byte
10408         alignment.
10409         (build_base_field): Likewise.
10410         (layout_virtual_bases): Likewise.
10411
10412         * class.c (finish_struct_1): Fix typo in this change:
10413
10414         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10415
10416 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
10417
10418         * decl.c (grokdeclarator): Count partial specializations when
10419         keeping track of how many template classes have been seen.
10420
10421         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10422
10423 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10424
10425         * class.c (build_vbase_pointer_fields): layout_field now place_field.
10426         (get_vfield_offset): Use byte_position.
10427         (set_rtti_entry): Set OFFSET to ssizetype zero.
10428         (get_binfo_offset_as_int): Deleted.
10429         (dfs_record_base_offsets): Use tree_low_cst.
10430         (dfs_search_base_offsets): Likewise.
10431         (layout_nonempty_base_or_field): Reflect changes in RLI format
10432         and call byte_position.
10433         (layout_empty_base): Convert offset to ssizetype.
10434         (build_base_field): use rli_size_unit_so_far.
10435         (dfs_propagate_binfo_offsets): Do computation in proper type.
10436         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
10437         (layout_class_type): Reflect changes in RLI names and fields.
10438         (finish_struct_1): Set DECL_FIELD_OFFSET.
10439         * dump.c (dequeue_and_dump): Call bit_position.
10440         * expr.c (cplus_expand_constant): Use byte_position.
10441         * rtti.c (expand_class_desc): Use bitsize_one_node.
10442         * typeck.c (build_component_addr): Use byte_position and don't
10443         special case for zero offset.
10444
10445 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
10446
10447         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10448
10449         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10450         tinfo object.
10451         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10452         vtable.
10453
10454 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10455
10456         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10457         DECL_P macros.
10458         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10459         make_typename_type, check_initializer, cp_finish_decl,
10460         xref_tag): Likewise.
10461         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10462         decl_namespace, arg_assoc_template_arg, arg_assoc,
10463         validate_nonmember_using_decl, do_class_using_decl): Likewise.
10464         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10465         args_to_string): Likewise.
10466         * friend.c (is_friend): Likewise.
10467         * lex.c (note_got_semicolon, note_list_got_semicolon,
10468         is_global): Likewise.
10469         * method.c (build_overload_nested_name, build_overload_value,
10470         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10471         * parse.y (typename_sub, typename_sub1): Likewise.
10472         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10473         process_partial_specialization, convert_template_argument,
10474         template_args_equal, add_pending_template, lookup_template_class,
10475         for_each_template_parm_r, maybe_fold_nontype_arg,
10476         tsubst, instantiate_template, type_unification_real, unify,
10477         instantiate_pending_templates, set_mangled_name_for_template_decl):
10478         Likewise.
10479         * repo.c (repo_get_id, repo_template_used): Likewise.
10480         * search.c (lookup_field_1): Likewise.
10481         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10482         * xref.c (classname): Likewise.
10483
10484 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
10485
10486         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10487         (CANONICAL_BINFO): New macro.
10488         (BINFO_NEW_VTABLE_MARKED): Use it.
10489         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10490         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10491         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10492         not TREE_TYPE.
10493         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10494         (build_secondary_vtable): Likewise.
10495         (dfs_finish_vtbls): Likewise.
10496         (dfs_accumulate_vtbl_inits): Likewise.
10497         (accumulate_vtbl_inits): New function.
10498         (finish_vtbls): Make sure that virtual bases come after
10499         non-virtual bases in the vtable group.
10500         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10501         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10502         * search.c (struct vbase_info): Move definition.
10503         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10504         (unmarked_new_vtable_p): Likewise.
10505         (dfs_mark_vtable_path): Remove.
10506         (dfs_mark_new_vtable): Remove.
10507         (dfs_unmark_new_vtable): Likewise.
10508         (dfs_clear_search_slot): Likewise.
10509         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
10510         (dfs_clear_vbase_slots): Likewise.
10511         (init_vbase_pointers): LIkewise.
10512
10513 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
10514
10515         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10516         SIZETYPE to a non-SIZETYPE.
10517
10518 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
10519
10520         * class.c (layout_virtual_bases): Adjust names in conditionally
10521         compiled code.
10522
10523         * class.c (record_base_offsets): New function.
10524         (layout_conflict_p): Likewise.
10525         (layout_nonempty_base_or_field): Use it.
10526         (layout_empty_base): New function.
10527         (build_base_field): Use it.
10528         (build_base_fields): Update comment.
10529         (layout_virtual_bases): Fold in a little code form
10530         layout_basetypes.  Use layout_empty_base.
10531         (layout_basetypes): Remove.
10532         (end_of_class): New function.
10533         (layout_class_type): Use it.  Adjust.
10534
10535         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10536         (fntype_p): Remove.
10537         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10538         comment.
10539         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10540         * typeck.c (fntype_p): Remove.
10541
10542         * cp-tree.h (TI_SPEC_INFO): Remove.
10543         (CLASSTYPE_TI_SPEC_INFO): Likewise.
10544         * pt.c (process_partial_specialization): Likewise.
10545
10546         * class.c (build_base_field): Fix thinko in computation of binfo
10547         offsets.
10548
10549         * tree.c (mark_local_for_remap_p): Mark variables declared in
10550         TARGET_EXPRs as well.
10551
10552 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10553
10554         * typeck.c (require_complete_type, complete_type,
10555         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10556         build_array_ref, convert_arguments, pointer_diff,
10557         build_x_unary_op, build_unary_op, build_c_cast,
10558         build_modify_expr): Use COMPLETE_TYPE_P etc.
10559         * call.c (is_complete, convert_like_real,
10560         build_new_method_call): Likewise.
10561         * class.c (build_vbase_pointer_fields, check_bases,
10562         build_base_field, finish_struct_1, pushclass): Likewise.
10563         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10564         * decl.c (maybe_process_template_type_declaration, pushtag,
10565         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10566         layout_var_decl, check_initializer, cp_finish_decl,
10567         grokdeclarator, require_complete_types_for_parms,
10568         grok_op_properties, xref_tag, xref_basetypes,
10569         check_function_type): Likewise.
10570         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10571         * friend.c (do_friend): Likewise.
10572         * init.c (build_offset_ref): Likewise.
10573         * parse.y (structsp): Likewise.
10574         * pt.c (maybe_process_partial_specialization,
10575         tsubst_friend_function, instantiate_class_template, tsubst,
10576         do_type_instantiation, instantiate_pending_templates): Likewise.
10577         * repo.c (repo_get_id): Likewise.
10578         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10579         synthesize_tinfo_var, emit_support_tinfos): Likewise.
10580         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10581         * semantics.c (begin_class_definition): Likewise.
10582         * tree.c (build_cplus_method_type): Likewise.
10583         * typeck2.c (digest_init, build_functional_cast,
10584         add_exception_specifier): Likewise.
10585         * parse.h, parse.c: Regenerated.
10586
10587 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10588
10589         * inc/cxxabi.h: New header file. Define new-abi entry points.
10590         (__pointer_type_info::target): Rename member to ...
10591         (__pointer_type_info::type): ... here.
10592         (__base_class_info::type): Rename member to ...
10593         (__base_class_info::base): ... here.
10594         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10595         * cp-tree.h (CPTI_ABI): New global tree enumeration.
10596         (abi_node): New global tree node.
10597         * decl.c (abi_node): Document.
10598         (init_decl_processing): Initialize abi_node.
10599         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10600         (get_vmi_pseudo_type_info): Likewise.
10601         (create_tinfo_types): Likewise.
10602         (emit_support_tinfos): Likewise.
10603         * tinfo.h (cxxabi.h): Include for new-abi.
10604         Move rtti class definitions to new header file.
10605         * tinfo.cc (abi): Use the namespace.
10606         (std): Move new abi rtti classes from here ...
10607         (__cxxabiv1): ... to here.
10608         * tinfo2.cc (cxxabi.h): Include for new-abi.
10609         Move rtti class definitions to new header file.
10610         (std): Move new abi rtti classes from here ...
10611         (__cxxabiv1): ... to here.
10612         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10613         namespace.
10614
10615 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10616             Jason Merrill  <jason@casey.cygnus.com>
10617
10618         * method.c (build_overload_int): Use host_integerp.
10619
10620 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10621
10622         * init.c (build_offset_ref): Handle the case of a templated member
10623         function.
10624
10625 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10626
10627         * except.c (expand_exception_blocks): Clear catch_clauses_last.
10628
10629 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
10630
10631         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10632         * class.c (check_bitfield_decl): Turn illegal bitfields into
10633         non-bitfields.
10634         (dfs_propagate_binfo_offsets): Adjust for new size_binop
10635         semantics.
10636         (dfs_offset_for_unshared_vbases): Likewise.
10637         * cvt.c (cp_convert_to_pointer): Convert NULL to a
10638         pointer-to-member correctly under the new ABI.
10639         * expr.c (cplus_expand_constant): Don't use cp_convert when
10640         turning an offset into a pointer-to-member.
10641         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10642         when dereferencing them under the new ABI.
10643         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10644         of pointers-to-members under the new ABI.
10645
10646         * class.c (check_bitfield_decl): Remove restriction on really long
10647         bitfields.
10648         (layout_class_type): Implement new ABI handling of bitfields
10649         longer than their types.
10650
10651 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10652
10653         * parse.y (extdefs): Call ggc_collect.
10654         * parse.c: Regenerated.
10655
10656 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
10657
10658         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10659         (note_name_declared_in_class): Use OVL_CURRENT to get at a
10660         potential overload.
10661
10662 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10663
10664         * class.c (build_vbase_path): Use integer_zerop.
10665         (build_vtable_entry): Use tree_low_cst.
10666         (get_vfield_offset): Use bit_position.
10667         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10668         Use tree_low_cst.
10669         (check_bitfield_decl): Set DECL_SIZE using convert.
10670         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10671         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10672         Use tree_low_cst.
10673         (finish_struct_1): Use bit_position.
10674         (dump_class_hierarchy): Use tree_low_cst.
10675         * cp-tree.h (min_precision): Add declaration.
10676         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10677         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10678         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10679         * expr.c (cplus_expand_constant): Use bit_position.
10680         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10681         * rtti.c (get_base_offset): Use bit_position.
10682         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10683         host_integerp, and tree_low_cst.
10684         (pointer_int_sum): Use integer_zerop.
10685         (build_component_addr): Use bit_position.
10686
10687 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
10688
10689         * typeck.c (require_complete_type): Don't assume size_zero_node.
10690         (complete_type_or_else): Likewise.
10691
10692 2000-03-16  Steven Grady <grady@digitaldeck.com>
10693             Jason Merrill  <jason@casey.cygnus.com>
10694
10695         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10696
10697 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10698
10699         * decl2.c (grokfield): Bail out if type is error_mark_node.
10700
10701 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10702
10703         * tinfo2.cc (__ptr_to_member_data): Rename to ...
10704         (__pointer_to_member_data): ... here. Adjust.
10705         * rtti.c (create_tinfo_types): Adjust.
10706
10707 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10708
10709         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10710         * decl.c (ref_desc_type_node): Undocument.
10711         * rtti.c (ptr_ref_initializer): Rename to ...
10712         (ptr_initializer): ... here. Adjust comments.
10713         (ptmd_initializer): Fix comment thinko.
10714         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10715         (create_tinfo_types): Remove ref_desc_type_node init.
10716         * tinfo2.cc (__reference_type_info): Remove.
10717
10718 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10719
10720         * decl.c (cp_finish_decl): Remove obsolete comment.
10721
10722         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10723
10724 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
10725
10726         * cp-tree.h: Tweak documentation.
10727         * class.c (build_vbase_pointer_fields): Layout the fields, too.
10728         (avoid_overlap): Remove.
10729         (get_binfo_offset_as_int): New function.
10730         (dfs_serach_base_offsets): Likewise.
10731         (layout_nonempty_base_or_field): Likewise.
10732         (build_base_field): Layout fields here.  Avoid placing two objects
10733         of the same type at the same address, under the new ABI.
10734         (build_base_fields): Adjust accordingly.
10735         (create_vtable_ptr): Return the new field, but don't attach it to
10736         TYPE_FIELDS.
10737         (remove_base_field): Remove.
10738         (remove_base_fields): Remove.
10739         (layout_basetypes): Adjust accordingly.
10740         (layout_class_type): Call layout_field for each field, rather than
10741         just making a wholesale call to layout_type.
10742
10743 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
10744
10745         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10746
10747 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
10748
10749         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10750
10751         * except.c (dtor_nothrow): New fn.
10752         (do_pop_exception): Use it.  Take type parm.
10753         (push_eh_cleanup): Take type parm.
10754         (expand_start_catch_block): Pass it.
10755         (build_eh_type_type_ref): Accept null type.
10756
10757 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
10758
10759         * cp-tree.h (revert_static_member_fn): Change prototype.
10760         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10761         (grok_op_properties): Likewise.
10762         (start_function): Likewise.
10763         (revert_static_member_fn): Simplify.
10764         * pt.c (check_explicit_specialization): Adjust call to
10765         revert_static_member_fn.
10766
10767 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
10768
10769         * cp-tree.h (scope_kind): New type.
10770         (tmpl_spec_kind): Likewise.
10771         (declare_pseudo_global_level): Remove.
10772         (pseudo_global_level_p): Rename to template_parm_scope_p.
10773         (pushlevel): Remove declaration.
10774         (begin_scope): New function.
10775         (finish_scope): Likewise.
10776         (current_tmpl_spec_kind): Likewise.
10777         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10778         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
10779         Add template_spec_p.
10780         (toplevel_bindings_p): Adjust.
10781         (declare_pseudo_global_level): Remove.
10782         (pseudo_global_level_p): Rename to template_parm_scope_p.
10783         (current_tmpl_spec_kind): New function.
10784         (begin_scope): Likewise.
10785         (finish_scope): Likewise.
10786         (maybe_push_to_top_level): Adjust.
10787         (maybe_process_template_type_declaration): Likewise.
10788         (pushtag): Likewise.
10789         (pushdecl_nonclass_level): Likewise.
10790         (lookup_tag): Likewise.
10791         (grokfndecl): Handle member template specializations.  Share
10792         constructor and non-constructor code.
10793         * decl2.c (check_classfn): Handle member template specializations.
10794         * pt.c (begin_template_parm_list): Use begin_scope.
10795         (begin_specialization): Likewise.
10796         (end_specialization): Likewise.
10797         (check_explicit_specialization): Use current_tmpl_spec_kind.
10798         Handle member template specializations.
10799         (end_template_decl): Use finish_scope.  Remove call to
10800         get_pending_sizes.
10801         (push_template_decl_real): Remove bogus error message.
10802         (tsubst_decl): Fix typo in code contained in comment.
10803         (instantiate_template): Handle member template specializations.
10804         (most_general_template): Likewise.
10805
10806 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10807
10808         * lex.c (whitespace_cr): Compress consecutive calls to warning().
10809         (do_identifier): Ditto for error().
10810
10811         * pt.c (convert_nontype_argument): Ditto for cp_error().
10812         (convert_template_argument): Ditto for cp_pedwarn().
10813
10814 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
10815
10816         * exception.cc (__check_null_eh_spec): New fn.
10817         * except.c (expand_end_eh_spec): Call it if the spec is throw().
10818
10819 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10820
10821         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10822         * except.c (expand_end_eh_spec): Add the return type.
10823         * rtti.c (throw_bad_cast): Add the parmtypes.
10824         (throw_bad_typeid): Likewise.
10825
10826         * semantics.c (expand_stmt): Only leave out rtl for unused
10827         artificials, and set DECL_IGNORED_P on them as well.
10828         * decl.c (wrapup_globals_for_namespace): Likewise.
10829
10830 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
10831
10832         * decl.c (maybe_commonize_var): Skip all artificial decls.
10833         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10834
10835 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10836
10837         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10838         * cp-tree.h: Declare flag_enforce_eh_specs.
10839         * decl.c (store_parm_decls, finish_function): Check it.
10840
10841         C library functions don't throw.
10842         * Makefile.in (cfns.h): New target.
10843         (except.o): Depend on it.
10844         * Make-lang.in (cc1plus): Depend on cfns.gperf.
10845         * cfns.gperf: New file.
10846         * cfns.h: Generated.
10847         * except.c: Include it.
10848         (nothrow_libfn_p): New fn.
10849         * decl.c (grokfndecl): Use it.
10850         * cp-tree.h: Declare it.
10851
10852         * decl.c (push_overloaded_decl_1, auto_function,
10853         define_function): Lose.
10854         (build_library_fn_1): New static fn.
10855         (builtin_function): Use it.
10856         (get_atexit_node): Use build_library_fn_ptr.
10857         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10858         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10859         push_void_library_fn, push_throw_library_fn): New fns.
10860         * cp-tree.h: Declare them.
10861         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10862         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10863         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10864         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10865         * rtti.c (build_runtime_decl): Lose.
10866         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10867         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10868         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10869
10870         * call.c (build_call): Remove result_type parm.
10871         Call mark_used on unused artificial fns.
10872         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10873
10874 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
10875
10876         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10877         appropriate.
10878         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10879         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10880         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10881         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10882         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10883         expand_generic_desc): Likewise.
10884
10885 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10886
10887         * exception.cc (__cp_pop_exception): Cleanup the original object.
10888
10889 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10890
10891         * decl.c (grok_op_properties): Merge conversion to void warning
10892         with other silly op warnings.
10893
10894 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
10895
10896         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10897         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
10898
10899 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10900
10901         * decl.c (cp_make_fname_decl): New function.
10902         (wrapup_globals_for_namespace): Don't emit unused static vars.
10903         (init_decl_processing): Remove comment about use of
10904         array_domain_type. Set make_fname_decl.
10905         (cp_finish_decl): Remove __FUNCTION__ nadgering.
10906         * semantics.c (begin_compound_stmt): Remove
10907         current_function_name_declared flagging.
10908         (expand_stmt): Don't emit unused local statics.
10909         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10910         specially.
10911
10912 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10913
10914         * typeck.c (convert_for_assignment): Don't look at array
10915         initializer.
10916         * call.c (convert_like_real): Likewise.
10917
10918 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
10919
10920         Add initial support for '\uNNNN' specifier.
10921         * lex.c (read_ucs): New fn.
10922         (readescape, skip_white_space): Call it.
10923         (is_extended_char, is_extended_char_1): New fns.
10924         (utf8_extend_token): New fn, #if 0'd out.
10925         (real_yylex): Treat extended chars like letters.
10926
10927         * search.c (note_debug_info_needed): Walk the bases even if we
10928         weren't deferring the type itself.
10929
10930 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10931
10932         * decl2.c (finish_objects): Constify a char*.
10933
10934         * method.c (emit_thunk): Likewise.
10935
10936 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
10937
10938         * typeck.c (dubious_conversion_warnings): Look through
10939         REFERENCE_TYPE.
10940
10941 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10942
10943         * class.c (dfs_modify_vtables): I is now unsigned.
10944         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10945         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10946         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10947         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10948         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10949         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10950         Call integer_all_onesp.
10951         * typeck2.c (process_init_constructor): Use compare_tree_int.
10952
10953         * lang-specs.h (as): Don't call if -syntax-only.
10954
10955 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
10956
10957         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10958         RTL_EXPR_HAS_NO_SCOPE after all.
10959
10960 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
10961
10962         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10963         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
10964         RTL_EXPR_HAS_NO_SCOPE.
10965
10966         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10967         later.
10968
10969         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10970
10971 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
10972
10973         * call.c (convert_like): Macrofy.
10974         (convert_like_with_context): New macro.
10975         (convert_like_real): Renamed from convert_like.  Add calling
10976         context parameters, for diagnostics. Add recursive flag.  Call
10977         dubious_conversion_warnings for outer conversion.
10978         (build_user_type_conversion): Use convert_like_with_context.
10979         (build_over_call): Likewise. Don't warn about dubious
10980         conversions here. Adjust convert_default_arg calls.
10981         (convert_default_arg): Add context parameters for diagnostics.
10982         Pass through to convert_like_with_context.
10983         * cp-tree.h (convert_default_arg): Add context parameters.
10984         (dubious_conversion_warnings): Prototype new function.
10985         * typeck.c (convert_arguments): Adjust convert_default_arg call.
10986         (dubious_conversion_warnings): New function, broken
10987         out of convert_for_assignment.
10988         (convert_for_assignment): Adjust.
10989
10990 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
10991
10992         * decl2.c (key_method): Break out from...
10993         (import_export_vtable, import_export_class): ...here.
10994
10995         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10996         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10997
10998         * search.c (note_debug_info_needed, dfs_debug_mark,
10999         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
11000         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
11001
11002 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
11003
11004         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
11005         typos.
11006
11007 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
11008
11009         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
11010         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
11011         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
11012         (lang_type): Split gets_new into has_new and has_array_new.
11013         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11014         (TYPE_GETS_NEW): Split into ...
11015         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
11016         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
11017         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
11018         (build_op_new_call): Don't declare.
11019         (build_new_1): Likewise.
11020         * call.c (build_op_new_call): Remove.
11021         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11022         instead of TYPE_NEEDS_DESTRUCTOR.
11023         (finish_struct_bits): Likewise.
11024         (add_implicitly_declared_members): Likewise.
11025         (check_field_decl): Likewise.
11026         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
11027         correctly under the new ABI.
11028         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
11029         instead of TYPE_NEEDS_DESTRUCTOR.
11030         (initialize_local_var): Likewise.
11031         (destroy_local_var): Likewise.
11032         (cp_finish_decl): Likewise.
11033         (register_dtor_fn): Likewise.
11034         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
11035         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
11036         TYPE_VEC_DELETE_TAKES_SIZE here.
11037         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
11038         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
11039         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11040         (finish_destructor_body): Likewise.
11041         (maybe_build_cleanup_1): Likewise.
11042         * decl2.c (do_static_destruction): Likewise.
11043         * init.c (build_new_1): Make it static.
11044         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11045         (expand_cleanup_for_base): Likewise.
11046         (get_cookie_size): New function.
11047         (build_new_1): Handle array-new cookies correctly under the new
11048         ABI.
11049         (build_vec_delete_1): Likewise.
11050         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11051         (build_delete): Likewise.
11052         (build_vec_delete): Handle array-new cookies correctly under the new
11053         ABI.
11054         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11055         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
11056         TYPE_HAS_ARRAY_NEW_OPERATOR.
11057         * ptree.c (print_lang_type): Check them.
11058         * search.c (context_for_name_lookup): Fix typo in comment.
11059         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11060         * tree.c (break_out_cleanups): Likewise.
11061         (build_cplus_array_test_1): Likewise.
11062         (cp_build_qualified_type_real): Likewise.
11063         * typeck.c (complete_type): Likewise.
11064
11065         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
11066         the command-line, not the end.
11067
11068 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
11069
11070         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
11071
11072 2000-03-02  Tom Tromey  <tromey@cygnus.com>
11073
11074         * cp-tree.h (build_java_class_ref): Declare.
11075         * init.c (build_java_class_ref): No longer static.
11076         * except.c (expand_throw): Generate a Java-style `throw' if the
11077         thrown object is a "Java" object.
11078         (initialize_handler_parm): Generate a Java-style lookup of
11079         exception info if the caught object is a "Java" object.
11080         (catch_language, catch_language_init): New globals.
11081         (decl_is_java_type): New function.
11082         (expand_start_catch_block): Don't call push_eh_info() or
11083         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
11084         class reference to build_catch_block.
11085
11086 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11087
11088         * typeck.c (comptypes): Treat sizetype like its language equivalent.
11089
11090 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
11091
11092         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
11093         to merge reference/pointer code and fix incorrect warnings.
11094
11095 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
11096
11097         * search.c (protected_accessible_p): Use context_for_name_lookup.
11098
11099         * init.c (construct_virtual_bases): Fix thinko.
11100         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
11101
11102 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11103
11104         * decl.c (current_function_decl): Move to toplev.c.
11105
11106 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
11107
11108         * pt.c (fn_type_unification): Unify return type, whenever
11109         provided.
11110         (get_bindings_real): Only pass return type when necessary.
11111         Remove explicit return type check.
11112         * class.c (resolve_address_of_overloaded_function): Pass desired
11113         return type to fn_type_unification.
11114
11115 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11116
11117         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
11118         DECL_FIELD_SIZE.
11119         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
11120         DECL_FIELD_SIZE.
11121         * rtti.c (expand_class_desc): Likewise.
11122         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
11123         (THUNK_VCALL_OFFSET): Likewise.
11124         (THUNK_DELTA): Reflect changes in ../tree.h.
11125
11126 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
11127
11128         * search.c (protected_accessible_p): Also allow the access if
11129         the member is public in DERIVED.  Lose TYPE parm.
11130         (friend_accessible_p): Lose TYPE parm.
11131         (accessible_p): Adjust.
11132
11133 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11134
11135         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
11136         on things that are not sizes; ssize_binop deleted.
11137         Call size_diffop when appropriate.
11138         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11139         (build_primary_vtable, build_secondary_vtable): Likewise.
11140         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
11141         Variable I is HOST_WIDE_INT.
11142         (get_vfield_offset): Pass proper types to size_binop.
11143         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
11144         (finish_struct_1): Likewise.
11145         (skip_rtti_stuff): Arg N is now pointer to signed.
11146         (layout_class_type): Use size_zero_node.
11147         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
11148         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
11149         * decl.c (complete_arry_type): Pass proper types to size_binop.
11150         (xref_basetypes): BINFO_OFFSET is sizetype.
11151         * error.c (dump_expr): Don't use size_binop non-sizes.
11152         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
11153         * init.c (construct_virtual_bases): Fix type error.
11154         (build_vec_delete_1): Pass proper type to size_binop and don't
11155         fold result.
11156         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
11157         * rtti.c (get_base_offset): Pass proper type to size_binop.
11158         * search.c (dfs_find_vbases): Fix type error.
11159         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
11160         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
11161         * tree.c (debug_binfo): Variable N is signed.
11162         Use HOST_WIDE_INT_PRINT_DEC.
11163         * typeck.c (comptypes): sizetype is same as equivalent integer type.
11164         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
11165         size_one_node and size_zero_node.
11166         (c_alignof): Use size_one_node.
11167         (build_component_addr): Pass proper types to size_binop.
11168         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
11169
11170 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
11171
11172         Implement class scope using-declarations for functions.
11173         * class.c (handle_using_decl): Call add_method for used functions.
11174         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
11175         (add_method): Used functions are hidden by local functions.
11176         (check_bases_and_members): Handle using-decls before finalizing
11177         CLASSTYPE_METHOD_VEC.
11178         * call.c (add_function_candidate): Add ctype parm; if non-zero,
11179         override the type of 'this' accordingly.
11180         (add_template_candidate, add_template_candidate_real): Add ctype parm.
11181         (convert_class_to_reference, build_user_type_conversion_1,
11182         build_new_function_call, build_object_call, build_new_op,
11183         build_new_method_call): Pass ctype parm.
11184
11185         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
11186         the baselink.
11187         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11188         build_new_function_call, build_object_call, build_new_op,
11189         build_new_method_call, build_op_delete_call): Don't get basetype_path
11190         from a baselink.
11191         * typeck.c (build_component_ref): Likewise.
11192         * init.c (build_offset_ref): Likewise.
11193         (resolve_offset_ref): Don't call enforce_access.
11194         Call build_scoped_ref.
11195         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
11196         would cause an error or if -pedantic.
11197         * class.c (alter_access): Lose binfo parm.
11198
11199 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11200
11201         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
11202         types.
11203
11204 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
11205
11206         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
11207         pseudo_type_info creation into the std namespace
11208
11209 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11210
11211         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
11212         (import_export_class): Remove declaration.
11213         * decl2.c (import_export_class): Make it static.
11214         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
11215         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
11216         EXPR_WITH_FILE_LOCATION.
11217         * lex.c (check_newline): Tweak filename/lineno setting.
11218         * semantics.c (begin_while_stmt): Fix typo in comment.
11219
11220 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11221
11222         * lang-options.h (-fmessage-length=): Add missing option.
11223
11224         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
11225
11226 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
11227
11228         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
11229
11230 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
11231
11232         * optimize.c (expand_call_inline): Emit the return label before
11233         evaluating the return value.
11234
11235 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
11236
11237         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
11238         than duplicating functionality here.
11239         * optimize.c: Include input.h.
11240         (expand_call_inline): Use push_srcloc and pop_srcloc.
11241         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
11242         * parse.c: Regenerated.
11243         * Makefile.in (lex.o): Depend on input.h.
11244         (optimize.o): Likewise.
11245
11246 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
11247
11248         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
11249         function type, rather than ICE.
11250
11251 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
11252
11253         * decl.c (grokdeclarator): Call decl_type_access_control.
11254         * parse.y (parse_end_decl): Don't call decl_type_access_control if
11255         decl is null.
11256
11257 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
11258
11259         * decl.c (decls_match): Remove obsolete static member nadgering.
11260
11261 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11262
11263         * decl.c (grokdeclarator): Change ANSI to ISO.
11264         * lex.c (consume_string, readescape, do_identifier): Likewise.
11265         (parse_float, real_yylex): Likewise.
11266         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
11267         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
11268         new_type_id, maybe_label_decls, simple_stmt,
11269         for.init.statement): Likewise.
11270         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
11271         * semantics.c (finish_named_return_value): Likewise.
11272         * parse.c: Regenerate.
11273
11274 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
11275
11276         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
11277         (CPTI_CLASS_STAR_TYPE): Remove.
11278         (vtable_index_type): Likewise.
11279         (class_star_type_node): Remove.
11280         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
11281         (build_binary_op_nodefault): Remove.
11282         * call.c (build_new_op): Use build_binary_op instead of
11283         build_binary_op_nodefault.
11284         * decl.c (init_decl_processing): Remove class_star_type_node
11285         initialization.  Make delta_type_node ptrdiff_type_node under the
11286         new ABI.  Initialize vtable_index_type.
11287         (build_ptrmemfunc_type): Build different structures for the new
11288         ABI.
11289         (build_enumerator): Use build_binary_op instead of
11290         build_binary_op_nodefault.
11291         * method.c (build_overload_value): Mangle pointers-to-members
11292         appropriately under the new ABI.
11293         * typeck.c (build_array_ref): Use build_binary_op instead of
11294         build_binary_op_nodefault.
11295         (get_member_function_from_ptrfunc): Adjust for the new ABI.
11296         (build_binary_op_nodefault): Rename to ...
11297         (build_binary_op): ... this.  Remove old version.  Adjust for
11298         pointer-to-member comparisons under the new ABI.
11299         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
11300         (build_ptrmemfunc): Adjust for the new ABI.
11301         (expand_ptrmemfunc_cst): Likewise.
11302         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
11303         (pfn_from_ptrmemfunc): Adjust for the new ABI.
11304
11305 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11306
11307         * call.c (build_object_call): Compress consecutive calls to
11308         cp_error.
11309         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
11310         (build_op_delete_call): Adjust message formatting.
11311
11312         * class.c (check_bases): Compress consecutive calls to
11313         cp_pedwarn.
11314         (finish_struct_anon): Say 'ISO C++'.
11315
11316         * decl.c (start_decl): Same here.
11317         (grok_reference_init): Likewise.
11318         (grokfndecl): Correct message formatting.
11319         (grokfndecl): Improve diagnostic.
11320         (check_static_variable_definition): Likewise. Say 'ISO C++'
11321         (compute_array_index_type): Say 'ISO C++'
11322         (create_array_type_for_decl): Compress consecutive calls to
11323         cp_error.
11324         (grokdeclarator): Say 'ISO C++'
11325         (grok_op_properties): Likewise.
11326
11327         * decl2.c (delete_sanity): Clairify diagnostic.
11328         (check_member_template): Same here.
11329         (grok_function_init): Use consistent terminology.
11330
11331         * expr.c (do_case): Say 'ISO C++'
11332
11333         * friend.c (do_friend): Compress consecutive calls to warning.
11334
11335 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
11336
11337         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
11338         * class.c (build_secondary_vtable): Reorganize.  Don't create a
11339         new vtable under the new ABI.
11340         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
11341         computing the size.
11342         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
11343         the initializing elements.
11344         (initialize_vtable): New function.
11345         (dfs_finish_vtbls): Use it.
11346         (dfs_accumulate_vtbl_inits): New function.
11347         (finish_vtbls): Merge primary and secondary vtables under the new
11348         ABI.
11349         (finish_struct_1): Remove redundant call to layout_vtable_decl.
11350         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
11351         aren't VAR_DECLs.
11352
11353         * class.c (build_vtable): New function, split out from ...
11354         (get_vtable_decl): ... here, and ...
11355         (build_secondary_vtable): ... here.
11356
11357         * pt.c (tsubst_decl): Fix formatting.
11358
11359 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11360
11361         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
11362         (avoid_overlap, build_base_field): Likewise.
11363         (build_base_field, build_base_fields, is_empty_class):
11364         Test DECL_SIZE with integer_zero.
11365         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
11366         * cp-tree.h (struct lang_type): New field size_unit.
11367         (CLASSTYPE_SIZE_UNIT): New macro.
11368         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
11369         (cp_finish_decl): Delete -Wlarger-than processing.
11370         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
11371         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
11372         * tree.c (make_binfo): binfo vector is one entry longer.
11373         (walk_tree): Walk DECL_SIZE_UNIT.
11374
11375 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
11376
11377         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
11378         comment.
11379         (build_vtable_entry): Don't assume all vtable entries are
11380         functions.
11381         (build_vtbl_initializer): Adjust accordingly.
11382         (get_vtable_decl): Fix formatting.
11383
11384 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
11385
11386         * semantics.c (deferred_type_access_control): Walk the entire
11387         type_lookups list.
11388         (save_type_access_control): Rename from
11389         initial_deferred_type_access_control.  Just remember the value.
11390         (decl_type_access_control): New fn.
11391         (begin_function_definition): Use deferred_type_access_control, after
11392         we've started the function.  Set type_lookups to error_mark_node.
11393         * parse.y (frob_specs, fn.def1): Adjust.
11394         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11395         (parse_end_decl, parse_bitfield0, parse_method): New fns.
11396         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11397         (after_type_component_declarator0): Likewise.
11398         (after_type_component_declarator): Likewise.
11399         (notype_component_declarator): Likewise.
11400         * cp-tree.h: Adjust.
11401
11402         * decl.c (redeclaration_error_message): Allow redeclaration of
11403         namespace-scope decls.
11404
11405 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11406
11407         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11408
11409 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
11410
11411         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11412         * decl2.c (grokclassfn): Likewise.
11413
11414         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11415
11416         * decl2.c (lang_decode_option): Don't set default message length
11417         here.
11418         * lex.c (lang_init_options): Set it here.
11419
11420 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
11421
11422         Make DECL_CONTEXT mean the class in which a member function was
11423         declared, even for a virtual function.
11424         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11425         (DECL_FRIEND_CONTEXT): New macro.
11426         (DECL_REAL_CONTEXT): Remove.
11427         (SET_DECL_FRIEND_CONTEXT): Likewise.
11428         (DECL_VIRTUAL_CONTEXT): Adjust.
11429         (DECL_CLASS_SCOPE_P): Use TYPE_P.
11430         (add_friends): Remove.
11431         (hack_decl_function_context): Likewise.
11432         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
11433         CP_DECL_CONTEXT.
11434         (build_over_call): Fix indentation.  Use DECL_CONTEXT
11435         instead of DECL_CLASS_CONTEXT.
11436         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
11437         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11438         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11439         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
11440         (build_base_field): Likewise.
11441         (finish_struct_1): Likewise.
11442         (build_self_reference): Likewise.
11443         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
11444         DECL_REAL_CONTEXT.
11445         (pushtag): Use decl_function_context, not
11446         hack_decl_function_context.
11447         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11448         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11449         (pushdecl): Remove bogus code.
11450         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11451         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11452         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11453         Use decl_function_context, nothack_decl_function_context.
11454         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11455         (grokdeclarator): Likewise.  Use decl_function_context, not
11456         hack_decl_function_context.
11457         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
11458         (start_function): Use DECL_FRIEND_CONTEXT, not
11459         DECL_CLASS_CONTEXT.  Use decl_function_context, not
11460         hack_decl_function_context.
11461         (finish_function): Use decl_function_context, not
11462         hack_decl_function_context.
11463         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11464         DECL_CLASS_CONTEXT.
11465         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11466         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11467         (grokfield): Likewise.
11468         (finish_builtin_type): Likewise.
11469         (finish_vtable_vardec): Use decl_function_context, not
11470         hack_decl_function_context.
11471         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11472         (start_static_initialization_or_destruction): Likewise.
11473         (finish_static_initialization_or_destruction): Likewise.
11474         (mark_used): Adjust logic for deciding when to synthesize methods.
11475         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11476         DECL_REAL_CONTEXT.
11477         * error.c (dump_function_decl): Use DECL_CONTEXT, not
11478         DECL_CLASS_CONTEXT.
11479         * friend.c (is_friend): Likewise.
11480         (add_friends): Remove.
11481         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11482         * lex.c (begin_definition_of_inclass_inline): Use
11483         decl_function_context, not hack_decl_function_context.
11484         (process_next_inline): Likewise.
11485         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11486         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11487         DECL_CLASSS_CONTEXT.
11488         (hack_identifier): Likewise.
11489         (synthesize_method):  Use decl_function_context, not
11490         hack_decl_function_context.
11491         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11492         DECL_REAL_CONTEXT.
11493         (is_member_template): Use decl_function_context, not
11494         hack_decl_function_context.  Use DECL_CONTEXT, not
11495         DECL_CLASS_CONTEXT.
11496         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11497         DECL_CLASS_CONTEXT.
11498         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11499         DECL_REAL_CONTEXT.
11500         (push_template_decl_real): Likewise.
11501         (instantiate_class_template): Don't call add_friends.
11502         (tsubst_default_argument): Use DECL_CONTEXT, not
11503         DECL_REAL_CONTEXT.
11504         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11505         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11506         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11507         DECL_CLASS_CONTEXT.
11508         * repo.c (repo_inline_used): Likewise.
11509         * search.c (current_scope): Adjust for new _CONTEXT macros.
11510         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11511         DECL_REAL_CONTEXT.
11512         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11513         (lookup_fnfields_here):Likewise.
11514         (check_final_overrider): Likewise.
11515         (init_vbase_pointers): Likewise.
11516         (virtual_context): Likewise.
11517         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11518         (expand_body): Use decl_function_context, not
11519         hack_decl_function_context.
11520         * tree.c (hack_decl_function_context): Remove.
11521         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11522         DECL_CLASS_CONTEXT.
11523         * typeck2.c (error_not_base_type): Likewise.
11524
11525 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
11526
11527         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11528
11529 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11530
11531         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11532
11533 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
11534
11535         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11536
11537 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11538
11539         * decl2.c (lang_decode_option): Enable automatic line wrapping.
11540
11541 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
11542
11543         * parse.y (frob_specs): Split out...
11544         (parse_decl): From here.
11545         (fn.def2): Call initial_deferred_type_access_control.
11546         (after_type_component_declarator0): Call frob_specs.
11547         (notype_component_declarator0): Likewise.
11548         * search.c (friend_accessible_p): Nested classes are friends of their
11549         enclosing classes.
11550
11551 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
11552
11553         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11554         used to create an implicit temporary.
11555
11556         * class.c (dfs_modify_vtables): Tweak calculation of functions to
11557         override.
11558
11559 2000-02-08  Nathan Sidwell  <nathan@acm.org>
11560
11561         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11562         strip array element qualifiers too.
11563
11564 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
11565
11566         * decl.c (store_parm_decls): Don't build cleanups for parameters
11567         while processing_template_decl.
11568
11569 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
11570
11571         * cp-tree.h (struct saved_scope): Add incomplete field.
11572         (namespace_scope_incomplete): New macro.
11573         * decl.c (pushdecl): Use it.
11574         (hack_incomplete_structures): Use it.  See through artificial
11575         binding levels.
11576         (mark_saved_scope): Mark it.
11577
11578         Implement access control for nested types.
11579         * search.c (type_access_control): New fn.
11580         (accessible_p): Now we do perform access control for types.
11581         * semantics.c (deferred_type_access_control): New fn.
11582         (initial_deferred_type_access_control): New fn.
11583         (begin_function_definition): Call it.  Add lookups parm.
11584         * decl.c (struct binding_level): Add this_class field.
11585         (pushlevel_class): Set it.
11586         (mark_binding_level): Mark it.
11587         (lookup_name_real): Use it.  Call type_access_control.
11588         (mark_saved_scope): Mark lookups field.
11589         * cp-tree.h (flagged_type_tree): Add lookups field.
11590         (struct saved_scope): Add lookups field.
11591         (type_lookups): New macro.
11592         * parse.y (declmods): Now <ftype>.
11593         (parse_decl): Add lookups parm.  Call
11594         initial_deferred_type_access_control.
11595         (lang_extdef): Clear type_lookups.
11596         (typed_declspecs, declmods, typespec): Set lookups field.
11597         (initdcl): Call deferred_type_access_control.
11598         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11599         component_decl_1, named_parm): Adjust.
11600         * friend.c (is_friend): Nested classes are friends of their
11601         enclosing classes.
11602
11603         * class.c (currently_open_derived_class): New fn.
11604         * method.c (hack_identifier): Use it.
11605
11606         * lex.c (do_identifier): Remove obsolete code.
11607
11608         * parse.y (typed_typespecs): Propagate new_type_flag properly.
11609
11610 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
11611
11612         * tinfo.h: Remove apostrophes from C++ comment (xgettext
11613         thinks this file is plain C).
11614
11615 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11616
11617         * Makefile.in (call.o): Depend on $(EXPR_H).
11618
11619         * call.c: Include "expr.h".
11620
11621         * class.c (dump_class_hierarchy): Add prototype.
11622
11623         * search.c (dfs_get_pure_virtuals): Likewise.
11624
11625 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
11626
11627         * parse.y (simple_stmt): Allow :: token in asm parameter list.
11628         * parse.c: Rebuilt.
11629
11630 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
11631
11632         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11633         Store it in DECL_FCONTEXT.
11634         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11635
11636 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
11637
11638         * tinfo.h (old abi): #include "tconfig.h".
11639         * tinfo.cc (convert_to_base): Move into old abi section.
11640
11641 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
11642
11643         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11644         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11645         (BINFO_PRIMARY_BINFO): New macro.
11646         (BF_DELTA): Rename to ...
11647         (BV_DELTA): ... this.
11648         (BF_VCALL_INDEX): Rename to ...
11649         (BV_VCALL_INDEX): ... this.
11650         (BF_FN): Rename to ...
11651         (BV_FN): ... this.
11652         * class.c (build_vbase_path): Adjust for changes to reverse_path.
11653         (set_rtti_entry): Rename BF_ macros to BV_ variants.
11654         (modify_vtable_entry): Simplify.
11655         (add_virtual_function): Rename BF_ macros to BV_ variants.
11656         (build_vtable_initializer): Likewise.
11657         (get_class_offset_1): Remove.
11658         (dfs_get_class_offset): Likewise.
11659         (get_class_offset): Likewise.
11660         (dfs_find_final_overrider): New function.
11661         (find_final_overrider): Likewise.
11662         (modify_one_vtable): Remove.
11663         (dfs_find_base): New function.
11664         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
11665         find_final_overrider.
11666         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
11667         virtuals.
11668         (dfs_fixup_vtable_deltas): Remove.
11669         (override_one_vtable): Remove.
11670         (merge_overrides): Likewise.
11671         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11672         unreal chilren of virtual bases.
11673         (finish_struct_1): Don't use merge_overrides.  Don't use
11674         dfs_fixup_vtable_deltas.
11675         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11676         BINFOs.
11677
11678 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11679             Jason Merrill  <jason@yorick.cygnus.com>
11680
11681         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11682
11683 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
11684
11685         * exception.cc (__throw_bad_typeid): Add missing std::.
11686
11687 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11688
11689         * cp-tree.h (make_thunk): PROTO -> PARAMS.
11690
11691 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
11692
11693         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11694
11695         Runtime support for new-abi rtti.
11696         * inc/typeinfo (type_info::operator!=): Define in class.
11697         (type_info::before, type_info::name, type_info::operator==,
11698         type_info::operator!=): Define new ABI implementations.
11699         (type_info::is_pointer_p, type_info::is_function_p): Declare
11700         new virtual functions.
11701         (type_info::do_catch, type_info::do_upcast): Likewise.
11702
11703         * tinfo.h (__base_class_info): Define new class.
11704         (__class_type_info): Likewise.
11705         (__si_class_type_info): Likewise.
11706         (__vmi_class_type_info): Likewise.
11707         (__dynamic_cast): Prototype.
11708
11709         * tinfo.cc: Conditionalize old and new rtti mechanisms.
11710         (type_info::is_pointer_p): Define new function.
11711         (type_info::is_function_p): Likewise.
11712         (type_info::do_catch): Likewise.
11713         (type_info::do_upcast): Likewise.
11714         (vtable_prefix): New structure for vtable access.
11715         (adjust_pointer): Define new template function.
11716         (contained_p, public_p, virtual_p, contained_public_p,
11717         contained_nonpublic_p, contained_nonvirtual_p): Define new
11718         functions.
11719         (nonvirtual_base_type): New local variable.
11720         (__class_type_info::~__class_type_info): Define.
11721         (__si_class_type_info::~__si_class_type_info): Likewise.
11722         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11723         (__class_type_info::do_catch): Define new function.
11724         (__class_type_info::do_upcast): Likewise.
11725         (__class_type_info::find_public_src): Likewise.
11726         (__class_type_info::do_find_public_src): Likewise.
11727         (__si_class_type_info::do_find_public_src): Likewise.
11728         (__vmi_class_type_info::do_find_public_src): Likewise.
11729         (__class_type_info::do_dyncast): Likewise.
11730         (__si_class_type_info::do_dyncast): Likewise.
11731         (__vmi_class_type_info::do_dyncast): Likewise.
11732         (__class_type_info::do_upcast): Likewise.
11733         (__si_class_type_info::do_upcast): Likewise.
11734         (__vmi_class_type_info::do_upcast): Likewise.
11735         (__dynamic_cast): Likewise.
11736
11737         * tinfo2.cc (__fundamental_type_info): Define new class.
11738         (__pointer_type_info): Likewise.
11739         (__reference_type_info): Likewise.
11740         (__array_type_info): Likewise.
11741         (__function_type_info): Likewise.
11742         (__enum_type_info): Likewise.
11743         (__ptr_to_member_type_info): Likewise.
11744         (__fundamental_type_info::~__fundamental_type_info): Define.
11745         (__pointer_type_info::~__pointer_type_info): Likewise.
11746         (__reference_type_info::~__reference_type_info): Likewise.
11747         (__array_type_info::~__array_type_info): Likewise.
11748         (__function_type_info::~__function_type_info): Likewise.
11749         (__enum_type_info::~__enum_type_info): Likewise.
11750         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11751         (__pointer_type_info::do_catch): Define new function.
11752         (__ptr_to_member_type_info::do_catch): Define new function.
11753
11754         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11755         (__is_pointer): Likewise.
11756
11757         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11758
11759 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
11760
11761         * cp/class.c (build_vtable): Rename to build_primary_vtable.
11762         (prepare_fresh_vtable): Rename to build_secondary_vtable.
11763         (make_new_vtable): New function.
11764         (modify_vtable_entry): Handle generation of new vtables correctly.
11765         (modify_one_vtable): Remove unused parameter.
11766         (dfs_fixup_vtable_deltas): Likewise.
11767         (override_one_vtable): Use build_secondary_vtable.
11768         (finish_struct_1): Use build_primary_vtable and
11769         build_secondary_vtable.
11770
11771 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
11772
11773         * cp/decl.c: Adjust variable names, comments, help strings.
11774
11775 2000-01-29  Nathan Sidwell  <nathan@acm.org>
11776
11777         * new2.cc (operator delete[]): Use operator delete, don't assume
11778         implementation.
11779
11780 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
11781
11782         * class.c (build_vtbl_initializer): Add argument to
11783         build_vtable_entry call.
11784
11785 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
11786
11787         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11788         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11789         (BF_DELTA): New macro.
11790         (BF_VCALL_INDEX): Likewise.
11791         (BF_FN): Likewise.
11792         (THUNK_VCALL_OFFSET): Likewise.
11793         (make_thunk): Change prototype.
11794         * class.c (build_vtable_entry): Integrate
11795         build_vtable_entry_for_fn.  Handle vcall indices.
11796         (build_vtable_entry_for_fn): Remove.
11797         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
11798         BF_VCALL_INDEX, BF_FN.
11799         (modify_vtable_entry): Integrate common code from
11800         modify_one_vtable and dfs_fixup_vtable_deltas.
11801         (add_virtual_function): Set BF_VCALL_INDEX.
11802         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
11803         and BF_FN.
11804         (modify_one_vtable): Simplify.
11805         (dfs_fixup_vtable_deltas): Likewise.
11806         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11807         * method.c (make_thunk): Handle vcall indices.
11808
11809 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
11810
11811         Compiler side new abi rtti (not enabled).
11812         * cp-tree.h (new_abi_rtti_p): New macro.
11813         (emit_support_tinfos): Prototype new function.
11814         (tinfo_decl_p): Likewise.
11815         (emit_tinfo_decl): Likwise.
11816         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11817         macros.
11818         (doing_runtime): New local static.
11819         (init_rtti_processing): Add new-abi initializer.
11820         (get_tinfo_decl): Add new-abi logic.
11821         (tinfo_from_decl): Likewise.
11822         (build_dynamic_cast_1): Likewise.
11823         (qualifier_flags): New static function.
11824         (tinfo_base_init): Likewise.
11825         (generic_initializer): Likewise.
11826         (ptr_ref_initializer): Likewise.
11827         (ptmd_initializer): Likewise.
11828         (class_hint_flags): Likewise.
11829         (class_initializer): Likewise.
11830         (synthesize_tinfo_var): Likewise.
11831         (create_real_tinfo_var): Likewise.
11832         (create_pseudo_type_info): Likewise.
11833         (get_vmi_pseudo_type_info): Likewise.
11834         (create_tinfo_types): Likewise.
11835         (emit_support_tinfos): New global function.
11836         (tinfo_decl_p): New global predicate.
11837         (emit_tinfo_decl): New global function.
11838         * class.c (set_rtti_entry): Generalize for old and new rtti.
11839         (build_vtbl_initializer): Likewise.
11840         * decl2.c (finish_file): Likewise.
11841
11842 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
11843
11844         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11845         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11846
11847 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
11848
11849         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11850         for scopes.
11851
11852 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
11853
11854         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11855
11856 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
11857
11858         * optimize.c (calls_setjmp_r): Supply new argument
11859         to special_function_p.
11860
11861 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11862
11863         * call.c: PROTO -> PARAMS.
11864         * class.c: Likewise.
11865         * cp-tree.h: Likewise.
11866         * cvt.c: Likewise.
11867         * decl.c: Likewise.
11868         * decl.h: Likewise.
11869         * decl2.c: Likewise.
11870         * dump.c: Likewise.
11871         * errfn.c: Likewise.
11872         * error.c: Likewise.
11873         * except.c: Likewise.
11874         * expr.c: Likewise.
11875         * init.c: Likewise.
11876         * input.c: Likewise.
11877         * lex.c: Likewise.
11878         * lex.h: Likewise.
11879         * method.c: Likewise.
11880         * optimize.c: Likewise.
11881         * parse.y: Likewise.
11882         * pt.c: Likewise.
11883         * repo.c: Likewise.
11884         * rtti.c: Likewise.
11885         * search.c: Likewise.
11886         * semantics.c: Likewise.
11887         * spew.c: Likewise.
11888         * tree.c: Likewise.
11889         * typeck.c: Likewise.
11890         * typeck2.c: Likewise.
11891         * xref.c: Likewise.
11892
11893 2000-01-25  Richard Henderson  <rth@cygnus.com>
11894
11895         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11896
11897 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
11898
11899         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11900         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11901         (struct vcall_offset_data_s): New type.
11902         (dfs_vcall_offset_queue_p): New function.
11903         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11904         (build_vcall_offset_vtbl_entries): Likewise.
11905         (layout_vtable_decl): Likewise.
11906         (num_vfun_entries): Likewise.
11907         (num_extra_vtbl_entries): Add the entries for vcall offsets.
11908         (build_vtbl_initializer): Likewise.
11909         (dfs_finish_vtabls): Use layout_vtable_decl.
11910         (modify_one_vtables): Always duplicate vtables under the new ABI.
11911         (finish_struct_1): Use layout_vtable_decl.
11912
11913 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11914
11915         * decl.c (member_function_or_else): Change third arg from a format
11916         specifier to an `enum overload_flags'.  Callers changed.
11917
11918 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11919
11920         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11921         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11922         build_const_cast, get_delta_difference, check_return_expr): Avoid
11923         ANSI string concatenation usage.
11924
11925 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
11926
11927         * class.c (layout_class_type): Put the fields required to make a
11928         class non-empty at the end, not the beginning, of the TYPE_FIELDs
11929         list.
11930
11931 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
11932
11933         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11934         template.
11935
11936         * decl2.c (mark_used): Do instantiate inlines that have been
11937         explicitly instantiated.
11938
11939 2000-01-24  Richard Henderson  <rth@cygnus.com>
11940
11941         * call.c (build_over_call): Use expand_tree_builtin.
11942         * typeck.c (build_function_call_real): Likewise.
11943         (build_binary_op_nodefault): Handle unordered compares.
11944
11945 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11946
11947         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11948         cp_tree_index values.
11949         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11950         New global node #defines for them.
11951         * rtti.c (call_void_fn): Replace with ...
11952         (build_runtime_decl): ... new static function.
11953         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11954         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11955         (build_dynamic_cast_1): Always produce correctly typed result.
11956         Explicitly produce type_info addresses. Use dynamic_cast_node.
11957         * exception.cc (__throw_bad_cast): Return `void *'.
11958         (__throw_bad_typeid): Return `const type_info &'.
11959
11960 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11961
11962         * cp-tree.h (get_vtable_decl): Prototype new function.
11963         * class.c (get_vtable_decl): New function. Broken out from ...
11964         (build_vtable): ... here. Use it.
11965         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11966         by get_vtable_decl.
11967
11968 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11969
11970         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11971         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11972         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11973         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11974         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11975         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11976         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11977         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11978         (CPTI_TINFO_VAR_ID): New enumeration.
11979         (__tp_desc_type_node, __access_mode_type_node,
11980         __bltn_desc_type_node, __user_desc_type_node,
11981         __class_desc_type_node, __ptr_desc_type_node,
11982         __attr_desc_type_node, __func_desc_type_node,
11983         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11984         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11985         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11986         enum_desc_type_node, class_desc_type_node,
11987         si_class_desc_type_node, vmi_class_desc_type_node,
11988         ptmd_desc_type_node, base_desc_type_node): New #defines.
11989         (tinfo_fn_id, tinfo_fn_type): Rename to ...
11990         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11991         (tinfo_var_id): New enumeration.
11992         (DECL_TINFO_FN_P): Augment comment.
11993         * decl.c (cp_global_trees): Adjust documentation.
11994         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11995         tinfo_decl_type and tinfo_var_id.
11996         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11997         (build_typeid): Remove unused variable.
11998         (get_tinfo_var): Use tinfo_var_id.
11999         (tinfo_name): New static function.
12000         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
12001         (tinfo_from_decl): Likewise.
12002         (get_base_offset): New static function, broken out of
12003         expand_class_desc.
12004         (expand_si_desc): Use tinfo_name.
12005         (expand_class_desc): Likewise. Lose local static variable.
12006         Use base_desc_type_node. Use get_base_offset.
12007         (expand_ptr_desc): Use tinfo_name.
12008         (expand_attr_desc): Likewise.
12009         (expand_generic_desc): Likewise.
12010
12011         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
12012         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
12013
12014 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12015
12016         * cp-tree.h (__eprintf): Remove declaration.
12017         * tree.c (__eprintf): Remove definition.
12018
12019 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
12020             Mark Mitchell  <mark@codesourcery.com>
12021
12022         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
12023         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
12024
12025 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
12026
12027         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
12028
12029 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12030
12031         * cp-tree.h (register_dtor_fn): New function.
12032         * decl.c (destroy_local_static): Rename to ...
12033         (register_dtor_fn): ... this.  Give it external linkage.
12034         (expand_static_init): Use it.
12035         * decl2.c (do_static_initialization): Likewise, if using
12036         __cxa_atexit.
12037         (do_static_destruction): Check that __cxa_atexit is not in use.
12038         (finish_file): Don't call do_static_destruction if using
12039         __cxa_atexit.
12040
12041         * typeck.c (convert_arguments): Restore two-message error
12042         reporting.
12043
12044 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
12045
12046         Remap dynamic cast hint values to be consistent across ABIs.
12047         * search.c (dynamic_cast_base_recurse): Remap generated value.
12048         (get_dynamic_cast_base_type): Adjust documentation.
12049         * tinfo.h (__user_type_info::dyncast): Likewise.
12050         (__user_type_info::find_public_subobj): Remap BOFF meaning.
12051         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
12052         (__class_type_info::do_dyncast): Likewise.
12053         (__class_type_info::do_find_public_subobj): Likewise.
12054         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
12055
12056 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12057
12058         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
12059
12060         * typeck2.c (incomplete_type_error): Restore previous
12061         cp_error and cp_error_at call sequence.
12062
12063 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
12064
12065         * class.c (dump_class_hierarchy): Make format agree with argument;
12066         cast pointer to unsigned long and print with %lx.
12067
12068 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
12069
12070         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
12071
12072         * typeck.c (composite_pointer_type, common_type,
12073         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
12074         build_function_call_real, convert_arguments,
12075         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
12076         build_unary_op, mark_addressable, build_compound_expr,
12077         build_static_cast, build_reinterpret_cast, build_const_cast,
12078         build_c_cast, build_modify_expr, get_delta_difference,
12079         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
12080         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
12081         into a single one.
12082         * typeck2.c (readonly_error, abstract_virtuals_error,
12083         process_init_constructor, check_for_new_type): Likewise.
12084
12085 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
12086
12087         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
12088         VAR_DECLs.
12089
12090 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
12091
12092         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
12093         (build_x_typeid): Likewise.
12094         (get_tinfo_fn): Likewise.
12095         (get_tinfo_fn_unused): Rename to ...
12096         (get_tinfo_decl): ... here.
12097         * rtti.c (build_headof): Replace logic error with assertion.
12098         (get_tinfo_fn_dynamic): Rename to ...
12099         (get_tinfo_decl_dynamic): ... here. Make static. Use
12100         complete_type_or_else.
12101         (build_x_typeid): Move into ...
12102         (build_typeid): ... here. Adjust call to
12103         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
12104         throw_bad_typeid expression.
12105         (get_tinfo_fn_unused): Rename to ...
12106         (get_tinfo_decl): ... here. Adjust comment.
12107         (get_tinfo_fn): Delete.
12108         (tinfo_from_decl): New static function.
12109         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
12110         (get_typeid): Use complete_type_or_else.
12111         (build_dynamic_cast_1): Adjust calls to
12112         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
12113         * parse.y (primary): Adjust call to build_typeid.
12114         * except.c (build_eh_type_type_ref): Adjust call to
12115         get_tinfo_decl. Mark as used.
12116         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
12117         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
12118         * parse.c: Regenerated.
12119
12120 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
12121
12122         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
12123         calling convention.
12124         (resolves_to_fixed_type_p): Document calling convention.
12125         * rtti.c (build_x_typeid): Initialize NONNULL.
12126
12127         * cp-tree.h (build_shared_int_cst): New function.
12128         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
12129         * class.c (modify_vtable_entry): Likewise.
12130         (add_virtual_function): Split out code to generated shared
12131         INTEGER_CSTs to build_share_int_cst.
12132         (modify_all_vtables): Handle all the overridden functions here.
12133         Add overridden functions from non-primary virtual bases to the
12134         primary vtable.
12135         (finish_struct_1): Adjust call to modify_all_vtables.  Add
12136         overridden functions from non-primary bases to the vtable.
12137         * tree.c (build_shared_int_cst): New function.
12138
12139         * cp-tree.h (scratchalloc): Remove.
12140         (build_scratch_list): Likewise.
12141         * call.c (convert_class_to_reference): Replace build_scratch_list
12142         and build_expr_list with build_tree_list.
12143         (add_candidate): Replace scratchalloc with expralloc.  Note memory
12144         leak.
12145         (build_user_type_conversion_1):  Replace build_scratch_list
12146         and build_expr_list with build_tree_list.
12147         (build_new_op): Likewise.
12148         (build_op_delete_call): Likewise.
12149         (convert_like): Likewise.
12150         * cvt.c (ocp_convert): Likewise.
12151         * decl.c (start_decl): Likewise.
12152         (start_function): Likewise.
12153         (finish_destructor_body): Likewise.
12154         (maybe_build_cleanup_1): Likewise.
12155         * decl2.c (reparse_decl_as_expr): Likewise.
12156         * init.c (perform_member_init): Likewise.
12157         (expand_cleanup_for_base): Likewise.
12158         (build_builtin_delete_call): Likewise.
12159         (build_new_1): Likewise.
12160         (build_delete): Likewise.
12161         * method.c (do_build_assign_ref): Likewise.
12162         * parse.y (already_scoped_stmt): Likewise.
12163         (nontrivial_exprlist): Likewise.
12164         (net_initializer): Likewise.
12165         (initlist): Likewise.
12166         * parse.c: Regenerated.
12167         * rtti.c (build_x_typeid): Likewise.
12168         (build_dynamic_cast_1): Likewise.
12169         * typeck.c (build_x_compound_expr): Likewise.
12170         (build_static_cast): Likewise.
12171         (build_modify_expr): Likewise.
12172
12173         * cp-tree.h (DECL_VINDEX): Add documentation.
12174         * class.c (build_vtable_entry): Likewise.
12175         (start_vtable): Add comment.
12176         (add_virtual_function): Replace pending_hard_virtuals with
12177         overridden_virtuals and pending_virtuals with new_virtuals.
12178         Replace redundant assignments with assertions.
12179         (check_for_override): Add comment.
12180         (check_bases_and_members): Replace pending_hard_virtuals with
12181         overridden_virtuals and pending_virtuals with new_virtuals.
12182         (create_vtbl_ptr): Likewise.
12183         (layout_class_type): Likewise.
12184         (finish_struct_1): Likewise.  Add comments.
12185
12186 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
12187
12188         * class.c (finish_struct_1): Replace redundant code with
12189         assertions.
12190
12191         * cp-tree.h (flag_new_abi): Move.
12192         (flag_use_cxa_atexit): Likewise.
12193         (flag_honor_std): Likewise.
12194         (flag_rtti): Likewise.
12195         (vbase_offsets_in_vtable_p): Define.
12196         (vptrs_present_everywhere_p): Likewise.
12197         (TYPE_CONTAINS_VPTR_P): Likewise.
12198         (dfs_walk_real): Declare.
12199         * class.c (build_vbase_pointer_fields): Check
12200         vbase_offsets_in_vtable_p.
12201         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
12202         BINFO_VPTR_FIELD.
12203         (build_vbase_offset_vtbl_entries): Simplify.
12204         (build_vbase_offset_vtbl_entries): Adjust.
12205         (build_vbase_pointer): Add ability to look up vbase offsets in
12206         vtable.
12207         (start_vtable): New function.
12208         (add_virtual_function): Use it.
12209         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
12210         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
12211         (build_vtbl_initializer): Take the type of the complete object as
12212         input.  Use it to correctly calculate vbase offsets.
12213         (dfs_finish_vtbls): Pass the complete type to
12214         build_vtbl_initializer.
12215         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
12216         (create_vtable_ptr): Create a vtable even if there are no
12217         new virtual functions, under the new ABI.
12218         (finish_struct_1): Likewise.
12219         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
12220         * decl.c (exapnd_static_init): Remove call to
12221         preserve_initializer.
12222         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
12223         vtables.
12224         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
12225         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
12226         (construct_virtual_bases): Don't initialize virtual base pointers
12227         under the new ABI.
12228         (build_aggr_init): Clean up comment.
12229         (expand_aggr_init_1): Likewise.
12230         * rtti.c (expand_class_desc): Store the virtual function table
12231         index where the vbase offset lives in the offset field.
12232         * search.c (dfs_walk_real): Make it global.
12233         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
12234         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
12235
12236         * tinfo.h (USItype): Make it signed under the new ABI.
12237         * tinfo.cc (convert_to_base): New function.  Encapsulate base
12238         conversion logic here.
12239         (__class_type_info::do_upcast): Use it.
12240         (__class_type_info::do_dyncast): Likewise.
12241         (__class_type_info::do_find_public_subobj): Likewise.
12242
12243         * init.c (construct_virtual_bases): Don't look up the addresses of
12244         virtual bases at run-time.
12245
12246         * class.c (build_vbase_pointer): Relocate.
12247         (build_vbase_pointer_fields): Likewise.
12248         (dfs_build_vbase_offset_vtbl_entries): Likewise.
12249         (build_vbase_offset_vtbl_entries): Likewise.
12250
12251         * decl.c (init_decl_processing): Complain if -fnew-abi
12252         -fno-vtable-thunks is used.
12253
12254         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
12255         flag_new_abi.
12256
12257 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
12258
12259         * cp-tree.h (num_extra_vtbl_entries): New function.
12260         (size_extra_vtbl_entries): Likewise.
12261         (dfs_vtable_path_unmark): Likewise.
12262         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
12263         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12264         * class.c (num_extra_vtbl_entries): New function.
12265         (size_extra_vtbl_entries): Likewise.
12266         (dfs_build_vbase_offset_vtbl_entries): New function.
12267         (build_vbase_offset_vtbl_entries): Likewise.
12268         (build_vtbl_initializer): Use it.
12269         (finish_struct_1): Adjust vtable sizes (using
12270         num_extra_vtbl_entries).
12271         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
12272         THUNK_DECL is non-NULL before expanding it.
12273         * init.c (expand_virtual_init): Adjust the vtable pointer by
12274         size_extra_vtbl_entries before storing it.
12275         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
12276         Handle TREE_LIST parameters here, not in the dfs_* functions.
12277         (dfs_unmarked_real_bases_queue_p): Adjust.
12278         (dfs_marked_real_bases_queue_p): Likewise.
12279         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
12280         (dfs_vtable_path_marked_real_bases_queue_p): New function.
12281         (dfs_vtable_path_unmark): Likewise.
12282
12283 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
12284
12285         * optimize.c (copy_body_r): Clear the operand three of a
12286         TARGET_EXPR when copying it.
12287
12288 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12289
12290         * method.c (build_decl_overload_real): Check whether we are in ::
12291         before returning __builtin_new/delete.
12292
12293 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
12294
12295         * pt.c (tsubst_friend_function): Improve comment.
12296         (instantiate_decl): Avoid crashing when a "nested" function is
12297         instantiated from the top level.
12298
12299         * dump.c (dqeueue_and_dump): Dump
12300         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
12301
12302 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12303
12304         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
12305
12306 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
12307
12308         * g++spec.c (lang_specific_driver): Add -fnew-abi if
12309         ENABLE_NEW_GXX_ABI defined.
12310         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
12311         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
12312         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
12313
12314 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
12315
12316         * decl.c (start_cleanup_fn): Call pushdecl.
12317
12318         * call.c (convert_class_to_reference): Fix typos.
12319         (build_conditional_expr): Handle errors gracefully.
12320         * class.c (push_nested_class): Likewise.
12321         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
12322         (DECL_THIS_EXTERN): Use it.
12323         (DECL_THIS_STATIC): Likewise.
12324         * cvt.c (convert_to_void): Handle errors gracefully.
12325         (build_expr_type_conversion): Likewise.
12326         * decl.c (maybe_push_decl): Likewise.
12327         (start_decl_1): Likewise.
12328         (require_complete_types_for_parms): Likewise.
12329         * parse.y (structsp): Likewise.
12330         (base_class): Likewise.
12331         * parse.c: Regenerated.
12332         * pt.c (finish_member_template_decl): Likewise.
12333         * typeck.c (decay_conversion): Likewise.
12334
12335         * cp-tree.h (dfs_skip_vbases): New function.
12336         (find_vbase_instance): Likewise.
12337         * class.c (determine_primary_base): Allow a nearly empty base to
12338         serve as a primary base class under the new ABI.
12339         (get_class_offset_1): Rename to ...
12340         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
12341         messages here.
12342         (get_class_offset): Use it.  Issue error messages here.
12343         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
12344         find the right copies of virtual bases.
12345         (fixup_vtable_deltas1): Rename to ...
12346         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
12347         bases as primary bases.
12348         (fixup_vtable_deltas): Remove.
12349         (override_one_vtable): Handle virtual bases as primary bases.
12350         (merge_overrides): Likewise.
12351         (finish_struct_1): Likewise.
12352         (dump_class_hierarchy): Dump primary-ness of bases as well.
12353         * search.c (mark_primary_bases): Use a pre-order traversal to
12354         handle primary virtual bases.
12355         (dfs_skip_vbases): New fiunction.
12356         (expand_upcast_fixups): Adjust to handle primary virtual bases.
12357         (fixup_virtual_upcast_offsets): Likewise.
12358         (fixup_all_virtual_upcast_offsets): Likewise.
12359         (dfs_find_vbase_instances): New function.
12360         (find_vbase_instance): Likewise.
12361
12362 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12363
12364         * lex.c (DIR_SEPARATOR): Delete macro.
12365
12366 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12367
12368        * decl2.c (lang_decode_option): Handle automatic line wrapping
12369        option.
12370
12371 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
12372
12373         * friend.c (do_friend): Don't resolve scopes when processing
12374         template declarations, even if the qualifying scope doesn't
12375         involve template parameters.
12376
12377 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
12378
12379         * class.c (dfs_modify_vtables_queue_p): Remove.
12380         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
12381         and dfs_marked_real_bases_queue_p instead of
12382         dfs_modify_vtables_queue_p.
12383
12384         * class.c (build_vbase_path): Simplify.
12385         (dfs_propagate_binfo_offsets): New function.
12386         (propagate_binfo_offsets): Use it.
12387         (remove_base_field): Simplify.
12388         (dfs_set_offset_for_vbases): Remove.
12389         (dfs_set_offset_for_shared_vbases): New function.
12390         (dfs_set_offset_for_unshared_vbases): Likewise.
12391         (layout_virtual_bases): Use them.
12392         (layout_basetypes): Don't call propagate_binfo_offsets.
12393         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12394         for the vbases.
12395
12396         * class.c (build_base_field): New function, split out from ...
12397         (build_base_fields): ... here.  Use it.  Allocate primary bases
12398         first, under the new ABI.
12399         (get_vtable_entry): Remove.
12400         (remove_base_field): New function, split out from ...
12401         (remove_base_fields): ... here.  Adjust since primary bases come
12402         first under the new ABI.
12403
12404         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12405         (initialize_vtbl_ptrs): New function.
12406         (expand_indirect_vtbls_init): Change prototype.
12407         (convert_pointer_to_vbase): Declare.
12408         * init.c (expand_direct_vtbls_init): Remove.
12409         (dfs_initialize_vtbl_ptrs): New function.
12410         (initialize_vtbl_ptrs): Likewise.
12411         (emit_base_init): Use initialize_vtbl_ptrs.
12412         * search.c (convert_pointer_to_vbase): Make it global.
12413         (expand_indirect_vtbls_init): Remove vtable initialization code.
12414         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12415
12416         * class.c (dfs_finish_vtbls): New function.
12417         (finish_vtbls): Use it.
12418         (dump_class_hierarchy): New function.
12419
12420         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12421         (BINFO_VBASE_PRIMARY_P): New macro.
12422         (BINFO_VIRTUALS): Add to documentation.
12423         (SET_BINFO_PRIMARY_MARKED_P): Remove.
12424         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12425         (dfs_mark_primary_bases_queue_p): Likewise.
12426         (dfs_unmarked_real_bases_queue_p): New function.
12427         (dfs_marked_real_bases_queue_p): Likewise.
12428         * search.c (dfs_mark_primary_bases): Adjust.
12429         (mark_primary_bases): Likewise.
12430         (get_shared_vbase_if_not_primary): New function.
12431         (dfs_unmarked_real_bases_queue_p): Likewise.
12432         (dfs_marked_real_bases_queue_p): Likewise.
12433         (dfs_get_pure_virtuals): Simplify.
12434         (get_pure_virtuals): Likewise.
12435
12436 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12437
12438         * lex.c: Include tm_p.h.
12439
12440 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
12441
12442         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
12443
12444 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
12445
12446         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12447         * pt.c (instantiate_decl): Defer comdat templates that might not be
12448         needed.
12449
12450         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12451         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12452         (finish_file): Likewise.
12453
12454         * decl2.c (import_export_class): Undo 12/14 change.
12455
12456         * error.c (dump_decl): operator new, not operatornew.
12457
12458         * class.c (field_decl_cmp): A nontype is "greater" than a type.
12459         * search.c (lookup_field_1): Look for the last field with the
12460         desired name.
12461
12462 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12463
12464         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12465         FUNCTION_DECL.
12466
12467 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12468
12469         * typeck.c (build_static_cast): Don't strip target qualifiers
12470         when casting from a class.
12471
12472 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12473
12474         * class.c (warn_hidden): Initialize variable `fndecl'.
12475
12476 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
12477
12478         * decl.c (flag_isoc9x): New variable to be able to use code in
12479         c-common.c.  For now always zero.
12480
12481 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
12482
12483         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12484         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12485         or unshare_base_binfos for virtual bases here.
12486         * search.c (dfs_get_vbase_types): Do it here.
12487         (get_vbase_types): Adjust.
12488
12489 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
12490
12491         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12492         (BINFO_PRIMARY_MARKED_P): Use flag 5.
12493         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12494         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12495         (unmark_primary_bases): Remove declaration.
12496         (unmarkedp): Declare.
12497         (dfs_vbase_unmark): Likewise.
12498         * class.c (determine_primary_base): Return immediately if there
12499         are no base classes.  Call mark_primary_bases here.
12500         (modify_all_direct_vtables): Remove.
12501         (modify_all_indirect_vtables): Remove.
12502         (dfs_modify_vtables_queue_p): New function.
12503         (dfs_modify_vtables): New function.
12504         (modify_all_vtables): Use them.
12505         (build_base_fields): Build FIELD_DECLs for primary virtual base
12506         classes.
12507         (create_vtable_ptr): Don't call determine_primary_base here.
12508         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12509         (dfs_set_offset_for_vbases): ... this.
12510         (layout_virtual_bases): Use it.
12511         (layout_class_type): Call determine_primary_base here.
12512         * search.c (unmarkedp): Make it global.
12513         (shared_marked_p): Simplify.
12514         (shared_unmarked_p): Likewise.
12515         (dfs_primary_bases_queue_p): Remove.
12516         (dfs_unmark_primary_bases): Likewise.
12517         (unmark_primary_bases): Likewise.
12518         (mark_primary_bases): Simplify.
12519         (get_pure_virtuals): Don't call mark_primary_bases here.
12520         (dfs_vbase_unmark): New function.
12521         (get_vbase_types): Simplify.
12522
12523         * class.c (struct base_info): Remove.
12524         (determine_primary_base): Take has_virtual_p rather than a
12525         base_info as input.  Don't calculate max_has_virtual.
12526         (finish_struct_bits): Remove max_has_virtual argument.
12527         (create_vtable_ptr): Remove max_has_virtual_p argument.
12528         (layout_virtual_bases): Remove max argument.
12529         (layout_basetypes): Likewise.
12530         (layout_class_type): Remove max_has_virtual_p argument.
12531         (finish_struct_1): Remove max_has_virtual.
12532
12533         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12534         (layout_basetypes): Remove.
12535         * class.c (propagate_binfo_offsets): Moved here from tree.c.
12536         Update to handle primary virtual bases.
12537         (remove_base_fields): New function, split out from
12538         layout_basetypes.
12539         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12540         (layout_virtual_bases): New function, split out from
12541         layout_basetypes.  Update to handle primary virtual bases.
12542         (layout_basetypes): Moved here from tree.c.  Use
12543         remove_base_fields and layout_virtual_bases.
12544         * search.c (dfs_mark_primary_bases_queue_p): New function.
12545         (mark_primary_bases): Use it.
12546         * tree.c (CEIL): Remove.
12547         (propagate_binfo_offsets): Remove.
12548         (layout_basetypes): Remove.
12549
12550 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12551
12552         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12553         (BINFO_PRIMARY_MARKED_P): New macro.
12554         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12555         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12556         (mark_primary_bases): New function.
12557         (unmark_primary_bases): Likewise.
12558         * search.c (get_abstract_virtuals_1): Remove.
12559         (dfs_mark_primary_bases): New function.
12560         (mark_primary_bases): Likewise.
12561         (dfs_unmark_primary_bases): Likewise.
12562         (unmark_primary_bases): Likewise.
12563         (dfs_get_pure_virtuals): Likewise.
12564
12565 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12566
12567         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12568         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12569         (modify_one_vtable): Adjust.
12570         (fixup_vtable_deltas1): Likewise.
12571         (override_one_vtable): Likewise.
12572         * search.c (get_abstract_virtuals_1): Likewise.
12573         (get_pure_virtuals): Likewise.
12574         (expand_upcast_fixups): Likewise.
12575         * tree.c (debug_binfo): Likewise.
12576
12577         * class.c (build_vtable): Don't return a value.  Don't rebuild
12578         vtables for bases that have already been handled.
12579         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12580         already been handled.
12581         (modify_one_vtable): Adjust accordingly.
12582         (fixup_vtable_deltas1): Likewise.
12583         (finish_struct_1): Likewise.
12584
12585 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12586
12587         * call.c (build_new_method_call): Also check destructors.