re PR c++/5189 (g++ -c bug.cpp crashed on simple stupid file)
[platform/upstream/gcc.git] / gcc / cp / ChangeLog
1 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
2
3         PR c++/5189.
4         * call.c (add_template_candidate_real): Do not treat member
5         templates as copy constructors.
6
7 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
8
9         * decl.c (duplicate_decls): Do not copy the RTL for a variable
10         declaration if the old variable had an incomplete type and the new
11         variable does not.
12         (complete_vars): Do not call layout_decl for completed variables.
13
14 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
15
16         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
17         with an explicit one.
18         (follow_tag_typedef): New.
19         (lookup_tag): Use it to extract the tag of an explicit typedef.
20         (xref_tag): Likewise.
21
22 2002-04-11  Andrew Haley  <aph@redhat.com>
23
24         * typeck.c (type_after_usual_arithmetic_conversions):
25         If two types have the same variant, return immediately.
26         When two floating-point operands are the same precision: 
27           convert to float if one of the operands is float;
28           if neither operand is one of the standard types, return the type
29           of the first operand.
30  
31 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
32
33         PR c++/5507
34         * decl.c (make_typename_type): Remove implicit typenameness.
35
36 2002-04-09  Jason Merrill  <jason@redhat.com>
37
38         PR optimization/6189
39         * semantics.c (genrtl_start_function): Don't free
40         DECL_SAVED_FUNCTION_DATA for inline functions.
41
42         * init.c (build_member_call): For now, don't convert to
43         intermediate base if it would cause an error.
44
45 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
46
47         * parse.y (namespace_qualifier, maybe_identifier,
48         begin_explicit_instantiation, end_explicit_instantiation,
49         apparent_template_type, .finish_template_type,
50         do_id, maybe_init, defarg_again, component_decl_1):
51         Add ending ';', in accordance with POSIX.
52
53 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
54
55         PR c++/5571
56         * class.c (layout_class_type): Remember incomplete static
57         variables.
58         (finish_struct_1): Call complete_vars, not
59         hack_incomplete_structures.
60         * cp-tree.h (hack_incomplete_structures): Rename to ...
61         (complete_vars): ... this.
62         (struct saved_scope): Remove incomplete.
63         (namespace_scope_incomplete): Remove.
64         * decl.c (struct binding_level): Remove incomplete.
65         (incomplete_vars): New variable.
66         (mark_binding_level): Don't mark incomplete.
67         (print_binding_level): Don't print it.
68         (mark_saved_scope): Don't mark incomplete.
69         (pushdecl): Use maybe_register_incopmlete_var.
70         (cxx_init_decl_processing): Register incomplete_vars for GC.
71         (start_decl_1): Clarify error message.
72         (hack_incomplete_vars): Remove.
73         (maybe_register_incomplete_var): New function.
74         (complete_vars): Likewise.
75
76 2002-04-06  Jason Merrill  <jason@redhat.com>
77
78         PR c++/4934
79         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
80         set before checking it.
81
82         PR c++/525
83         * init.c (build_member_call): Use build_scoped_ref.
84         (resolve_offset_ref): Likewise.
85         * call.c (build_scoped_method_call): Likewise.
86         * tree.c (maybe_dummy_object): Kludge around current_class_type being 
87         wrong.
88         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
89         * cp-tree.h: Adjust.
90         
91         * init.c (push_base_cleanups): Just use build_scoped_method_call.
92
93         PR c++/6179
94         * method.c (implicitly_declare_fn): Pass unqualified type to 
95         synthesize_exception_spec.
96
97 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
98
99         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
100         * cvt.c: Update comment.
101         * init.c (expand_cleanup_for_base): Update.
102         * semantics.c (finish_parenthesized_expr): Update.
103         * typeck.c (cp_truthvalue_conversion): Update.
104
105 2002-04-04  Jason Merrill  <jason@redhat.com>
106
107         * semantics.c (finish_eh_cleanup): New fn.
108         * cp-tree.h: Add prototype.
109         * init.c (perform_member_init, expand_cleanup_for_base): Use 
110         finish_eh_cleanup.
111         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
112         * cp-tree.h: Remove references.
113         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
114         * dump.c (cp_dump_tree): Likewise.
115         * pt.c (tsubst_expr): Likewise.
116         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
117         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
118         * tree.c (cp_statement_code_p): Likewise.
119
120         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
121
122         PR c++/5636
123         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
124         cleanup for nrv.
125
126         PR c++/5104
127         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
128         specifiers.
129         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
130
131 2002-04-03  Richard Henderson  <rth@redhat.com>
132
133         * cp-lang.c (cxx_warn_unused_global_decl): New.
134         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
135
136 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
137
138         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
139         * tree.c (init_tree): Don't set hook.
140
141 2002-04-03  Roger Sayle  <roger@eyesopen.com>
142
143         PR c++/5998:
144         * decl.c (duplicate_decls): Don't mess with assembler names when
145         redeclaring builtin functions as static.
146
147 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
148
149         * call.c (build_addr_func): Update.
150         * class.c (resolve_address_of_overloaded_function): Update.
151         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
152         * cp-tree.h (cxx_mark_addressable): New.
153         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
154         * decl2.c (build_cleanup): Update.
155         * except.c (build_throw): Update.
156         * init.c (resolve_offset_ref): Update.
157         * pt.c (convert_nontype_argument): Update.
158         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
159         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
160         unary_complex_lvalue): Update.
161         (mark_addressable): Rename.
162
163 2002-04-01  Roger Sayle  <roger@eyesopen.com>
164
165         PR c++/5998:
166         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
167         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
168         but follow the SET_DECL_RTL idiom used elsewhere in the function.
169
170 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
171
172         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
173         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
174         * decl.c (grokdeclarator): Update.
175         * mangle.c (write_integer_cst): Update.
176         * typeck.c (build_binary_op): Update.
177
178 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
179
180         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
181         * lex.c (cxx_init): Don't set hook.
182
183 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
184
185         * Make-lang.in (error.o): Update.
186         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
187         * cp-tree.h (struct diagnostic_context): Predeclare.
188         (cxx_print_error_function): New.
189         * error.c: Include langhooks-def.h.
190         (lang_print_error_function): Rename.  Update.
191         (init_error): Don't set hook.
192
193 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
194
195         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
196         Redefine.
197         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
198         * decl.c (finish_enum): Similarly.
199         * error.c (dump_type): Similarly.
200         * lex.c (cxx_init): Similarly.
201         * mangle.c (write_builtin_type): Similarly.
202         * typeck.c (comptypes): Similarly.
203
204 2002-03-28  Roger Sayle  <roger@eyesopen.com>
205
206         PR c++/5998:
207         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
208         in the g++ front-end.
209         (duplicate_decl): Allow redefinition of anticipated built-ins.
210         Fix inlining problem by over-writing the old DECL_RTL.
211         (lookup_namespace_name): Fail to find an identifier in the
212         specified namespace if its still anticipated.
213         (builtin_function_1): New function split out from builtin_function
214         to create a builtin in the current namespace with given context.
215         (builtin_function): Call builtin_function_1 to define the
216         appropriate builtins in both the std and global namespaces.
217         (select_decl): Don't test for anticipated decls here.
218         (unqualified_namespace_lookup): Instead ignore them whilst
219         searching through scopes and namespaces.
220         * decl2.c (do_nonmember_using_decl): If a using declaration
221         specifies an anticipated built-in function, mark it as no longer
222         anticipated in that scope.
223         (ambiguous_decl):  Avoid resolving to an anticipated decl.
224         * lex.c (do_scoped_id): Fail to find an identifier in the global
225         namespace if its still anticipated.
226
227 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
228
229         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
230         * cp-tree.h (cp_make_lang_type): Rename.
231         * lex.c (cp_make_lang_type): Rename.
232         (make_aggr_type): Update.
233         * tree.c (init_tree): Don't set make_lang_type_fn.
234
235 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
236
237         PR c++/6073
238         * class.c (finish_struct_1): Update static field's DECL_MODE even
239         if its type is a variant of t.
240
241 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
242
243         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
244         * cp-tree.h (cxx_insert_default_attributes): New.
245         * decl.c (insert_default_attributes): Rename.
246
247 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
248
249         PR c++/4884
250         * call.c (build_op_delete_call): Allow for the fact the placement
251         may be a COMPOUND_EXPR.
252         
253 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
254
255         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
256         * cp-tree.h (init_cplus_expand): Remove.
257         (cxx_expand_expr): New.
258         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
259         fix prototype.
260         (init_cplus_expand): Remove.
261         * lex.c (cxx_init): Don't call init_cplus_expand.
262
263 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
264
265         PR c++/4884.
266         * init.c (build_new_1): Allow for the fact the result of
267         build_function_call may be a COMPOUND_EXPR.
268
269 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
270
271         PR c++/5682
272         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
273         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
274         (dfs_skip_nonprimary_vbases_markedp): Remove.
275         * search.c (get_shared_vbase_if_not_primary): Remove.
276         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
277         (dfs_skip_nonprimary_vbases_markedp): Remove.
278         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
279         (dfs_marked_real_bases_queue_p): Likewise.
280
281 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
282
283         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
284         * cp-tree.h (cxx_mark_tree): New.
285         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
286
287 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
288
289         * cp-tree.h (cxx_maybe_build_cleanup): New.
290         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
291         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
292         * tree.c (build_target_expr): Update.
293         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
294
295 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
296
297         * decl2.c (cxx_decode_option): Handle -E.
298         * lang-specs.h (default_compilers): Preprocess with cc1plus.
299         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
300
301 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
302
303         PR c++/6037
304         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
305
306 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
307
308         * error.c (dump_type): Be careful about implicit typenames.
309
310 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
311
312         PR C++/3656
313         * semantics.c (finish_base_specifier): Handle erronous base
314         classes. 
315
316 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
317
318         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
319         REAL_IS_NOT_DOUBLE.
320
321 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
322
323         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
324         an index into the vtable_entry array regardless of
325         TARGET_PTRMEMFUNC_VBIT_LOCATION.
326
327 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
328
329         * tree.c (cp_cannot_inline_tree_fn): Same.
330
331 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
332
333         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
334         insert_block, getdecls, global_bindings_p): New.
335
336 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
337
338         PR c++/4361
339         * mangle.c (struct globals) Add internal_mangling_p member.
340         (write_template_param): Do internal mangling, if needed.
341         (mangle_conv_op_name_for_type): Request internal mangling.
342
343 2002-03-20  Jason Merrill  <jason@redhat.com>
344
345         PR c++/2136
346         * init.c (build_delete): Check access for a member op delete here.
347         * decl2.c (delete_sanity): Not here.
348
349 2002-03-19  Jason Merrill  <jason@redhat.com>
350
351         PR c++/5118
352         * class.c (get_vfield_name): Use the constructor_name.
353
354 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
355
356         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
357         * cp-tree.h (lang_printable_name): Rename.
358         * error.c (lang_decl_name): Use new hook.
359         * lex.c (cxx_init): Remove old hook.
360         * pt.c (tsubst_decl): Use new hook.
361         * tree.c (lang_printable_name): Rename.
362
363 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
364
365         PR c++/3882
366         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
367         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
368         only after recording the declaration.
369
370 2002-03-18  Jason Merrill  <jason@redhat.com>
371
372         PR c++/2039
373         * init.c (resolve_offset_ref): Hand off to build_component_ref.
374
375         PR c++/4222, c++/5995
376         * call.c (build_over_call): Fix empty class logic.
377
378         PR c++/3870
379         * cp-tree.h (struct saved_scope): Add last_parms field.
380         * decl.c (maybe_push_to_top_level): Save last_function_parms.
381         (pop_from_top_level): Restore it.
382
383         PR c++/4377
384         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
385         NON_LVALUE_EXPRs.
386
387         PR c++/4003
388         * pt.c (tsubst_friend_function): Use decl_namespace_context.
389
390         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
391         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
392         type with a nontrivial destructor.
393
394 2002-03-17  Jason Merrill  <jason@redhat.com>
395
396         PR c++/4460
397         * class.c (build_base_path): Virtual base layout is fixed in
398         in-charge [cd]tors.
399
400 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
401
402         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
403         * parse.y (yyparse): Remove macro.
404
405 2002-03-17  Jason Merrill  <jason@redhat.com>
406
407         PR c++/5757
408         * init.c (build_new_1): Pass the right pointer to op delete.
409
410 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
411
412         PR c++/4361
413         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
414         conversion operators go.
415         (struct lang_decl_flags): Add template_conv_p and unused
416         bitfields.
417         (DECL_TEMPLATE_CONV_FN_P): New macro.
418         * call.c (build_user_type_conversion_1): Don't check second type
419         conversion of overload set first.
420         * class.c (add_method): Make sure templated conversion operators
421         all end up on slot 2.
422         * lex.c (do_identifier): A conversion operator token might be
423         satisfied by a templated conversion operator.
424         * pt.c (check_explicit_specialization): Use
425         CLASSTYPE_FIRST_CONVERSION_SLOT.
426         (template_parm_this_level_p): New function.
427         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
428         * search.c (lookup_fnfields_1): Template conversions will be on
429         the first slot.
430         * typeck.c (build_component_ref): Preserve the type of an
431         conversion operator name on the overload type.
432         (build_x_function_call): Retrieve the conversion operator name.
433
434 2002-03-15  Richard Henderson  <rth@redhat.com>
435
436         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
437
438 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
439
440         * cp-tree.h (CLEANUP_DECL): Remove.
441         (CLEANUP_EXPR): Likewise.
442         * decl.c (destroy_local_var): Simplify.
443         (maybe_build_cleanup): Tidy.
444         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
445         * semantics.c (cp_expand_stmt): Likewise.
446         * cp/tree.c (cp_statement_code_p): Likewise.
447
448 2002-03-15  Jason Merrill  <jason@redhat.com>
449
450         PR c++/5857
451         * decl.c (duplicate_decls): Use merge_types instead of common_type.
452         * typeck.c (common_type): Just hand off to
453         type_after_usual_arithmetic_conversions and
454         composite_pointer_type.
455         (merge_types): New fn.
456         (commonparms): Use it instead of common_type.
457         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
458         (composite_pointer_type): Also handle attributes.
459         * cp-tree.h: Declare merge_types.
460
461         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
462         variables.
463         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
464
465 2002-03-14  Richard Henderson  <rth@redhat.com>
466
467         * decl.c: Include c-pragma.h.
468         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
469         * Make-lang.in: Update dependencies.
470
471 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
472
473         PR c++/5908
474         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
475         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
476
477 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
478
479         * mangle.c (write_builtin_type): Handle 128-bit integers even if
480         they are not a standard integer type.
481
482 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
483
484         * cp-tree.h (init_init_processing): Remove declaration.
485         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
486         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
487
488 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
489
490         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
491         Define.
492         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
493         tree_code_length.
494         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
495         cplus_tree_code_name): Delete.
496         (cxx_init): Don't call add_c_tree_codes, instead set
497         lang_unsafe_for_reeval.  Don't try to copy into the various
498         tree_code arrays.
499
500 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
501
502         PR c++/5659
503         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
504         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
505         definitions.
506
507 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
508
509         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
510         DR209 is now not a defect.
511         * cp-tree.h (skip_type_access_control): Remove.
512         * decl.c (grokdeclarator): Do type access control for friend
513         declarations.
514         * semantics.c (decl_type_access_control): Don't reset
515         current_type_lookups.
516         (save_type_access_control): Always save the lookups.
517         (skip_type_access_control): Remove.
518         (finish_class_definition): Don't change type_lookups.
519
520 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
521
522         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
523         It is incorrect.
524         * typeck.c (build_static_cast): Compare non-qualified types
525         with pointer to member conversions.
526
527 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
528             Daniel Berlin  <dan@dberlin.org>
529
530         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
531         (cxx_get_alias_set): Use it.
532
533 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
534
535         * cp-tree.h (stabilize_expr): Prototype.
536
537 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
538
539         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
540         conditional return void.
541
542 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
543
544         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
545         * cp-tree.h (cxx_unsave): New.
546         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
547         (init_tree): Update.
548
549 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
550
551         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
552         explicit sizeof/sizeof.
553         * decl2.c (cxx_decode_option): Likewise.
554         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
555
556 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
557
558         PR c++/775
559         * decl.c (lookup_tag): Only reject enum/class mismatch, not
560         class/union mismatch.
561         * parse.y (check_class_key): New function.
562         (structsp): Call it.
563
564 2002-03-01  Michael Matz  <matz@suse.de>
565
566         * typeck.c (cp_pointer_int_sum): Complete inner type which is
567         used later by size_in_bytes().
568
569 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
570
571         * cp-tree.h:  Require __GNUC__ to be #defined.
572         (build_init):  Add missing prototype.
573
574 2002-03-01  Jason Merrill  <jason@redhat.com>
575
576         * except.c: Don't include decl.h or obstack.h.  Do include
577         tree-inline.h.
578         (build_throw): Destroy temporaries from the thrown
579         expression before calling __cxa_throw.  Construct a thrown 
580         temporary directly into the exception object.
581         (stabilize_throw_expr): New function.
582         (wrap_cleanups_r): New function.
583         * tree.c (stabilize_expr): New function.
584         * init.c (build_init): New function.
585         * Make-lang.in (cp/except.o): Adjust .h deps.
586
587 2002-02-28  Jason Merrill  <jason@redhat.com>
588
589         * search.c (lookup_base_r): Don't clear is_non_public just because
590         we found a friendly scope.
591
592         * decl.c (finish_function): Only warn about missing return
593         statement with -Wreturn-type.
594
595 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
596
597         * class.c (build_clone): Update.
598         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
599         * cp-tree.h (cxx_dup_lang_specific_decl): New.
600         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
601         (copy_decl): Update.
602         * method.c (make_thunk): Update.
603
604 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
605
606         * decl2.c: Delete traditional-mode-related code copied from
607         the C front end but not used, or used only to permit the
608         compiler to link.
609
610 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org> 
611
612         PR c++/4093
613         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
614         to void.
615
616 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
617
618         PR other/5746
619         * semantics.c (finish_switch_cond): Don't call get_unwidened
620         if error_mark_node.
621
622 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
623
624         PR c++/2645, DR 295
625         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
626         tf_keep_type_decl.
627         (make_typename_type): Use tsubst_flags_t.
628         * decl.c (make_typename_type): Adjust. Return non-artificial
629         TYPE_DECLs, if required.
630         (grokdeclarator): Simplify CVR qualification handling. Allow bad
631         qualifiers on typedef types.
632         * decl2.c (handle_class_head): Adjust make_typename_type call.
633         * parse.y (nested_name_specifier): Likewise.
634         (typename_sub0): Likewise.
635         (typename_sub1): Likewise.
636         * pt.c (convert_template_argument): Adjust make_typename_type
637         return value.
638         (tsubst): Adjust cp_build_qualified_type_real calls.
639         (check_cv_quals_for_unify): Cope with alowing bad qualifications
640         on template type parms.
641         (instantiate_decl): Recheck substitutions to give warnings on bad
642         qualifications.
643         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
644
645 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
646
647         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
648
649         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
650         unless DECL_ALWAYS_INLINE.
651
652 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
653
654         * typeck.c (cp_pointer_int_sum): Renamed from
655         pointer_int_sum, call pointer_int_sum.
656
657 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
658
659         * decl.c (duplicate_decls): Return 0 if issued error about
660         redeclaration.
661
662 2002-02-19  Jason Merrill  <jason@redhat.com>
663
664         ABI change: Mangle `void (A::*)() const' as 
665         M1AKFvvE, not MK1AFvvE.
666         * mangle.c (write_function_type): Write cv-quals for member
667         function type here.
668         (write_pointer_to_member_type): Not here.
669
670 2002-02-18  Jason Merrill  <jason@redhat.com>
671
672         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
673         (do_decl_instantiation): Likewise.
674
675 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
676
677         PR c++/5685
678         * decl.c (duplicate_decls): Make warning unconditional
679         if duplicate default argument declarations are present.
680
681 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
682
683         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
684         shortening.
685
686 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
687
688         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
689         remove incorrect comment. Move #if 0'd code to common path. Use
690         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
691
692 2002-02-13  Jason Merrill  <jason@redhat.com>
693
694         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
695         (finish_function): Don't warn if current_function_returns_null.
696
697         * typeck2.c (digest_init): Do handle values of vector type.
698
699         * typeck2.c (digest_init, process_init_constructor): Treat vectors
700         like arrays.
701
702 2002-02-11  Jason Merrill  <jason@redhat.com>
703
704         * parse.y (reserved_declspecs): Don't handle attributes.
705         (reserved_typespecquals): Handle them here.
706         * Make-lang.in (parse.c): Adjust expected conflicts.
707
708 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
709
710         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
711         instead of compstmt.
712         (compstmt_or_stmtexpr): Renamed from compstmt.
713         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
714
715 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
716
717         Rename instantiate_type_flags to tsubst_flags_t & expand use.
718         * cp-tree.h (instantiate_type_flags): Rename to ...
719         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
720         add tf_warning flag.
721         (instantiate_type): Adjust prototype.
722         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
723         do_type_instantiation, cp_build_qualified_type_real): Likewise.
724         cp_build_qualified_type: Adjust.
725         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
726         tf_*.
727         * call.c (standard_conversion): Rename itf_* to tf_*.
728         (reference_binding): Likewise.
729         (convert_like_real): Likewise.
730         * cvt.c (cp_convert_to_pointer): Likewise.
731         (convert_to_reference): Likewise.
732         * decl.c (lookup_namespace_name): Use tf_* flags.
733         (make_typename_type): Likewise.
734         (grokdeclarator): Likewise.
735         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
736         (coerce_template_template_parms, convert_template_argument,
737         coerce_template_parms, maybe_get_template_decl_from_type_decl,
738         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
739         instantiate_class_template, tsubst_template_arg_vector, 
740         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument, 
741         tsubst_decl, tsubst_arg_types, tsubst_function_type,
742         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr, 
743         instantiate_template, fn_type_unification,
744         resolve_overloaded_unification, verify_class_unification, 
745         unify, get_bindings_real, do_type_instantiation, 
746         regenerate_decl_from_template, instantiate_decl, 
747         tsubst_initializer_list, tsubst_enum,
748         get_mostly_instantiated_function_type,
749         invalid_nontype_parm_type_p): Likewise.
750         * tree.c (cp_build_qualified_type_real): Likewise.
751         * typeck.c (build_binary_op): Rename itf_* to tf_*.
752         (build_ptrmemfunc): Likewise.
753         (convert_for_assignment): Likewise.
754
755 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
756
757         PR c++/109
758         * decl.c (grokdeclarator): Allow friend declarations from
759         dependent types.
760         * decl2.c (handle_class_head): Don't push into template parm contexts.
761         * pt.c (push_template_decl_real): Template parm contexts are never
762         being defined.
763
764 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
765
766         * class.c: Include target.h.
767         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
768         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
769         bit-field layout.
770         * Make-lang.in: Adjust deps.
771
772 2002-02-05  Jason Merrill  <jason@redhat.com>
773
774         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
775
776 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
777
778         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
779         (finish_switch_cond): Set SWITCH_TYPE.
780
781 2002-02-04  Richard Henderson  <rth@redhat.com>
782
783         * method.c (use_thunk): Always initialize the block tree.  Reindent.
784         * semantics.c (expand_body): Emit thunks after function, not before.
785
786 2002-02-04  Jason Merrill  <jason@redhat.com>
787
788         * decl.c (start_function): Call cplus_decl_attributes immediately
789         after grokdeclarator.
790
791         * decl.c (start_function): Combine DECL_RESULT handling code.
792
793 2002-02-03  Jason Merrill  <jason@redhat.com>
794
795         * xref.c: Remove.
796         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
797         (cp/xref.o): Remove dependencies.
798         * class.c (finish_struct_1, check_methods): Don't call xref fns.
799         (finish_struct_1): Likewise.
800         * friend.c (make_friend_class): Likewise.
801         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
802         * spew.c (read_process_identifier): Likewise.
803
804 2002-02-01  Jason Merrill  <jason@redhat.com>
805
806         PR c++/4872
807         * decl.c (finish_function): Warn about a non-void function with 
808         no return statement and no abnormal exit.
809         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
810         (current_function_returns_abnormally): New macro.
811         * call.c (build_call): Set it.
812
813         * typeck.c (build_component_ref): Always complain about offsetof
814         constructs on non-PODs.  Only make it an error for members of
815         virtual bases.
816
817         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
818         (dump_function_decl): Always dump parms.
819
820         * decl2.c (finish_static_data_member_decl): Complain about a local
821         class with a static data member.
822
823         PR c++/4286
824         * search.c (lookup_field_1): Don't xref a static data member
825         just because we looked it up.
826
827 2002-01-31  Jason Merrill  <jason@redhat.com>
828
829         * Make-lang.in (parse.c): Handle .output file.
830
831         PR c++/3395
832         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
833         not TREE_TYPE.
834         * semantics.c (finish_class_definition): Adjust.
835
836         Allow attributes in parms and casts.
837         * parse.y (named_parm): Don't strip attrs.
838         (declmods): Remove 'attributes' production.
839         (nonempty_cv_qualifiers): Accept attributes.
840         (ATTRIBUTE): Give precedence.
841         * decl.c (groktypename): Handle attributes.
842         (grokparms): Likewise.
843
844 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
845
846         * decl2.c (cxx_decode_option): Pass 0 as last argument to
847         cpp_handle_option.
848         * lang-specs.h: Use cpp_unique_options instead of cpp_options
849         when used together with cc1_options.
850
851 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
852
853         PR c++/5132
854         * typeck2.c (digest_init): Make sure non-array core type is
855         instantiated.
856         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
857         constructor, rather than build a new one.
858         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
859         PURPOSE of constructor elts.
860
861 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
862
863         * Make-lang.in (parse.c): Adjust expected number of
864         shift-reduce conflicts.
865         (decl.o): Depend on diagnostic.h.
866         * decl.c: Include diagnostic.h.
867         (grokdeclarator): Check for null pointer.
868         (finish_function): Don't abort when
869         current_binding_level->parm_flag != 1, if errors have
870         occurred; throw away the statement tree and extra binding
871         levels, and continue.
872         * lex.c (note_list_got_semicolon): Check for null pointer.
873         * method.c (hack_identifier): Just return error_mark_node if
874         value is error_mark_node.
875         * parse.y (primary: TYPEID(type_id)): No need to use
876         TYPE_MAIN_VARIANT here.
877         (handler_seq): Accept an empty list of catch clauses and
878         generate a fake handler block to avoid later crashes.
879         (ansi_raise_identifier): Accept the error token too.
880         * semantics.c (begin_class_definition,
881         finish_class_definition): Check for error_mark_node.
882
883 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
884
885         * typeck2.c (friendly_abort): Delete definition.
886         * cp-tree.h (friendly_abort): Don't prototype.
887         (my_friendly_assert): Use fancy_abort.
888
889 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
890
891         * cp-tree.h (my_friendly_abort): Remove.
892
893 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
894
895         * spew.c (pending_inlines, pending_inlines_tail,
896         processing_these_inlines): Make static.
897         (mark_pending_inlines): Remove static.
898         (begin_parsing_inclass_inline): If in function, save pi
899         for GC to cp_function_chain->unparsed_inlines instead.
900         (process_next_inline): Likewise.
901         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
902         (mark_pending_inlines): Add prototype.
903         * decl.c (spew_debug): Remove unused extern.
904         (mark_lang_function): Call mark_pending_inlines.
905
906 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
907
908         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
909         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
910         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
911         Change my_fancy_abort() to abort().
912
913 2002-01-23  Jason Merrill  <jason@redhat.com>
914
915         PR c++/5453
916         * class.c (fixed_type_or_null): Fix thinko.
917
918         PR c++/3331
919         * init.c (resolve_offset_ref): Use build_indirect_ref.
920
921         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
922
923 2002-01-22  Jason Merrill  <jason@redhat.com>
924
925         * parse.y (function_body): Suppress the block for the outermost
926         curly braces.
927         * decl.c (pushdecl): Don't try to skip it.
928         (begin_function_body): Keep the block we create, not the next one.
929         * init.c (emit_base_init): Don't mess with keep_next_level.
930
931         * class.c (build_base_path): Tweak formatting.
932
933 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
934
935         Fix regression introduced with patch for c++/775
936         * parse.y (class_head_defn): Check for template specializations
937         with a different class-key.
938
939 2002-01-17  Jason Merrill  <jason@redhat.com>
940
941         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
942         (begin_function_body): Call them and keep_next_level.
943         * init.c (emit_base_init): Call keep_next_level.
944         * semantics.c (setup_vtbl_ptr): Lose.
945         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
946         (vtbls_set_up_p): Lose.
947         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
948         * method.c (do_build_copy_constructor): Likewise.
949         (synthesize_method): Call finish_mem_initializers.
950         * parse.y (nodecls): Likewise.
951
952         * error.c (dump_type_suffix): Print the exception specs before
953         recursing.
954         (dump_function_decl): Here, too.
955
956         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
957
958 2002-01-10  Ira Ruben   <ira@apple.com>
959
960         PR c++/907
961         * decl.c (start_method): Handle attrlist.
962
963 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
964
965         * decl2.c (max_tinst_depth): Increase default limit to 500.
966
967 2002-01-10  Graham Stott  <grahams@redhat.com>
968
969         * spew.c (YYCHAR): Uppercase macro parameter and add
970         parenthesis.
971         (YYCODE): Likewise.
972         (NAME): Uppercase macro parameter.
973
974 2002-01-09  Graham Stott  <grahams@redhat.com>
975
976         * decl.h (grokdeclarator): Wrap long line.
977
978         * semantics.c (FINISH_COND): Uppercase macro paramaters and
979         add parenthesis.
980
981 2002-01-08  Graham Stott  <grahams@redhat.com>
982
983         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
984         (PALLOC): Uppercase macro parameter and whitespace.
985         (SALLOC): Uppercase macro parameter.
986         (SFREE): Uppercase macros parameter, add parenthese and
987         whitespace.
988         (STREQL): Uppercase macro parameter and whitespace.
989         (STRNEQ): Likewise.
990         (STRLSS): Likewise.
991         (STRLEQ): Likewise.
992         (STRGTR): Likewise.
993         (STRGEQ): Likewise.
994
995         * call.c (convert_like): Add parenthesis and wrap.
996         (convert_like_with_context): Likewise.
997         (ICS_RANK): Whitespace.
998         (NEED_TEMPORARY_P): Remove parenthesis.
999
1000         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
1001         whitespace.
1002         (VTT_MARKED_BINFO_P): Likewise.
1003
1004         * decl.c (BINDING_LEVEL): Add parenthesis.
1005         (DEF_OPERATOR): Likewise.
1006
1007         * mangle.c (MANGLE_TRACE): Add parenthesis.
1008         (MANGLE_TRACE_TREE): Likewise.
1009         (write_signed_number): Likewise.
1010         (write_unsigned_number): Likewise.
1011
1012         * pt.c (ccat): Uppercase macro parameter.
1013         (cat): Likewise
1014
1015         * search.c (SET_BINFO_ACCESS): Add parenthesis.
1016
1017 2002-01-07  Jason Merrill  <jason@redhat.com>
1018
1019         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
1020         to pedwarn.
1021
1022         PR c++/3536
1023         * method.c (make_thunk): If !flag_weak, give the thunk the
1024         function's linkage.
1025         (use_thunk): Here, too.
1026
1027 2002-01-07  Graham Stott  <grahams@redhat.com>
1028
1029         * error.c: Update copyright date.
1030         (print_scope_operator): Add parenthesis.
1031         (print_left_paren): Likewise.
1032         (print_right_paren): Likewise.
1033         (print_left_bracket): Likewise.
1034         (print_right_bracket): Likewise.
1035         (print_template_argument_list_start): Likewise.
1036         (print_template_argument_list_end): Likewise.
1037         (print_non_consecutive_character): Likewise.
1038         (print_tree_identifier): Likewise.
1039         (print_identifier): Likewise.
1040         (NEXT_CODE): Uppercase macro parameter.
1041         (ident_fndecl): Delete unused.
1042         (GLOBAL_THING): Likewise.
1043
1044 2002-01-06  Graham Stott  <grahams@redhat.com>
1045
1046         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
1047         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
1048         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
1049         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
1050         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
1051         (C_IS_RESERVED_WORD): Uppercase macro parameter.
1052         (C_RID_YYCODE) Likewise.
1053         (ptrmem_cst): Use rtx.
1054         (LOCAL_BINDING_P): Add whitespace.
1055         (INHERITED_VALUE_BINDING_P): Likewise.
1056         (BINDING_SCOPE): Wrap long line.
1057         (BINDING_HAS_LEVEL_P): Remove parenthesis.
1058         (BINDING_VALUE): Wrap long line.
1059         (BINDING_TYPE): Whitespace.
1060         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
1061         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
1062         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
1063         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
1064         (same_type_p): Uppercase macro parameters.
1065         (same_type_ignoring_top_level_qualifiers_p): Likewise.
1066         (OVL_FUNCTION): Wrap long line.
1067         (OVL_CHAIN): Whitespace.
1068         (OVL_CURRENT): Add parenthesis and whitespace.
1069         (OVL_NEXT): Whitespace.
1070         (OVL_USED): Likewise.
1071         (IDENTIFIER_TYPE_VALUE): Likewise.
1072         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
1073         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
1074         (LANG_ID_FIELD): Whitespace.
1075         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
1076         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
1077         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
1078         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
1079         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
1080         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
1081         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
1082         (IDENTIFIER_VIRTUAL_P): Likewise.
1083         (IDENTIFIER_OPNAME_P): Likewise.
1084         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
1085         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
1086         (C_SET_EXP_ORIGINAL_CODE): Likewise.
1087         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
1088         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
1089         (IS_AGGR_TYPE): Uppercase macro parameter.
1090         (CLASS_TYPE_P): Likewise.
1091         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
1092         (IS_AGGR_TYPE_2): Whitespace.
1093         (TAGGED_TYPE_P): Uppercase macro parameter.
1094         (TYPE_BUILT_IN): Whitespace.
1095         (TYPE_FOR_JAVA): Likewise.
1096         (FUNCTION_ARG_CHAIN): Remove parenthesis.
1097         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
1098         (FUNCTION_FIRST_USER_PARAM): Likewise.
1099         (PROMOTES_TO_AGGR_TYPE): Whitespace.
1100         (DERIVED_FROM_P): Add parenthesis and wrap.
1101         (UNIQUELY_DERIVED_FROM_P): Likewise.
1102         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
1103         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
1104         (CLASSTYPE_USE_TEMPLATE): Whitespace.
1105         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
1106         (TYPE_GETS_DELETE): Add parenthesis.
1107         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
1108         (TYPE_HAS_ASSIGN_REF): Likewise,
1109         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
1110         (TYPE_HAS_INIT_REF): Likewise.
1111         (TYPE_HAS_CONST_INIT_REF): Likewise.
1112         (TYPE_BEING_DEFINED): Likewise.
1113         (TYPE_LANG_SPECIFIC): Likewise.
1114         (CLASSTYPE_RTTI): Likewise.
1115         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
1116         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
1117         (TYPE_OVERLOADS_ARROW): Likewise.
1118         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
1119         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
1120         (CLASSTYPE_METHOD_VEC): Likewise.
1121         (CLASSTYPE_MARKED_N): Likewise.
1122         (CLASSTYPE_MARKED): Likewise.
1123         (CLASSTYPE_MARKED2): Likewise.
1124         (CLASSTYPE_MARKED3): Likewise.
1125         (CLASSTYPE_MARKED4): Likewise.
1126         (CLASSTYPE_MARKED5): Likewise.
1127         (CLASSTYPE_MARKED6): Likewise.
1128         (SET_CLASSTYPE_MARKED): Whitespace.
1129         (CLEAR_CLASSTYPE_MARKED): Likewise.
1130         (SET_CLASSTYPE_MARKED2): Likewise.
1131         (CLEAR_CLASSTYPE_MARKED2): Likewise.
1132         (SET_CLASSTYPE_MARKED3): Likewise.
1133         (CLEAR_CLASSTYPE_MARKED3): Likewise.
1134         (SET_CLASSTYPE_MARKED4): Likewise.
1135         (CLEAR_CLASSTYPE_MARKED4): Likewise.
1136         (SET_CLASSTYPE_MARKED5): Likewise.
1137         (CLEAR_CLASSTYPE_MARKED5): Likewise.
1138         (SET_CLASSTYPE_MARKED6): Likewise.
1139         (CLEAR_CLASSTYPE_MARKED6): Likewise.
1140         (CLASSTYPE_TAGS): Likewise.
1141         (CLASSTYPE_VSIZE): Likewise.
1142         (CLASSTYPE_VBASECLASSES): Likewise.
1143         (CANONICAL_BINFO): Add parenthesis.
1144         (CLASSTYPE_SIZE(NODE): Likewise.
1145         (CLASSTYPE_SIZE_UNIT): Likewise.
1146         (CLASSTYPE_ALIGN(NODE): Likewise.
1147         (CLASSTYPE_USER_ALIGN): Likewise.
1148         (TYPE_JAVA_INTERFACE): Likewise.
1149         (CLASSTYPE_PURE_VIRTUALS): Likewise.
1150         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
1151         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
1152         (CLASSTYPE_HAS_MUTABLE): Likewise.
1153         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
1154         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
1155         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
1156         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
1157         (CLASSTYPE_INTERFACE_ONLY): Likewise.
1158         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
1159         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1160         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
1161         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
1162         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
1163         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
1164         (BINFO_UNSHARED_MARKED): Whitespace.
1165         (BINFO_MARKED): Whitespace and wrap.
1166         (SET_BINFO_MARKED): Likewise.
1167         (CLEAR_BINFO_MARKED): Likewise.
1168         (BINFO_VTABLE_PATH_MARKED): Likewise.
1169         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
1170         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
1171         (BINFO_SUBVTT_INDEX): Remove parenthesis.
1172         (BINFO_VPTR_INDEX): Likewise.
1173         (BINFO_PRIMARY_BASE_OF): Likewise,
1174         (CLASSTYPE_VFIELDS): Whitespace.
1175         (VF_DERIVED_VALUE): Wrap long line.
1176         (NAMESPACE_LEVEL): Whitespace.
1177         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
1178         (DEFARG_POINTER): Whitespace.
1179         (DECL_NEEDED_P): Remove parenthesis.
1180         (DECL_LANGUAGE): Whitespace.
1181         (SET_DECL_LANGUAGE): Add parenthesis.
1182         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
1183         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
1184         (DECL_IN_AGGR_P): Whitespace.
1185         (DECL_FRIEND_P): Likewise.
1186         (DECL_BEFRIENDING_CLASSES): Likewise.
1187         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
1188         (DECL_NONCONVERTING_P): Whitespace.
1189         (DECL_PURE_VIRTUAL_P): Likewise.
1190         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
1191         (DECL_PENDING_INLINE_INFO): Whitespace.
1192         (DECL_SORTED_FIELDS): Likewise.
1193         (DECL_DEFERRED_FN): Likewise.
1194         (DECL_TEMPLATE_INFO): Likewise.
1195         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
1196         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
1197         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
1198         (TMPL_ARGS_LEVEL): Likewise.
1199         (SET_TMPL_ARGS_LEVEL): Likewise.
1200         (INNERMOST_TEMPLATE_PARMS): Whitespace.
1201         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
1202         (INTEGRAL_CODE_P(CODE): Add parenthesis.
1203         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
1204         (TYPE_HAS_CONSTRUCTOR): Whitespace.
1205         (TREE_HAS_CONSTRUCTOR): Likewise.
1206         (TYPE_HAS_DESTRUCTOR): Likewise.
1207         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
1208         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
1209         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
1210         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
1211         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
1212         (TYPE_PTRMEMFUNC_P): Likewise.
1213         (TYPE_PTRMEMFUNC_FLAG): Likewise.
1214         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
1215         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
1216         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
1217         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
1218         (DECL_ACCESS): Whitespace.
1219         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
1220         (DECL_GLOBAL_DTOR_P): Likewise.
1221         (GLOBAL_INIT_PRIORITY): Likewise.
1222         (DECL_TEMPLATE_PARMS): Likewise.
1223         (DECL_TEMPLATE_RESULT): Likewise.
1224         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
1225         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
1226         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
1227         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
1228         (PRIMARY_TEMPLATE_P): Add parenthesis.
1229         (DECL_USE_TEMPLATE): Whitespace.
1230         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1231         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
1232         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1233         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
1234         (CALL_DECLARATOR_PARMS): Remove parenthesis.
1235         (CALL_DECLARATOR_QUALS): Likewise.
1236         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
1237         (TEMP_NAME_P): Wrap.
1238         (VFIELD_NAME_P): Likewise.
1239         (B_SET): Uppercase macro parameters and add parenthesis.
1240         (B_CLR): Likewise.
1241         (B_TST): Likewise.
1242         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
1243         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
1244         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
1245         (same_or_base_type_p): Likewise.
1246         (cp_deprecated): Likewise.
1247
1248 2002-01-05  Richard Henderson  <rth@redhat.com>
1249
1250         * semantics.c (expand_body): Revert last change.
1251
1252 2002-01-04  Jason Merrill  <jason@redhat.com>
1253
1254         PR c++/4122
1255         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
1256         lost primary.
1257
1258         * class.c (build_vtbl_initializer): Check for a lost primary
1259         before calculating the vtable entry to throw away.
1260
1261 2002-01-02  Jason Merrill  <jason@redhat.com>
1262
1263         * semantics.c (expand_body): Call outlining_inline_function when
1264         emitting an inline function out of line.
1265
1266 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1267
1268         PR c++/5116, c++/764 reversion
1269         * call.c (build_new_op): Revert the instantiations. They are
1270         incorrect.
1271
1272 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1273
1274         PR c++/5089
1275         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
1276
1277 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1278
1279         PR c++/3716
1280         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
1281         (tsubst, case POINTER_TYPE): Handle pmfs here.
1282         (tsubst, case OFFSET_TYPE): Check it is not an offset to
1283         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
1284
1285 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1286
1287         PR c++/35
1288         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
1289         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
1290         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
1291         PARM_DECL.
1292         (tsubst_template_parms): Break up loop statements.
1293         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
1294         parm PARM_DECLs don't get promoted.
1295
1296 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1297
1298         PR c++/5123
1299         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
1300         (build_x_function_call): Cope with a COMPONENT_REF containing a
1301         TEMPLATE_ID_EXPR.
1302
1303 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1304
1305         PR c++/5213
1306         * pt.c (convert_template_argument): Be more careful determining
1307         when RECORD_TYPE templates are or are not templates.
1308
1309 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1310
1311         PR c++/775
1312         * cp-tree.h (handle_class_head): Adjust prototype.
1313         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
1314         parameters. Use for all class heads.
1315         * parse.y (named_class_head_sans_basetype, named_class_head,
1316         named_complex_class_head_sans_basetype,
1317         named_class_head_sans_basetype_defn,
1318         unnamed_class_head): Remove.
1319         (class_head, class_head_apparent_template): Recognize class heads
1320         (class_head_decl, class_head_defn): New reductions. Process class
1321         heads.
1322         (structsp): Adjust class definition and class declaration
1323         reductions.
1324         (maybe_base_class_list): Give diagnostic on empty list.
1325
1326 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1327
1328         PR c++/4379
1329         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1330         single non-static member.
1331         (unary_complex_lvalue): If it cannot be a pointer to member, don't
1332         make it so. Check it is not pointer to reference.
1333
1334 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1335
1336         PR c++/5132
1337         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1338         are processing a template decl.
1339
1340 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
1341
1342         PR c++/5116, c++/764
1343         * call.c (build_new_op): Make sure template class operands are
1344         instantiated. Simplify arglist construction.
1345
1346 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1347
1348         * call.c (build_user_type_conversion_1): Use my_friendly_assert
1349         rather than if ... abort.
1350         * cvt.c (convert_to_reference): Likewise.
1351         * semantics.c (setup_vtbl_ptr): Likewise.
1352         * pt.c (lookup_template_class): Comment typo.
1353
1354 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1355
1356         PR c++/5125
1357         * pt.c (push_template_decl_real): Make sure DECL has
1358         DECL_LANG_SPECIFIC.
1359
1360 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
1361
1362         PR c++/335
1363         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
1364         for non-reference fields.
1365         * typeck.c (require_complete_type): Use resolve_offset_ref).
1366
1367 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
1368
1369         PR c++/196
1370         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
1371
1372 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
1373
1374         PR c++/160
1375         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1376         up. Don't stabilize_references when initializing a reference.
1377
1378 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1379
1380         * decl2.c (lang_f_options): Const-ify.
1381
1382 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
1383
1384         * config-lang.in (diff_excludes): Remove.
1385
1386 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
1387
1388         PR c++/90
1389         * typeck.c (build_function_call_real): Use original function
1390         expression for errors.
1391
1392 2001-12-18  Jason Merrill  <jason@redhat.com>
1393
1394         PR c++/3242
1395         * class.c (add_method): Do compare 'this' quals when trying to match a
1396         used function.  Don't defer to another used function.
1397
1398 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1399
1400         * pt.c (instantiate_clone): Remove, fold into ...
1401         (instantiate_template): ... here. Simplify by removing mutual
1402         recursion.
1403         * typeck2.c (build_m_component_ref): Don't cv qualify the function
1404         pointed to by a pointer to function.
1405         * class.c (delete_duplicate_fields_1): Typo.
1406
1407 2001-12-18  Jason Merrill  <jason@redhat.com>
1408
1409         C++ ABI change: destroy value arguments in caller.
1410         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1411         create an extra binding level for the parameters.
1412         * decl.c (store_parm_decls): Don't do parameter cleanups.
1413
1414 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
1415
1416         * call.c (build_new_method_call): Use '%#V'.
1417         * error.c (cv_to_string): Use V parameter to determine padding.
1418
1419 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1420
1421         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1422         spellings in messages.
1423
1424 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
1425
1426         * cp-tree.h: Delete #defines for cp_error, cp_warning,
1427         cp_pedwarn, and cp_compiler_error.
1428         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1429         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1430         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1431         typeck2.c: Change calls to the above macros to use their
1432         language-independent equivalents: error, warning, pedwarn, and
1433         internal_error respectively.
1434
1435 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1436
1437         * decl2.c (finish_file): Remove back_end_hook.
1438
1439 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
1440
1441         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1442         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1443         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1444
1445 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
1446
1447         * lang-options.h: Use American spelling in messages.
1448
1449 2001-12-13  Jason Merrill  <jason@redhat.com>
1450
1451         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1452
1453         Use cleanups to run base and member destructors.
1454         * init.c (push_base_cleanups): New function, split out from...
1455         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
1456         * decl.c (finish_destructor_body): Move vbase destruction code to
1457         push_base_cleanups.
1458         (begin_function_body, finish_function_body): New fns.
1459         (finish_function): Move [cd]tor handling and call_poplevel to
1460         finish_function_body.
1461         (pushdecl): Skip the new level.
1462         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1463         (setup_vtbl_ptr): Call push_base_cleanups.
1464         * method.c (synthesize_method): Call {begin,end}_function_body.
1465         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1466         * cp-tree.h: Declare new fns.
1467         * parse.y (function_body, .begin_function_body): New nonterminals.
1468         (fndef, pending_inline, function_try_block): Use function_body.
1469         (ctor_initializer_opt, function_try_block): No longer has a value.
1470         (base_init): Remove .set_base_init token.
1471         (.set_base_init, compstmt_or_error): Remove.
1472         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1473
1474         * optimize.c (maybe_clone_body): Fix parameter updating.
1475
1476 2001-12-12  Jason Merrill  <jason@redhat.com>
1477
1478         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1479         * semantics.c (genrtl_start_function): Don't pass
1480         parms_have_cleanups or push an extra binding level.
1481         (genrtl_finish_function): Lose cleanup_label cruft.
1482
1483         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1484         (ctor_label): Remove.
1485         * semantics.c (finish_return_stmt): Lose ctor_label support.
1486         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1487         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1488         dtor_label.
1489
1490         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1491         check for [cd]tors.
1492         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1493
1494         * decl.c (finish_function): Check VMS_TARGET, not VMS.
1495
1496         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1497         (end_cleanup_fn): And poplevel.
1498
1499         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1500         if we're in a template.
1501
1502 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
1503
1504         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1505         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1506         THIS_NAME_P): Delete.
1507         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1508         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1509         with internal naming scheme.
1510         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1511
1512 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
1513
1514         * decl.c (grokdeclarator): Deprecated implicit typename use.
1515
1516 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
1517
1518         PR g++/51
1519         * parse.y (frob_specs): Indicate it is a language linkage which
1520         contained the extern.
1521         * decl.c (grokdeclarator): Allow extern language linkage with
1522         other specifiers.
1523
1524 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
1525
1526         PR g++/72
1527         * decl.c (add_binding): Don't reject duplicate typedefs involving
1528         template parameters.
1529
1530 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
1531
1532         * parse.y, semantics.c: Similarly.
1533
1534 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
1535
1536         PR g++/87
1537         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1538         (copy_args_p): Rename to ...
1539         (copy_fn_p): ... here.
1540         (grok_special_member_properties): New function.
1541         (grok_op_properties): Lose VIRTUALP parameter.
1542         (copy_assignment_arg_p): Remove.
1543         * call.c (build_over_call): Use copy_fn_p.
1544         * decl.c (grokfndecl): Reformat. Adjust call to
1545         grok_op_properties.
1546         (copy_args_p): Rename to ...
1547         (copy_fn_p): ... here. Reject template functions. Check for pass
1548         by value.
1549         (grok_special_member_properties): Remember special functions.
1550         (grok_ctor_properties): Don't remember them here, just check.
1551         (grok_op_properties): Likewise.
1552         (start_method): Call grok_special_member_properties.
1553         * decl2.c (grokfield): Likewise.
1554         (copy_assignment_arg_p): Remove.
1555         (grok_function_init): Don't remember abstract assignment here.
1556         * pt.c (instantiate_class_template): Call
1557         grok_special_member_properties.
1558         (tsubst_decl): Adjust grok_op_properties call.
1559
1560 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
1561
1562         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1563         RID_TYPES_COMPATIBLE_P.
1564
1565 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
1566
1567         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1568         call to build_aggr_init.
1569         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1570
1571 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1572
1573         * parse.y: Replace uses of the string non-terminal with STRING.
1574         Don't perform string concatentaion here.
1575         (string): Remove non-terminal.
1576         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1577
1578 2001-12-05  Jason Merrill  <jason@redhat.com>
1579
1580         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1581         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1582         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1583         * pt.c (push_tinst_level): No longer static.
1584         * cp-tree.h: Declare them.
1585
1586         * init.c (resolve_offset_ref): Don't check access for the base
1587         conversion to access a FIELD_DECL.
1588
1589         * cp-tree.h (TYPE_REFFN_P): New macro.
1590         * decl.c (bad_specifiers): Check it, too.
1591
1592         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1593         on the __*_type_info type if we haven't seen a definition.
1594
1595 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
1596
1597         * decl.c: Include c-common.h.
1598         (shadow_warning): Move to c-common.c.
1599
1600 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1601
1602         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1603
1604 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1605
1606         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1607
1608 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1609
1610         PR g++/164
1611         * init.c (sort_base_init): Allow binfos to be directly specified.
1612         * method.c (do_build_copy_constructor): Explicitly convert to the
1613         base instance.
1614         (do_build_assign_ref): Likewise.
1615
1616 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
1617
1618         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1619         declaration and initialization.
1620
1621 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1622
1623         * typeck2.c: Remove leading capital from diagnostic messages, as
1624         per GNU coding standards.
1625
1626 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
1627
1628         PR c++/3394
1629         * decl.c (xref_basetypes): Handle attributes between
1630         'class' and name.
1631
1632 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
1633
1634         PR g++/3381
1635         * parse.y (named_complex_class_head_sans_basetype): Add new
1636         reduction.
1637         * Make-lang.in (parse.c): Adjust expected conflict count.
1638
1639 2001-12-03  Jason Merrill  <jason@redhat.com>
1640
1641         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1642         immediate binfos for our virtual bases.
1643
1644 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
1645
1646         * call.c (build_java_interface_fn_ref): Similarly.
1647         * except.c (is_admissible_throw_operand): Similarly.
1648         * init.c (build_java_class_ref): Similarly.
1649         * xref.c (open_xref_file): Similarly.
1650
1651 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1652
1653         * class.c (finish_struct): Remove trailing periods from messages.
1654         * decl.c (check_tag_decl): Similarly.
1655         * lex.c (cxx_set_yydebug): Similarly.
1656         * typeck2.c (friendly_abort): Similarly.
1657
1658 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1659
1660         PR c++/3048
1661         * cp-tree.h (ovl_member): Remove.
1662         * decl2.c (merge_functions): Handle extern "C" functions
1663         specially.
1664         * tree.c (ovl_member): Remove.
1665
1666 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1667
1668         PR c++/4842
1669         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1670         FUNCTION_DECL, as input.
1671         (mark_overriders): Remove.
1672         (warn_hidden): Rework for the new ABI.
1673
1674 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
1675
1676         PR c++/3471
1677         * call.c (convert_like_real): Do not build additional temporaries
1678         for rvalues of class type.
1679
1680 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1681
1682         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1683         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1684         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1685         (DERIVED_FROM_P): Likewise.
1686         (enum base_access): Renumber, add ba_quiet bit mask.
1687         (get_binfo): Remove.
1688         (get_base_distance): Remove.
1689         (binfo_value): Remove.
1690         (ACCESSIBLY_DERIVED_FROM_P): Remove.
1691         * call.c (standard_conversion): Use lookup_base.
1692         * class.c (strictly_overrides): Likewise.
1693         (layout_virtual_bases): Likewise.
1694         (warn_about_ambiguous_direct_bases): Likewise.
1695         (is_base_of_enclosing_class): Likewise.
1696         (add_vcall_offset_vtbl_entries_1): Likewise.
1697         * cvt.c (build_up_reference): Adjust comment.
1698         * init.c (build_member_call): Reformat.
1699         * search.c (get_binfo): Remove.
1700         (get_base_distance_recursive): Remove.
1701         (get_base_distance): Remove.
1702         (lookup_base_r): Tweak.
1703         (lookup_base): Add ba_quiet control. Complete the types here.
1704         (covariant_return_p): Use lookup_base.
1705         * tree.c (binfo_value): Remove.
1706         (maybe_dummy_object): Use lookup_base.
1707         * typeck.c (build_static_cast): Use lookup_base.
1708         (get_delta_difference): Likewise.
1709         * typeck2.c (binfo_or_else): Use lookup_base.
1710         (build_scoped_ref): Add back error_mark_check.
1711         (build_m_component_ref): Use lookup_base.
1712
1713 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
1714
1715         * Make-lang.in (c++.generated-manpages): New dummy target.
1716
1717 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1718
1719         * Make-lang.in (cp-lang.o): Depends on c-common.h.
1720         * cp-lang.c (c-common.h): Include.
1721         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1722         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1723         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1724
1725 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1726
1727         * decl2.c (c_language): Move to c-common.c.
1728         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1729         functions.
1730         (cxx_init): Update.
1731
1732 2001-11-26  Jason Merrill  <jason@redhat.com>
1733
1734         * call.c (joust): Remove COND_EXPR hack.
1735
1736 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
1737
1738         * search.c (lookup_base_r): Declare bk in variable declaration
1739         space.
1740
1741 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
1742
1743         PR g++/3145
1744         * class.c (build_vbase_pointer): Remove.
1745         (build_vbase_path): Remove.
1746         (build_base_path): New function.
1747         * cp-tree.h (base_access, base_kind): New enumerations.
1748         (build_base_path): Declare.
1749         (convert_pointer_to_real): Remove.
1750         (convert_pointer_to): Remove.
1751         (lookup_base): Declare.
1752         (convert_pointer_to_vbase): Remove.
1753         * call.c (build_scoped_method_call): Use lookup_base &
1754         build_base_path instead of convert_pointer_to_real,
1755         get_base_distance & get_binfo.
1756         (build_over_call): Likewise.
1757         * cvt.c (cp_convert_to_pointer): Likewise.
1758         (convert_to_pointer_force): Likewise.
1759         (build_up_reference): Likewise.
1760         (convert_pointer_to_real): Remove.
1761         (convert_pointer_to): Remove.
1762         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1763         instead of convert_pointer_to_vbase & build_vbase_path.
1764         (emit_base_init): Use build_base_path instead of
1765         convert_pointer_to_real.
1766         (expand_virtual_init): Lose unrequired conversions.
1767         (resolve_offset_ref): Use lookup_base and build_base_path
1768         instead of convert_pointer_to.
1769         * rtti.c (build_dynamic_cast_1): Use lookup_base &
1770         build_base_path instead of get_base_distance & build_vbase_path.
1771         * search.c (get_vbase_1): Remove.
1772         (get_vbase): Remove.
1773         (convert_pointer_to_vbase): Remove.
1774         (lookup_base_r): New function.
1775         (lookup_base): New function.
1776         * typeck.c (require_complete_type): Use lookup_base &
1777         build_base_path instead of convert_pointer_to.
1778         (build_component_ref): Likewise.
1779         (build_x_function_call): Likewise.
1780         (get_member_function_from_ptrfunc): Likewise.
1781         (build_component_addr): Likewise.
1782         * typeck2.c (build_scoped_ref): Likewise.
1783
1784 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
1785
1786         * cp-tree.h (CP_TYPE_QUALS): Removed.
1787         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1788         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1789         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1790         * dump.c (cp_dump_tree): Use void* dump_info argument to match
1791         lang-hooks prototype.
1792         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1793         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1794         CP_TYPE_QUALS changed to cp_type_quals.
1795         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1796         (CXX_C_OBJS): Remove c-dump.o.
1797
1798 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
1799
1800         PR c++/3637
1801         * pt.c (lookup_template_class): Ensure that all specializations
1802         are registered on the list corresponding to the most general
1803         template.
1804
1805 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
1806
1807         * call.c (non_reference): Add documentation.
1808         (convert_class_to_reference): Do not strip reference types
1809         from conversion operators.
1810         (maybe_handle_ref_bind): Simplify.
1811         (compare_ics): Correct handling of references.
1812
1813 2001-11-19  John Wilkinson <johnw@research.att.com>
1814
1815         * dump.c (dump_op): New function.
1816         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
1817         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1818         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1819
1820 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
1821
1822         PR4629
1823         * semantics.c (finish_sizeof): Make sure that expression created
1824         while processing a template do not have a type.
1825         (finish_alignof): Likewise.
1826         * typeck.c (c_sizeof): Likewise.
1827         (expr_sizeof): Likewise.
1828
1829 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1830
1831         * lex.c (cxx_finish): Call c_common_finish.
1832         (finish_parse): Remove.
1833
1834 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1835
1836         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1837         when displaying error message about missing array bounds.
1838
1839 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1840
1841         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1842         CONST_CAST_EXPR.
1843         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1844
1845 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
1846
1847         * cp-tree.h (print_class_statistics): Restore.
1848
1849 2001-11-15  Jason Merrill  <jason@redhat.com>
1850
1851         * method.c (use_thunk): Don't emit debugging information for thunks.
1852
1853         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1854         * decl.c (make_typename_type): Handle getting a class template.
1855         * search.c (lookup_field_r): A class template is good enough for
1856         want_type.
1857
1858         * call.c (convert_like_real): Only use cp_convert for the bad part.
1859         (standard_conversion): Also allow bad int->enum.
1860         * typeck.c (ptr_reasonably_similar): Also allow functions to
1861         interconvert.  Pointers to same-size integers are reasonably
1862         similar.
1863
1864         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1865         give it void type.
1866
1867 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
1868
1869         PR g++/3154
1870         * init.c (sort_base_init): Remove unreachable code.
1871         (expand_member_init): Adjust comment to reflect reality. Simplify
1872         and remove unreachable code.
1873
1874 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
1875
1876         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1877         (cxx_init): Update prototype.
1878         * decl.c (init_decl_processing): Rename.  Move null node init
1879         to its creation time.
1880         * lex.c (cxx_init_options): Update.
1881         (cxx_init): Combine with old init_parse; also call
1882         cxx_init_decl_processing.
1883
1884 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
1885
1886         * decl.c (check_initializer): Try to complete the type of an
1887         array element before checking whether it's complete.  Don't
1888         complain about arrays with complete element types but an
1889         unknown size.
1890         (cp_finish_decl): Build the hierarchical constructor before
1891         calling maybe_deduce_size_from_array_init.
1892
1893 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1894
1895         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1896
1897 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
1898
1899         PR g++/4206
1900         * parse.y (already_scoped_stmt): Remove.
1901         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1902
1903 2001-11-12  H.J. Lu <hjl@gnu.org>
1904
1905         * cvt.c (ocp_convert): Don't warn the address of a weak
1906         function is always `true'.
1907
1908 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1909
1910         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1911         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1912         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1913         * cp-tree.h (print_class_statistics): Remove.
1914         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1915         cxx_print_identifier, cxx_set_yydebug): New.
1916         * lex.c (set_yydebug): Rename c_set_yydebug.
1917         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1918         lang_print_xnode): Rename.
1919         * tree.c (print_lang_statistics): Rename.
1920
1921 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1922
1923         * class.c (dump_array): Fix format specifier warning.
1924
1925 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
1926
1927         * cp-lang.c (LANG_HOOKS_NAME): Override.
1928         (struct lang_hooks): Constify.
1929         * lex.c (cxx_init_options): Update.
1930         (lang_identify): Remove.
1931         * parse.y (language_string): Remove.
1932
1933 2001-11-08  Andreas Franck  <afranck@gmx.de>
1934
1935         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
1936         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
1937         suggested by autoconf.
1938         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
1939         (c++.install-common): Use the transformed target alias names.
1940
1941 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
1942
1943         * Make-lang.in: Update.
1944         * cp-lang.c: Include langhooks-def.h.
1945
1946 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1947
1948         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
1949
1950 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1951
1952         * lex.c (copy_lang_type): Add static prototype.
1953
1954 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1955
1956         * pt.c (unify): Handle SCOPE_REF.
1957
1958 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
1959
1960         * tree.c (cp_copy_res_decl_for_inlining): Adjust
1961         DECL_ABSTRACT_ORIGIN for the return variable.
1962
1963 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
1964
1965         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1966
1967 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
1968
1969         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
1970         semantics.c, spew.c: Fix spelling errors.
1971
1972 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1973
1974         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
1975
1976 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
1977
1978         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
1979         pop_everything.
1980
1981 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1982
1983         * cp-lang.c (cxx_get_alias_set): New function.
1984         Point LANG_HOOKS_GET_ALIAS_SET to it.
1985
1986 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1987
1988         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
1989         * cp-tree.h (make_unbound_class_template): Prototype new function.
1990         * decl.c (make_unbound_class_template): New function.
1991         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
1992         * error.c (dump_type): Likewise.
1993         * mangle.c (write_type): Likewise.
1994         * parse.y (template_parm): Likewise.
1995         (template_argument): Use make_unbound_class_template.
1996         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
1997         (tsubst): Likewise.
1998         (tsubst_copy): Likewise.
1999         (unify): Likewise.
2000         * tree.c (walk_tree): Likewise.
2001         * typeck.c (comptypes): Likewise.
2002
2003 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2004
2005         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
2006         extra calls into fewer ones.
2007
2008 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
2009
2010         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
2011         Warn when merging inline with attribute noinline.
2012         (start_decl, start_function): Warn if inline and attribute
2013         noinline appear in the same declaration.
2014
2015 2001-10-16  H.J. Lu <hjl@gnu.org>
2016
2017         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
2018         for tree checking disabled.
2019
2020 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
2021
2022         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
2023         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
2024
2025 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2026
2027         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
2028         (unify): Only handle MINUS_EXPR specially if the above flag is set
2029         and the subtracted constant is 1.  Clear the flag on recursive calls.
2030         Set it when unifying the maximum value in an INTEGER_TYPE's range.
2031
2032 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
2033
2034         * decl.c (bad_specifiers): Don't allow exception specifications
2035         on any typedefs.
2036
2037 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
2038
2039         * cp/lex.c (init_cp_pragma): Similarly.
2040
2041 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2042
2043         * pt.c (lookup_template_class): Build complete template arguments
2044         for BOUND_TEMPLATE_TEMPLATE_PARM.
2045
2046 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2047
2048         * cp-tree.h (TYPE_BINFO): Update comment.
2049         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
2050         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
2051         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
2052         (copy_type): Prototype new function.
2053         * lex.c (copy_lang_decl): Gather tree node statistics.
2054         (copy_lang_type): New function.
2055         (copy_type): Likewise.
2056         (cp_make_lang_type): Create lang_type for
2057         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
2058         and BOUND_TEMPLATE_TEMPLATE_PARM.
2059         * pt.c (tsubst): Use copy_type instead of copy_node.
2060         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
2061
2062 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2063
2064         * pt.c (determine_specialization): Ignore functions without
2065         DECL_TEMPLATE_INFO.
2066
2067 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
2068
2069         PR g++/4476
2070         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
2071
2072 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
2073
2074         * typeck2.c (store_init_value): Don't re-digest a bracketed
2075         initializer.
2076
2077         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
2078         ANON_AGGR_TYPE_P.
2079
2080 2001-10-11  Richard Henderson  <rth@redhat.com>
2081
2082         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
2083         of an asm statement.
2084         (build_vtbl_ref_1): Split out from build_vtbl_ref.
2085         (build_vfn_ref): Use it to handle vtable descriptors before
2086         calling build_vtable_entry_ref.
2087         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
2088
2089 2001-10-10  Richard Henderson  <rth@redhat.com>
2090
2091         * parse.y (asm_operand): Allow named operands.
2092         * semantics.c (finish_asm_stmt): Tweek for changed location
2093         of the operand constrant.
2094
2095 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
2096
2097         * call.c (standard_conversion): Add bad conversion between
2098         integers and pointers.
2099         (convert_like_real): Don't use convert_for_initialization for bad
2100         conversions; complain here and use cp_convert.
2101         (build_over_call): Don't handle bad conversions specially.
2102         (perform_implicit_conversion): Allow bad conversions.
2103         (can_convert_arg_bad): New fn.
2104         * cp-tree.h: Declare it.
2105         * typeck.c (convert_for_assignment): Use it.
2106         (ptr_reasonably_similar): Any target type is similar to void.
2107
2108 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
2109
2110         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
2111         (cp/cp-lang.o): New rule.
2112         * cp-tree.h: Declare hooks.
2113         * tree.c: Make hooks non-static.
2114         (init_tree): Don't initialize hooks here.
2115         * lex.c: Likewise.  Move definition of lang_hooks to...
2116         * cp-lang.c: ... new file.
2117
2118 2001-10-08  Richard Henderson  <rth@redhat.com>
2119
2120         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
2121         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
2122
2123 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2124
2125         * class.c (build_vtable_entry_ref): Const-ify.
2126         * decl.c (predefined_identifier,
2127         initialize_predefined_identifiers): Likewise.
2128         * init.c (build_new_1): Likewise.
2129         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
2130         Likewise.
2131
2132 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
2133
2134         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
2135         (INSNS_PER_STMT): Likewise.
2136         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
2137         (copy_body, initialize_inlined_parameters): Likewise.
2138         (declare_return_variable, inlinable_function_p): Likewise.
2139         (expand_call_inline, expand_calls_inline): Likewise.
2140         (optimize_inline_calls, clone_body): Likewise.
2141         * tree.c (walk_tree): Moved to ../tree-inline.c.
2142         (walk_tree_without_duplicates): Likewise.
2143         (copy_tree_r, remap_save_expr): Likewise.
2144
2145 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
2146
2147         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
2148         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
2149         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
2150         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
2151         (flag_inline_trees): Moved declaration to ../tree-inline.h.
2152         (walk_tree): Moved declaration to ../tree-inline.h.
2153         (walk_tree_without_duplicates, copy_tree_r): Likewise.
2154         (remap_save_expr): Likewise.
2155         * decl.c: Include tree-inline.h.
2156         (lang_mark_tree): Don't mark inlined_fns.
2157         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
2158         * optimize.c: Include tree-inline.h.
2159         (optimize_inline_calls): Move declaration to ../tree.h, as
2160         non-static.
2161         (remap_decl): Use language-independent constructs and hooks.
2162         (remap_block, copy_body_r, declare_return_variable): Likewise.
2163         (inlinable_function_p): Likewise.  Don't test for
2164         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
2165         no longer language-specific.
2166         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
2167         call of dump_function to...
2168         (optimize_function): Here...
2169         (clone_body): New function, extracted from...
2170         (maybe_clone_body): ... here.  Build decl_map locally and pass
2171         it on to clone_body.
2172         * pt.c, semantics.c: Include tree-inline.h.
2173         * tree.c: Likewise.
2174         (cp_walk_subtrees): New language-specific hook for tree inlining.
2175         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
2176         cp_is_overload_p, cp_auto_var_in_fn_p,
2177         cp_copy_res_decl_for_inlining): Likewise.
2178         (walk_tree): Move language-specific constructs into...
2179         (cp_walk_subtrees): this new function.
2180         (copy_tree_r): Use language-independent constructs and hooks.
2181         (init_tree): Initialize tree inlining hooks.
2182         (remap_save_expr): Adjust prototype so that the declaration
2183         does not require the definition of splay_tree.
2184
2185 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2186
2187         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
2188         to build the declaration instead of the declaration itself.
2189
2190 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
2191
2192         * decl2.c (cxx_decode_option): Add 'else'.
2193
2194         * spew.c (end_input): No longer static.
2195         * cp-tree.h: Declare it.
2196         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
2197
2198 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2199
2200         * call.c (build_over_call), typeck.c (build_function_call_real):
2201         Pass type attributes to check_function_format rather than name or
2202         assembler name.  Don't require there to be a name or assembler
2203         name to check formats.
2204
2205 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
2206
2207         * decl.c (init_decl_processing): Don't call
2208         init_function_format_info.  Initialize lang_attribute_table
2209         earlier.
2210         (builtin_function): Call decl_attributes.
2211         (insert_default_attributes): New.
2212
2213 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
2214
2215         * decl.c (grokdeclarator): Copy array typedef handling from C
2216         frontend.
2217
2218         * decl.c (grokdeclarator): Copy too-large array handling from C
2219         frontend.
2220
2221 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
2222
2223         * config-lang.in (target_libs): Added target-gperf, so that we
2224         don't try to build it if C++ is disabled.
2225
2226 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
2227
2228         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
2229         (cp/errfn.o): Delete rule.
2230         (cp/error.o): Depend on flags.h.
2231         * errfn.c: Delete file.
2232         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
2233         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
2234         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
2235         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
2236         internal_error respectively.  Make cp_deprecated into a macro.
2237         Don't define cp_printer typedef or declare cp_printers.
2238         * error.c: Include flags.h.
2239         Delete: struct tree_formatting_info, print_function_argument_list,
2240         print_declaration, print_expression, print_function_declaration,
2241         print_function_parameter, print_type_id, print_cv_qualifier_seq,
2242         print_type_specifier_seq, print_simple_type_specifier,
2243         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
2244         print_parameter_declaration_clause, print_exception_specification,
2245         print_nested_name_specifier, and definition of cp_printers.
2246         (locate_error): New function.
2247         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
2248         rewritten in terms of locate_error and diagnostic.c.
2249         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
2250         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
2251         (init_error): Adjust to match.
2252
2253 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2254
2255         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
2256
2257 2001-09-21  Richard Henderson  <rth@redhat.com>
2258
2259         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
2260         (build_vtbl_initializer): Likewise.
2261         (build_vfn_ref): New.
2262         * cp-tree.h: Declare it.
2263         * call.c (build_over_call): Use it.
2264         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
2265         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
2266
2267 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
2268
2269         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
2270
2271 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2272
2273         Table-driven attributes.
2274         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
2275         * decl2.c (cplus_decl_attributes): Only take one attributes
2276         parameter.
2277         * cp-tree.c (cplus_decl_attributes): Update prototype.
2278         * class.c (finish_struct), decl.c (start_decl, start_function),
2279         decl2.c (grokfield), friend.c (do_friend), parse.y
2280         (parse_bitfield): Update calls to cplus_decl_attributes.
2281         * decl.c (grokdeclarator): Take a pointer to a single ordinary
2282         attribute list.
2283         * decl.h (grokdeclarator): Update prototype.
2284         * decl2.c (grokfield): Take a single ordinary attribute list.
2285         * friend.c (do_friend): Likewise.
2286         * decl.c (shadow_tag, groktypename, start_decl,
2287         start_handler_parms, grokdeclarator, grokparms, start_function,
2288         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
2289         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
2290         (process_template_parm, do_decl_instantiation): Pass single
2291         ordinary attribute lists around.
2292         * decl.c (grokdeclarator): Correct handling of nested attributes.
2293         Revert the patch
2294         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
2295                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
2296                 not the left.
2297         .
2298         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
2299         (cp_attribute_table): Declare.
2300         * decl.c (valid_lang_attribute): Don't define.
2301         (lang_attribute_table): Define.
2302         (init_decl_processing): Initialize lang_attribute_table instead of
2303         valid_lang_attribute.
2304         * tree.c (cp_valid_lang_attribute): Remove.
2305         (handle_java_interface_attribute, handle_com_interface_attribute,
2306         handle_init_priority_attribute): New functions.
2307         (cp_attribute_table): New array.
2308         * decl2.c (import_export_class): Don't use
2309         targetm.valid_type_attribute.
2310
2311 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2312
2313         * Make-lang.in (cp/error.o): Depend on real.h
2314         * error.c: #include "real.h"
2315
2316 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2317
2318         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2319         xmalloc/strcpy/strcat.
2320
2321 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2322
2323         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2324         Const-ification.
2325         * pt.c (tsubst_decl): Likewise.
2326
2327 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2328
2329         * decl2.c (lang_f_options): Const-ification.
2330         * lex.c (cplus_tree_code_name): Likewise.
2331         * spew.c (yyerror): Likewise.
2332
2333 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2334
2335         PR c++/3986
2336         * class.c (force_canonical_binfo_r): Check & move an indirect
2337         primary base first.
2338         (force_canonical_binfo): Check that it's not already
2339         canonical.
2340         (mark_primary_virtual_base): Remove BINFO parameter.
2341         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2342
2343 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2344
2345         Remove TYPE_NONCOPIED_PARTS.
2346         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2347         CLASSTYPE_PURE_VIRTUALS.
2348         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2349         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2350         (layout_class_type): Don't call fixup_inline_methods here ...
2351         (finish_struct_1): ... call it here.
2352
2353 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
2354
2355         * decl.c (duplicate_decls): Remove code deadling with
2356         DECL_SAVED_INSNS.
2357         * decl2.c (finish_file): Likewise.
2358         * pt.c (instantiate_decl): Likewise.
2359         * semantics.c (expand_body): Don't defer local functions if
2360         they wouldn't be deferred for some other reason.  Don't
2361         generate RTL for functions that will not be emitted.
2362         (genrtl_start_function): Remove code deadling with
2363         DECL_SAVED_INSNS.
2364         (genrtl_finish_function): Likewise.
2365
2366 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2367
2368         PR c++/4203
2369         * call.c (build_over_call): Do not optimize any empty base
2370         construction.
2371
2372 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2373
2374         * error.c (dump_template_decl): Output template parameters
2375         together with their specifiers.
2376         Output `class' prefix for template template parameter.
2377         (dump_decl): Fix formatting.
2378
2379 2001-08-30  Kurt Garloff  <garloff@suse.de>
2380
2381         * optimize.c (inlinable_function_p): Allow only smaller single
2382         functions. Halve inline limit after reaching recursive limit.
2383
2384 2001-08-30  Joern Rennecke <amylaar@redhat.com>
2385             Jason Merrill  <jason_merrill@redhat.com>
2386
2387         * class.c (build_vtable_entry_ref): Subtract in char*, not
2388         ptrdiff_t.
2389
2390 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
2391
2392         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2393         (build_cplus_array_type): Use cp_build_qualified_type, not
2394         TYPE_MAIN_VARIANT, to get an unqualified version.
2395
2396         * decl2.c (grok_alignof): Lose.
2397         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2398         * typeck.c (c_alignof): Lose.
2399         * semantics.c (finish_sizeof, finish_alignof): New.
2400         * parse.y: Use them.
2401         * cp-tree.h: Declare them.
2402
2403 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
2404
2405         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2406         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2407         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2408
2409 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
2410
2411         * typeck2.c (add_exception_specifier): Only require complete type if
2412         not in processing template declaration.
2413
2414 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2415
2416         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2417         GNU_xref_start_scope and GNU_xref_end_scope.
2418
2419         * tree.c (TYPE_HASH): Moved to ../tree.h.
2420
2421 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
2422
2423         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2424         on COMPOUND_EXPRs.
2425
2426 2001-08-14  Richard Henderson  <rth@redhat.com>
2427
2428         * class.c, cp-tree.h (build_vfn_ref): Remove.
2429         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2430
2431 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
2432
2433         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2434         empty class assignment as having side-effects to avoid
2435         spurious warnings.
2436
2437 2001-08-13  Zack Weinberg  <zackw@panix.com>
2438
2439         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2440         * except.c: Include libfuncs.h.
2441
2442 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2443
2444         * decl.c (grokdeclarator): Clarify diagnostic message.
2445
2446 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2447
2448         * decl2.c (do_nonmember_using_decl): Replace using directive
2449         with using declaration in the error message.
2450
2451 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2452
2453         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2454         criterion to avoid rebuilding expression tree instead of
2455         processing_template_decl.
2456
2457 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2458
2459         Support named return value optimization for inlines, too.
2460         * decl.c (finish_function): Nullify returns here.
2461         * semantics.c (genrtl_start_function): Not here.
2462         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2463         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
2464         Also nullify the CLEANUP_STMT for the nrv.
2465         * cp-tree.h: Declare it.
2466         * optimize.c (declare_return_variable): Replace the nrv with the
2467         return variable.
2468         * typeck.c (check_return_expr): Be more flexible on alignment check.
2469         Ignore cv-quals when checking for a matching type.
2470
2471 2001-08-09  Richard Henderson  <rth@redhat.com>
2472
2473         * decl2.c (finish_objects): Use target hooks instead of
2474         assemble_constructor and assemble_destructor.
2475
2476 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2477
2478         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2479
2480 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
2481
2482         PR c++/3820
2483         Stop using TYPE_NONCOPIED_PARTS.
2484         * call.c (build_over_call): Be careful when copy constructing
2485         or assigning to an empty class.
2486         * class.c (check_bases_and_members): It has a
2487         COMPLEX_ASSIGN_REF if it has a vptr.
2488         (layout_class_type): Don't add empty class padding to
2489         TYPE_NONCOPIED_PARTS.
2490         (finish_struct_1): Don't add the VFIELD either.
2491         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2492         initialization.
2493
2494 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
2495
2496         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2497
2498 2001-08-06  Richard Henderson  <rth@redhat.com>
2499
2500         * decl2.c (finish_objects): Pass a symbol_ref and priority to
2501         assemble_{constructor,destructor}.  Remove priority handling.
2502
2503 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2504
2505         Don't allow template-id in using-declaration.
2506         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2507         (do_class_using_decl): Likewise.
2508
2509 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2510
2511         * cp/spew.c (read_token): No need to pop buffers.
2512
2513 2001-08-02  Stan Shebs  <shebs@apple.com>
2514
2515         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2516         (fnaddr_from_vtable_entry): Remove decl.
2517         * method.c (use_thunk): Update comment.
2518
2519 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
2520
2521         * repo.c (get_base_filename): Change return value to const char
2522         pointer.
2523
2524 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
2525
2526         Kill -fhonor-std.
2527         * NEWS: Document.
2528         * cp-tree.h (flag_honor_std): Remove.
2529         (CPTI_FAKE_STD): Remove.
2530         (std_node): Remove comment about it being NULL.
2531         (fake_std_node): Remove.
2532         * decl.c (in_fake_std): Remove.
2533         (walk_namespaces_r): Remove fake_std_node check.
2534         (push_namespace): Remove in_fake_std code.
2535         (pop_namespace): Likewise.
2536         (lookup_name_real): Remove fake_std_node check.
2537         (init_decl_processing): Always create std_node. Always add
2538         std:: things there.
2539         (builtin_function): Always put non '_' fns in std.
2540         * decl2.c (flag_honor_std): Remove.
2541         (lang_f_options): Remove honor-std.
2542         (unsupported_options): Add honor-std.
2543         (set_decl_namespace): Remove fake_std_node check.
2544         (validate_nonmember_using_decl): Likewise.
2545         (do_using_directive): Likewise.
2546         (handle_class_head): Likewise.
2547         * dump.c (cp_dump_tree): Likewise.
2548         * except.c (init_exception_processing): Adjust.
2549         * init.c (build_member_call): Remove fake_std_node check.
2550         (build_offset_ref): Likewise.
2551         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2552         * rtti.c (init_rtti_processing): Adjust.
2553
2554 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
2555
2556         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2557         operand while calling cp_tree_equal.
2558
2559 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2560
2561         The 3.0 ABI no longer has vbase pointer fields.
2562         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2563         FORMAT_VBASE_NAME): Remove.
2564         * method.c (do_build_copy_constructor): Adjust.
2565         (do_build_assign_ref): Adjust.
2566         * search.c (lookup_field_r): Adjust.
2567         * typeck.c (build_component_ref): Adjust.
2568
2569         The 3.0 ABI always has a vtable pointer at the start of every
2570         polymorphic class.
2571         * rtti.c (build_headof_sub): Remove.
2572         (build_headof): Adjust.
2573         (get_tinfo_decl_dynamic): No need to check flag_rtti
2574         here. Adjust.
2575         (create_real_tinfo_var): Explain why we need a hidden name.
2576
2577 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2578
2579         PR c++/3631
2580         * class.c (update_vtable_entry_for_fn): The fixed adjustment
2581         of a virtual thunk should be from declaring base.
2582
2583 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
2584
2585         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2586         the shared virtual base, so preserving inheritance graph order.
2587
2588 2001-07-30  Andreas Jaeger  <aj@suse.de>
2589
2590         * decl2.c: Remove unused var global_temp_name_counter.
2591
2592 2001-07-28  Richard Henderson  <rth@redhat.com>
2593
2594         * method.c (pending_inlines): Remove.
2595
2596 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2597
2598         * class.c (mark_primary_virtual_base): Don't adjust base
2599         offsets here.
2600         (dfs_unshared_virtual_bases): Adjust them here.
2601         (mark_primary_bases): Explain why we adjust at the end.
2602
2603 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
2604
2605         * class.c (finish_struct_1): When copying the primary base's
2606         VFIELD, make sure we find it is at offset zero.
2607
2608 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2609
2610         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2611         tsubst_expr for default template arguments.
2612
2613 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2614
2615         PR c++/3621
2616         * spew.c (yylex): Only copy the token's lineno, if it is
2617         non-zero.
2618
2619 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2620
2621         PR c++/3624
2622         * call.c (resolve_args): Simplify, call
2623         convert_from_reference.
2624         (build_new_op): Resolve and convert from reference ARG1
2625         earlier. Adjust ARG2 & ARG3 resolve and conversion.
2626
2627 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
2628
2629         * decl.c (last_function_parm_tags): Remove.
2630         (current_function_parm_tags): Remove.
2631         (init_decl_processing): Adjust.
2632         (start_function): Adjust.
2633         (store_parm_decls): Adjust.
2634
2635         PR c++/3152
2636         * decl.c (grokdeclarator): Detect when a function typedef is
2637         declaring a function, and create last_function_parms correctly.
2638
2639 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
2640
2641         * call.c (joust): Only prefer a non-builtin candidate to a builtin
2642         one if they have the same signature.
2643
2644         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
2645         it rather than toplevel_bindings_p.  Give it a mangled name if static.
2646         (convert_to_reference): Adjust.
2647         * decl2.c (get_temp_name): Lose.
2648         * mangle.c (mangle_ref_init_variable): New fn.
2649         (mangle_guard_variable): Strip the ref-init header.
2650         * cp-tree.h: Adjust.
2651         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2652         initializer.
2653         (grok_reference_init): Always use DECL_INITIAL.
2654
2655 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2656
2657         PR c++/3416
2658         * call.c (build_conditional_expr): Recheck args after
2659         conversions.
2660         * cp-tree.h (build_conditional_expr): Move to correct file.
2661         * typeck.c (decay_conversion): Diagnose any unknown types
2662         reaching here.
2663         (build_binary_op): Don't do initial decay or default
2664         conversions on overloaded functions.
2665         (build_static_cast): Don't do a decay conversion here.
2666
2667 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2668
2669         PR c++/3543
2670         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2671         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2672
2673 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2674
2675         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2676         (create_vtbl_ptr): ... here.
2677
2678 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2679
2680         * class.c (build_vbase_offset_vbtl_entries): Look for
2681         non-primary base of which we are a sub vtable.
2682
2683 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
2684
2685         * semantics.c (finish_this_expr):  Remove unused code.
2686
2687 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
2688
2689         Simplify rtti, now we've only one ABI.
2690         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2691         CPTI_TINFO_VAR_ID.
2692         (tinfo_decl_id, tinfo_var_id): Remove.
2693         (get_typeid_1): Remove.
2694         * rtti.c
2695         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2696         (typeid_ok_p): New function.
2697         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2698         (get_tinfo_decl): Remove old abi documentation.
2699         (tinfo_from_decl): Remove.
2700         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2701         (get_typeid_1): Remove.
2702         (get_base_offset): Remove.
2703         (synthesize_tinfo_var): Absorb get_base_offset.
2704         (create_real_tinfo_var): Don't use tinfo_decl_id.
2705
2706 2001-07-23  Graham Stott  <grahams@redhat.com>
2707
2708         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2709         variable has_two_argument_delete_p.
2710
2711 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
2712
2713         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2714         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2715         (CPTI_INDEX_IDENTIFIER): Remove.
2716         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2717         (delta2_identifier): Remove.
2718         (index_identifier): Remove.
2719         (pfn_or_delta2_identifier): Remove.
2720         (flag_vtable_thunks): Remove.
2721         (VTABLE_DELTA2_NAME): Remove.
2722         (VTABLE_INDEX_NAME): Remove.
2723         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2724         (vfunc_ptr_type_node): Adjust.
2725         (VTABLE_NAME_PREFIX): Adjust.
2726         (build_vfn_ref): Lose first parameter.
2727         (fixup_all_virtual_upcast_offsets): Remove.
2728         * decl.c (initialize_predefined_identifiers): Remove
2729         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2730         (init_decl_processing): Remove no-vtable-thunk code.
2731         * decl2.c (flag_vtable_thunks): Remove.
2732         (mark_vtable_entries): Remove no-vtable-thunk code.
2733         * error.c (dump_decl): Remove no-vtable-thunk code.
2734         (dump_expr): Adjust ptr to member function code.
2735         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2736         code.
2737         * rtti.c (build_headof): Remove no-vtable-thunk code.
2738         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2739         * search.c (get_base_distance): Remove expand_upcast_fixups case.
2740         (virtual_context) Remove.
2741         (expand_upcast_fixups): Remove.
2742         (fixup_virtual_upcast_offsets): Remove.
2743         (fixup_all_virtual_upcast_offsets): Remove.
2744         * typeck.c (get_member_function_from_ptrfunc): Remove
2745         no-vtable-thunk code.
2746         * call.c (build_over_call): Adjust call to build_vfn_ref.
2747         * class.c (build_vfn_ref): Lose first parameter. Remove
2748         no-vtable-thunk code.
2749         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2750         (build_vtable_entry): Remove no-vtable-thunk code.
2751
2752 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
2753
2754         Remove old-abi remnants. Remove comments about old abi
2755         behaviour. Remove references to 'new-abi' in comments.
2756         * cp-tree.h: Adjust comments.
2757         (vbase_offsets_in_vtable_p): Delete.
2758         (vcall_offsets_in_vtable_p): Delete.
2759         (vptrs_present_everywhere_p): Delete.
2760         (all_overridden_vfuns_in_vtables_p): Delete.
2761         (merge_primary_and_secondary_vtables_p): Delete.
2762         (TYPE_CONTAINS_VPTR_P): Adjust.
2763         (VTT_NAME_PREFIX): Remove.
2764         (CTOR_VTBL_NAME_PREFIX): Remove.
2765         (init_vbase_pointers): Remove.
2766         * class.c: Adjust coments.
2767         (build_vbase_pointer_fields): Delete.
2768         (build_vbase_pointer): Remove old-abi code.
2769         (build_secondary_vtable): Likewise.
2770         (modify_all_vtables): Likewise.
2771         (create_vtable_ptr): Likewise.
2772         (layout_class_type): Likewise.
2773         (finish_struct_1): Likewise.
2774         (finish_vtbls): Likewise.
2775         (dfs_finish_vtbls): Delete.
2776         (build_vbase_offset_vtbl_entries): Remove old-abi code.
2777         * cvt.c: Adjust comments.
2778         * decl.c: Adjust comments.
2779         * decl2.c: Adjust comments.
2780         * init.c: Adjust comments.
2781         (construct_virtual_bases): Remove old-abi code.
2782         * lang-specs.h: Remove -fno-new-abi.
2783         * mangle.c: Adjust comments.
2784         * rtti.c: Adjust comments.
2785         (get_base_offset): Remove old-abi-code.
2786         * search.c: Adjust comments.
2787         (dfs_init_vbase_pointers): Remove.
2788         (dfs_vtable_path_unmark): Remove.
2789         (init_vbase_pointers): Remove.
2790         * semantics.c: Adjust comments.
2791         (emit_associated_thunks): Remove old-abi code.
2792         * typeck.c: Adjust comments.
2793
2794 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
2795
2796         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2797         params.h.
2798
2799 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
2800
2801         * class.c (finish_struct_anon): Forbid nested classes.
2802
2803 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2804
2805         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2806         * optimize.c: Include debug.h.
2807         (maybe_clone_body): Use debug hook.
2808         * semantics.c: Include debug.h.
2809         (expand_body): Use debug hook.
2810
2811 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
2812
2813         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2814
2815 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
2816
2817         * class.c (type_requires_array_cookie): New function.
2818         (check_methods): Don't try to figure out whether the type needs a
2819         cookie here.
2820         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2821         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2822         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2823         * pt.c (instantiate_class_template): Don't set
2824         TYPE_VEC_DELETE_TAKES_SIZE.
2825         * NEWS: Document ABI changes from GCC 3.0.
2826
2827 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
2828             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
2829
2830         * NEWS (Changes in GCC 3.0): Fix typo.
2831
2832 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
2833
2834         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2835         which attributes are to be attached, and a flags argument.  Update
2836         call to decl_attributes.
2837         (grokfield): Update call to decl_attributes.
2838         * class.c (finish_struct): Update call to cplus_decl_attributes.
2839         * cp-tree.h (cplus_decl_attributes): Update prototype.
2840         * decl.c (start_decl, grokdeclarator, start_function): Update
2841         calls to decl_attributes and cplus_decl_attributes.
2842         * friend.c (do_friend): Update call to cplus_decl_attributes.
2843         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2844
2845 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
2846
2847         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2848         for `register' variables with an asm-specification.
2849
2850 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
2851
2852         * semantics.c (finish_asm_stmt): Mark the output operands
2853         to an asm addressable, if necessary.
2854
2855 2001-07-11  Ben Elliston  <bje@redhat.com>
2856
2857         * Revert this change -- there is a subtle bug.
2858
2859         PR c++/80
2860         * decl.c (finish_enum): New "attributes" argument; pass it to
2861         cplus_decl_attributes.  Use a narrower type if the enum is packed.
2862         * cp-tree.h (finish_enum): Adjust prototype.
2863         * parse.y (enum_head): New non-terminal.
2864         (structsp): Use it. Enums now may be preceded or followed by
2865         optional attributes -- pass their chained tree to finish_enum().
2866         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2867
2868 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
2869
2870         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2871         variables.
2872
2873 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
2874
2875         * semantics.c (cp_expand_stmt): Fix for null
2876         current_function_return_value.
2877
2878 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
2879
2880         * call.c (build_op_delete_call): Initialize fn.
2881         (convert_like_real): Delete conditional.
2882         (joust): Initialize *w and *l.
2883         * class.c: Add prototype for binfo_ctor_vtable.
2884         (get_primary_binfo): Initialize result.
2885         * init.c (build_java_class_ref): Initialize name.
2886
2887 2001-07-09  Erik Rozendaal  <dlr@acm.org>
2888
2889         * typeck.c (unary_complex_lvalue): Do not duplicate the
2890         argument to modify, pre-, or post-increment when used as an
2891         lvalue and when the argument has side-effects.
2892
2893 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2894
2895         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2896         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
2897         cplus_decl_attributes even if attrs is NULL.
2898         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2899
2900 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
2901
2902         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2903         calls to decl_attributes.
2904
2905 2001-07-06  Ira Ruben   <ira@apple.com>
2906
2907         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2908         be DECL_TEMPLATE_RESULT.
2909
2910 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2911
2912         * cp-tree.h (copy_template_template_parm): Rename to ...
2913         (bind_template_template_parm): ... here.
2914         * tree.c (copy_template_template_parm): Rename to ...
2915         (bind_template_template_parm): ... here.  Remove the case when
2916         NEWARGS is NULL_TREE.
2917         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2918         BOUND_TEMPLATE_TEMPLATE_PARM.
2919         * pt.c (lookup_template_class): Adjust.
2920
2921 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
2922
2923         * cvt.c (convert_lvalue): New fn.
2924         * cp-tree.h: Declare it.
2925         * method.c (do_build_assign_ref): Use it.
2926         (do_build_copy_constructor): Convert parm to base types
2927         before calling base constructors.
2928
2929         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
2930         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
2931         optimize.
2932         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
2933
2934 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
2935
2936         * optimize.c (optimize_inline_calls): New function, broken out
2937         of ...
2938         (optimize_function): ... here. Call it. Don't inline if it is
2939         a thunk.
2940         (dump_function): Print name of dump flag causing this dump.
2941         * semantics.c (expand_body): Move thunk inline check to
2942         optimize_function.
2943
2944 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2945
2946         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
2947         (comptypes): Use target.comp_type_attributes.
2948
2949 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
2950
2951         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2952
2953 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
2954
2955         * error.c (lang_print_error_function): Add a `diagnostic_context *'
2956         parameter. Tweak.
2957
2958 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2959
2960         * decl2.c (import_export_class): Update.
2961
2962 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2963
2964         * error.c (init_error): Adjust settings.
2965
2966 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2967
2968         * error.c (init_error): Adjust settings.
2969
2970 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
2971
2972         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
2973         return pointers to data members by reference rather than by value.
2974
2975 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
2976
2977         Implement the Named Return Value optimization.
2978         * cp-tree.h (struct cp_language_function): Add x_return_value.
2979         (current_function_return_value): Now a macro.
2980         * decl.c: Don't define it.
2981         (define_label, finish_case_label): Don't clear it.
2982         (init_decl_processing): Don't register it with GC.
2983         * semantics.c (genrtl_finish_function): Don't check it for
2984         no_return_label.  Copy the RTL from the return value to
2985         current_function_return_value and walk, calling...
2986         (nullify_returns_r): ...this new fn.
2987         * typeck.c (check_return_expr): Set current_function_return_value.
2988
2989 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
2990
2991         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
2992         sharing a ctor vtable with.  Merge code for cases 1 and 2.
2993         (binfo_ctor_vtable): New fn.
2994         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2995
2996 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
2997
2998         * class.c (dfs_find_final_overrider): Fix logic.
2999
3000         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
3001         virtual thunk instead of non-virtual.
3002         (get_matching_virtual): Uncomment.
3003
3004         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
3005         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
3006         PARM, not ARG.
3007
3008 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
3009
3010         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
3011         we've not emerged from the hierarchy of RTTI_BINFO on reaching
3012         a non-virtual base.
3013
3014 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
3015
3016         * NEWS: Update release number.
3017
3018 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3019
3020         PR c++/3130, c++/3131, c++/3132
3021         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
3022         * class.c (force_canonical_binfo_r): Move
3023         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
3024         virtual bases unless they're primary and what they're primary
3025         too has been moved.
3026         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
3027         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
3028         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
3029         derived binfo.
3030         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
3031         (layout_nonempty_base_or_field): Add most derived type
3032         parameter. Adjust.
3033         (layout_empty_base): Likewise.
3034         (build_base_field): Likewise.
3035         (build_base_fields): Likewise.
3036         (propagate_binfo_offsets): Add most derived type
3037         parameter. Skip non canonical virtual bases too.
3038         (dfs_set_offset_for_unshared_vbases): Don't skip primary
3039         bases. Do skip canonical bases.
3040         (layout_virtual_bases): Adjust.
3041         (layout_class_type): Adjust.
3042         (dfs_get_primary_binfo): Build list of virtual primary base
3043         candidates.
3044         (get_primary_binfo): Check that the shared virtual primary
3045         base candidate was found first.
3046         (accumulate_vtbl_inits): Don't do anything for non-vptr
3047         containing binfos. For case 1 primary virtual bases, keep
3048         checking that we've not emerged from the hierarchy of RTTI_BINFO.
3049
3050 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
3051
3052         PR c++/3089
3053         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
3054         hierarchy looking for primary bases for a ctor
3055         vtable. Recursively call oneself, if we meet our primary via
3056         this route and haven't met it yet via inheritance graph order.
3057
3058 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
3059
3060         * lang-options.h: Emit documentation for -fno-honor-std, not
3061         -fhonor-std.
3062
3063 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
3064
3065         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
3066         Don't clobber delta.
3067         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
3068
3069 2001-06-10  Mark Mitchell <mark@codesourcery.com>
3070             Gabriel Dos Reis  <gdr@codesourcery.com>
3071
3072         * Make-lang.in (cp/call.o): Depend on diagnostic.h
3073         (cp/typeck.o): Depend on diagnostic.h
3074         (cp/typeck2.o): Depend on diagnostic.h
3075         (cp/repo.o): Depend on dignostic.h
3076         * typeck.c: #include diagnostic.h
3077         (convert_for_initialization): Remove extern declaration for
3078         warningcount and errorcount.
3079
3080         * call.c: #include diagnostic.h
3081         (convert_like_real): Remove extern declaration for warnincount and
3082         errorcount.
3083
3084         * repo.c: #include diagnostic.h
3085         * typeck2.c: #include diagnostic.h
3086
3087 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3088
3089         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
3090         in previous change.
3091
3092 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3093
3094         PR c++/2929
3095         * friend.c (do_friend): Use push_decl_namespace for classes at
3096         namespace scope.
3097
3098 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
3099             Jason Merrill <jason_merrill@redhat.com>
3100
3101         PR c++/3061
3102         * class.c (build_secondary_vtable): Use assert, rather than an error
3103         message.
3104         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
3105         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
3106         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
3107         Don't set BINFO_VTABLE for a primary virtual base.
3108
3109 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
3110
3111         * decl.c (duplicate_decls): Update source position information
3112         when a template function is defined.
3113
3114 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
3115
3116         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
3117
3118 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
3119
3120         PR c++/2914
3121         * decl.c (pushtag): Don't push into a complete type's scope.
3122
3123 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
3124
3125         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
3126         (struct lang_decl_flags): Lose generate_with_vtable_p.
3127         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
3128         * class.c (copy_virtuals): Adjust.
3129         * decl2.c (mark_vtable_entries): Adjust.
3130         * method.c (make_thunk, build_vtable_entry): Adjust.
3131         * class.c (update_vtable_entry_for_fn): Only look as far as the
3132         first defining class.
3133         (build_vtbl_initializer): Put nothing in the slot for a function only
3134         defined in a lost primary virtual base.
3135         (add_vcall_offset_vtbl_entries_1): Use the same code for
3136         the lost primary case and the normal case.
3137         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
3138         (get_vfield_offset, get_derived_offset): Lose.
3139         (dfs_find_final_overrider): Use look_for_overrides_here.
3140         (get_matching_virtual): New fn.
3141         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
3142         not BV_VCALL_INDEX.
3143         * search.c (look_for_overrides_here): Split out from...
3144         (look_for_overrides_r): Here.
3145
3146         * class.c (find_final_overrider): Return error_mark_node on error.
3147
3148         * decl2.c (key_method): #if 0 accidental change.
3149
3150 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3151
3152         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
3153         (build_over_call): Likewise.
3154         * decl.c (grokparms): Likewise.
3155         * pt.c (tsubst_decl): Likewise.
3156         * typeck.c (convert_arguments): Likewise.
3157
3158 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
3159
3160         * semantics.c (begin_class_definition): Robustify.
3161
3162         * pt.c (instantiate_decl): Tell the repository code about the
3163         clones, not the cloned functions.
3164         * repo.c (repo_template_used): Explicitly instantiate the cloned
3165         function, not the clones.
3166
3167 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3168
3169         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
3170         ICS_BAD_FLAG on created conversion.
3171         (compare_ics): Break out rank.
3172
3173 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3174
3175         * decl.c (xref_tag): Remove extraneous %s on dependent name
3176         lookup warning.
3177
3178 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3179
3180         * class.c (layout_vtable_decl): Fix off by one error on
3181         build_index_type.
3182         (build_vtt): Likewise.
3183         (build_ctor_vtbl_group): Likewise.
3184
3185 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3186
3187         * class.c (maybe_indent_hierarchy): New function.
3188         (dump_class_hierarchy_r): Add flags. Dump extra binfo
3189         information, if enabled. Use maybe_indent_hierarchy. Adjust
3190         output format.
3191         (dump_class_hierarchy): Adjust prototype. Adjust output format.
3192         (dump_array, dump_vtable, dump_vtt): New functions.
3193         (finish_struct_1): Adjust hierarchy dumping.
3194         (initialize_vtable): Call dump_vtable.
3195         (build_vtt): Call dump_vtt.
3196         (build_ctor_vtbl_group): Call dump_vtable.
3197         * decl2.c (flag_dump_class_layout): Remove.
3198         (cxx_decode_option): Remove dump translation unit
3199         and dump class hierarchy check. Call dump_switch_p.
3200         (finish_file): Adjust dumping.
3201         (dump.c): Only dump base classes if not TDF_SLIM.
3202         Only dump namespace members if not TDF_SLIM.
3203         * optimize.c (dump_function): New function.
3204         (optimize_function): Call dump_function.
3205         * semantics.c (expand_body): Use dump_enabled_p.
3206
3207 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
3208
3209         PR g++/2936
3210         Part missed from first commit
3211         * decl2.c (finish_anon_union): Copy context.
3212
3213 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
3214
3215         PR g++/2936
3216         * optimize.c (remap_decl): Remap anonymous aggregate members too.
3217
3218 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3219
3220         PR g++/2823
3221         * semantics.c (expand_body): Don't optimize thunks.
3222
3223 2001-05-25  Sam TH  <sam@uchicago.edu>
3224
3225         * cp-tree.h lex.h: Fix header include guards.
3226
3227 2001-05-25  Mark Mitchell <mark@codesourcery.com>
3228
3229         * decl.c (init_decl_processing): Tweak.
3230
3231 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
3232
3233         * decl.c (duplicate_decls): Tidy.
3234         (init_decl_processing): Always set flag_no_builtin.
3235
3236 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3237
3238         PR c++/2184
3239         * decl2.c (do_local_using_decl): Push the decls, even in a
3240         template.
3241
3242 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
3243
3244         * optimize.c (initialize_inlined_parameters): Don't set
3245         TREE_READONLY for a VAR_DECL taking the place of an inlined
3246         PARM_DECL.
3247
3248 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
3249
3250         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
3251         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
3252         attribute.
3253
3254 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
3255
3256         * parse.y: Refer to compound literals as such, not as
3257         constructor-expressions.
3258
3259 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
3260
3261         * call.c (build_op_delete_call): Ignore exception-specifications
3262         when looking for matching delete operators.
3263         * init.c (build_new_1): Compute whether or not the allocation
3264         function used is a placement allocation function or not, and
3265         communicate this information to build_op_delete_call.
3266
3267 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
3268
3269         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
3270         (build_vtbl_ref): Adjust.
3271         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
3272         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
3273         Re-add vtable-gc.
3274         (unsupported_options): Correspondingly.
3275
3276         * decl2.c (maybe_make_one_only): Check flag_weak, not
3277         supports_one_only().
3278
3279         * cp-tree.def (START_CATCH_STMT): Lose.
3280         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
3281         * tree.c (cp_statement_code_p): Don't case it.
3282         * semantics.c (cp_expand_stmt): Likewise.
3283         * cp-tree.h (START_CATCH_TYPE): Lose.
3284         (HANDLER_TYPE): New.
3285         * except.c (expand_start_catch_block): Don't start any blocks.
3286         Return the type.
3287         (expand_end_catch_block): Don't end any blocks.
3288         * parse.y (handler): Don't pass anything from finish_handler_parms
3289         to finish_handler.
3290         * pt.c (tsubst_expr): Likewise.
3291         * semantics.c (begin_handler): Call note_level_for_catch here.
3292         (finish_handler_parms): Don't return anything.
3293         (genrtl_catch_block, begin_catch_block): Lose.
3294         (genrtl_handler): Call expand_start_catch here.
3295
3296 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
3297
3298         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
3299         (get_vtable_decl, build_vtt): Not here.
3300
3301 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
3302
3303         PR c++/2781
3304         * optimize.c (update_cloned_parm): Copy addressability and other
3305         flags.
3306
3307 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3308
3309         * pt.c (determine_specialization): Ignore artificial functions.
3310
3311 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
3312
3313         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
3314         (C_RID_CODE): Remove.
3315         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
3316         (init_parse): Don't do it here.
3317
3318 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
3319
3320         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3321         function declaration to avoid stripping the symbol's attributes.
3322
3323 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
3324
3325         * decl.c (pushdecl): Adjust error string.
3326         (xref_tag): Adjust friend class injection warning. Remove the
3327         inherited name from the class shadowed scope.
3328
3329 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
3330
3331         * except.c (cp_protect_cleanup_actions): New function.
3332         (init_exception_processing): Don't set protect_cleanup_actions
3333         here.  Do set lang_protect_cleanup_actions.
3334
3335 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3336
3337         * spew.c (read_token): Call yyerror on all unexpected tokens.
3338
3339 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
3340
3341         * init.c (member_init_ok_or_else): Take a tree rather than
3342         string for name.
3343         (expand_member_init): Adjust.
3344
3345 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
3346
3347         * decl.c (duplicate_decls): Suppress warning about duplicate
3348         decls if the first decl is a friend.
3349
3350 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
3351
3352         * except.c (choose_personality_routine): Export.  Add
3353         explanatory comment.  Take an enum languages, not a boolean.
3354         (initialize_handler_parm): Adjust to match.
3355         * cp-tree.h: Prototype choose_personality_routine.
3356         * lex.c (handle_pragma_java_exceptions): New function.
3357         (init_cp_pragma): Register #pragma GCC java_exceptions.
3358
3359 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3360
3361         * method.c (build_mangled_C99_name): Remove unused prototype.
3362
3363 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
3364
3365         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
3366         * typeck.c (get_member_function_from_ptrfunc,
3367         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
3368         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
3369
3370         Reverted Geoff Keating's 2001-05-03's patch.
3371
3372 2001-05-11  Ira Ruben   <ira@apple.com>
3373
3374         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3375
3376 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
3377
3378         * cp-tree.h (finish_label_expr, lookup_label): Delete.
3379         * parse.y: Update for '&&'; don't issue warning here.
3380         * semantics.c (finish_label_expr): Delete.
3381
3382 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
3383
3384         * splay-tree.h (splay_tree_max): New function.
3385         (splay_tree_min): Likewise.
3386
3387 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
3388
3389         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3390         (pfn_vflag_identifier): Define.
3391         Update comment about layout of pointer functions.
3392         (build_ptrmemfunc1): Update prototype.
3393         (expand_ptrmemfunc_cst): Update prototype.
3394         * decl.c (initialize_predefined_identifiers): Initialize
3395         pfn_vflag_identifier.
3396         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3397         an extra field to the type.
3398         * expr.c (cplus_expand_constant): Pass 'flag' between
3399         expand_ptrmemfunc_cst and build_ptrmemfunc1.
3400         * typeck.c (get_member_function_from_ptrfunc): When
3401         FUNCTION_BOUNDARY < 16, look at additional field to determine
3402         if a pointer-to-member is a real pointer or a vtable offset.
3403         (build_ptrmemfunc1): Add new parameter to contain extra field.
3404         (build_ptrmemfunc): Pass the extra field around.
3405         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3406         (pfn_from_ptrmemfunc): Ignore the extra field.
3407
3408 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
3409
3410         * cp-tree.h (flag_inline_trees): Update documentation.
3411         * decl.c (init_decl_processing): Adjust handling of
3412         flag_inline_functions and flag_inline_trees to support -O3.
3413         (grokfndecl): Set DECL_INLINE on all functions if that's what
3414         the user requested.
3415         (save_function_data): Clear DECL_INLINE in
3416         current_function_cannot_inline is non-NULL.
3417         * decl2.c (flag_inline_trees): Update documentation.
3418
3419 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
3420
3421         * dump.c (cp_dump_tree, USING_STMT case): New case.
3422         * tree.c (cp_statement_code_p): Add USING_STMT.
3423         * decl2.c (do_using_directive): Add the using directive statement.
3424
3425         * tree.c (walk_tree): Reformat an if block.
3426
3427 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3428
3429         * decl.c (compute_array_index_type): Don't try to do anything with
3430         the indices when processing a template.
3431
3432 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3433
3434         * call.c: NULL_PTR -> NULL.
3435         * class.c: Likewise.
3436         * cvt.c: Likewise.
3437         * decl.c: Likewise.
3438         * decl2.c: Likewise.
3439         * except.c: Likewise.
3440         * init.c: Likewise.
3441         * rtti.c: Likewise.
3442         * search.c: Likewise.
3443         * tree.c: Likewise.
3444         * typeck.c: Likewise.
3445         * typeck2.c: Likewise.
3446
3447 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
3448
3449         * decl2.c (do_using_directive): Revert previous patch.
3450
3451 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3452
3453         * cp-tree.def (USING_STMT): New statement node.
3454         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3455         * decl2.c (do_using_directive): Add USING_STMT to statement
3456         tree. Don't emit errors when processing template decl.
3457         * pt.c (tsubst_expr, USING_STMT case): New case.
3458         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3459
3460 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3461
3462         * call.c (build_new_op): Convert args from reference here.
3463         (build_conditional_expr): Don't convert here.
3464
3465 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
3466
3467         * spew.c (last_token_id): New static variable.
3468         (read_token): Set it here.
3469         (yyerror): Use it here.
3470
3471 2001-04-30  Richard Henderson  <rth@redhat.com>
3472
3473         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3474         * decl.c: Likewise.
3475
3476 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3477
3478         * gxxint.texi: Remove.
3479         * Make-lang.in: Remove all traces of gxxint.texi.
3480
3481 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
3482
3483         * decl2.c (start_static_initialization_or_destruction): Correct
3484         logic to handle the -fno-use-cxa-atexit case.
3485
3486 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
3487
3488         * optimize.c (update_cloned_parm): New function.
3489         (maybe_clone_body): Use it.  Update the `this' parameter too.
3490
3491 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
3492
3493         * decl2.c (unsupported_options): Add new-abi.
3494         * lang-options.h: Remove no longer supported options.
3495
3496 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3497
3498         * except.c (can_convert_eh): Don't check template parms,
3499         typename types etc.
3500
3501 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3502
3503         * optimize.c (maybe_clone_body): Copy parameter names and locations.
3504
3505 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
3506
3507         * cp-tree.h (adjust_clone_args): Prototype new function.
3508         * class.c (adjust_clone_args): New function.
3509         * decl.c (start_function): Call it for in charge ctors.
3510
3511 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
3512
3513         * method.c (use_thunk): Make sure that thunks really are emitted
3514         when requested.
3515
3516 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
3517
3518         * mangle.c (write_chars): New macro.
3519         (hwint_to_ascii): New function
3520         (write_number): Use it.
3521         (write_integer_cst): Deal with really big numbers.
3522
3523 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
3524
3525         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3526         the clone.
3527
3528 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
3529
3530         * decl.c (grokdeclarator): Set context of namespace scope
3531         TYPE_DECLS.
3532
3533 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
3534
3535         * cp/optimize.c: Include hashtab.h.
3536         (struct inline_data): Add tree_pruner.
3537         (expand_call_inline, expand_calls_inline): Use it when calling
3538         walk_tree.
3539         (optimize_function): Initialize and free tree_pruner.
3540
3541 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
3542
3543         Lazy __FUNCTION__ generation.
3544         * cp-tree.def (FUNCTION_NAME): Remove.
3545         * cp-tree.h (function_name_declared_p): Remove.
3546         (cp_fname_init): Prototype.
3547         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3548         don't call declare_function_name. Call start_fname_decls.
3549         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3550         clobber the line number.
3551         (cp_fname_init): New function.
3552         (start_function): Call start_fname_decls.
3553         (finish_function): Call finish_fname_decls.
3554         * lex.c (reswords): Add slots for __FUNCTION__ et al.
3555         (rid_to_yy): Add mappings for __FUNCTION__ et al.
3556         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3557         * parse.y (VAR_FUNC_NAME): New token.
3558         (primary): Add VAR_FUNC_NAME.
3559         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3560         generation.
3561         (tsubst, FUNCTION_NAME case): Remove.
3562         (tsubst_copy, FUNCTION_NAME case): Remove.
3563         (tsubst_expr, DECL_STMT case): Be careful with a
3564         DECL_PRETTY_FUNCTION_P.
3565         (instantiate_decl): Remove function_name_declared_p.
3566         * semantics.c (begin_compound_statement): Don't call
3567         declare_function_name here.
3568         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3569         (finish_translation_unit): Call finish_fname_decls.
3570         (expand_body): Remove function_name_declared_p.
3571         * typeck2.c (digest_init): Allow any ERROR_MARK.
3572
3573 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
3574
3575         * pt.c (tsubst_decl): Use VOID_TYPE_P.
3576         * semantics.c: Fix some typos.
3577
3578 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
3579
3580         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
3581
3582 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3583
3584         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3585
3586 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
3587
3588         * except.c (build_throw): Wrap the initialization of the exception
3589         object in a MUST_NOT_THROW_EXPR.
3590         (do_free_exception): #if 0.
3591
3592 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
3593
3594         * cp-tree.h (finish_enum): Change prototype.
3595         * decl.c (finish_enum): Reorganize.
3596         * parse.y (structsp): Adjust calls to finish_enum.
3597
3598 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3599
3600         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3601         't' case.
3602
3603 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
3604
3605         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3606         (layout_empty_base): Return at end flag.
3607         (build_base_field): Likewise.
3608         (build_base_fields): Likewise.
3609         (layout_virtual_bases): Don't add 1 to eoc value.
3610         (end_of_class): Use full size for empty bases.
3611         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3612         empty bases. Don't add 1 to eoc value. Only add trailing padding
3613         if we're an empty class with no empty bases.
3614         (dump_class_hierarchy): Dump size and alignment.
3615
3616 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3617
3618         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3619         ICS_BAD_FLAG.
3620
3621 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
3622
3623         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3624         is found, look first if name does not match the structure name.
3625
3626 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
3627
3628         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3629         set.
3630         (SET_DECL_LANGUAGE): New macro.
3631         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3632         (pushdecl): Likewise.
3633         (build_library_fn_1): Likewise.
3634         (build_cp_library_fn): Likewise.
3635         (grokfndecl): Likewise.
3636         (grokvardecl): Mark `extern "C"' variables as having C linkage.
3637         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3638         * lex.c (retrofit_lang_decl): Likewise.
3639         * mangle.c (mangle_decl_string): Don't mangle the names of
3640         variables declared with C language linkage.
3641         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3642
3643 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3644
3645         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3646         flag_access_control from uninitialized storage.
3647
3648 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
3649
3650         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3651         * mangle.c (write_pointer_to_member_type): Fix mangling of
3652         pointers to cv-qualified member function types.
3653
3654         * init.c (build_delete): Create a SAVE_EXPR for the address if
3655         we're going to use it more than once.
3656
3657 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
3658
3659         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3660         (expand_ptremfunc_cst): Change prototype.
3661         (delta2_from_ptrmemfunc): Remove.
3662         * expr.c (cplus_expand_constant): Adjust call to
3663         expand_ptrmemfunc_cst.
3664         * typeck.c (build_ptrmemfunc1): Simplify.
3665         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3666         results in a constant.
3667         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3668         (delta2_from_ptrmemfunc): Remove.
3669         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3670
3671 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
3672
3673         * cp-tree.h (decl_namespace_list): New macro.
3674         (struct saved_scope): Add decl_ns_list.
3675         * decl.c (mark_saved_scope): Mark it.
3676         * decl2.c: Lose static decl_namespace_list.
3677         (init_decl2): Don't save it.
3678
3679 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3680
3681         * cp-tree.h (warn_return_type, yylex): Delete redundant
3682         declarations.
3683
3684         * decl.c (current_class_depth, global_namespace): Likewise.
3685
3686         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3687
3688         * repo.c (flag_use_repository): Likewise.
3689
3690 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3691
3692         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3693         set_block, pushdecl, getdecls, gettags, init_decl_processing,
3694         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3695         lvalue_or_else, print_lang_statistics, comp_target_types,
3696         unsigned_type, signed_type, signed_or_unsigned_type,
3697         build_function_call, mark_addressable, incomplete_type_error):
3698         Delete redundant declarations.
3699
3700 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
3701
3702         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3703         (TYPE_ANONYMOUS_P): New macro.
3704         (TAGGED_TYPE_P): New macro.
3705         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3706         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3707         * tree.c (no_linkage_helper): Likewise.
3708         * semantics.c (begin_class_definition): Likewise.
3709         * pt.c (convert_template_argument): Likewise.
3710         * lex.c (check_for_missing_semicolon): Likewise.
3711
3712 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3713
3714         * class.c (dfs_unshared_virtual_bases): New function.
3715         (mark_primary_bases): Call it.
3716         (check_bases): Ignore virtual bases when determining
3717         nearly-emptiness.
3718
3719 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
3720
3721         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3722
3723 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
3724
3725         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3726         cloned function to the clone.
3727
3728 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3729
3730         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3731
3732         * semantics.c: Include expr.h.
3733
3734 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
3735
3736         * method.c (implicitly_declare_fn): Commonize code for copy ctor
3737         and assignment op. Set TREE_USED for parameter.
3738
3739 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
3740
3741         * class.c (find_final_overrider_data): Add `candidates'.
3742         (dfs_find_final_overrider): Don't issue error messages
3743         prematurely.
3744         (find_final_overrider): Issue error messages here.
3745         (build_base_field): Don't warn about amgibuous direct bases here.
3746         (warn_about_ambiguous_direct_bases): New function.
3747         (layout_class_type): Use it.
3748
3749 2001-04-10  Richard Henderson  <rth@redhat.com>
3750
3751         * typeck.c (build_array_ref): Push the array reference inside
3752         COMPOUND_EXPR and COND_EXPR.
3753
3754 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
3755
3756         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3757         * decl.c (duplicate_decls): Adjust accordingly.
3758         (maybe_commonize_var): Likewise.
3759         (grokfndecl): Likewise.
3760         (start_function): Likewise.
3761         (start_method): Likewise.
3762         * decl2.c (key_method): Likewise.
3763         (import_export_decl): Likewise.
3764         * method.c (implicitly_declare_fn): Likewise.
3765         * optimize.c (maybe_clone_body): Likewise.
3766
3767 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
3768
3769         * lang-specs.h: Add __DEPRECATED.
3770
3771 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
3772
3773         * search.c (get_dynamic_cast_base_type): When building a new
3774         constant, set its type to ssizetype.
3775
3776 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
3777
3778         * optimize.c (expand_call_inline): Only add newly inlined statements
3779         into inlined_stmts.
3780
3781 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3782
3783         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3784         (OPERATOR_FORMAT): Likewise.
3785         (OPERATOR_TYPENAME_FORMAT): Likewise.
3786         * operators.def: Remove old name-mangling information.
3787         * decl.c (grok_op_properties): Adjust accordingly.
3788         * lex.c (init_operators): Likewise.
3789         * rtti.c (get_tinfo_decl): Issue error messages about types that
3790         have variable size.
3791
3792 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
3793
3794         * decl2.c (import_export_decl): Don't call import_export_class
3795         when processing an inline member function.
3796         * semantics.c (expand_body): Call import_export_decl before
3797         emitting inline functions.
3798
3799 2001-03-28  Richard Henderson  <rth@redhat.com>
3800
3801         IA-64 ABI Exception Handling:
3802         * cp-tree.def (EH_SPEC_BLOCK): New.
3803         (MUST_NOT_THROW_EXPR): New.
3804         * cp-tree.h: Update changed function declarations.
3805         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3806         (CPTI_CALL_UNEXPECTED): New.
3807         (struct cp_language_function): Rename x_eh_spec_try_block
3808         to x_eh_spec_block.
3809         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3810         * decl.c (current_binding_level): If no current function
3811         bindings, revert to scope_chain.
3812         (initialize_predefined_identifiers): Remove __cp_push_exception.
3813         (store_parm_decls): Use begin_eh_spec_block.
3814         (finish_function): Use finish_eh_spec_block.
3815         (mark_lang_function): Update for name changes.
3816         * decl2.c (finish_file): No mark_all_runtime_matches.
3817         * dump.c (cp_dump_tree): Handle new tree codes.
3818         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3819         * except.c (catch_language_init, catch_language): Remove.
3820         (init_exception_processing): Don't set language code.
3821         Initialize call_unexpected_node, protect_cleanup_actions,
3822         eh_personality_libfunc, lang_eh_runtime_type.
3823         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3824         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3825         (prepare_eh_type): Split out type canonicalizations ...
3826         (build_eh_type_type): ... from here.
3827         (build_eh_type_type_ref): Remove.
3828         (mark_all_runtime_matches): Remove.
3829         (build_exc_ptr): New.
3830         (do_begin_catch, do_end_catch): New.
3831         (do_pop_exception): Remove.
3832         (build_terminate_handler): Remove.
3833         (choose_personality_routine): Split out language choice from ...
3834         (initialize_handler_parm): ... here.
3835         Use MUST_NOT_THROW_EXPR.
3836         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
3837         exception object handling.
3838         (expand_start_eh_spec, expand_end_eh_spec): Remove.
3839         (expand_exception_blocks, alloc_eh_object): Remove.
3840         (begin_eh_spec_block, finish_eh_spec_block): New.
3841         (do_allocate_exception, do_free_exception): New.
3842         (expand_throw): Merge into ...
3843         (build_throw): ... here.  Update for abi.
3844         * expr.c (cplus_expand_expr): No expand_internal_throw.
3845         Handle MUST_NOT_THROW_EXPR.
3846         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3847         * semantics.c (*) Update for except.h name changes.
3848         (genrtl_try_block): No protect_with_terminate.
3849         (genrtl_eh_spec_block): New.
3850         (genrtl_handler): Don't emit the goto here.
3851         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3852         (genrtl_finish_function): Don't expand_exception_blocks.
3853         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3854
3855 2001-03-28  Richard Henderson  <rth@redhat.com>
3856
3857         * decl.c (struct named_label_list): Rename eh_region to
3858         in_try_scope, add in_catch_scope.
3859         (struct binding_level): Rename eh_region to is_try_scope,
3860         add is_catch_scope.
3861         (note_level_for_try): Rename from note_level_for_eh.
3862         (note_level_for_catch): New.
3863         (poplevel): Copy both is_try_scope and is_catch_scope to
3864         the named_label_list struct.
3865         (check_previous_goto_1): Don't check for catch block via
3866         DECL_ARTIFICIAL; use in_try_scope instead.
3867         (check_goto): Likewise.
3868         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3869         * except.c (expand_start_catch_block): Call note_level_for_catch.
3870         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3871
3872 2001-03-27  Richard Henderson  <rth@redhat.com>
3873
3874         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3875         exceptions_via_longjmp.
3876
3877 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
3878
3879         * pt.c (check_default_tmpl_args):  Make error messages clearer.
3880
3881 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
3882
3883         * error.c:  Also undefine 'A' macro used for cp_printers definition.
3884
3885 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3886
3887         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3888
3889 2001-03-26  Mike Yang <yang@research.att.com>
3890             Mark Mitchell  <mark@codesourcery.com>
3891
3892         * dump.c (dump_access): New function.
3893         (cp_dump_tree): Use it.  Dump basetype information for class
3894         types.
3895
3896 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
3897
3898         * Makefile.in (optimize.o): Depend on params.h.
3899         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3900         (init_decl_processing): Set flag_no_inline when doing
3901         inlining-on-trees.
3902         * optimize.c: Include params.h.
3903         (struct inline_data): Improve documentation of FNS.  Add
3904         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3905         (INSNS_PER_STMT): New macro.
3906         (remap_block): Use CLONING_P.
3907         (inlinable_function_p): Don't inline big functions.
3908         (expand_call_inline): Keep track of how much inlining we've done.
3909         (optimize_function): Set FIRST_INLINED_FN.
3910         (maybe_clone_body): Set CLONING_P.
3911         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3912         tree nodes.
3913         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3914         rest_of_compilation.  Clear DECL_RTL for local variables
3915         afterwards.
3916         (clear_decl_rtl): New function.
3917
3918 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
3919
3920         Implement DR 209
3921         * cp-tree.h (skip_type_access_control,
3922         reset_type_access_control): Prototype.
3923         * decl.c (grokdeclarator): Access of friends is not checked.
3924         * parse.y (component_decl_list): Reset type access control.
3925         * semantics.c (decl_type_access_control): Clear
3926         current_type_lookups.
3927         (save_type_access_control): Don't save if not deferring.
3928         (skip_type_access_control, reset_type_access_control): New
3929         functions.
3930         (begin_class_definition): Do type access control for basetypes.
3931         Start deferred access control.
3932         (finish_class_definition): Resume immediate access control if
3933         this is a local class.
3934
3935 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3936
3937         * class.c (add_method): Use memcpy/memmove, not bcopy.
3938
3939         * decl.c (duplicate_decls): Likewise.
3940
3941 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
3942
3943         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
3944         not `_'.
3945
3946 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
3947
3948         * decl.c (local_names): Define.
3949         (push_local_name): New.
3950         (grok_reference_init): Return init if initializing static reference
3951         variable with non-constant instead of emitting it.
3952         Move expand_static_init call to cp_finish_decl.
3953         (layout_var_decl): Call push_local_name.
3954         (maybe_commonize_var): Allow inlining functions even if they have
3955         static local variables, use comdat_linkage for them if flag_weak.
3956         (check_initializer): Call obscure_complex_init if
3957         grok_reference_init returned non-zero.
3958         (save_function_data): Clear x_local_names.
3959         (pop_cp_function_context): Free x_local_names.
3960         (mark_inlined_fns): Remove.
3961         (mark_lang_function): Mark x_local_names.
3962         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
3963         Mark inlined_fns as tree, remove call to mark_inlined_fns.
3964         * class.c (alter_access): Ensure DECL_ACCESS is never set if
3965         DECL_DISCRIMINATOR_P.
3966         * cp-tree.h (cp_language_function): Add x_local_names.
3967         (lang_decl_flags): Add discriminator into u2.
3968         (lang_decl_inlined_fns): Remove.
3969         (lang_decl): inlined_fns is now a TREE_VEC.
3970         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
3971         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
3972         TREE_VEC, not a custom structure.
3973         (optimize_function): Likewise.
3974         * mangle.c (discriminator_for_local_entity): Discriminate among
3975         VAR_DECL local entities.
3976         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
3977         is not valid.
3978
3979 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
3980
3981         Add support for Java interface method calls.
3982         * cp-tree.h (struct lang_type): Add java_interface flag.
3983         (TYPE_JAVA_INTERFACE): New macro.
3984         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
3985         by setting TYPE_JAVA_INTERFACE.
3986         * call.c (java_iface_lookup_fn): New static.
3987         (build_over_call): If calling a method declared in a
3988         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
3989         expression which resolves the function address.
3990         (build_java_interface_fn_ref): New function.
3991
3992 2001-03-22  Richard Henderson  <rth@redhat.com>
3993
3994         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
3995         * except.c: Don't include it.
3996
3997 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3998             based on an idea from Joe Buck <jbuck@synopsys.com>
3999
4000         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
4001         New nonterminals.
4002         (data_def, component_decl): Add reductions to bad_decl.
4003
4004 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
4005
4006         * method.c (do_build_assign_ref): Don't use build_modify_expr for
4007         anonymous aggregates, since they don't have assignment operator
4008         method.
4009         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
4010         assignment operators for anonymous structure fields.
4011
4012 2001-03-21  Jason Merrill  <jason@redhat.com>
4013
4014         * pt.c (instantiate_decl): Abort if we see a member constant
4015         instantiation that doesn't already have its initializer.
4016         Downgrade explicit instantiation without definition to pedwarn.
4017
4018         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
4019         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
4020         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
4021
4022         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
4023         (pending_vtables): Remove.
4024         * decl2.c (pending_vtables): Remove.
4025         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
4026         CLASSTYPE_VTABLE_NEEDS_WRITING.
4027         (import_export_class): Likewise.
4028         (init_decl2): Don't mark pending_vtables.
4029         * lex.c (handle_pragma_vtable): Just sorry.
4030         * pt.c (instantiate_class_template): Don't mess with
4031         CLASSTYPE_VTABLE_NEEDS_WRITING.
4032         (mark_class_instantiated): Likewise.
4033         * ptree.c (print_lang_type): Don't print it.
4034         * semantics.c (begin_class_definition): Don't set it.
4035
4036         * pt.c (template_tail): Replace with last_pending_template.
4037         (maybe_templates, maybe_template_tail): Remove.
4038         (add_pending_template): Adjust.
4039         (instantiate_pending_templates): Adjust.
4040
4041         * cp-tree.h (struct saved_scope): Remove lang_stack field.
4042         (current_lang_stack): Remove.
4043         * decl.c (maybe_push_to_top_level): Don't initialize it.
4044         (duplicate_decls): Use current_lang_depth.
4045         (xref_basetypes): Likewise.
4046         * class.c (current_lang_depth): New fn.
4047         (push_lang_context): Use more varray functionality.
4048         (pop_lang_context): Likewise.
4049
4050         * error.c (GLOBAL_THING): Always use '__'.
4051
4052 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
4053
4054         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
4055
4056         * mangle.c (mangle_decl_string): Mangle the names of overloaded
4057         operators, even when they have `extern "C"' linkage.
4058
4059 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
4060
4061         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
4062         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4063         where it's not necessary.
4064         (add_method): Remove optimization involving comparison of
4065         DECL_ASSEMBLER_NAME.
4066         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
4067         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4068         where it's not necessary.
4069         (check_methods): Likewise.
4070         (build_clone): Likewise.
4071         (built_vtt): Likewise.
4072         * cp-tree.h (DECL_NEEDED_P): Likewise.
4073         * decl.c (pushtag): Likewise.
4074         (duplicate_decls): Likewise.
4075         (pushdecl): Likewise.
4076         (builtin_function): Likewise.
4077         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
4078         (build_cp_library_fn): Likewise.
4079         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
4080         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4081         where it's not necessary.
4082         (make_rtl_for_nonlocal_decl): Likewise.
4083         (cp_finish_decl): Likewise.
4084         (grokfndecl): Likewise.
4085         (grokvardecl): Likewise.
4086         (grokdeclarator): Likewise.
4087         (start_function): Likewise.
4088         (cp_missing_return_ok_p): Likewise.
4089         * decl2.c (grokclassfn): Likewise.
4090         (check_classfn): Likewise.
4091         (finish_static_data_member_decl): Likewise.
4092         (grokfield): Likewise.
4093         * error.c (GLOBAL_IORD_P): Remove.
4094         (dump_global_iord): Improve output.
4095         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
4096         * except.c (nothrow_libfn_p): Summarily reject any function not in
4097         namespace-scope.
4098         * init.c (build_java_class_ref): Don't explicitly set
4099         DECL_ASSEMBLER_NAME after calling mangle_decl.
4100         * mangle.c (mangle_decl_string): Handle extern "C" functions.
4101         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
4102         * method.c (set_mangled_name_for_decl): Don't explicitly set
4103         DECL_ASSEMBLER_NAME after calling mangle_decl.
4104         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
4105         IDENTIFIER_GLOBAL_VALUE for the thunk.
4106         * pt.c (set_mangled_name_for_template_decl): Remove.
4107         (check_explicit_specialization): Don't use it.
4108         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
4109         (tsubst_friend_function): Likewise.
4110         (tsubst_decl): Likewise.
4111         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
4112         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
4113         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
4114         where it's not necessary.
4115         (tinfo_base_init): Likewise.
4116         (create_real_tinfo_var): Likewise.
4117         * search.c (looup_field_1): Likewise.
4118         * semantics.c (finish_named_return_value): Likewise.
4119         * tree.c (init_tree): Set lang_set_decl_assembler_name.
4120
4121 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4122
4123         Correct semantics restrictions checking in throw-expression.
4124         * except.c (is_admissible_throw_operand): New function.
4125         (build_throw): Use it.
4126
4127 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4128
4129         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
4130         and its ilk.
4131
4132 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
4133
4134         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4135         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
4136         * decl.c (duplicate_decls): Likewise.
4137         (builtin_function): Likewise.
4138         (build_library_fn): Likewise.
4139         (build_cp_library_fn): Likewise.
4140         (check_initializer): Likewise.
4141         (cp_finish_decl): Likewise.
4142         * decl2.c (grokfield): Likewise.
4143         (grok_function_init): Remove #if 0'd code.
4144         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
4145         * friend.c (do_friend): Likewise.
4146         * init.c (get_temp_regvar): Likewise.
4147         * method.c (make_thunk): Likewise.
4148         * pt.c (tsubst_friend_function): Likewise.
4149         (tsubst_decl): Likewise.
4150         (regenerate_decl_from_template): Likewise.
4151         * semantics.c (genrtl_named_return_value): Likewise.
4152         (expand_body): Likewise.
4153         (genrtl_finish_function): Likewise.
4154         * tree.c (cp_tree_equal): Likewise.
4155
4156 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
4157
4158         * call.c (convert_like_real): Add extra semantics to INNER
4159         parameter. Don't convert to temporary if a user conversion
4160         gives us an lvalue that we're about to bind to a reference.
4161         Set INNER to indicate pending reference binding on recursive
4162         calls.
4163
4164 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4165
4166         * cp/lex.c: Delete duplicate pending_lang_change.
4167
4168 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
4169
4170         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
4171         Similarly.
4172         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
4173         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
4174
4175 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
4176
4177         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
4178
4179 2001-03-08  Stan Shebs  <shebs@apple.com>
4180
4181         * cp-tree.h (set_identifier_local_value): Remove unused decl.
4182
4183 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
4184
4185         * spew.c: Remove references to CPP_OSTRING.
4186
4187 2001-03-06  Andrew Haley  <aph@redhat.com>
4188
4189         * typeck.c (convert_arguments): Check that we have an fndecl.
4190
4191 2001-03-05  Andrew Haley  <aph@redhat.com>
4192
4193         * typeck.c (convert_arguments): Don't do ellipsis conversion for
4194         __built_in_constant_p.
4195
4196 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4197
4198         * typeck.c (build_static_cast): Allow enum to enum conversions
4199         as per DR 128.
4200
4201 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4202
4203         * class.c (check_field_decls): Pointers to member do not a
4204         non-pod struct make, as per DR 148.
4205
4206 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
4207
4208         * call.c (joust): cp_pedwarn when using gnu extension concerning
4209         worst conversion sequences.
4210
4211 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4212
4213         * decl.c: Replace all uses of 'boolean' with 'bool'.
4214
4215 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
4216
4217         * lang-specs.h: Add zero initializer for cpp_spec field to
4218         all array elements that need one.  Don't put an #ifdef inside
4219         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
4220         use it.
4221
4222 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4223
4224         Implement using decls inside template functions.
4225         * decl2.c (validate_nonmember_using_decl): Don't special case
4226         fake_std_node in the global namespace. Don't reject early when
4227         processing a template.
4228         (do_local_using_decl): Add to statement tree. Don't do further
4229         processing when building a template.
4230         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
4231
4232 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
4233
4234         * decl2.c (do_nonmember_using_decl): Don't complain if we find
4235         same function. Do complain about ambiguating extern "C"
4236         declarations.
4237
4238 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
4239
4240         Remove floating point and complex type template constant parms.
4241         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
4242         COMPLEX_TYPE extensions.
4243         (invalid_nontype_parm_type_p): Likewise.
4244
4245 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
4246
4247         * except.c (call_eh_info): Revert "match_function"'s type.
4248
4249 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
4250
4251         Fix ctor vtable vcall offsets.
4252         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
4253         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
4254         (get_matching_base): Remove.
4255         (get_original_base): New function.
4256         (build_vtbl_initializer): Initialize vid.rtti_binfo.
4257         Use a virtual thunk for a ctor vtable with an index
4258         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
4259         primary base within a constructor vtable. Only set
4260         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
4261         when primary base has been lost.
4262         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
4263
4264 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
4265
4266         * call.c (joust): Ensure more_specialized()'s argument length
4267         parameter has correct value for constructors.
4268
4269 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
4270
4271         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
4272
4273         * decl.c (mark_inlined_fns): Prototype.
4274
4275 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4276
4277         * spew.c (yylex): Correct handling of friends.
4278
4279 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
4280
4281         * mangle.c (write_encoding): Pass write_function_type the
4282         FUNCTION_DECL for the function being encoded.
4283         (write_function_type): Pass it along to write_bare_function_type.
4284         (write_bare_function_type): Pass it along to write_method_parms.
4285         (write_method_parms): Don't mangle the compiler-generated
4286         parameters to a constructor or destructor.
4287
4288 2001-02-22  Andreas Jaeger  <aj@suse.de>
4289
4290         * optimize.c: Include toplev.h for
4291         note_deferral_of_defined_inline_function prototype.
4292
4293 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
4294
4295         * cp-tree.h (struct lang_decl_inlined_fns): New.
4296         (struct lang_decls): Add inlined_fns.
4297         (DECL_INLINED_FNS): New macro.
4298         * optimize.c (struct inline_data): Add inlined_fns.
4299         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
4300         (inlinable_function_p): Likewise, fix typo in comment,
4301         function is not inlinable if it already inlined function currently
4302         being optimized.
4303         (expand_call_inline): Add fn to inlined_fns if necessary.
4304         (optimize_function): Initialize inlined_fns.
4305         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
4306         * decl.c (mark_inlined_fns): New function.
4307         (lang_mark_tree): Call it.
4308
4309 2001-02-21  Jason Merrill  <jason@redhat.com>
4310
4311         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
4312         (DECL_UNINLINABLE): Move to middle-end.
4313
4314         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4315         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4316         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4317         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4318         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
4319
4320         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4321         second parm of op=.
4322
4323 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
4324
4325         * decl2.c (set_decl_namespace): Allow explicit instantiations in
4326         any namespace.
4327
4328 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4329
4330         * optimize.c (expand_call_inline): Don't walk subtrees of type
4331         nodes.
4332
4333 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
4334
4335         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4336         for a destructor.
4337
4338 2001-02-18  Jason Merrill  <jason@redhat.com>
4339
4340         Do put the VTT parameter in DECL_ARGUMENTS.
4341         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4342         (current_vtt_parm): New macro.
4343         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4344         (DECL_HAS_VTT_PARM_P): New macro.
4345         (DECL_VTT_PARM): Remove.
4346         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4347         * decl.c (duplicate_decls): Only copy the operator code if
4348         appropriate.
4349         (start_function): Set current_vtt_parm.
4350         (lang_mark_tree): Don't mark vtt_parm.
4351         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4352         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
4353         * class.c (build_clone): Maybe remove the VTT parm.
4354         * optimize.c (maybe_clone_body): Set up the VTT parm.
4355         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
4356         * call.c (build_over_call): Just allow the VTT arg.
4357         * method.c (make_thunk): Don't set DECL_VTT_PARM.
4358         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
4359         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
4360         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
4361         * error.c (dump_function_decl): Likewise.
4362         * call.c (build_user_type_conversion_1, convert_like_real): Abort
4363         if we try to call a constructor with in-charge or VTT parms.
4364         * method.c (skip_artificial_parms_for): New fn.
4365         * call.c (add_function_candidate, build_over_call): Call it.
4366         * call.c (build_new_method_call): Use current_vtt_parm.
4367         * init.c (expand_virtual_init): Likewise.
4368         * class.c (same_signature_p): No longer static.
4369         * cp-tree.h: Declare it.
4370         * search.c (look_for_overrides_r): Use it.
4371
4372 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4373
4374         * cp-tree.h (new_abi_rtti_p): Remove.
4375         (name_mangling_version): Likewise.
4376         (flag_do_squangling): Likewise.
4377         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4378         * decl.c (grokfndecl): Likewise.
4379         * decl2.c (name_mangling_version): Remove.
4380         (flag_do_squangling): Likewise.
4381         (lang_f_options): Remove `squangle'.
4382         (unsupported_options): Add `squangle'.
4383         (cxx_decode_option): Issue a warning about uses of
4384         -fname-mangling-version.
4385         (finish_file): Remove old ABI support.
4386         * pt.c (check_explicit_specialization): Likewise.
4387         (tsubst_decl): Likewise.
4388         * rtti.c (init_rtti_processing): Likewise.
4389         (build_headof): Likewise.
4390         (get_tinfo_decl_dynamic): Likewise.
4391         (tinfo_from_decl): Likewise.
4392         (build_dynamic_cast_1): Likewise.
4393         (synthesize_tinfo_var): Likewise.
4394         * init.c (build_new): Allow enumeration types for the array-bounds
4395         in a direct-new-declarator.
4396
4397         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4398
4399         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4400         TREE_PROTECTED from the template being specialized.
4401
4402 2001-02-17  Jason Merrill  <jason@redhat.com>
4403
4404         * decl2.c (build_artificial_parm): Set TREE_READONLY.
4405
4406         * decl.c (bad_specifiers): Allow throw specs on things with
4407         pointer-to-function or -member-function type.
4408         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4409         a pmf.
4410
4411 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
4412
4413         * call.c (check_dtor_name): Handle template names correctly.
4414
4415 2001-02-16  Jason Merrill  <jason@redhat.com>
4416
4417         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4418         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4419         * optimize.c (maybe_clone_body): Don't substitute it.
4420         * call.c (build_new_method_call): Check in_chrg instead.
4421         * init.c (expand_virtual_init): Likewise.
4422
4423 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4424
4425         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4426         class-type introduces at least a type-name.
4427
4428 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
4429
4430         * call.c (convert_like_real): Create a temporary for non-lvalue.
4431
4432 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
4433
4434         * cp-tree.h: Fix typos in comments.
4435
4436 2001-02-16  Jason Merrill  <jason@redhat.com>
4437
4438         * optimize.c (remap_block): If we're compiling a clone, pass the
4439         new block to insert_block.
4440
4441 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
4442
4443         * semantics.c (finish_asm_stmt): Robustify.
4444
4445 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4446
4447         * pt.c (push_template_decl_real): Don't remangle the name of a
4448         class template.
4449
4450 2001-02-15  Jim Meyering  <meyering@lucent.com>
4451
4452         * Make-lang.in (c++.install-common): Depend on installdirs.
4453         (c++.install-info): Likewise.
4454         (c++.install-man): Likewise.
4455
4456 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
4457
4458         * typeck2.c (build_m_component_ref): Robustify.
4459
4460 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
4461
4462         * friend.c (do_friend): Don't take the nested [template] class
4463         into account when deciding whether to warn about the friend
4464         function not referring to a template function.
4465
4466 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
4467
4468         * typeck.c (build_unary_op): Clarify error message.
4469
4470 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
4471
4472         * parse.y (component_constructor_declarator): allow optional
4473         parentheses around constructor class name.
4474
4475 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4476
4477         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4478         section.
4479         * init.c (emit_base_init): Remove incorrect comment about
4480         virtual bases.
4481         * method.c (make_thunk): Fix comment alignment.
4482
4483 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4484
4485         Kill remnants of this is variable.
4486         * cp-tree.h (flag_this_is_variable): Remove.
4487         * decl2.c (flag_this_is_variable): Remove.
4488         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4489         (build_vbase_path): The path is non-static, even in a cdtor.
4490         (resolves_to_fixed_type_p): Add additional return value.
4491         * search.c (init_vbase_pointers): Adjust.
4492         * tree.c (lvalue_p_1): Adjust.
4493         * typeck.c (mark_addressable): Adjust.
4494
4495 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4496
4497         * pt.c (unify): Don't check cv quals of array types.
4498
4499 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
4500
4501         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4502         check whether we already have the type.
4503
4504 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
4505
4506         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4507         * call.c (build_op_delete_call): Simplify to remove duplicate
4508         code.
4509         * class.c (clone_function_decl): Don't build the deleting variant
4510         of a non-virtual destructor.
4511         * decl.c (finish_destructor_body): Don't call delete if this is a
4512         non-virtual destructor.
4513         * init.c (build_delete): Explicitly call `operator delete' when
4514         deleting an object with a non-virtual destructor.
4515
4516 2001-02-13  Jason Merrill  <jason@redhat.com>
4517
4518         * lang-specs.h: Add more __EXCEPTIONS.
4519
4520 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4521
4522         * typeck2.c (process_init_constructor): Check
4523         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4524
4525 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4526
4527         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4528         Remove spurious information in comment. Allow further
4529         adjustments of REFERENCE_TYPE args.
4530
4531 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
4532
4533         * errfn.c (cp_deprecated): Tweak diagnostic text.
4534         * parse.y (new_initializer): Deprecate initializer lists
4535         extension.
4536
4537 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
4538
4539         Remove old ABI support.
4540
4541 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
4542
4543         * decl2.c (flag_vtable_thunks): Always set it to 1.
4544         (flag_new_abi): Likewise.
4545         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4546
4547         * Makefile.in (g++spec.o): Fix typo.
4548
4549 2001-02-09  Jason Merrill  <jason@redhat.com>
4550
4551         * lang-specs.h: Restore definition of __EXCEPTIONS.
4552
4553 2001-02-08  Jason Merrill  <jason@redhat.com>
4554
4555         * search.c (shared_member_p): New function.
4556         (lookup_field_r): Use it.
4557         * cp-tree.h (SHARED_MEMBER_P): Remove.
4558
4559         * method.c (process_overload_item): Handle template-dependent array
4560         bounds.
4561         * pt.c (type_unification_real): If we end up with undeduced nontype
4562         parms, try again.
4563
4564         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4565         types.
4566
4567         * typeck2.c (friendly_abort): Don't say anything if we have
4568         earlier errors or sorries.
4569
4570         * decl.c (check_tag_decl): Notice attempts to redefine bool and
4571         wchar_t.  Ignore if in_system_header.
4572
4573         * decl.c (maybe_push_cleanup_level): New fn...
4574         (start_decl_1): ...split out from here.
4575         * cvt.c (build_up_reference): Use it.
4576         * cp-tree.h: Declare it.
4577
4578 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
4579
4580         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4581         spec.
4582
4583 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
4584
4585         * pt.c (lookup_template_class): Make sure it's a primary
4586         template or template_template_parm when called from the parser.
4587         (instantiate_template_class): Add assertion.
4588
4589 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
4590
4591         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4592         from error_mark_node.
4593
4594 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
4595
4596         Fix specification and implementation bugs in V3 ABI
4597         construction vtables.
4598         * cp-tree.h (flag_dump_class_layout): New flag.
4599         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4600         (BINFO_LOST_PRIMARY_P): New flag.
4601         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4602         (BINFO_PRIMARY_MARKED_P): Rename to ...
4603         (BINFO_PRIMARY_P): ... here.
4604         (binfo_via_virtual): New prototype.
4605         * decl2.c (flag_dump_class_layout): New flag.
4606         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4607         use `=' as a file name separator.
4608         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4609         bases.
4610         (build_vtbl_address): If this is a virtual primary base, then
4611         get the vtbl of what it is ultimately primary for.
4612         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4613         for BINFO_PRIMARY_P.
4614         (dfs_skip_nonprimary_vbases_markedp): Likewise.
4615         (get_shared_vbase_if_not_primary): Likewise.
4616         (dfs_get_pure_virtuals): Likewise.
4617         (expand_upcast_fixups): Likewise.
4618         (fixup_virtual_upcast_offsets): Likewise.
4619         (dfs_find_vbase_instance): Likewise.
4620         (find_vbase_instance): Likewise.
4621         (binfo_from_vbase): Adjust comment to reflect reality.
4622         (binfo_via_virtual): New function.
4623         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4624         for binfo walking during VTT construction.
4625         (dfs_mark_primary_bases): Remove.
4626         (force_canonical_binfo_r): New function.
4627         (force_canonical_binfo): New function.
4628         (mark_primary_virtual_base): New function.
4629         (mark_primary_bases): Walk in inheritance graph order, use
4630         mark_primary_virtual_base.
4631         (determine_primary_base): Use some more intermediate variables.
4632         (dfs_find_final_overrider): Don't check for overriding along a
4633         virtual path.
4634         (dfs_modify_vtables): Walk into primary virtual bases too.
4635         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4636         (build_base_fields): Likewise.
4637         (dfs_set_offset_for_unshared_vbases): Likewise.
4638         (layout_virtual_bases): Likewise.
4639         (end_of_class): Likewise.
4640         (finish_struct_1): Call dump_class_hierarchy, if requested.
4641         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4642         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4643         (dump_class_hierarchy): Add file parameter. Append to file, if
4644         required.
4645         (finish_vtbls): Adjust accumulate_vtbl_inits call.
4646         Use canonical base for virtual bases.
4647         (build_vtt): Add more comments. Adjust build_vtt_inits call.
4648         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4649         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4650         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4651         virtual VTTs.
4652         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4653         from DATA.  We want virtual primary bases and all bases via virtual.
4654         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4655         virtual base when not a construction vtable.
4656         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4657         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4658         Use canonical bases when processing virtual bases.
4659         (accumulate_vtbl_inits): We're interested in any base via a
4660         virtual path.
4661         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4662         within a construction vtable, determine what is being overridden.
4663         (build_vtbl_initializer): Add more comments
4664         (add_vcall_offset_vtbl_entries_1): Adjust comment.
4665         (build_rtti_vtbl_entries): Check if the base has lost its
4666         primary.
4667
4668 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
4669
4670         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4671
4672 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4673
4674         * decl.c (pushdecl): Call abort instead of fatal.
4675         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4676         * init.c (build_new_1): Likewise.
4677         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4678         * decl.c (build_typename_type): hash_table_init now returns void.
4679         decl.c (init_decl_processing): Make an error non-fatal.
4680
4681 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
4682
4683         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4684         Document.
4685         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4686         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4687         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4688         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4689         * decl.c (maybe_commonize_var): Use the new name-mangling where
4690         appropriate.
4691         * decl2.c (comdat_linkage): Enhance comments.  Make all
4692         compiler-generated things static, if COMDAT is not available.
4693         (get_tinfo_decl): Do not make typeinfo objects that belong in the
4694         library COMDAT.
4695         (tinfo_base_init): Use the correct mangled name for typeinfo
4696         strings, and push them into the global scope.
4697         (typeinfo_in_lib_p): New function.
4698         (synthesize_tinfo_var): Use it.
4699         (create_real_tinfo_var): Likewise.
4700
4701 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
4702
4703         * decl.c (push_class_binding): Use context_for_name_lookup instead
4704         of CP_DECL_CONTEXT.
4705         * search.c (context_for_name_lookup): Remove static.  Check for NULL
4706         context in the loop.
4707         * cp-tree.h (context_for_name_lookup): Add prototype.
4708
4709 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
4710
4711         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4712         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4713         Remove.
4714         * call.c (convert_class_to_reference, build_user_type_conversion_1,
4715         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4716
4717 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
4718
4719         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4720         of macros used when compiling g++spec.c.
4721         * g++spec.c (lang_specific_driver): Link with the shared
4722         libgcc by default.
4723
4724 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4725
4726         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4727         make_reference_declarator, make_call_declarator), method.c
4728         (implicitly_declare_fn), parse.y (namespace_using_decl,
4729         notype_unqualified_id, expr_or_declarator, new_type_id,
4730         after_type_declarator, direct_after_type_declarator,
4731         notype_declarator, complex_notype_declarator,
4732         complex_direct_notype_declarator, qualified_id,
4733         notype_qualified_id, overqualified_id, direct_new_declarator,
4734         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4735         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4736         instead of build_parse_node.
4737
4738 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4739
4740         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4741         (minus_one_node): Moved to top level gcc directory.  Renamed
4742         to integer_minus_one_node.
4743
4744         * init.c (init_init_processing): Don't set minus_one_node.
4745         (build_vec_init): Use integer_minus_one_node.
4746
4747         * rtti.c (get_tinfo_decl_dynamic): Likewise.
4748
4749 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
4750
4751         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4752         identical and they would be replaced with constant, remove
4753         MODIFY_EXPR from the tree.
4754
4755 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4756
4757         * Make-lang.in: Remove all dependencies on defaults.h.
4758         * call.c: Don't include defaults.h.
4759         * decl.c: Likewise.
4760         * decl2.c: Likewise.
4761         * except.c: Likewise.
4762         * pt.c: Likewise.
4763         * rtti.c: Likewise.
4764         * tree.c: Likewise.
4765         * typeck.c: Likewise.
4766
4767 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
4768
4769         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4770         operators even in "C" linkage.
4771         * method.c (set_mangled_name_for_decl): Likewise.
4772         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4773         overloaded operators in "C" linkage.
4774
4775 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4776
4777         * pt.c (tsubst_decl): Remove IN_DECL parameter.
4778         (tsubst_arg_types): Check parameter is not void.
4779         (tsubst): Adjust tsubst_decl call.
4780
4781 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
4782
4783         * call.c (add_builtin_candidate): Quote std properly, from
4784         previous change.
4785
4786 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4787
4788         * pt.c (check_explicit_specialization): Clone constructors and
4789         destructors.
4790
4791 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4792
4793         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4794         indicates anything special about template depth. Make sure we
4795         only count the user visible template classes.
4796
4797 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
4798
4799         * call.c (build_conv): Typo in comment.
4800         (add_builtin_candidate): Add more explanation.
4801         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4802         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4803         when we have enumeral types.
4804         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4805         candidates for relops and eqops.
4806         (joust): Simplify control flow. Allow a non-template user
4807         function to hide a builtin.
4808
4809 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
4810
4811         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4812         (more_specialized): Add deduction parameter.
4813         * call.c (joust): Adjust more_specialized call.
4814         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4815         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4816         (get_bindings_order): Remove.
4817         (get_bindings_real): Add DEDUCE parameter.
4818         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4819         REFERENCE_TYPE jig for DEDUCE_ORDER.
4820         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4821         maybe_adjust_types_for_deduction.
4822         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4823         directly.
4824         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4825         (check_cv_quals_for_unify): Use new unify qualifier flags.
4826         (unify): Clear new unify qualifier flags.
4827         (get_bindings_real): Add DEDUCE parameter.
4828         (get_bindings): Adjust call to get_bindings_real.
4829         (get_bindings_overload): Likewise.
4830         (most_specialized_instantiation): Adjust call to
4831         more_specialized.
4832
4833 2001-01-19  Jason Merrill  <jason@redhat.com>
4834
4835         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4836
4837         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4838         -fnew-abi.
4839
4840 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
4841
4842         * decl2.c (arg_assoc_class): Fix double iteration logic.
4843
4844 2001-01-19  Jason Merrill  <jason@redhat.com>
4845
4846         * init.c (build_delete): Always call convert_force to strip cv-quals.
4847
4848         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4849         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4850         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4851
4852 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4853
4854         * search.c (get_vbase_1): Count only virtual bases.
4855
4856 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4857
4858         * class.c (duplicate_tag_error): Robustify flag clearing.
4859
4860 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4861
4862         * cp-tree.h (lookup_template_class): Add complain parm.
4863         * decl.c (lookup_namespace_name): Adjust call to
4864         lookup_template_class.
4865         (make_typename_type): Likewise.
4866         * semantics.c (finish_template_type): Likewise.
4867         * pt.c (lookup_template_class): Add complain parm. Adjust.
4868         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4869         (tsubst): Likewise.
4870
4871 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
4872
4873         * pt.c (copy_default_args_to_explicit_spec): Preserve
4874         object's CV quals. Reorganize.
4875
4876 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4877
4878         * typeck.c (build_modify_expr): Say `initialization' for
4879         INIT_EXPRs.
4880         * init.c (build_default_init): Convert to enumeral type, if
4881         needed.
4882
4883 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
4884
4885         * parse.y (nomods_initdcl0): Properly set things up for
4886         initdcl0_innards.
4887
4888 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4889
4890         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4891         (type_unification_real): Set it.
4892         (unify): Use it.
4893
4894 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4895
4896         * decl.c (finish_destructor_body): Convert to vbase pointer here.
4897
4898 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4899
4900         * semantics.c (begin_class_definition): Check we're not inside a
4901         template parm list.
4902
4903 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
4904
4905         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4906         BASELINK_P.
4907
4908 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4909
4910         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4911         * call.c (build_over_call): Add comment.
4912
4913 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4914
4915         * cvt.c (ocp_convert): Handle vector type conversion
4916         * typeck2.c (digest_init): Handle vector type initializations
4917
4918 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
4919
4920         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
4921           was given.
4922
4923 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
4924
4925         * pt.c (check_nontype_parm): Rename to ...
4926         (invalid_nontype_parm_type_p): ... here.
4927         (process_template_parm): Adjust.
4928         (convert_template_argument): Adjust.
4929
4930 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
4931
4932         * pt.c (check_nontype_parm): New function.
4933         (process_template_parm): Use it.
4934         (convert_template_argument): Use it.
4935         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
4936         member.
4937
4938 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
4939
4940         * tree.c: Add defaults.h
4941         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
4942         * Make-lang.in (cp/tree.o): Add defaults.h.
4943
4944 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4945
4946         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
4947
4948 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4949
4950         * g++.1: Change to be ".so man1/gcc.1".
4951
4952 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
4953
4954         * Make-lang.in (c++.info, c++.install-info): Build and install g++
4955         internals info.
4956         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
4957         ($(srcdir)/cp/g++int.info): New target.
4958         * gxxint.texi: Add info directory entry.  Use @@ in email address.
4959         * .cvsignore: Update.
4960
4961 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
4962
4963         * typeck.c (build_c_cast): Do template processing earlier.
4964         Always pedwarn on array casts.
4965
4966 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
4967
4968         * friend.c (make_friend_class): Make sure a templated class is
4969         actually a template.
4970
4971 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4972
4973         * decl2.c (get_guard): Set linkage from guarded decl.
4974
4975 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4976
4977         * call.c (convert_default_arg): Check for unprocessed
4978         DEFAULT_ARG.
4979         * cp-tree.h (replace_defarg): Move to spew.c.
4980         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
4981         spew.c, which is where they really are.
4982         (done_pending_defargs): Declare.
4983         (unprocessed_defarg_fn): Declare.
4984         * decl.c (replace_defarg): Move to spew.c
4985         * parse.y (structsp): Call done_pending_defargs.
4986         * spew.c (defarg_fns): Rearrange list structure.
4987         (defarg_fnsdone): New static variable.
4988         (defarg_depfns): New static variable.
4989         (init_spew): Adjust.
4990         (add_defarg_fn): Store the type in TREE_TYPE.
4991         (do_pending_defargs): Detect and deal with ordering constraints
4992         and circularity.
4993         (done_pending_defargs): New function.
4994         (unprocessed_defarg_fn): New function.
4995         (replace_defarg): Moved from decl.c. Robustify. Don't save
4996         if circularity detected.
4997
4998 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
4999
5000         * pt.c (unify): Check array has a domain, before checking
5001         whether it is variable sized.
5002
5003 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5004
5005         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
5006         parameters with pointers to arrays of unknown bound.
5007
5008 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
5009
5010         * parse.y (template_parm_header, template_spec_header): New
5011         reductions. Split out from ...
5012         (template_header): ... here. Use them.
5013         (template_template_parm): Use template_parm_header.
5014         * semantics.c (finish_template_template_parm): Add assert.
5015
5016 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5017
5018         * mangle.c (write_builtin_type): Fix thinko.
5019
5020         * pt.c (copy_default_args_to_explicit_spec_1): New function.
5021         (copy_default_args_to_explicit_spec): Likewise.
5022         (check_explicit_specialization): Use it.
5023
5024         * class.c (finish_struct_1):  Remove last argument in call to
5025         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
5026         * decl.c (builtin_function): Likewise.
5027         (build_cp_library_fn): Likewise.
5028         (check_initializer): Likewise.
5029         (make_rtl_for_nonlocal_decl): Likewise.
5030         (cp_finish_decl): Likewise.
5031         (start_function): Likewise.
5032         * decl2.c (finish_anon_union): Likewise.
5033         * friend.c (do_friend): Likewise.
5034         * init.c (build_java_class_ref): Likewise.
5035         * method.c (make_thunk): Likewise.
5036         * pt.c (tsubst_friend_function): Likewise.
5037         * semantics.c (expand_body): Likewise.
5038
5039 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
5040
5041         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
5042         looking at DECL_CLONED_FUNCTION for non-functions.
5043
5044 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5045
5046         * error.c (dump_template_parameter): Use parm to determine how
5047         to print default value.
5048
5049 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5050
5051         * class.c (duplicate_tag_error): Clear more flags.
5052
5053 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
5054
5055         * call.c (build_new_method_call): Use binfo_for_vbase.
5056
5057 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
5058
5059         * cp-tree.h (flag_cond_mismatch): Don't declare.
5060         * decl2.c (flag_cond_mismatch): Don't define.
5061         (lang_f_options): Remove cond-mismatch.
5062         (unsupported_options): Add cond-mismatch.
5063
5064 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
5065
5066         * class.c (handle_using_decl): Reject using of constructor name
5067         of sourcing class. Allow injecting of a method with same name as
5068         nested class. Fixup error messages.
5069
5070 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
5071
5072         * decl2.c (lang_decode_option): Handle -Wformat=2.
5073
5074 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5075
5076         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
5077         initialized_in_class.
5078         (DECL_DEFINED_IN_CLASS_P): Rename to ...
5079         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
5080         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
5081         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
5082         * pt.c (check_default_tmpl_args): Adjust for
5083         DECL_INITIALIZED_IN_CLASS_P.
5084         (instantiate_class_template): Likewise.
5085         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
5086
5087         * class.c (finish_struct): Constify saved_filename.
5088
5089 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5090
5091         * class.c (duplicate_tag_error): Adjust diagnostic.
5092         (finish_struct): Locally set location to start of struct.
5093         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
5094
5095 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
5096
5097         * decl.c (struct binding_level): Adjust class_shadowed comments
5098         to reflect reality.
5099         (push_class_level_binding): Adjust comments to reflect reality.
5100         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
5101         Don't set TREE_VALUE on the class_shadowed list.
5102
5103 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
5104
5105         * decl2.c (acceptable_java_type): Allow references too.
5106         * init.c (build_java_class_ref): When using the new ABI, search
5107         `class$' and have it mangled with `mangle_decl.'
5108         * mangle.c (write_java_integer_type_codes): New function.
5109         (write_builtin_type): Detect and mangle Java integer and real
5110         types.
5111
5112 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
5113
5114         * decl2.c (grokfield): Don't accept `asm' specifiers for
5115         non-static data members.
5116
5117 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5118
5119         * expr.c (cplus_expand_expr): Don't reset `target'.
5120
5121 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
5122
5123         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
5124
5125 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5126
5127         * parse.y (template_datadef): Check for error_mark_node.
5128
5129 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
5130
5131         * cp-tree.def (DEFAULT_ARG): Make `x' class.
5132
5133 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
5134
5135         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
5136         (record_builtin_type): Make non-static.
5137         (flag_short_double): Don't declare.
5138         (init_decl_processing): Remove the creation of many tree nodes now
5139         in c_common_nodes_and_builtins.
5140         (build_void_list_node): New function.
5141         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
5142         * cp-tree.h (flag_short_wchar): Don't declare.
5143
5144 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
5145
5146         * call.c (build_conv): Don't use build1 for USER_CONV.
5147         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
5148
5149 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5150
5151         * lex.c (lang_init): Call c_common_lang_init.
5152
5153 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5154
5155         * search.c (lookup_fnfields_here): Remove.
5156         (look_for_overrides_r): Use lookup_fnfields_1.
5157         Ignore functions from using declarations.
5158
5159 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
5160
5161         Implement exceptions specifiers for implicit member functions.
5162         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5163         * method.c (synthesize_exception_spec): New function.
5164         (locate_dtor, locate_ctor, locate_copy): New functions.
5165         (implicitly_declare_fn): Generate the exception spec too.
5166         * search.c (check_final_overrider): Check artificial functions
5167         too.
5168         * typeck2.c (merge_exception_specifiers): New function.
5169
5170 2001-01-03  Jason Merrill  <jason@redhat.com>
5171
5172         * init.c (build_default_init): New fn.
5173         (perform_member_init): Split out from here.
5174         (build_new_1): Use it.  Simplify initialization logic.
5175         (build_vec_init): Take an array, rather than a pointer and maxindex.
5176         Speed up simple initializations.  Don't clean up if we're assigning.
5177         * cp-tree.h: Adjust.
5178         * decl2.c (do_static_initialization): Remove TREE_VEC case.
5179         * parse.y (new_initializer): Return void_zero_node for ().
5180         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
5181         * typeck2.c (digest_init): Only complain about user-written
5182         CONSTRUCTORs.
5183
5184 2000-12-22  Mike Stump  <mrs@wrs.com>
5185
5186         * decl2.c: (max_tinst_depth): Increase to 50.
5187
5188 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
5189
5190         * class.c (invalidate_class_lookup_cache): Zero the
5191         previous_class_values.
5192         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
5193         TREE_INT_CST_HIGH.
5194         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
5195         * decl.c (free_bindings): New variable.
5196         (push_binding): Don't create a new binding if we have one on the
5197         free list.
5198         (pop_binding): Put old bindings on the free list.
5199         (init_decl_processing): Use size_int, not build_int_2.
5200         Register free_bindings as a GC root.
5201         (cp_make_fname_decl): Use size_int, not build_int_2.
5202         (push_inline_template_parms_recursive): Likewise.
5203         (end_template_parm_list): Likewise.
5204         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
5205         (tsubst_template_parms): Use size_int, not build_int_2.
5206         (tsubst): Likewise.
5207         * rtti.c (get_vmi_pseudo_type_info): Likewise.
5208
5209 2001-01-02  Richard Henderson  <rth@redhat.com>
5210
5211         * parse.y (asm): Set ASM_INPUT_P.
5212
5213 2001-01-02  Jason Merrill  <jason@redhat.com>
5214
5215         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
5216         for v3 ABI.
5217
5218         * typeck.c (cp_truthvalue_conversion): New fn.
5219         * cvt.c (ocp_convert): Use it.
5220
5221         * cp-tree.h: Lose c-common.c decls.
5222
5223         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
5224         * cvt.c (convert_to_void): Use type_unknown_p.
5225
5226         * typeck.c (strip_all_pointer_quals): Also strip quals from
5227         pointer-to-member types.
5228
5229         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
5230         parse.y as C.
5231
5232         * call.c (build_new_method_call): Do evaluate the object parameter
5233         when accessing a static member.
5234         * typeck.c (build_component_ref): Likewise.
5235
5236 2001-01-02  Andreas Jaeger  <aj@suse.de>
5237
5238         * decl.c (cp_missing_noreturn_ok_p): New.
5239         (init_decl_processing): Set lang_missing_noreturn_ok_p.
5240
5241 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
5242
5243         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
5244
5245 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
5246
5247         * class.c (pushclass): Remove #if 0'd code.
5248         * cp-tree.h (overload_template_name): Remove.
5249         * decl.c (store_bindings): Simplify.
5250         (pop_from_top_level): Likewise.
5251         * pt.c (overload_template_name): Remove.
5252         (instantiate_decl): Don't call push_to_top_level if it's not
5253         needed.
5254
5255 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
5256
5257         * pt.c (register_local_specialization): Don't return a value.
5258         (lookup_template_class): Use move-to-front heuristic when looking
5259         up template instantiations.
5260         (instantiate_decl): Only push_to_top_level when we're actually
5261         going to instantiate the template.
5262
5263 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
5264
5265         * search.c (binfo_for_vtable): Return least derived class, not
5266         most.  Handle secondary vtables.
5267
5268 2000-12-22  Jason Merrill  <jason@redhat.com>
5269
5270         * pt.c (more_specialized): Don't optimize len==0.
5271         (fn_type_unification): If we're adding the return type, increase len.
5272
5273         * typeck.c (build_binary_op): Fix pmf comparison logic.
5274
5275         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
5276         DECL_STATIC_FUNCTION_P.
5277
5278         * semantics.c (genrtl_finish_function): Don't try to jump to
5279         return_label unless it exists.
5280
5281         In partial ordering for a call, ignore parms for which we don't have
5282         a real argument.
5283         * call.c (joust): Pass len to more_specialized.
5284         (add_template_candidate_real): Strip 'this', pass len.
5285         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
5286         (get_bindings_order): New fn.  Pass len down.
5287         (get_bindings_real): Strip 'this', pass len.
5288         (fn_type_unification): Likewise.
5289         (type_unification_real): Succeed after checking 'len' args.
5290         (most_specialized_instantiation): Lose explicit_args parm.
5291         * class.c (resolve_address_of_overloaded_function): Strip 'this',
5292         pass len.
5293
5294 2000-12-21  Jason Merrill  <jason@redhat.com>
5295
5296         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
5297         DECL_TEMPLATE_RESULT.
5298
5299         * search.c (lookup_field_r): Call lookup_fnfields_1, not
5300         lookup_fnfields_here.
5301
5302         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
5303
5304         * call.c (build_object_call): Also allow conversions that return
5305         reference to pointer to function.
5306         (add_conv_candidate): Handle totype being ref to ptr to fn.
5307         (build_field_call): Also allow members of type reference to function.
5308         Lose support for calling pointer to METHOD_TYPE fields.
5309
5310         * error.c (dump_expr): Handle *_CAST_EXPR.
5311
5312         * typeck2.c (build_scoped_ref): Always convert to the naming class.
5313
5314         * tree.c (break_out_cleanups): Lose.
5315         * cp-tree.h: Remove prototype.
5316         * typeck.c (build_component_ref): Don't break_out_cleanups.
5317         (build_compound_expr): Likewise.
5318         * semantics.c (finish_expr_stmt): Likewise.
5319
5320 2000-12-20  Richard Henderson  <rth@redhat.com>
5321
5322         * cp-tree.h: Update declarations.
5323         * decl.c (finish_case_label): Return the new stmt node.
5324         * semantics.c (finish_goto_stmt): Likewise.
5325         (finish_expr_stmt, finish_return_stmt): Likewise.
5326         (finish_break_stmt, finish_continue_stmt): Likewise.
5327         (finish_asm_stmt): Likewise.
5328         * parse.y (already_scoped_stmt): Set STMT_LINENO.
5329         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5330         (simple_if, simple_stmt): Return the new stmt node.
5331         (save_lineno): New.
5332
5333 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
5334
5335         * cp-tree.h: Don't declare warn_long_long.
5336
5337 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5338
5339         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5340         IS_AGGR_TYPE.
5341
5342 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5343
5344         * pt.c (unify): Handle when both ARG and PARM are
5345         BOUND_TEMPLATE_TEMPLATE_PARM.
5346
5347 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5348
5349         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5350         DECL_TEMPLATE_PARM_P.
5351
5352 2000-12-15  Jason Merrill  <jason@redhat.com>
5353
5354         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
5355
5356         * init.c (build_new_1): Don't strip quals from type.
5357
5358         * decl.c (pushdecl): Don't check for linkage on a non-decl.
5359
5360         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
5361
5362         * call.c (build_new_function_call): Lose space before paren in
5363         error message.
5364         (build_new_method_call): Likewise.
5365
5366         * typeck2.c (build_m_component_ref): Propagate quals from datum.
5367
5368 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5369
5370         * pt.c (check_explicit_specialization): Propagate default
5371         function arguments to explicit specializations.
5372
5373 2000-12-13  DJ Delorie  <dj@redhat.com>
5374
5375         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5376         and <? operators.
5377
5378 2000-12-08  Jason Merrill  <jason@redhat.com>
5379
5380         * error.c (dump_function_name): Don't let the user see __comp_ctor.
5381
5382         Clean up copy-initialization in overloading code.
5383         * call.c (build_user_type_conversion_1): Die if we are asked to
5384         convert to the same or a base type.
5385         (implicit_conversion): Avoid doing so.  Lose reference binding code.
5386         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5387         direct-initialization.  Also do direct-init part of copy-init.
5388         (build_user_type_conversion): Don't provide context to convert_like.
5389         * cvt.c (ocp_convert): build_user_type_conversion will now provide
5390         the constructor call for copy-init.
5391
5392         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5393         instantiation of a member template.
5394         (do_decl_instantiation): Not here.
5395
5396 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5397
5398         * class.c (check_field_decls): Don't special case anonymous
5399         fields in error messages.
5400         (note_name_declared_in_class): Use %D on diagnostic.
5401
5402         * tree.c (pod_type_p): Use strip_array_types.
5403         (cp_valid_lang_attribute): Likewise.
5404         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5405         multiple evaluations.
5406         (cp_has_mutable_p): Use strip_array_types.
5407
5408 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
5409
5410         * cp-tree.h (sufficient_parms_p): Declare new function.
5411         * call.c (sufficient_parms_p): New function, broken out of ...
5412         (add_function_candidate): ... here. Use it.
5413         (add_conv_candidate): Use it.
5414         * decl.c (grok_ctor_properties): Use it.
5415
5416 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
5417
5418         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5419
5420 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5421
5422         * decl2.c (lang_decode_option): Handle -Wformat-security.
5423
5424 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5425
5426         * pt.c (verify_class_unification): New function.
5427         (get_class_bindings): Use it.
5428         (try_class_unification): Tidy.
5429         (unify): Handle when argument of a template-id is not
5430         template parameter dependent.
5431         (template_args_equal): Handle when TREE_CODE's do not match.
5432
5433 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
5434
5435         * lang-specs.h (c++): When invoking the stand-alone preprocessor
5436         for -save-temps, pass all relevant -Defines to it, and then don't
5437         pass them to cc1plus.
5438
5439 2000-12-05  Will Cohen  <wcohen@redhat.com>
5440
5441         * decl.c (finish_case_label): Cleared
5442         more_cleanups_ok in surrounding function scopes.
5443         (define_label): Likewise.
5444
5445 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5446
5447         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5448         (get_matching_virtual): Remove.
5449         (look_for_overrides): Declare new function.
5450         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5451         DECL_VINDEX here.
5452         * class.c (check_for_override): Move base class iteration code
5453         to look_for_overrides.
5454         * search.c (next_baselink): Remove.
5455         (get_virtuals_named_this): Remove.
5456         (get_virtual_destructor): Remove.
5457         (tree_has_any_destructors_p): Remove.
5458         (struct gvnt_info): Remove.
5459         (check_final_overrider): Remove `virtual' from error messages.
5460         (get_matching_virtuals): Remove. Move functionality to ...
5461         (look_for_overrides): ... here, and ...
5462         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5463         to be overriding.
5464
5465 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
5466
5467         * typeck.c (get_delta_difference): If via a virtual base,
5468         return zero.
5469         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5470         adjustment.
5471
5472 2000-12-04  Richard Henderson  <rth@redhat.com>
5473
5474         * error.c (dump_tree): Use output_add_string not OB_PUTS.
5475
5476 2000-12-04  Jason Merrill  <jason@redhat.com>
5477
5478         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5479         (write_builtin_type): Pass intSI_type_node and the like through
5480         type_for_mode.
5481         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5482         Pass intSI_type_node and the like through type_for_mode.
5483         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5484         * pt.c (tsubst, unify): Likewise.
5485         * tree.c (walk_tree): Likewise.
5486         * error.c (dump_type): Likewise.
5487         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5488
5489         * Make-lang.in: Tweak top comment for emacs.
5490         (cp/TAGS): Restore.
5491
5492         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5493
5494         * class.c (clone_function_decl): Robustify.
5495
5496 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
5497
5498         * decl.c (store_bindings): Only search in the non modified
5499         old_bindings for duplicates.
5500
5501 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
5502
5503         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5504         TYPE_POLYMORPHIC_P.
5505
5506         * typeck.c (build_static_cast): Remove unused variable.
5507
5508 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5509
5510         * pt.c: Fix typo in comment.
5511
5512 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5513
5514         * decl2.c (warn_format): Remove definition.
5515         (lang_decode_option): Handle -Wformat-nonliteral,
5516         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
5517
5518 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
5519
5520         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5521         (init_decl_processing): Don't create string_type_node,
5522         const_string_type_node, wint_type_node, intmax_type_node,
5523         uintmax_type_node, default_function_type, ptrdiff_type_node and
5524         unsigned_ptrdiff_type_node.  Adjust position of call to
5525         c_common_nodes_and_builtins.
5526         (identifier_global_value): New function.
5527
5528 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
5529
5530         * call.c (standard_conversion): Reject pointer to member
5531         conversions from ambiguous, inaccessible or virtual bases.
5532         * typeck.c (build_static_cast): Don't check pointers to members
5533         specially.
5534
5535 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5536
5537         * method.c (do_build_copy_constructor): Preserve cv
5538         qualifications when accessing source object members.
5539         (do_build_assign_ref): Likewise. Remove separate diagnostics for
5540         unnamed fields.
5541
5542 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5543
5544         * method.c (do_build_assign_ref): Construct appropriately
5545         CV-qualified base reference. Don't allow const casts in base
5546         conversion.
5547
5548 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
5549
5550         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5551         incomplete return type.
5552
5553 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5554
5555         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5556         * semantics.c (finish_base_specifier): Accept a _TYPE not a
5557         _DECL.
5558
5559 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5560
5561         * spew.c (yyerror): Cope if yylval.ttype is NULL.
5562
5563 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5564
5565         * decl.c (grokdeclarator): Diagnose undefined template contexts.
5566
5567 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
5568
5569         * decl.c (grokdeclarator): Do type access control on friend
5570         class.
5571
5572 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5573
5574         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5575         bison parser ickiness.
5576         * pt.c (tsubst_friend_function): Enter namespace scope when
5577         tsubsting the function name.
5578         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5579
5580 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
5581
5582         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5583         * cvt.c (cp_convert_to_pointer): Add force parameter.
5584         Allow conversions via virtual base if forced.
5585         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5586         (ocp_convert): Likewise.
5587         * search.c (binfo_from_vbase): Return the virtual base's binfo.
5588         * typeck.c (get_delta_difference): Adjust handling of virtual
5589         bases.
5590
5591 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
5592
5593         * tree.c (struct list_hash): Remove.
5594         (list_hash_table): Make it be an htab.
5595         (struct list_proxy): New type.
5596         (list_hash_eq): New function.
5597         (list_hash_pieces): Renamed from ...
5598         (list_hash): ... this.
5599         (list_hash_lookup): Remove.
5600         (list_hash_add): Remove.
5601         (hash_tree_cons): Use the generic hashtable.
5602         (mark_list_hash): Remove.
5603         (init_tree): Create the hashtable.
5604
5605 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
5606
5607         * method.c (build_mangled_C9x_name): Rename to
5608         build_mangled_C99_name.  Change C9X references in comments to
5609         refer to C99.
5610
5611 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5612
5613         * parse.y (unary_expr): Move VA_ARG from here ...
5614         (primary): ... to here.
5615
5616 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
5617
5618         * semantics.c (finish_id_expr): If type is error_mark, return
5619         error_mark.
5620
5621 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
5622
5623         * pt.c (lookup_template_class): Simplify loop exit constructs.
5624         Cope when there is no partial instantiation of a template
5625         template member.
5626
5627 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
5628
5629         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5630
5631 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
5632
5633         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5634         prefix.
5635
5636         * pt.c (do_decl_instantiate): Explicitly clone constructors and
5637         destructors that haven't already been cloned.
5638
5639 2000-11-20  Richard Henderson  <rth@redhat.com>
5640
5641         * parse.y (yyparse_1): Rename the parser entry point.
5642
5643 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
5644
5645         * mangle.c (write_name): Use <unscoped-name> for names directly in
5646         function scope.
5647         (write_unscoped_name): Accept names directly in function scope.
5648
5649 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
5650
5651         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5652         * parse.y (extdef): Add EXPORT reduction.
5653         * spew.c (yylex): Don't skip export here.
5654
5655 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
5656
5657         * decl.c (init_decl_processing): Correct name of pure virtual
5658         function under the new ABI.
5659         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5660         (throw_bad_typeid): Likewise for bad typeid function.
5661
5662 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
5663
5664         * decl.c (grokparms): Don't even function types of `void' type,
5665         either.
5666         * mangle.c (write_type): Don't crash when confronted with the
5667         error_mark_node.
5668
5669         * decl.c (grokparms): Don't create parameters of `void' type.
5670
5671 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
5672
5673         * lex.c (mark_impl_file_chain): Delete.
5674         (init_parse): Remove call to ggc_add_string_root.  No need to
5675         ggc_strdup a string constant.  Do not add impl_file_chain to GC
5676         roots.
5677         (handle_pragma_implementation): No need to ggc_strdup main_filename.
5678
5679 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5680
5681         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5682
5683 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5684
5685         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5686         * decl.c (grokdeclarator): Don't reject void parms here.
5687         (require_complete_types_for_parms): Simplify, use
5688         complete_type_or_else.
5689         (grokparms): Remove bitrot. Remove funcdef parm.
5690         Deal with ellipsis parm lists here.
5691         * semantics.c (finish_parmlist): Don't append void_list_node
5692         here. Set PARMLIST_ELLIPSIS_P.
5693
5694 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
5695
5696         * typeck2.c (incomplete_type_error): Reorganise to avoid
5697         excessive diagnostics.
5698
5699 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
5700
5701         * lex.c (struct impl_files, internal_filename): Constify a char *.
5702
5703 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
5704
5705         * mangle.c (write_special_name_constructor): Don't generate
5706         assembler junk when confronted with an old-style constructor.
5707         (write_special_name_destructor): Likewise.
5708         (mangle_decl_string): Do it here instead.
5709
5710 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
5711
5712         * call.c (op_error): Make error messages clearer.
5713
5714 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
5715
5716         * decl.c (wrapup_globals_for_namespace): Don't mark things
5717         TREE_ASM_WRITTEN when they're not.
5718
5719 2000-11-15  Jason Merrill  <jason@redhat.com>
5720
5721         * typeck2.c (friendly_abort): Uncount the error before handing
5722         off to fancy_abort.
5723
5724 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
5725
5726         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5727
5728 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
5729
5730         * class.c (build_vtbl_initializer): Fix typo in comment.
5731         * typeck.c (expr_sizeof): Don't crash on errors.
5732
5733 2000-11-14  Jim Wilson  <wilson@redhat.com>
5734
5735         * lang-specs.h: Add %2 after %(cc1_options).
5736
5737 2000-11-14  Richard Henderson  <rth@redhat.com>
5738
5739         * typeck.c (c_sizeof): Be strict about casting result value
5740         back to c_size_type_node.
5741         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5742
5743 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
5744
5745         * typeck.c (build_unary_op): Use boolean_increment from
5746         c-common.c, moving the relevant code there.
5747
5748 2000-11-11  Jason Merrill  <jason@redhat.com>
5749
5750         * typeck.c (mark_addressable): Don't call put_var_into_stack.
5751
5752         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5753         in inlines.
5754
5755 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5756
5757         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5758         * lex.c (copy_lang_decl): Likewise.
5759
5760 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
5761
5762         * dump.c (cp_dump_tree): Don't dump function bodies here.
5763
5764         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5765         (dump.o): Update dependency list.
5766         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5767         (flag_dump_translation_unit): Likewise.
5768         (CP_TYPE_QUALS): Adjust definition.
5769         (DECL_C_BIT_FIELD): Remove.
5770         (SET_DECL_C_BIT_FIELD): Likewise.
5771         (CLEAR_DECL_C_BIT_FIELD): Likewise.
5772         (add_maybe_template): Likewise.
5773         (strip_array_types): Likewise.
5774         (dump_node_to_file): Likewise.
5775         (cp_dump_tree): New function.
5776         * decl.c (init_decl_processing): Set lang_dump_tree.
5777         * decl2.c (flag_dump_translation_unit): Remove.
5778         * dump.c: Move most of it to ../c-dump.c.
5779         (cp_dump_tree): New function.
5780         * pt.c (add_maybe_template): Remove.
5781         * typeck.c (strip_array_types): Likewise.
5782
5783 2000-11-07  Eric Christopher  <echristo@redhat.com>
5784
5785         * decl.c (init_decl_processing): Change definition of
5786         __wchar_t to wchar_t.  Remove artificial declaration of
5787         wchar_t.
5788         * lex.c: Change instances of __wchar_t to wchar_t.
5789
5790 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
5791
5792         * lex.c (do_identifier): Don't lookup_name for operators.
5793         * parse.y (operator): Save looking_for_typename.
5794         (unoperator): Restore it.
5795         * spew.c (frob_opname): Use nth_token for lookahead.
5796
5797 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
5798
5799         * decl.c (grok_op_properties): Always use coerce_new_type and
5800         coerce_delete_type.
5801         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5802         exception specification. Tidy up.
5803         (coerce_delete_type): Preserve exception specification. Tidy up.
5804
5805 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
5806
5807         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5808         (push_binding_level), error.c (cp_tree_printer), pt.c
5809         (process_partial_specialization, tsubst_template_arg_vector),
5810         search.c (lookup_member): Use memset () instead of bzero ().
5811
5812 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
5813
5814         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5815
5816 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
5817
5818         * Make-lang.in (c++.distdir): Remove.
5819
5820 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
5821
5822         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5823         declarations from different namespaces to be combined.
5824
5825 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
5826
5827         * decl.c: Include tm_p.h.
5828
5829 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
5830
5831         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5832
5833 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
5834
5835         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5836         (build_overload_value), repo.c (open_repo_file), xref.c
5837         (open_xref_file): Use strchr () and strrchr () instead of index ()
5838         and rindex ().
5839
5840 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
5841
5842         * call.c (build_over_call): Call fold on the CALL_EXPR.
5843
5844 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
5845
5846         * error.c (dump_template_decl): Separate template hearders with
5847         space not comma.
5848
5849 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
5850
5851         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
5852         TS_* flags with corresponding TFF_*.  Adjust prototypes of
5853         functions (which used to take a tree_string_flags) to take an int.
5854
5855         * cp-tree.h (enum tree_string_flags): Remove
5856         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5857         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5858         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5859         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5860         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5861         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5862         (type_as_string, decl_as_string, expr_as_string,
5863         context_as_string): Adjust prototype.
5864
5865         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5866         instead of TS_PLAIN.
5867
5868         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5869         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5870         plain `0'.
5871
5872 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
5873
5874         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5875         (linkage_kind): New enumeration.
5876         (decl_linkage): New function.
5877         * decl2.c (comdat_linkage): Extend comment.
5878         * error.c (dump_function_decl): Print the arguments used to
5879         instantiate a template, even when not printing the type of the
5880         function.
5881         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5882         not TREE_PUBLIC, to test for external linkage.
5883         * tree.c (decl_linkage): New function.
5884
5885 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
5886
5887         * pt.c (instantiate_decl): Always instantiate static data members
5888         initialized in-class.
5889
5890 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
5891
5892         * Make-lang.in: Move all build rules here from Makefile.in,
5893         adapt to new context.  Wrap all rules that change the current
5894         directory in parentheses.  Expunge all references to $(P).
5895         When one command depends on another and they're run all at
5896         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
5897         all object-file generation rules.  Delete obsolete variables.
5898
5899         * Makefile.in: Delete.
5900         * config-lang.in: Delete outputs= line.
5901
5902 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
5903
5904         * error.c (dump_function_decl): Print no space between
5905         `ptr-operator' the `type-specifier' of the return type.
5906         (dump_type_prefix): Make sure we put space at the appropriate
5907         place.
5908
5909 2000-10-23  Jason Merrill  <jason@redhat.com>
5910
5911         * call.c (equal_functions): Also call decls_match for extern "C" fns.
5912
5913 2000-10-22  Jason Merrill  <jason@redhat.com>
5914
5915         * call.c (build_conditional_expr): Use ocp_convert to force
5916         rvalue conversion.
5917
5918 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
5919
5920         * call.c (standard_conversion): Use RVALUE_CONVs for all
5921         expressions that satisfy lvalue_p, not just those that satisfy
5922         real_lvalue_p.
5923
5924         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5925
5926         * typeck.c (c_sizeof): Return an expression of `size_t' type,
5927         not one with TYPE_IS_SIZETYPE set.
5928         (dubious_conversion_warnings): Remove special-case code.
5929
5930 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
5931
5932         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
5933         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
5934         (dump_type_prefix): Print vector-of-int as 'int vector'.
5935         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
5936         * tree.c (walk_tree): Handle VECTOR_TYPE.
5937
5938         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5939
5940 2000-10-21  Jason Merrill  <jason@redhat.com>
5941
5942         * parse.y (operator): Set got_object from got_scope.
5943         Set looking_for_typename.
5944         * decl.c (lookup_name_real): Clear val after setting from_obj.
5945         Reorganize diagnostic.
5946
5947 2000-10-20  Jason Merrill  <jason@redhat.com>
5948
5949         * tree.c (walk_tree): Don't walk into default args.
5950
5951         * error.c (dump_expr): Use host_integerp.
5952
5953 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
5954
5955         * typeck2.c (abstract_virtuals_error): Use "because" instead of
5956         "since" in error message.
5957
5958 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5959
5960         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
5961
5962 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
5963
5964         * decl.c (revert_static_member_fn): Fixed typo.
5965
5966 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
5967
5968         * class.c (subobject_offset_fn): New type.
5969         (dfs_record_base_offsets): Remove.
5970         (record_base_offsets): Likewise.
5971         (dfs_search_base_offsets): Likewise.
5972         (record_subobject_offset): New function.
5973         (check_subobject_offset): Likewise.
5974         (walk_subobject_offsets): Likewise.
5975         (record_subobject_offsets): Likewise.
5976         (layout_conflict_p): Reimplement.
5977         (layout_nonempty_base_or_field): Correct handling of type
5978         conflicts during layout.
5979         (layout_empty_base): Likewise.
5980         (build_base_field): Adjust to handle new representation of empty
5981         base offset table.
5982         (build_base_fields): Likewise.
5983         (layout_virtual_bases): Likewise.
5984         (splay_tree_compare_integer_csts): New function.
5985         (layout_class_type): Use a splay_tree, rather than a varray, to
5986         represent the offsets of empty bases.
5987
5988         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
5989         * decl.c (select_decl): Don't return declarations that are
5990         DECL_ANTICIPATED.
5991
5992 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
5993
5994         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
5995         (fake_std_node): New macro.
5996         * decl.c (in_std): Rename to ...
5997         (in_fake_std): ... this.
5998         (flag_no_builtin): Remove.
5999         (flag_no_nonansi_builtin): Likewise.
6000         (walk_namespaces_r): Use fake_std_node.
6001         (push_namespace): Use std_identifier.
6002         (pop_namespace): Use in_fake_std.
6003         (lookup_name_real): Use fake_std_node.
6004         (init_decl_processing): When -fhonor-std, create the `std'
6005         namespace.  Don't create a dummy fake_std_node in that case.
6006         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
6007         (builtin_function): Put builtins whose names don't begin
6008         with `_' in the std namespace.
6009         * decl2.c (flag_no_builtin): Remove.
6010         (flag_no_nonansi_builtin): Likewise.
6011         (set_decl_namespace): Use fake_std_node.
6012         (validate_nonmember_using_decl): Likewise.
6013         (do_using_directive): Likewise.
6014         (handle_class_head): Likewise.
6015         * dump.c (dequeue_and_dump): Likewise.
6016         * except.c (init_exception_processing): Use std_identifier.
6017         * init.c (build_member_call): Use fake_std_node.
6018         * rtti.c (init_rtti_processing): Use std_identifier.
6019
6020 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
6021
6022         * cp-tree.h (back_end_hook): Remove declaration.
6023         * decl2.c (back_end_hook): Remove definition.
6024
6025         * dump.c (dequeue_and_dump): Dump TREE_USED.
6026
6027 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
6028
6029         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
6030
6031 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6032
6033         * decl.c (WINT_TYPE): Define.
6034         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
6035         c_size_type_node, signed_size_type_node and wint_type_node.
6036
6037 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
6038
6039         * decl2.c (warn_missing_format_attribute): New variable.
6040         (lang_decode_option): Decode -Wmissing-format-attribute.
6041
6042 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
6043
6044         * typeck.c (qualify_type): Remove.
6045         (composite_pointer_type): Fix handling of conversions to `cv void*'.
6046
6047 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6048
6049         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
6050
6051 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6052
6053         * Makefile.in (parse.c, parse.h): Create atomically.
6054
6055 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
6056
6057         * class.c (current_obstack): Remove.
6058         * decl.c (ggc_p): Remove.
6059         (start_decl): Don't use decl_tree_cons.
6060         (grokdeclarator): Don't use build_decl_list.
6061         (start_function): Don't use decl_tree_cons.
6062         (finish_function): Don't mess with obstacks.
6063         * decl2.c (grok_x_components): Don't use build_decl_list.
6064         * lex.c (make_call_declarator): Don't call decl_tree_cons.
6065         (implicitly_declare_fn): Don't call build_decl_list.
6066         * parse.y (frob_specs): Don't call build_decl_list or
6067         decl_tree_cons.
6068         (expr_or_declarator_intern): Don't call decl_tree_cons.
6069         (primary): Don't call build_decl_list.
6070         (fcast_or_absdcl): Likewise.
6071         (typed_declspecs): Don't call decl_tree_cons.
6072         (reserved_declspecs): Don't call build_decl_list.
6073         (declmods): Likewise.
6074         (reserved_typespecquals): Likewise.
6075         (aggr): Likewise.
6076         (new_type_id): Likewise.
6077         (cv_qualifiers): Likewise.
6078         (after_type_declarator_intern): Likewise.
6079         (notype_declarator_intern): Likewise.
6080         (absdcl_intern): Likewise.
6081         (named_parm): Likewise.
6082         * pt.c (most_specialized_class): Likewise.
6083         * repo.c (temporary_obstack): Make it a structure, not a pointer.
6084         (init_repo): Initialize it.
6085         * search.c (current_obstack): Remove.
6086         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
6087
6088 2000-10-09  Richard Henderson  <rth@cygnus.com>
6089
6090         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
6091         (c++ language support bits for libgcc): Remove.
6092         (c++.clean): Remove cplib2.txt cleanup.
6093         * config-lang.in (headers, lib2funcs): Remove.
6094
6095         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
6096         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
6097         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
6098         * inc/new.h, inc/typeinfo: Remove files.
6099
6100 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
6101
6102         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
6103         defined.
6104         (init_decl_processing): Initialize intmax_type_node and
6105         uintmax_type_node.
6106
6107 2000-10-06  Richard Henderson  <rth@cygnus.com>
6108
6109         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
6110         (original_result_rtx): Remove.
6111         * decl.c (save_function_data): Don't clear x_result_rtx.
6112         (mark_lang_function): Don't mark it either.
6113         * expr.c (fixup_result_decl): Remove.
6114         * semantics.c (genrtl_named_return_value): Frob the return decl
6115         before calling emit_local_var.
6116         (genrtl_finish_function): Don't call fixup_result_decl.
6117         Always emit the jump to return_label.
6118
6119 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
6120
6121         * pt.c (lookup_template_class): Set current access for enum.
6122         (tsubst_enum): Set file & line for enum decl.
6123
6124         * spew.c (yylex): Remove unused variable.
6125
6126 2000-10-05  Richard Henderson  <rth@cygnus.com>
6127
6128         * semantics.c (genrtl_finish_function): Don't init or check
6129         can_reach_end; remove noreturn and return value checks.
6130
6131 2000-10-05  Tom Tromey  <tromey@cygnus.com>
6132
6133         * init.c (build_java_class_ref): Use `build_static_name' with a
6134         suffix, not a prefix, to build the class object's name.
6135
6136 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6137
6138         * cp-tree.h (access_kind): Fix comment typo.
6139         * decl2.c (grokfield): Fix diagnostic typo.
6140         * semantics.c (finish_template_type): Fix comment typo.
6141         (finish_qualified_object_call_expr): Likewise.
6142
6143 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6144
6145         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
6146         tsubsting fails.
6147
6148 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
6149
6150         * spew.c (frob_id): New static function.
6151         (frob_opname): Use it.
6152         (yylex): Use it.
6153
6154 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
6155
6156         * decl.c (lang_mark_false_label_stack): Remove.
6157         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
6158
6159 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
6160
6161         * gxxint.texi: Use @email for formatting email addresses.
6162
6163 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
6164
6165         * error.c: Remove direct obstack manipulation.  Replace with
6166         output_buffer-based formatting.  Adjust calls to removed macros.
6167         (obstack_chunk_alloc, obstack_chunk_free): Remove.
6168         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
6169         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
6170
6171 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
6172
6173         * ir.texi: Move to ../c-tree.texi.
6174
6175 2000-09-20  Jason Merrill  <jason@redhat.com>
6176
6177         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
6178
6179 2000-09-21  Andreas Jaeger  <aj@suse.de>
6180
6181         * errfn.c: Move declaration of cp_printer and cp_printers to ...
6182         * cp-tree.h: ... here.
6183
6184         * error.c: Remove declaration of cp_printer.
6185
6186 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
6187
6188         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
6189
6190 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
6191
6192         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
6193         users.
6194
6195 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
6196
6197         * decl.c (start_function): Robustify.
6198
6199 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6200
6201         * cp-tree.h (check_function_format): Accept a `status' parameter.
6202
6203         * call.c, typeck.c: Updates calls to `check_function_format'.
6204
6205 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
6206
6207         * decl2.c (handle_class_head): Always push some scope even
6208         in the error case.
6209
6210 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
6211
6212         * cp-tree.h (struct cp_language_function): Remove
6213         x_scope_stmt_stack and name_declared.
6214         (current_scope_stmt_stack): Remove.
6215         (function_name_declared_p): New macro.
6216         (struct lang_decl_flags): Use c_lang_decl as a base class.
6217         (context): Remove.
6218         (struct lang_decl): Replace saved_tree with context.
6219         (DECL_FRIEND_CONTEXT): Adjust accordingly.
6220         (SET_DECL_FRIEND_CONTEXT): Likewise.
6221         (DECL_VIRTUAL_CONTEXT): Likewise.
6222         (DECL_SAVED_TREE): Remove.
6223         (C_DECLARED_LABEL_FLAG): Likewise.
6224         (cplus_expand_expr_stmt): Don't declare.
6225         (add_decl_stmt): Likewise.
6226         (add_scope_stmt): Likewise.
6227         * decl.c (mark_stmt_tree): Remove.
6228         (case_compare): Likewise.
6229         (finish_case_label): Use c_add_case_label.
6230         (init_decl_processing): Set more language-specific hooks.
6231         (build_enumerator): Fix typo in comment.
6232         (cplus_expand_expr_stmt): Remove.
6233         (mark_lang_function): Use mark_c_language_function.
6234         (lang_mark_tree): Use c_mark_lang_decl.
6235         * decl2.c: Change order of inclusion.
6236         * except.c: Likewise.
6237         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
6238         back on c_expand_expr.
6239         * friend.c: Include expr.h.
6240         * init.c: Change order of inclusion.
6241         * Makefile.in: Update dependencies.
6242         * lex.h (free_lang_decl_chain): Remove.
6243         * optimize.c (maybe_clone_body): Use function_name_declared_p.
6244         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
6245         it doesn't exist.
6246         (instantiate_decl): Use function_name_declared_p.
6247         * semantics.c (lang_expand_expr_stmt): Remove.
6248         (set_current_function_name_declared): Likewise.
6249         (current_function_name_declared): Likewise.
6250         (begin_compound_stmt): Use function_name_declared_p.
6251         (add_decl_stmt): Remove.
6252         (setup_vtbl_ptr): Use function_name_declared_p.
6253         (add_scope_stmt): Remove.
6254         (current_scope_stmt_stack): New function.
6255         (cp_expand_stmt): Don't handle SCOPE_STMTs.
6256         (expand_body): Use function_name_declared_p.
6257         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
6258         * typeck.c: Change order of includes.
6259         (convert_sequence): Remove.
6260
6261 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
6262
6263         * lex.c (reswords): Add _Complex.
6264
6265 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6266
6267         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
6268
6269 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
6270
6271         * init.c (begin_init_stmts): Don't use // comments.
6272
6273 2000-09-12  Jason Merrill  <jason@redhat.com>
6274
6275         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
6276         all non-extern arrays.
6277
6278         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
6279         typenames, too.  Downgrade complaint to pedwarn.
6280         (xref_tag): Warn about surprising behavior of 'friend struct T'.
6281         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
6282         'class This::Inherited'.
6283
6284 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
6285
6286         * decl.c (finish_case_label): Given the LABEL_DECL a
6287         DECL_CONTEXT.
6288
6289 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
6290
6291         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
6292         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
6293         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6294         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6295         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
6296         New macros.
6297         (sorry_for_unsupported_tree, print_scope_operator,
6298         print_left_paren, print_right_paren, print_left_bracket,
6299         print_right_bracket, print_whitespace): Likewise.
6300         (aggr_variety): Rename to class_key_or_enum.
6301         (print_type): Rename to print_type_id.
6302         (print_type_specifier_seq, print_simple_type_specifier,
6303         print_elaborated_type_specifier,
6304         print_rest_of_abstract_declarator,
6305         print_parameter_declaration_clause, print_exception_specification,
6306         print_nested_name_specifier, print_template_id,
6307         typedef_original_name,  print_template_argument_list_start,
6308         print_template_argument_list_end): New functions.
6309
6310 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6311
6312         * ir.texi: Add more documentation.
6313
6314 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
6315
6316         * cp-tree.h (struct saved_scope): Remove x_function_parms.
6317         (current_function_parms): Don't define.
6318         (struct cp_language_function): Remove parms_stored.
6319         (current_function_just_assigned_this): Don't define.
6320         (current_function_parms_stored): Likewise.
6321         (static_ctors): Declare.
6322         (static_dtors): Likewise.
6323         (SF_EXPAND): Don't define.
6324         (expand_start_early_try_stmts): Remove declaration.
6325         (store_parm_decls): Likewise.
6326         * decl.c (static_ctors): Don't declare.
6327         (static_dtors): Likewise.
6328         (struct binding_level): Remove this_block.
6329         (poplevel): Remove dead code.
6330         (set_block): Likewise.
6331         (mark_binding_level): Don't mark this_block.
6332         (mark_saved_scope): Don't mark x_function_parms.
6333         (init_decl_processing): Don't add current_function_parms as a GC
6334         root.
6335         (check_function_type): Change prototype.
6336         (start_function): Remove RTL-generation code.
6337         (expand_start_early_try_stmts): Remove.
6338         (store_parm_decls): Give it internal linkage.  Remove
6339         RTL-generation code.
6340         (finish_function): Remove RTL-generation code.
6341         * decl2.c (static_ctors): Fix formatting.
6342         (static_dtors): Likewise.
6343         * method.c (use_thunk): Don't call store_parm_decls.
6344         (synthesize_method): Likewise.
6345         * optimize.c (maybe_clone_body): Likewise.
6346         * parse.y (fn.def2): Likewise.
6347         (.set_base_init): Likewise.
6348         (nodecls): Likewise.
6349         * pt.c (instantiate_decl): Likewise.
6350         * rtti.c (synthesize_tinfo_fn): Likewise.
6351         * semantics.c (genrtl_try_block): Simplify.
6352         (expand_body): Use genrtl_start_function and
6353         genrtl_finish_function.
6354         (genrtl_start_function): New function.
6355         (genrtl_finish_function): Likewise.
6356
6357 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6358
6359         * error.c (cp_tree_printer, case 'P'): Append break.
6360
6361 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
6362
6363         * cp-tree.h (frob_opname): Declare.
6364         * parse.y (saved_scopes): New static variable.
6365         (cp_parse_init): Adjust.
6366         (do_id): If lastiddecl is NULL, do do_identifier.
6367         (operator): Save scope information.
6368         (unoperator): New reduction. Restore scope information.
6369         (operator_name): Append unoperator. Call frob_opname.
6370         * spew.c (frob_opname): Define.
6371
6372 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
6373
6374         * decl.c, rtti.c: Include defaults.h if not already included.
6375         Don't define the *_TYPE_SIZE macros.
6376
6377 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
6378
6379         * cp-tree.h (push_switch): Change prototype.
6380         (check_cp_case_value): Remove declaration.
6381         (decl_constant_value): Likewise.
6382         * decl.c (struct cp_switch): Add switch_stmt and cases.
6383         (case_compare): New function.
6384         (push_switch): Set switch_stmt.  Initialize cases.
6385         (pop_switch): Clean up cases.
6386         (define_case_label): Rename to ...
6387         (finish_case_label): ... this.  Do semantic analysis for case
6388         labels here.
6389         (start_function): Correct comment.
6390         * decl2.c (check_cp_case_value): Remove.
6391         * expr.c (do_case): Remove.
6392         * pt.c (tsubst_expr): Adjust call to finish_case_label.
6393         * semantics.c (genrtl_do_poplevel): Remove declaration.
6394         (RECHAIN_STMTS): Remove.
6395         (finish_break_stmt): Use build_break_stmt.
6396         (finish_continue_stmt): Use build_continue_stmt.
6397         (finish_switch_cond): Adjust condition here, rater than in
6398         c_expand_start_case.
6399         (finish_case_label): Remove.
6400         * typeck.c (c_expand_return): Remove.
6401         (c_expand_start_case): Likewise.
6402
6403 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
6404
6405         * ir.texi: Document type nodes.
6406
6407 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6408
6409         * cp-tree.h (init_cp_semantics): Declare.
6410         (genrtl_try_block): Don't declare.
6411         (genrtl_handler): Likewise.
6412         (genrtl_catch_block): Likewise.
6413         (genrtl_ctor_stmt): Likewise.
6414         (genrtl_subobject): Likewise.
6415         (genrtl_do_poplevel): Likewise.
6416         (genrtl_named_return_value): Likewise.
6417         * lex.c (init_parse): Call init_cp_semantics.
6418         * semantics.c (genrtl_try_block): Give it internal linkage.
6419         (genrtl_handler): Likewise.
6420         (genrtl_catch_block): Likewise.
6421         (genrtl_ctor_stmt): Likewise.
6422         (genrtl_subobject): Likewise.
6423         (genrtl_do_poplevel): Likewise.
6424         (genrtl_named_return_value): Likewise.
6425         (lang_expand_stmt): Rename to ...
6426         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
6427         (init_cp_semantics): Define.
6428
6429         * decl.c (initialize_local_var): Remove RTL-generating code.
6430         * semantics.c (genrtl_try_block): Fix formatting.
6431
6432         Move statement-tree facilities from C++ to C front-end.
6433         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6434         (void_zero_node): Remove.
6435         (stmt_tree): Likewise.
6436         (scope_chain): Adjust.
6437         (language_function): Rename to cp_language_function.
6438         (cp_function_chain): Adjust.
6439         (current_stmt_tree): Remove.
6440         (last_tree): Likewise.
6441         (last_expr_type): Likewise.
6442         (struct lang_decl): Adjust.
6443         (STMT_IS_FULL_EXPR_P): Remove.
6444         (add_tree): Remove.
6445         (begin_stmt_tree): Likewise.
6446         (finish_stmt_tree): Likewise.
6447         (walk_tree_fn): Likewise.
6448         (walk_stmt_tree): Likewise.
6449         * class.c (finish_struct): Replace use of add_tree with add_stmt.
6450         * decl.c (mark_stmt_tree): Adjust type.
6451         (init_decl_processing): Don't build void_zero_node.
6452         (initialize_local_var): Adjust usage of current_stmt_tree.
6453         (finish_enum): Use add_stmt, not add_tree.
6454         (save_function_data): Adjust use of language_function.
6455         (finish_constructor_body): Use add_stmt, not add_tree.
6456         (finish_destructor_body): Likewise.
6457         (push_cp_function_context): Adjust use of language_function.
6458         (pop_cp_function_context): Likewise.
6459         (mark_lang_function): Likewise.
6460         (mark_cp_function_context): Likewise.
6461         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6462         (build_vec_init): Likewise.
6463         * semantics.c (SET_LAST_STMT): Remove.
6464         (RECHAIN_STMTS): Don't use it.
6465         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6466         (current_stmt_tree): Define.
6467         (add_tree): Remove.
6468         (finish_goto_stmt): Use add_stmt, not add_tree.
6469         (finish_expr_stmt): Likewise.
6470         (begin_if_stmt): Likewise.
6471         (finish_then_clause): Likewise.
6472         (begin_while_stmt): Likewise.
6473         (begin_do_stmt): Likewise.
6474         (finish_return_stmt): Likewise.
6475         (begin_for_stmt): Likewise.
6476         (finish_break_stmt): Likewise.
6477         (finish_continue_stmt): Likewise.
6478         (begin_switch_stmt): Likewise.
6479         (finish_case_label): Likewise.
6480         (begin_try_block): Likewise.
6481         (begin_function_try_block): Likewise.
6482         (begin_handler): Likewise.
6483         (begin_catch_block): Likewise.
6484         (begin_compound_stmt): Likewise.
6485         (begin_asm_stmt): Likewise.
6486         (finish_asm_stmt): Likewise.
6487         (finish_label_stmt): Likewise.
6488         (add_decl_stmt): Likewise.
6489         (finish_subobject): Likewise.
6490         (finish_decl_cleanup): Likewise.
6491         (finish_named_return_value): Likewise.
6492         (setup_vtbl_ptr): Likewise.
6493         (add_scope_stmt): Likewise.
6494         (finish_stmt_expr): Likewise.
6495         (prune_unused_decls): Remove.
6496         (begin_stmt_tree): Likewise.
6497         (finish_stmt_tree): Likewise.
6498         (prep_stmt): Adjust use of current_stmt_tree.
6499         (lang_expand_stmt): Likewise.
6500         * tree.c (statement_code_p): Remove.
6501         (cp_statement_code_p): New function.
6502         (walk_stmt_tree): Remove.
6503         (init_tree): Set lang_statement_code_p.
6504
6505 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
6506
6507         Integrated preprocessor.
6508
6509         * Make-lang.in, Makefile.in: Remove all references to input.c,
6510         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
6511         * gxx.gperf, hash.h, input.c: Delete.
6512         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6513         initialized properly.
6514
6515         * class.c (fixup_pending_inline): Take a tree, not a
6516         struct pending_inline *.  All callers changed.
6517         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6518         RID_PROTECTED entries in ridpointers[] array here.
6519         * decl.c (duplicate_decls): Do not refer to struct
6520         pending_inline.
6521         (record_builtin_type, init_decl_processing): Use RID_MAX not
6522         CP_RID_MAX.
6523         (grokdeclarator): Use C_IS_RESERVED_WORD.
6524         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6525         cpplib.
6526         (grok_x_components): Do not inspect pending_inlines chain.
6527
6528         * cp-tree.h (struct lang_identifier): Add rid_code entry.
6529         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6530         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6531         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6532         TIME_IDENTIFIER_FILEINFO): Kill.
6533         Update prototypes.
6534         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
6535         single 32-bit word.
6536         * parse.y: Call do_pending_inlines unconditionally.
6537         reinit_parse_for_method is now snarf_method.  fn.defpen is no
6538         longer necessary.  Remove unnecessary <itype> annotation on
6539         SCOPE.  Do not refer to end_of_file or struct pending_inline.
6540         * semantics.c (begin_inline_definitions): Call
6541         do_pending_inlines unconditionally.
6542
6543         * lex.c: Remove all code now shared with C front end.
6544         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
6545         into the get_identifier table.  Rewrite pragma handling to
6546         work with the registry.  Move code to save tokens for later
6547         processing to spew.c.
6548
6549         * spew.c: Rewrite everything in terms of token streams instead
6550         of text.  Move routines here from lex.c / input.c as
6551         appropriate.  GC-mark trees hanging off the pending inlines
6552         chain.
6553
6554 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
6555
6556         * NEWS: Mention that the named return value extension has been
6557         deprecated.
6558         * cp-tree.h (original_result_rtx): Define.
6559         (TREE_REFERENCE_EXPR): Remove.
6560         (DECL_VPARENT): Likewise.
6561         (pushdecl_nonclass_level): Likewise.
6562         (store_return_init): Likewise.
6563         (reinit_lang_specific): Likewise.
6564         (genrtl_named_return_value): Change prototype.
6565         * decl.c (original_result_rtx): Remove.
6566         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6567         Do not generate RTL for local variables here.
6568         (store_return_init): Remove.
6569         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
6570         store_return_init.
6571         (finish_named_return_value): Adjust accordingly.  Warn that this
6572         extension is deprecated.
6573         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6574
6575 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6576
6577         * pt.c (type_unification_real): Replace switch with if.
6578         (unify): Tsubst non-type parms before comparing.
6579
6580 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6581
6582         * error.c (dump_typename): New function, broken out of ...
6583         (dump_type): ... here. Use it.
6584         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6585
6586 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6587
6588         * init.c (build_offset_ref): Deal with namespace scoped
6589         TEMPLATE_ID_EXPRs.
6590
6591 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
6592
6593         * class.c (resolve_address_of_overloaded_function): Add
6594         explanation message.
6595         * decl.c (define_case_label): Reformat explanation.
6596         * decl2.c (finish_static_data_member_decl): Likewise.
6597         (grokfield): Likewise.
6598         * friend.c (do_friend): Likewise.
6599
6600 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
6601
6602         * tree.c (walk_tree): Expose tail recursion.
6603         (walk_stmt_tree): New function.
6604         * cp-tree.h: Prototype walk_stmt_tree.
6605         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6606         the BLOCKs directly.  If a BLOCK has no variables after
6607         pruning, discard it.
6608         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
6609         restore the line number.
6610
6611 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
6612
6613         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6614         (pt.o): Remove dependency on HTAB_H.
6615         * cp-tree.h: Include hashtab.h.
6616         (walk_tree): Change prototype.
6617         (walk_tree_without_duplicates): New function.
6618         * decl.c (check_default_argument): Use it.
6619         * optimize.c (remap_decl): Adjust calls to walk_tree.
6620         (copy_body): Likewise.
6621         (expand_calls_inline): Likewise.
6622         (calls_setjmp_p): Use walk_tree_without_duplicates.
6623         * pt.c: Don't include hashtab.h.
6624         (for_each_template_parm): Use walk_tree_without_duplicates.
6625         * semantics.c (finish-stmt_tree): Likewise.
6626         (expand_body): Likewise.
6627         * tree.c (walk_tree): Add additional parameter.
6628         (walk_tree_without_duplicates): New function.
6629         (count_trees): Use it.
6630         (verify_stmt_tree): Adjust call to walk_tree.
6631         (find_tree): Use walk_tree_without_duplicates.
6632         (no_linkage_check): Likewise.
6633         (break_out_target_exprs): Adjust call to walk_tree.
6634         (cp_unsave): Likewise.
6635
6636 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6637
6638         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6639         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6640         * cp-tree.h (TYPE_BINFO): Adjust comment.
6641         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6642         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6643         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6644         (TYPE_TEMPLATE_INFO): Likewise.
6645         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6646         * class.c (push_nested_class): Likewise.
6647         * decl.c (lookup_name_real): Likewise.
6648         (grokdeclarator): Likewise.
6649         (grok_op_properties): Likewise.
6650         (xref_tag): Likewise.
6651         (xref_basetypes): Likewise.
6652         * decl2.c (constructor_name_full): Likewise.
6653         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6654         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6655         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6656         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6657         (dump_type_suffix): Likewise.
6658         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6659         instead.
6660         (get_aggr_from_typedef): Likewise.
6661         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6662         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6663         (write_template_parm): Likewise.
6664         (write_template_template_parm): Check tree code instead of
6665         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6666         * method.c (build_overload_nested_name): Add
6667         BOUND_TEMPLATE_TEMPLATE_PARM.
6668         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6669         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6670         * pt.c (convert_template_argument): Check tree code instead of
6671         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6672         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6673         (for_each_template_parm): Adjust comment.
6674         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
6675         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6676         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
6677         template_args_equal to compare template template parameter cases.
6678         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6679         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6680         instead.
6681         * tree.c (copy_template_template_parm): Decide whether to create
6682         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6683         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6684         (copy_tree_r): Likewise.
6685         * typeck.c (comptypes): Likewise.  Check tree code instead of
6686         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6687
6688 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
6689
6690         * decl.c (finish_function): Move the code for handling functions
6691         marked with the constructor and destructor attributes inside the
6692         expand_p block.
6693
6694 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6695
6696         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6697
6698 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6699
6700         * pt.c (lookup_template_class): Remove abort.
6701         * tree.c (get_type_decl): Allow error_mark_node.
6702
6703 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
6704
6705         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6706         TEMPLATE_ID_EXPRs.
6707
6708 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
6709
6710         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6711         new ABI mangling.
6712
6713 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6714
6715         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6716         union tag mismatch error reporting.
6717
6718 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
6719
6720         * call.c (build_scoped_method_call): Check it is not a namespace.
6721
6722 2000-08-30  Jason Merrill  <jason@redhat.com>
6723
6724         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6725
6726         * tree.c (bot_manip): Check TREE_CONSTANT rather than
6727         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
6728         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6729
6730         * decl.c (start_function): Always call make_function_rtl.
6731
6732 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6733
6734         * semantics.c (prune_unused_decls): New function.
6735         (finish_stmt_tree): Call it via walk_tree.
6736
6737 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
6738
6739         * class.c (build_secondary_vtable): Constify a char *.
6740         * decl.c (init_decl_processing): Initialize function_id_node,
6741         pretty_function_id_node, and func_id_node.
6742         * input.c (struct input_source): Constify 'str'.
6743         (feed_input): Constify first argument.
6744         * mangle.c (write_identifier): Constify argument.
6745         * pt.c (mangle_class_name_for_template): Constify argument.
6746
6747 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
6748
6749         * typeck.c (mark_addressable): Remove code that pokes around in
6750         RTL.
6751
6752 2000-08-28  Jason Merrill  <jason@redhat.com>
6753
6754         * lex.c (file_name_nondirectory): Move to toplev.c.
6755
6756         * cp-tree.h (LOCAL_CLASS_P): New macro.
6757         * class.c (finish_struct_1): Use it.
6758
6759 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
6760
6761         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6762         (write_encoding): Pass another argument to write_name.
6763         (write_name): Add ignore_local_scope parameter.  Fix handling of
6764         local names.
6765         (write_nested_name): Use write_unqualified_name.
6766         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
6767         (write_template_prefix): Use write_unqualified_name.
6768         (write_component): Remove.
6769         (write_local_name): Add parameter.  Use direct local entity to
6770         discriminator calculation.
6771         (write_class_enum_type): Pass another argument to write_name.
6772         (write_template_template_arg): Likewise.
6773         (make_guard_variable): Likewise.
6774
6775 2000-08-27  Jason Merrill  <jason@redhat.com>
6776
6777         * decl.c (pushdecl): Matching decls for local externs are found in
6778         the current level.  Propagate linkage information from previous
6779         declarations.
6780
6781 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6782
6783         * ir.texi (Expressions): Fix typo.
6784
6785 2000-08-25  Greg McGary  <greg@mcgary.org>
6786
6787         * tree.c (init_tree): Use ARRAY_SIZE.
6788
6789 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6790
6791         * error.c (cp_tree_printer): Rework.
6792
6793 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
6794
6795         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6796         dyn-string.o.
6797         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6798         (cp-demangle.o): Remove target.
6799         (dyn-string.o): Likewise.
6800
6801         * decl.c (grokfndecl): Require that `main' return an `int'.
6802         * mangle.c (write_encoding): Don't mangle return types for
6803         conversion functions.
6804
6805 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6806
6807         * error.c (tree_formatting_info): New data type.
6808         (tree_being_formatted): New macro.
6809         (tree_formatting_flags): Likewise.
6810         (put_whitespace): Likewise.
6811         (print_tree_identifier): Likewise.
6812         (print_identifier): Likewise.
6813         (cp_tree_printer, print_function_argument_list, print_declaration,
6814         print_expression, print_function_declaration,
6815         print_function_parameter, print_type, print_cv_qualifier): New
6816         functions.
6817         (init_error): Initialize lang_printer.
6818
6819 2000-08-24  Jason Merrill  <jason@redhat.com>
6820
6821         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6822         adjustment necessary.
6823
6824 2000-08-24  Greg McGary  <greg@mcgary.org>
6825
6826         * cp-tree.h (MAIN_NAME_P): Remove macro.
6827
6828 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
6829
6830         * error.c (print_instantiation_context): Don't forget to flush the
6831         buffer.
6832
6833 2000-08-23  Jason Merrill  <jason@redhat.com>
6834
6835         * typeck.c (build_ptrmemfunc): Save the input pmf.
6836
6837         * method.c (process_modifiers): Use same_type_p.
6838
6839 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
6840
6841         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6842         * mangle.c (write_function_type): Change prototype.
6843         (write_encoding): Don't mangle return types for
6844         constructors or destructors.
6845         (write_type): Adjust call to write_function_type.
6846         * pt.c (instantiate_template): Instantiate alternate entry points
6847         when instantiating the main function.
6848
6849 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6850
6851         * error.c (cp_print_error_function): Don't use embedded '\n' in
6852         output_printf.
6853
6854 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
6855
6856         * decl.c (init_decl_processing): Remove bogus initialization.
6857         * error.c (lang_print_error_function): Restore here.
6858         (init_error): Initialize print_error_function.
6859
6860 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6861
6862         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6863
6864 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
6865
6866         * Makefile.in (error.o): Depends on diagnostic.h
6867
6868         * cp-tree.h (problematic_instantiation_changed,
6869         record_last_problematic_instantiation, current_instantiation,
6870         print_instantiation_context): Declare.
6871         (maybe_print_template_context): Remove.
6872
6873         * decl.c (init_decl_processing): Set print_error_function to NULL.
6874         (lang_print_error_function): Remove, since we're using a new
6875         machinery.
6876
6877         * error.c: #include diagnostic.h
6878         (function_category): New function.
6879         (cp_diagnostic_starter): Likewise.
6880         (cp_diagnostic_finalizer): Likewise.
6881         (cp_print_error_function): Likewise.
6882         (maybe_print_instantiation_context): Likewise.
6883         (print_instantiation_full_context): Likewise.
6884         (print_instantiation_partial_context): Likewise.
6885         (print_instantiation_context): Define.
6886         (init_error): Initialize diagnostic pager and finalizer.
6887
6888         * pt.c (problematic_instantiation_changed): Define.
6889         (record_last_problematic_instantiation): Likewise.
6890         (current_instantiation): Likewise.
6891         (maybe_print_template_context): Remove.
6892         (print_template_context): Likewise.
6893         (current_tinst_level): Make static to reflect Brendan Kehoe's
6894         change of 1995-04-13.
6895         (push_tinst_level): Call print_instantiation_context.
6896
6897 2000-08-21  Nix  <nix@esperi.demon.co.uk>
6898
6899         * lang-specs.h: Do not process -o or run the assembler if
6900         -fsyntax-only.
6901
6902 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
6903
6904         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6905         variables.
6906         * decl2.c (lang_decode_option): Disable gettext attributes for
6907         -ansi.
6908
6909 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6910
6911         * lex.c (lang_init_options): Default diagnostic message maximum
6912         length to 80, when line-wrapping.
6913
6914 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
6915
6916         * class.c (build_vtbl_initializer): Clear the entire
6917         vtbl_init_data.  Start keeping track of the functions for which we
6918         have created vcall offsets here.
6919         (dfs_build_vcall_offset_vtbl_entries): Remove.
6920         (build_vcall_offset_vtbl_entries): Reimplement.
6921         (add_vcall_offset_vtbl_entries_r): New function.
6922         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
6923         computing when vcall offsets are necessary.
6924
6925 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6926
6927         * decl.c (member_function_or_else): Use cp_error ... %T.
6928         (grokdeclarator): Likewise.
6929         (start_method): Likewise.
6930         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
6931
6932 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6933
6934         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
6935         TYPE_DECLs.
6936
6937 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6938
6939         * cp-tree.h (PTRMEM_OK_P): New macro.
6940         (itf_ptrmem_ok): New enumeration value.
6941         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
6942         argument. Diagnose implicit pointer to member.
6943         (instantiate_type): Don't diagnose implicit pointer to member
6944         here. Pass itf_ptrmem_ok if ok. Adjust calls to
6945         resolve_address_of_overloaded_function.
6946         * init.c (build_offset_ref): Set PTRMEM_OK_P.
6947         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
6948         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
6949         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
6950         (build_unary_op): Deal with single non-static member in
6951         microsoft-land.
6952
6953 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6954
6955         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
6956
6957 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
6958
6959         * cp-tree.h (enum_name_string): Remove prototype.
6960         (report_case_error): Remove prototype.
6961         * cp/typeck2.c (enum_name_string): Remove.
6962         (report_case_error): Remove.
6963         * error.c (dump_expr): Deal with enum values directly.
6964         Correctly negate integer constant.
6965
6966 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6967
6968         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
6969         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
6970         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
6971         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
6972         (__cxa_vec_new): Use __cxa_vec_new2.
6973         (__cxa_vec_delete): Use __cxa_vec_delete2.
6974
6975 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6976
6977         * vec.cc (__cxa_vec_new): Set "C" linkage.
6978         (__cxa_vec_ctor): Likewise.
6979         (__cxa_vec_cctor): Likewise.
6980         (__cxa_vec_dtor): Likewise.
6981         (__cxa_vec_delete): Likewise.
6982         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
6983         (__cxa_vec_ctor): Likewise.
6984         (__cxa_vec_cctor): Likewise.
6985         (__cxa_vec_dtor): Likewise.
6986         (__cxa_vec_delete): Likewise.
6987
6988 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6989
6990         * class.c (instantiate_type): Reinstate local variable
6991         deleted in previous change.
6992
6993         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
6994         itf_no_attributes.
6995
6996 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
6997
6998         * cp-tree.h (instantiate_type_flags): New enumeration.
6999         (instantiate_type): Change parameter.
7000         * class.c (instantiate_type): Adjust prototype. Adjust.
7001         * call.c (standard_conversion): Adjust instantiate_type call.
7002         (reference_binding): Likewise.
7003         (build_op_delete_call): Likewise.
7004         (convert_like_real): Likewise.
7005         * cvt.c (cp_convert_to_pointer): Likewise.
7006         (convert_to_reference): Likewise.
7007         * pt.c (convert_nontype_argument): Likewise.
7008         * typeck.c (build_binary_op): Likewise.
7009         (build_ptrmemfunc): Likewise.
7010         (convert_for_assignment): Likewise.
7011
7012 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
7013
7014         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
7015         (current_aggr): Define.
7016         * decl.c (grokdeclarator): Make sure a friend class is an
7017         elaborated type specifier.
7018         * parse.y (current_aggr): Remove static definition.
7019         (cp_parse_init): Adjust.
7020         (structsp): Clear and restore current_aggr.
7021         (component_decl_list): Clear current_aggr.
7022
7023         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
7024         aggregate tag on the typename's context.
7025
7026         * pt.c (tsubst_friend_class): Return error_mark_node, if
7027         parms becomes NULL.
7028         (instantiate_class_template): Ignore error_mark_node friend types.
7029
7030 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
7031
7032         * cvt.c (warn_ref_binding): New static function, broken out of ...
7033         (convert_to_reference): ... here. Use it.
7034
7035 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
7036
7037         * parse.y (template_arg): Add rule for template qualified with
7038         global scope.
7039
7040 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7041
7042         * decl2.c (add_function): Reorganize.
7043         (arg_assoc): Do not consider function template decls.
7044
7045 2000-08-11  Jason Merrill  <jason@redhat.com>
7046
7047         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
7048         looking inside.
7049
7050 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7051
7052         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
7053         (lookup_nested_tag): Likewise.
7054
7055         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
7056         can be produced.
7057
7058 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7059
7060         * parse.y (named_complex_class_head_sans_basetype): Remove
7061         always true if.
7062
7063 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7064
7065         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
7066         explicit TEMPLATE_ID_EXPR args.
7067         (build_expr_from_tree, case CALL_EXPR): Likewise.
7068
7069 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
7070
7071         * decl.c (check_tag_decl): Diagnose typename's which don't
7072         declare anything.
7073
7074 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
7075
7076         * init.c (build_aggr_init): Reject bogus array initializers
7077         early.
7078
7079 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7080
7081         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
7082         runtime.
7083         * cp/tinfo.cc (__dynamic_cast): Likewise.
7084         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
7085
7086 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
7087
7088         * cvt.c (convert_to_pointer_force): Fix error message when
7089         attempting to cast from ambiguous base.
7090
7091 2000-08-08  Jason Merrill  <jason@redhat.com>
7092
7093         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
7094         (tsubst_template_arg_vector): Likewise.
7095
7096         * decl2.c (build_anon_union_vars): Choose the largest field; don't
7097         assume that one will be as large as the union.
7098
7099 2000-08-07  Kazu Hirata  <kazu@hxi.com>
7100
7101         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
7102         * decl.c (pop_labels): Likewise.
7103
7104 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
7105
7106         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
7107         specifications.
7108         (__pointer_to_member_type_info): Likewise.
7109         (__base_class_info): Likewise.
7110         (__class_type_info): Likewise.
7111         (__si_class_type_info): Likewise.
7112         (__vmi_class_type_info): Likewise.
7113         * tinfo.cc (__si_class_type_info::__do_find_public_src):
7114         Changed member names to match specifications.
7115         (__vmi_class_type_info::__do_find_public_src): Likewise.
7116         (__si_class_type_info::__do_dyncast): Likewise.
7117         (__vmi_class_type_info::__do_dyncast): Likewise.
7118         (__si_class_type_info::__do_upcast): Likewise.
7119         (__vmi_class_type_info::__do_upcast): Likewise.
7120         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
7121         (__pbase_type_info::__pointer_catch): Likewise.
7122         (__pointer_type_info::__pointer_catch): Likewise.
7123         (__pointer_to_member_type_info::__pointer_catch): Likewise.
7124
7125 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
7126
7127         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
7128         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
7129         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
7130
7131 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
7132
7133         * cp-tree.h (add_method): Change prototype.
7134         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
7135         Don't double the size of the method vector in the error case.
7136         (handle_using_decl): Adjust call to add_method.
7137         (add_implicitly_declared_members): Likewise.
7138         (clone_function_decl): Likewise.
7139         * decl2.c (check_classfn): Likewise.
7140         * semantics.c (finish_member_declaration): Likewise.
7141
7142 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
7143
7144         * decl.c (flag_isoc94): New variable.
7145
7146 2000-08-02  Jason Merrill  <jason@redhat.com>
7147
7148         * pt.c (do_type_instantiation): Add complain parm; don't complain
7149         if called recursively.
7150         * cp-tree.h, parse.y: Adjust.
7151
7152 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
7153
7154         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
7155         -Wno-strict-prototypes.
7156
7157         * g++spec.c: Adjust type of second argument to
7158         lang_specific_driver, and update code as necessary.
7159
7160         * cp-tree.h: Don't prototype min_precision here.
7161         (my_friendly_assert): Cast expression to void.
7162         * semantics.c (do_poplevel): Initialize scope_stmts.
7163
7164 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
7165
7166         * cp-tree.h (DECL_NEEDED_P): Tweak.
7167
7168 2000-07-28  Jason Merrill  <jason@redhat.com>
7169
7170         * lang-specs.h: Use %i in rule for .ii files.
7171
7172 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
7173
7174         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
7175
7176 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
7177
7178         Allow indirect primary bases.
7179         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
7180         primary_base.
7181         (CLASSTYPE_VFIELD_PARENT): Remove.
7182         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
7183         (BINFO_PRIMARY_BINFO): Remove.
7184         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
7185         (BINFO_VBASE_PRIMARY_P): Likewise.
7186         (BINFO_PRIMARY_BASE_OF): New macro.
7187         (BINFO_INDIRECT_PRIMARY_P): Likewise.
7188         (get_primary_binfo): New function.
7189         * decl.c (lang_mark_tree): Make lang_type::primary_base.
7190         * class.c (vcall_offset_data_s): Rename to ...
7191         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
7192         and add ctor_vtbl_p.
7193         (get_derived_offset): Use get_primary_binfo.
7194         (dfs_mark_primary_bases): Adjust handling of virtual primary
7195         bases.
7196         (mark_primary_bases): Likewise.
7197         (set_primary_base): Take a binfo, not an integer, as a
7198         representation of the primary base.
7199         (indirect_primary_base_p): Remove.
7200         (determine_primary_base): Adjust for indirect primary bases.
7201         (dfs_find_final_overrider): Fix typo in coment.
7202         (update_vtable_entry_for_fn): Use get_primary_binfo.
7203         (layout_nonempty_base_or_field): Tweak.
7204         (build_base_fields): Adjust for new primary base semantics.
7205         (dfs_propagate_binfo_offsets): Remove.
7206         (propagate_binfo_offsets): Rewrite.
7207         (dfs_set_offset_for_shared_vbases): Remove.
7208         (layout_virtual_bases): Don't use it.
7209         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
7210         ABI.
7211         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
7212         CLASSTYPE_VFIELD_PARENT.
7213         (dfs_get_primary_binfo): New function.
7214         (get_primary_binfo): Likewise.
7215         (dump_class_hierarchy_r): Tweak printing of primary bases.
7216         (build_vtbl_initializer): Fix typo in comments.  Use
7217         vtbl_init_data.
7218         (build_vcall_and_vbase_vtbl_entries): Likewise.
7219         (build_vbaes_offset_vtbl_entries): Likewise.
7220         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
7221         BV_VCALL_INDEX to handle indirect primary bases.
7222         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
7223         (build_rtti_vtbl_entries): Likewise.
7224         * search.c (get_shared_vbase_if_not_primary): Tweak.
7225         (find_vbase_instance): Likewise.
7226         (binfo_for_vtable): Simplify.
7227         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
7228         (make_binfo): Make it have 11 entries.
7229
7230 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
7231
7232         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
7233         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
7234         ascertaining primaryness.
7235         (G): Remove template_args.
7236         (decl_is_template_id): New function.
7237         (write_encoding): Use decl_is_template_id.
7238         (write_name): Likewise.  Handle type_decls.  Get main variant of
7239         type decls.
7240         (write_nested_name): Likewise.
7241         (write_prefix): Likewise.
7242         (write_template_prefix): Likewise.
7243         (write_special_name_constructor): Remove defunct production from
7244         comment.
7245         (write_bare_function_type): Remove comment about absent parameter.
7246         (write_template_template_arg): Add missing grammar production to
7247         comment.
7248
7249 2000-07-27  Jason Merrill  <jason@redhat.com>
7250
7251         * decl.c (duplicate_decls): If common_type produces a non-typedef
7252         type for a typedef, just use the old type.
7253
7254 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
7255
7256         * cp-tree.h (function_depth): Declare.
7257         (verify_stmt_tree): Likewise.
7258         (find_tree): Likewise.
7259         * decl.c (function_depth): Give it external linkage.
7260         * optimize.c (optimize_function): Increment and decrement it.
7261         * tree.c (verify_stmt_tree_r): New function.
7262         (verify_stmt_tree): Likewise.
7263         (find_tree_r): Likewise.
7264         (find_tree): Likewise.
7265
7266 2000-07-27  Jason Merrill  <jason@redhat.com>
7267
7268         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
7269         TYPE_PTRMEMFUNC_P.
7270         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
7271
7272 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7273
7274         * decl.c (start_cleanup_fn): Mark the function as `inline'.
7275         * decl2.c (get_guard): Call cp_finish_decl, not
7276         rest_of_decl_compilation, for local guards.
7277         * lex.c (do_identifier): Remove unused variable.
7278
7279 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
7280
7281         * parse.y:  Add missing ';'.
7282
7283 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
7284
7285         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
7286         of `extern "C++"'.
7287
7288 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7289
7290         Kill strict_prototype. Backwards compatibility only for
7291         non NO_IMPLICIT_EXTERN_C systems.
7292         * cp-tree.h (flag_strict_prototype): Remove.
7293         (strict_prototype): Remove.
7294         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7295         * decl.c (maybe_push_to_top_level): Adjust.
7296         (pop_from_top_level): Adjust.
7297         (decls_match): Only allow sloppy parm matching for ancient
7298         system headers.
7299         (init_decl_processing): Adjust.
7300         (grokdeclarator): Adjust.
7301         * decl2.c (flag_strict_prototype): Remove.
7302         (strict_prototype): Remove.
7303         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
7304         (lang_f_options): Remove "strict-prototype".
7305         (unsupported-options): Add "strict-prototype".
7306         * lex.c (do_identifier): Adjust.
7307         (do_scoped_id): Adjust.
7308         * parse.y (empty_parms): Adjust.
7309         * class.c (push_lang_context): Adjust.
7310         (pop_lang_context): Adjust.
7311         * typeck.c (comp_target_parms): Adjust.
7312
7313 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
7314
7315         * decl.c (poplevel): Deal with anonymous variables at for scope.
7316         (maybe_inject_for_scope_var): Likewise.
7317
7318 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
7319
7320         * decl.c: Remove all signal handling code, now done in toplev.c.
7321
7322 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
7323
7324         * decl.c (make_rtl_for_nonlocal_decl): Rework.
7325
7326         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7327         correctly.
7328
7329 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
7330
7331         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7332         Define my_friendly_assert and my_friendly_abort as macros
7333         which may call friendly_abort.  Prototype friendly abort, not
7334         my_friendly_abort or my_friendly_assert.
7335         * decl.c (signal_catch): Report the signal caught in the error
7336         message.  Call fatal directly.
7337         * typeck2.c (ack, my_friendly_assert): Delete.
7338         (my_friendly_abort): Rename to friendly_abort.  Expect file,
7339         line, and function parameters.  Report the abort code, then
7340         call fancy_abort.  Do not mask an abort if errors have
7341         already occurred.
7342
7343 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
7344
7345         * typeck.c (comp_target_parms): Remove obsolete parameter.
7346         (comp_target_types): Adjust.
7347
7348 2000-07-17  Jason Merrill  <jason@redhat.com>
7349
7350         * typeck.c (mark_addressable): Never set TREE_USED.
7351         * call.c (build_call): Don't abort on calls to library functions
7352         that have been declared normally.
7353
7354         * typeck.c (build_binary_op): Fix grammar in warning.
7355
7356         * exception.cc (__eh_free): Fix prototype.
7357
7358         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
7359
7360         * decl.c (pushdecl): Handle seeing an OVERLOAD in
7361         IDENTIFIER_NAMESPACE_VALUE.
7362
7363 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
7364
7365         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
7366         * method.c (use_thunk): Correct handling of vcall offsets.
7367
7368 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
7369
7370         * .cvsignore: parse.h and parse.c have no cp- prefix.
7371
7372 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
7373
7374         * .cvsignore: New file.
7375
7376 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
7377
7378         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
7379
7380 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
7381
7382         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7383         * parse.c: Remove.
7384         * parse.h: Likewise.
7385
7386 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
7387
7388         * class.c (layout_class_type): Add pointers to virtual bases after
7389         base classes under the old ABI.
7390
7391 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
7392
7393         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7394         (finish_continue_stmt): Likewise.
7395         (begin_for_stmt): Remove call to note_level_for_for.
7396         (finish_goto_stmt): Change call from build_min_nt
7397         to build_stmt.
7398         (finish_expr_stmt): Likewise.
7399         (begin_if_stmt): Likewise.
7400         (begin_while_stmt): Likewise.
7401         (finish_while_stmt): Likewise.
7402         (finish_return_stmt): Likewise.
7403         (begin_for_stmt): Likewise.
7404         (finish_for_stmt): Likewise.
7405         (finish_break_stmt): Likewise.
7406         (begin_switch_stmt): Likewise.
7407         (finish_case_label): Likewise.
7408         (genrtl_try_block): Likewise.
7409         (begin_try_block): Likewise.
7410         (begin_handler): Likewise.
7411         (begin_compound_stmt): Likewise.
7412         (finish_asm_stmt): Likewise.
7413         (finish_label_stmt): Likewise.
7414         (add_decl_stmt): Likewise.
7415         (finish_subobject): Likewise.
7416         (finish_decl_cleanup): Likewise.
7417         (finish_named_return_value): Likewise.
7418         (setup_vtbl_ptr): Likewise.
7419         (add_scope_stmt): Likewise.
7420         * decl.c (finish_constructor_body): Likewise.
7421         (finish_destructor_body): Likewise.
7422         * optimize.c (copy_body_r): Likewise.
7423         (initialize_inlined_parameters): Likewise.
7424         (declare_return_variable): Likewise.
7425         (expand_call_inline): Likewise.
7426
7427 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
7428
7429         * semantics.c (expand_body): Sync interface information
7430         at the end of function body expansion.
7431
7432 2000-07-09  Jason Merrill  <jason@redhat.com>
7433
7434         * init.c (build_new_1): Bail early if the call to new fails.
7435
7436         * decl.c (compute_array_index_type): Check specifically for
7437         an INTEGER_CST, not just TREE_CONSTANT.
7438
7439         * decl.c (duplicate_decls): Don't call duplicate_decls on
7440         the DECL_TEMPLATE_RESULT.
7441         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7442         codes.
7443
7444         * error.c (dump_template_bindings): Don't crash if we had an
7445         invalid argument list.
7446
7447         * typeck.c (c_expand_start_case): Do narrowing here.
7448         * semantics.c (finish_switch_cond): Not here.
7449
7450 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
7451
7452         * parse.y (asm_clobbers): Do string concatenation.
7453
7454 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7455
7456         * decl.c (pushtag): Don't put local classes in template functions
7457         on the local_classes list.
7458
7459 2000-07-04  Scott Snyder  <snyder@fnal.gov>
7460
7461         * decl2.c (get_guard): Add missing return for old ABI local
7462         variable case.
7463
7464 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
7465
7466         * cp-tree.h (char_type_p): New function.
7467         * decl.c (init_decl_processing): Don't initialize
7468         signed_wchar_type_node or unsigned_wchar_type_node.
7469         (complete_array_type): Handle brace-enclosed string-constants.
7470         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7471         * tree.c (char_type_p): New function.
7472         * typeck2.c (digest_init): Use char_type_p.
7473
7474 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7475
7476         * pt.c (tsubst): Don't layout type, if it's error_mark.
7477
7478 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
7479
7480         * pt.c (instantiate_pending_templates): Reset template level.
7481
7482 2000-07-05  Jason Merrill  <jason@redhat.com>
7483
7484         * call.c (joust): Don't complain about `operator char *()' beating
7485         `operator const char *() const'.
7486
7487 2000-07-04  scott snyder  <snyder@fnal.gov>
7488             Jason Merrill  <jason@redhat.com>
7489
7490         * repo.c (repo_get_id): Handle the case where a class with virtual
7491         bases has a null TYPE_BINFO_VTABLE.
7492
7493 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
7494             Jason Merrill  <jason@redhat.com>
7495
7496         * parse.y (member_init): Just pass in the type.
7497         * init.c (expand_member_init): Handle getting a type.
7498
7499 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7500             Jason Merrill  <jason@redhat.com>
7501
7502         * decl.c (finish_function): Warn if a function has no return
7503         statement.
7504         Suggested by Andrew Koenig.
7505         * typeck.c (check_return_expr): Do set current_function_returns_value
7506         if we got an error_mark_node.
7507
7508 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7509
7510         * decl2.c (push_decl_namespace): Push the original namespace.
7511
7512 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
7513
7514         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7515         * semantics.c (begin_class_definition): Clear it.
7516
7517 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
7518
7519         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7520         (genrtl_expr_stmt): Likewise.
7521         (genrtl_decl_stmt): Likewise.
7522         (genrtl_if_stmt): Likewise.
7523         (genrtl_while_stmt): Likewise.
7524         (genrtl_do_stmt): Likewise.
7525         (genrtl_return_stmt): Likewise.
7526         (genrtl_for_stmt): Likewise.
7527         (genrtl_break_stmt): Likewise.
7528         (genrtl_continue_stmt): Likewise.
7529         (genrtl_scope_stmt): Likewise.
7530         (genrtl_switch_stmt): Likewise.
7531         (genrtl_case_label): Likewise.
7532         (genrtl_begin_compound_stmt): Likewise.
7533         (genrtl_finish_compound_stmt): Likewise.
7534         (genrtl_compound_stmt): Likewise.
7535         (genrtl_asm_stmt): Likewise.
7536
7537         * init.c (begin_init_stmts): Remove call to
7538         genrtl_begin_compound_stmt.
7539         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7540
7541         * semantics.c (lang_expand_stmt): Changed call to
7542         genrtl_compound_stmt to ignore return value.
7543
7544 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
7545
7546         * mangle.c (canonicalize_for_substitution): Return the canonical
7547         variant of a type.
7548
7549         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7550         TYPE_DECL.
7551         * typeck.c (commonparms): Remove obstack manipulations.
7552
7553 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
7554
7555         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7556
7557         * Makefile.in (OBJS): Added ../c-semantics.o.
7558         (OBJDEPS): Likewise.
7559
7560         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7561         ../c-common.h.
7562         (struct stmt_tree): Added comment.
7563         (current_function_name_declared): Removed.
7564         (stmts_are_full_exprs_p): Likewise.
7565         (genrtl_do_pushlevel): Likewise.
7566         (genrtl_clear_out_block): Likewise.
7567         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7568         (DECL_ANON_UNION_ELEMS): Likewise.
7569         (emit_local_var): Likewise.
7570         (make_rtl_for_local_static): Likewise.
7571         (do_case): Likewise.
7572         (expand_stmt): Likewise.
7573         (genrtl_decl_cleanup): Likewise.
7574         (c_expand_asm_operands): Likewise.
7575         (c_expand_return): Likewise.
7576         (c_expand_start_case): Likewise.
7577
7578         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7579         (emit_local_var): Likewise.
7580         (initialize_local_var): Change reference to
7581         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7582         Change reference to stmts_are_full_exprs_p to
7583         current_stmt_tree->stmts_are_full_exprs_p.
7584         (push_cp_function_context): Likewise.
7585
7586         * expect.c (expand_throw): Change reference to
7587         stmts_are_full_exprs_p.
7588
7589         * init.c (build_aggr_init): Change reference to
7590         stmts_are_full_exprs_p.
7591         (build_vec_init): Likewise.
7592
7593         * optimize.c (maybe_clone_body): Change reference to
7594         current_function_name_declared to
7595         cp_function_chain->name_declared.
7596
7597         * pt.c (instantiate_decl): Change reference to
7598         current_function_name_declared to
7599         cp_function_chain->name_declared.
7600
7601         * semantics.c (expand_cond): Moved declaration to c-common.h.
7602         (genrtl_do_pushlevel): Moved to c-semantics.c.
7603         (genrtl_clear_out_block): Likewise.
7604         (genrtl_goto_stmt): Likewise.
7605         (genrtl_expr_stmt): Likewise.
7606         (genrtl_decl_stmt): Likewise.
7607         (gerntl_if_stmt): Likewise.
7608         (genrtl_while_stmt): Likewise.
7609         (genrtl_do_stmt): Likewise.
7610         (genrtl_return_stmt): Likewise.
7611         (genrtl_for_stmt): Likewise.
7612         (genrtl_break_stmt): Likewise.
7613         (genrtl_continue_stmt): Likewise.
7614         (genrtl_scope_stmt): Likewise.
7615         (genrtl_switch_stmt): Likewise.
7616         (genrtl_case_label): Likewise.
7617         (genrtl_begin_compound_stmt): Likewise.
7618         (genrtl_finish_compound_stmt): Likewise.
7619         (genrtl_compound_stmt): Likewise.
7620         (genrtl_asm_stmt): Likewise.
7621         (genrtl_decl_cleanup): Likewise.
7622         (expand_cond): Likewise.
7623         (expand_stmt): Renamed to ...
7624         (lang_expand_stmt): ... this.
7625         (lang_expand_expr_stmt): Initialize.
7626         (set_current_function_name_declared): Likewise.
7627         (stmts_are_full_exprs_p): Likewise.
7628         (current_function_name_declared): Likewise.
7629         (anon_aggr_type_p): Likewise.
7630         (do_poplevel): Change reference to
7631         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7632         Change reference to stmts_are_full_exprs_p to
7633         current_stmt_tree->stmts_are_full_exprs_p.
7634         (add_tree): Likewise.
7635         (finish_expr_stmt): Likewise.
7636         (prep_stmt): Likewise.
7637         (lang_expand_stmt): Likewise.
7638         (begin_compound_stmt): Change reference to
7639         current_function_name_declared to
7640         cp_function_chain->name_declared and call to
7641         current_function_name_declared().
7642         (setup_vtbl_ptr): Likewise.
7643         (genrtl_do_poplevel): Removed.
7644
7645 2000-06-30  Jason Merrill  <jason@redhat.com>
7646
7647         * init.c (init_init_processing): Go back to aligning like
7648         double_type_node for old ABI.
7649         (get_cookie_size): Make cookie larger if we get a type that needs
7650         more alignment.
7651         (build_vec_delete): Call it.
7652
7653         * typeck.c (qualify_type_recursive): New fn.
7654         (composite_pointer_type): Use it.
7655         (build_binary_op): Use composite_pointer_type.
7656
7657 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
7658             Jason Merrill  <jason@redhat.com>
7659
7660         * typeck.c (check_return_expr): Don't complain about returning
7661         NULL from operator new if -fcheck-new.
7662         * cp-tree.h: Declare flag_check_new here.
7663         * init.c: Not here.
7664
7665 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7666
7667         * mangle.c (find_substitution): Use same_type_p.
7668         (write_encoding): Don't check for substitutions.
7669
7670 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7671
7672         * parse.y (expr_no_comma_rangle): New non-terminal.
7673         (template_parm): Use it for default parameter case.
7674         (template_arg): Use it.
7675         (expr_no_commas): Remove commented out undefined extensions.
7676         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7677         * parse.h, parse.c: Rebuilt.
7678
7679 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
7680
7681         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7682         (finish_asm_stmt): Do it here, instead.
7683
7684         * cp-tree.h (ridpointers): Don't declare.
7685         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7686         (record_builtin_java_type): Likewise.
7687         (init_decl_processing): Likewise.
7688         * lex.c: Move inclusion of lex.h.
7689         (ridpointers): Don't define.
7690         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
7691         RID_MAX.
7692         * lex.h (enum rid): Rename to ...
7693         (enum cp_rid): ... this.
7694         (ridpointers): Don't declare.
7695         * parse.y: Move inclusion of lex.h.
7696         * parse.c: Regenerated.
7697         * spew.c: Move inclusion of lex.h.
7698
7699         * cp-tree.h (struct language_function): Remove temp_name_counter.
7700         (temp_name_counter): Remove.
7701         (get_temp_name): Change prototype.
7702         (get_guard): New function.
7703         (get_guard_cond): Likewise.
7704         (set_guard): Likewise.
7705         * cvt.c (build_up_reference): Adjust call to get_temp_name.
7706         * decl.c (expand_static_init): Use get_guard and friends to
7707         implement guard variables.
7708         * decl2.c (get_temp_name): Assume that the variables created are
7709         always static.
7710         (get_sentry): Rename to ...
7711         (get_guard): ... this.  Implement new ABI guard variables.
7712         (get_guard_bits): New function.
7713         (get_guard_cond): Likewise.
7714         (set_guard): Likewise.
7715         (start_static_initialization_or_destruction): Use them.
7716         (do_static_initialization): Replace sentry with guard throughout.
7717         (do_static_destruction): Likewise.
7718         * init.c (create_temporary_var): Add comment.
7719
7720 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
7721
7722         * mangle.c (find_substitution): Use same_type_p.
7723         (write_encoding): Don't check for substitutions.
7724
7725 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
7726
7727         * parse.y (expr_no_comma_rangle): New non-terminal.
7728         (template_parm): Use it for default parameter case.
7729         (template_arg): Use it.
7730         (expr_no_commas): Remove commented out undefined extensions.
7731         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7732         * parse.h, parse.c: Rebuilt.
7733
7734 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
7735
7736         * cp-tree.h (flag_const_strings): Remove.
7737         (warn_parentheses): Likewise.
7738         (warn_format): Likewise.
7739         (common_type): Likewise.
7740         (default_conversion): Likewise.
7741         (build_binary_op): Likewise.
7742         (cp_build_binary_op): New macro.
7743         * call.c (build_new_op): Use cp_build_binary_op instead of
7744         build_binary_op.
7745         * class.c (build_vtable_entry_ref): Likewise.
7746         * decl.c (expand_static_init): Likewise.
7747         (compute_array_index_type): Likewise.
7748         (build_enumerator): Likewise.
7749         * decl2.c (delete_sanity): Likewise.
7750         (start_static_initialization_or_destruction): Likewise.
7751         * error.c (dump_type_suffix): Likewise.
7752         * init.c (resolve_offset_ref): Likewise.
7753         (build_new): Likewise.
7754         (build_new_1): Likewise.
7755         (build_vec_delete_1): Likewise.
7756         (build_vec_init): Likewise.
7757         (build_delete): Likewise.
7758         * rtti.c (synthesize_tinfo_fn): Likewise.
7759         (synthesize_tinfo_var): Likewise.
7760         * search.c (expand_upcast_fixups): Likewise.
7761         (fixup_all_virtual_upcast_offsets): Likewise.
7762         * typeck.c (build_array_ref): Likewise.
7763         (get_member_function_from_ptrfunc): Likewise.
7764         (build_binary_op): Add parameter.
7765         (pointer_int_sum): Use cp_build_binary_op.
7766         (pointer_diff): Likewise.
7767         (build_modify_expr): Likewise.
7768         (get_delta_difference): Likewise.
7769         (build_ptrmemfunc): Likewise.
7770
7771 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
7772
7773         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7774         * decl.c (create_implicit_typedef): Adjust.
7775         * decl2.c (build_artificial_parm): Adjust.
7776         * method.c (implicitly_declare_fn): Adjust.
7777         * pt.c (push_inline_template_parms_recursive): Adjust.
7778         (process_template_parm): Adjust.
7779         (overloaded_template_name): Adjust.
7780         * semantics.c (finish_template_template_parm): Adjust.
7781
7782 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
7783
7784         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7785         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7786         where to emit thunks.
7787         (build_vtt): Adjust call to build_vtt_inits.
7788         (build_vtt_inits): Add parameter to indicate whether or not
7789         sub-VTTs for virtual bases should be included.  Adjust handling of
7790         construction vtables.
7791         (get_matching_base): New function.
7792         (dfs_build_vtt_inits): Rename to ...
7793         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7794         construction vtables.
7795         (dfs_fixup_binfo_vtbls): Likewise.
7796         (build_ctor_vtbl_groups): Build construction vtables for virtual
7797         bases, too.
7798         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7799         to build construction vtbls.
7800         (dfs_accumulate_vtbl_inits): Adjust handling of
7801         construction vtables.
7802
7803         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7804         types correctly.
7805
7806 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
7807
7808         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7809
7810 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7811
7812         * search.c (hides): Remove.
7813         (is_subobject_of_p): Add most_derived parameter. Use
7814         CANONICAL_BINFO.
7815         (lookup_field_queue_p): Adjust.
7816         (lookup_field_r): Adjust.
7817
7818 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
7819
7820         * decl2.c (handle_class_head): Bash typedefs to the type's main
7821         decl.
7822
7823 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
7824
7825         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7826         (begin_global_stmt_expr): ... this.
7827         (genrtl_finish_stmt_expr): Rename to ...
7828         (finish_global_stmt_expr): ... this.
7829         * init.c (begin_init_stmts): Adjust calls.
7830         (finish_init_stmts): Likewise.
7831         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7832         (begin_global_stmt_expr): ... this.
7833         (genrtl_finish_stmt_expr): Rename to ...
7834         (finish_global_stmt_expr): ... this.
7835
7836 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7837
7838         * search.c (lookup_member): Fix typo in comment.
7839
7840 2000-06-24  Jason Merrill  <jason@redhat.com>
7841
7842         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7843         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7844
7845 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7846
7847         * parse.y (complex_direct_notype_declarator): Support global_scope.
7848         * Makefile.in: Adjust conflict count.
7849
7850 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7851
7852         * parse.y (template_arg): Convert TEMPLATE_DECL
7853         that is a template template parameter to
7854         TEMPLATE_TEMPLATE_PARM here.
7855
7856         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7857         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7858         (copy_template_template_parm): Adjust prototype.
7859         * decl.c (grokdeclarator): Remove dead code.
7860         * pt.c (process_template_parm): Tidy.
7861         (lookup_template_class): Construct nodes in
7862         copy_template_template_parm.
7863         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7864         lookup_template_class.  Use TYPE_TI_TEMPLATE.
7865         * tree.c (copy_template_template_parm): Add NEWARGS
7866         parameter.
7867         (mapcar): Adjust call to copy_template_template_parm.
7868         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7869         * method.c (build_template_template_parm_names): Change error
7870         code to avoid compilation warning.
7871
7872         * gxxint.texi: Document template template parameter
7873         name mangling.
7874
7875 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
7876
7877         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7878         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7879         (cp-demangle.o): New rule.
7880         (dyn-string.o): Likewise.
7881         * inc/cxxabi.h (__cxa_demangle): New declaration.
7882
7883 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
7884
7885         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7886         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7887         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
7888         a tree, not an int.
7889         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7890         (make_thunk): Change prototype.
7891         (emit_thunk): Rename to use_thunk.
7892         (mangle_thunk): Change prototype.
7893         * class.c (get_derived_offset): Simplify.
7894         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7895         BV_GENERATE_THUNK_WITH_VTABLE_P.
7896         (build_primary_vtable): Simplify.
7897         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7898         (dfs_find_base): Remove.
7899         (update_vtable_entry_for_fn): Correct bug in finding the base
7900         where a virtual function was first declared.  Figure out whether
7901         or not to emit a vcall-thunk with the vtables in which it appears.
7902         Correct logic for deciding whether to use an ordinary thunk, or a
7903         vcall thunk.
7904         (finish_struct_1): Remove unnecssary code.
7905         (build_vtbl_initializer): Use ssize_int for the running counter of
7906         negative indices.
7907         (build_vtbl_initializer): Only use vcall thunks where necessary.
7908         Mark thunks as needing to be emitted with their vtables, or not.
7909         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7910         indices.  Use size_binop.
7911         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7912         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
7913         size_binop.
7914         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7915         (build_vtable_entry): Mark thunks as needing to be emitted with
7916         their vtables, or not.
7917         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7918         * decl2.c (mark_vtable_entries): Use use_thunk instead of
7919         emit_thunk.
7920         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
7921         information.
7922         * error.c (dump_expr): Use BV_FN.
7923         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7924         not an int.
7925         * method.c (make_thunk): Likewise.
7926         (emit_thunk): Rename to use_thunk.  Allow callers to decide
7927         whether or not to actually emit the thunk.  Adjust for changes in
7928         representation of vcall offsets.
7929         * search.c (dfs_get_pure_virtuals): Use BV_FN.
7930         * semantics.c (emit_associated_thunks): New function.
7931         (expand_body): Use it.
7932         * ir.texi: Adjust decriptions of thunks.
7933
7934 2000-06-22  Jason Merrill  <jason@redhat.com>
7935
7936         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
7937         (tsubst_friend_function): Copy it here.
7938
7939         * decl.c (grok_op_properties): Fix typo.
7940
7941         * decl2.c (delete_sanity): Clarify warning, avoid failure on
7942         deleting void*.
7943
7944         * pt.c (check_explicit_specialization): Clarify error.
7945
7946         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
7947         an old OVERLOAD when we're declaring a non-function.
7948         (pushdecl, destroy_local_var): Check for error_mark_node.
7949         (warn_extern_redeclared_static): Also bail early if
7950         we're a CONST_DECL.
7951         (push_overloaded_decl): Ignore an old error_mark_node.
7952
7953 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
7954
7955         * call.c (build_x_va_arg): Check if in a template decl.
7956         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
7957
7958 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
7959
7960         * class.c (push_lang_context): TYPE_NAME gets you to the Java
7961         types DECLs.
7962         * decl.c (check_goto): Computed gotos assumed OK.
7963
7964 2000-06-20  Jason Merrill  <jason@redhat.com>
7965
7966         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
7967         for which we don't need to look for instantiations.
7968
7969 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
7970
7971         * parse.y (program): Always call finish_translation_unit.
7972         * parse.c, parse.h: Rebuilt.
7973
7974 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
7975
7976         * method.c: Don't include hard-reg-set.h.
7977
7978 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7979
7980         * rtti.c (get_base_offset): Cope when vbase field is in a base.
7981
7982 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
7983
7984         * call.c (build_conditional_expr): Use VOID_TYPE_P.
7985         * cvt.c (cp_convert_to_pointer): Likewise.
7986         (convert_to_void): Likewise.
7987         * error.c (dump_expr): Likewise.
7988         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
7989         * init.c (build_delete): Likewise.
7990         * method.c (emit_thunk): Likewise.
7991         * optmize.c (declare_return_variable): Likewise.
7992         * rtti.c (get_tinfo_decl_dynamic): Likewise.
7993         (get_typeid): Likewise.
7994         (build_dynamic_cast_1): Likewise.
7995         * typeck.c (composite_pointer_type): Likewise.
7996         (common_type): Likewise.
7997         (build_indirect_ref): Likewise.
7998         (build_binary_op): Likewise.
7999         (build_x_compound_expr): Likewise.
8000         (check_return_expr): Likewise.
8001         * typeck2.c (add_exception_specifier): Likewise.
8002
8003         * mangle.c (write_method_parms): Use direct comparison for end
8004         of parmlist.
8005
8006 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
8007
8008         * cp-tree.h (genrtl_try_block): Declare function.
8009         (genrtl_handler): Likewise.
8010         (genrtl_catch_block): Likewise.
8011         (genrtl_ctor_stmt): Likewise.
8012         (genrtl_subobject): Likewise.
8013         (genrtl_decl_cleanup): Likewise.
8014         (genrtl_do_poplevel): Likewise.
8015         (genrtl_do_pushlevel): Likewise.
8016         (genrtl_clear_out_block): Likewise.
8017         (genrtl_goto_stmt): Likewise.
8018         (genrtl_expr_stmt): Likewise.
8019         (genrtl_decl_stmt): Likewise.
8020         (genrtl_if_stmt): Likewise.
8021         (genrtl_while_stmt): Likewise.
8022         (genrtl_do_stmt): Likewise.
8023         (genrtl_return_stmt): Likewise.
8024         (genrtl_for_stmt): Likewise.
8025         (genrtl_break_stmt): Likewise.
8026         (genrtl_continue_stmt): Likewise.
8027         (genrtl_scope_stmt): Likewise.
8028         (genrtl_switch_stmt): Likewise.
8029         (genrtl_case_label): Likewise.
8030         (genrtl_begin_compound_stmt): Likewise.
8031         (genrtl_finish_compound_stmt): Likewise.
8032         (genrtl_compound_stmt): Likewise.
8033         (genrtl_asm_stmt): Likewise.
8034         (genrtl_named_return_value): Likewise.
8035         (genrtl_begin_stmt_expr): Likewise.
8036         (genrtl_finish_stmt_expr): Likewise.
8037         (finish_for_stmt): Removed first argument.
8038         (finish_switch_stmt): Likewise.
8039
8040         * semantics.c (genrtl_try_block): Define function.
8041         (genrtl_handler): Likewise.
8042         (genrtl_catch_block): Likewise.
8043         (genrtl_ctor_stmt): Likewise.
8044         (genrtl_subobject): Likewise.
8045         (genrtl_decl_cleanup): Likewise.
8046         (genrtl_do_poplevel): Likewise.
8047         (genrtl_do_pushlevel): Likewise.
8048         (genrtl_clear_out_block): Likewise.
8049         (genrtl_goto_stmt): Likewise.
8050         (genrtl_expr_stmt): Likewise.
8051         (genrtl_decl_stmt): Likewise.
8052         (genrtl_if_stmt): Likewise.
8053         (genrtl_while_stmt): Likewise.
8054         (genrtl_do_stmt): Likewise.
8055         (genrtl_return_stmt): Likewise.
8056         (genrtl_for_stmt): Likewise.
8057         (genrtl_break_stmt): Likewise.
8058         (genrtl_continue_stmt): Likewise.
8059         (genrtl_scope_stmt): Likewise.
8060         (genrtl_switch_stmt): Likewise.
8061         (genrtl_case_label): Likewise.
8062         (genrtl_begin_compound_stmt): Likewise.
8063         (genrtl_finish_compound_stmt): Likewise.
8064         (genrtl_compound_stmt): Likewise.
8065         (genrtl_asm_stmt): Likewise.
8066         (genrtl_named_return_value): Likewise.
8067         (genrtl_begin_stmt_expr): Likewise.
8068         (genrtl_finish_stmt_expr): Likewise.
8069         (finish_for_stmt): Removed first argument and generate rtl
8070         specific code.
8071         (finish_switch_stmt): Likewise.
8072         (do_poplevel): Removed generate rtl specific code.
8073         (do_pushlevel): Likewise.
8074         (add_tree): Likewise.
8075         (finish_goto_stmt): Likewise.
8076         (finish_expr_stmt): Likewise.
8077         (begin_if_stmt): Likewise.
8078         (finish_if_stmt_cond): Likewise.
8079         (finish_then_clause): Likewise.
8080         (begin_else_clause): Likewise.
8081         (finish_else_clause): Likewise.
8082         (finish_if_stmt): Likewise.
8083         (clear_out_block): Likewise.
8084         (begin_while_stmt): Likewise.
8085         (finish_while_stmt_cond): Likewise.
8086         (finish_while_stmt): Likewise.
8087         (begin_do_stmt): Likewise.
8088         (finish_do_body): Likewise.
8089         (finish_do_stmt): Likewise.
8090         (finish_return_stmt): Likewise.
8091         (begin_for_stmt): Likewise.
8092         (finish_for_init_stmt): Likewise.
8093         (finish_for_cond): Likewise.
8094         (finish_for_expr): Likewise.
8095         (finish_break_stmt): Likewise.
8096         (finish_continue_stmt): Likewise.
8097         (begin_switch_stmt): Likewise.
8098         (finish_switch_cond): Likewise.
8099         (finish_case_label): Likewise.
8100         (begin_try_block): Likewise.
8101         (begin_function_try_block): Likewise.
8102         (finish_try_block): Likewise.
8103         (finish_cleanup_try_block): Likewise.
8104         (finish_cleanup): Likewise.
8105         (finish_function_try_block): Likewise.
8106         (finish_handler_sequence): Likewise.
8107         (finish_function_handler_sequence): Likewise.
8108         (begin_handler): Likewise.
8109         (finish_handler_parms): Likewise.
8110         (begin_catch_block): Likewise.
8111         (finish_handler): Likewise.
8112         (begin_compound_stmt): Likewise.
8113         (finish_compound_stmt): Likewise.
8114         (finish_asm_stmt): Likewise.
8115         (finish_label_stmt): Likewise.
8116         (finish_label_decl): Likewise.
8117         (finish_subobject): Likewise.
8118         (finish_decl_cleanup): Likewise.
8119         (finish_named_return_value): Likewise.
8120         (begin_stmt_expr): Likewise.
8121         (finish_stmt_expr): Likewise.
8122
8123         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
8124         to call genrtl_expr_stmt when appropriate.
8125
8126         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
8127         begin_compound_expr to call genrtl_begin_stmt_expr and
8128         genrtl_begin_compound_expr when appropriate.
8129         (finish_init_stmts): Changed calls to finish_compound_expr and
8130         finish_stmt_expr to call genrtl_finish_compound_expr and
8131         genrtl_finish_stmt_expr when appropriate.
8132         (expand_default_init): Changed call to finish_expr_stmt to call
8133         genrtl_expr_stmt when appropriate.
8134         (build_vec_init): Likewise.
8135
8136         * parse.y (simple_stmt): Removed first argument from call to
8137         finish_for_stmt. Removed first argument from call to
8138         finish_switch_stmt.
8139
8140         * parse.c: Regenerated.
8141
8142         * pt.c (tsubst_expr): Removed first argument from call to
8143         finish_for_stmt. Removed first argument from call to
8144         finish_switch_stmt.
8145
8146 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
8147
8148         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
8149         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
8150
8151         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
8152         (cplus_tree_code_length[]): Likewise.
8153         (cplus_tree_code_name[]): Likewise.
8154         (init_parse): Added call to add_c_tree_codes. Changed
8155         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
8156
8157 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
8158
8159         * cp-tree.h (finish_mem_initializers): Declare.
8160         (count_trees): Likewise.
8161         * parse.y (base_init): Use finish_mem_initializers.
8162         * semantics.c (finish_mem_initializers): New function.
8163
8164         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
8165         the number of trees.
8166         (n_trees): Remove.
8167         (count_trees): Don't use it.
8168
8169 2000-06-15  Jason Merrill  <jason@redhat.com>
8170
8171         * tree.c (count_trees): New debugging function.
8172
8173         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
8174         * init.c (build_member_call): Pull out the name of a DECL.
8175
8176         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
8177         * semantics.c (expand_body): Push to TV_INTEGRATION here.
8178         * optimize.c (optimize_function): Not here.
8179         * pt.c (instantiate_decl): Push to TV_PARSE.
8180
8181 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
8182
8183         * cp-tree.h (struct language_function): Remove x_base_init_list
8184         and x_member_init_list.
8185         (current_base_init_list): Remove.
8186         (current_member_init_list): Likewise.
8187         (setup_vtbl_ptr): Change prototype.
8188         (emit_base_init): Likewise.
8189         (expand_member_init): Likewise.
8190         (reinit_parse_for_function): Remove.
8191         * decl.c (save_function_data): Don't clear x_base_init_list and
8192         x_member_init_list.
8193         (mark_language_function): Don't mark them.
8194         * init.c (perform_member_init): Tweak comment.
8195         (sort_member_init): Take the list of initializers as an argument.
8196         (sort_base_init): Likewise.
8197         (emit_base_init): Likewise.
8198         (expand_member_init): Return the initializer.  Don't use global
8199         variables.
8200         * lex.c (reinit_parse_for_function): Remove.
8201         * method.c (build_template_parm_names): Correct substitution.
8202         (do_build_copy_constructor): Don't use current_member_init_list
8203         and current_base_init_list.
8204         (synthesize_method): Likewise.
8205         * parse.y (base_init): Split mem-initializers into
8206         base-initializers and field-initializers.
8207         (member_init_list): Build up the list here.
8208         (member_init): Return the initializer.
8209         (fn.depfn): Don't use reinit_parse_for_function.
8210         * parse.c: Regenerated.
8211         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
8212         ERROR_MARK.
8213         (tsubst_expr): Don't use current_member_init_list
8214         and current_base_init_list.
8215         (tsubst_expr_values): Rename to ...
8216         (tsubst_initializer_list): ... this.  Use convert_from_reference.
8217         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
8218         and current_base_init_list.
8219         (begin_function_definition): Don't call reinit_parse_for_function.
8220
8221         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
8222
8223         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
8224         correctly.
8225
8226         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
8227
8228 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
8229
8230         * cp-tree.h (IF_COND): Move to c-common.h.
8231         (THEN_CLAUSE): Likewise.
8232         (ELSE_CLAUSE): Likewise.
8233         (WHILE_COND): Likewise.
8234         (WHILE_BODY): Likewise.
8235         (DO_COND): Likewise.
8236         (DO_BODY): Likewise.
8237         (RETURN_EXPR): Likewise.
8238         (EXPR_STMT_EXPR): Likewise.
8239         (FOR_INIT_STMT): Likewise.
8240         (FOR_COND): Likewise.
8241         (FOR_EXPR): Likewise.
8242         (FOR_BODY): Likewise.
8243         (SWITCH_COND): Likewise.
8244         (SWITCH_BODY): Likewise.
8245         (CASE_LOW): Likewise.
8246         (CASE_HIGH): Likewise.
8247         (GOTO_DESTINATION): Likewise.
8248         (COMPOUND_BODY): Likewise.
8249         (ASM_CV_QUAL): Likewise.
8250         (ASM_STRING): Likewise.
8251         (ASM_OUTPUTS): Likewise.
8252         (ASM_INPUTS): Likewise.
8253         (ASM_CLOBBERS): Likewise.
8254         (DECL_STMT_DECL): Likewise.
8255         (STMT_EXPR_STMT): Likewise.
8256         (LABEL_STMT_LABEL): Likewise.
8257         (SCOPE_BEGIN_P): Likewise.
8258         (SCOPE_END_P): Likewise.
8259         (SCOPE_STMT_BLOCK): Likewise.
8260         (SCOPE_NULLIFIED_P): Likewise.
8261         (SCOPE_NO_CLEANUPS_P): Likewise.
8262         (SCOPE_PARTIAL_P): Likewise.
8263         (ASM_VOLATILE_P): Likewise.
8264         (STMT_LINENO): Likewise.
8265         (STMT_LINENO_FOR_FN_P): Likewise.
8266
8267         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
8268         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
8269         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
8270         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
8271         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
8272
8273         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
8274
8275         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
8276         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
8277
8278         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
8279         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
8280         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
8281
8282 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
8283
8284         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
8285         * class.c (dfs_find_final_overrider): Set it appropriately.
8286         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
8287         avoid unneeded secondary vptrs.
8288
8289 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
8290
8291         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
8292         (check_bitfield_decl, check_field_decl): Likewise.
8293         (build_vtbl_or_vbase_field, build_base_field): Likewise.
8294         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
8295         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
8296         (xfer_tag, finish_enum): Likewise.
8297         * decl2.c (finish_builtin_type): Likewise.
8298         * init.c (init_init_processing): Likewise.
8299         * pt.c (instantiate_class_template): Likewise.
8300         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
8301         * cp-tree.h (struct lang_type): Add user_align member.
8302         (CLASSTYPE_USER_ALIGN): Define.
8303
8304 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
8305
8306         * Make-lang.in (c++.install-common): Install g++-cross in
8307         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
8308         $(target_alias)-g++ and $(target_alias)-c++.
8309
8310 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
8311
8312         * class.c (vcall_offset_data_s): Add last_init and fns.
8313         (overrides): Rename to same_signature_p.
8314         (dfs_find_final_overrider): Adjust accordingly.
8315         (mark_overriders): Likewise.
8316         (warn_hidden): Likewise.
8317         (build_vtbl_initializer): Reorganize machinery for building things
8318         at negative offsets.
8319         (build_vcall_and_vbase_vtbl_entries): Likewise.
8320         (build_vbase_offset_vtbl_entries): Likewise.
8321         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8322         offset entries.  Do not create two entries for functions with the
8323         same signature.
8324         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8325         (build_rtti_vtbl_entries): Reorganize machinery for building things
8326         at negative offsets.
8327
8328         * optimize.c (expand_call_inline): Don't recurse into the code
8329         used to initialize the parameters more than once.
8330
8331 2000-06-11  Mark Mitchell <mark@codesourcery.com>
8332
8333         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8334         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8335         (find_substitution): Only use the `Sa' substitution for
8336         std::allocator, not instantiations of it.
8337         (write_template_prefix): Move comment.  Only use a TREE_LIST to
8338         represent substitutions for a member template.
8339         (write_array_type): Mangle array dimensions correctly.
8340         * optimize.c (maybe_clone_body): Copy more information from the
8341         cloned function.
8342         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8343         on the regenerated declaration.
8344
8345 2000-06-11  Chip Salzenberg  <chip@valinux.com>
8346             Mark Mitchell <mark@codesourcery.com>
8347
8348         * class.c (build_vtable): Clarify comment.
8349         (build_ctor_vtbl_group): Pass the most derived type to
8350         build_vtable.
8351
8352 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8353
8354         * decl2.c (compare_options): Don't needlessly cast away const-ness.
8355
8356 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
8357
8358         * decl.c (add_binding): Handle duplicate declarations of external
8359         variables.
8360
8361 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8362             Mark Mitchell <mark@codesourcery.com>
8363
8364         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
8365         argument.
8366         (write_signed_number): New macro.
8367         (write_unsigned_number): Likewise.
8368         (write_source_name): Use them.
8369         (write_number): Handle signed and unsigned values.
8370         (write_integer_cst): Use tree_int_cst_sgn, and use
8371         write_unsigned_number or write_signed_number as appropriate.
8372         (write_discriminator): Use write_unsigned_number or
8373         write_signed_number as appropriate.
8374         (write_template_arg_literal): Likewise.
8375         (write_array_type): Use tree_low_cst.
8376         (write_template_parm):  Use write_unsigned_number or
8377         write_signed_number as appropriate.
8378         (write_substitution): Adjust call to write_number.
8379         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8380         (write_expression): Handle non-type template arguments of
8381         reference type correctly.
8382         (mangle_thunk): Use write_signed_number.
8383
8384 2000-06-09  Chip Salzenberg  <chip@valinux.com>
8385
8386         * mangle.c (find_substition): Don't mangle objects with typename
8387         substitutions (e.g. "cin" as "Si").
8388
8389 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
8390
8391         * call.c (add_candidate): Use ggc_alloc_cleared.
8392         * decl.c (lookup_label): Likewise.
8393         * lex.c (retrofit_lang_decl): Likewise.
8394
8395 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
8396
8397         * semantics.c (expand_body): Push to TV_EXPAND.
8398         * optimize.c (optimize_function): Push to TV_INTEGRATION.
8399         * decl.c (start_function): Always call announce_function.
8400
8401         * tinfo2.cc: Just declare abort.
8402
8403 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
8404
8405         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8406         whenever @ is a symbolic name.
8407
8408 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
8409
8410         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8411
8412 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
8413
8414         * decl.c (pushdecl): Look up functions by DECL_NAME, not
8415         DECL_ASSEMBLER_NAME.
8416
8417 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8418
8419         * decl2.c (c_language): Define.
8420
8421 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
8422
8423         * lex.c (lang_init_options): Tweak.
8424
8425         * decl2.c: Remove #inclusion of diagnostic.h
8426         (lang_decode_option): Move diagnostic formatting options to
8427         toplevel.
8428
8429         * lang-options.h: Remove documentation for diagnostic options.
8430
8431         * Makefile.in (lex.o): Depends upon diagnostic.h
8432
8433 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
8434
8435         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8436         the same DECL_RESULT, it's not a redefinition.
8437         * pt.c (tsubst_decl): Remove code to handle illegal
8438         specializations.
8439
8440 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
8441
8442         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8443
8444 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
8445
8446         * search.c (maybe_suppress_debug_info): Don't check
8447         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8448
8449         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8450         here if extern_p.
8451
8452         Remember instantiation context in deferred instantiations.
8453         * cp-tree.h (struct tinst_level): Remove.
8454         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8455         * pt.c (current_tinst_level): Now a tree.
8456         (print_template_context, push_tinst_level, pop_tinst_level,
8457         tinst_for_decl): Adjust.
8458         (reopen_tinst_level): New fn.
8459         (init_pt): Register current_tinst_level as a root.
8460         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8461         of the pending templates list.
8462         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
8463         * lex.c (extract_interface_info): Adjust.
8464         * decl2.c (warn_if_unknown_interface): Adjust.
8465
8466 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
8467
8468         * class.c (indirect_primary_base_p): New function.
8469         (determine_primary_base): Use it.
8470
8471 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
8472
8473         Update new-abi dynamic cast algorithm.
8474         * tinfo.cc (__class_type_info::__dyncast_result): Add
8475         whole_details. Adjust constructor.
8476         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8477         Avoid unnecessary searching.
8478         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8479
8480 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8481
8482         * decl.c (init_decl_processing): Don't call record_component_aliases.
8483         * tree.c (build_cplus_array_type_1): Likewise.
8484
8485 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
8486
8487         * ir.texi: Correct typo.
8488         * mangle.c (write_expression): Handle non-type template arguments
8489         with reference type.
8490         * method.c (build_overload_value): Likewise.
8491         * pt.c (convert_nontype_argument): Explicitly represent conversion
8492         to a reference with an ADDR_EXPR.
8493         (unify): Always unify arguments in left-to-right order.
8494
8495 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
8496             Mark Mitchell  <mark@codesourcery.com>
8497
8498         * Make-lang.in (CXX_SRCS): Add mangle.c.
8499         * Makefile.in (CXX_OBJS): Add mangle.o.
8500         (mangle.o): New rule.
8501
8502         * class.c (local_classes): New variable.
8503         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8504         (get_vtt_name): Use mangle_vtt_name for new ABI.
8505         (init_class_processing): Initialize local_classes.
8506         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8507         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8508         (std_identifier): New macro.
8509         (DECL_VOLATILE_MEMFUNC_P): New macro.
8510         (DECL_NAMESPACE_STD_P): Likewise.
8511         (local_classes): Declare.
8512         (get_mostly_instantiated_function_type): Declare.
8513         (init_mangle): Declare.
8514         (mangle_decl): Likewise.
8515         (mangle_type_string): Likewise.
8516         (mangle_type): Likewise.
8517         (mangle_typeinfo_for_type): Likewise.
8518         (mangle_typeinfo_string_for_type): Likewise.
8519         (mangle_vtbl_for_type): Likewise.
8520         (mangle_vtt_for_type): Likewise.
8521         (mangle_ctor_vtbl_for_type): Likewise.
8522         (mangle_thunk): Likewise.
8523         (mangle_conv_op_name_for_type): Likewise.
8524         (mangle_guard_variable): Likewise.
8525         * decl.c (pushtag): Keep track of local classes.
8526         (initialize_predefined_identifiers): Initialize std_identifier.
8527         (init_decl_processing): Use std_identifier.
8528         (start_decl): Don't treat instantiations as specializations.
8529         (grokdeclarator): Likewise.
8530         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
8531         name for fully-instantiated templates.
8532         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8533         destructors with the new ABI.
8534         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8535         (grokfield): Use mangle_type for new ABI.
8536         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8537         (get_sentry): Use mangle_guard_variable for new ABI.
8538         (start_static_initialization_or_destruction): Likewise.
8539         * expr.c (extract_aggr_init): Remove.
8540         (extract_scalar_init): Likewise.
8541         (extract_init): Remove #if 0'd code.
8542         * mangle.c: New function.
8543         * method.c (build_mangled_name): Assert not flag_new_abi.
8544         (build_static_name): Likewise.
8545         (build_decl_overload_real): Likewise.
8546         (build_typename_overload): Likewise.
8547         (build_overload_with_type): Likewise.
8548         (build_overload_name): Likewise.
8549         (get_ctor_vtbl_name): Likewise.
8550         (start_squangling): Likewise.
8551         (get_id_2): Likewise.
8552         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8553         (init_method): Call init_mangle for new ABI.
8554         (make_thunk): Call mangle_thunk for new ABI.
8555         * operators.def: Correct new ABI manglings for the `%' operator.
8556         Add `::' operator.
8557         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8558         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8559         (lookup_template_class): Call mangle_decl for new ABI.
8560         (get_mostly_instantiated_function_type): New function.
8561         (set_mangled_name_for_template_decl): Use it.
8562         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8563         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
8564         conversion op names.
8565         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8566         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8567         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
8568         mangle_typeinfo_string_for_type.
8569
8570 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
8571
8572         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8573         (INNERMOST_TEMPLATE_ARGS): New macro.
8574         (innermost_args): Remove.
8575         (get_innermost_template_args): New function.
8576         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8577         * error.c (dump_function_decl): Be caution when using
8578         most_general_template.
8579         * method.c (build_template_parm_names):  Use
8580         INNERMOST_TEMPLATE_ARGS.
8581         * pt.c (add_to_template_args): Tidy comment
8582         (get_innermost_template_args): New function.
8583         (check_explicit_specialization): Clear DECL_INITIAL for a new
8584         specialization.
8585         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8586         Tidy.
8587         (push_template_decl): Always register specializations of the most
8588         general template.
8589         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8590         (coerce_template_parms): Likewise.
8591         (lookup_template_class): Likewise.
8592         (innermost_args): Remove.
8593         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8594         (tsubst_decl): Handle tricky specializations.  Use
8595         get_innermost_template_args.
8596         (instantiate_template): Simplify handling of partial
8597         instantiations.
8598         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8599         (most_general_template): Reimplement, in a more straightforward
8600         manner.
8601         (regenerate_decl_from_template): Tweak formatting.  Use
8602         TMPL_ARGS_DEPTH for clarity.
8603         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8604
8605         * dump.c (dequeue_and_dump): Dump information about thunks.
8606
8607 2000-06-01  Richard Henderson  <rth@cygnus.com>
8608
8609         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8610
8611 2000-06-01  Richard Henderson  <rth@cygnus.com>
8612
8613         * decl2.c (unsupported_options): Fix typo, make const.
8614         (lang_decode_option): Fix bsearch argument order.
8615
8616 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
8617
8618         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8619         on FIELD_DECLs.
8620
8621 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8622
8623         * cp-tree.h (c_get_alias_set): Deleted.
8624         * Makefile.in (decl.o): Include ../expr.h.
8625         * decl.c (expr.h): Include.
8626         (init_decl_processing): Call record_component_aliases for arrays.
8627         (grokdeclarator): Likewise.
8628         Set TREE_ADDRESSABLE for fields that aren't bitfields.
8629         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8630
8631 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
8632
8633         Remove guiding declaration support.
8634         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8635         (flag_guiding_decls): Remove.
8636         * call.c (build_user_type_conversion_1): Remove support for
8637         guiding decls.
8638         (build_new_function_call): Likewise.
8639         (build_new_op): Likewise.
8640         (build_new_method_call): Likewise.
8641         * decl.c (start_function): Likewise.
8642         * friend.c (is_friend): Likewise.
8643         (do_friend): Likewise.
8644         * decl2.c ((flag_dump_translation_unit): Make it const.
8645         (flag_guiding_decls): Remove.
8646         (unsupported_options): New variable
8647         (compare_options): New function.
8648         (lang_decode_option): Use them.
8649
8650         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8651
8652         * method.c (mangle_expression): Adjust test for legal expression
8653         operators.
8654
8655         * pt.c (instantiate_decl): Save and restore the local
8656         specializations list.
8657
8658 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
8659
8660         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8661
8662 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
8663
8664         * call.c (add_template_candidate_real): Handle member template
8665         constructors for classes with virtual bases.
8666         (build_user_type_conversion_1): Use in_charge_arg_for_name.
8667         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8668
8669         * ir.texi: Update thunk documentation.
8670
8671         * call.c (joust): Fix handling of overloaded builtin operators.
8672
8673 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
8674
8675         * cp-tree.h (DECL_ANTICIPATED): New macro.
8676         Document new use of DECL_LANG_FLAG_7.
8677         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8678         in the user namespace.
8679         * lex.c (do_identifier): If the identifier's declaration has
8680         DECL_ANTICIPATED on, it has not yet been declared.  But do not
8681         replace it with an ordinary implicit declaration.
8682
8683         * tinfo2.cc: Include stdlib.h.
8684
8685 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
8686
8687         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8688         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8689         CLASSTYPE_ALIGN.
8690
8691 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
8692
8693         * decl2.c (lang_decode_option): Use skip_leading_substring instead
8694         of plain strncmp.
8695
8696 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
8697
8698         * operators.def (<?): Duplicated, should have been...
8699         (>?): this.  Fixed.
8700
8701 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
8702             Mark Mitchell  <mark@codesourcery.com>
8703
8704         * cp-tree.h (ansi_opname): Make it a macro.
8705         (ansi_assopname): Likewise.
8706         (struct lang_decl_flags): Add assignment_operator_p.
8707         (struct lang_decl): Add operator_code.
8708         (DECL_VTT_PARM): Adjust.
8709         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8710         overloaded operator.
8711         (SET_OVERLOADED_OPERATOR_CODE): New macro.
8712         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8713         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8714         (opname_tab): Remove.
8715         (assignop_tab): Likewise.
8716         (operator_name_info_t): New type.
8717         (operator_name_info): New variable.
8718         (assignment_operator_name_info): Likewise.
8719         (build_cp_library_fn): Remove declaration.
8720         (push_cp_library_fn): Likewise.
8721         (operator_name_string): Likewise.
8722         (build_decl_overload): Likewise.
8723         * call.c (print_z_candidates): Simplify.
8724         (build_object_call): Adjust usage of ansi_opname.  Use
8725         DECL_OVERLOADED_OPERATOR_P.
8726         (op_error): Adjust operator name lookup.
8727         (build_conditional_expr): Adjust usage of ansi_opname.
8728         (build_new_op): Likewise.
8729         (build_op_delete_call): Likewise.
8730         (build_over_call): Likewise.
8731         (joust): Use DECL_OVERLOADED_OPERATOR_P.
8732         * decl.c (duplicate_decls): Copy operator_code.
8733         (init_decl_processing): Adjust parameters to push_cp_library_fn.
8734         (builtin_function): Adjust parameters to build_library_fn_1.
8735         (build_library_fn_1): Accept an overloaded operator code.
8736         (build_library_fn): Pass ERROR_MARK.
8737         (build_cp_library_fn): Accept an overloaded operator code.
8738         (push_cp_library_fn): Likewise.
8739         (grokfndecl): Tweak.
8740         (grokdeclarator): Simplify code to compute names of overloaded
8741         operators.  Adjust use of ansi_opname.
8742         (ambi_op_p): Work on tree_codes, not identifiers.
8743         (unary_op_p): Likewise.
8744         (grok_op_properties): Likewise.
8745         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8746         (lang_mark_tree): Don't try to mark the operator_code.
8747         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8748         * error.c (dump_decl): Remove special handling for operator
8749         names.
8750         (dump_function_name): Likewise.
8751         (dump_expr): Adjust name lookup of operators.
8752         (op_to_string): Simplify.
8753         (assop_to_string): Likewise.
8754         * init.c (build_new_1): Adjust use of ansi_opname.
8755         * lex.c (opname_tab): Remove.
8756         (assignop_tab): Likewise.
8757         (ansi_opname): Likewise.
8758         (ansi_assopname): Likewise.
8759         (operator_name_string): Likewise.
8760         (reinit_lang_specific): Likewise.
8761         (operator_name_info): New variable.
8762         (assignment_operator_name_info): Likewise.
8763         (init_operators): New function.
8764         (init_parse): Use it.
8765         (do_identifier): Adjust use of ansi_opname.
8766         * method.c (mangle_expression): Don't use ansi_opname for
8767         mangling.
8768         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8769         (build_decl_overload): Remove.
8770         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8771         (do_build_assign_ref): Adjust use of ansi_opname.
8772         (synthesize_method): Likewise.
8773         (implicitly_declare_fn): Likewise.
8774         * operators.def: New file.
8775         * parse.y (operator): Adjust use of ansi_opname.
8776         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8777         (set_mangled_name_for_template_decl): Don't play games with
8778         current_namespace.
8779         (special_function_p): Adjust use of ansi_opname.
8780         * typeck.c (check_return_expr): Likewise.
8781         * Make-lang.in (cc1plus): Depend on operators.def.
8782         * Makefile.in (lex.o): Likewise.
8783         (decl.o): Likewise.
8784
8785 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
8786
8787         * Make-lang.in (cplib2.ready): Eradicate.
8788
8789 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
8790
8791         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8792         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8793         (built_min, cp_tree_equal): Likewise.
8794
8795 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8796
8797         * class.c (layout_nonempty_base_or_field): Replace
8798         `record_layout_info' with `record_layout_info_s'.
8799
8800 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
8801
8802         Fix goto checking.
8803         * cp-tree.h (struct language_function): x_named_labels is now
8804         a struct named_label_list*.
8805         * decl.c (struct named_label_use_list): Renamed from...
8806         (struct named_label_list): ...this.  New struct.
8807         (push_binding_level): Don't set eh_region.
8808         (note_level_for_eh): New fn.
8809         (pop_label): Take label and old value directly.
8810         (pop_labels): Adjust for new named_labels format.
8811         (lookup_label): Likewise.
8812         (poplevel): Note characteristics of a binding level containing a
8813         named label.  Mess with named label lists earlier.
8814         (mark_named_label_lists): New fn.
8815         (mark_lang_function): Call it.
8816         (use_label): New fn, split out from...
8817         (make_label_decl): ...here.  Don't call it.
8818         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8819         check_previous_gotos): New fns, split out from...
8820         (define_label): ...here.
8821         (check_switch_goto): New fn.
8822         (define_case_label): Call it.
8823         (check_goto): New fn.
8824         * semantics.c (finish_goto_stmt): Call it and use_label.
8825         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8826         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8827
8828 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
8829
8830         * class.c (build_vtable_entry_ref): Correct usage of
8831         get_vtbl_decl_for_binfo.
8832
8833         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8834         * method.c (implicitly_declare_fn): Not here.
8835
8836 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
8837
8838         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8839         (CPTI_PTMD_DESC_TYPE): ... here.
8840         (ptmd_desc_type_node): Rename to ...
8841         (ptm_desc_type_node): ... here.
8842         * decl.c: Likewise.
8843         * rtti.c (ptmd_initializer): Rename to ...
8844         (ptm_initializer): ... here.
8845         (sythesize_tinfo_var): Adjust. Deal with pointer to member
8846         function.
8847         (create_tinfo_types): Adjust.
8848
8849 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
8850
8851         Finish implementation of VTTs.
8852         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8853         CPTI_VTT_PARM_IDENTIFIER.
8854         (vtt_parm_identifier): New macro.
8855         (vtt_parm_type): Likewise.
8856         (BINFO_SUBVTT_INDEX): Likewise.
8857         (BINFO_VPTR_INDEX): Likewise.
8858         (struct lang_decl): Add vtt_parm.
8859         (DECL_VTT_PARM): New macro.
8860         (DECL_USE_VTT_PARM): Likewise.
8861         (DECL_NEEDS_VTT_PARM_P): Likewise.
8862         (get_vtt_name): Declare.
8863         (build_artificial_parm): Likewise.
8864         (fixup_all_virtual_upcast_offsets): Likewise.
8865         (expand_indirect_vtbls_init): Remove.
8866         * call.c (build_new_method_call): Pass the vtt to subobject
8867         constructors and destructors.
8868         * class.c (get_vtt_name): Give it external linkage.
8869         (build_clone): Handle the magic VTT parameters for clones.
8870         (clone_function_decl): Fix typo in comment.
8871         (build_vtt): Keep track of the indices in the VTTs where various
8872         entities are stored.
8873         (build_vtt_inits): Likewise.
8874         (dfs_build_vtt_inits): Likewise.
8875         (build_ctor_vtbl_group): Tweak type of construction vtables.
8876         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8877         primary bases, when building construction vtables.
8878         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8879         (initialize_predefined_identifiers): Add vtt_parm_identifier.
8880         (init_decl_processing): Initialize vtt_parm_type.
8881         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8882         (lang_mark_tree): Make vtt_parm.
8883         * decl2.c (build_artificial_parm): New function.
8884         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
8885         (grokclassfn): Use build_artificial_parm.
8886         * init.c (initialize_vtbl_ptrs): Call
8887         fixup_all_virtual_upcast_offsets directly.
8888         (perform_member_init): Use the complete subobject destructor for
8889         member cleanups.
8890         (build_vtbl_address): New function.
8891         (expand_virtual_init): Handle VTTs.
8892         * optimize (maybe_clone_body): Likewise.
8893         * search.c (fixup_all_virtual_upcast_offsets): Give it external
8894         linkage.
8895         (expand_indirect_vtbls_init): Remove.
8896         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8897         * tree.c (make_binfo): Make them bigger.
8898
8899 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8900
8901         * inc/cxxabi.h (__pbase_type_info): Define, based on
8902         __pointer_type_info.
8903         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8904         (__pointer_to_member_type_info): Likewise.
8905         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8906         (__pointer_to_member_type_info::__is_pointer_p): Remove.
8907         (__pointer_type_info::__do_catch): Rename to ...
8908         (__pbase_type_info::__do_catch): ... here. Adjust.
8909         (__pbase_type_info::__pointer_catch): Implement.
8910         (__pointer_type_info::__pointer_catch): Adjust.
8911         (__pointer_to_member_type_info::__pointer_catch): Adjust.
8912
8913 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
8914
8915         * tinfo.h (__user_type_info::contained_virtual_p): New
8916         predicate.
8917         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8918         shaped hierarchy.
8919         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8920         diamond shaped hierarchy. Add early out for mixed diamond and
8921         duplicate shaped hierarchy.
8922
8923 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
8924
8925         * cp-tree.h (build_delete): Change prototype.
8926         (build_vec_delete): Likewise.
8927         * call.c (build_scoped_method_call): Use special_function_kind
8928         values to indicate the kind of destruction to be done.
8929         (build_method_call): Likewise.
8930         * decl.c (finish_destructor_body): Likewise.
8931         (maybe_build_cleanup_1): Likewise.  Rename to ...
8932         (maybe_build_cleanup): ... this.
8933         * decl2.c (delete_sanity): Use special_function_kind
8934         values to indicate the kind of destruction to be done.
8935         (build_cleanup): Likewise.
8936         * init.c (perform_member_init): Likewise.
8937         (build_vec_delete_1): Likewise.
8938         (build_dtor_call): Simplify.
8939         (build_delete): Use special_function_kind
8940         values to indicate the kind of destruction to be done.
8941         (build_vbase_delete): Likewise.
8942         (build_vec_delete): Likewise.
8943
8944         * init.c (sort_member_init): Fix typo in error message generation
8945         code.
8946
8947 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
8948
8949         * semantics.c (begin_class_definition): make the packed
8950         attribute be sensitive to the "-fpack-struct" command line flag
8951
8952 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
8953
8954         Update new-abi upcast algorithm.
8955         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
8956         prototype and meaning of return value.
8957         (__si_class_type_info::__do_upcast): Likewise.
8958         (__vmi_class_type_info::__do_upcast): Likewise.
8959         * tinfo.cc (__class_type_info::__upcast_result): Replace
8960         whole2dst with part2dst. Adjust ctor.
8961         (__class_type_info::__do_upcast): Adjust call of worker function.
8962         (__class_type_info::__do_upcast): Adjust.
8963         (__si_class_type_info::__do_upcast): Adjust. Use parent's
8964         __do_upcast.
8965         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
8966         virtual base in diamond hierarchy bug.
8967
8968 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
8969
8970         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
8971         and bitfield to tinfo_fn_p.
8972         (DECL_TINFO_FN_P): Adjust.
8973         (SET_DECL_TINFO_FN_P): Likewise.
8974         (DECL_MUTABLE_P): Likewise.
8975         (DECL_C_BIT_FIELD): Likewise.
8976         (SET_DECL_C_BIT_FIELD): Likewise.
8977         (CLEAR_DECL_C_BIT_FIELD): Likewise.
8978         (DECL_UNINLINABLE): Likewise.
8979         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
8980         (handle_using_decl): Remove assertion.
8981         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
8982         to build FIELD_DECLs.
8983         (build_base_field): Likewise.
8984         (layout_class_type): Likewise.
8985         * decl.c (init_decl_processing): Likewise.
8986         (build_ptrmemfunc_type): Likewise.
8987         (grokdeclarator): Likewise.
8988         * decl2.c (grok_x_components): Likewise.
8989         * except.c (call_eh_info): Likewise.
8990         * init.c (init_init_processing): Likewise.
8991         * rtti.c (expand_class_desc): Likewise.
8992         (create_pseudo_type_info): Likewise.
8993         (get_vmi_pseudo_type_info): Likewise.
8994         (create_tinfo_types): Likewise.
8995         * ptree.c (print_lang_decl): Adjust.
8996         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
8997         before checking DECL_MUTABLE_P.
8998
8999         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
9000         parameters for template functions.
9001         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
9002         destructors as well as constructors.
9003
9004 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
9005
9006         * class.c (build_ctor_vtbl_group): Set inits.
9007         * optimize.c (maybe_clone_body): Set DECL_INLINE and
9008         DECL_THIS_INLINE appropriately for clones.
9009
9010         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
9011         (DECL_CONV_FN_P): Simplify.
9012         (DECL_OPERATOR): Remove.
9013         (language_to_string): Declare.
9014         * decl.c (duplicate_decls): Fix typo in comment.
9015         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
9016         (grok_op_properties): Use DECL_CONV_FN_P instead of
9017         IDENTIFIER_TYPENAME_P.
9018         * dump.c (dequeue_and_dump): Dump the language linkage of
9019         declarations.
9020         * error.c (language_to_string): Give it external linkage.
9021         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
9022         (implicitly_declare_fn): Set DECL_LANGUAGE.
9023         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
9024         IDENTIFIER_TYPENAME_P.
9025         (tsubst_decl): Likewise.
9026         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
9027         * semantics.c (finish_member_declaration): Don't mark members of
9028         classes declared in an extern "C" region as extern "C".
9029
9030 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9031
9032         * decl2.c (qualified_lookup_using_namespace): Look through
9033         namespace aliases.
9034
9035         * decl.c (push_using_decl): Return the old decl on namespace level.
9036
9037 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
9038
9039         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
9040         (VTT_NAME_PREFIX): New macro.
9041         (CTOR_VTBL_NAME_PREFIX): Likewise.
9042         (get_ctor_vtbl_name): New function.
9043         * class.c (get_vtable_name): Simplify.
9044         (get_vtt_name): New function.
9045         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
9046         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
9047         when a virtual base becomes primary.
9048         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
9049         VTTs.
9050         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
9051         additional parameters.
9052         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
9053         (initialize_array): New function.
9054         (build_vtt): Likewise.
9055         (build_vtt_inits): Likewise.
9056         (dfs_build_vtt_inits): Likewise.
9057         (dfs_fixup_binfo_vtbls): Likewise.
9058         (build_ctor_vtbl_group): Likewise.
9059         (initialize_vtable): Use initialize_array.
9060         (accumulate_vtbl_inits): Reimplement to handle construction
9061         vtables.
9062         (dfs_accumulate_vtbl_inits): Likewise.
9063         (bulid_vtbl_initializer): Adjust parameter name.
9064         * method.c (build_typename_overload): Remove #if 0'd code.
9065         (get_ctor_vtbl_name): New function.
9066         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
9067         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
9068
9069         * cp-tree.h (struct lang_type): Remove search_slot.
9070         (CLASSTYPE_SEARCH_SLOT): Remove.
9071         (emit_base_init): Change prototype.
9072         (initialize_vtbl_ptrs): Likewise.
9073         (expand_indirect_vtbls_init): Likewise.
9074         (clear_search_slots): Remove.
9075         * decl.c (lang_mark_tree): Don't mark search_slot.
9076         * init.c (initialize_vtbl_ptrs): Simplify.
9077         (emit_base_init): Likewise.
9078         * search.c (struct vbase_info): Document decl_ptr.
9079         (convert_pointer_to_single_level): Remove.
9080         (dfs_find_vbases): Remove.
9081         (dfs_init_base_pointers): Simplify.
9082         (dfs_clear_vbase_slots): Remove.
9083         (dfs_vtable_path_unmark): New function.
9084         (init_vbase_pointers): Simplify.
9085         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
9086         (expand_indirect_vtbls_init): Simplify.  Don't call
9087         mark_all_temps_used.
9088         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
9089         initialize_vtbl_ptrs.
9090
9091 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
9092
9093         * except.c: Add static prototypes.
9094
9095 2000-05-20  H.J. Lu  <hjl@gnu.org>
9096
9097         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
9098
9099 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
9100
9101         Don't create a separate copy of virtual bases for the
9102         CLASSTYPE_VBASECLASSES list.
9103         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
9104         (BINFO_FOR_VBASE): Remove.
9105         (CANONICAL_BINFO): Adjust.
9106         (binfo_for_vbase): New function.
9107         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
9108         instead of BINFO_FOR_VBASE.
9109         (build_vbase_pointer): Likewise.
9110         (build_secondary_vtable): Likewise.
9111         (dfs_mark_primary_bases): Likewise.
9112         (mark_primary_bases): Likewise.
9113         (layout_nonempty_base_or_field): Likewise.
9114         (dfs_set_offset_for_shared_vbases): Likewise.
9115         (dfs_set_offset_for_unshared_vbases): Likewise.
9116         (layout_virtual_bases): Likewise.  Adjust for changes to the
9117         CLASSTYPE_VBASECLASSES list.
9118         (dump_class_hierarchy_r): Use binfo_for_vbase
9119         instead of BINFO_FOR_VBASE.
9120         (dump_class_hierarchy): Likewise.
9121         (finish_vtbls): Likewise.
9122         (build_vtbl_initializer): Adjust for changes to the
9123         CLASSTYPE_VBASECLASSES list.
9124         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
9125         * decl.c (finish_destructor_body): Adjust for changes to the
9126         CLASSTYPE_VBASECLASSES list.
9127         * init.c (sort_base_init): Use binfo_for_vbase.
9128         (construct_virtual_bases): Adjust for changes to the
9129         CLASSTYPE_VBASECLASSES list.
9130         (expand_member_init): Use binfo_for_vbase.
9131         (build_vbase_delete):  Adjust for changes to the
9132         CLASSTYPE_VBASECLASSES list.
9133         * method.c (do_build_copy_constructor): Likewise.
9134         * rtti.c (get_base_offset): Use binfo_for_vbase.
9135         (expand_class_desc): Remove #if 0'd code.
9136         * search.c (struct vbase_info): Remove vbase_types.
9137         (get_base_distance):  Use binfo_for_vbase.
9138         (lookup_field_queue_p): Use CANONICAL_BINFO.
9139         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
9140         (get_pure_virtuals): Adjust for changes to the
9141         CLASSTYPE_VBASECLASSES list.
9142         (dfs_find_vbases): Use binfo_for_vbase.
9143         (dfs_init_vbase_pointers): Likewise.
9144         (init_vbase_pointers): Don't initialize vi.vbase_types.
9145         (virtual_context): Use binfo_for_vbase.
9146         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
9147         CLASSTYPE_VBASECLASSES list.
9148         (expand_indirect_vtbls_init): Simplify.
9149         (dfs_get_vbase_types): Don't replicate virtual bases.
9150         (find_vbase_instance): Use binfo_for_vbase.
9151         (binfo_for_vbase): New function.
9152         * typeck.c (get_delta_difference): Use binfo_for_vbase.
9153
9154 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
9155
9156         * decl2.c (finish_anon_union): Generalize error messages to handle
9157         anonymous structures.
9158         * init.c (perform_member_init): Remove `name' parameter.
9159         (build_field_list): New function.
9160         (sort_member_init): Handle anonymous union initialization order
9161         correctly.  Check for multiple initializations of the same union.
9162         (emit_base_init): Don't look up fields by name here.
9163         (expand_member_init): Record the result of name lookup for future
9164         reference.
9165         * typeck.c (build_component_ref): Fix formatting.
9166
9167 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
9168
9169         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
9170         * typeck.c (build_x_compound_expr): Replace warn_unused with
9171         warn_unused_value.
9172
9173         * decl2.c (lang_decode_option): Update -Wall unused flags by
9174         calling set_Wunused.
9175
9176 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
9177
9178         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
9179         * init.c (dfs_vtable_path_unmark): Remove.
9180         * search.c (marked_new_vtable_p): Likewise.
9181         (unmarked_new_vtable_p): Likewise.
9182         (dfs_search_slot_nonempty_p): Likewise.
9183         (dfs_mark): Likewise.
9184         (dfs_vtable_path_unmark): Likewise.
9185         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
9186         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
9187         (dfs_init_vbase_pointers): Remove special-case new ABI code.
9188         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
9189         (init_vbase_pointers): Simplify.
9190         (expand_indirect_vtbls_init): Likewise.
9191
9192         * class.c (copy_virtuals): New function.
9193         (build_primary_table): Use it.
9194         (build_secondary_vtable): Likewise.
9195         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
9196         indicate that no vcall offset is required.
9197         (add_virtual_function): Likewise.
9198         (modify_all_vtables): Likewise.
9199         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9200         (dfs_accumulate_vtbl_inits): Likewise.
9201         (build_vtbl_initializer): Make changes to handle construction
9202         vtables.
9203         (dfs_build_vcall_offset_vtbl_entries): Likewise.
9204         (build_rtti_vtbl_entries): Likewise.
9205         (build_vtable_entries): Handle a NULL vcall_index.
9206
9207 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
9208
9209         * decl2.c (lang_decode_option): Fix thinko.
9210
9211 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
9212
9213         * except.c (check_handlers): New fn.
9214         * cp-tree.h: Declare it.
9215         * semantics.c (finish_handler_sequence): Call it.
9216         (finish_function_handler_sequence): Likewise.
9217         (finish_handler_parms): Set TREE_TYPE on the handler.
9218         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
9219         * search.c (get_base_distance_recursive): If protect>1, ignore
9220         special access.
9221         (get_base_distance): Don't reduce watch_access.
9222
9223 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
9224
9225         * lex.c: #include diagnostic.h.
9226         (lang_init_options): Set default prefixing rules.
9227
9228         * lang-options.h: Add -fdiagnostics-show-location=.
9229
9230         * decl2.c: #include diagnostic.h.
9231         (lang_decode_option): Handle -fdiagnostics-show-location=.
9232
9233 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
9234
9235         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
9236         * vec.cc: Revert my 2000-05-07 change.
9237
9238 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
9239
9240         * class.c (check_field_decls): Complain about non-static data
9241         members with same name as class in class with constructor.
9242
9243 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
9244
9245         * decl.c (grokdeclarator): Allow non-static data members with
9246         same name as class.
9247
9248 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
9249
9250         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
9251         and pending_inline.filename.  Update prototypes.
9252         * decl.c (define_label): Constify filename parameter.
9253         * decl2.c (warn_if_unknown_interface): Constify local char *.
9254         * input.c Constify input_source.filename. Don't declare
9255         input_filename or lineno.  Constify filename parameter to feed_input.
9256         * lex.c (init_parse): Constify parameter and return value.
9257         (cp_pragma_interface, cp_pragma_implementation): Constify
9258         filename argument.
9259         (reinit_parse_for_method, reinit_parse_for_block,
9260         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
9261         Constify local char *.
9262         * pt.c: Don't declare lineno or input_filename.
9263         (print_template_context, tsubst_friend_function, tsubst_decl,
9264         tsubst, instantiate_decl): Constify local char *.
9265         * semantics.c (expand_body): Constify local char *.
9266         * tree.c (build_srcloc): Constify filename parameter.
9267         * typeck.c (c_expand_asm_operands): Constify filename
9268         parameter.
9269
9270 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
9271
9272         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
9273         offsetof expansion.
9274
9275 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
9276
9277         * inc/cxxabi.h:  Fix typos in comment.
9278         (__base_class_info::__offset): Use a static_cast.
9279
9280 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
9281
9282         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
9283         of std::size_t and std::ptrdiff_t respectively.
9284         * tinfo.cc: Likewise.
9285         * vec.cc: Likewise.
9286
9287 2000-05-06  Richard Henderson  <rth@cygnus.com>
9288
9289         * typeck.c (build_c_cast): Don't warn integer->pointer size
9290         mismatch for constants.
9291
9292 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
9293
9294         * rtti.c (ptmd_initializer): Set non-public, if class is
9295         incomplete.
9296
9297         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
9298         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9299         __cxa_vec_delete): Likewise.
9300         * tinfo.cc (__dynamic_cast): Likewise.
9301         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9302         __cxa_vec_delete): Likewise.
9303
9304 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9305
9306         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
9307         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
9308         (lang_decl_flags): Add vcall_offset.
9309         (THUNK_VCALL_OFFSET): Use it.
9310         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
9311         * method.c (make_thunk): Create the lang_decl here, not in
9312         emit_thunk.
9313         (emit_thunk): Make generic thunks into ordinary functions once
9314         they have been fed to expand_body.
9315         * semantics.c (expand_body): Set current_function_is_thunk here.
9316
9317 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9318
9319         * class.c (update_vtable_entry_for_fn): Prototype.
9320
9321         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9322         and `tmpl'.
9323
9324         * search.c (dfs_build_inheritance_graph_order): Prototype.
9325
9326 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
9327
9328         * cp-tree.h (special_function_kind): Add various kinds of
9329         destructors.
9330         (special_function_p): New function.
9331         * class.c (overrides): Don't let one kind of destructor override
9332         another.
9333         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9334         whether or not to instantiate a template.
9335         * tree.c (special_function_p): Define.
9336
9337 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
9338
9339         * cp-tree.def (THUNK_DECL): Remove.
9340         * cp-tree.h (DECL_THUNK_P): New macro.
9341         (DECL_NON_THUNK_FUNCTION_P): Likewise.
9342         (DECL_EXTERN_C_FUNCTION_P): Likewise.
9343         (SET_DECL_THUNK_P): Likewise.
9344         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9345         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9346         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9347         * decl.c (decls_match): Use DECL_EXTERN_C_P.
9348         (duplicate_decls): Likewise.
9349         (pushdecl): Likewise.  Adjust thunk handling.
9350         (grokfndecl): Use DECL_EXTERN_C_P.
9351         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9352         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9353         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9354         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
9355         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
9356         DECL_NO_STATIC_CHAIN.
9357         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
9358         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
9359         * search.c (covariant_return_p): Remove THUNK_DECL handling.
9360         * ir.texi: Update.
9361
9362 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9363
9364         * tree.c (walk_tree): Set lineno.
9365
9366 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9367
9368         * exception.cc: Update license notice.
9369         * new.cc: Likewise.
9370         * new1.cc: Likewise.
9371         * new2.cc: Likewise.
9372         * tinfo.cc: Likewise.
9373         * tinfo2.cc: Likewise.
9374         * vec.cc: Likewise.
9375         * inc/cxxabi.h: Likewise.
9376         * inc/exception: Likewise.
9377         * inc/new: Likewise.
9378         * inc/new.h: Likewise.
9379         * inc/typeinfo: Likewise.
9380
9381 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
9382
9383         * tree.c (build_target_expr_with_type): If we already have a
9384         TARGET_EXPR, just return it.
9385
9386         * optimize.c (initialize_inlined_parameters): Don't generate an
9387         EXPR_STMT if we can just use DECL_INITIAL.
9388         * decl.c (emit_local_var): Only make the initialization a
9389         full-expression if stmts_are_full_exprs_p.
9390
9391 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
9392
9393         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9394         macro.
9395         * call.c (standard_conversion): Use it.
9396         (direct_reference_binding): Likewise.
9397         (build_over_call): Likewise.
9398         (is_properly_derived_from): Likewise.
9399         (compare_ics): Likewise.
9400         * class.c (resolves_to_fixed_type_p): Likewise.
9401         * optimize.c (declare_return_variable): Likewise.
9402         * pt.c (is_specialization_of): Likewise.
9403         (unify): Likewise.
9404         * typeck.c (comp_target_parms): Likeiwse.
9405         (build_static_cast): Likewise.
9406         (build_reinterpret_cast): Likewise.
9407         (build_const_cast): Likewise.
9408         (comp_ptr_ttypes_real): Likewise.
9409         (comp_ptr_ttypes_const): Likewise.
9410         * typeck2.c (process_init_constructor): Likewise.
9411
9412 2000-04-30  Scott Snyder <snyder@fnal.gov>
9413
9414         * decl.c (finish_destructor_body): Use the base destructor when
9415         destroying virtual bases.
9416
9417 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
9418
9419         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9420         STMT_EXPRs.
9421         * optimize.c (struct inline_data): Add target_exprs field.
9422         (declare_return_variable): When a function returns an aggregate,
9423         use the variable declared in the TARGET_EXPR as the remapped
9424         DECL_RESULT.
9425         (expand_call_inline): Update the pending target_exprs stack.
9426         (optimize_function): Initialize the stack.
9427
9428         * decl2.c (finish_file): Fix typo in comment.
9429
9430         * method.c (emit_thunk): Don't try to return a `void' value.
9431
9432         * optimize.c (initialize_inlined_parameters): If the parameter is
9433         addressable, we need to make a new VAR_DECL, even if the
9434         initializer is constant.
9435
9436 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
9437
9438         * decl.c (grok_op_properties): Add an extra check of argtypes.
9439
9440 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
9441
9442         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9443         variables.
9444         (initialize_inlined_parameters): Try to avoid creating new
9445         VAR_DECLs.
9446
9447 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
9448
9449         * lex.c (my_get_run_time): Remove.
9450         (init_filename_times): Use get_run_time instead of my_get_run_time.
9451         (check_newline): Likewise.
9452         (dump_time_statistics): Likewise.
9453         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9454         of computing elapsed time explicitly.
9455
9456 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
9457
9458         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9459         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9460         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9461         before calling decl_constant_value.
9462         * class.c (check_bitfield_decl): Likewise.
9463         * cvt.c (ocp_convert): Likewise.
9464         (convert): Likewise.
9465         * decl.c (compute_array_index_type): Likewise.
9466         (build_enumerator): Likewise.
9467         * decl2.c (check_cp_case_value): Likewise.
9468         * pt.c (convert_nontype_argument): Likewise.
9469         (tsubst): Likewise.
9470         * typeck.c (decay_conversion): Likewise.
9471         (build_compound_expr): Likewise.
9472         (build_reinterpret_cast): Likewise.
9473         (build_c_cast): Likewise.
9474         (convert_for_assignment): Likewise.
9475
9476 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
9477
9478         * decl.c (finish_function): Don't play games with DECL_INLINE.
9479
9480 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
9481
9482         * ir.texi: Correct typo.
9483
9484 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9485
9486         * decl.c (grokdeclarator): Reject VLAs as members.
9487
9488 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
9489
9490         * call.c (standard_conversion): Accept conversion between
9491         COMPLEX_TYPEs.
9492
9493         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9494
9495 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
9496
9497         * decl2.c (finish_file): Remove double setup for accounting
9498         compile time.
9499
9500 2000-04-24  Robert Lipe <robertlipe@usa.net>
9501
9502         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9503
9504 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
9505
9506         * new.cc (set_new_handler): Needs to be in std::.
9507
9508 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
9509
9510         * cp-tree.h (lang_decl): Remove pretty_function_p.
9511         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9512         language-specific node.
9513         * decl.c (cp_make_fname_decl): Use build_decl, not
9514         build_lang_decl, to build the variables.
9515         (grokvardecl): Don't call build_lang_decl for local variables in
9516         templates.
9517         (grokdeclarator): Don't call build_lang_decl for local type
9518         declarations in templates.
9519         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9520         zero'd memory, rather than calling memset.
9521         * pt.c: Include hashtab.h.
9522         (local_specializations): New variable.
9523         (retrieve_local_specialization): Use it.
9524         (register_local_specialization): Likewise.
9525         (tsubst_decl): Don't assume local variables have
9526         DECL_LANG_SPECIFIC.
9527         (instantiate_decl): Set up local_specializations.
9528         * Makefile.in (HTAB_H): New variable.
9529
9530 2000-04-23  Richard Henderson  <rth@cygnus.com>
9531
9532         * typeck.c (c_expand_asm_operands): Restore the original
9533         contents of the output list.
9534
9535 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
9536
9537         * ir.texi:  Document complex number representation.
9538
9539 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
9540
9541         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9542         (target_incomplete_p): New function.
9543         (tinfo_base_init): Create comdat NTBS name variable.
9544         (ptr_initializer): Add non_public parameter. Calculate it.
9545         (ptmd_initializer): Likewise.
9546         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9547         (create_real_tinfo_var): Add non_public parameter. Use it.
9548         Push proxy into global namespace.
9549         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9550         New enumeration.
9551         * inc/typeinfo (type_info::before, type_info::operator==):
9552         Compare __name addresses.
9553
9554         * tinfo2.cc: Remove new-abi builtins comment.
9555
9556 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
9557
9558         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9559
9560         * call.c (joust): Exit early if we get the same function, too.
9561
9562         * decl2.c (key_method): Return NULL_TREE for template classes.
9563         (import_export_class): Don't need to check for template classes.
9564
9565 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
9566
9567         * lex.c: Remove references to cccp.c.
9568
9569 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
9570
9571         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9572         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
9573         (DECL_DESTRUCTOR_P): Use destructor_attr.
9574         (DECL_CONST_MEMFUNC_P): Reimplement.
9575         (DECL_VOLATILE_MEMFUNC_P): Remove.
9576         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9577         (overrides): Use DECL_DESTRUCTOR_P.
9578         (check_for_override): Likewise.
9579         * decl.c (start_function): Likewise.
9580         * decl2.c (grokfclassfn): Likewise.
9581         (check_classfn): Likewise.
9582         (grok_function_init): Likewise.
9583
9584 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
9585
9586         * decl2.c (grokfield): Issue error on illegal data member
9587         declaration.
9588
9589 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
9590
9591         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9592
9593 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
9594
9595         * class.c (build_vtable_entry): Don't build thunks for type-info
9596         functions.
9597
9598 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
9599
9600         * decl.c (decls_match): Allow a redeclaration of a builtin to
9601         specify args while the builtin did not.
9602
9603 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
9604
9605         * cp-tree.def (THUNK_DECL): Add to documentation.
9606         * cp-tree.h (flag_huge_objects): Declare.
9607         * class.c (modify_vtable_entry): Tidy.
9608         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9609         Calculate delta appropriately for the new ABI.
9610         (dfs_modify_vtables): Use it.
9611         (modify_all_vtables): Fix thinko in code to add overriding copies
9612         of functions to primary vtables.
9613         (build_clone): Fix typo in comment.
9614         (clone_function_decl): Correct order of destructors in vtable.
9615         (build_vbase_offset_vtbl_entries): Adjust comment.
9616         (dfs_vcall_offset_queue_p): Remove.
9617         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9618         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9619         (build_vtable_entry): Correct check for pure virtual functions.
9620         Don't declare flag_huge_objects.
9621         * decl.c (flag_huge_objects): Remove declaration.
9622         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9623         Use int_size_in_bytes.
9624         (emit_thunk): Handle vcall offset thunks.
9625
9626 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9627
9628         * decl2.c (parse_time, varconst_time): Delete declarations.
9629         (finish_file): Delete LINENO declaration.
9630         START_TIME and THIS_TIME now long.
9631
9632 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
9633
9634         * class.c (build_base_field): Reformat comment.
9635
9636         * inc/cxxabi.h (stddef.h): Comment inclusion.
9637         (__base_class_info::__offset): Comment shift.
9638
9639 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
9640
9641         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9642         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9643         (cp_push_exception_identifier): New macro.
9644         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9645         (DECL_BASE_DESTRUCTOR_P): Likewise.
9646         (DECL_DELETING_DESTRUCTOR_P): Likewise.
9647         (get_vtbl_decl_for_binfo): Fix formatting.
9648         (in_charge_arg_for_name): New macro.
9649         (maybe_build_cleanup_and_delete): Remove declaration.
9650         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9651         (in_charge_arg_for_name): New function.
9652         (build_new_method_call): Use it.  Handle cloned destructors.
9653         (build_clone): Don't make the base constructor virtual.
9654         Automatically defer generated functions.
9655         (clone_function_decl): Handle destructors, too.
9656         (clone_constructors_and_destructors): Likewise.
9657         (create_vtable_ptr): Don't create a vtable entry for a cloned
9658         function.
9659         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9660         (initialize_predefined_identifiers): Update appropriately.
9661         (finish_destructor_body): Simplify.
9662         (maybe_build_cleanup_and_delete): Remove.
9663         * except.c (expand_throw): Handle new-ABI destructors.
9664         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9665         (build_dtor_call): New function.
9666         (build_delete): Use it.  Simplify.
9667         * optimize.c (maybe_clone_body): Handle destructors.
9668         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9669
9670         * exception.cc (cleanup_fn): New typedef.
9671         (CALL_CLEANUP): New macro.
9672         (cp_eh_info): Use them.
9673         (__cp_push_exception): Likewise.
9674         (__cp_pop_exception): Likewise.
9675
9676 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
9677
9678         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9679         (complete_dtor_identifier): New macro.
9680         (CLASSTYPE_FIRST_CONVERSION): Remove.
9681         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9682         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9683         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9684         (CLASSTYPE_CONSTRUCTORS): Likewise.
9685         (CLASSTYPE_DESTRUCTORS): Likewise.
9686         (lang_decl): Add cloned_function.
9687         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9688         (DECL_BASE_CONSTRUCTOR_P): Likewise.
9689         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9690         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9691         (DECL_CLONED_FUNCTION_P): Likewise.
9692         (DECL_CLONED_FUNCTION): Likewise.
9693         (clone_function_decl): Declare.
9694         (maybe_clone_body): Likewise.
9695         * call.c (build_user_type_conversion_1): Call complete object
9696         constructors in the new ABI.
9697         (build_new_method_call): Don't add in-charge parameters under the
9698         new ABI.
9699         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9700         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9701         CLASSTYPE_DESTRUCTOR_SLOT.
9702         (build_clone): New function.
9703         (clone_function_decl): Likewise.
9704         (clone_constructors_and_destructors): Likewise.
9705         (check_bases_and_members): Use it.
9706         * decl.c (iniitialize_predefined_identifiers): Initialize
9707         complete_dtor_identifier.
9708         (finish_function): Don't add extra code to a clone.
9709         (lang_mark_tree): Mark cloned_function.
9710         * decl2.c (mark_used): Don't bother trying to instantiate things
9711         we synthesized.
9712         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9713         * method.c (set_mangled_name_for_decl): Don't treat clones as
9714         constructors.
9715         (synthesize_method): Sythesize cloned functions, not the clones.
9716         * optimize.c (inline_data): Update comment on ret_label.
9717         (remap_block): Don't assume DECL_INITIAL exists.
9718         (copy_body_r): Allow ret_label to be NULL.
9719         (maybe_clone_body): Define.
9720         * pt.c (tsubst_decl): Handle clones.
9721         (instantiate_clone): New function.
9722         (instantiate_template): Use it.
9723         (set_mangled_name_for_template_decl): Don't treat clones as
9724         constructors.
9725         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9726         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9727         * semantics.c (expand_body): Clone function bodies as necessary.
9728
9729         * optimize.c (remap_decl): Avoid sharing structure for arrays
9730         whose size is only known at run-time.
9731         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9732
9733         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9734         to has_in_charge_parm_p.
9735         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9736         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9737         (DECL_COPY_CONSTRUCTOR_P): New macro.
9738         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9739         (build_user_type_conversion_1): Likewise.
9740         (convert_like_real): Likewise.
9741         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
9742         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9743         (copy_args_p): Likewise.
9744         (grok_ctor_properties): Likewise.
9745         (start_function): Likewise.
9746         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
9747         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9748         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9749         * method.c (do_build_copy_constructor): Use
9750         DECL_HAS_IN_CHARGE_PARM_P.
9751         (synthesize_method): Likewise.
9752         * pt.c (instantiate_template): Remove goto.
9753         * tree.c (build_cplus_method_type): Remove mention of obstacks in
9754         comment.
9755
9756         * cp-tre.h (finish_function): Change prototype.
9757         * decl.c (end_cleanup_fn): Adjust caller.
9758         (finish_function): Take only one parameter.
9759         * decl2.c (finish_objects): Adjust caller.
9760         (finish_static_storage_duration_function): Likewise.
9761         * method.c (emit_thunk): Likewise.
9762         * parse.y: Likewise.
9763         * parse.c: Regenerated.
9764         * pt.c (instantiate_decl): Likewise.
9765         * rtti.c (synthesize_tinfo_fn): Likewise.
9766         * semantics.c (expand_body): Likewise.
9767
9768         * cp-tree.h (copy_decl): New function.
9769         * class.c (finish_struct_1): Use it.
9770         * lex.c (copy_decl): Define it.
9771         * pt.c (tsubst_decl): Likewise.
9772         * tree.c (copy_template_template_parm): Likewise.
9773
9774         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9775         has_nonpublic_assign_ref.
9776         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9777         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9778         * class.c (finish_struct_methods): Don't set
9779         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9780         (interface_only): Don't declare.
9781         (interface_unknown): Likewise.
9782
9783 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9784
9785         * tree.h (HAVE_TEMPLATES): Remove definition.
9786         * lang-options.h (-fthis-is-variable): Remove documentation.
9787
9788 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
9789
9790         * class.c (instantiate_type): Handle object-relative template-id.
9791
9792         * semantics.c (finish_expr_stmt): Call convert_to_void here.
9793         * decl.c (cplus_expand_expr_stmt): Not here.
9794
9795         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9796         Initialize exprtype earlier.
9797
9798         * parse.y (fn.def1): Check for defining types in return types.
9799
9800         * decl.c (check_tag_decl): Notice extra fundamental types.
9801         Diagnose empty decls in classes, too.
9802
9803         * decl.c (grokdeclarator): Don't override an anonymous name if no
9804         declarator was given.
9805
9806         * cvt.c (convert_to_void): Call resolve_offset_ref.
9807
9808         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9809
9810         * decl2.c (decl_namespace): Handle getting a type.
9811
9812         * typeck.c (build_c_cast): Re-enable warning for cast between
9813         pointer and integer of different size.
9814
9815 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
9816
9817         * inc/cxxabi.h (__pointer_type_info): Add restrict and
9818         incomplete flags.
9819         (__pointer_type_info::__pointer_catch): New virtual function.
9820         (__pointer_to_member_type_info): Derive from
9821         __pointer_type_info. Adjust.
9822         (__pointer_to_member_type_info::__do_catch): Remove.
9823         (__pointer_to_member_type_info::__is_pointer_p): Declare.
9824         (__pointer_to_member_type_info::__pointer_catch): Declare.
9825         * rtti.c (qualifier_flags): Add restrict flag.
9826         (ptmd_initializer): Reorder members.
9827         (create_tinfo_types): Expand comments. Reorder
9828         ptmd_desc_type_node members.
9829         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9830         Implement.
9831         (__pointer_type_info::__do_catch): Move specific code into
9832         __pointer_catch. Call it.
9833         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9834         specific catch checking. Fix void conversion check.
9835         (__pointer_to_member_type_info::__do_catch): Remove.
9836         (__pointer_to_member_type_info::__pointer_catch): Implement.
9837
9838 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9839
9840         * lex.c (init_parse): Remove traces of classof and headof.
9841         * decl2.c (flag_operator_names): Default to 1.
9842         (lang_decode_option): Do not set it for -ansi.
9843
9844 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
9845
9846         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9847         (DECL_MAIN_VARIANT): Remove.
9848         * decl.c (duplicate_decls): Don't set it.
9849         (start_function): Likewise.
9850         (lang_mark_tree): Don't mark it.
9851         * decl2.c (defer_fn): Don't use it.
9852         * lex.c (retrofit_lang_decl): Don't set it.
9853         * pt.c (tsubst_decl): Likewise.
9854         * ptree.c (print_lang_decl): Don't print it.
9855         * typeck.c (mark_addressable): Don't use it.
9856
9857 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9858
9859         * vec.cc: Include <new> and <exception>.
9860         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9861         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9862         terminate.
9863         (__cxa_vec_delete): Catch dtor exceptions.
9864
9865 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
9866
9867         Prepend __ to implementation defined names.
9868         * inc/typeinfo (type_info): Rename _name to __name.
9869         (type_info::type_info): Rename parameter.
9870         (type_info::operator==, type_info::operator!=,
9871         type_info::before): Likewise.
9872         (type_info::is_pointer_p, type_info::is_function_p,
9873         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9874         parameters.
9875         * inc/cxxabi.h
9876         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9877         (__pointer_type_info::__pointer_type_info): Likewise.
9878         (__pointer_type_info::is_pointer_p,
9879         __pointer_type_info::do_catch): Prepend __. Rename parameters.
9880         (__array_type_info::__array_type_info): Rename parameters.
9881         (__function_type_info::__function_type_info): Likewise.
9882         (__function_type_info::is_function_p): Prepend __.
9883         (__enum_type_info::__enum_type_info): Rename parameters.
9884         (__pointer_to_member_type_info::__pointer_to_member_type_info):
9885         Likewise.
9886         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9887         parameters.
9888         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9889         (__class_type_info::__class_type_info): Rename parameters.
9890         (__class_type_info::sub_kind): Prepend __. Adjust member names.
9891         (__class_type_info::upcast_result,
9892         __class_type_info::dyncast_result): Prepend __. Move definition
9893         into tinfo.cc.
9894         (__class_type_info::do_upcast, __class_type_info::do_catch,
9895         __class_type_info::find_public_src,
9896         __class_type_info::do_dyncast,
9897         __class_type_info::do_find_public_src): Prepend __. Rename
9898         parameters.
9899         (__si_class_type_info::__si_class_type_info): Rename parameters.
9900         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9901         __si_class_type_info::do_find_public_src): Prepent __. Rename
9902         parameters.
9903         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9904         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9905         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9906         parameters.
9907         (__dynamic_cast): Rename parameters.
9908         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9909         type_info::do_catch, type_info::do_upcast): Prepend __.
9910         (contained_p, public_p, virtual_p, contained_public_p,
9911         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9912         (__class_type_info::do_catch,
9913         __class_type_info::do_upcast): Prepend __. Adjust.
9914         (__class_type_info::__upcast_result,
9915         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9916         Adjust.
9917         (__class_type_info::find_public_src): Prepend __. Adjust.
9918         (__class_type_info::do_find_public_src,
9919         __si_class_type_info::do_find_public_src,
9920         __vmi_class_type_info::do_find_public_src): Likewise.
9921         (__class_type_info::do_dyncast,
9922         __si_class_type_info::do_dyncast,
9923         __vmi_class_type_info::do_dyncast): Likewise.
9924         (__class_type_info::do_upcast,
9925         __si_class_type_info::do_upcast,
9926         __vmi_class_type_info::do_upcast): Likewise.
9927         (__dynamic_cast): Adjust.
9928         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
9929         (__function_type_info::is_function_p): Likewise.
9930         (__pointer_type_info::do_catch): Likewise. Adjust.
9931         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
9932         (__throw_type_match_rtti_2): Adjust.
9933         (__is_pointer): Adjust.
9934
9935 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
9936
9937         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
9938         (complete_ctor_identifier): New macro.
9939         (special_function_kind): Add sfk_copy_constructor and
9940         sfk_assignment_operator.
9941         (LOOKUP_HAS_IN_CHARGE): Remove.
9942         (cons_up_default_function): Rename to ...
9943         (implicitly_declare_fn): ... this.
9944         * call.c (build_new_method_call): Add in-charge parameters for
9945         constructors here.
9946         * class.c (add_implicitly_declared_members): Change parameter name
9947         from cant_have_assignment to cant_have_const_assignment.
9948         Replace calls to cons_up_default_function to implicitly_declare_fn.
9949         * cvt.c (ocp_convert): Use complete_ctor_identifier.
9950         * decl.c (initialize_predefined_identifiers): Initialize it.
9951         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
9952         complex expression.
9953         * init.c (expand_default_init): Don't calculate the in-charge
9954         parameter here.
9955         (build_new_1): Likewise.
9956         * lex.c (cons_up_default_function): Move to method.c.
9957         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
9958         (implicitly_declare_fn): New function.
9959         * typeck.c (build_static_cast): Use complete_ctor_identifier.
9960         (build_modify_expr): Likewise.
9961         * typeck2.c (build_functional_cast): Likewise.
9962
9963         Under the new ABI, constructors don't return `this'.
9964         * cp-tree.h (warn_reorder): Declare.
9965         (special_function_kind): New enum.
9966         (global_base_init_list): Remove declaration.
9967         (emit_base_init): Don't return a value.
9968         (check_base_init): Don't declare.
9969         (is_aggr_typedef): Likewise.
9970         * decl.c (check_special_function_return_type): New function.
9971         (return_types): Remove.
9972         (grokdeclarator): Use check_special_function_return_type.
9973         (start_function): Don't initialize ctor_label under the new ABI.
9974         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
9975         * init.c (begin_init_stmts): Move to top of file.
9976         (finish_init_stmts): Likewise.
9977         (warn_reorder): Don't declare.
9978         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
9979         value.
9980         (check_base_init): Remove.
9981         (is_aggr_typedef): Likewise.
9982         (build_new_1): Don't use the return value of a constructor.
9983         * semantics.c (setup_vtbl_ptr): Don't use the return value
9984         of emit_base_init.
9985         * typeck.c (check_return_expr): Don't magically convert return
9986         statements into `return this' in constructors under the new ABI.
9987
9988         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
9989         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
9990         (base_ctor_identifier): New macro.
9991         (base_dtor_identifier): Likewise.
9992         (deleting_dtor_identifier): Likewise.
9993         * decl.c: Don't include obstack.h.
9994         (obstack_chunk_alloc): Don't define.
9995         (obstack_chunk_free): Likewise.
9996         (struct predefined_identifier): New type.
9997         (initialize_predefined_identifiers): New function.
9998         (init_decl_processing): Use it.
9999         (debug_temp_inits): Remove.
10000         (start_method): Don't call preserve_data.
10001         (hack_incomplete_structures): Update comment.
10002         * init.c (init_init_processing): Don't initialize
10003         nelts_identifier.
10004         (build_offset_rf): Remove dead code.
10005         (build_delete): Use CLASSTYPE_N_BASECLASSES.
10006         * search.c (init_search_processing): Don't initialize
10007         vptr_identifier.
10008
10009 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10010
10011         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
10012         some sign_compare warnings.
10013
10014 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10015
10016         Rename abi::__vmi_class_type_info members.
10017         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
10018         base_list, detail_masks members to vmi_flags, vmi_base_count,
10019         vmi_bases and vmi_flags_masks respectively.
10020         (__vmi_class_type_info::vmi_flags_masks): Rename
10021         details_unknown_mask to flags_unknown_mask.
10022         * tinfo.cc (__class_type_info::do_upcast): Adjust.
10023         (__vmi_class_type_info::do_find_public_src): Adjust.
10024         (__vmi_class_type_info::do_dyncast): Adjust.
10025         (__vmi_class_type_info::do_upcast): Adjust.
10026
10027 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
10028
10029         * tinfo.cc (convert_to_base): New function.
10030         (get_vbase_offset): Remove. Move into convert_to_base.
10031         (__vmi_class_type_info::do_find_public_src): Adjust.
10032         (__vmi_class_type_info::do_dyncast): Adjust.
10033         (__vmi_class_type_info::do_upcast): Adjust.
10034
10035 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
10036
10037         * tinfo.cc (operator=): Use __builtin_strcmp.
10038         * tinfo2.cc (before): Likewise.
10039
10040 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
10041
10042         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
10043         (DECL_SAVED_INLINE): Rename to ...
10044         (DECL_DEFERRED_FN): ... this.
10045         (in_function_p): Remove declaration.
10046         (mark_inline_for_output): Rename to ...
10047         (defer_fn): ... this.
10048         * decl.c (finish_function): Adjust call to mark_inline_for_output.
10049         (in_function_p): Remove definition.
10050         * decl2.c (saved_inlines): Rename to ...
10051         (deferred_fns): ... this.
10052         (saved_inlines_used): Rename to ...
10053         (deferred_fns_used): ... this.
10054         (mark_inline_for_output): Rename to ...
10055         (defer_fn): ... this.
10056         (finish_file): Adjust accordingly.
10057         (init_decl2): Likewise.
10058         * lex.c (cons_up_default_function): Likewise.
10059         * pt.c (mark_decl_instantiated): Likewise.
10060         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
10061         circumstances.
10062         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
10063         * semantics.c (expand_body): Defer more functions.
10064
10065 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10066
10067         * vec.cc: New file.
10068         * Make-lang.in (CXX_LIB2FUNCS): Add it.
10069         (vec.o): Build it.
10070         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10071         __cxa_vec_delete): Declare.
10072
10073 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
10074
10075         * rtti.c (dfs_class_hint_mark): New static function.
10076         (dfs_class_hint_unmark): New static function.
10077         (class_hint_flags): Use them.
10078
10079 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
10080
10081         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
10082
10083 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
10084
10085         * cp-tree.h (instantiate_decl): Change prototype.
10086         * decl2.c (mark_used): Adjust call.
10087         * optimize.c (inlinable_function_p): Adjust handling of templates.
10088         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
10089         (do_type_instantiation): Likewise.
10090         (instantiate_decl): Defer more templates.
10091         (instantiate_pending_templates): Adjust logic to handle inline
10092         friend functions.
10093
10094         * Makefile.in (GGC_H): New variable.  Use it throughout in place
10095         of ggc.h.
10096
10097         * call.c: Don't include obstack.h.  Include ggc.h.
10098         (obstack_chunk_alloc): Don't define.
10099         (obstack_chunk_free): Likewise.
10100         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
10101         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
10102         (pop_switch): Free it.
10103
10104         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
10105
10106         * dump.c (dequeue_and_dump): Don't try to print the bit_position
10107         if we don't have a DECL_FIELD_OFFSET.
10108
10109 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
10110
10111         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
10112         special_function_p.
10113
10114 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10115
10116         * cfns.gperf (hash, libc_name_p): Prototype.
10117
10118         * rtti.c (build_dynamic_cast_1): Constification.
10119
10120         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
10121
10122         * semantics.c (deferred_type_access_control): Prototype.
10123
10124 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
10125
10126         Correct many new ABI issues regarding vbase and vcall offset
10127         layout.
10128         * cp-tree.h (BINFO_VTABLE): Document.
10129         (struct lang_type): Tweak formatting.
10130         (BINFO_PRIMARY_BINFO): Add to documentation.
10131         (CLASSTYPE_VSIZE): Fix typo in comment.
10132         (CLASSTYPE_VBASECLASSES): Update documentation.
10133         (BINFO_VBASE_MARKED): Remove.
10134         (SET_BINFO_VBASE_MARKED): Likewise.
10135         (CLEAR_BINFO_VBASE_MARKED): Likewise.
10136         (BINFO_FIELDS_MARKED): Remove.
10137         (SET_BINFO_FIELDS_MARKED): Likewise.
10138         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
10139         (enum access_kind): New enumeration.
10140         (num_extra_vtbl_entries): Remove declaration.
10141         (size_extra_vtbl_entries): Likewise.
10142         (get_vtbl_decl_for_binfo): New function.
10143         (dfs_vbase_unmark): Remove declaration.
10144         (mark_primary_bases): Likewise.
10145         * class.c (SAME_FN): Remove.
10146         (struct vcall_offset_data_s): Move definition.
10147         (build_vbase_pointer): Use `build', not `build_binary_op', to
10148         access the vbase pointer under the new ABI.
10149         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
10150         (build_primary_vtable): Likewise.
10151         (dfs_mark_primary_bases): Move here from search.c.
10152         (mark_primary_bases): Likewise.
10153         (determine_primary_bases): Under the new ABI, don't make a base
10154         class a primary base just because we don't yet have any virtual
10155         functions.
10156         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
10157         (num_vfun_entries): Remove.
10158         (dfs_count_virtuals): Likewise.
10159         (num_extra_vtbl_entries): Likewise.
10160         (size_extra_vtbl_entries): Likewise.
10161         (layout_virtual_bases): Iterate in inheritance graph order under
10162         the new ABI.
10163         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
10164         indicate that a vfield is present.
10165         (init_class_processing): Initialize access_public_node, etc., from
10166         ak_public, etc.
10167         (get_vtbl_decl_for_binfo): New function.
10168         (dump_class_hierarchy_r): Likewise.
10169         (dump_class_hierarchy): Use it.
10170         (finish_vtbls): Build the vtbls in inheritance graph order.
10171         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10172         (initialize_vtable): Use get_vtbl_decl_for_binfo.
10173         (accumulate_vtbl_inits): Add comments explaining why a pre-order
10174         walk is required.
10175         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
10176         where the vptr points, even for primary vtables.
10177         (build_vtbl_initializer): Adjust handling of vbase and vcall
10178         offsets.
10179         (build_vcall_and_vbase_vtable_entries): New function.
10180         (dfs_build_vbase_offset_vtbl_entries): Remove.
10181         (build_vbase_offset_vtbl_entries): Reimplement.
10182         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
10183         were already handled in a primary base class vtable.
10184         (build_vcall_offset_vtbl_entries): Adjust.
10185         (build_rtti_vtbl_entries): Adjust.
10186         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
10187         * init.c (expand_virtual_init): Simplify.
10188         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
10189         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
10190         * search.c (BINFO_ACCESS): New macro.
10191         (SET_BINFO_ACCESS): Likewise.
10192         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
10193         (access_in_type): Likewise.
10194         (dfs_accessible_p): Likewise.
10195         (protected_accessible_p): Likewise.
10196         (lookup_fnfields_1): Adjust documentation.
10197         (dfs_mark_primary_bases): Move to class.c
10198         (mark_primary_bases): Likewise.
10199         (dfs_vbase_unmark): Remove.
10200         (virtual_context): Use BINFO_FOR_VBASE.
10201         (dfs_get_vbase_types): Simplify.
10202         (dfs_build_inheritance_graph_order): New function.
10203         (get_vbase_types): Use it.
10204         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
10205
10206         * tinfo.cc (get_vbase_offset): New function.
10207         (__vmi_class_type_info::do_find_public_src): Use it.
10208         (__vmi_class_type_info::do_dyncast): Likewise.
10209         (__vmi_class_type_info::do_upcast): Likewise.
10210
10211 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
10212
10213         * lang-specs.h: Pass -fno-show-column to the preprocessor.
10214
10215 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
10216
10217         * rtti.c (class_hint_flags): Rename flags.
10218         (class_initializer): Remove flags.
10219         (synthesize_tinfo_var): Combine offset and flags. Add flags
10220         for __vmi_class_type_info.
10221         (create_tinfo_types): Remove flags from __class_type_info and
10222         __si_class_type_info. Merge flags and offset from
10223         base_class_type_info.
10224         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
10225         (__base_class_info::is_virtual_p): Adjust.
10226         (__base_class_info::is_public_p): Adjust.
10227         (__base_class_info::offset): New accessor.
10228         (__class_type_info::details): Remove member.
10229         (__class_type_info::__class_type_info): Lose details.
10230         (__class_type_info::detail_masks): Remove.
10231         (__si_class_type_info::__si_class_type_info): Lose details.
10232         (__vmi_class_type_info::details): New member.
10233         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
10234         (__vmi_class_type_info::detail_masks): New member.
10235         * tinfo.cc (__class_type_info::do_upcast): Initialize result
10236         with unknown_details_mask.
10237         (__vmi_class_type_info::do_find_public_src): Adjust
10238         (__vmi_class_type_info::do_dyncast): Adjust.
10239         (__vmi_class_type_info::do_upcast): Set result details, if
10240         needed. Adjust.
10241         (__dynamic_cast): Temporarily #if out optimization.
10242
10243 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
10244
10245         * rtti.c (get_tinfo_decl): Mark used.
10246         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
10247         mark as dealt with, if we output it.
10248
10249 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10250
10251         * class.c: Reorganize to put virtual function table initialization
10252         machinery at the end of the file.
10253
10254 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
10255
10256         * class.c (finish_struct): Use bitsize_zero_node.
10257         * pt.c (instantiate_class_template): Likewise.
10258
10259 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
10260
10261         Put RTTI entries at negative offsets in new ABI.
10262         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
10263         vbase offset at index -3, not -1.
10264         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
10265         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
10266         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
10267         (build_rtti_vtbl_entries): New function.
10268         (set_rtti_entry): Remove.
10269         (build_primary_vtable): Don't use it.
10270         (build_secondary_vtable): Likewise.
10271         (start_vtable): Remove.
10272         (first_vfun_index): New function.
10273         (set_vindex): Likewise.
10274         (add_virtual_function): Don't call start_vtable.  Do call
10275         set_vindex.
10276         (set_primary_base): Rename parameter.
10277         (determine_primary_base): Likewise.
10278         (num_vfun_entries): Don't use skip_rtti_stuff.
10279         (num_extra_vtbl_entries): Include RTTI information.
10280         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
10281         (skip_rtti_stuff): Remove.
10282         (dfs_modify_vtables): Don't use it.
10283         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
10284         (layout_nonempty_base_or_field): Update size handling.
10285         (create_vtable_ptr): Tweak.
10286         (layout_class_type): Adjust parameter names.
10287         (finish_struct_1): Simplify.
10288         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
10289         (skip_rtti_stuff): Remove.
10290         (first_vfun_index): New function.
10291         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10292         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
10293         (marked_vtable_pathp): Declare.
10294         (unmarked_vtable_pathp): Likewise.
10295         * error.c (dump_expr): Use first_vfun_index to calculate vtable
10296         offsets.
10297         * rtti.c (build_headof): Look for RTTI at negative offsets.
10298         (get_tinfo_decl_dynamic): Likewise.
10299         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
10300         here.
10301         (create_pseudo_type_info): Do it here instead.  Adjust so that
10302         vptr points at first virtual function.
10303         * search.c (marked_vtable_pathp): Make it global.
10304         (unmarked_vtable_pathp): Likewise.
10305         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
10306         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10307         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
10308         (get_pure_virtuals): Likewise.
10309         (expand_upcast_fixups): Likewise.
10310         * tree.c (debug_binfo): Likewise.
10311         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
10312         negative offset.
10313
10314 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10315
10316         * class.c (check_field_decl): Fix typo.
10317         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10318         (check_methods): Likewise.
10319         (check_field_decls): Likewise.
10320         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10321         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10322         Use DECL_RESULT_FLD, not DECL_RESULT.
10323         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10324         * lex.c (identifier_type): Likewise.
10325         * pt.c (determine_specialization, lookup_template_class): Likewise.
10326         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10327         (resolve_overloaded_unification, more_specialized): Likewise.
10328         * semantics.c (finish_member_declaration): Likewise.
10329         * typeck.c (build_x_function_call): Likewise.
10330
10331 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
10332
10333         * class.c (layout_empty_base): Handle empty bases with non-byte
10334         alignment.
10335         (build_base_field): Likewise.
10336         (layout_virtual_bases): Likewise.
10337
10338         * class.c (finish_struct_1): Fix typo in this change:
10339
10340         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10341
10342 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
10343
10344         * decl.c (grokdeclarator): Count partial specializations when
10345         keeping track of how many template classes have been seen.
10346
10347         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10348
10349 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10350
10351         * class.c (build_vbase_pointer_fields): layout_field now place_field.
10352         (get_vfield_offset): Use byte_position.
10353         (set_rtti_entry): Set OFFSET to ssizetype zero.
10354         (get_binfo_offset_as_int): Deleted.
10355         (dfs_record_base_offsets): Use tree_low_cst.
10356         (dfs_search_base_offsets): Likewise.
10357         (layout_nonempty_base_or_field): Reflect changes in RLI format
10358         and call byte_position.
10359         (layout_empty_base): Convert offset to ssizetype.
10360         (build_base_field): use rli_size_unit_so_far.
10361         (dfs_propagate_binfo_offsets): Do computation in proper type.
10362         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
10363         (layout_class_type): Reflect changes in RLI names and fields.
10364         (finish_struct_1): Set DECL_FIELD_OFFSET.
10365         * dump.c (dequeue_and_dump): Call bit_position.
10366         * expr.c (cplus_expand_constant): Use byte_position.
10367         * rtti.c (expand_class_desc): Use bitsize_one_node.
10368         * typeck.c (build_component_addr): Use byte_position and don't
10369         special case for zero offset.
10370
10371 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
10372
10373         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10374
10375         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10376         tinfo object.
10377         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10378         vtable.
10379
10380 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10381
10382         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10383         DECL_P macros.
10384         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10385         make_typename_type, check_initializer, cp_finish_decl,
10386         xref_tag): Likewise.
10387         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10388         decl_namespace, arg_assoc_template_arg, arg_assoc,
10389         validate_nonmember_using_decl, do_class_using_decl): Likewise.
10390         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10391         args_to_string): Likewise.
10392         * friend.c (is_friend): Likewise.
10393         * lex.c (note_got_semicolon, note_list_got_semicolon,
10394         is_global): Likewise.
10395         * method.c (build_overload_nested_name, build_overload_value,
10396         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10397         * parse.y (typename_sub, typename_sub1): Likewise.
10398         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10399         process_partial_specialization, convert_template_argument,
10400         template_args_equal, add_pending_template, lookup_template_class,
10401         for_each_template_parm_r, maybe_fold_nontype_arg,
10402         tsubst, instantiate_template, type_unification_real, unify,
10403         instantiate_pending_templates, set_mangled_name_for_template_decl):
10404         Likewise.
10405         * repo.c (repo_get_id, repo_template_used): Likewise.
10406         * search.c (lookup_field_1): Likewise.
10407         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10408         * xref.c (classname): Likewise.
10409
10410 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
10411
10412         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10413         (CANONICAL_BINFO): New macro.
10414         (BINFO_NEW_VTABLE_MARKED): Use it.
10415         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10416         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10417         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10418         not TREE_TYPE.
10419         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10420         (build_secondary_vtable): Likewise.
10421         (dfs_finish_vtbls): Likewise.
10422         (dfs_accumulate_vtbl_inits): Likewise.
10423         (accumulate_vtbl_inits): New function.
10424         (finish_vtbls): Make sure that virtual bases come after
10425         non-virtual bases in the vtable group.
10426         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10427         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10428         * search.c (struct vbase_info): Move definition.
10429         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10430         (unmarked_new_vtable_p): Likewise.
10431         (dfs_mark_vtable_path): Remove.
10432         (dfs_mark_new_vtable): Remove.
10433         (dfs_unmark_new_vtable): Likewise.
10434         (dfs_clear_search_slot): Likewise.
10435         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
10436         (dfs_clear_vbase_slots): Likewise.
10437         (init_vbase_pointers): LIkewise.
10438
10439 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
10440
10441         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10442         SIZETYPE to a non-SIZETYPE.
10443
10444 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
10445
10446         * class.c (layout_virtual_bases): Adjust names in conditionally
10447         compiled code.
10448
10449         * class.c (record_base_offsets): New function.
10450         (layout_conflict_p): Likewise.
10451         (layout_nonempty_base_or_field): Use it.
10452         (layout_empty_base): New function.
10453         (build_base_field): Use it.
10454         (build_base_fields): Update comment.
10455         (layout_virtual_bases): Fold in a little code form
10456         layout_basetypes.  Use layout_empty_base.
10457         (layout_basetypes): Remove.
10458         (end_of_class): New function.
10459         (layout_class_type): Use it.  Adjust.
10460
10461         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10462         (fntype_p): Remove.
10463         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10464         comment.
10465         (dfs_skip_nonprimary_vbases_markedp): Likewise.
10466         * typeck.c (fntype_p): Remove.
10467
10468         * cp-tree.h (TI_SPEC_INFO): Remove.
10469         (CLASSTYPE_TI_SPEC_INFO): Likewise.
10470         * pt.c (process_partial_specialization): Likewise.
10471
10472         * class.c (build_base_field): Fix thinko in computation of binfo
10473         offsets.
10474
10475         * tree.c (mark_local_for_remap_p): Mark variables declared in
10476         TARGET_EXPRs as well.
10477
10478 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10479
10480         * typeck.c (require_complete_type, complete_type,
10481         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10482         build_array_ref, convert_arguments, pointer_diff,
10483         build_x_unary_op, build_unary_op, build_c_cast,
10484         build_modify_expr): Use COMPLETE_TYPE_P etc.
10485         * call.c (is_complete, convert_like_real,
10486         build_new_method_call): Likewise.
10487         * class.c (build_vbase_pointer_fields, check_bases,
10488         build_base_field, finish_struct_1, pushclass): Likewise.
10489         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10490         * decl.c (maybe_process_template_type_declaration, pushtag,
10491         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10492         layout_var_decl, check_initializer, cp_finish_decl,
10493         grokdeclarator, require_complete_types_for_parms,
10494         grok_op_properties, xref_tag, xref_basetypes,
10495         check_function_type): Likewise.
10496         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10497         * friend.c (do_friend): Likewise.
10498         * init.c (build_offset_ref): Likewise.
10499         * parse.y (structsp): Likewise.
10500         * pt.c (maybe_process_partial_specialization,
10501         tsubst_friend_function, instantiate_class_template, tsubst,
10502         do_type_instantiation, instantiate_pending_templates): Likewise.
10503         * repo.c (repo_get_id): Likewise.
10504         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10505         synthesize_tinfo_var, emit_support_tinfos): Likewise.
10506         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10507         * semantics.c (begin_class_definition): Likewise.
10508         * tree.c (build_cplus_method_type): Likewise.
10509         * typeck2.c (digest_init, build_functional_cast,
10510         add_exception_specifier): Likewise.
10511         * parse.h, parse.c: Regenerated.
10512
10513 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
10514
10515         * inc/cxxabi.h: New header file. Define new-abi entry points.
10516         (__pointer_type_info::target): Rename member to ...
10517         (__pointer_type_info::type): ... here.
10518         (__base_class_info::type): Rename member to ...
10519         (__base_class_info::base): ... here.
10520         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10521         * cp-tree.h (CPTI_ABI): New global tree enumeration.
10522         (abi_node): New global tree node.
10523         * decl.c (abi_node): Document.
10524         (init_decl_processing): Initialize abi_node.
10525         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10526         (get_vmi_pseudo_type_info): Likewise.
10527         (create_tinfo_types): Likewise.
10528         (emit_support_tinfos): Likewise.
10529         * tinfo.h (cxxabi.h): Include for new-abi.
10530         Move rtti class definitions to new header file.
10531         * tinfo.cc (abi): Use the namespace.
10532         (std): Move new abi rtti classes from here ...
10533         (__cxxabiv1): ... to here.
10534         * tinfo2.cc (cxxabi.h): Include for new-abi.
10535         Move rtti class definitions to new header file.
10536         (std): Move new abi rtti classes from here ...
10537         (__cxxabiv1): ... to here.
10538         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10539         namespace.
10540
10541 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10542             Jason Merrill  <jason@casey.cygnus.com>
10543
10544         * method.c (build_overload_int): Use host_integerp.
10545
10546 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10547
10548         * init.c (build_offset_ref): Handle the case of a templated member
10549         function.
10550
10551 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10552
10553         * except.c (expand_exception_blocks): Clear catch_clauses_last.
10554
10555 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
10556
10557         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10558         * class.c (check_bitfield_decl): Turn illegal bitfields into
10559         non-bitfields.
10560         (dfs_propagate_binfo_offsets): Adjust for new size_binop
10561         semantics.
10562         (dfs_offset_for_unshared_vbases): Likewise.
10563         * cvt.c (cp_convert_to_pointer): Convert NULL to a
10564         pointer-to-member correctly under the new ABI.
10565         * expr.c (cplus_expand_constant): Don't use cp_convert when
10566         turning an offset into a pointer-to-member.
10567         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10568         when dereferencing them under the new ABI.
10569         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10570         of pointers-to-members under the new ABI.
10571
10572         * class.c (check_bitfield_decl): Remove restriction on really long
10573         bitfields.
10574         (layout_class_type): Implement new ABI handling of bitfields
10575         longer than their types.
10576
10577 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10578
10579         * parse.y (extdefs): Call ggc_collect.
10580         * parse.c: Regenerated.
10581
10582 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
10583
10584         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10585         (note_name_declared_in_class): Use OVL_CURRENT to get at a
10586         potential overload.
10587
10588 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10589
10590         * class.c (build_vbase_path): Use integer_zerop.
10591         (build_vtable_entry): Use tree_low_cst.
10592         (get_vfield_offset): Use bit_position.
10593         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10594         Use tree_low_cst.
10595         (check_bitfield_decl): Set DECL_SIZE using convert.
10596         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10597         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10598         Use tree_low_cst.
10599         (finish_struct_1): Use bit_position.
10600         (dump_class_hierarchy): Use tree_low_cst.
10601         * cp-tree.h (min_precision): Add declaration.
10602         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10603         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10604         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10605         * expr.c (cplus_expand_constant): Use bit_position.
10606         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10607         * rtti.c (get_base_offset): Use bit_position.
10608         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10609         host_integerp, and tree_low_cst.
10610         (pointer_int_sum): Use integer_zerop.
10611         (build_component_addr): Use bit_position.
10612
10613 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
10614
10615         * typeck.c (require_complete_type): Don't assume size_zero_node.
10616         (complete_type_or_else): Likewise.
10617
10618 2000-03-16  Steven Grady <grady@digitaldeck.com>
10619             Jason Merrill  <jason@casey.cygnus.com>
10620
10621         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10622
10623 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
10624
10625         * decl2.c (grokfield): Bail out if type is error_mark_node.
10626
10627 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10628
10629         * tinfo2.cc (__ptr_to_member_data): Rename to ...
10630         (__pointer_to_member_data): ... here. Adjust.
10631         * rtti.c (create_tinfo_types): Adjust.
10632
10633 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10634
10635         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10636         * decl.c (ref_desc_type_node): Undocument.
10637         * rtti.c (ptr_ref_initializer): Rename to ...
10638         (ptr_initializer): ... here. Adjust comments.
10639         (ptmd_initializer): Fix comment thinko.
10640         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10641         (create_tinfo_types): Remove ref_desc_type_node init.
10642         * tinfo2.cc (__reference_type_info): Remove.
10643
10644 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
10645
10646         * decl.c (cp_finish_decl): Remove obsolete comment.
10647
10648         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10649
10650 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
10651
10652         * cp-tree.h: Tweak documentation.
10653         * class.c (build_vbase_pointer_fields): Layout the fields, too.
10654         (avoid_overlap): Remove.
10655         (get_binfo_offset_as_int): New function.
10656         (dfs_serach_base_offsets): Likewise.
10657         (layout_nonempty_base_or_field): Likewise.
10658         (build_base_field): Layout fields here.  Avoid placing two objects
10659         of the same type at the same address, under the new ABI.
10660         (build_base_fields): Adjust accordingly.
10661         (create_vtable_ptr): Return the new field, but don't attach it to
10662         TYPE_FIELDS.
10663         (remove_base_field): Remove.
10664         (remove_base_fields): Remove.
10665         (layout_basetypes): Adjust accordingly.
10666         (layout_class_type): Call layout_field for each field, rather than
10667         just making a wholesale call to layout_type.
10668
10669 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
10670
10671         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10672
10673 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
10674
10675         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10676
10677         * except.c (dtor_nothrow): New fn.
10678         (do_pop_exception): Use it.  Take type parm.
10679         (push_eh_cleanup): Take type parm.
10680         (expand_start_catch_block): Pass it.
10681         (build_eh_type_type_ref): Accept null type.
10682
10683 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
10684
10685         * cp-tree.h (revert_static_member_fn): Change prototype.
10686         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10687         (grok_op_properties): Likewise.
10688         (start_function): Likewise.
10689         (revert_static_member_fn): Simplify.
10690         * pt.c (check_explicit_specialization): Adjust call to
10691         revert_static_member_fn.
10692
10693 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
10694
10695         * cp-tree.h (scope_kind): New type.
10696         (tmpl_spec_kind): Likewise.
10697         (declare_pseudo_global_level): Remove.
10698         (pseudo_global_level_p): Rename to template_parm_scope_p.
10699         (pushlevel): Remove declaration.
10700         (begin_scope): New function.
10701         (finish_scope): Likewise.
10702         (current_tmpl_spec_kind): Likewise.
10703         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10704         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
10705         Add template_spec_p.
10706         (toplevel_bindings_p): Adjust.
10707         (declare_pseudo_global_level): Remove.
10708         (pseudo_global_level_p): Rename to template_parm_scope_p.
10709         (current_tmpl_spec_kind): New function.
10710         (begin_scope): Likewise.
10711         (finish_scope): Likewise.
10712         (maybe_push_to_top_level): Adjust.
10713         (maybe_process_template_type_declaration): Likewise.
10714         (pushtag): Likewise.
10715         (pushdecl_nonclass_level): Likewise.
10716         (lookup_tag): Likewise.
10717         (grokfndecl): Handle member template specializations.  Share
10718         constructor and non-constructor code.
10719         * decl2.c (check_classfn): Handle member template specializations.
10720         * pt.c (begin_template_parm_list): Use begin_scope.
10721         (begin_specialization): Likewise.
10722         (end_specialization): Likewise.
10723         (check_explicit_specialization): Use current_tmpl_spec_kind.
10724         Handle member template specializations.
10725         (end_template_decl): Use finish_scope.  Remove call to
10726         get_pending_sizes.
10727         (push_template_decl_real): Remove bogus error message.
10728         (tsubst_decl): Fix typo in code contained in comment.
10729         (instantiate_template): Handle member template specializations.
10730         (most_general_template): Likewise.
10731
10732 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
10733
10734         * lex.c (whitespace_cr): Compress consecutive calls to warning().
10735         (do_identifier): Ditto for error().
10736
10737         * pt.c (convert_nontype_argument): Ditto for cp_error().
10738         (convert_template_argument): Ditto for cp_pedwarn().
10739
10740 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
10741
10742         * exception.cc (__check_null_eh_spec): New fn.
10743         * except.c (expand_end_eh_spec): Call it if the spec is throw().
10744
10745 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10746
10747         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10748         * except.c (expand_end_eh_spec): Add the return type.
10749         * rtti.c (throw_bad_cast): Add the parmtypes.
10750         (throw_bad_typeid): Likewise.
10751
10752         * semantics.c (expand_stmt): Only leave out rtl for unused
10753         artificials, and set DECL_IGNORED_P on them as well.
10754         * decl.c (wrapup_globals_for_namespace): Likewise.
10755
10756 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
10757
10758         * decl.c (maybe_commonize_var): Skip all artificial decls.
10759         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10760
10761 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
10762
10763         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10764         * cp-tree.h: Declare flag_enforce_eh_specs.
10765         * decl.c (store_parm_decls, finish_function): Check it.
10766
10767         C library functions don't throw.
10768         * Makefile.in (cfns.h): New target.
10769         (except.o): Depend on it.
10770         * Make-lang.in (cc1plus): Depend on cfns.gperf.
10771         * cfns.gperf: New file.
10772         * cfns.h: Generated.
10773         * except.c: Include it.
10774         (nothrow_libfn_p): New fn.
10775         * decl.c (grokfndecl): Use it.
10776         * cp-tree.h: Declare it.
10777
10778         * decl.c (push_overloaded_decl_1, auto_function,
10779         define_function): Lose.
10780         (build_library_fn_1): New static fn.
10781         (builtin_function): Use it.
10782         (get_atexit_node): Use build_library_fn_ptr.
10783         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10784         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10785         push_void_library_fn, push_throw_library_fn): New fns.
10786         * cp-tree.h: Declare them.
10787         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10788         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10789         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10790         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10791         * rtti.c (build_runtime_decl): Lose.
10792         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10793         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10794         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10795
10796         * call.c (build_call): Remove result_type parm.
10797         Call mark_used on unused artificial fns.
10798         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10799
10800 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
10801
10802         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10803         appropriate.
10804         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10805         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10806         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10807         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10808         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10809         expand_generic_desc): Likewise.
10810
10811 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10812
10813         * exception.cc (__cp_pop_exception): Cleanup the original object.
10814
10815 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10816
10817         * decl.c (grok_op_properties): Merge conversion to void warning
10818         with other silly op warnings.
10819
10820 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
10821
10822         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10823         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
10824
10825 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10826
10827         * decl.c (cp_make_fname_decl): New function.
10828         (wrapup_globals_for_namespace): Don't emit unused static vars.
10829         (init_decl_processing): Remove comment about use of
10830         array_domain_type. Set make_fname_decl.
10831         (cp_finish_decl): Remove __FUNCTION__ nadgering.
10832         * semantics.c (begin_compound_stmt): Remove
10833         current_function_name_declared flagging.
10834         (expand_stmt): Don't emit unused local statics.
10835         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10836         specially.
10837
10838 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
10839
10840         * typeck.c (convert_for_assignment): Don't look at array
10841         initializer.
10842         * call.c (convert_like_real): Likewise.
10843
10844 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
10845
10846         Add initial support for '\uNNNN' specifier.
10847         * lex.c (read_ucs): New fn.
10848         (readescape, skip_white_space): Call it.
10849         (is_extended_char, is_extended_char_1): New fns.
10850         (utf8_extend_token): New fn, #if 0'd out.
10851         (real_yylex): Treat extended chars like letters.
10852
10853         * search.c (note_debug_info_needed): Walk the bases even if we
10854         weren't deferring the type itself.
10855
10856 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10857
10858         * decl2.c (finish_objects): Constify a char*.
10859
10860         * method.c (emit_thunk): Likewise.
10861
10862 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
10863
10864         * typeck.c (dubious_conversion_warnings): Look through
10865         REFERENCE_TYPE.
10866
10867 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10868
10869         * class.c (dfs_modify_vtables): I is now unsigned.
10870         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10871         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10872         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10873         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10874         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10875         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10876         Call integer_all_onesp.
10877         * typeck2.c (process_init_constructor): Use compare_tree_int.
10878
10879         * lang-specs.h (as): Don't call if -syntax-only.
10880
10881 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
10882
10883         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10884         RTL_EXPR_HAS_NO_SCOPE after all.
10885
10886 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
10887
10888         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10889         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
10890         RTL_EXPR_HAS_NO_SCOPE.
10891
10892         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10893         later.
10894
10895         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10896
10897 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
10898
10899         * call.c (convert_like): Macrofy.
10900         (convert_like_with_context): New macro.
10901         (convert_like_real): Renamed from convert_like.  Add calling
10902         context parameters, for diagnostics. Add recursive flag.  Call
10903         dubious_conversion_warnings for outer conversion.
10904         (build_user_type_conversion): Use convert_like_with_context.
10905         (build_over_call): Likewise. Don't warn about dubious
10906         conversions here. Adjust convert_default_arg calls.
10907         (convert_default_arg): Add context parameters for diagnostics.
10908         Pass through to convert_like_with_context.
10909         * cp-tree.h (convert_default_arg): Add context parameters.
10910         (dubious_conversion_warnings): Prototype new function.
10911         * typeck.c (convert_arguments): Adjust convert_default_arg call.
10912         (dubious_conversion_warnings): New function, broken
10913         out of convert_for_assignment.
10914         (convert_for_assignment): Adjust.
10915
10916 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
10917
10918         * decl2.c (key_method): Break out from...
10919         (import_export_vtable, import_export_class): ...here.
10920
10921         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10922         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10923
10924         * search.c (note_debug_info_needed, dfs_debug_mark,
10925         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
10926         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
10927
10928 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
10929
10930         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
10931         typos.
10932
10933 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
10934
10935         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
10936         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
10937         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
10938         (lang_type): Split gets_new into has_new and has_array_new.
10939         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10940         (TYPE_GETS_NEW): Split into ...
10941         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
10942         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
10943         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
10944         (build_op_new_call): Don't declare.
10945         (build_new_1): Likewise.
10946         * call.c (build_op_new_call): Remove.
10947         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10948         instead of TYPE_NEEDS_DESTRUCTOR.
10949         (finish_struct_bits): Likewise.
10950         (add_implicitly_declared_members): Likewise.
10951         (check_field_decl): Likewise.
10952         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
10953         correctly under the new ABI.
10954         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10955         instead of TYPE_NEEDS_DESTRUCTOR.
10956         (initialize_local_var): Likewise.
10957         (destroy_local_var): Likewise.
10958         (cp_finish_decl): Likewise.
10959         (register_dtor_fn): Likewise.
10960         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
10961         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
10962         TYPE_VEC_DELETE_TAKES_SIZE here.
10963         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
10964         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
10965         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10966         (finish_destructor_body): Likewise.
10967         (maybe_build_cleanup_1): Likewise.
10968         * decl2.c (do_static_destruction): Likewise.
10969         * init.c (build_new_1): Make it static.
10970         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10971         (expand_cleanup_for_base): Likewise.
10972         (get_cookie_size): New function.
10973         (build_new_1): Handle array-new cookies correctly under the new
10974         ABI.
10975         (build_vec_delete_1): Likewise.
10976         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10977         (build_delete): Likewise.
10978         (build_vec_delete): Handle array-new cookies correctly under the new
10979         ABI.
10980         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10981         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
10982         TYPE_HAS_ARRAY_NEW_OPERATOR.
10983         * ptree.c (print_lang_type): Check them.
10984         * search.c (context_for_name_lookup): Fix typo in comment.
10985         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10986         * tree.c (break_out_cleanups): Likewise.
10987         (build_cplus_array_test_1): Likewise.
10988         (cp_build_qualified_type_real): Likewise.
10989         * typeck.c (complete_type): Likewise.
10990
10991         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
10992         the command-line, not the end.
10993
10994 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
10995
10996         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
10997
10998 2000-03-02  Tom Tromey  <tromey@cygnus.com>
10999
11000         * cp-tree.h (build_java_class_ref): Declare.
11001         * init.c (build_java_class_ref): No longer static.
11002         * except.c (expand_throw): Generate a Java-style `throw' if the
11003         thrown object is a "Java" object.
11004         (initialize_handler_parm): Generate a Java-style lookup of
11005         exception info if the caught object is a "Java" object.
11006         (catch_language, catch_language_init): New globals.
11007         (decl_is_java_type): New function.
11008         (expand_start_catch_block): Don't call push_eh_info() or
11009         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
11010         class reference to build_catch_block.
11011
11012 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11013
11014         * typeck.c (comptypes): Treat sizetype like its language equivalent.
11015
11016 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
11017
11018         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
11019         to merge reference/pointer code and fix incorrect warnings.
11020
11021 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
11022
11023         * search.c (protected_accessible_p): Use context_for_name_lookup.
11024
11025         * init.c (construct_virtual_bases): Fix thinko.
11026         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
11027
11028 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11029
11030         * decl.c (current_function_decl): Move to toplev.c.
11031
11032 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
11033
11034         * pt.c (fn_type_unification): Unify return type, whenever
11035         provided.
11036         (get_bindings_real): Only pass return type when necessary.
11037         Remove explicit return type check.
11038         * class.c (resolve_address_of_overloaded_function): Pass desired
11039         return type to fn_type_unification.
11040
11041 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11042
11043         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
11044         DECL_FIELD_SIZE.
11045         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
11046         DECL_FIELD_SIZE.
11047         * rtti.c (expand_class_desc): Likewise.
11048         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
11049         (THUNK_VCALL_OFFSET): Likewise.
11050         (THUNK_DELTA): Reflect changes in ../tree.h.
11051
11052 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
11053
11054         * search.c (protected_accessible_p): Also allow the access if
11055         the member is public in DERIVED.  Lose TYPE parm.
11056         (friend_accessible_p): Lose TYPE parm.
11057         (accessible_p): Adjust.
11058
11059 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11060
11061         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
11062         on things that are not sizes; ssize_binop deleted.
11063         Call size_diffop when appropriate.
11064         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11065         (build_primary_vtable, build_secondary_vtable): Likewise.
11066         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
11067         Variable I is HOST_WIDE_INT.
11068         (get_vfield_offset): Pass proper types to size_binop.
11069         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
11070         (finish_struct_1): Likewise.
11071         (skip_rtti_stuff): Arg N is now pointer to signed.
11072         (layout_class_type): Use size_zero_node.
11073         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
11074         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
11075         * decl.c (complete_arry_type): Pass proper types to size_binop.
11076         (xref_basetypes): BINFO_OFFSET is sizetype.
11077         * error.c (dump_expr): Don't use size_binop non-sizes.
11078         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
11079         * init.c (construct_virtual_bases): Fix type error.
11080         (build_vec_delete_1): Pass proper type to size_binop and don't
11081         fold result.
11082         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
11083         * rtti.c (get_base_offset): Pass proper type to size_binop.
11084         * search.c (dfs_find_vbases): Fix type error.
11085         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
11086         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
11087         * tree.c (debug_binfo): Variable N is signed.
11088         Use HOST_WIDE_INT_PRINT_DEC.
11089         * typeck.c (comptypes): sizetype is same as equivalent integer type.
11090         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
11091         size_one_node and size_zero_node.
11092         (c_alignof): Use size_one_node.
11093         (build_component_addr): Pass proper types to size_binop.
11094         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
11095
11096 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
11097
11098         Implement class scope using-declarations for functions.
11099         * class.c (handle_using_decl): Call add_method for used functions.
11100         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
11101         (add_method): Used functions are hidden by local functions.
11102         (check_bases_and_members): Handle using-decls before finalizing
11103         CLASSTYPE_METHOD_VEC.
11104         * call.c (add_function_candidate): Add ctype parm; if non-zero,
11105         override the type of 'this' accordingly.
11106         (add_template_candidate, add_template_candidate_real): Add ctype parm.
11107         (convert_class_to_reference, build_user_type_conversion_1,
11108         build_new_function_call, build_object_call, build_new_op,
11109         build_new_method_call): Pass ctype parm.
11110
11111         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
11112         the baselink.
11113         * call.c (convert_class_to_reference, build_user_type_conversion_1,
11114         build_new_function_call, build_object_call, build_new_op,
11115         build_new_method_call, build_op_delete_call): Don't get basetype_path
11116         from a baselink.
11117         * typeck.c (build_component_ref): Likewise.
11118         * init.c (build_offset_ref): Likewise.
11119         (resolve_offset_ref): Don't call enforce_access.
11120         Call build_scoped_ref.
11121         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
11122         would cause an error or if -pedantic.
11123         * class.c (alter_access): Lose binfo parm.
11124
11125 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11126
11127         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
11128         types.
11129
11130 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
11131
11132         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
11133         pseudo_type_info creation into the std namespace
11134
11135 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
11136
11137         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
11138         (import_export_class): Remove declaration.
11139         * decl2.c (import_export_class): Make it static.
11140         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
11141         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
11142         EXPR_WITH_FILE_LOCATION.
11143         * lex.c (check_newline): Tweak filename/lineno setting.
11144         * semantics.c (begin_while_stmt): Fix typo in comment.
11145
11146 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11147
11148         * lang-options.h (-fmessage-length=): Add missing option.
11149
11150         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
11151
11152 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
11153
11154         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
11155
11156 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
11157
11158         * optimize.c (expand_call_inline): Emit the return label before
11159         evaluating the return value.
11160
11161 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
11162
11163         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
11164         than duplicating functionality here.
11165         * optimize.c: Include input.h.
11166         (expand_call_inline): Use push_srcloc and pop_srcloc.
11167         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
11168         * parse.c: Regenerated.
11169         * Makefile.in (lex.o): Depend on input.h.
11170         (optimize.o): Likewise.
11171
11172 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
11173
11174         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
11175         function type, rather than ICE.
11176
11177 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
11178
11179         * decl.c (grokdeclarator): Call decl_type_access_control.
11180         * parse.y (parse_end_decl): Don't call decl_type_access_control if
11181         decl is null.
11182
11183 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
11184
11185         * decl.c (decls_match): Remove obsolete static member nadgering.
11186
11187 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11188
11189         * decl.c (grokdeclarator): Change ANSI to ISO.
11190         * lex.c (consume_string, readescape, do_identifier): Likewise.
11191         (parse_float, real_yylex): Likewise.
11192         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
11193         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
11194         new_type_id, maybe_label_decls, simple_stmt,
11195         for.init.statement): Likewise.
11196         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
11197         * semantics.c (finish_named_return_value): Likewise.
11198         * parse.c: Regenerate.
11199
11200 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
11201
11202         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
11203         (CPTI_CLASS_STAR_TYPE): Remove.
11204         (vtable_index_type): Likewise.
11205         (class_star_type_node): Remove.
11206         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
11207         (build_binary_op_nodefault): Remove.
11208         * call.c (build_new_op): Use build_binary_op instead of
11209         build_binary_op_nodefault.
11210         * decl.c (init_decl_processing): Remove class_star_type_node
11211         initialization.  Make delta_type_node ptrdiff_type_node under the
11212         new ABI.  Initialize vtable_index_type.
11213         (build_ptrmemfunc_type): Build different structures for the new
11214         ABI.
11215         (build_enumerator): Use build_binary_op instead of
11216         build_binary_op_nodefault.
11217         * method.c (build_overload_value): Mangle pointers-to-members
11218         appropriately under the new ABI.
11219         * typeck.c (build_array_ref): Use build_binary_op instead of
11220         build_binary_op_nodefault.
11221         (get_member_function_from_ptrfunc): Adjust for the new ABI.
11222         (build_binary_op_nodefault): Rename to ...
11223         (build_binary_op): ... this.  Remove old version.  Adjust for
11224         pointer-to-member comparisons under the new ABI.
11225         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
11226         (build_ptrmemfunc): Adjust for the new ABI.
11227         (expand_ptrmemfunc_cst): Likewise.
11228         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
11229         (pfn_from_ptrmemfunc): Adjust for the new ABI.
11230
11231 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
11232
11233         * call.c (build_object_call): Compress consecutive calls to
11234         cp_error.
11235         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
11236         (build_op_delete_call): Adjust message formatting.
11237
11238         * class.c (check_bases): Compress consecutive calls to
11239         cp_pedwarn.
11240         (finish_struct_anon): Say 'ISO C++'.
11241
11242         * decl.c (start_decl): Same here.
11243         (grok_reference_init): Likewise.
11244         (grokfndecl): Correct message formatting.
11245         (grokfndecl): Improve diagnostic.
11246         (check_static_variable_definition): Likewise. Say 'ISO C++'
11247         (compute_array_index_type): Say 'ISO C++'
11248         (create_array_type_for_decl): Compress consecutive calls to
11249         cp_error.
11250         (grokdeclarator): Say 'ISO C++'
11251         (grok_op_properties): Likewise.
11252
11253         * decl2.c (delete_sanity): Clairify diagnostic.
11254         (check_member_template): Same here.
11255         (grok_function_init): Use consistent terminology.
11256
11257         * expr.c (do_case): Say 'ISO C++'
11258
11259         * friend.c (do_friend): Compress consecutive calls to warning.
11260
11261 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
11262
11263         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
11264         * class.c (build_secondary_vtable): Reorganize.  Don't create a
11265         new vtable under the new ABI.
11266         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
11267         computing the size.
11268         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
11269         the initializing elements.
11270         (initialize_vtable): New function.
11271         (dfs_finish_vtbls): Use it.
11272         (dfs_accumulate_vtbl_inits): New function.
11273         (finish_vtbls): Merge primary and secondary vtables under the new
11274         ABI.
11275         (finish_struct_1): Remove redundant call to layout_vtable_decl.
11276         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
11277         aren't VAR_DECLs.
11278
11279         * class.c (build_vtable): New function, split out from ...
11280         (get_vtable_decl): ... here, and ...
11281         (build_secondary_vtable): ... here.
11282
11283         * pt.c (tsubst_decl): Fix formatting.
11284
11285 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11286
11287         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
11288         (avoid_overlap, build_base_field): Likewise.
11289         (build_base_field, build_base_fields, is_empty_class):
11290         Test DECL_SIZE with integer_zero.
11291         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
11292         * cp-tree.h (struct lang_type): New field size_unit.
11293         (CLASSTYPE_SIZE_UNIT): New macro.
11294         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
11295         (cp_finish_decl): Delete -Wlarger-than processing.
11296         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
11297         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
11298         * tree.c (make_binfo): binfo vector is one entry longer.
11299         (walk_tree): Walk DECL_SIZE_UNIT.
11300
11301 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
11302
11303         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
11304         comment.
11305         (build_vtable_entry): Don't assume all vtable entries are
11306         functions.
11307         (build_vtbl_initializer): Adjust accordingly.
11308         (get_vtable_decl): Fix formatting.
11309
11310 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
11311
11312         * semantics.c (deferred_type_access_control): Walk the entire
11313         type_lookups list.
11314         (save_type_access_control): Rename from
11315         initial_deferred_type_access_control.  Just remember the value.
11316         (decl_type_access_control): New fn.
11317         (begin_function_definition): Use deferred_type_access_control, after
11318         we've started the function.  Set type_lookups to error_mark_node.
11319         * parse.y (frob_specs, fn.def1): Adjust.
11320         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11321         (parse_end_decl, parse_bitfield0, parse_method): New fns.
11322         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11323         (after_type_component_declarator0): Likewise.
11324         (after_type_component_declarator): Likewise.
11325         (notype_component_declarator): Likewise.
11326         * cp-tree.h: Adjust.
11327
11328         * decl.c (redeclaration_error_message): Allow redeclaration of
11329         namespace-scope decls.
11330
11331 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11332
11333         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11334
11335 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
11336
11337         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11338         * decl2.c (grokclassfn): Likewise.
11339
11340         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11341
11342         * decl2.c (lang_decode_option): Don't set default message length
11343         here.
11344         * lex.c (lang_init_options): Set it here.
11345
11346 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
11347
11348         Make DECL_CONTEXT mean the class in which a member function was
11349         declared, even for a virtual function.
11350         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11351         (DECL_FRIEND_CONTEXT): New macro.
11352         (DECL_REAL_CONTEXT): Remove.
11353         (SET_DECL_FRIEND_CONTEXT): Likewise.
11354         (DECL_VIRTUAL_CONTEXT): Adjust.
11355         (DECL_CLASS_SCOPE_P): Use TYPE_P.
11356         (add_friends): Remove.
11357         (hack_decl_function_context): Likewise.
11358         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
11359         CP_DECL_CONTEXT.
11360         (build_over_call): Fix indentation.  Use DECL_CONTEXT
11361         instead of DECL_CLASS_CONTEXT.
11362         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
11363         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11364         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11365         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
11366         (build_base_field): Likewise.
11367         (finish_struct_1): Likewise.
11368         (build_self_reference): Likewise.
11369         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
11370         DECL_REAL_CONTEXT.
11371         (pushtag): Use decl_function_context, not
11372         hack_decl_function_context.
11373         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11374         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11375         (pushdecl): Remove bogus code.
11376         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11377         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11378         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11379         Use decl_function_context, nothack_decl_function_context.
11380         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11381         (grokdeclarator): Likewise.  Use decl_function_context, not
11382         hack_decl_function_context.
11383         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
11384         (start_function): Use DECL_FRIEND_CONTEXT, not
11385         DECL_CLASS_CONTEXT.  Use decl_function_context, not
11386         hack_decl_function_context.
11387         (finish_function): Use decl_function_context, not
11388         hack_decl_function_context.
11389         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11390         DECL_CLASS_CONTEXT.
11391         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11392         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11393         (grokfield): Likewise.
11394         (finish_builtin_type): Likewise.
11395         (finish_vtable_vardec): Use decl_function_context, not
11396         hack_decl_function_context.
11397         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11398         (start_static_initialization_or_destruction): Likewise.
11399         (finish_static_initialization_or_destruction): Likewise.
11400         (mark_used): Adjust logic for deciding when to synthesize methods.
11401         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11402         DECL_REAL_CONTEXT.
11403         * error.c (dump_function_decl): Use DECL_CONTEXT, not
11404         DECL_CLASS_CONTEXT.
11405         * friend.c (is_friend): Likewise.
11406         (add_friends): Remove.
11407         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11408         * lex.c (begin_definition_of_inclass_inline): Use
11409         decl_function_context, not hack_decl_function_context.
11410         (process_next_inline): Likewise.
11411         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11412         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11413         DECL_CLASSS_CONTEXT.
11414         (hack_identifier): Likewise.
11415         (synthesize_method):  Use decl_function_context, not
11416         hack_decl_function_context.
11417         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11418         DECL_REAL_CONTEXT.
11419         (is_member_template): Use decl_function_context, not
11420         hack_decl_function_context.  Use DECL_CONTEXT, not
11421         DECL_CLASS_CONTEXT.
11422         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11423         DECL_CLASS_CONTEXT.
11424         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11425         DECL_REAL_CONTEXT.
11426         (push_template_decl_real): Likewise.
11427         (instantiate_class_template): Don't call add_friends.
11428         (tsubst_default_argument): Use DECL_CONTEXT, not
11429         DECL_REAL_CONTEXT.
11430         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11431         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11432         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11433         DECL_CLASS_CONTEXT.
11434         * repo.c (repo_inline_used): Likewise.
11435         * search.c (current_scope): Adjust for new _CONTEXT macros.
11436         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11437         DECL_REAL_CONTEXT.
11438         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11439         (lookup_fnfields_here):Likewise.
11440         (check_final_overrider): Likewise.
11441         (init_vbase_pointers): Likewise.
11442         (virtual_context): Likewise.
11443         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11444         (expand_body): Use decl_function_context, not
11445         hack_decl_function_context.
11446         * tree.c (hack_decl_function_context): Remove.
11447         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11448         DECL_CLASS_CONTEXT.
11449         * typeck2.c (error_not_base_type): Likewise.
11450
11451 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
11452
11453         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11454
11455 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11456
11457         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11458
11459 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
11460
11461         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11462
11463 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
11464
11465         * decl2.c (lang_decode_option): Enable automatic line wrapping.
11466
11467 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
11468
11469         * parse.y (frob_specs): Split out...
11470         (parse_decl): From here.
11471         (fn.def2): Call initial_deferred_type_access_control.
11472         (after_type_component_declarator0): Call frob_specs.
11473         (notype_component_declarator0): Likewise.
11474         * search.c (friend_accessible_p): Nested classes are friends of their
11475         enclosing classes.
11476
11477 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
11478
11479         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11480         used to create an implicit temporary.
11481
11482         * class.c (dfs_modify_vtables): Tweak calculation of functions to
11483         override.
11484
11485 2000-02-08  Nathan Sidwell  <nathan@acm.org>
11486
11487         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11488         strip array element qualifiers too.
11489
11490 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
11491
11492         * decl.c (store_parm_decls): Don't build cleanups for parameters
11493         while processing_template_decl.
11494
11495 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
11496
11497         * cp-tree.h (struct saved_scope): Add incomplete field.
11498         (namespace_scope_incomplete): New macro.
11499         * decl.c (pushdecl): Use it.
11500         (hack_incomplete_structures): Use it.  See through artificial
11501         binding levels.
11502         (mark_saved_scope): Mark it.
11503
11504         Implement access control for nested types.
11505         * search.c (type_access_control): New fn.
11506         (accessible_p): Now we do perform access control for types.
11507         * semantics.c (deferred_type_access_control): New fn.
11508         (initial_deferred_type_access_control): New fn.
11509         (begin_function_definition): Call it.  Add lookups parm.
11510         * decl.c (struct binding_level): Add this_class field.
11511         (pushlevel_class): Set it.
11512         (mark_binding_level): Mark it.
11513         (lookup_name_real): Use it.  Call type_access_control.
11514         (mark_saved_scope): Mark lookups field.
11515         * cp-tree.h (flagged_type_tree): Add lookups field.
11516         (struct saved_scope): Add lookups field.
11517         (type_lookups): New macro.
11518         * parse.y (declmods): Now <ftype>.
11519         (parse_decl): Add lookups parm.  Call
11520         initial_deferred_type_access_control.
11521         (lang_extdef): Clear type_lookups.
11522         (typed_declspecs, declmods, typespec): Set lookups field.
11523         (initdcl): Call deferred_type_access_control.
11524         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11525         component_decl_1, named_parm): Adjust.
11526         * friend.c (is_friend): Nested classes are friends of their
11527         enclosing classes.
11528
11529         * class.c (currently_open_derived_class): New fn.
11530         * method.c (hack_identifier): Use it.
11531
11532         * lex.c (do_identifier): Remove obsolete code.
11533
11534         * parse.y (typed_typespecs): Propagate new_type_flag properly.
11535
11536 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
11537
11538         * tinfo.h: Remove apostrophes from C++ comment (xgettext
11539         thinks this file is plain C).
11540
11541 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11542
11543         * Makefile.in (call.o): Depend on $(EXPR_H).
11544
11545         * call.c: Include "expr.h".
11546
11547         * class.c (dump_class_hierarchy): Add prototype.
11548
11549         * search.c (dfs_get_pure_virtuals): Likewise.
11550
11551 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
11552
11553         * parse.y (simple_stmt): Allow :: token in asm parameter list.
11554         * parse.c: Rebuilt.
11555
11556 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
11557
11558         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11559         Store it in DECL_FCONTEXT.
11560         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11561
11562 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
11563
11564         * tinfo.h (old abi): #include "tconfig.h".
11565         * tinfo.cc (convert_to_base): Move into old abi section.
11566
11567 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
11568
11569         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11570         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11571         (BINFO_PRIMARY_BINFO): New macro.
11572         (BF_DELTA): Rename to ...
11573         (BV_DELTA): ... this.
11574         (BF_VCALL_INDEX): Rename to ...
11575         (BV_VCALL_INDEX): ... this.
11576         (BF_FN): Rename to ...
11577         (BV_FN): ... this.
11578         * class.c (build_vbase_path): Adjust for changes to reverse_path.
11579         (set_rtti_entry): Rename BF_ macros to BV_ variants.
11580         (modify_vtable_entry): Simplify.
11581         (add_virtual_function): Rename BF_ macros to BV_ variants.
11582         (build_vtable_initializer): Likewise.
11583         (get_class_offset_1): Remove.
11584         (dfs_get_class_offset): Likewise.
11585         (get_class_offset): Likewise.
11586         (dfs_find_final_overrider): New function.
11587         (find_final_overrider): Likewise.
11588         (modify_one_vtable): Remove.
11589         (dfs_find_base): New function.
11590         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
11591         find_final_overrider.
11592         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
11593         virtuals.
11594         (dfs_fixup_vtable_deltas): Remove.
11595         (override_one_vtable): Remove.
11596         (merge_overrides): Likewise.
11597         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11598         unreal chilren of virtual bases.
11599         (finish_struct_1): Don't use merge_overrides.  Don't use
11600         dfs_fixup_vtable_deltas.
11601         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11602         BINFOs.
11603
11604 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11605             Jason Merrill  <jason@yorick.cygnus.com>
11606
11607         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11608
11609 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
11610
11611         * exception.cc (__throw_bad_typeid): Add missing std::.
11612
11613 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11614
11615         * cp-tree.h (make_thunk): PROTO -> PARAMS.
11616
11617 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
11618
11619         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11620
11621         Runtime support for new-abi rtti.
11622         * inc/typeinfo (type_info::operator!=): Define in class.
11623         (type_info::before, type_info::name, type_info::operator==,
11624         type_info::operator!=): Define new ABI implementations.
11625         (type_info::is_pointer_p, type_info::is_function_p): Declare
11626         new virtual functions.
11627         (type_info::do_catch, type_info::do_upcast): Likewise.
11628
11629         * tinfo.h (__base_class_info): Define new class.
11630         (__class_type_info): Likewise.
11631         (__si_class_type_info): Likewise.
11632         (__vmi_class_type_info): Likewise.
11633         (__dynamic_cast): Prototype.
11634
11635         * tinfo.cc: Conditionalize old and new rtti mechanisms.
11636         (type_info::is_pointer_p): Define new function.
11637         (type_info::is_function_p): Likewise.
11638         (type_info::do_catch): Likewise.
11639         (type_info::do_upcast): Likewise.
11640         (vtable_prefix): New structure for vtable access.
11641         (adjust_pointer): Define new template function.
11642         (contained_p, public_p, virtual_p, contained_public_p,
11643         contained_nonpublic_p, contained_nonvirtual_p): Define new
11644         functions.
11645         (nonvirtual_base_type): New local variable.
11646         (__class_type_info::~__class_type_info): Define.
11647         (__si_class_type_info::~__si_class_type_info): Likewise.
11648         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11649         (__class_type_info::do_catch): Define new function.
11650         (__class_type_info::do_upcast): Likewise.
11651         (__class_type_info::find_public_src): Likewise.
11652         (__class_type_info::do_find_public_src): Likewise.
11653         (__si_class_type_info::do_find_public_src): Likewise.
11654         (__vmi_class_type_info::do_find_public_src): Likewise.
11655         (__class_type_info::do_dyncast): Likewise.
11656         (__si_class_type_info::do_dyncast): Likewise.
11657         (__vmi_class_type_info::do_dyncast): Likewise.
11658         (__class_type_info::do_upcast): Likewise.
11659         (__si_class_type_info::do_upcast): Likewise.
11660         (__vmi_class_type_info::do_upcast): Likewise.
11661         (__dynamic_cast): Likewise.
11662
11663         * tinfo2.cc (__fundamental_type_info): Define new class.
11664         (__pointer_type_info): Likewise.
11665         (__reference_type_info): Likewise.
11666         (__array_type_info): Likewise.
11667         (__function_type_info): Likewise.
11668         (__enum_type_info): Likewise.
11669         (__ptr_to_member_type_info): Likewise.
11670         (__fundamental_type_info::~__fundamental_type_info): Define.
11671         (__pointer_type_info::~__pointer_type_info): Likewise.
11672         (__reference_type_info::~__reference_type_info): Likewise.
11673         (__array_type_info::~__array_type_info): Likewise.
11674         (__function_type_info::~__function_type_info): Likewise.
11675         (__enum_type_info::~__enum_type_info): Likewise.
11676         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11677         (__pointer_type_info::do_catch): Define new function.
11678         (__ptr_to_member_type_info::do_catch): Define new function.
11679
11680         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11681         (__is_pointer): Likewise.
11682
11683         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11684
11685 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
11686
11687         * cp/class.c (build_vtable): Rename to build_primary_vtable.
11688         (prepare_fresh_vtable): Rename to build_secondary_vtable.
11689         (make_new_vtable): New function.
11690         (modify_vtable_entry): Handle generation of new vtables correctly.
11691         (modify_one_vtable): Remove unused parameter.
11692         (dfs_fixup_vtable_deltas): Likewise.
11693         (override_one_vtable): Use build_secondary_vtable.
11694         (finish_struct_1): Use build_primary_vtable and
11695         build_secondary_vtable.
11696
11697 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
11698
11699         * cp/decl.c: Adjust variable names, comments, help strings.
11700
11701 2000-01-29  Nathan Sidwell  <nathan@acm.org>
11702
11703         * new2.cc (operator delete[]): Use operator delete, don't assume
11704         implementation.
11705
11706 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
11707
11708         * class.c (build_vtbl_initializer): Add argument to
11709         build_vtable_entry call.
11710
11711 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
11712
11713         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11714         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11715         (BF_DELTA): New macro.
11716         (BF_VCALL_INDEX): Likewise.
11717         (BF_FN): Likewise.
11718         (THUNK_VCALL_OFFSET): Likewise.
11719         (make_thunk): Change prototype.
11720         * class.c (build_vtable_entry): Integrate
11721         build_vtable_entry_for_fn.  Handle vcall indices.
11722         (build_vtable_entry_for_fn): Remove.
11723         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
11724         BF_VCALL_INDEX, BF_FN.
11725         (modify_vtable_entry): Integrate common code from
11726         modify_one_vtable and dfs_fixup_vtable_deltas.
11727         (add_virtual_function): Set BF_VCALL_INDEX.
11728         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
11729         and BF_FN.
11730         (modify_one_vtable): Simplify.
11731         (dfs_fixup_vtable_deltas): Likewise.
11732         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11733         * method.c (make_thunk): Handle vcall indices.
11734
11735 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
11736
11737         Compiler side new abi rtti (not enabled).
11738         * cp-tree.h (new_abi_rtti_p): New macro.
11739         (emit_support_tinfos): Prototype new function.
11740         (tinfo_decl_p): Likewise.
11741         (emit_tinfo_decl): Likwise.
11742         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11743         macros.
11744         (doing_runtime): New local static.
11745         (init_rtti_processing): Add new-abi initializer.
11746         (get_tinfo_decl): Add new-abi logic.
11747         (tinfo_from_decl): Likewise.
11748         (build_dynamic_cast_1): Likewise.
11749         (qualifier_flags): New static function.
11750         (tinfo_base_init): Likewise.
11751         (generic_initializer): Likewise.
11752         (ptr_ref_initializer): Likewise.
11753         (ptmd_initializer): Likewise.
11754         (class_hint_flags): Likewise.
11755         (class_initializer): Likewise.
11756         (synthesize_tinfo_var): Likewise.
11757         (create_real_tinfo_var): Likewise.
11758         (create_pseudo_type_info): Likewise.
11759         (get_vmi_pseudo_type_info): Likewise.
11760         (create_tinfo_types): Likewise.
11761         (emit_support_tinfos): New global function.
11762         (tinfo_decl_p): New global predicate.
11763         (emit_tinfo_decl): New global function.
11764         * class.c (set_rtti_entry): Generalize for old and new rtti.
11765         (build_vtbl_initializer): Likewise.
11766         * decl2.c (finish_file): Likewise.
11767
11768 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
11769
11770         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11771         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11772
11773 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
11774
11775         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11776         for scopes.
11777
11778 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
11779
11780         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11781
11782 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
11783
11784         * optimize.c (calls_setjmp_r): Supply new argument
11785         to special_function_p.
11786
11787 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11788
11789         * call.c: PROTO -> PARAMS.
11790         * class.c: Likewise.
11791         * cp-tree.h: Likewise.
11792         * cvt.c: Likewise.
11793         * decl.c: Likewise.
11794         * decl.h: Likewise.
11795         * decl2.c: Likewise.
11796         * dump.c: Likewise.
11797         * errfn.c: Likewise.
11798         * error.c: Likewise.
11799         * except.c: Likewise.
11800         * expr.c: Likewise.
11801         * init.c: Likewise.
11802         * input.c: Likewise.
11803         * lex.c: Likewise.
11804         * lex.h: Likewise.
11805         * method.c: Likewise.
11806         * optimize.c: Likewise.
11807         * parse.y: Likewise.
11808         * pt.c: Likewise.
11809         * repo.c: Likewise.
11810         * rtti.c: Likewise.
11811         * search.c: Likewise.
11812         * semantics.c: Likewise.
11813         * spew.c: Likewise.
11814         * tree.c: Likewise.
11815         * typeck.c: Likewise.
11816         * typeck2.c: Likewise.
11817         * xref.c: Likewise.
11818
11819 2000-01-25  Richard Henderson  <rth@cygnus.com>
11820
11821         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11822
11823 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
11824
11825         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11826         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11827         (struct vcall_offset_data_s): New type.
11828         (dfs_vcall_offset_queue_p): New function.
11829         (dfs_build_vcall_offset_vtbl_entries): Likewise.
11830         (build_vcall_offset_vtbl_entries): Likewise.
11831         (layout_vtable_decl): Likewise.
11832         (num_vfun_entries): Likewise.
11833         (num_extra_vtbl_entries): Add the entries for vcall offsets.
11834         (build_vtbl_initializer): Likewise.
11835         (dfs_finish_vtabls): Use layout_vtable_decl.
11836         (modify_one_vtables): Always duplicate vtables under the new ABI.
11837         (finish_struct_1): Use layout_vtable_decl.
11838
11839 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11840
11841         * decl.c (member_function_or_else): Change third arg from a format
11842         specifier to an `enum overload_flags'.  Callers changed.
11843
11844 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
11845
11846         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11847         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11848         build_const_cast, get_delta_difference, check_return_expr): Avoid
11849         ANSI string concatenation usage.
11850
11851 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
11852
11853         * class.c (layout_class_type): Put the fields required to make a
11854         class non-empty at the end, not the beginning, of the TYPE_FIELDs
11855         list.
11856
11857 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
11858
11859         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11860         template.
11861
11862         * decl2.c (mark_used): Do instantiate inlines that have been
11863         explicitly instantiated.
11864
11865 2000-01-24  Richard Henderson  <rth@cygnus.com>
11866
11867         * call.c (build_over_call): Use expand_tree_builtin.
11868         * typeck.c (build_function_call_real): Likewise.
11869         (build_binary_op_nodefault): Handle unordered compares.
11870
11871 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11872
11873         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11874         cp_tree_index values.
11875         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11876         New global node #defines for them.
11877         * rtti.c (call_void_fn): Replace with ...
11878         (build_runtime_decl): ... new static function.
11879         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11880         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11881         (build_dynamic_cast_1): Always produce correctly typed result.
11882         Explicitly produce type_info addresses. Use dynamic_cast_node.
11883         * exception.cc (__throw_bad_cast): Return `void *'.
11884         (__throw_bad_typeid): Return `const type_info &'.
11885
11886 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11887
11888         * cp-tree.h (get_vtable_decl): Prototype new function.
11889         * class.c (get_vtable_decl): New function. Broken out from ...
11890         (build_vtable): ... here. Use it.
11891         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11892         by get_vtable_decl.
11893
11894 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
11895
11896         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11897         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11898         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11899         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11900         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11901         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11902         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11903         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11904         (CPTI_TINFO_VAR_ID): New enumeration.
11905         (__tp_desc_type_node, __access_mode_type_node,
11906         __bltn_desc_type_node, __user_desc_type_node,
11907         __class_desc_type_node, __ptr_desc_type_node,
11908         __attr_desc_type_node, __func_desc_type_node,
11909         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11910         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11911         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11912         enum_desc_type_node, class_desc_type_node,
11913         si_class_desc_type_node, vmi_class_desc_type_node,
11914         ptmd_desc_type_node, base_desc_type_node): New #defines.
11915         (tinfo_fn_id, tinfo_fn_type): Rename to ...
11916         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11917         (tinfo_var_id): New enumeration.
11918         (DECL_TINFO_FN_P): Augment comment.
11919         * decl.c (cp_global_trees): Adjust documentation.
11920         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11921         tinfo_decl_type and tinfo_var_id.
11922         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11923         (build_typeid): Remove unused variable.
11924         (get_tinfo_var): Use tinfo_var_id.
11925         (tinfo_name): New static function.
11926         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
11927         (tinfo_from_decl): Likewise.
11928         (get_base_offset): New static function, broken out of
11929         expand_class_desc.
11930         (expand_si_desc): Use tinfo_name.
11931         (expand_class_desc): Likewise. Lose local static variable.
11932         Use base_desc_type_node. Use get_base_offset.
11933         (expand_ptr_desc): Use tinfo_name.
11934         (expand_attr_desc): Likewise.
11935         (expand_generic_desc): Likewise.
11936
11937         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
11938         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
11939
11940 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
11941
11942         * cp-tree.h (__eprintf): Remove declaration.
11943         * tree.c (__eprintf): Remove definition.
11944
11945 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
11946             Mark Mitchell  <mark@codesourcery.com>
11947
11948         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
11949         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
11950
11951 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
11952
11953         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
11954
11955 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
11956
11957         * cp-tree.h (register_dtor_fn): New function.
11958         * decl.c (destroy_local_static): Rename to ...
11959         (register_dtor_fn): ... this.  Give it external linkage.
11960         (expand_static_init): Use it.
11961         * decl2.c (do_static_initialization): Likewise, if using
11962         __cxa_atexit.
11963         (do_static_destruction): Check that __cxa_atexit is not in use.
11964         (finish_file): Don't call do_static_destruction if using
11965         __cxa_atexit.
11966
11967         * typeck.c (convert_arguments): Restore two-message error
11968         reporting.
11969
11970 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
11971
11972         Remap dynamic cast hint values to be consistent across ABIs.
11973         * search.c (dynamic_cast_base_recurse): Remap generated value.
11974         (get_dynamic_cast_base_type): Adjust documentation.
11975         * tinfo.h (__user_type_info::dyncast): Likewise.
11976         (__user_type_info::find_public_subobj): Remap BOFF meaning.
11977         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
11978         (__class_type_info::do_dyncast): Likewise.
11979         (__class_type_info::do_find_public_subobj): Likewise.
11980         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
11981
11982 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
11983
11984         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
11985
11986         * typeck2.c (incomplete_type_error): Restore previous
11987         cp_error and cp_error_at call sequence.
11988
11989 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
11990
11991         * class.c (dump_class_hierarchy): Make format agree with argument;
11992         cast pointer to unsigned long and print with %lx.
11993
11994 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
11995
11996         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
11997
11998         * typeck.c (composite_pointer_type, common_type,
11999         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
12000         build_function_call_real, convert_arguments,
12001         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
12002         build_unary_op, mark_addressable, build_compound_expr,
12003         build_static_cast, build_reinterpret_cast, build_const_cast,
12004         build_c_cast, build_modify_expr, get_delta_difference,
12005         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
12006         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
12007         into a single one.
12008         * typeck2.c (readonly_error, abstract_virtuals_error,
12009         process_init_constructor, check_for_new_type): Likewise.
12010
12011 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
12012
12013         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
12014         VAR_DECLs.
12015
12016 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
12017
12018         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
12019         (build_x_typeid): Likewise.
12020         (get_tinfo_fn): Likewise.
12021         (get_tinfo_fn_unused): Rename to ...
12022         (get_tinfo_decl): ... here.
12023         * rtti.c (build_headof): Replace logic error with assertion.
12024         (get_tinfo_fn_dynamic): Rename to ...
12025         (get_tinfo_decl_dynamic): ... here. Make static. Use
12026         complete_type_or_else.
12027         (build_x_typeid): Move into ...
12028         (build_typeid): ... here. Adjust call to
12029         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
12030         throw_bad_typeid expression.
12031         (get_tinfo_fn_unused): Rename to ...
12032         (get_tinfo_decl): ... here. Adjust comment.
12033         (get_tinfo_fn): Delete.
12034         (tinfo_from_decl): New static function.
12035         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
12036         (get_typeid): Use complete_type_or_else.
12037         (build_dynamic_cast_1): Adjust calls to
12038         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
12039         * parse.y (primary): Adjust call to build_typeid.
12040         * except.c (build_eh_type_type_ref): Adjust call to
12041         get_tinfo_decl. Mark as used.
12042         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
12043         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
12044         * parse.c: Regenerated.
12045
12046 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
12047
12048         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
12049         calling convention.
12050         (resolves_to_fixed_type_p): Document calling convention.
12051         * rtti.c (build_x_typeid): Initialize NONNULL.
12052
12053         * cp-tree.h (build_shared_int_cst): New function.
12054         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
12055         * class.c (modify_vtable_entry): Likewise.
12056         (add_virtual_function): Split out code to generated shared
12057         INTEGER_CSTs to build_share_int_cst.
12058         (modify_all_vtables): Handle all the overridden functions here.
12059         Add overridden functions from non-primary virtual bases to the
12060         primary vtable.
12061         (finish_struct_1): Adjust call to modify_all_vtables.  Add
12062         overridden functions from non-primary bases to the vtable.
12063         * tree.c (build_shared_int_cst): New function.
12064
12065         * cp-tree.h (scratchalloc): Remove.
12066         (build_scratch_list): Likewise.
12067         * call.c (convert_class_to_reference): Replace build_scratch_list
12068         and build_expr_list with build_tree_list.
12069         (add_candidate): Replace scratchalloc with expralloc.  Note memory
12070         leak.
12071         (build_user_type_conversion_1):  Replace build_scratch_list
12072         and build_expr_list with build_tree_list.
12073         (build_new_op): Likewise.
12074         (build_op_delete_call): Likewise.
12075         (convert_like): Likewise.
12076         * cvt.c (ocp_convert): Likewise.
12077         * decl.c (start_decl): Likewise.
12078         (start_function): Likewise.
12079         (finish_destructor_body): Likewise.
12080         (maybe_build_cleanup_1): Likewise.
12081         * decl2.c (reparse_decl_as_expr): Likewise.
12082         * init.c (perform_member_init): Likewise.
12083         (expand_cleanup_for_base): Likewise.
12084         (build_builtin_delete_call): Likewise.
12085         (build_new_1): Likewise.
12086         (build_delete): Likewise.
12087         * method.c (do_build_assign_ref): Likewise.
12088         * parse.y (already_scoped_stmt): Likewise.
12089         (nontrivial_exprlist): Likewise.
12090         (net_initializer): Likewise.
12091         (initlist): Likewise.
12092         * parse.c: Regenerated.
12093         * rtti.c (build_x_typeid): Likewise.
12094         (build_dynamic_cast_1): Likewise.
12095         * typeck.c (build_x_compound_expr): Likewise.
12096         (build_static_cast): Likewise.
12097         (build_modify_expr): Likewise.
12098
12099         * cp-tree.h (DECL_VINDEX): Add documentation.
12100         * class.c (build_vtable_entry): Likewise.
12101         (start_vtable): Add comment.
12102         (add_virtual_function): Replace pending_hard_virtuals with
12103         overridden_virtuals and pending_virtuals with new_virtuals.
12104         Replace redundant assignments with assertions.
12105         (check_for_override): Add comment.
12106         (check_bases_and_members): Replace pending_hard_virtuals with
12107         overridden_virtuals and pending_virtuals with new_virtuals.
12108         (create_vtbl_ptr): Likewise.
12109         (layout_class_type): Likewise.
12110         (finish_struct_1): Likewise.  Add comments.
12111
12112 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
12113
12114         * class.c (finish_struct_1): Replace redundant code with
12115         assertions.
12116
12117         * cp-tree.h (flag_new_abi): Move.
12118         (flag_use_cxa_atexit): Likewise.
12119         (flag_honor_std): Likewise.
12120         (flag_rtti): Likewise.
12121         (vbase_offsets_in_vtable_p): Define.
12122         (vptrs_present_everywhere_p): Likewise.
12123         (TYPE_CONTAINS_VPTR_P): Likewise.
12124         (dfs_walk_real): Declare.
12125         * class.c (build_vbase_pointer_fields): Check
12126         vbase_offsets_in_vtable_p.
12127         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
12128         BINFO_VPTR_FIELD.
12129         (build_vbase_offset_vtbl_entries): Simplify.
12130         (build_vbase_offset_vtbl_entries): Adjust.
12131         (build_vbase_pointer): Add ability to look up vbase offsets in
12132         vtable.
12133         (start_vtable): New function.
12134         (add_virtual_function): Use it.
12135         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
12136         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
12137         (build_vtbl_initializer): Take the type of the complete object as
12138         input.  Use it to correctly calculate vbase offsets.
12139         (dfs_finish_vtbls): Pass the complete type to
12140         build_vtbl_initializer.
12141         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
12142         (create_vtable_ptr): Create a vtable even if there are no
12143         new virtual functions, under the new ABI.
12144         (finish_struct_1): Likewise.
12145         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
12146         * decl.c (exapnd_static_init): Remove call to
12147         preserve_initializer.
12148         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
12149         vtables.
12150         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
12151         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
12152         (construct_virtual_bases): Don't initialize virtual base pointers
12153         under the new ABI.
12154         (build_aggr_init): Clean up comment.
12155         (expand_aggr_init_1): Likewise.
12156         * rtti.c (expand_class_desc): Store the virtual function table
12157         index where the vbase offset lives in the offset field.
12158         * search.c (dfs_walk_real): Make it global.
12159         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
12160         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
12161
12162         * tinfo.h (USItype): Make it signed under the new ABI.
12163         * tinfo.cc (convert_to_base): New function.  Encapsulate base
12164         conversion logic here.
12165         (__class_type_info::do_upcast): Use it.
12166         (__class_type_info::do_dyncast): Likewise.
12167         (__class_type_info::do_find_public_subobj): Likewise.
12168
12169         * init.c (construct_virtual_bases): Don't look up the addresses of
12170         virtual bases at run-time.
12171
12172         * class.c (build_vbase_pointer): Relocate.
12173         (build_vbase_pointer_fields): Likewise.
12174         (dfs_build_vbase_offset_vtbl_entries): Likewise.
12175         (build_vbase_offset_vtbl_entries): Likewise.
12176
12177         * decl.c (init_decl_processing): Complain if -fnew-abi
12178         -fno-vtable-thunks is used.
12179
12180         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
12181         flag_new_abi.
12182
12183 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
12184
12185         * cp-tree.h (num_extra_vtbl_entries): New function.
12186         (size_extra_vtbl_entries): Likewise.
12187         (dfs_vtable_path_unmark): Likewise.
12188         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
12189         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
12190         * class.c (num_extra_vtbl_entries): New function.
12191         (size_extra_vtbl_entries): Likewise.
12192         (dfs_build_vbase_offset_vtbl_entries): New function.
12193         (build_vbase_offset_vtbl_entries): Likewise.
12194         (build_vtbl_initializer): Use it.
12195         (finish_struct_1): Adjust vtable sizes (using
12196         num_extra_vtbl_entries).
12197         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
12198         THUNK_DECL is non-NULL before expanding it.
12199         * init.c (expand_virtual_init): Adjust the vtable pointer by
12200         size_extra_vtbl_entries before storing it.
12201         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
12202         Handle TREE_LIST parameters here, not in the dfs_* functions.
12203         (dfs_unmarked_real_bases_queue_p): Adjust.
12204         (dfs_marked_real_bases_queue_p): Likewise.
12205         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
12206         (dfs_vtable_path_marked_real_bases_queue_p): New function.
12207         (dfs_vtable_path_unmark): Likewise.
12208
12209 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
12210
12211         * optimize.c (copy_body_r): Clear the operand three of a
12212         TARGET_EXPR when copying it.
12213
12214 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12215
12216         * method.c (build_decl_overload_real): Check whether we are in ::
12217         before returning __builtin_new/delete.
12218
12219 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
12220
12221         * pt.c (tsubst_friend_function): Improve comment.
12222         (instantiate_decl): Avoid crashing when a "nested" function is
12223         instantiated from the top level.
12224
12225         * dump.c (dqeueue_and_dump): Dump
12226         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
12227
12228 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12229
12230         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
12231
12232 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
12233
12234         * g++spec.c (lang_specific_driver): Add -fnew-abi if
12235         ENABLE_NEW_GXX_ABI defined.
12236         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
12237         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
12238         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
12239
12240 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
12241
12242         * decl.c (start_cleanup_fn): Call pushdecl.
12243
12244         * call.c (convert_class_to_reference): Fix typos.
12245         (build_conditional_expr): Handle errors gracefully.
12246         * class.c (push_nested_class): Likewise.
12247         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
12248         (DECL_THIS_EXTERN): Use it.
12249         (DECL_THIS_STATIC): Likewise.
12250         * cvt.c (convert_to_void): Handle errors gracefully.
12251         (build_expr_type_conversion): Likewise.
12252         * decl.c (maybe_push_decl): Likewise.
12253         (start_decl_1): Likewise.
12254         (require_complete_types_for_parms): Likewise.
12255         * parse.y (structsp): Likewise.
12256         (base_class): Likewise.
12257         * parse.c: Regenerated.
12258         * pt.c (finish_member_template_decl): Likewise.
12259         * typeck.c (decay_conversion): Likewise.
12260
12261         * cp-tree.h (dfs_skip_vbases): New function.
12262         (find_vbase_instance): Likewise.
12263         * class.c (determine_primary_base): Allow a nearly empty base to
12264         serve as a primary base class under the new ABI.
12265         (get_class_offset_1): Rename to ...
12266         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
12267         messages here.
12268         (get_class_offset): Use it.  Issue error messages here.
12269         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
12270         find the right copies of virtual bases.
12271         (fixup_vtable_deltas1): Rename to ...
12272         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
12273         bases as primary bases.
12274         (fixup_vtable_deltas): Remove.
12275         (override_one_vtable): Handle virtual bases as primary bases.
12276         (merge_overrides): Likewise.
12277         (finish_struct_1): Likewise.
12278         (dump_class_hierarchy): Dump primary-ness of bases as well.
12279         * search.c (mark_primary_bases): Use a pre-order traversal to
12280         handle primary virtual bases.
12281         (dfs_skip_vbases): New fiunction.
12282         (expand_upcast_fixups): Adjust to handle primary virtual bases.
12283         (fixup_virtual_upcast_offsets): Likewise.
12284         (fixup_all_virtual_upcast_offsets): Likewise.
12285         (dfs_find_vbase_instances): New function.
12286         (find_vbase_instance): Likewise.
12287
12288 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
12289
12290         * lex.c (DIR_SEPARATOR): Delete macro.
12291
12292 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
12293
12294        * decl2.c (lang_decode_option): Handle automatic line wrapping
12295        option.
12296
12297 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
12298
12299         * friend.c (do_friend): Don't resolve scopes when processing
12300         template declarations, even if the qualifying scope doesn't
12301         involve template parameters.
12302
12303 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
12304
12305         * class.c (dfs_modify_vtables_queue_p): Remove.
12306         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
12307         and dfs_marked_real_bases_queue_p instead of
12308         dfs_modify_vtables_queue_p.
12309
12310         * class.c (build_vbase_path): Simplify.
12311         (dfs_propagate_binfo_offsets): New function.
12312         (propagate_binfo_offsets): Use it.
12313         (remove_base_field): Simplify.
12314         (dfs_set_offset_for_vbases): Remove.
12315         (dfs_set_offset_for_shared_vbases): New function.
12316         (dfs_set_offset_for_unshared_vbases): Likewise.
12317         (layout_virtual_bases): Use them.
12318         (layout_basetypes): Don't call propagate_binfo_offsets.
12319         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12320         for the vbases.
12321
12322         * class.c (build_base_field): New function, split out from ...
12323         (build_base_fields): ... here.  Use it.  Allocate primary bases
12324         first, under the new ABI.
12325         (get_vtable_entry): Remove.
12326         (remove_base_field): New function, split out from ...
12327         (remove_base_fields): ... here.  Adjust since primary bases come
12328         first under the new ABI.
12329
12330         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12331         (initialize_vtbl_ptrs): New function.
12332         (expand_indirect_vtbls_init): Change prototype.
12333         (convert_pointer_to_vbase): Declare.
12334         * init.c (expand_direct_vtbls_init): Remove.
12335         (dfs_initialize_vtbl_ptrs): New function.
12336         (initialize_vtbl_ptrs): Likewise.
12337         (emit_base_init): Use initialize_vtbl_ptrs.
12338         * search.c (convert_pointer_to_vbase): Make it global.
12339         (expand_indirect_vtbls_init): Remove vtable initialization code.
12340         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12341
12342         * class.c (dfs_finish_vtbls): New function.
12343         (finish_vtbls): Use it.
12344         (dump_class_hierarchy): New function.
12345
12346         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12347         (BINFO_VBASE_PRIMARY_P): New macro.
12348         (BINFO_VIRTUALS): Add to documentation.
12349         (SET_BINFO_PRIMARY_MARKED_P): Remove.
12350         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12351         (dfs_mark_primary_bases_queue_p): Likewise.
12352         (dfs_unmarked_real_bases_queue_p): New function.
12353         (dfs_marked_real_bases_queue_p): Likewise.
12354         * search.c (dfs_mark_primary_bases): Adjust.
12355         (mark_primary_bases): Likewise.
12356         (get_shared_vbase_if_not_primary): New function.
12357         (dfs_unmarked_real_bases_queue_p): Likewise.
12358         (dfs_marked_real_bases_queue_p): Likewise.
12359         (dfs_get_pure_virtuals): Simplify.
12360         (get_pure_virtuals): Likewise.
12361
12362 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12363
12364         * lex.c: Include tm_p.h.
12365
12366 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
12367
12368         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
12369
12370 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
12371
12372         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12373         * pt.c (instantiate_decl): Defer comdat templates that might not be
12374         needed.
12375
12376         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12377         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12378         (finish_file): Likewise.
12379
12380         * decl2.c (import_export_class): Undo 12/14 change.
12381
12382         * error.c (dump_decl): operator new, not operatornew.
12383
12384         * class.c (field_decl_cmp): A nontype is "greater" than a type.
12385         * search.c (lookup_field_1): Look for the last field with the
12386         desired name.
12387
12388 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12389
12390         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12391         FUNCTION_DECL.
12392
12393 2000-01-05  Nathan Sidwell  <nathan@acm.org>
12394
12395         * typeck.c (build_static_cast): Don't strip target qualifiers
12396         when casting from a class.
12397
12398 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12399
12400         * class.c (warn_hidden): Initialize variable `fndecl'.
12401
12402 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
12403
12404         * decl.c (flag_isoc9x): New variable to be able to use code in
12405         c-common.c.  For now always zero.
12406
12407 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
12408
12409         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12410         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12411         or unshare_base_binfos for virtual bases here.
12412         * search.c (dfs_get_vbase_types): Do it here.
12413         (get_vbase_types): Adjust.
12414
12415 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
12416
12417         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12418         (BINFO_PRIMARY_MARKED_P): Use flag 5.
12419         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12420         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12421         (unmark_primary_bases): Remove declaration.
12422         (unmarkedp): Declare.
12423         (dfs_vbase_unmark): Likewise.
12424         * class.c (determine_primary_base): Return immediately if there
12425         are no base classes.  Call mark_primary_bases here.
12426         (modify_all_direct_vtables): Remove.
12427         (modify_all_indirect_vtables): Remove.
12428         (dfs_modify_vtables_queue_p): New function.
12429         (dfs_modify_vtables): New function.
12430         (modify_all_vtables): Use them.
12431         (build_base_fields): Build FIELD_DECLs for primary virtual base
12432         classes.
12433         (create_vtable_ptr): Don't call determine_primary_base here.
12434         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12435         (dfs_set_offset_for_vbases): ... this.
12436         (layout_virtual_bases): Use it.
12437         (layout_class_type): Call determine_primary_base here.
12438         * search.c (unmarkedp): Make it global.
12439         (shared_marked_p): Simplify.
12440         (shared_unmarked_p): Likewise.
12441         (dfs_primary_bases_queue_p): Remove.
12442         (dfs_unmark_primary_bases): Likewise.
12443         (unmark_primary_bases): Likewise.
12444         (mark_primary_bases): Simplify.
12445         (get_pure_virtuals): Don't call mark_primary_bases here.
12446         (dfs_vbase_unmark): New function.
12447         (get_vbase_types): Simplify.
12448
12449         * class.c (struct base_info): Remove.
12450         (determine_primary_base): Take has_virtual_p rather than a
12451         base_info as input.  Don't calculate max_has_virtual.
12452         (finish_struct_bits): Remove max_has_virtual argument.
12453         (create_vtable_ptr): Remove max_has_virtual_p argument.
12454         (layout_virtual_bases): Remove max argument.
12455         (layout_basetypes): Likewise.
12456         (layout_class_type): Remove max_has_virtual_p argument.
12457         (finish_struct_1): Remove max_has_virtual.
12458
12459         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12460         (layout_basetypes): Remove.
12461         * class.c (propagate_binfo_offsets): Moved here from tree.c.
12462         Update to handle primary virtual bases.
12463         (remove_base_fields): New function, split out from
12464         layout_basetypes.
12465         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12466         (layout_virtual_bases): New function, split out from
12467         layout_basetypes.  Update to handle primary virtual bases.
12468         (layout_basetypes): Moved here from tree.c.  Use
12469         remove_base_fields and layout_virtual_bases.
12470         * search.c (dfs_mark_primary_bases_queue_p): New function.
12471         (mark_primary_bases): Use it.
12472         * tree.c (CEIL): Remove.
12473         (propagate_binfo_offsets): Remove.
12474         (layout_basetypes): Remove.
12475
12476 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12477
12478         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12479         (BINFO_PRIMARY_MARKED_P): New macro.
12480         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12481         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12482         (mark_primary_bases): New function.
12483         (unmark_primary_bases): Likewise.
12484         * search.c (get_abstract_virtuals_1): Remove.
12485         (dfs_mark_primary_bases): New function.
12486         (mark_primary_bases): Likewise.
12487         (dfs_unmark_primary_bases): Likewise.
12488         (unmark_primary_bases): Likewise.
12489         (dfs_get_pure_virtuals): Likewise.
12490
12491 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
12492
12493         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12494         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12495         (modify_one_vtable): Adjust.
12496         (fixup_vtable_deltas1): Likewise.
12497         (override_one_vtable): Likewise.
12498         * search.c (get_abstract_virtuals_1): Likewise.
12499         (get_pure_virtuals): Likewise.
12500         (expand_upcast_fixups): Likewise.
12501         * tree.c (debug_binfo): Likewise.
12502
12503         * class.c (build_vtable): Don't return a value.  Don't rebuild
12504         vtables for bases that have already been handled.
12505         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12506         already been handled.
12507         (modify_one_vtable): Adjust accordingly.
12508         (fixup_vtable_deltas1): Likewise.
12509         (finish_struct_1): Likewise.
12510
12511 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12512
12513         * call.c (build_new_method_call): Also check destructors.